Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

powerpc: Don't include lppaca.h in paca.h

By adding a forward declaration for struct lppaca we can untangle paca.h
and lppaca.h. Also move get_lppaca() into lppaca.h for consistency.

Add includes of lppaca.h to some files that need it.

Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Link: https://msgid.link/20230823055317.751786-3-mpe@ellerman.id.au

+10 -5
+4
arch/powerpc/include/asm/lppaca.h
··· 112 112 return !!(l->__old_status & LPPACA_OLD_SHARED_PROC); 113 113 } 114 114 115 + #ifdef CONFIG_PPC_PSERIES 116 + #define get_lppaca() (get_paca()->lppaca_ptr) 117 + #endif 118 + 115 119 /* 116 120 * SLB shadow buffer structure as defined in the PAPR. The save_area 117 121 * contains adjacent ESID and VSID pairs for each shadowed SLB. The
+1 -5
arch/powerpc/include/asm/paca.h
··· 15 15 #include <linux/cache.h> 16 16 #include <linux/string.h> 17 17 #include <asm/types.h> 18 - #include <asm/lppaca.h> 19 18 #include <asm/mmu.h> 20 19 #include <asm/page.h> 21 20 #ifdef CONFIG_PPC_BOOK3E_64 ··· 46 47 #define get_paca() local_paca 47 48 #endif 48 49 49 - #ifdef CONFIG_PPC_PSERIES 50 - #define get_lppaca() (get_paca()->lppaca_ptr) 51 - #endif 52 - 53 50 #define get_slb_shadow() (get_paca()->slb_shadow_ptr) 54 51 55 52 struct task_struct; 56 53 struct rtas_args; 54 + struct lppaca; 57 55 58 56 /* 59 57 * Defines the layout of the paca.
+1
arch/powerpc/include/asm/paravirt.h
··· 6 6 #include <asm/smp.h> 7 7 #ifdef CONFIG_PPC64 8 8 #include <asm/paca.h> 9 + #include <asm/lppaca.h> 9 10 #include <asm/hvcall.h> 10 11 #endif 11 12
+1
arch/powerpc/include/asm/plpar_wrappers.h
··· 9 9 10 10 #include <asm/hvcall.h> 11 11 #include <asm/paca.h> 12 + #include <asm/lppaca.h> 12 13 #include <asm/page.h> 13 14 14 15 static inline long poll_pending(void)
+1
arch/powerpc/kvm/book3s_hv_ras.c
··· 9 9 #include <linux/kvm.h> 10 10 #include <linux/kvm_host.h> 11 11 #include <linux/kernel.h> 12 + #include <asm/lppaca.h> 12 13 #include <asm/opal.h> 13 14 #include <asm/mce.h> 14 15 #include <asm/machdep.h>
+1
arch/powerpc/mm/book3s64/slb.c
··· 13 13 #include <asm/mmu.h> 14 14 #include <asm/mmu_context.h> 15 15 #include <asm/paca.h> 16 + #include <asm/lppaca.h> 16 17 #include <asm/ppc-opcode.h> 17 18 #include <asm/cputable.h> 18 19 #include <asm/cacheflush.h>
+1
arch/powerpc/xmon/xmon.c
··· 58 58 #ifdef CONFIG_PPC64 59 59 #include <asm/hvcall.h> 60 60 #include <asm/paca.h> 61 + #include <asm/lppaca.h> 61 62 #endif 62 63 63 64 #include "nonstdio.h"