* [PATCH v2] powerpc/47x: Remove early_init_mmu_47x() to fix no previous prototype
@ 2023-08-17 14:26 Christophe Leroy
2023-08-23 11:55 ` Michael Ellerman
0 siblings, 1 reply; 2+ messages in thread
From: Christophe Leroy @ 2023-08-17 14:26 UTC (permalink / raw)
To: Michael Ellerman, Nicholas Piggin
Cc: Arnd Bergmann, linuxppc-dev, linux-kernel
4xx/iss476-smp_defconfig leads to:
CC arch/powerpc/mm/nohash/tlb.o
arch/powerpc/mm/nohash/tlb.c:322:13: error: no previous prototype for 'early_init_mmu_47x' [-Werror=missing-prototypes]
322 | void __init early_init_mmu_47x(void)
| ^~~~~~~~~~~~~~~~~~
early_init_mmu_47x() is used only at one place and only locally.
Fold it into its only caller and remove it.
Signed-off-by: Christophe Leroy <christophe.leroy@csgroup.eu>
Cc: Arnd Bergmann <arnd@arndb.de>
---
v2: Remove prototype mmu_init_secondary() belonging to another patch
---
arch/powerpc/mm/nohash/tlb.c | 19 +++++--------------
1 file changed, 5 insertions(+), 14 deletions(-)
diff --git a/arch/powerpc/mm/nohash/tlb.c b/arch/powerpc/mm/nohash/tlb.c
index a903b308acc5..5ffa0af4328a 100644
--- a/arch/powerpc/mm/nohash/tlb.c
+++ b/arch/powerpc/mm/nohash/tlb.c
@@ -318,17 +318,6 @@ EXPORT_SYMBOL(flush_tlb_page);
#endif /* CONFIG_SMP */
-#ifdef CONFIG_PPC_47x
-void __init early_init_mmu_47x(void)
-{
-#ifdef CONFIG_SMP
- unsigned long root = of_get_flat_dt_root();
- if (of_get_flat_dt_prop(root, "cooperative-partition", NULL))
- mmu_clear_feature(MMU_FTR_USE_TLBIVAX_BCAST);
-#endif /* CONFIG_SMP */
-}
-#endif /* CONFIG_PPC_47x */
-
/*
* Flush kernel TLB entries in the given range
*/
@@ -746,8 +735,10 @@ void setup_initial_memory_limit(phys_addr_t first_memblock_base,
#else /* ! CONFIG_PPC64 */
void __init early_init_mmu(void)
{
-#ifdef CONFIG_PPC_47x
- early_init_mmu_47x();
-#endif
+ unsigned long root = of_get_flat_dt_root();
+
+ if (IS_ENABLED(CONFIG_PPC_47x) && IS_ENABLED(CONFIG_SMP) &&
+ of_get_flat_dt_prop(root, "cooperative-partition", NULL))
+ mmu_clear_feature(MMU_FTR_USE_TLBIVAX_BCAST);
}
#endif /* CONFIG_PPC64 */
--
2.41.0
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH v2] powerpc/47x: Remove early_init_mmu_47x() to fix no previous prototype
2023-08-17 14:26 [PATCH v2] powerpc/47x: Remove early_init_mmu_47x() to fix no previous prototype Christophe Leroy
@ 2023-08-23 11:55 ` Michael Ellerman
0 siblings, 0 replies; 2+ messages in thread
From: Michael Ellerman @ 2023-08-23 11:55 UTC (permalink / raw)
To: Nicholas Piggin, Christophe Leroy
Cc: linuxppc-dev, linux-kernel, Arnd Bergmann
On Thu, 17 Aug 2023 16:26:44 +0200, Christophe Leroy wrote:
> 4xx/iss476-smp_defconfig leads to:
>
> CC arch/powerpc/mm/nohash/tlb.o
> arch/powerpc/mm/nohash/tlb.c:322:13: error: no previous prototype for 'early_init_mmu_47x' [-Werror=missing-prototypes]
> 322 | void __init early_init_mmu_47x(void)
> | ^~~~~~~~~~~~~~~~~~
>
> [...]
Applied to powerpc/next.
[1/1] powerpc/47x: Remove early_init_mmu_47x() to fix no previous prototype
https://git.kernel.org/powerpc/c/ed05c71a574235aec3418d2b5c94f24ae84cc2db
cheers
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2023-08-23 12:13 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-08-17 14:26 [PATCH v2] powerpc/47x: Remove early_init_mmu_47x() to fix no previous prototype Christophe Leroy
2023-08-23 11:55 ` Michael Ellerman
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).