/linux-6.12.1/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 …]
|
/linux-6.12.1/drivers/platform/x86/intel/pmc/ |
D | core.c | 58 static inline u32 pmc_core_reg_read(struct pmc *pmc, int reg_offset) in pmc_core_reg_read() argument 60 return readl(pmc->regbase + reg_offset); in pmc_core_reg_read() 63 static inline void pmc_core_reg_write(struct pmc *pmc, int reg_offset, in pmc_core_reg_write() argument 66 writel(val, pmc->regbase + reg_offset); in pmc_core_reg_write() 69 static inline u64 pmc_core_adjust_slp_s0_step(struct pmc *pmc, u32 value) in pmc_core_adjust_slp_s0_step() argument 77 const int lpm_adj_x2 = pmc->map->lpm_res_counter_step_x2; in pmc_core_adjust_slp_s0_step() 79 if (pmc->map == &adl_reg_map) in pmc_core_adjust_slp_s0_step() 82 return (u64)value * pmc->map->slp_s0_res_counter_step; in pmc_core_adjust_slp_s0_step() 87 struct pmc *pmc = pmcdev->pmcs[PMC_IDX_MAIN]; in set_etr3() local 88 const struct pmc_reg_map *map = pmc->map; in set_etr3() [all …]
|
/linux-6.12.1/drivers/soc/tegra/ |
D | pmc.c | 3 * 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 …]
|
/linux-6.12.1/tools/testing/selftests/powerpc/pmu/sampling_tests/ |
D | misc.h | 61 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 …]
|
/linux-6.12.1/Documentation/devicetree/bindings/clock/ |
D | atmel,at91rm9200-pmc.yaml | 4 $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 …]
|
/linux-6.12.1/arch/x86/kvm/ |
D | pmu.c | 58 * - There are three types of index to access perf counters (PMC): 68 * 3. Global PMC Index (named pmc): pmc is an index specific to PMU 69 * code. Each pmc, stored in kvm_pmc.idx field, is unique across 71 * between pmc and perf counters is as the following: 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() 104 if (pmc->perf_event && pmc->perf_event->attr.precise_ip) { in __kvm_perf_overflow() 119 __set_bit(pmc->idx, (unsigned long *)&pmu->global_status); in __kvm_perf_overflow() 122 if (pmc->intr && !skip_pmi) in __kvm_perf_overflow() 123 kvm_make_request(KVM_REQ_PMI, pmc->vcpu); in __kvm_perf_overflow() [all …]
|
D | pmu.h | 11 #define pmc_to_pmu(pmc) (&(pmc)->vcpu->arch.pmu) argument 92 #define kvm_for_each_pmc(pmu, pmc, i, bitmap) \ argument 94 if (!(pmc = kvm_pmc_idx_to_pmc(pmu, i))) \ 98 static inline u64 pmc_bitmask(struct kvm_pmc *pmc) in pmc_bitmask() argument 100 struct kvm_pmu *pmu = pmc_to_pmu(pmc); in pmc_bitmask() 102 return pmu->counter_bitmask[pmc->type]; in pmc_bitmask() 105 static inline u64 pmc_read_counter(struct kvm_pmc *pmc) in pmc_read_counter() argument 109 counter = pmc->counter + pmc->emulated_counter; in pmc_read_counter() 111 if (pmc->perf_event && !pmc->is_paused) in pmc_read_counter() 112 counter += perf_event_read_value(pmc->perf_event, in pmc_read_counter() [all …]
|
/linux-6.12.1/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 …]
|
/linux-6.12.1/arch/riscv/kvm/ |
D | vcpu_pmu.c | 37 static u64 kvm_pmu_get_sample_period(struct kvm_pmc *pmc) in kvm_pmu_get_sample_period() argument 39 u64 counter_val_mask = GENMASK(pmc->cinfo.width, 0); in kvm_pmu_get_sample_period() 42 if (!pmc->counter_val) in kvm_pmu_get_sample_period() 45 sample_period = (-pmc->counter_val) & counter_val_mask; in kvm_pmu_get_sample_period() 78 static void kvm_pmu_release_perf_event(struct kvm_pmc *pmc) in kvm_pmu_release_perf_event() argument 80 if (pmc->perf_event) { in kvm_pmu_release_perf_event() 81 perf_event_disable(pmc->perf_event); in kvm_pmu_release_perf_event() 82 perf_event_release_kernel(pmc->perf_event); in kvm_pmu_release_perf_event() 83 pmc->perf_event = NULL; in kvm_pmu_release_perf_event() 204 struct kvm_pmc *pmc; in pmu_fw_ctr_read_hi() local [all …]
|
/linux-6.12.1/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. 51 * BIOS does not create an ACPI device for each PMC function, but 73 * intel_pmc_gcr_read64() - Read a 64-bit PMC GCR register 74 * @pmc: PMC device pointer 78 * Reads the 64-bit PMC GCR register at given offset. 82 int intel_pmc_gcr_read64(struct intel_pmc_dev *pmc, u32 offset, u64 *data) in intel_pmc_gcr_read64() argument 87 spin_lock(&pmc->gcr_lock); in intel_pmc_gcr_read64() 88 *data = readq(pmc->gcr_mem_base + offset); in intel_pmc_gcr_read64() [all …]
|
/linux-6.12.1/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 …]
|
/linux-6.12.1/arch/arm/mach-at91/ |
D | pm_suspend.S | 22 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 …]
|
/linux-6.12.1/arch/arm/boot/dts/microchip/ |
D | sama7g5.dtsi | 37 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 …]
|
D | sama5d2.dtsi | 48 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 …]
|
D | sam9x60.dtsi | 84 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 …]
|
/linux-6.12.1/drivers/platform/x86/ |
D | pmc_atom.c | 15 #include <linux/platform_data/x86/clk-pmc-atom.h> 206 static inline u32 pmc_reg_read(struct pmc_dev *pmc, int reg_offset) in pmc_reg_read() argument 208 return readl(pmc->regmap + reg_offset); in pmc_reg_read() 211 static inline void pmc_reg_write(struct pmc_dev *pmc, int reg_offset, u32 val) in pmc_reg_write() argument 213 writel(val, pmc->regmap + reg_offset); in pmc_reg_write() 218 struct pmc_dev *pmc = &pmc_device; in pmc_atom_read() local 220 if (!pmc->init) in pmc_atom_read() 223 *value = pmc_reg_read(pmc, offset); in pmc_atom_read() 244 static void pmc_hw_reg_setup(struct pmc_dev *pmc) in pmc_hw_reg_setup() argument 247 * Disable PMC S0IX_WAKE_EN events coming from: in pmc_hw_reg_setup() [all …]
|
/linux-6.12.1/net/ipv6/ |
D | mcast.c | 79 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-6.12.1/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 …]
|
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 …]
|
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 …]
|
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 …]
|
/linux-6.12.1/arch/arm64/kvm/ |
D | pmu-emul.c | 25 static void kvm_pmu_create_perf_event(struct kvm_pmc *pmc); 26 static void kvm_pmu_release_perf_event(struct kvm_pmc *pmc); 28 static struct kvm_vcpu *kvm_pmc_to_vcpu(const struct kvm_pmc *pmc) in kvm_pmc_to_vcpu() argument 30 return container_of(pmc, struct kvm_vcpu, arch.pmu.pmc[pmc->idx]); in kvm_pmc_to_vcpu() 35 return &vcpu->arch.pmu.pmc[cnt_idx]; in kvm_vcpu_idx_to_pmc() 80 * @pmc: counter context 82 static bool kvm_pmc_is_64bit(struct kvm_pmc *pmc) in kvm_pmc_is_64bit() argument 84 struct kvm_vcpu *vcpu = kvm_pmc_to_vcpu(pmc); in kvm_pmc_is_64bit() 86 return (pmc->idx == ARMV8_PMU_CYCLE_IDX || in kvm_pmc_is_64bit() 90 static bool kvm_pmc_has_64bit_overflow(struct kvm_pmc *pmc) in kvm_pmc_has_64bit_overflow() argument [all …]
|
/linux-6.12.1/drivers/platform/mellanox/ |
D | mlxbf-pmc.c | 109 * @mmio_base: The VA at which the PMC block is mapped 134 * struct mlxbf_pmc_context - Structure to hold PMC context info 862 static struct mlxbf_pmc_context *pmc; variable 873 arm_smccc_smc(command, pmc->sreg_tbl_perf, (uintptr_t)addr, 0, 0, 0, 0, in mlxbf_pmc_secure_read() 896 if (pmc->svc_sreg_support) in mlxbf_pmc_read() 927 arm_smccc_smc(command, pmc->sreg_tbl_perf, value, (uintptr_t)addr, 0, 0, in mlxbf_pmc_secure_write() 947 if (pmc->svc_sreg_support) in mlxbf_pmc_write() 962 (offset + MLXBF_PMC_REG_SIZE <= pmc->block[blk_num].blk_size)) in mlxbf_pmc_valid_range() 963 return true; /* inside the mapped PMC space */ in mlxbf_pmc_valid_range() 984 switch (pmc->event_set) { in mlxbf_pmc_event_list() [all …]
|
/linux-6.12.1/drivers/usb/typec/mux/ |
D | intel_pmc_mux.c | 3 * Driver for Intel PMC USB mux control 135 struct pmc_usb *pmc; member 172 port->iom_status = readl(port->pmc->iom_base + in update_port_status() 173 port->pmc->iom_port_status_offset + in update_port_status() 174 port_num * port->pmc->iom_port_status_size); in update_port_status() 235 * If PMC is busy then retry the command once again in pmc_usb_command() 238 ret = pmc_usb_send_command(port->pmc->ipc, msg, len); in pmc_usb_command() 301 if (!is_pmc_mux_tbt(port->pmc->iom_adev)) { in pmc_usb_mux_dp() 357 if (acpi_dev_hid_uid_match(port->pmc->iom_adev, "INTC1072", NULL) || in pmc_usb_mux_tbt() 358 acpi_dev_hid_uid_match(port->pmc->iom_adev, "INTC1079", NULL)) { in pmc_usb_mux_tbt() [all …]
|
/linux-6.12.1/arch/x86/kvm/svm/ |
D | pmu.c | 96 struct kvm_pmc *pmc; in amd_msr_idx_to_pmc() local 98 pmc = get_gp_pmc_amd(pmu, msr, PMU_TYPE_COUNTER); in amd_msr_idx_to_pmc() 99 pmc = pmc ? pmc : get_gp_pmc_amd(pmu, msr, PMU_TYPE_EVNTSEL); in amd_msr_idx_to_pmc() 101 return pmc; in amd_msr_idx_to_pmc() 130 struct kvm_pmc *pmc; in amd_pmu_get_msr() local 134 pmc = get_gp_pmc_amd(pmu, msr, PMU_TYPE_COUNTER); in amd_pmu_get_msr() 135 if (pmc) { in amd_pmu_get_msr() 136 msr_info->data = pmc_read_counter(pmc); in amd_pmu_get_msr() 140 pmc = get_gp_pmc_amd(pmu, msr, PMU_TYPE_EVNTSEL); in amd_pmu_get_msr() 141 if (pmc) { in amd_pmu_get_msr() [all …]
|