Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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

+3 -1
+3 -1
tools/testing/selftests/powerpc/utils.c
··· 318 318 319 319 rc = 0; 320 320 while (fgets(line, sizeof(line), f) != NULL) { 321 - if (strcmp(line, "MMU : Hash\n") == 0) { 321 + if (!strcmp(line, "MMU : Hash\n") || 322 + !strcmp(line, "platform : Cell\n") || 323 + !strcmp(line, "platform : PowerMac\n")) { 322 324 *using_hash = true; 323 325 goto out; 324 326 }