Home
last modified time | relevance | path

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

12345678910>>...20

/Linux-v6.1/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 …]
/Linux-v6.1/arch/x86/kvm/
Dpmu.c45 * - There are three types of index to access perf counters (PMC):
55 * 3. Global PMC Index (named pmc): pmc is an index specific to PMU
56 * code. Each pmc, stored in kvm_pmc.idx field, is unique across
58 * between pmc and perf counters is as the following:
86 static inline bool pmc_is_enabled(struct kvm_pmc *pmc) in pmc_is_enabled() argument
88 return static_call(kvm_x86_pmu_pmc_is_enabled)(pmc); in pmc_is_enabled()
99 static inline void __kvm_perf_overflow(struct kvm_pmc *pmc, bool in_pmi) in __kvm_perf_overflow() argument
101 struct kvm_pmu *pmu = pmc_to_pmu(pmc); in __kvm_perf_overflow()
105 if (test_and_set_bit(pmc->idx, pmu->reprogram_pmi)) in __kvm_perf_overflow()
108 if (pmc->perf_event && pmc->perf_event->attr.precise_ip) { in __kvm_perf_overflow()
[all …]
Dpmu.h9 #define pmc_to_pmu(pmc) (&(pmc)->vcpu->arch.pmu) argument
28 bool (*hw_event_available)(struct kvm_pmc *pmc);
29 bool (*pmc_is_enabled)(struct kvm_pmc *pmc);
47 static inline u64 pmc_bitmask(struct kvm_pmc *pmc) in pmc_bitmask() argument
49 struct kvm_pmu *pmu = pmc_to_pmu(pmc); in pmc_bitmask()
51 return pmu->counter_bitmask[pmc->type]; in pmc_bitmask()
54 static inline u64 pmc_read_counter(struct kvm_pmc *pmc) in pmc_read_counter() argument
58 counter = pmc->counter; in pmc_read_counter()
59 if (pmc->perf_event && !pmc->is_paused) in pmc_read_counter()
60 counter += perf_event_read_value(pmc->perf_event, in pmc_read_counter()
[all …]
/Linux-v6.1/drivers/soc/tegra/
Dpmc.c3 * drivers/soc/tegra/pmc.c
12 #define pr_fmt(fmt) "tegra-pmc: " fmt
52 #include <soc/tegra/pmc.h>
59 #include <dt-bindings/soc/tegra-pmc.h>
189 /* for secure PMC */
261 struct tegra_pmc *pmc; member
351 void (*init)(struct tegra_pmc *pmc);
352 void (*setup_irq_polarity)(struct tegra_pmc *pmc,
357 int (*powergate_set)(struct tegra_pmc *pmc, unsigned int id,
381 * struct tegra_pmc - NVIDIA Tegra PMC
[all …]
/Linux-v6.1/tools/testing/selftests/powerpc/pmu/sampling_tests/
Dmisc.h63 static inline int get_mmcr0_fc56(u64 mmcr0, int pmc) in get_mmcr0_fc56() argument
68 static inline int get_mmcr0_pmccext(u64 mmcr0, int pmc) in get_mmcr0_pmccext() argument
73 static inline int get_mmcr0_pmao(u64 mmcr0, int pmc) in get_mmcr0_pmao() argument
78 static inline int get_mmcr0_cc56run(u64 mmcr0, int pmc) in get_mmcr0_cc56run() argument
83 static inline int get_mmcr0_pmcjce(u64 mmcr0, int pmc) in get_mmcr0_pmcjce() argument
88 static inline int get_mmcr0_pmc1ce(u64 mmcr0, int pmc) in get_mmcr0_pmc1ce() argument
93 static inline int get_mmcr0_pmae(u64 mmcr0, int pmc) in get_mmcr0_pmae() argument
98 static inline int get_mmcr1_pmcxsel(u64 mmcr1, int pmc) in get_mmcr1_pmcxsel() argument
100 return ((mmcr1 >> ((24 - (((pmc) - 1) * 8))) & 0xff)); in get_mmcr1_pmcxsel()
103 static inline int get_mmcr1_unit(u64 mmcr1, int pmc) in get_mmcr1_unit() argument
[all …]
/Linux-v6.1/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 …]
/Linux-v6.1/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 …]
/Linux-v6.1/arch/x86/kvm/svm/
Dpmu.c74 static bool amd_hw_event_available(struct kvm_pmc *pmc) in amd_hw_event_available() argument
79 /* check if a PMC is enabled by comparing it against global_ctrl bits. Because
82 static bool amd_pmc_is_enabled(struct kvm_pmc *pmc) in amd_pmc_is_enabled() argument
105 /* All MSRs refer to exactly one PMC, so msr_idx_to_pmc is enough. */ in amd_is_valid_msr()
112 struct kvm_pmc *pmc; in amd_msr_idx_to_pmc() local
114 pmc = get_gp_pmc_amd(pmu, msr, PMU_TYPE_COUNTER); in amd_msr_idx_to_pmc()
115 pmc = pmc ? pmc : get_gp_pmc_amd(pmu, msr, PMU_TYPE_EVNTSEL); in amd_msr_idx_to_pmc()
117 return pmc; in amd_msr_idx_to_pmc()
123 struct kvm_pmc *pmc; in amd_pmu_get_msr() local
127 pmc = get_gp_pmc_amd(pmu, msr, PMU_TYPE_COUNTER); in amd_pmu_get_msr()
[all …]
/Linux-v6.1/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 …]
/Linux-v6.1/arch/arm/boot/dts/
Dsama7g5.dtsi34 clocks = <&pmc PMC_TYPE_CORE PMC_CPUPLL>;
141 clocks = <&pmc PMC_TYPE_CORE PMC_MCK1>;
159 clocks = <&pmc PMC_TYPE_PERIPHERAL 18>;
190 clocks = <&pmc PMC_TYPE_PERIPHERAL 11>;
193 pmc: pmc@e0018000 { label
194 compatible = "microchip,sama7g5-pmc", "syscon";
264 …clocks = <&pmc PMC_TYPE_PERIPHERAL 91>, <&pmc PMC_TYPE_PERIPHERAL 92>, <&pmc PMC_TYPE_PERIPHERAL 9…
272 clocks = <&pmc PMC_TYPE_PERIPHERAL 21>;
292 clocks = <&pmc PMC_TYPE_PERIPHERAL 78>, <&pmc PMC_TYPE_GCK 78>;
307 clocks = <&pmc PMC_TYPE_PERIPHERAL 79>, <&pmc PMC_TYPE_GCK 79>;
[all …]
Dsam9x60.dtsi84 clocks = <&pmc PMC_TYPE_PERIPHERAL 23>, <&pmc PMC_TYPE_CORE PMC_UTMI>;
86 assigned-clocks = <&pmc PMC_TYPE_CORE PMC_UTMI>;
95 clocks = <&pmc PMC_TYPE_PERIPHERAL 22>, <&pmc PMC_TYPE_PERIPHERAL 22>, <&pmc PMC_TYPE_SYSTEM 6>;
104 clocks = <&pmc PMC_TYPE_CORE PMC_UTMI>, <&pmc PMC_TYPE_PERIPHERAL 22>;
106 assigned-clocks = <&pmc PMC_TYPE_CORE PMC_UTMI>;
124 clocks = <&pmc PMC_TYPE_CORE PMC_MCK>;
141 clocks = <&pmc PMC_TYPE_PERIPHERAL 12>, <&pmc PMC_TYPE_GCK 12>;
143 assigned-clocks = <&pmc PMC_TYPE_GCK 12>;
152 clocks = <&pmc PMC_TYPE_PERIPHERAL 26>, <&pmc PMC_TYPE_GCK 26>;
154 assigned-clocks = <&pmc PMC_TYPE_GCK 26>;
[all …]
Dsama5d2.dtsi48 clocks = <&pmc PMC_TYPE_CORE PMC_MCK>;
64 clocks = <&pmc PMC_TYPE_CORE PMC_MCK>;
134 clocks = <&pmc PMC_TYPE_PERIPHERAL 42>, <&pmc PMC_TYPE_CORE PMC_UTMI>;
143 clocks = <&pmc PMC_TYPE_PERIPHERAL 41>, <&pmc PMC_TYPE_PERIPHERAL 41>, <&pmc PMC_TYPE_SYSTEM 6>;
152 clocks = <&pmc PMC_TYPE_CORE PMC_UTMI>, <&pmc PMC_TYPE_PERIPHERAL 41>;
176 clocks = <&pmc PMC_TYPE_CORE PMC_MCK2>;
195 clocks = <&pmc PMC_TYPE_PERIPHERAL 31>, <&pmc PMC_TYPE_GCK 31>, <&pmc PMC_TYPE_CORE PMC_MAIN>;
197 assigned-clocks = <&pmc PMC_TYPE_GCK 31>;
206 clocks = <&pmc PMC_TYPE_PERIPHERAL 32>, <&pmc PMC_TYPE_GCK 32>, <&pmc PMC_TYPE_CORE PMC_MAIN>;
208 assigned-clocks = <&pmc PMC_TYPE_GCK 32>;
[all …]
/Linux-v6.1/arch/arm/mach-at91/
Dpm_suspend.S18 pmc .req r0 label
38 2: ldr r8, [pmc, #AT91_PMC_SR]
50 1: ldr r7, [pmc, #AT91_PMC_SR]
61 1: ldr r7, [pmc, #AT91_PMC_SR]
75 str r7, [pmc, #AT91_PMC_SCDR]
472 ldr pmc, .pmc_base
481 ldr tmp1, [pmc, tmp3]
484 str tmp1, [pmc, tmp3]
492 ldr tmp1, [pmc, #AT91_CKGR_MOR]
495 str tmp1, [pmc, #AT91_CKGR_MOR]
[all …]
/Linux-v6.1/arch/arm64/kvm/
Dpmu-emul.c25 static void kvm_pmu_stop_counter(struct kvm_vcpu *vcpu, struct kvm_pmc *pmc);
60 static struct kvm_vcpu *kvm_pmc_to_vcpu(struct kvm_pmc *pmc) in kvm_pmc_to_vcpu() argument
65 pmc -= pmc->idx; in kvm_pmc_to_vcpu()
66 pmu = container_of(pmc, struct kvm_pmu, pmc[0]); in kvm_pmc_to_vcpu()
72 * kvm_pmu_pmc_is_chained - determine if the pmc is chained
73 * @pmc: The PMU counter pointer
75 static bool kvm_pmu_pmc_is_chained(struct kvm_pmc *pmc) in kvm_pmu_pmc_is_chained() argument
77 struct kvm_vcpu *vcpu = kvm_pmc_to_vcpu(pmc); in kvm_pmu_pmc_is_chained()
79 return test_bit(pmc->idx >> 1, vcpu->arch.pmu.chained); in kvm_pmu_pmc_is_chained()
92 * kvm_pmu_get_canonical_pmc - obtain the canonical pmc
[all …]
/Linux-v6.1/net/ipv6/
Dmcast.c79 static int sf_setstate(struct ifmcaddr6 *pmc);
80 static void sf_markstate(struct ifmcaddr6 *pmc);
81 static void ip6_mc_clear_src(struct ifmcaddr6 *pmc);
117 #define for_each_pmc_socklock(np, sk, pmc) \ argument
118 for (pmc = sock_dereference((np)->ipv6_mc_list, sk); \
119 pmc; \
120 pmc = sock_dereference(pmc->next, sk))
122 #define for_each_pmc_rcu(np, pmc) \ argument
123 for (pmc = rcu_dereference((np)->ipv6_mc_list); \
124 pmc; \
[all …]
/Linux-v6.1/drivers/platform/x86/
Dpmc_atom.c14 #include <linux/platform_data/x86/clk-pmc-atom.h>
204 static inline u32 pmc_reg_read(struct pmc_dev *pmc, int reg_offset) in pmc_reg_read() argument
206 return readl(pmc->regmap + reg_offset); in pmc_reg_read()
209 static inline void pmc_reg_write(struct pmc_dev *pmc, int reg_offset, u32 val) in pmc_reg_write() argument
211 writel(val, pmc->regmap + reg_offset); in pmc_reg_write()
216 struct pmc_dev *pmc = &pmc_device; in pmc_atom_read() local
218 if (!pmc->init) in pmc_atom_read()
221 *value = pmc_reg_read(pmc, offset); in pmc_atom_read()
242 static void pmc_hw_reg_setup(struct pmc_dev *pmc) in pmc_hw_reg_setup() argument
245 * Disable PMC S0IX_WAKE_EN events coming from: in pmc_hw_reg_setup()
[all …]
/Linux-v6.1/drivers/platform/mellanox/
Dmlxbf-pmc.c97 * @mmio_base: The VA at which the PMC block is mapped
122 * struct mlxbf_pmc_context - Structure to hold PMC context info
426 static struct mlxbf_pmc_context *pmc; variable
438 arm_smccc_smc(command, pmc->sreg_tbl_perf, (uintptr_t)addr, 0, 0, 0, 0, in mlxbf_pmc_secure_read()
462 if (pmc->svc_sreg_support) in mlxbf_pmc_read()
494 arm_smccc_smc(command, pmc->sreg_tbl_perf, value, (uintptr_t)addr, 0, 0, in mlxbf_pmc_secure_write()
514 if (pmc->svc_sreg_support) in mlxbf_pmc_write()
529 (offset + MLXBF_PMC_REG_SIZE <= pmc->block[blk_num].blk_size)) in mlxbf_pmc_valid_range()
530 return true; /* inside the mapped PMC space */ in mlxbf_pmc_valid_range()
551 switch (pmc->event_set) { in mlxbf_pmc_event_list()
[all …]
/Linux-v6.1/arch/powerpc/perf/
Dpower7-pmu.c18 #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 …]
Dppc970-pmu.c17 #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 …]
Dpower6-pmu.c18 #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
182 unsigned int pmc, ev, b, u, s, psel; in p6_compute_mmcr() local
189 pmc = (event[i] >> PM_PMC_SH) & PM_PMC_MSK; in p6_compute_mmcr()
190 if (pmc) { in p6_compute_mmcr()
[all …]
Dpower5-pmu.c18 #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 …]
Dpower5+-pmu.c18 #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 …]
Disa207-common.h38 #define EVENT_PMC_SHIFT 16 /* PMC number (1-based) */
138 * BHRB IFM -* | | |*radix_scope | Count of events for each PMC.
143 * The PMC fields P1..P6, and NC, are adder fields. As we accumulate constraints
196 * For the per-PMC fields we have two bits. The low bit is added, so if two
197 * events ask for the same PMC the sum will overflow, setting the high bit,
200 #define CNST_PMC_SHIFT(pmc) ((pmc - 1) * 2) argument
201 #define CNST_PMC_VAL(pmc) (1 << CNST_PMC_SHIFT(pmc)) argument
202 #define CNST_PMC_MASK(pmc) (2 << CNST_PMC_SHIFT(pmc)) argument
210 #define MMCR1_UNIT_SHIFT(pmc) (60 - (4 * ((pmc) - 1))) argument
211 #define MMCR1_COMBINE_SHIFT(pmc) (35 - ((pmc) - 1)) argument
[all …]
/Linux-v6.1/arch/x86/kvm/vmx/
Dpmu_intel.c35 /* mapping between fixed pmc index and intel_arch_events array */
40 struct kvm_pmc *pmc; in reprogram_fixed_counters() local
52 pmc = get_fixed_pmc(pmu, MSR_CORE_PERF_FIXED_CTR0 + i); in reprogram_fixed_counters()
55 reprogram_counter(pmc); in reprogram_fixed_counters()
74 struct kvm_pmc *pmc; in reprogram_counters() local
77 pmc = intel_pmc_idx_to_pmc(pmu, bit); in reprogram_counters()
78 if (pmc) in reprogram_counters()
79 reprogram_counter(pmc); in reprogram_counters()
83 static bool intel_hw_event_available(struct kvm_pmc *pmc) in intel_hw_event_available() argument
85 struct kvm_pmu *pmu = pmc_to_pmu(pmc); in intel_hw_event_available()
[all …]
/Linux-v6.1/drivers/usb/typec/mux/
Dintel_pmc_mux.c3 * 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()
212 * If PMC is busy then retry the command once again in pmc_usb_command()
215 ret = pmc_usb_send_command(port->pmc->ipc, msg, len); in pmc_usb_command()
512 static int pmc_usb_register_port(struct pmc_usb *pmc, int index, in pmc_usb_register_port() argument
515 struct pmc_usb_port *port = &pmc->port[index]; in pmc_usb_register_port()
539 port->pmc = pmc; in pmc_usb_register_port()
546 port->typec_sw = typec_switch_register(pmc->dev, &sw_desc); in pmc_usb_register_port()
[all …]

12345678910>>...20