linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] powerpc: fix compile error on 64K pages on 40x, 44x
@ 2017-09-26 19:03 Christian Lamparter
  2017-09-26 19:25 ` Christophe LEROY
  0 siblings, 1 reply; 3+ messages in thread
From: Christian Lamparter @ 2017-09-26 19:03 UTC (permalink / raw)
  To: linuxppc-dev; +Cc: Benjamin Herrenschmidt, Paul Mackerras, Michael Ellerman

The mmu context on the 40x, 44x does not define pte_frag
entry. This causes gcc abort the compilation due to:

setup-common.c: In function ‘setup_arch’:
setup-common.c:908: error: ‘mm_context_t’ has no ‘pte_frag’

This patch fixes the issue by adding additional guard
conditions, that limit the initialization to just
platforms that define the pte_frag variable in the
mmu context.

Signed-off-by: Christian Lamparter <chunkeey@googlemail.com>
---
 arch/powerpc/kernel/setup-common.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/arch/powerpc/kernel/setup-common.c b/arch/powerpc/kernel/setup-common.c
index 0ac741fae90e..436d42a7d761 100644
--- a/arch/powerpc/kernel/setup-common.c
+++ b/arch/powerpc/kernel/setup-common.c
@@ -904,7 +904,9 @@ void __init setup_arch(char **cmdline_p)
 #endif
 #endif
 
-#ifdef CONFIG_PPC_64K_PAGES
+#if defined(CONFIG_PPC_64K_PAGES) && \
+    defined(CONFIG_PPC_BOOK3S_64) && \
+    defined(CONFIG_PPC_BOOK3E_MMU)
 	init_mm.context.pte_frag = NULL;
 #endif
 #ifdef CONFIG_SPAPR_TCE_IOMMU
-- 
2.14.2

^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2017-09-26 20:11 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-09-26 19:03 [PATCH] powerpc: fix compile error on 64K pages on 40x, 44x Christian Lamparter
2017-09-26 19:25 ` Christophe LEROY
2017-09-26 20:11   ` Christian Lamparter

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).