Skip to content

Commit

Permalink
selftests/powerpc: Make using_hash_mmu() work on Cell & PowerMac
Browse files Browse the repository at this point in the history
[ Upstream commit 34c1033 ]

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
Signed-off-by: Sasha Levin <sashal@kernel.org>
  • Loading branch information
mpe authored and gregkh committed Nov 5, 2020
1 parent aa718a7 commit 828a184
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion tools/testing/selftests/powerpc/utils.c
Expand Up @@ -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;
}
Expand Down

0 comments on commit 828a184

Please sign in to comment.