Skip to content

Commit 0e2a34c

Browse files
chleroympe
authored andcommitted
powerpc/64e: Fix circular dependency with CONFIG_SMP disabled
asm/percpu.h includes asm/paca.h which needs struct tlb_core_data which is defined in mmu-e500.h asm/percpu.h is included from asm/mmu.h in a #ifdef CONFIG_E500 before the inclusion of mmu-e500.h To fix that, move the inclusion of asm/percpu.h into mmu-e500.h after the definition of struct tlb_core_data Reported-by: kernel test robot <[email protected]> Closes: https://lore.kernel.org/oe-kbuild-all/[email protected]/ Closes: https://lore.kernel.org/oe-kbuild-all/[email protected]/ Closes: https://lore.kernel.org/oe-kbuild-all/[email protected]/ Fixes: 3a24ea0 ("powerpc/kuap: Use ASM feature fixups instead of static branches") Signed-off-by: Christophe Leroy <[email protected]> Signed-off-by: Michael Ellerman <[email protected]> Link: https://msgid.link/5e0f97d5cbcd05238b56b4424ab096468296824d.1692684461.git.christophe.leroy@csgroup.eu
1 parent 429356f commit 0e2a34c

File tree

2 files changed

+3
-5
lines changed

2 files changed

+3
-5
lines changed

arch/powerpc/include/asm/mmu.h

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -144,11 +144,6 @@
144144

145145
typedef pte_t *pgtable_t;
146146

147-
#ifdef CONFIG_PPC_E500
148-
#include <asm/percpu.h>
149-
DECLARE_PER_CPU(int, next_tlbcam_idx);
150-
#endif
151-
152147
enum {
153148
MMU_FTRS_POSSIBLE =
154149
#if defined(CONFIG_PPC_BOOK3S_604)

arch/powerpc/include/asm/nohash/mmu-e500.h

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -319,6 +319,9 @@ extern int book3e_htw_mode;
319319

320320
#endif
321321

322+
#include <asm/percpu.h>
323+
DECLARE_PER_CPU(int, next_tlbcam_idx);
324+
322325
#endif /* !__ASSEMBLY__ */
323326

324327
#endif /* _ASM_POWERPC_MMU_BOOK3E_H_ */

0 commit comments

Comments
 (0)