Skip to content

Commit 1aa0006

Browse files
committed
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 <[email protected]> Link: https://msgid.link/[email protected]
1 parent 9a6c05f commit 1aa0006

File tree

7 files changed

+10
-5
lines changed

7 files changed

+10
-5
lines changed

arch/powerpc/include/asm/lppaca.h

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -112,6 +112,10 @@ static inline bool lppaca_shared_proc(struct lppaca *l)
112112
return !!(l->__old_status & LPPACA_OLD_SHARED_PROC);
113113
}
114114

115+
#ifdef CONFIG_PPC_PSERIES
116+
#define get_lppaca() (get_paca()->lppaca_ptr)
117+
#endif
118+
115119
/*
116120
* SLB shadow buffer structure as defined in the PAPR. The save_area
117121
* contains adjacent ESID and VSID pairs for each shadowed SLB. The

arch/powerpc/include/asm/paca.h

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,6 @@
1515
#include <linux/cache.h>
1616
#include <linux/string.h>
1717
#include <asm/types.h>
18-
#include <asm/lppaca.h>
1918
#include <asm/mmu.h>
2019
#include <asm/page.h>
2120
#ifdef CONFIG_PPC_BOOK3E_64
@@ -47,14 +46,11 @@ extern unsigned int debug_smp_processor_id(void); /* from linux/smp.h */
4746
#define get_paca() local_paca
4847
#endif
4948

50-
#ifdef CONFIG_PPC_PSERIES
51-
#define get_lppaca() (get_paca()->lppaca_ptr)
52-
#endif
53-
5449
#define get_slb_shadow() (get_paca()->slb_shadow_ptr)
5550

5651
struct task_struct;
5752
struct rtas_args;
53+
struct lppaca;
5854

5955
/*
6056
* Defines the layout of the paca.

arch/powerpc/include/asm/paravirt.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
#include <asm/smp.h>
77
#ifdef CONFIG_PPC64
88
#include <asm/paca.h>
9+
#include <asm/lppaca.h>
910
#include <asm/hvcall.h>
1011
#endif
1112

arch/powerpc/include/asm/plpar_wrappers.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99

1010
#include <asm/hvcall.h>
1111
#include <asm/paca.h>
12+
#include <asm/lppaca.h>
1213
#include <asm/page.h>
1314

1415
static inline long poll_pending(void)

arch/powerpc/kvm/book3s_hv_ras.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
#include <linux/kvm.h>
1010
#include <linux/kvm_host.h>
1111
#include <linux/kernel.h>
12+
#include <asm/lppaca.h>
1213
#include <asm/opal.h>
1314
#include <asm/mce.h>
1415
#include <asm/machdep.h>

arch/powerpc/mm/book3s64/slb.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313
#include <asm/mmu.h>
1414
#include <asm/mmu_context.h>
1515
#include <asm/paca.h>
16+
#include <asm/lppaca.h>
1617
#include <asm/ppc-opcode.h>
1718
#include <asm/cputable.h>
1819
#include <asm/cacheflush.h>

arch/powerpc/xmon/xmon.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,7 @@
5858
#ifdef CONFIG_PPC64
5959
#include <asm/hvcall.h>
6060
#include <asm/paca.h>
61+
#include <asm/lppaca.h>
6162
#endif
6263

6364
#include "nonstdio.h"

0 commit comments

Comments
 (0)