Message ID | e3de2a60198c1b648a5da19ba29938a1e365d1f3.1566931178.git.christophe.leroy@c-s.fr (mailing list archive) |
---|---|
State | Superseded |
Headers | show |
Series | [v2,1/2] powerpc: permanently include 8xx registers in reg.h | expand |
Context | Check | Description |
---|---|---|
snowpatch_ozlabs/apply_patch | success | Successfully applied on branch next (0e4523c0b4f64eaf7abe59e143e6bdf8f972acff) |
snowpatch_ozlabs/checkpatch | success | total: 0 errors, 0 warnings, 0 checks, 18 lines checked |
Christophe Leroy <christophe.leroy@c-s.fr> writes: > Most 8xx registers have specific names, so just include > reg_8xx.h all the time in reg.h in order to have them defined > even when CONFIG_PPC_8xx is not selected. This will avoid > the need for #ifdefs in C code. > > Guard SPRN_ICTRL in an #ifdef CONFIG_PPC_8xx as this register > has same name but different meaning and different spr number as > another register in the mpc7450. > > Signed-off-by: Christophe Leroy <christophe.leroy@c-s.fr> > > --- > v2: no change > --- > arch/powerpc/include/asm/reg.h | 2 -- > arch/powerpc/include/asm/reg_8xx.h | 2 ++ > 2 files changed, 2 insertions(+), 2 deletions(-) This breaks the ppc64e build unfortunately, presumably due to it changing the ordering of header inclusion. In file included from ../arch/powerpc/include/asm/percpu.h:13, from ../arch/powerpc/include/asm/mmu.h:137, from ../arch/powerpc/include/asm/reg_8xx.h:8, from ../arch/powerpc/include/asm/reg.h:28, from ../arch/powerpc/include/asm/processor.h:9, from ../include/linux/processor.h:6, from ../arch/powerpc/include/asm/delay.h:6, from ../include/linux/delay.h:26, from ../lib/nmi_backtrace.c:17: ../arch/powerpc/include/asm/paca.h:147:23: error: field 'tcd' has incomplete type struct tlb_core_data tcd; ^~~ cheers
diff --git a/arch/powerpc/include/asm/reg.h b/arch/powerpc/include/asm/reg.h index 10caa145f98b..b17ee25df226 100644 --- a/arch/powerpc/include/asm/reg.h +++ b/arch/powerpc/include/asm/reg.h @@ -25,9 +25,7 @@ #include <asm/reg_fsl_emb.h> #endif -#ifdef CONFIG_PPC_8xx #include <asm/reg_8xx.h> -#endif /* CONFIG_PPC_8xx */ #define MSR_SF_LG 63 /* Enable 64 bit mode */ #define MSR_ISF_LG 61 /* Interrupt 64b mode valid on 630 */ diff --git a/arch/powerpc/include/asm/reg_8xx.h b/arch/powerpc/include/asm/reg_8xx.h index 7192eece6c3e..abc663c0f1db 100644 --- a/arch/powerpc/include/asm/reg_8xx.h +++ b/arch/powerpc/include/asm/reg_8xx.h @@ -38,7 +38,9 @@ #define SPRN_CMPF 153 #define SPRN_LCTRL1 156 #define SPRN_LCTRL2 157 +#ifdef CONFIG_PPC_8xx #define SPRN_ICTRL 158 +#endif #define SPRN_BAR 159 /* Commands. Only the first few are available to the instruction cache.
Most 8xx registers have specific names, so just include reg_8xx.h all the time in reg.h in order to have them defined even when CONFIG_PPC_8xx is not selected. This will avoid the need for #ifdefs in C code. Guard SPRN_ICTRL in an #ifdef CONFIG_PPC_8xx as this register has same name but different meaning and different spr number as another register in the mpc7450. Signed-off-by: Christophe Leroy <christophe.leroy@c-s.fr> --- v2: no change --- arch/powerpc/include/asm/reg.h | 2 -- arch/powerpc/include/asm/reg_8xx.h | 2 ++ 2 files changed, 2 insertions(+), 2 deletions(-)