]> git.proxmox.com Git - mirror_ubuntu-bionic-kernel.git/commit
selftests/powerpc: Skip the subpage_prot tests if the syscall is unavailable
authorMichael Ellerman <mpe@ellerman.id.au>
Mon, 26 Feb 2018 04:22:22 +0000 (15:22 +1100)
committerKleber Sacilotto de Souza <kleber.souza@canonical.com>
Mon, 27 Aug 2018 14:40:05 +0000 (16:40 +0200)
commitec2c32f596e546bc6053f974e6b9eb760db24050
tree55af11d5905e11a089fd465735fa7280b27c4fc0
parent680600901b31d116953f1ea0ec75484b1b02a5f4
selftests/powerpc: Skip the subpage_prot tests if the syscall is unavailable

BugLink: http://bugs.launchpad.net/bugs/1786352
[ Upstream commit cd4a6f3ab4d80cb919d15897eb3cbc85c2009d4b ]

The subpage_prot syscall is only functional when the system is using
the Hash MMU. Since commit 5b2b80714796 ("powerpc/mm: Invalidate
subpage_prot() system call on radix platforms") it returns ENOENT when
the Radix MMU is active. Currently this just makes the test fail.

Additionally the syscall is not available if the kernel is built with
4K pages, or if CONFIG_PPC_SUBPAGE_PROT=n, in which case it returns
ENOSYS because the syscall is missing entirely.

So check explicitly for ENOENT and ENOSYS and skip if we see either of
those.

Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Signed-off-by: Sasha Levin <alexander.levin@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Kamal Mostafa <kamal@canonical.com>
Signed-off-by: Khalid Elmously <khalid.elmously@canonical.com>
tools/testing/selftests/powerpc/mm/subpage_prot.c