| /OK3568_Linux_fs/kernel/drivers/net/wireless/ath/wil6210/ |
| H A D | pmc.c | 14 #include "pmc.h" 21 static int wil_is_pmc_allocated(struct pmc_ctx *pmc) in wil_is_pmc_allocated() argument 23 return !!pmc->pring_va; in wil_is_pmc_allocated() 28 memset(&wil->pmc, 0, sizeof(struct pmc_ctx)); in wil_pmc_init() 29 mutex_init(&wil->pmc.lock); in wil_pmc_init() 34 * Initialize the descriptors as required by pmc dma. 44 struct pmc_ctx *pmc = &wil->pmc; in wil_pmc_alloc() local 50 mutex_lock(&pmc->lock); in wil_pmc_alloc() 52 if (wil_is_pmc_allocated(pmc)) { in wil_pmc_alloc() 54 wil_err(wil, "ERROR pmc is already allocated\n"); in wil_pmc_alloc() [all …]
|
| /OK3568_Linux_fs/kernel/drivers/soc/tegra/ |
| H A D | pmc.c | 3 * drivers/soc/tegra/pmc.c 12 #define pr_fmt(fmt) "tegra-pmc: " fmt 49 #include <soc/tegra/pmc.h> 55 #include <dt-bindings/soc/tegra-pmc.h> 164 /* for secure PMC */ 236 struct tegra_pmc *pmc; member 314 void (*init)(struct tegra_pmc *pmc); 315 void (*setup_irq_polarity)(struct tegra_pmc *pmc, 320 int (*powergate_set)(struct tegra_pmc *pmc, unsigned int id, 342 * struct tegra_pmc - NVIDIA Tegra PMC [all …]
|
| /OK3568_Linux_fs/kernel/arch/x86/kvm/ |
| H A D | pmu.c | 35 * - There are three types of index to access perf counters (PMC): 43 * 3. Global PMC Index (named pmc): pmc is an index specific to PMU 44 * code. Each pmc, stored in kvm_pmc.idx field, is unique across 46 * between pmc and perf counters is as the following: 64 struct kvm_pmc *pmc = perf_event->overflow_handler_context; in kvm_perf_overflow() local 65 struct kvm_pmu *pmu = pmc_to_pmu(pmc); in kvm_perf_overflow() 67 if (!test_and_set_bit(pmc->idx, pmu->reprogram_pmi)) { in kvm_perf_overflow() 68 __set_bit(pmc->idx, (unsigned long *)&pmu->global_status); in kvm_perf_overflow() 69 kvm_make_request(KVM_REQ_PMU, pmc->vcpu); in kvm_perf_overflow() 77 struct kvm_pmc *pmc = perf_event->overflow_handler_context; in kvm_perf_overflow_intr() local [all …]
|
| H A D | pmu.h | 9 #define pmc_to_pmu(pmc) (&(pmc)->vcpu->arch.pmu) argument 27 unsigned int (*pmc_perf_hw_id)(struct kvm_pmc *pmc); 29 bool (*pmc_is_enabled)(struct kvm_pmc *pmc); 43 static inline u64 pmc_bitmask(struct kvm_pmc *pmc) in pmc_bitmask() argument 45 struct kvm_pmu *pmu = pmc_to_pmu(pmc); in pmc_bitmask() 47 return pmu->counter_bitmask[pmc->type]; in pmc_bitmask() 50 static inline u64 pmc_read_counter(struct kvm_pmc *pmc) in pmc_read_counter() argument 54 counter = pmc->counter; in pmc_read_counter() 55 if (pmc->perf_event) in pmc_read_counter() 56 counter += perf_event_read_value(pmc->perf_event, in pmc_read_counter() [all …]
|
| /OK3568_Linux_fs/kernel/arch/arm/mach-at91/ |
| H A D | pm_suspend.S | 18 pmc .req r0 label 27 1: ldr tmp1, [pmc, #AT91_PMC_SR] 36 1: ldr tmp1, [pmc, #AT91_PMC_SR] 45 1: ldr tmp1, [pmc, #AT91_PMC_SR] 57 str tmp1, [pmc, #AT91_PMC_SCDR] 126 ldr pmc, .pmc_base 145 ldr pmc, .pmc_base 147 ldr tmp1, [pmc, tmp2] 149 str tmp1, [pmc, tmp2] 166 ldr pmc, .pmc_base [all …]
|
| /OK3568_Linux_fs/kernel/drivers/mfd/ |
| H A D | intel_pmc_bxt.c | 3 * Driver for the Intel Broxton PMC 10 * The PMC (Power Management Controller) running on the ARC processor 13 * turn sends messages between the IA and the PMC. 52 * BIOS does not create an ACPI device for each PMC function, but 74 * intel_pmc_gcr_read64() - Read a 64-bit PMC GCR register 75 * @pmc: PMC device pointer 79 * Reads the 64-bit PMC GCR register at given offset. 83 int intel_pmc_gcr_read64(struct intel_pmc_dev *pmc, u32 offset, u64 *data) in intel_pmc_gcr_read64() argument 88 spin_lock(&pmc->gcr_lock); in intel_pmc_gcr_read64() 89 *data = readq(pmc->gcr_mem_base + offset); in intel_pmc_gcr_read64() [all …]
|
| /OK3568_Linux_fs/kernel/net/ipv4/ |
| H A D | igmp.c | 160 static int sf_setstate(struct ip_mc_list *pmc); 161 static void sf_markstate(struct ip_mc_list *pmc); 163 static void ip_mc_clear_src(struct ip_mc_list *pmc); 175 #define for_each_pmc_rcu(in_dev, pmc) \ argument 176 for (pmc = rcu_dereference(in_dev->mc_list); \ 177 pmc != NULL; \ 178 pmc = rcu_dereference(pmc->next_rcu)) 180 #define for_each_pmc_rtnl(in_dev, pmc) \ argument 181 for (pmc = rtnl_dereference(in_dev->mc_list); \ 182 pmc != NULL; \ [all …]
|
| /OK3568_Linux_fs/kernel/arch/arm64/kvm/ |
| H A D | pmu-emul.c | 19 static void kvm_pmu_stop_counter(struct kvm_vcpu *vcpu, struct kvm_pmc *pmc); 49 static struct kvm_vcpu *kvm_pmc_to_vcpu(struct kvm_pmc *pmc) in kvm_pmc_to_vcpu() argument 54 pmc -= pmc->idx; in kvm_pmc_to_vcpu() 55 pmu = container_of(pmc, struct kvm_pmu, pmc[0]); in kvm_pmc_to_vcpu() 61 * kvm_pmu_pmc_is_chained - determine if the pmc is chained 62 * @pmc: The PMU counter pointer 64 static bool kvm_pmu_pmc_is_chained(struct kvm_pmc *pmc) in kvm_pmu_pmc_is_chained() argument 66 struct kvm_vcpu *vcpu = kvm_pmc_to_vcpu(pmc); in kvm_pmu_pmc_is_chained() 68 return test_bit(pmc->idx >> 1, vcpu->arch.pmu.chained); in kvm_pmu_pmc_is_chained() 81 * kvm_pmu_get_canonical_pmc - obtain the canonical pmc [all …]
|
| /OK3568_Linux_fs/kernel/Documentation/devicetree/bindings/powerpc/fsl/ |
| H A D | pmc.txt | 4 - compatible: "fsl,<chip>-pmc". 6 "fsl,mpc8349-pmc" should be listed for any chip whose PMC is 7 compatible. "fsl,mpc8313-pmc" should also be listed for any chip 8 whose PMC is compatible, and implies deep-sleep capability. 10 "fsl,mpc8548-pmc" should be listed for any chip whose PMC is 11 compatible. "fsl,mpc8536-pmc" should also be listed for any chip 12 whose PMC is compatible, and implies deep-sleep capability. 14 "fsl,mpc8641d-pmc" should be listed for any chip whose PMC is 15 compatible; all statements below that apply to "fsl,mpc8548-pmc" also 16 apply to "fsl,mpc8641d-pmc". [all …]
|
| /OK3568_Linux_fs/kernel/net/ipv6/ |
| H A D | mcast.c | 79 static void mld_add_delrec(struct inet6_dev *idev, struct ifmcaddr6 *pmc); 80 static void mld_del_delrec(struct inet6_dev *idev, struct ifmcaddr6 *pmc); 83 static int sf_setstate(struct ifmcaddr6 *pmc); 84 static void sf_markstate(struct ifmcaddr6 *pmc); 85 static void ip6_mc_clear_src(struct ifmcaddr6 *pmc); 116 #define for_each_pmc_rcu(np, pmc) \ argument 117 for (pmc = rcu_dereference(np->ipv6_mc_list); \ 118 pmc != NULL; \ 119 pmc = rcu_dereference(pmc->next)) 332 struct ipv6_mc_socklist *pmc; in ip6_mc_source() local [all …]
|
| /OK3568_Linux_fs/kernel/arch/x86/kvm/vmx/ |
| H A D | pmu_intel.c | 35 /* mapping between fixed pmc index and intel_arch_events array */ 45 struct kvm_pmc *pmc; in reprogram_fixed_counters() local 47 pmc = get_fixed_pmc(pmu, MSR_CORE_PERF_FIXED_CTR0 + i); in reprogram_fixed_counters() 53 reprogram_fixed_counter(pmc, new_ctrl, i); in reprogram_fixed_counters() 71 static unsigned int intel_pmc_perf_hw_id(struct kvm_pmc *pmc) in intel_pmc_perf_hw_id() argument 73 struct kvm_pmu *pmu = pmc_to_pmu(pmc); in intel_pmc_perf_hw_id() 74 u8 event_select = pmc->eventsel & ARCH_PERFMON_EVENTSEL_EVENT; in intel_pmc_perf_hw_id() 75 u8 unit_mask = (pmc->eventsel & ARCH_PERFMON_EVENTSEL_UMASK) >> 8; in intel_pmc_perf_hw_id() 102 /* check if a PMC is enabled by comparing it with globl_ctrl bits. */ 103 static bool intel_pmc_is_enabled(struct kvm_pmc *pmc) in intel_pmc_is_enabled() argument [all …]
|
| /OK3568_Linux_fs/u-boot/arch/arm/mach-at91/ |
| H A D | clock.c | 17 struct at91_pmc *pmc = (struct at91_pmc *)ATMEL_BASE_PMC; in at91_periph_clk_enable() local 26 writel(id, &pmc->pcr); in at91_periph_clk_enable() 28 div_value = readl(&pmc->pcr) & AT91_PMC_PCR_DIV; in at91_periph_clk_enable() 32 writel(regval, &pmc->pcr); in at91_periph_clk_enable() 34 writel(0x01 << id, &pmc->pcer); in at91_periph_clk_enable() 40 struct at91_pmc *pmc = (struct at91_pmc *)ATMEL_BASE_PMC; in at91_periph_clk_disable() local 50 writel(regval, &pmc->pcr); in at91_periph_clk_disable() 52 writel(0x01 << id, &pmc->pcdr); in at91_periph_clk_disable() 58 struct at91_pmc *pmc = (struct at91_pmc *)ATMEL_BASE_PMC; in at91_system_clk_enable() local 60 writel(sys_clk, &pmc->scer); in at91_system_clk_enable() [all …]
|
| /OK3568_Linux_fs/kernel/arch/arm/boot/dts/ |
| H A D | sam9x60.dtsi | 83 clocks = <&pmc PMC_TYPE_PERIPHERAL 23>, <&pmc PMC_TYPE_CORE PMC_UTMI>; 85 assigned-clocks = <&pmc PMC_TYPE_CORE PMC_UTMI>; 94 clocks = <&pmc PMC_TYPE_PERIPHERAL 22>, <&pmc PMC_TYPE_PERIPHERAL 22>, <&pmc PMC_TYPE_SYSTEM 6>; 103 clocks = <&pmc PMC_TYPE_CORE PMC_UTMI>, <&pmc PMC_TYPE_PERIPHERAL 22>; 105 assigned-clocks = <&pmc PMC_TYPE_CORE PMC_UTMI>; 123 clocks = <&pmc PMC_TYPE_CORE PMC_MCK>; 140 clocks = <&pmc PMC_TYPE_PERIPHERAL 12>, <&pmc PMC_TYPE_GCK 12>; 142 assigned-clocks = <&pmc PMC_TYPE_GCK 12>; 151 clocks = <&pmc PMC_TYPE_PERIPHERAL 26>, <&pmc PMC_TYPE_GCK 26>; 153 assigned-clocks = <&pmc PMC_TYPE_GCK 26>; [all …]
|
| H A D | sama5d2.dtsi | 47 clocks = <&pmc PMC_TYPE_CORE PMC_MCK>; 63 clocks = <&pmc PMC_TYPE_CORE PMC_MCK>; 123 clocks = <&pmc PMC_TYPE_PERIPHERAL 42>, <&pmc PMC_TYPE_CORE PMC_UTMI>; 132 clocks = <&pmc PMC_TYPE_PERIPHERAL 41>, <&pmc PMC_TYPE_PERIPHERAL 41>, <&pmc PMC_TYPE_SYSTEM 6>; 141 clocks = <&pmc PMC_TYPE_CORE PMC_UTMI>, <&pmc PMC_TYPE_PERIPHERAL 41>; 165 clocks = <&pmc PMC_TYPE_CORE PMC_MCK2>; 184 clocks = <&pmc PMC_TYPE_PERIPHERAL 31>, <&pmc PMC_TYPE_GCK 31>, <&pmc PMC_TYPE_CORE PMC_MAIN>; 186 assigned-clocks = <&pmc PMC_TYPE_GCK 31>; 195 clocks = <&pmc PMC_TYPE_PERIPHERAL 32>, <&pmc PMC_TYPE_GCK 32>, <&pmc PMC_TYPE_CORE PMC_MAIN>; 197 assigned-clocks = <&pmc PMC_TYPE_GCK 32>; [all …]
|
| /OK3568_Linux_fs/kernel/drivers/platform/x86/ |
| H A D | pmc_atom.c | 14 #include <linux/platform_data/x86/clk-pmc-atom.h> 203 static inline u32 pmc_reg_read(struct pmc_dev *pmc, int reg_offset) in pmc_reg_read() argument 205 return readl(pmc->regmap + reg_offset); in pmc_reg_read() 208 static inline void pmc_reg_write(struct pmc_dev *pmc, int reg_offset, u32 val) in pmc_reg_write() argument 210 writel(val, pmc->regmap + reg_offset); in pmc_reg_write() 215 struct pmc_dev *pmc = &pmc_device; in pmc_atom_read() local 217 if (!pmc->init) in pmc_atom_read() 220 *value = pmc_reg_read(pmc, offset); in pmc_atom_read() 227 struct pmc_dev *pmc = &pmc_device; in pmc_atom_write() local 229 if (!pmc->init) in pmc_atom_write() [all …]
|
| /OK3568_Linux_fs/kernel/arch/powerpc/perf/ |
| H A D | power7-pmu.c | 18 #define PM_PMC_SH 16 /* PMC number (1-based) for direct events */ 86 int pmc, sh, unit; in power7_get_constraint() local 89 pmc = (event >> PM_PMC_SH) & PM_PMC_MSK; in power7_get_constraint() 90 if (pmc) { in power7_get_constraint() 91 if (pmc > 6) in power7_get_constraint() 93 sh = (pmc - 1) * 2; in power7_get_constraint() 96 if (pmc >= 5 && !(event == 0x500fa || event == 0x600f4)) in power7_get_constraint() 99 if (pmc < 5) { in power7_get_constraint() 146 int pmc, psel; in find_alternative_decode() local 149 pmc = (event >> PM_PMC_SH) & PM_PMC_MSK; in find_alternative_decode() [all …]
|
| H A D | ppc970-pmu.c | 17 #define PM_PMC_SH 12 /* PMC number (1-based) for direct events */ 147 int pmc, psel, unit, byte, bit; in p970_marked_instr_event() local 150 pmc = (event >> PM_PMC_SH) & PM_PMC_MSK; in p970_marked_instr_event() 152 if (pmc) { in p970_marked_instr_event() 153 if (direct_marked_event[pmc - 1] & (1 << psel)) in p970_marked_instr_event() 156 bit = (pmc <= 4)? pmc - 1: 8 - pmc; in p970_marked_instr_event() 195 int pmc, byte, unit, sh, spcsel; in p970_get_constraint() local 199 pmc = (event >> PM_PMC_SH) & PM_PMC_MSK; in p970_get_constraint() 200 if (pmc) { in p970_get_constraint() 201 if (pmc > 8) in p970_get_constraint() [all …]
|
| H A D | power5+-pmu.c | 18 #define PM_PMC_SH 20 /* PMC number (1-based) for direct events */ 137 int pmc, byte, unit, sh; in power5p_get_constraint() local 141 pmc = (event >> PM_PMC_SH) & PM_PMC_MSK; in power5p_get_constraint() 142 if (pmc) { in power5p_get_constraint() 143 if (pmc > 6) in power5p_get_constraint() 145 sh = (pmc - 1) * 2; in power5p_get_constraint() 148 if (pmc >= 5 && !(event == 0x500009 || event == 0x600005)) in power5p_get_constraint() 179 if (pmc < 5) { in power5p_get_constraint() 191 int pmc = (event >> PM_PMC_SH) & PM_PMC_MSK; in power5p_limited_pmc_event() local 193 return pmc == 5 || pmc == 6; in power5p_limited_pmc_event() [all …]
|
| H A D | power5-pmu.c | 18 #define PM_PMC_SH 20 /* PMC number (1-based) for direct events */ 141 int pmc, byte, unit, sh; in power5_get_constraint() local 146 pmc = (event >> PM_PMC_SH) & PM_PMC_MSK; in power5_get_constraint() 147 if (pmc) { in power5_get_constraint() 148 if (pmc > 6) in power5_get_constraint() 150 sh = (pmc - 1) * 2; in power5_get_constraint() 153 if (pmc <= 4) in power5_get_constraint() 154 grp = (pmc - 1) >> 1; in power5_get_constraint() 186 if (!pmc) in power5_get_constraint() 201 if (pmc < 5) { in power5_get_constraint() [all …]
|
| H A D | power6-pmu.c | 18 #define PM_PMC_SH 20 /* PMC number (1-based) for direct events */ 139 int pmc, psel, ptype; in power6_marked_instr_event() local 143 pmc = (event >> PM_PMC_SH) & PM_PMC_MSK; in power6_marked_instr_event() 145 if (pmc >= 5) in power6_marked_instr_event() 151 if (pmc == 0 || !(ptype & (1 << (pmc - 1)))) in power6_marked_instr_event() 159 bit = ptype ^ (pmc - 1); in power6_marked_instr_event() 173 * Assign PMC numbers and compute MMCR1 value for a set of events 181 unsigned int pmc, ev, b, u, s, psel; in p6_compute_mmcr() local 188 pmc = (event[i] >> PM_PMC_SH) & PM_PMC_MSK; in p6_compute_mmcr() 189 if (pmc) { in p6_compute_mmcr() [all …]
|
| H A D | isa207-common.c | 16 PMU_FORMAT_ATTR(pmc, "config:16-19"); 47 /* Only check pmc, unit and pmcxsel, ignore the edge bit (0) */ in event_is_fab_match() 127 static unsigned long combine_shift(unsigned long pmc) in combine_shift() argument 130 return p9_MMCR1_COMBINE_SHIFT(pmc); in combine_shift() 132 return MMCR1_COMBINE_SHIFT(pmc); in combine_shift() 261 unsigned int unit, pmc, cache, ebb; in isa207_get_constraint() local 269 pmc = (event >> EVENT_PMC_SHIFT) & EVENT_PMC_MASK; in isa207_get_constraint() 279 if (pmc) { in isa207_get_constraint() 282 if (pmc > 6) in isa207_get_constraint() 288 if (pmc >= 5 && base_event != 0x500fa && in isa207_get_constraint() [all …]
|
| H A D | isa207-common.h | 38 #define EVENT_PMC_SHIFT 16 /* PMC number (1-based) */ 134 * BHRB IFM -* | | |*radix_scope | Count of events for each PMC. 139 * The PMC fields P1..P6, and NC, are adder fields. As we accumulate constraints 189 * For the per-PMC fields we have two bits. The low bit is added, so if two 190 * events ask for the same PMC the sum will overflow, setting the high bit, 193 #define CNST_PMC_SHIFT(pmc) ((pmc - 1) * 2) argument 194 #define CNST_PMC_VAL(pmc) (1 << CNST_PMC_SHIFT(pmc)) argument 195 #define CNST_PMC_MASK(pmc) (2 << CNST_PMC_SHIFT(pmc)) argument 203 #define MMCR1_UNIT_SHIFT(pmc) (60 - (4 * ((pmc) - 1))) argument 204 #define MMCR1_COMBINE_SHIFT(pmc) (35 - ((pmc) - 1)) argument [all …]
|
| /OK3568_Linux_fs/kernel/arch/x86/kvm/svm/ |
| H A D | pmu.c | 145 static unsigned int amd_pmc_perf_hw_id(struct kvm_pmc *pmc) in amd_pmc_perf_hw_id() argument 148 u8 event_select = pmc->eventsel & ARCH_PERFMON_EVENTSEL_EVENT; in amd_pmc_perf_hw_id() 149 u8 unit_mask = (pmc->eventsel & ARCH_PERFMON_EVENTSEL_UMASK) >> 8; in amd_pmc_perf_hw_id() 152 if (guest_cpuid_family(pmc->vcpu) >= 0x17) in amd_pmc_perf_hw_id() 174 /* check if a PMC is enabled by comparing it against global_ctrl bits. Because 177 static bool amd_pmc_is_enabled(struct kvm_pmc *pmc) in amd_pmc_is_enabled() argument 225 /* All MSRs refer to exactly one PMC, so msr_idx_to_pmc is enough. */ in amd_is_valid_msr() 232 struct kvm_pmc *pmc; in amd_msr_idx_to_pmc() local 234 pmc = get_gp_pmc_amd(pmu, msr, PMU_TYPE_COUNTER); in amd_msr_idx_to_pmc() 235 pmc = pmc ? pmc : get_gp_pmc_amd(pmu, msr, PMU_TYPE_EVNTSEL); in amd_msr_idx_to_pmc() [all …]
|
| /OK3568_Linux_fs/u-boot/arch/arm/mach-at91/arm926ejs/ |
| H A D | clock.c | 117 at91_pmc_t *pmc = (at91_pmc_t *) ATMEL_BASE_PMC; in at91_clock_init() local 128 tmp = readl(&pmc->mcfr); in at91_clock_init() 137 gd->arch.plla_rate_hz = at91_pll_rate(main_clock, readl(&pmc->pllar)); in at91_clock_init() 156 mckr = readl(&pmc->mckr); in at91_clock_init() 205 struct at91_pmc *pmc = (struct at91_pmc *)ATMEL_BASE_PMC; in at91_plla_init() local 207 writel(pllar, &pmc->pllar); in at91_plla_init() 208 while (!(readl(&pmc->sr) & AT91_PMC_LOCKA)) in at91_plla_init() 213 struct at91_pmc *pmc = (struct at91_pmc *)ATMEL_BASE_PMC; in at91_pllb_init() local 215 writel(pllbr, &pmc->pllbr); in at91_pllb_init() 216 while (!(readl(&pmc->sr) & AT91_PMC_LOCKB)) in at91_pllb_init() [all …]
|
| /OK3568_Linux_fs/kernel/drivers/usb/typec/mux/ |
| H A D | intel_pmc_mux.c | 3 * Driver for Intel PMC USB mux control 123 struct pmc_usb *pmc; member 155 port->iom_status = readl(port->pmc->iom_base + in update_port_status() 156 port->pmc->iom_port_status_offset + in update_port_status() 187 ret = intel_scu_ipc_dev_command(port->pmc->ipc, PMC_USBC_CMD, 0, msg, in pmc_usb_command() 495 static int pmc_usb_register_port(struct pmc_usb *pmc, int index, in pmc_usb_register_port() argument 498 struct pmc_usb_port *port = &pmc->port[index]; in pmc_usb_register_port() 522 port->pmc = pmc; in pmc_usb_register_port() 529 port->typec_sw = typec_switch_register(pmc->dev, &sw_desc); in pmc_usb_register_port() 538 port->typec_mux = typec_mux_register(pmc->dev, &mux_desc); in pmc_usb_register_port() [all …]
|