linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
From: Michael Ellerman <mpe@ellerman.id.au>
To: <linuxppc-dev@ozlabs.org>
Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>,
	Stephen Rothwell <sfr@canb.auug.org.au>
Subject: [PATCH 2/3] powerpc/mm: Rename hpte_init_lpar() & put fallback in a header
Date: Mon, 25 Jul 2016 12:57:50 +1000	[thread overview]
Message-ID: <1469415471-2476-2-git-send-email-mpe@ellerman.id.au> (raw)
In-Reply-To: <1469415471-2476-1-git-send-email-mpe@ellerman.id.au>

hpte_init_lpar() is part of the pseries platform, so name it as such.
Provide the fallback implementation in a header, rather than using a
weak function.

Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
---
 arch/powerpc/include/asm/book3s/64/mmu-hash.h | 10 +++++++++-
 arch/powerpc/mm/hash_utils_64.c               |  7 +------
 arch/powerpc/platforms/pseries/lpar.c         |  2 +-
 3 files changed, 11 insertions(+), 8 deletions(-)

diff --git a/arch/powerpc/include/asm/book3s/64/mmu-hash.h b/arch/powerpc/include/asm/book3s/64/mmu-hash.h
index 45dfa2e4f0d1..23cff86aa779 100644
--- a/arch/powerpc/include/asm/book3s/64/mmu-hash.h
+++ b/arch/powerpc/include/asm/book3s/64/mmu-hash.h
@@ -400,7 +400,15 @@ static inline void hpte_init_native(void)
 }
 #endif
 
-extern void hpte_init_lpar(void);
+#ifdef CONFIG_PPC_PSERIES
+void hpte_init_pseries(void);
+#else
+static inline void hpte_init_pseries(void)
+{
+	panic("hpte_init_pseries: No LPAR hash table support compiled in!\n");
+}
+#endif
+
 extern void hpte_init_beat(void);
 extern void hpte_init_beat_v3(void);
 
diff --git a/arch/powerpc/mm/hash_utils_64.c b/arch/powerpc/mm/hash_utils_64.c
index 341632471b9d..92043204363c 100644
--- a/arch/powerpc/mm/hash_utils_64.c
+++ b/arch/powerpc/mm/hash_utils_64.c
@@ -885,11 +885,6 @@ static void __init htab_initialize(void)
 #undef KB
 #undef MB
 
-void __init __weak hpte_init_lpar(void)
-{
-	panic("FW_FEATURE_LPAR set but no LPAR support compiled\n");
-}
-
 void __init hash__early_init_mmu(void)
 {
 	/*
@@ -930,7 +925,7 @@ void __init hash__early_init_mmu(void)
 	if (firmware_has_feature(FW_FEATURE_PS3_LV1))
 		ps3_early_mm_init();
 	else if (firmware_has_feature(FW_FEATURE_LPAR))
-		hpte_init_lpar();
+		hpte_init_pseries();
 	else
 		hpte_init_native();
 
diff --git a/arch/powerpc/platforms/pseries/lpar.c b/arch/powerpc/platforms/pseries/lpar.c
index 0e91388d0af9..86707e67843f 100644
--- a/arch/powerpc/platforms/pseries/lpar.c
+++ b/arch/powerpc/platforms/pseries/lpar.c
@@ -589,7 +589,7 @@ static int __init disable_bulk_remove(char *str)
 
 __setup("bulk_remove=", disable_bulk_remove);
 
-void __init hpte_init_lpar(void)
+void __init hpte_init_pseries(void)
 {
 	mmu_hash_ops.hpte_invalidate	 = pSeries_lpar_hpte_invalidate;
 	mmu_hash_ops.hpte_updatepp	 = pSeries_lpar_hpte_updatepp;
-- 
2.7.4

  reply	other threads:[~2016-07-25  2:57 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-07-25  2:57 [PATCH 1/3] powerpc/mm: Fix build break due when PPC_NATIVE=n Michael Ellerman
2016-07-25  2:57 ` Michael Ellerman [this message]
2016-07-25  4:13   ` [PATCH 2/3] powerpc/mm: Rename hpte_init_lpar() & put fallback in a header Stephen Rothwell
2016-07-25  4:42     ` Benjamin Herrenschmidt
2016-07-25  5:33     ` Michael Ellerman
2016-07-25  9:49       ` Benjamin Herrenschmidt
2016-07-25 10:36         ` Michael Ellerman
2016-07-25 12:11           ` Benjamin Herrenschmidt
2016-07-27  0:27             ` Michael Ellerman
2016-07-25  2:57 ` [PATCH 3/3] powerpc/mm: Drop unused externs for hpte_init_beat[_v3]() Michael Ellerman
2016-07-27 14:32   ` [3/3] " Michael Ellerman
2016-07-25  4:03 ` [PATCH 1/3] powerpc/mm: Fix build break due when PPC_NATIVE=n Stephen Rothwell
2016-07-25  6:17   ` Michael Ellerman
2016-07-25 10:39     ` Michael Ellerman

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1469415471-2476-2-git-send-email-mpe@ellerman.id.au \
    --to=mpe@ellerman.id.au \
    --cc=benh@kernel.crashing.org \
    --cc=linuxppc-dev@ozlabs.org \
    --cc=sfr@canb.auug.org.au \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).