* [PATCH v3] powerpc: fix compile error on 64K pages on 40x, 44x
@ 2017-10-01 14:33 Christian Lamparter
2017-10-03 8:46 ` Christophe LEROY
2017-10-05 4:22 ` [v3] " Michael Ellerman
0 siblings, 2 replies; 3+ messages in thread
From: Christian Lamparter @ 2017-10-01 14:33 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 removing the pte_frag
initialization in setup-common.c.
This is possible, because the compiler will do the
initialization, since the mm_context is a sub struct of
init_mm. init_mm is declared in mm_types.h as external linkage.
according to C99 6.2.4.3:
"An object whose identifier is declared with external linkage
[...] has static storage duration."
C99 defines in 6.7.8.10 that: "
If an object that has static storage duration is not
initialized explicitly, then:
- if it has pointer type, it is initialized to a null pointer
[...]
"
Signed-off-by: Christian Lamparter <chunkeey@gmail.com>
---
arch/powerpc/kernel/setup-common.c | 3 ---
1 file changed, 3 deletions(-)
diff --git a/arch/powerpc/kernel/setup-common.c b/arch/powerpc/kernel/setup-common.c
index 0ac741fae90e..2e3bc16d02b2 100644
--- a/arch/powerpc/kernel/setup-common.c
+++ b/arch/powerpc/kernel/setup-common.c
@@ -904,9 +904,6 @@ void __init setup_arch(char **cmdline_p)
#endif
#endif
-#ifdef CONFIG_PPC_64K_PAGES
- init_mm.context.pte_frag = NULL;
-#endif
#ifdef CONFIG_SPAPR_TCE_IOMMU
mm_iommu_init(&init_mm);
#endif
--
2.14.2
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH v3] powerpc: fix compile error on 64K pages on 40x, 44x
2017-10-01 14:33 [PATCH v3] powerpc: fix compile error on 64K pages on 40x, 44x Christian Lamparter
@ 2017-10-03 8:46 ` Christophe LEROY
2017-10-05 4:22 ` [v3] " Michael Ellerman
1 sibling, 0 replies; 3+ messages in thread
From: Christophe LEROY @ 2017-10-03 8:46 UTC (permalink / raw)
To: Christian Lamparter, linuxppc-dev; +Cc: Paul Mackerras
Le 01/10/2017 à 16:33, Christian Lamparter a écrit :
> 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 removing the pte_frag
> initialization in setup-common.c.
>
> This is possible, because the compiler will do the
> initialization, since the mm_context is a sub struct of
> init_mm. init_mm is declared in mm_types.h as external linkage.
> according to C99 6.2.4.3:
> "An object whose identifier is declared with external linkage
> [...] has static storage duration."
>
> C99 defines in 6.7.8.10 that: "
> If an object that has static storage duration is not
> initialized explicitly, then:
> - if it has pointer type, it is initialized to a null pointer
> [...]
> "
>
> Signed-off-by: Christian Lamparter <chunkeey@gmail.com>
Reviewed-by: Christophe Leroy <christophe.leroy@c-s.fr>
> ---
> arch/powerpc/kernel/setup-common.c | 3 ---
> 1 file changed, 3 deletions(-)
>
> diff --git a/arch/powerpc/kernel/setup-common.c b/arch/powerpc/kernel/setup-common.c
> index 0ac741fae90e..2e3bc16d02b2 100644
> --- a/arch/powerpc/kernel/setup-common.c
> +++ b/arch/powerpc/kernel/setup-common.c
> @@ -904,9 +904,6 @@ void __init setup_arch(char **cmdline_p)
> #endif
> #endif
>
> -#ifdef CONFIG_PPC_64K_PAGES
> - init_mm.context.pte_frag = NULL;
> -#endif
> #ifdef CONFIG_SPAPR_TCE_IOMMU
> mm_iommu_init(&init_mm);
> #endif
>
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [v3] powerpc: fix compile error on 64K pages on 40x, 44x
2017-10-01 14:33 [PATCH v3] powerpc: fix compile error on 64K pages on 40x, 44x Christian Lamparter
2017-10-03 8:46 ` Christophe LEROY
@ 2017-10-05 4:22 ` Michael Ellerman
1 sibling, 0 replies; 3+ messages in thread
From: Michael Ellerman @ 2017-10-05 4:22 UTC (permalink / raw)
To: Christian Lamparter, linuxppc-dev; +Cc: Paul Mackerras
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain, Size: 1128 bytes --]
On Sun, 2017-10-01 at 14:33:03 UTC, Christian Lamparter wrote:
> 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 removing the pte_frag
> initialization in setup-common.c.
>
> This is possible, because the compiler will do the
> initialization, since the mm_context is a sub struct of
> init_mm. init_mm is declared in mm_types.h as external linkage.
> according to C99 6.2.4.3:
> "An object whose identifier is declared with external linkage
> [...] has static storage duration."
>
> C99 defines in 6.7.8.10 that: "
> If an object that has static storage duration is not
> initialized explicitly, then:
> - if it has pointer type, it is initialized to a null pointer
> [...]
> "
>
> Signed-off-by: Christian Lamparter <chunkeey@gmail.com>
> Reviewed-by: Christophe Leroy <christophe.leroy@c-s.fr>
Applied to powerpc fixes, thanks.
https://git.kernel.org/powerpc/c/070e004912fed099263408bf2ff1bb
cheers
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2017-10-05 4:22 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-10-01 14:33 [PATCH v3] powerpc: fix compile error on 64K pages on 40x, 44x Christian Lamparter
2017-10-03 8:46 ` Christophe LEROY
2017-10-05 4:22 ` [v3] " Michael Ellerman
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.