Skip to content

Commit

Permalink
powerpc/64e: Fix circular dependency with CONFIG_SMP disabled
Browse files Browse the repository at this point in the history
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]>
  • Loading branch information
chleroy committed Aug 22, 2023
1 parent 1aee8f2 commit 5e0f97d
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 5 deletions.
5 changes: 0 additions & 5 deletions arch/powerpc/include/asm/mmu.h
Original file line number Diff line number Diff line change
Expand Up @@ -144,11 +144,6 @@

typedef pte_t *pgtable_t;

#ifdef CONFIG_PPC_E500
#include <asm/percpu.h>
DECLARE_PER_CPU(int, next_tlbcam_idx);
#endif

enum {
MMU_FTRS_POSSIBLE =
#if defined(CONFIG_PPC_BOOK3S_604)
Expand Down
3 changes: 3 additions & 0 deletions arch/powerpc/include/asm/nohash/mmu-e500.h
Original file line number Diff line number Diff line change
Expand Up @@ -319,6 +319,9 @@ extern int book3e_htw_mode;

#endif

#include <asm/percpu.h>
DECLARE_PER_CPU(int, next_tlbcam_idx);

#endif /* !__ASSEMBLY__ */

#endif /* _ASM_POWERPC_MMU_BOOK3E_H_ */

0 comments on commit 5e0f97d

Please sign in to comment.