aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Ellerman <mpe@ellerman.id.au>2020-08-19 11:57:19 +1000
committerMichael Ellerman <mpe@ellerman.id.au>2020-09-08 22:23:51 +1000
commit34c103342be3f9397e656da7c5cc86e97b91f514 (patch)
tree55ac6a565d2afc4672eb4829d7b765eb058f736b
parentselftests/powerpc: Run tm-tmspr test for longer (diff)
downloadlinux-dev-34c103342be3f9397e656da7c5cc86e97b91f514.tar.xz
linux-dev-34c103342be3f9397e656da7c5cc86e97b91f514.zip
selftests/powerpc: Make using_hash_mmu() work on Cell & PowerMac
These platforms don't show the MMU in /proc/cpuinfo, but they always use hash, so teach using_hash_mmu() that. Signed-off-by: Michael Ellerman <mpe@ellerman.id.au> Link: https://lore.kernel.org/r/20200819015727.1977134-1-mpe@ellerman.id.au
-rw-r--r--tools/testing/selftests/powerpc/utils.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/tools/testing/selftests/powerpc/utils.c b/tools/testing/selftests/powerpc/utils.c
index 18b6a773d5c7..638ffacc90aa 100644
--- a/tools/testing/selftests/powerpc/utils.c
+++ b/tools/testing/selftests/powerpc/utils.c
@@ -318,7 +318,9 @@ int using_hash_mmu(bool *using_hash)
rc = 0;
while (fgets(line, sizeof(line), f) != NULL) {
- if (strcmp(line, "MMU : Hash\n") == 0) {
+ if (!strcmp(line, "MMU : Hash\n") ||
+ !strcmp(line, "platform : Cell\n") ||
+ !strcmp(line, "platform : PowerMac\n")) {
*using_hash = true;
goto out;
}