The patch titled Subject: userfaultfd: selftest: only warn if __NR_userfaultfd is undefined has been added to the -mm tree. Its filename is userfaultfd-selftest-only-warn-if-__nr_userfaultfd-is-undefined.patch This patch should soon appear at http://ozlabs.org/~akpm/mmots/broken-out/userfaultfd-selftest-only-warn-if-__nr_userfaultfd-is-undefined.patch and later at http://ozlabs.org/~akpm/mmotm/broken-out/userfaultfd-selftest-only-warn-if-__nr_userfaultfd-is-undefined.patch Before you just go and hit "reply", please: a) Consider who else should be cc'ed b) Prefer to cc a suitable mailing list as well c) Ideally: find the original patch on the mailing list and do a reply-to-all to that, adding suitable additional cc's *** Remember to use Documentation/SubmitChecklist when testing your code *** The -mm tree is included into linux-next and is updated there every 3-4 working days ------------------------------------------------------ From: Michael Ellerman <mpe@xxxxxxxxxxxxxx> Subject: userfaultfd: selftest: only warn if __NR_userfaultfd is undefined If __NR_userfaultfd is not yet defined by the arch, warn but still build and run the userfaultfd selftest successfully. Signed-off-by: Michael Ellerman <mpe@xxxxxxxxxxxxxx> Signed-off-by: Andrea Arcangeli <aarcange@xxxxxxxxxx> Cc: Dr. David Alan Gilbert <dgilbert@xxxxxxxxxx> Cc: Shuah Khan <shuahkh@xxxxxxxxxxxxxxx> Cc: Thierry Reding <treding@xxxxxxxxxx> Signed-off-by: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx> --- tools/testing/selftests/vm/userfaultfd.c | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) diff -puN tools/testing/selftests/vm/userfaultfd.c~userfaultfd-selftest-only-warn-if-__nr_userfaultfd-is-undefined tools/testing/selftests/vm/userfaultfd.c --- a/tools/testing/selftests/vm/userfaultfd.c~userfaultfd-selftest-only-warn-if-__nr_userfaultfd-is-undefined +++ a/tools/testing/selftests/vm/userfaultfd.c @@ -66,9 +66,7 @@ #include <pthread.h> #include <linux/userfaultfd.h> -#ifndef __NR_userfaultfd -#error "missing __NR_userfaultfd definition" -#endif +#ifdef __NR_userfaultfd static unsigned long nr_cpus, nr_pages, nr_pages_per_cpu, page_size; @@ -631,3 +629,15 @@ int main(int argc, char **argv) nr_pages, nr_pages_per_cpu); return userfaultfd_stress(); } + +#else /* __NR_userfaultfd */ + +#warning "missing __NR_userfaultfd definition" + +int main(void) +{ + printf("skip: Skipping userfaultfd test (missing __NR_userfaultfd)\n"); + return 0; +} + +#endif /* __NR_userfaultfd */ _ Patches currently in -mm which might be from mpe@xxxxxxxxxxxxxx are userfaultfd-selftest-only-warn-if-__nr_userfaultfd-is-undefined.patch -- To unsubscribe from this list: send the line "unsubscribe mm-commits" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html