Re: [PATCH v2 2/4] powerpc: Add Power12 raw mode

Amit Machhiwal <[email protected]> Tue, 4 Aug 2026 11:43:08 +0530
Newsgroups gmane.linux.ports.ppc.embedded
Message-ID <20260804114204.a3cfb76c-7f-amachhiw__40297.2924801119$1785823966$gmane$org@linux.ibm.com>
On 2026/08/04 11:22 AM, Mahesh J Salgaonkar wrote:
> On 2026-08-04 00:40:10 Tue, Amit Machhiwal wrote:
> > On 2026/08/03 09:27 PM, Mahesh Salgaonkar wrote:
> > > From: Nicholas Piggin <[email protected]>
> > > 
> > > Add CPU table entries for raw mode.
> > > 
> > > Signed-off-by: Nicholas Piggin <[email protected]>
> > > Signed-off-by: Ritesh Harjani (IBM) <[email protected]>
> > > Signed-off-by: Mahesh Salgaonkar <[email protected]>
> > > Tested-by: Praveen K Pandey <[email protected]>
> > > Reviewed-by: Nikhil Kumar Singh <[email protected]>
> > > ---
> > > 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 <[email protected]>

Thanks,
Amit

> 
> Thanks,
> -Mahesh.
> 
>