Skip to content

Commit

Permalink
powerpc: Don't include lppaca.h in paca.h
Browse files Browse the repository at this point in the history
[ Upstream commit 1aa0006 ]

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
Stable-dep-of: eac030b ("powerpc/pseries: Rework lppaca_shared_proc() to avoid DEBUG_PREEMPT")
Signed-off-by: Sasha Levin <sashal@kernel.org>
  • Loading branch information
mpe authored and gregkh committed Sep 13, 2023
1 parent 18d5154 commit a5b6b00
Show file tree
Hide file tree
Showing 7 changed files with 10 additions and 5 deletions.
4 changes: 4 additions & 0 deletions arch/powerpc/include/asm/lppaca.h
Expand Up @@ -134,6 +134,10 @@ static inline bool lppaca_shared_proc(struct lppaca *l)
return !!(l->__old_status & LPPACA_OLD_SHARED_PROC);
}

#ifdef CONFIG_PPC_PSERIES
#define get_lppaca() (get_paca()->lppaca_ptr)
#endif

/*
* SLB shadow buffer structure as defined in the PAPR. The save_area
* contains adjacent ESID and VSID pairs for each shadowed SLB. The
Expand Down
6 changes: 1 addition & 5 deletions arch/powerpc/include/asm/paca.h
Expand Up @@ -15,7 +15,6 @@
#include <linux/cache.h>
#include <linux/string.h>
#include <asm/types.h>
#include <asm/lppaca.h>
#include <asm/mmu.h>
#include <asm/page.h>
#ifdef CONFIG_PPC_BOOK3E_64
Expand Down Expand Up @@ -47,14 +46,11 @@ extern unsigned int debug_smp_processor_id(void); /* from linux/smp.h */
#define get_paca() local_paca
#endif

#ifdef CONFIG_PPC_PSERIES
#define get_lppaca() (get_paca()->lppaca_ptr)
#endif

#define get_slb_shadow() (get_paca()->slb_shadow_ptr)

struct task_struct;
struct rtas_args;
struct lppaca;

/*
* Defines the layout of the paca.
Expand Down
1 change: 1 addition & 0 deletions arch/powerpc/include/asm/paravirt.h
Expand Up @@ -6,6 +6,7 @@
#include <asm/smp.h>
#ifdef CONFIG_PPC64
#include <asm/paca.h>
#include <asm/lppaca.h>
#include <asm/hvcall.h>
#endif

Expand Down
1 change: 1 addition & 0 deletions arch/powerpc/include/asm/plpar_wrappers.h
Expand Up @@ -9,6 +9,7 @@

#include <asm/hvcall.h>
#include <asm/paca.h>
#include <asm/lppaca.h>
#include <asm/page.h>

static inline long poll_pending(void)
Expand Down
1 change: 1 addition & 0 deletions arch/powerpc/kvm/book3s_hv_ras.c
Expand Up @@ -9,6 +9,7 @@
#include <linux/kvm.h>
#include <linux/kvm_host.h>
#include <linux/kernel.h>
#include <asm/lppaca.h>
#include <asm/opal.h>
#include <asm/mce.h>
#include <asm/machdep.h>
Expand Down
1 change: 1 addition & 0 deletions arch/powerpc/mm/book3s64/slb.c
Expand Up @@ -13,6 +13,7 @@
#include <asm/mmu.h>
#include <asm/mmu_context.h>
#include <asm/paca.h>
#include <asm/lppaca.h>
#include <asm/ppc-opcode.h>
#include <asm/cputable.h>
#include <asm/cacheflush.h>
Expand Down
1 change: 1 addition & 0 deletions arch/powerpc/xmon/xmon.c
Expand Up @@ -58,6 +58,7 @@
#ifdef CONFIG_PPC64
#include <asm/hvcall.h>
#include <asm/paca.h>
#include <asm/lppaca.h>
#endif

#include "nonstdio.h"
Expand Down

0 comments on commit a5b6b00

Please sign in to comment.