Home
last modified time | relevance | path

Searched full:pmc (Results 1 – 25 of 942) sorted by relevance

12345678910>>...38

/kernel/linux/linux-6.6/drivers/net/wireless/ath/wil6210/
Dpmc.c14 #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-5.10/drivers/net/wireless/ath/wil6210/
Dpmc.c14 #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-5.10/drivers/soc/tegra/
Dpmc.c3 * 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/
Dpmu.c35 * - 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 …]
Dpmu.h9 #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 …]
/kernel/linux/linux-6.6/tools/testing/selftests/powerpc/pmu/sampling_tests/
Dmisc.h61 static inline int get_mmcr0_fc56(u64 mmcr0, int pmc) in get_mmcr0_fc56() argument
66 static inline int get_mmcr0_pmccext(u64 mmcr0, int pmc) in get_mmcr0_pmccext() argument
71 static inline int get_mmcr0_pmao(u64 mmcr0, int pmc) in get_mmcr0_pmao() argument
76 static inline int get_mmcr0_cc56run(u64 mmcr0, int pmc) in get_mmcr0_cc56run() argument
81 static inline int get_mmcr0_pmcjce(u64 mmcr0, int pmc) in get_mmcr0_pmcjce() argument
86 static inline int get_mmcr0_pmc1ce(u64 mmcr0, int pmc) in get_mmcr0_pmc1ce() argument
91 static inline int get_mmcr0_pmae(u64 mmcr0, int pmc) in get_mmcr0_pmae() argument
96 static inline int get_mmcr1_pmcxsel(u64 mmcr1, int pmc) in get_mmcr1_pmcxsel() argument
98 return ((mmcr1 >> ((24 - (((pmc) - 1) * 8))) & 0xff)); in get_mmcr1_pmcxsel()
101 static inline int get_mmcr1_unit(u64 mmcr1, int pmc) in get_mmcr1_unit() argument
[all …]
/kernel/linux/linux-6.6/drivers/soc/tegra/
Dpmc.c3 * drivers/soc/tegra/pmc.c
12 #define pr_fmt(fmt) "tegra-pmc: " fmt
54 #include <soc/tegra/pmc.h>
61 #include <dt-bindings/soc/tegra-pmc.h>
197 /* for secure PMC */
269 struct tegra_pmc *pmc; member
357 void (*init)(struct tegra_pmc *pmc);
358 void (*setup_irq_polarity)(struct tegra_pmc *pmc,
361 void (*set_wake_filters)(struct tegra_pmc *pmc);
364 int (*powergate_set)(struct tegra_pmc *pmc, unsigned int id,
[all …]
/kernel/linux/linux-6.6/drivers/platform/x86/intel/pmc/
Dcore.c56 static inline u32 pmc_core_reg_read(struct pmc *pmc, int reg_offset) in pmc_core_reg_read() argument
58 return readl(pmc->regbase + reg_offset); in pmc_core_reg_read()
61 static inline void pmc_core_reg_write(struct pmc *pmc, int reg_offset, in pmc_core_reg_write() argument
64 writel(val, pmc->regbase + reg_offset); in pmc_core_reg_write()
67 static inline u64 pmc_core_adjust_slp_s0_step(struct pmc *pmc, u32 value) in pmc_core_adjust_slp_s0_step() argument
75 const int lpm_adj_x2 = pmc->map->lpm_res_counter_step_x2; in pmc_core_adjust_slp_s0_step()
77 if (pmc->map == &adl_reg_map) in pmc_core_adjust_slp_s0_step()
80 return (u64)value * pmc->map->slp_s0_res_counter_step; in pmc_core_adjust_slp_s0_step()
85 struct pmc *pmc = pmcdev->pmcs[PMC_IDX_MAIN]; in set_etr3() local
86 const struct pmc_reg_map *map = pmc->map; in set_etr3()
[all …]
/kernel/linux/linux-6.6/arch/x86/kvm/
Dpmu.c55 * - There are three types of index to access perf counters (PMC):
65 * 3. Global PMC Index (named pmc): pmc is an index specific to PMU
66 * code. Each pmc, stored in kvm_pmc.idx field, is unique across
68 * between pmc and perf counters is as the following:
96 static inline void __kvm_perf_overflow(struct kvm_pmc *pmc, bool in_pmi) in __kvm_perf_overflow() argument
98 struct kvm_pmu *pmu = pmc_to_pmu(pmc); in __kvm_perf_overflow()
101 if (pmc->perf_event && pmc->perf_event->attr.precise_ip) { in __kvm_perf_overflow()
116 __set_bit(pmc->idx, (unsigned long *)&pmu->global_status); in __kvm_perf_overflow()
119 if (pmc->intr && !skip_pmi) in __kvm_perf_overflow()
120 kvm_make_request(KVM_REQ_PMI, pmc->vcpu); in __kvm_perf_overflow()
[all …]
Dpmu.h9 #define pmc_to_pmu(pmc) (&(pmc)->vcpu->arch.pmu) argument
22 bool (*hw_event_available)(struct kvm_pmc *pmc);
58 static inline u64 pmc_bitmask(struct kvm_pmc *pmc) in pmc_bitmask() argument
60 struct kvm_pmu *pmu = pmc_to_pmu(pmc); in pmc_bitmask()
62 return pmu->counter_bitmask[pmc->type]; in pmc_bitmask()
65 static inline u64 pmc_read_counter(struct kvm_pmc *pmc) in pmc_read_counter() argument
69 counter = pmc->counter; in pmc_read_counter()
70 if (pmc->perf_event && !pmc->is_paused) in pmc_read_counter()
71 counter += perf_event_read_value(pmc->perf_event, in pmc_read_counter()
74 return counter & pmc_bitmask(pmc); in pmc_read_counter()
[all …]
/kernel/linux/linux-6.6/Documentation/devicetree/bindings/clock/
Datmel,at91rm9200-pmc.yaml4 $id: http://devicetree.org/schemas/clock/atmel,at91rm9200-pmc.yaml#
7 title: Atmel Power Management Controller (PMC)
14 system and user peripheral clocks. The PMC enables/disables the clock inputs
21 - const: atmel,at91sam9g20-pmc
22 - const: atmel,at91sam9260-pmc
26 - atmel,at91sam9g15-pmc
27 - atmel,at91sam9g25-pmc
28 - atmel,at91sam9g35-pmc
29 - atmel,at91sam9x25-pmc
30 - atmel,at91sam9x35-pmc
[all …]
/kernel/linux/linux-5.10/arch/arm/mach-at91/
Dpm_suspend.S18 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-6.6/Documentation/devicetree/bindings/powerpc/fsl/
Dpmc.txt4 - 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-5.10/Documentation/devicetree/bindings/powerpc/fsl/
Dpmc.txt4 - 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-6.6/arch/riscv/kvm/
Dvcpu_pmu.c36 static u64 kvm_pmu_get_sample_period(struct kvm_pmc *pmc) in kvm_pmu_get_sample_period() argument
38 u64 counter_val_mask = GENMASK(pmc->cinfo.width, 0); in kvm_pmu_get_sample_period()
41 if (!pmc->counter_val) in kvm_pmu_get_sample_period()
44 sample_period = (-pmc->counter_val) & counter_val_mask; in kvm_pmu_get_sample_period()
77 static void kvm_pmu_release_perf_event(struct kvm_pmc *pmc) in kvm_pmu_release_perf_event() argument
79 if (pmc->perf_event) { in kvm_pmu_release_perf_event()
80 perf_event_disable(pmc->perf_event); in kvm_pmu_release_perf_event()
81 perf_event_release_kernel(pmc->perf_event); in kvm_pmu_release_perf_event()
82 pmc->perf_event = NULL; in kvm_pmu_release_perf_event()
203 struct kvm_pmc *pmc; in pmu_ctr_read() local
[all …]
/kernel/linux/linux-6.6/drivers/mfd/
Dintel_pmc_bxt.c3 * 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/drivers/mfd/
Dintel_pmc_bxt.c3 * 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-6.6/net/ipv4/
Digmp.c160 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-5.10/net/ipv4/
Digmp.c160 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-5.10/arch/x86/kvm/vmx/
Dpmu_intel.c35 /* 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 …]
/kernel/linux/linux-5.10/net/ipv6/
Dmcast.c79 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-6.6/arch/arm/mach-at91/
Dpm_suspend.S22 pmc .req r0 label
42 2: ldr r8, [pmc, #AT91_PMC_SR]
54 1: ldr r7, [pmc, #AT91_PMC_SR]
65 1: ldr r7, [pmc, #AT91_PMC_SR]
79 str r7, [pmc, #AT91_PMC_SCDR]
476 ldr pmc, .pmc_base
485 ldr tmp1, [pmc, tmp3]
488 str tmp1, [pmc, tmp3]
496 ldr tmp1, [pmc, #AT91_CKGR_MOR]
499 str tmp1, [pmc, #AT91_CKGR_MOR]
[all …]
/kernel/linux/linux-5.10/arch/arm64/kvm/
Dpmu-emul.c19 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-6.6/arch/arm/boot/dts/microchip/
Dsama7g5.dtsi37 clocks = <&pmc PMC_TYPE_CORE PMC_CPUPLL>;
192 clocks = <&pmc PMC_TYPE_CORE PMC_MCK1>;
210 clocks = <&pmc PMC_TYPE_PERIPHERAL 18>;
241 clocks = <&pmc PMC_TYPE_PERIPHERAL 11>;
244 pmc: clock-controller@e0018000 { label
245 compatible = "microchip,sama7g5-pmc", "syscon";
315 …clocks = <&pmc PMC_TYPE_PERIPHERAL 91>, <&pmc PMC_TYPE_PERIPHERAL 92>, <&pmc PMC_TYPE_PERIPHERAL 9…
323 clocks = <&pmc PMC_TYPE_PERIPHERAL 21>;
343 clocks = <&pmc PMC_TYPE_PERIPHERAL 78>, <&pmc PMC_TYPE_GCK 78>;
358 clocks = <&pmc PMC_TYPE_PERIPHERAL 79>, <&pmc PMC_TYPE_GCK 79>;
[all …]
/kernel/linux/linux-5.10/drivers/platform/x86/
Dpmc_atom.c14 #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 …]

12345678910>>...38