powerpc: fix circular dependency in percpu.h
From: Willy Tarreau
Date: Sun Aug 02 2020 - 23:27:57 EST
After random.h started to include percpu.h (commit f227e3e), several
archs broke in circular dependencies around percpu.h.
In https://lore.kernel.org/lkml/20200802204842.36bca162@xxxxxxxxxxxxxxxx/
Stephen Rothwell reported breakage for powerpc with CONFIG_PPC_FSL_BOOK3E.
It turns out that asm/percpu.h includes asm/paca.h, which itself
includes mmu.h, which includes percpu.h when CONFIG_PPC_FSL_BOOK3E=y.
Percpu seems to include asm/paca.h only for local_paca which is used in
the __my_cpu_offset macro. Removing this include solves the issue for
this config.
Reported-by: Stephen Rothwell <sfr@xxxxxxxxxxxxxxxx>
Fixes: f227e3e ("random32: update the net random state on interrupt and activity")
Link: https://lore.kernel.org/lkml/20200802204842.36bca162@xxxxxxxxxxxxxxxx/
Cc: Linus Torvalds <torvalds@xxxxxxxxxxxxxxxxxxxx>
Cc: Michael Ellerman <mpe@xxxxxxxxxxxxxx>
Cc: Benjamin Herrenschmidt <benh@xxxxxxxxxxxxxxxxxxx>
Cc: Paul Mackerras <paulus@xxxxxxxxx>
Signed-off-by: Willy Tarreau <w@xxxxxx>
---
arch/powerpc/include/asm/percpu.h | 2 --
1 file changed, 2 deletions(-)
diff --git a/arch/powerpc/include/asm/percpu.h b/arch/powerpc/include/asm/percpu.h
index dce863a..cd3f6e5 100644
--- a/arch/powerpc/include/asm/percpu.h
+++ b/arch/powerpc/include/asm/percpu.h
@@ -10,8 +10,6 @@
#ifdef CONFIG_SMP
-#include <asm/paca.h>
-
#define __my_cpu_offset local_paca->data_offset
#endif /* CONFIG_SMP */
--
2.9.0
--+QahgC5+KEYLbs62--