Re: [PATCH v2 2/4] powerpc: Add Power12 raw mode
From: Amit Machhiwal <hidden>
Date: 2026-08-04 06:12:37
On 2026/08/04 11:22 AM, Mahesh J Salgaonkar wrote:
On 2026-08-04 00:40:10 Tue, Amit Machhiwal wrote:quoted
On 2026/08/03 09:27 PM, Mahesh Salgaonkar wrote:quoted
From: Nicholas Piggin <npiggin@gmail.com> Add CPU table entries for raw mode. Signed-off-by: Nicholas Piggin <npiggin@gmail.com> Signed-off-by: Ritesh Harjani (IBM) <ritesh.list@gmail.com> Signed-off-by: Mahesh Salgaonkar <mahesh@linux.ibm.com> Tested-by: Praveen K Pandey <redacted> Reviewed-by: Nikhil Kumar Singh <redacted> --- Change in v2: - Added Reviewed-by from Nikhil --- arch/powerpc/include/asm/cpu_setup.h | 2 ++ arch/powerpc/include/asm/cputable.h | 17 +++++++-- arch/powerpc/include/asm/mmu.h | 1 + arch/powerpc/include/asm/reg.h | 5 ++- arch/powerpc/include/asm/synch.h | 6 +++- arch/powerpc/include/uapi/asm/cputable.h | 1 + arch/powerpc/kernel/cpu_setup_power.c | 43 +++++++++++++++++++++++ arch/powerpc/kernel/cpu_specs_book3s_64.h | 22 ++++++++++++ arch/powerpc/kernel/dt_cpu_ftrs.c | 37 +++++++++++++++++++ arch/powerpc/kernel/setup-common.c | 1 + arch/powerpc/kvm/book3s_hv.c | 9 +++-- arch/powerpc/mm/book3s64/hash_native.c | 22 ++++++++---- arch/powerpc/mm/init_64.c | 4 ++- 13 files changed, 157 insertions(+), 13 deletions(-)diff --git a/arch/powerpc/include/asm/cpu_setup.h b/arch/powerpc/include/asm/cpu_setup.h index 30e2fe3895024..26d2c0e2c99c6 100644 --- a/arch/powerpc/include/asm/cpu_setup.h +++ b/arch/powerpc/include/asm/cpu_setup.h@@ -9,10 +9,12 @@ void __setup_cpu_power7(unsigned long offset, struct cpu_spec *spec); void __setup_cpu_power8(unsigned long offset, struct cpu_spec *spec); void __setup_cpu_power9(unsigned long offset, struct cpu_spec *spec); void __setup_cpu_power10(unsigned long offset, struct cpu_spec *spec); +void __setup_cpu_power12(unsigned long offset, struct cpu_spec *spec); void __restore_cpu_power7(void); void __restore_cpu_power8(void); void __restore_cpu_power9(void); void __restore_cpu_power10(void); +void __restore_cpu_power12(void); void __setup_cpu_e500v1(unsigned long offset, struct cpu_spec *spec); void __setup_cpu_e500v2(unsigned long offset, struct cpu_spec *spec);diff --git a/arch/powerpc/include/asm/cputable.h b/arch/powerpc/include/asm/cputable.h index ec16c12296da8..a3be81c47df3a 100644 --- a/arch/powerpc/include/asm/cputable.h +++ b/arch/powerpc/include/asm/cputable.h@@ -194,6 +194,7 @@ static inline void cpu_feature_keys_init(void) { } #define CPU_FTR_DAWR1 LONG_ASM_CONST(0x0008000000000000) #define CPU_FTR_DEXCR_NPHIE LONG_ASM_CONST(0x0010000000000000) #define CPU_FTR_P11_PVR LONG_ASM_CONST(0x0020000000000000) +#define CPU_FTR_ARCH_32 LONG_ASM_CONST(0x0040000000000000) #ifndef __ASSEMBLER__@@ -457,6 +458,18 @@ static inline void cpu_feature_keys_init(void) { } #define CPU_FTRS_POWER11 (CPU_FTRS_POWER10 | CPU_FTR_P11_PVR) +#define CPU_FTRS_POWER12 (CPU_FTR_LWSYNC | \ + CPU_FTR_PPCAS_ARCH_V2 | CPU_FTR_CTRL | CPU_FTR_ARCH_206 |\ + CPU_FTR_MMCRA | CPU_FTR_SMT | \ + CPU_FTR_COHERENT_ICACHE | \ + CPU_FTR_PURR | CPU_FTR_SPURR | CPU_FTR_REAL_LE | \ + CPU_FTR_DSCR | \ + CPU_FTR_STCX_CHECKS_ADDRESS | CPU_FTR_POPCNTB | CPU_FTR_POPCNTD | \ + CPU_FTR_CFAR | CPU_FTR_HVMODE | CPU_FTR_VMX_COPY | \ + CPU_FTR_DBELL | CPU_FTR_HAS_PPR | CPU_FTR_ARCH_207S | \ + CPU_FTR_ARCH_300 | CPU_FTR_ARCH_31 | CPU_FTR_ARCH_32 | \ + CPU_FTR_DAWR | CPU_FTR_DAWR1) + #define CPU_FTRS_CELL (CPU_FTR_LWSYNC | \ CPU_FTR_PPCAS_ARCH_V2 | CPU_FTR_CTRL | \ CPU_FTR_ALTIVEC_COMP | CPU_FTR_MMCRA | CPU_FTR_SMT | \@@ -476,7 +489,7 @@ static inline void cpu_feature_keys_init(void) { } (CPU_FTRS_POWER7 | CPU_FTRS_POWER8E | CPU_FTRS_POWER8 | \ CPU_FTR_ALTIVEC_COMP | CPU_FTR_VSX_COMP | CPU_FTRS_POWER9 | \ CPU_FTRS_POWER9_DD2_1 | CPU_FTRS_POWER9_DD2_2 | \ - CPU_FTRS_POWER9_DD2_3 | CPU_FTRS_POWER10 | CPU_FTRS_POWER11) + CPU_FTRS_POWER9_DD2_3 | CPU_FTRS_POWER10 | CPU_FTRS_POWER11 | CPU_FTRS_POWER12)Line exceeds 80 columns. Please wrap CPU_FTRS_POWER12 onto its own line. Same applies to the #else variant below.Linux has long lifted the 80 column restriction and increased the default limit to 100 chars. https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=bdc48fa11e46f867ea4d75fa59ee87a7f48be144
The commit log itself mentions: staying withing 80 columns is certainly still _preferred_ But I'll leave it upto you. Either way: Reviewed-by: Amit Machhiwal <redacted> Thanks, Amit
Thanks, -Mahesh.