diff mbox

[20/41] powerpc/mm/hash64: Don't test for machine type to detect HEA special case

Message ID 1467695057-12431-21-git-send-email-benh@kernel.crashing.org (mailing list archive)
State Accepted
Headers show

Commit Message

Benjamin Herrenschmidt July 5, 2016, 5:03 a.m. UTC
Instead, check for FW_FEATURE_SPLPAR. This should be roughtly equivalent
as all pseries machiens that can have an HEA also support SPLPAR and
no other machine type does.

Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
---
 arch/powerpc/mm/hash_utils_64.c | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

Comments

Michael Ellerman July 21, 2016, 11:09 a.m. UTC | #1
On Tue, 2016-05-07 at 05:03:56 UTC, Benjamin Herrenschmidt wrote:
> Instead, check for FW_FEATURE_SPLPAR. This should be roughtly equivalent
> as all pseries machiens that can have an HEA also support SPLPAR and
> no other machine type does.
> 
> Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>

Applied to powerpc next, thanks.

https://git.kernel.org/powerpc/c/2b4e3ad8f5790cae6e0356c5fc

cheers
diff mbox

Patch

diff --git a/arch/powerpc/mm/hash_utils_64.c b/arch/powerpc/mm/hash_utils_64.c
index a261e44..8ccb0b1 100644
--- a/arch/powerpc/mm/hash_utils_64.c
+++ b/arch/powerpc/mm/hash_utils_64.c
@@ -508,7 +508,8 @@  static bool might_have_hea(void)
 	 * we will never see an HEA ethernet device.
 	 */
 #ifdef CONFIG_IBMEBUS
-	return !cpu_has_feature(CPU_FTR_ARCH_207S);
+	return !cpu_has_feature(CPU_FTR_ARCH_207S) &&
+		!firmware_has_feature(FW_FEATURE_SPLPAR);
 #else
 	return false;
 #endif
@@ -574,7 +575,7 @@  found:
 			 * would stop us accessing the HEA ethernet. So if we
 			 * have the chance of ever seeing one, stay at 4k.
 			 */
-			if (!might_have_hea() || !machine_is(pseries))
+			if (!might_have_hea())
 				mmu_io_psize = MMU_PAGE_64K;
 		} else
 			mmu_ci_restrictions = 1;