Re: [PATCH v2 1/2] powerpc: permanently include 8xx registers in reg.h

From: Michael Ellerman
Date: Thu Aug 29 2019 - 02:30:30 EST


Christophe Leroy <christophe.leroy@xxxxxx> 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@xxxxxx>
>
> ---
> 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