| /kernel/linux/linux-5.10/arch/powerpc/kernel/ |
| D | dt_cpu_ftrs.c | 71 u64 lpcr; member 82 u64 lpcr; in __restore_cpu_cpufeatures() local 85 * LPCR is restored by the power on engine already. It can be changed in __restore_cpu_cpufeatures() 94 * for now is "or" LPCR with existing. in __restore_cpu_cpufeatures() 96 lpcr = mfspr(SPRN_LPCR); in __restore_cpu_cpufeatures() 97 lpcr |= system_registers.lpcr; in __restore_cpu_cpufeatures() 98 lpcr &= ~system_registers.lpcr_clear; in __restore_cpu_cpufeatures() 99 mtspr(SPRN_LPCR, lpcr); in __restore_cpu_cpufeatures() 148 * LPCR does not get cleared, to match behaviour with secondaries in cpufeatures_setup_cpu() 150 * could clear LPCR too. in cpufeatures_setup_cpu() [all …]
|
| D | cpu_setup_power.c | 29 static void init_LPCR_ISA300(u64 lpcr, u64 lpes) in init_LPCR_ISA300() argument 32 lpcr |= (lpes << LPCR_LPES_SH) & LPCR_LPES; in init_LPCR_ISA300() 33 lpcr |= LPCR_PECE0|LPCR_PECE1|LPCR_PECE2; in init_LPCR_ISA300() 34 lpcr |= (4ull << LPCR_DPFD_SH) & LPCR_DPFD; in init_LPCR_ISA300() 35 lpcr &= ~LPCR_HDICE; /* clear HDICE */ in init_LPCR_ISA300() 36 lpcr |= (4ull << LPCR_VC_SH); in init_LPCR_ISA300() 37 mtspr(SPRN_LPCR, lpcr); in init_LPCR_ISA300() 42 * Setup a sane LPCR: 43 * Called with initial LPCR and desired LPES 2-bit value 54 static void init_LPCR_ISA206(u64 lpcr, u64 lpes) in init_LPCR_ISA206() argument [all …]
|
| /kernel/linux/linux-6.6/arch/powerpc/kernel/ |
| D | dt_cpu_ftrs.c | 70 u64 lpcr; member 80 mtspr(SPRN_LPCR, system_registers.lpcr); in __restore_cpu_cpufeatures() 128 * LPCR does not get cleared, to match behaviour with secondaries in cpufeatures_setup_cpu() 130 * could clear LPCR too. in cpufeatures_setup_cpu() 211 u64 lpcr; in feat_enable_hv() local 221 lpcr = mfspr(SPRN_LPCR); in feat_enable_hv() 222 lpcr &= ~LPCR_LPES0; /* HV external interrupts */ in feat_enable_hv() 223 mtspr(SPRN_LPCR, lpcr); in feat_enable_hv() 245 u64 lpcr; in feat_enable_idle_nap() local 248 lpcr = mfspr(SPRN_LPCR); in feat_enable_idle_nap() [all …]
|
| D | cpu_setup_power.c | 29 static void init_LPCR_ISA300(u64 lpcr, u64 lpes) in init_LPCR_ISA300() argument 32 lpcr |= (lpes << LPCR_LPES_SH) & LPCR_LPES; in init_LPCR_ISA300() 33 lpcr |= LPCR_PECE0|LPCR_PECE1|LPCR_PECE2; in init_LPCR_ISA300() 34 lpcr |= (4ull << LPCR_DPFD_SH) & LPCR_DPFD; in init_LPCR_ISA300() 35 lpcr &= ~LPCR_HDICE; /* clear HDICE */ in init_LPCR_ISA300() 36 lpcr |= (4ull << LPCR_VC_SH); in init_LPCR_ISA300() 37 mtspr(SPRN_LPCR, lpcr); in init_LPCR_ISA300() 42 * Setup a sane LPCR: 43 * Called with initial LPCR and desired LPES 2-bit value 54 static void init_LPCR_ISA206(u64 lpcr, u64 lpes) in init_LPCR_ISA206() argument [all …]
|
| /kernel/linux/linux-6.6/arch/powerpc/kvm/ |
| D | book3s_hv.c | 480 pr_err("lpcr = %.16lx sdr1 = %.16lx last_inst = %.16lx\n", in kvmppc_dump_regs() 481 vcpu->arch.vcore->lpcr, vcpu->kvm->arch.sdr1, in kvmppc_dump_regs() 2100 * Enforce limits on guest LPCR values based on hardware availability, 2104 unsigned long kvmppc_filter_lpcr_hv(struct kvm *kvm, unsigned long lpcr) in kvmppc_filter_lpcr_hv() argument 2108 lpcr &= ~LPCR_TC; in kvmppc_filter_lpcr_hv() 2112 lpcr &= ~LPCR_AIL; in kvmppc_filter_lpcr_hv() 2113 if ((lpcr & LPCR_AIL) != LPCR_AIL_3) in kvmppc_filter_lpcr_hv() 2114 lpcr &= ~LPCR_AIL; /* LPCR[AIL]=1/2 is disallowed */ in kvmppc_filter_lpcr_hv() 2122 lpcr &= ~LPCR_AIL; in kvmppc_filter_lpcr_hv() 2129 lpcr &= ~LPCR_LD; in kvmppc_filter_lpcr_hv() [all …]
|
| D | book3s_hv_builtin.c | 535 * Perform MSR and PC adjustment for LPCR[AIL]=3 if it is set and in inject_interrupt() 543 (vcpu->arch.vcore->lpcr & LPCR_AIL) == LPCR_AIL_3 && in inject_interrupt() 569 unsigned long lpcr; in kvmppc_guest_entry_inject_int() local 573 /* Insert EXTERNAL bit into LPCR at the MER bit position */ in kvmppc_guest_entry_inject_int() 575 lpcr = mfspr(SPRN_LPCR); in kvmppc_guest_entry_inject_int() 576 lpcr |= ext << LPCR_MER_SH; in kvmppc_guest_entry_inject_int() 577 mtspr(SPRN_LPCR, lpcr); in kvmppc_guest_entry_inject_int() 585 if (!(lpcr & LPCR_LD)) in kvmppc_guest_entry_inject_int()
|
| D | book3s_hv_p9_entry.c | 301 static void switch_mmu_to_guest_radix(struct kvm *kvm, struct kvm_vcpu *vcpu, u64 lpcr) in switch_mmu_to_guest_radix() argument 318 mtspr(SPRN_LPCR, lpcr); in switch_mmu_to_guest_radix() 326 static void switch_mmu_to_guest_hpt(struct kvm *kvm, struct kvm_vcpu *vcpu, u64 lpcr) in switch_mmu_to_guest_hpt() argument 343 mtspr(SPRN_LPCR, lpcr); in switch_mmu_to_guest_hpt() 356 u64 lpcr = kvm->arch.host_lpcr; in switch_mmu_to_host() local 368 mtspr(SPRN_LPCR, lpcr); in switch_mmu_to_host() 532 int kvmhv_vcpu_entry_p9(struct kvm_vcpu *vcpu, u64 time_limit, unsigned long lpcr, u64 *tb) in kvmhv_vcpu_entry_p9() argument 698 switch_mmu_to_guest_radix(kvm, vcpu, lpcr); in kvmhv_vcpu_entry_p9() 700 switch_mmu_to_guest_hpt(kvm, vcpu, lpcr); in kvmhv_vcpu_entry_p9() 706 * P9 suppresses the HDEC exception when LPCR[HDICE] = 0, in kvmhv_vcpu_entry_p9() [all …]
|
| D | book3s_hv_nested.c | 72 hr->lpcr = swab64(hr->lpcr); in byteswap_hv_regs() 261 const struct hv_guest_state *l1_hv, u64 *lpcr) in load_l2_hv_regs() argument 269 * Don't let L1 change LPCR bits for the L2 except these: in load_l2_hv_regs() 277 *lpcr = kvmppc_filter_lpcr_hv(vcpu->kvm, in load_l2_hv_regs() 278 (vc->lpcr & ~mask) | (*lpcr & mask)); in load_l2_hv_regs() 303 u64 hdec_exp, lpcr; in kvmhv_enter_nested_guest() local 378 lpcr = l2_hv.lpcr; in kvmhv_enter_nested_guest() 379 load_l2_hv_regs(vcpu, &l2_hv, &saved_l1_hv, &lpcr); in kvmhv_enter_nested_guest() 384 r = kvmhv_run_single_vcpu(vcpu, hdec_exp, lpcr); in kvmhv_enter_nested_guest()
|
| /kernel/linux/linux-5.10/arch/powerpc/kvm/ |
| D | book3s_hv_builtin.c | 327 * restore the host LPCR value. in kvmhv_commence_exit() 671 * Functions used to switch LPCR HR and UPRT bits on all threads 676 #define PHASE_SET_LPCR 2 /* have set LPCR */ 678 #define PHASE_RESET_LPCR 8 /* have reset LPCR to host value */ 702 /* Set LPCR and LPIDR */ in kvmhv_p9_set_lpcr() 728 * to reload the host LPCR value - but only on POWER9 when 788 * Perform MSR and PC adjustment for LPCR[AIL]=3 if it is set and in inject_interrupt() 796 (vcpu->arch.vcore->lpcr & LPCR_AIL) == LPCR_AIL_3 && in inject_interrupt() 822 unsigned long lpcr; in kvmppc_guest_entry_inject_int() local 824 /* Insert EXTERNAL bit into LPCR at the MER bit position */ in kvmppc_guest_entry_inject_int() [all …]
|
| D | book3s_hv.c | 436 pr_err("lpcr = %.16lx sdr1 = %.16lx last_inst = %.8x\n", in kvmppc_dump_regs() 437 vcpu->arch.vcore->lpcr, vcpu->kvm->arch.sdr1, in kvmppc_dump_regs() 1622 if ((new_lpcr & LPCR_ILE) != (vc->lpcr & LPCR_ILE)) { in kvmppc_set_lpcr() 1651 /* Broken 32-bit version of LPCR must not clear top bits */ in kvmppc_set_lpcr() 1654 vc->lpcr = (vc->lpcr & ~mask) | (new_lpcr & mask); in kvmppc_set_lpcr() 1805 *val = get_reg_val(id, vcpu->arch.vcore->lpcr); in kvmppc_get_one_reg_hv() 2176 vcore->lpcr = kvm->arch.lpcr; in kvmppc_vcore_create() 3233 /* Use the split_info for LPCR/LPIDR changes */ in kvmppc_run_core() 3234 split_info.lpcr_req = vc->lpcr; in kvmppc_run_core() 3323 * threads woken up so they can do the LPCR/LPIDR change. in kvmppc_run_core() [all …]
|
| D | book3s_hv_interrupts.S | 62 * we need to set LPCR[HDICE] before writing HDEC. 74 /* On POWER9, don't sign-extend if host LPCR[LD] bit is set */
|
| D | book3s_hv_nested.c | 68 hr->lpcr = swab64(hr->lpcr); in byteswap_hv_regs() 230 unsigned long lpcr; in kvmhv_enter_nested_guest() local 303 lpcr = (vc->lpcr & ~mask) | (l2_hv.lpcr & mask); in kvmhv_enter_nested_guest() 315 r = kvmhv_run_single_vcpu(vcpu, hdec_exp, lpcr); in kvmhv_enter_nested_guest()
|
| /kernel/linux/linux-6.6/drivers/gpu/drm/imx/lcdc/ |
| D | imx-lcdc.c | 70 /* Values for LPCR Register */ 144 u32 lpcr, lvcr, lhcr; in imx_lcdc_update_hw_registers() local 176 lpcr = readl(lcdc->base + IMX21LCDC_LPCR); in imx_lcdc_update_hw_registers() 177 lpcr &= ~IMX21LCDC_LPCR_BPIX; in imx_lcdc_update_hw_registers() 178 lpcr |= FIELD_PREP(IMX21LCDC_LPCR_BPIX, imx_lcdc_get_format(fb->format->format)); in imx_lcdc_update_hw_registers() 179 writel(lpcr, lcdc->base + IMX21LCDC_LPCR); in imx_lcdc_update_hw_registers()
|
| /kernel/linux/linux-5.10/arch/powerpc/mm/book3s64/ |
| D | radix_pgtable.c | 636 unsigned long lpcr; in radix__early_init_mmu() local 691 lpcr = mfspr(SPRN_LPCR); in radix__early_init_mmu() 692 mtspr(SPRN_LPCR, lpcr | LPCR_UPRT | LPCR_HR); in radix__early_init_mmu() 708 unsigned long lpcr; in radix__early_init_mmu_secondary() local 713 lpcr = mfspr(SPRN_LPCR); in radix__early_init_mmu_secondary() 714 mtspr(SPRN_LPCR, lpcr | LPCR_UPRT | LPCR_HR); in radix__early_init_mmu_secondary() 728 unsigned long lpcr; in radix__mmu_cleanup_all() local 731 lpcr = mfspr(SPRN_LPCR); in radix__mmu_cleanup_all() 732 mtspr(SPRN_LPCR, lpcr & ~LPCR_UPRT); in radix__mmu_cleanup_all()
|
| /kernel/linux/linux-6.6/arch/powerpc/platforms/powernv/ |
| D | smp.c | 205 * offline, so clear LPCR:PECE1. We keep PECE2 (and in pnv_cpu_offline_self() 209 * the SLW engine sets LPCR with decrementer bit cleared, else in pnv_cpu_offline_self() 284 * Re-enable decrementer interrupts in LPCR. in pnv_cpu_offline_self() 287 * for non-hotplug cases. So program the LPCR via stop api as in pnv_cpu_offline_self()
|
| D | idle.c | 70 * hid0, hid1, hid4, hid5, hmeer and lpcr values are symmetric across in pnv_save_sprs_for_deep_states() 299 u64 lpcr; member 349 sprs.lpcr = mfspr(SPRN_LPCR); in power7_idle_insn() 483 mtspr(SPRN_LPCR, sprs.lpcr); in power7_idle_insn() 587 u64 lpcr; member 664 sprs.lpcr = mfspr(SPRN_LPCR); in power9_idle_stop() 780 mtspr(SPRN_LPCR, sprs.lpcr); in power9_idle_stop() 1047 * Program the LPCR via stop-api only if the deepest stop state in pnv_program_cpu_hotplug_lpcr() 1117 * 1 - Exit from power-save mode controlled by LPCR's PECE bits
|
| /kernel/linux/linux-5.10/arch/powerpc/platforms/powernv/ |
| D | smp.c | 205 * offline, so clear LPCR:PECE1. We keep PECE2 (and in pnv_cpu_offline_self() 209 * the SLW engine sets LPCR with decrementer bit cleared, else in pnv_cpu_offline_self() 284 * Re-enable decrementer interrupts in LPCR. in pnv_cpu_offline_self() 287 * for non-hotplug cases. So program the LPCR via stop api as in pnv_cpu_offline_self()
|
| D | idle.c | 70 * hid0, hid1, hid4, hid5, hmeer and lpcr values are symmetric across in pnv_save_sprs_for_deep_states() 297 u64 lpcr; member 347 sprs.lpcr = mfspr(SPRN_LPCR); in power7_idle_insn() 482 mtspr(SPRN_LPCR, sprs.lpcr); in power7_idle_insn() 584 u64 lpcr; member 663 sprs.lpcr = mfspr(SPRN_LPCR); in power9_idle_stop() 780 mtspr(SPRN_LPCR, sprs.lpcr); in power9_idle_stop() 1081 * Program the LPCR via stop-api only if the deepest stop state in pnv_program_cpu_hotplug_lpcr() 1151 * 1 - Exit from power-save mode controlled by LPCR's PECE bits
|
| D | npu-dma.c | 638 * Currently we only support radix and non-zero LPCR only makes sense in pnv_npu2_map_lpar_dev() 639 * for hash tables so skiboot expects the LPCR parameter to be a zero. in pnv_npu2_map_lpar_dev() 642 0 /* LPCR bits */); in pnv_npu2_map_lpar_dev() 699 0 /* LPCR bits */); in pnv_npu2_unmap_lpar_dev()
|
| /kernel/linux/linux-5.10/drivers/rtc/ |
| D | rtc-snvs.c | 137 u32 lpcr; in snvs_rtc_enable() local 143 regmap_read(data->regmap, data->offset + SNVS_LPCR, &lpcr); in snvs_rtc_enable() 146 if (lpcr & SNVS_LPCR_SRTC_ENV) in snvs_rtc_enable() 149 if (!(lpcr & SNVS_LPCR_SRTC_ENV)) in snvs_rtc_enable()
|
| /kernel/linux/linux-6.6/drivers/rtc/ |
| D | rtc-snvs.c | 137 u32 lpcr; in snvs_rtc_enable() local 143 regmap_read(data->regmap, data->offset + SNVS_LPCR, &lpcr); in snvs_rtc_enable() 146 if (lpcr & SNVS_LPCR_SRTC_ENV) in snvs_rtc_enable() 149 if (!(lpcr & SNVS_LPCR_SRTC_ENV)) in snvs_rtc_enable()
|
| /kernel/linux/linux-6.6/arch/powerpc/mm/book3s64/ |
| D | radix_pgtable.c | 532 unsigned long lpcr; in radix__early_init_mmu() local 578 lpcr = mfspr(SPRN_LPCR); in radix__early_init_mmu() 579 mtspr(SPRN_LPCR, lpcr | LPCR_UPRT | LPCR_HR); in radix__early_init_mmu() 594 unsigned long lpcr; in radix__early_init_mmu_secondary() local 599 lpcr = mfspr(SPRN_LPCR); in radix__early_init_mmu_secondary() 600 mtspr(SPRN_LPCR, lpcr | LPCR_UPRT | LPCR_HR); in radix__early_init_mmu_secondary() 616 unsigned long lpcr; in radix__mmu_cleanup_all() local 619 lpcr = mfspr(SPRN_LPCR); in radix__mmu_cleanup_all() 620 mtspr(SPRN_LPCR, lpcr & ~LPCR_UPRT); in radix__mmu_cleanup_all()
|
| /kernel/linux/linux-6.6/arch/powerpc/include/asm/ |
| D | kvm_book3s.h | 89 ulong lpcr; member 262 unsigned long lpcr); 263 extern void kvmppc_update_lpcr(struct kvm *kvm, unsigned long lpcr, 311 u64 time_limit, unsigned long lpcr);
|
| D | pnv-ocxl.h | 79 uint64_t lpcr, void __iomem **arva);
|
| /kernel/linux/linux-5.10/arch/powerpc/include/asm/ |
| D | kvm_book3s.h | 89 ulong lpcr; member 261 extern void kvmppc_update_lpcr(struct kvm *kvm, unsigned long lpcr, 302 u64 time_limit, unsigned long lpcr);
|