| /kernel/linux/linux-5.10/drivers/net/wireless/ath/wil6210/ |
| 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 …]
|
| /kernel/linux/linux-4.19/drivers/net/wireless/ath/wil6210/ |
| D | pmc.c | 24 #include "pmc.h" 31 static int wil_is_pmc_allocated(struct pmc_ctx *pmc) in wil_is_pmc_allocated() argument 33 return !!pmc->pring_va; in wil_is_pmc_allocated() 38 memset(&wil->pmc, 0, sizeof(struct pmc_ctx)); in wil_pmc_init() 39 mutex_init(&wil->pmc.lock); in wil_pmc_init() 45 * Initialize the descriptors as required by pmc dma. 55 struct pmc_ctx *pmc = &wil->pmc; in wil_pmc_alloc() local 61 mutex_lock(&pmc->lock); in wil_pmc_alloc() 63 if (wil_is_pmc_allocated(pmc)) { in wil_pmc_alloc() 65 wil_err(wil, "ERROR pmc is already allocated\n"); in wil_pmc_alloc() [all …]
|
| /kernel/linux/linux-5.10/drivers/soc/tegra/ |
| 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 …]
|
| /kernel/linux/linux-5.10/arch/x86/kvm/ |
| D | pmu.c | 33 * - There are three types of index to access perf counters (PMC): 41 * 3. Global PMC Index (named pmc): pmc is an index specific to PMU 42 * code. Each pmc, stored in kvm_pmc.idx field, is unique across 44 * between pmc and perf counters is as the following: 62 struct kvm_pmc *pmc = perf_event->overflow_handler_context; in kvm_perf_overflow() local 63 struct kvm_pmu *pmu = pmc_to_pmu(pmc); in kvm_perf_overflow() 65 if (!test_and_set_bit(pmc->idx, pmu->reprogram_pmi)) { in kvm_perf_overflow() 66 __set_bit(pmc->idx, (unsigned long *)&pmu->global_status); in kvm_perf_overflow() 67 kvm_make_request(KVM_REQ_PMU, pmc->vcpu); in kvm_perf_overflow() 75 struct kvm_pmc *pmc = perf_event->overflow_handler_context; in kvm_perf_overflow_intr() local [all …]
|
| D | pmu.h | 9 #define pmc_to_pmu(pmc) (&(pmc)->vcpu->arch.pmu) argument 30 bool (*pmc_is_enabled)(struct kvm_pmc *pmc); 44 static inline u64 pmc_bitmask(struct kvm_pmc *pmc) in pmc_bitmask() argument 46 struct kvm_pmu *pmu = pmc_to_pmu(pmc); in pmc_bitmask() 48 return pmu->counter_bitmask[pmc->type]; in pmc_bitmask() 51 static inline u64 pmc_read_counter(struct kvm_pmc *pmc) in pmc_read_counter() argument 55 counter = pmc->counter; in pmc_read_counter() 56 if (pmc->perf_event) in pmc_read_counter() 57 counter += perf_event_read_value(pmc->perf_event, in pmc_read_counter() 60 return counter & pmc_bitmask(pmc); in pmc_read_counter() [all …]
|
| /kernel/linux/linux-5.10/arch/arm/mach-at91/ |
| 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 …]
|
| /kernel/linux/linux-5.10/Documentation/devicetree/bindings/powerpc/fsl/ |
| 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 …]
|
| /kernel/linux/linux-4.19/Documentation/devicetree/bindings/powerpc/fsl/ |
| 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 …]
|
| /kernel/linux/linux-4.19/arch/x86/kvm/ |
| D | pmu.c | 33 * - There are three types of index to access perf counters (PMC): 41 * 3. Global PMC Index (named pmc): pmc is an index specific to PMU 42 * code. Each pmc, stored in kvm_pmc.idx field, is unique across 44 * between pmc and perf counters is as the following: 62 struct kvm_pmc *pmc = perf_event->overflow_handler_context; in kvm_perf_overflow() local 63 struct kvm_pmu *pmu = pmc_to_pmu(pmc); in kvm_perf_overflow() 65 if (!test_and_set_bit(pmc->idx, in kvm_perf_overflow() 67 __set_bit(pmc->idx, (unsigned long *)&pmu->global_status); in kvm_perf_overflow() 68 kvm_make_request(KVM_REQ_PMU, pmc->vcpu); in kvm_perf_overflow() 76 struct kvm_pmc *pmc = perf_event->overflow_handler_context; in kvm_perf_overflow_intr() local [all …]
|
| D | pmu.h | 9 #define pmc_to_pmu(pmc) (&(pmc)->vcpu->arch.pmu) argument 28 bool (*pmc_is_enabled)(struct kvm_pmc *pmc); 41 static inline u64 pmc_bitmask(struct kvm_pmc *pmc) in pmc_bitmask() argument 43 struct kvm_pmu *pmu = pmc_to_pmu(pmc); in pmc_bitmask() 45 return pmu->counter_bitmask[pmc->type]; in pmc_bitmask() 48 static inline u64 pmc_read_counter(struct kvm_pmc *pmc) in pmc_read_counter() argument 52 counter = pmc->counter; in pmc_read_counter() 53 if (pmc->perf_event) in pmc_read_counter() 54 counter += perf_event_read_value(pmc->perf_event, in pmc_read_counter() 57 return counter & pmc_bitmask(pmc); in pmc_read_counter() [all …]
|
| /kernel/linux/linux-5.10/drivers/mfd/ |
| 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 …]
|
| /kernel/linux/linux-5.10/net/ipv4/ |
| 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 …]
|
| /kernel/linux/linux-4.19/net/ipv4/ |
| D | igmp.c | 165 static int sf_setstate(struct ip_mc_list *pmc); 166 static void sf_markstate(struct ip_mc_list *pmc); 168 static void ip_mc_clear_src(struct ip_mc_list *pmc); 180 #define for_each_pmc_rcu(in_dev, pmc) \ argument 181 for (pmc = rcu_dereference(in_dev->mc_list); \ 182 pmc != NULL; \ 183 pmc = rcu_dereference(pmc->next_rcu)) 185 #define for_each_pmc_rtnl(in_dev, pmc) \ argument 186 for (pmc = rtnl_dereference(in_dev->mc_list); \ 187 pmc != NULL; \ [all …]
|
| /kernel/linux/linux-5.10/arch/x86/kvm/vmx/ |
| 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() 101 /* check if a PMC is enabled by comparing it with globl_ctrl bits. */ 102 static bool intel_pmc_is_enabled(struct kvm_pmc *pmc) in intel_pmc_is_enabled() argument 104 struct kvm_pmu *pmu = pmc_to_pmu(pmc); in intel_pmc_is_enabled() 106 return test_bit(pmc->idx, (unsigned long *)&pmu->global_ctrl); in intel_pmc_is_enabled() 196 struct kvm_pmc *pmc; in intel_msr_idx_to_pmc() local 198 pmc = get_fixed_pmc(pmu, msr); in intel_msr_idx_to_pmc() [all …]
|
| /kernel/linux/linux-4.19/net/ipv6/ |
| D | mcast.c | 83 static void mld_add_delrec(struct inet6_dev *idev, struct ifmcaddr6 *pmc); 84 static void mld_del_delrec(struct inet6_dev *idev, struct ifmcaddr6 *pmc); 87 static int sf_setstate(struct ifmcaddr6 *pmc); 88 static void sf_markstate(struct ifmcaddr6 *pmc); 89 static void ip6_mc_clear_src(struct ifmcaddr6 *pmc); 120 #define for_each_pmc_rcu(np, pmc) \ argument 121 for (pmc = rcu_dereference(np->ipv6_mc_list); \ 122 pmc != NULL; \ 123 pmc = rcu_dereference(pmc->next)) 336 struct ipv6_mc_socklist *pmc; in ip6_mc_source() local [all …]
|
| /kernel/linux/linux-5.10/net/ipv6/ |
| 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 …]
|
| /kernel/linux/linux-5.10/arch/arm64/kvm/ |
| 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 …]
|
| /kernel/linux/linux-4.19/drivers/soc/tegra/ |
| D | pmc.c | 2 * drivers/soc/tegra/pmc.c 20 #define pr_fmt(fmt) "tegra-pmc: " fmt 46 #include <soc/tegra/pmc.h> 129 struct tegra_pmc *pmc; member 165 void (*init)(struct tegra_pmc *pmc); 166 void (*setup_irq_polarity)(struct tegra_pmc *pmc, 172 * struct tegra_pmc - NVIDIA Tegra PMC 173 * @dev: pointer to PMC device structure 224 static struct tegra_pmc *pmc = &(struct tegra_pmc) { variable 237 return readl(pmc->base + offset); in tegra_pmc_readl() [all …]
|
| /kernel/linux/linux-5.10/drivers/platform/x86/ |
| 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 …]
|
| /kernel/linux/linux-4.19/drivers/platform/x86/ |
| D | pmc_atom.c | 23 #include <linux/platform_data/x86/clk-pmc-atom.h> 212 static inline u32 pmc_reg_read(struct pmc_dev *pmc, int reg_offset) in pmc_reg_read() argument 214 return readl(pmc->regmap + reg_offset); in pmc_reg_read() 217 static inline void pmc_reg_write(struct pmc_dev *pmc, int reg_offset, u32 val) in pmc_reg_write() argument 219 writel(val, pmc->regmap + reg_offset); in pmc_reg_write() 224 struct pmc_dev *pmc = &pmc_device; in pmc_atom_read() local 226 if (!pmc->init) in pmc_atom_read() 229 *value = pmc_reg_read(pmc, offset); in pmc_atom_read() 236 struct pmc_dev *pmc = &pmc_device; in pmc_atom_write() local 238 if (!pmc->init) in pmc_atom_write() [all …]
|
| /kernel/linux/linux-4.19/arch/arm/mach-at91/ |
| D | pm_suspend.S | 22 pmc .req r0 label 30 1: ldr tmp1, [pmc, #AT91_PMC_SR] 39 1: ldr tmp1, [pmc, #AT91_PMC_SR] 48 1: ldr tmp1, [pmc, #AT91_PMC_SR] 57 1: ldr tmp1, [pmc, #AT91_PMC_SR] 69 str tmp1, [pmc, #AT91_PMC_SCDR] 134 ldr pmc, .pmc_base 165 ldr pmc, .pmc_base 168 ldr tmp1, [pmc, #AT91_CKGR_MOR] 171 str tmp1, [pmc, #AT91_CKGR_MOR] [all …]
|
| /kernel/linux/linux-5.10/arch/arm/boot/dts/ |
| 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 …]
|
| /kernel/linux/linux-4.19/virt/kvm/arm/ |
| D | pmu.c | 36 struct kvm_pmc *pmc = &pmu->pmc[select_idx]; in kvm_pmu_get_counter_value() local 45 if (pmc->perf_event) in kvm_pmu_get_counter_value() 46 counter += perf_event_read_value(pmc->perf_event, &enabled, in kvm_pmu_get_counter_value() 49 return counter & pmc->bitmask; in kvm_pmu_get_counter_value() 69 * @pmc: The PMU counter pointer 73 static void kvm_pmu_stop_counter(struct kvm_vcpu *vcpu, struct kvm_pmc *pmc) in kvm_pmu_stop_counter() argument 77 if (pmc->perf_event) { in kvm_pmu_stop_counter() 78 counter = kvm_pmu_get_counter_value(vcpu, pmc->idx); in kvm_pmu_stop_counter() 79 reg = (pmc->idx == ARMV8_PMU_CYCLE_IDX) in kvm_pmu_stop_counter() 80 ? PMCCNTR_EL0 : PMEVCNTR0_EL0 + pmc->idx; in kvm_pmu_stop_counter() [all …]
|
| /kernel/linux/linux-4.19/arch/powerpc/perf/ |
| D | power7-pmu.c | 20 #define PM_PMC_SH 16 /* PMC number (1-based) for direct events */ 88 int pmc, sh, unit; in power7_get_constraint() local 91 pmc = (event >> PM_PMC_SH) & PM_PMC_MSK; in power7_get_constraint() 92 if (pmc) { in power7_get_constraint() 93 if (pmc > 6) in power7_get_constraint() 95 sh = (pmc - 1) * 2; in power7_get_constraint() 98 if (pmc >= 5 && !(event == 0x500fa || event == 0x600f4)) in power7_get_constraint() 101 if (pmc < 5) { in power7_get_constraint() 148 int pmc, psel; in find_alternative_decode() local 151 pmc = (event >> PM_PMC_SH) & PM_PMC_MSK; in find_alternative_decode() [all …]
|
| /kernel/linux/linux-5.10/arch/powerpc/perf/ |
| 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 …]
|