/Linux-v5.4/drivers/net/wireless/ath/wil6210/ |
D | pmc.c | 32 static int wil_is_pmc_allocated(struct pmc_ctx *pmc) in wil_is_pmc_allocated() argument 34 return !!pmc->pring_va; in wil_is_pmc_allocated() 39 memset(&wil->pmc, 0, sizeof(struct pmc_ctx)); in wil_pmc_init() 40 mutex_init(&wil->pmc.lock); in wil_pmc_init() 56 struct pmc_ctx *pmc = &wil->pmc; in wil_pmc_alloc() local 62 mutex_lock(&pmc->lock); in wil_pmc_alloc() 64 if (wil_is_pmc_allocated(pmc)) { in wil_pmc_alloc() 93 pmc->num_descriptors = num_descriptors; in wil_pmc_alloc() 94 pmc->descriptor_size = descriptor_size; in wil_pmc_alloc() 100 pmc->descriptors = kcalloc(num_descriptors, in wil_pmc_alloc() [all …]
|
/Linux-v5.4/drivers/soc/tegra/ |
D | pmc.c | 147 struct tegra_pmc *pmc; member 225 void (*init)(struct tegra_pmc *pmc); 226 void (*setup_irq_polarity)(struct tegra_pmc *pmc, 349 static struct tegra_pmc *pmc = &(struct tegra_pmc) { variable 360 static u32 tegra_pmc_readl(struct tegra_pmc *pmc, unsigned long offset) in tegra_pmc_readl() argument 364 if (pmc->tz_only) { in tegra_pmc_readl() 368 if (pmc->dev) in tegra_pmc_readl() 369 dev_warn(pmc->dev, "%s(): SMC failed: %lu\n", in tegra_pmc_readl() 379 return readl(pmc->base + offset); in tegra_pmc_readl() 382 static void tegra_pmc_writel(struct tegra_pmc *pmc, u32 value, in tegra_pmc_writel() argument [all …]
|
/Linux-v5.4/virt/kvm/arm/ |
D | pmu.c | 32 static struct kvm_vcpu *kvm_pmc_to_vcpu(struct kvm_pmc *pmc) in kvm_pmc_to_vcpu() argument 37 pmc -= pmc->idx; in kvm_pmc_to_vcpu() 38 pmu = container_of(pmc, struct kvm_pmu, pmc[0]); in kvm_pmc_to_vcpu() 47 static bool kvm_pmu_pmc_is_chained(struct kvm_pmc *pmc) in kvm_pmu_pmc_is_chained() argument 49 struct kvm_vcpu *vcpu = kvm_pmc_to_vcpu(pmc); in kvm_pmu_pmc_is_chained() 51 return test_bit(pmc->idx >> 1, vcpu->arch.pmu.chained); in kvm_pmu_pmc_is_chained() 70 static struct kvm_pmc *kvm_pmu_get_canonical_pmc(struct kvm_pmc *pmc) in kvm_pmu_get_canonical_pmc() argument 72 if (kvm_pmu_pmc_is_chained(pmc) && in kvm_pmu_get_canonical_pmc() 73 kvm_pmu_idx_is_high_counter(pmc->idx)) in kvm_pmu_get_canonical_pmc() 74 return pmc - 1; in kvm_pmu_get_canonical_pmc() [all …]
|
/Linux-v5.4/arch/powerpc/perf/ |
D | power6-pmu.c | 137 int pmc, psel, ptype; in power6_marked_instr_event() local 141 pmc = (event >> PM_PMC_SH) & PM_PMC_MSK; in power6_marked_instr_event() 143 if (pmc >= 5) in power6_marked_instr_event() 149 if (pmc == 0 || !(ptype & (1 << (pmc - 1)))) in power6_marked_instr_event() 157 bit = ptype ^ (pmc - 1); in power6_marked_instr_event() 179 unsigned int pmc, ev, b, u, s, psel; in p6_compute_mmcr() local 186 pmc = (event[i] >> PM_PMC_SH) & PM_PMC_MSK; in p6_compute_mmcr() 187 if (pmc) { in p6_compute_mmcr() 188 if (pmc_inuse & (1 << (pmc - 1))) in p6_compute_mmcr() 190 pmc_inuse |= 1 << (pmc - 1); in p6_compute_mmcr() [all …]
|
D | ppc970-pmu.c | 145 int pmc, psel, unit, byte, bit; in p970_marked_instr_event() local 148 pmc = (event >> PM_PMC_SH) & PM_PMC_MSK; in p970_marked_instr_event() 150 if (pmc) { in p970_marked_instr_event() 151 if (direct_marked_event[pmc - 1] & (1 << psel)) in p970_marked_instr_event() 154 bit = (pmc <= 4)? pmc - 1: 8 - pmc; in p970_marked_instr_event() 193 int pmc, byte, unit, sh, spcsel; in p970_get_constraint() local 197 pmc = (event >> PM_PMC_SH) & PM_PMC_MSK; in p970_get_constraint() 198 if (pmc) { in p970_get_constraint() 199 if (pmc > 8) in p970_get_constraint() 201 sh = (pmc - 1) * 2; in p970_get_constraint() [all …]
|
D | power7-pmu.c | 84 int pmc, sh, unit; in power7_get_constraint() local 87 pmc = (event >> PM_PMC_SH) & PM_PMC_MSK; in power7_get_constraint() 88 if (pmc) { in power7_get_constraint() 89 if (pmc > 6) in power7_get_constraint() 91 sh = (pmc - 1) * 2; in power7_get_constraint() 94 if (pmc >= 5 && !(event == 0x500fa || event == 0x600f4)) in power7_get_constraint() 97 if (pmc < 5) { in power7_get_constraint() 144 int pmc, psel; in find_alternative_decode() local 147 pmc = (event >> PM_PMC_SH) & PM_PMC_MSK; in find_alternative_decode() 149 if ((pmc == 2 || pmc == 4) && (psel & ~7) == 0x40) in find_alternative_decode() [all …]
|
D | power5-pmu.c | 139 int pmc, byte, unit, sh; in power5_get_constraint() local 144 pmc = (event >> PM_PMC_SH) & PM_PMC_MSK; in power5_get_constraint() 145 if (pmc) { in power5_get_constraint() 146 if (pmc > 6) in power5_get_constraint() 148 sh = (pmc - 1) * 2; in power5_get_constraint() 151 if (pmc <= 4) in power5_get_constraint() 152 grp = (pmc - 1) >> 1; in power5_get_constraint() 184 if (!pmc) in power5_get_constraint() 199 if (pmc < 5) { in power5_get_constraint() 251 int pmc, altpmc, pp, j; in find_alternative_bdecode() local [all …]
|
D | power5+-pmu.c | 135 int pmc, byte, unit, sh; in power5p_get_constraint() local 139 pmc = (event >> PM_PMC_SH) & PM_PMC_MSK; in power5p_get_constraint() 140 if (pmc) { in power5p_get_constraint() 141 if (pmc > 6) in power5p_get_constraint() 143 sh = (pmc - 1) * 2; in power5p_get_constraint() 146 if (pmc >= 5 && !(event == 0x500009 || event == 0x600005)) in power5p_get_constraint() 177 if (pmc < 5) { in power5p_get_constraint() 189 int pmc = (event >> PM_PMC_SH) & PM_PMC_MSK; in power5p_limited_pmc_event() local 191 return pmc == 5 || pmc == 6; in power5p_limited_pmc_event() 243 int pmc, altpmc, pp, j; in find_alternative_bdecode() local [all …]
|
D | isa207-common.h | 153 #define CNST_PMC_SHIFT(pmc) ((pmc - 1) * 2) argument 154 #define CNST_PMC_VAL(pmc) (1 << CNST_PMC_SHIFT(pmc)) argument 155 #define CNST_PMC_MASK(pmc) (2 << CNST_PMC_SHIFT(pmc)) argument 163 #define MMCR1_UNIT_SHIFT(pmc) (60 - (4 * ((pmc) - 1))) argument 164 #define MMCR1_COMBINE_SHIFT(pmc) (35 - ((pmc) - 1)) argument 165 #define MMCR1_PMCSEL_SHIFT(pmc) (24 - (((pmc) - 1)) * 8) argument 171 #define p9_MMCR1_COMBINE_SHIFT(pmc) (38 - ((pmc - 1) * 2)) argument 198 #define MMCR2_FCS(pmc) (1ull << (63 - (((pmc) - 1) * 9))) argument 199 #define MMCR2_FCP(pmc) (1ull << (62 - (((pmc) - 1) * 9))) argument 200 #define MMCR2_FCH(pmc) (1ull << (57 - (((pmc) - 1) * 9))) argument [all …]
|
D | mpc7450-pmu.c | 39 int pmc; in mpc7450_classify_event() local 41 pmc = (event >> PM_PMC_SH) & PM_PMC_MSK; in mpc7450_classify_event() 42 if (pmc) { in mpc7450_classify_event() 43 if (pmc > N_COUNTER) in mpc7450_classify_event() 79 int pmc, sel; in mpc7450_threshold_use() local 81 pmc = (event >> PM_PMC_SH) & PM_PMC_MSK; in mpc7450_threshold_use() 83 switch (pmc) { in mpc7450_threshold_use() 153 int pmc, class; in mpc7450_get_constraint() local 161 pmc = ((unsigned int)event >> PM_PMC_SH) & PM_PMC_MSK; in mpc7450_get_constraint() 162 mask = pmcbits[pmc - 1][0]; in mpc7450_get_constraint() [all …]
|
D | isa207-common.c | 16 PMU_FORMAT_ATTR(pmc, "config:16-19"); 117 static unsigned long combine_shift(unsigned long pmc) in combine_shift() argument 120 return p9_MMCR1_COMBINE_SHIFT(pmc); in combine_shift() 122 return MMCR1_COMBINE_SHIFT(pmc); in combine_shift() 244 unsigned int unit, pmc, cache, ebb; in isa207_get_constraint() local 252 pmc = (event >> EVENT_PMC_SHIFT) & EVENT_PMC_MASK; in isa207_get_constraint() 257 if (pmc) { in isa207_get_constraint() 260 if (pmc > 6) in isa207_get_constraint() 266 if (pmc >= 5 && base_event != 0x500fa && in isa207_get_constraint() 270 mask |= CNST_PMC_MASK(pmc); in isa207_get_constraint() [all …]
|
/Linux-v5.4/arch/x86/kvm/ |
D | pmu.c | 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 77 struct kvm_pmu *pmu = pmc_to_pmu(pmc); in kvm_perf_overflow_intr() 79 if (!test_and_set_bit(pmc->idx, in kvm_perf_overflow_intr() 81 __set_bit(pmc->idx, (unsigned long *)&pmu->global_status); in kvm_perf_overflow_intr() 82 kvm_make_request(KVM_REQ_PMU, pmc->vcpu); in kvm_perf_overflow_intr() [all …]
|
D | pmu.h | 7 #define pmc_to_pmu(pmc) (&(pmc)->vcpu->arch.pmu) argument 26 bool (*pmc_is_enabled)(struct kvm_pmc *pmc); 39 static inline u64 pmc_bitmask(struct kvm_pmc *pmc) in pmc_bitmask() argument 41 struct kvm_pmu *pmu = pmc_to_pmu(pmc); in pmc_bitmask() 43 return pmu->counter_bitmask[pmc->type]; in pmc_bitmask() 46 static inline u64 pmc_read_counter(struct kvm_pmc *pmc) in pmc_read_counter() argument 50 counter = pmc->counter; in pmc_read_counter() 51 if (pmc->perf_event) in pmc_read_counter() 52 counter += perf_event_read_value(pmc->perf_event, in pmc_read_counter() 55 return counter & pmc_bitmask(pmc); in pmc_read_counter() [all …]
|
D | pmu_amd.c | 155 static bool amd_pmc_is_enabled(struct kvm_pmc *pmc) in amd_pmc_is_enabled() argument 214 struct kvm_pmc *pmc; in amd_pmu_get_msr() local 217 pmc = get_gp_pmc_amd(pmu, msr, PMU_TYPE_COUNTER); in amd_pmu_get_msr() 218 if (pmc) { in amd_pmu_get_msr() 219 *data = pmc_read_counter(pmc); in amd_pmu_get_msr() 223 pmc = get_gp_pmc_amd(pmu, msr, PMU_TYPE_EVNTSEL); in amd_pmu_get_msr() 224 if (pmc) { in amd_pmu_get_msr() 225 *data = pmc->eventsel; in amd_pmu_get_msr() 235 struct kvm_pmc *pmc; in amd_pmu_set_msr() local 240 pmc = get_gp_pmc_amd(pmu, msr, PMU_TYPE_COUNTER); in amd_pmu_set_msr() [all …]
|
/Linux-v5.4/net/ipv4/ |
D | igmp.c | 162 static int sf_setstate(struct ip_mc_list *pmc); 163 static void sf_markstate(struct ip_mc_list *pmc); 165 static void ip_mc_clear_src(struct ip_mc_list *pmc); 177 #define for_each_pmc_rcu(in_dev, pmc) \ argument 178 for (pmc = rcu_dereference(in_dev->mc_list); \ 179 pmc != NULL; \ 180 pmc = rcu_dereference(pmc->next_rcu)) 182 #define for_each_pmc_rtnl(in_dev, pmc) \ argument 183 for (pmc = rtnl_dereference(in_dev->mc_list); \ 184 pmc != NULL; \ [all …]
|
/Linux-v5.4/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 …]
|
/Linux-v5.4/drivers/platform/x86/ |
D | pmc_atom.c | 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() 232 pmc_reg_write(pmc, offset, value); in pmc_atom_write() [all …]
|
/Linux-v5.4/arch/arm/mach-at91/ |
D | pm_suspend.S | 18 pmc .req r0 label 26 1: ldr tmp1, [pmc, #AT91_PMC_SR] 35 1: ldr tmp1, [pmc, #AT91_PMC_SR] 44 1: ldr tmp1, [pmc, #AT91_PMC_SR] 56 str tmp1, [pmc, #AT91_PMC_SCDR] 121 ldr pmc, .pmc_base 140 ldr pmc, .pmc_base 141 ldr tmp1, [pmc, #AT91_PMC_MCKR] 143 str tmp1, [pmc, #AT91_PMC_MCKR] 160 ldr pmc, .pmc_base [all …]
|
/Linux-v5.4/arch/x86/kvm/vmx/ |
D | pmu_intel.c | 42 struct kvm_pmc *pmc; in reprogram_fixed_counters() local 44 pmc = get_fixed_pmc(pmu, MSR_CORE_PERF_FIXED_CTR0 + i); in reprogram_fixed_counters() 49 reprogram_fixed_counter(pmc, new_ctrl, i); in reprogram_fixed_counters() 94 static bool intel_pmc_is_enabled(struct kvm_pmc *pmc) in intel_pmc_is_enabled() argument 96 struct kvm_pmu *pmu = pmc_to_pmu(pmc); in intel_pmc_is_enabled() 98 return test_bit(pmc->idx, (unsigned long *)&pmu->global_ctrl); in intel_pmc_is_enabled() 168 struct kvm_pmc *pmc; in intel_pmu_get_msr() local 184 if ((pmc = get_gp_pmc(pmu, msr, MSR_IA32_PERFCTR0))) { in intel_pmu_get_msr() 185 u64 val = pmc_read_counter(pmc); in intel_pmu_get_msr() 188 } else if ((pmc = get_fixed_pmc(pmu, msr))) { in intel_pmu_get_msr() [all …]
|
/Linux-v5.4/arch/arm/boot/dts/ |
D | sama5d2.dtsi | 51 clocks = <&pmc PMC_TYPE_CORE PMC_MCK>; 67 clocks = <&pmc PMC_TYPE_CORE PMC_MCK>; 122 clocks = <&pmc PMC_TYPE_PERIPHERAL 42>, <&pmc PMC_TYPE_CORE PMC_UTMI>; 249 clocks = <&pmc PMC_TYPE_PERIPHERAL 41>, <&pmc PMC_TYPE_PERIPHERAL 41>, <&pmc PMC_TYPE_SYSTEM 6>; 258 clocks = <&pmc PMC_TYPE_CORE PMC_UTMI>, <&pmc PMC_TYPE_PERIPHERAL 41>; 282 clocks = <&pmc PMC_TYPE_CORE PMC_MCK2>; 301 clocks = <&pmc PMC_TYPE_PERIPHERAL 31>, <&pmc PMC_TYPE_GCK 31>, <&pmc PMC_TYPE_CORE PMC_MAIN>; 310 clocks = <&pmc PMC_TYPE_PERIPHERAL 32>, <&pmc PMC_TYPE_GCK 32>, <&pmc PMC_TYPE_CORE PMC_MAIN>; 330 clocks = <&pmc PMC_TYPE_PERIPHERAL 45>, <&pmc PMC_TYPE_SYSTEM 3>, <&clk32k>; 356 clocks = <&pmc PMC_TYPE_PERIPHERAL 46>, <&pmc PMC_TYPE_SYSTEM 18>, <&pmc PMC_TYPE_GCK 46>; [all …]
|
D | at91sam9260.dtsi | 113 pmc: pmc@fffffc00 { label 114 compatible = "atmel,at91sam9260-pmc", "syscon"; 125 clocks = <&pmc PMC_TYPE_CORE PMC_SLOW>; 131 clocks = <&pmc PMC_TYPE_CORE PMC_SLOW>; 138 clocks = <&pmc PMC_TYPE_CORE PMC_MCK>; 149 …clocks = <&pmc PMC_TYPE_PERIPHERAL 17>, <&pmc PMC_TYPE_PERIPHERAL 18>, <&pmc PMC_TYPE_PERIPHERAL 1… 161 …clocks = <&pmc PMC_TYPE_PERIPHERAL 26>, <&pmc PMC_TYPE_PERIPHERAL 27>, <&pmc PMC_TYPE_PERIPHERAL 2… 502 clocks = <&pmc PMC_TYPE_PERIPHERAL 2>; 513 clocks = <&pmc PMC_TYPE_PERIPHERAL 3>; 524 clocks = <&pmc PMC_TYPE_PERIPHERAL 4>; [all …]
|
/Linux-v5.4/arch/powerpc/oprofile/ |
D | op_model_pa6t.c | 83 int pmc; in pa6t_reg_setup() local 92 for (pmc = 0; pmc < cur_cpu_spec->num_pmcs; pmc++) in pa6t_reg_setup() 93 if (!ctr[pmc].enabled) { in pa6t_reg_setup() 94 sys->mmcr0 &= ~(0x1UL << pmc); in pa6t_reg_setup() 95 sys->mmcr0 &= ~(0x1UL << (pmc+12)); in pa6t_reg_setup() 96 pr_debug("turned off counter %u\n", pmc); in pa6t_reg_setup() 119 for (pmc = 0; pmc < cur_cpu_spec->num_pmcs; pmc++) { in pa6t_reg_setup() 121 reset_value[pmc] = (0x1UL << 39) - ctr[pmc].count; in pa6t_reg_setup() 123 pmc, reset_value[pmc]); in pa6t_reg_setup()
|
D | op_model_power4.c | 41 int pmc, cntr_marked_events = 0; in power7_marked_instr_event() local 47 for (pmc = 0; pmc < 4; pmc++) { in power7_marked_instr_event() 49 << (OPROFILE_MAX_PMC_NUM - pmc) in power7_marked_instr_event() 51 psel = (psel >> ((OPROFILE_MAX_PMC_NUM - pmc) in power7_marked_instr_event() 55 - (pmc * OPROFILE_PMSEL_FIELD_WIDTH ))); in power7_marked_instr_event() 57 - (pmc * OPROFILE_PMSEL_FIELD_WIDTH)); in power7_marked_instr_event() 61 cntr_marked_events |= (pmc == 1 || pmc == 3) << pmc; in power7_marked_instr_event() 65 cntr_marked_events |= (pmc == 0) << pmc; in power7_marked_instr_event() 70 cntr_marked_events |= (pmc != 1) << pmc; in power7_marked_instr_event() 74 cntr_marked_events |= 1 << pmc; in power7_marked_instr_event() [all …]
|
/Linux-v5.4/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 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 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". 22 - reg: For devices compatible with "fsl,mpc8349-pmc", the first resource 26 For devices compatible with "fsl,mpc8548-pmc", the first resource [all …]
|
/Linux-v5.4/tools/testing/selftests/powerpc/pmu/ebb/ |
D | ebb.h | 14 #define PMC_INDEX(pmc) ((pmc)-1) argument 41 static inline void ebb_enable_pmc_counting(int pmc) in ebb_enable_pmc_counting() argument 43 ebb_state.pmc_enable[PMC_INDEX(pmc)] = true; in ebb_enable_pmc_counting() 46 bool ebb_check_count(int pmc, u64 sample_period, int fudge); 60 int count_pmc(int pmc, uint32_t sample_period); 65 void write_pmc(int pmc, u64 value); 66 u64 read_pmc(int pmc);
|