+ lib-add-module-support-to-atomic64-tests.patch added to -mm tree

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



The patch titled
     Subject: lib: add module support to atomic64 tests
has been added to the -mm tree.  Its filename is
     lib-add-module-support-to-atomic64-tests.patch

This patch should soon appear at
    http://ozlabs.org/~akpm/mmots/broken-out/lib-add-module-support-to-atomic64-tests.patch
and later at
    http://ozlabs.org/~akpm/mmotm/broken-out/lib-add-module-support-to-atomic64-tests.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: Geert Uytterhoeven <geert@xxxxxxxxxxxxxx>
Subject: lib: add module support to atomic64 tests

Allow to compile the atomic64 test code either to a loadable module, or
builtin into the kernel.

Link: http://lkml.kernel.org/r/1483470276-10517-3-git-send-email-geert@xxxxxxxxxxxxxx
Signed-off-by: Geert Uytterhoeven <geert@xxxxxxxxxxxxxx>
Reviewed-by: Andy Shevchenko <andy.shevchenko@xxxxxxxxx>
Signed-off-by: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx>
---

 lib/Kconfig.debug   |    5 +++--
 lib/atomic64_test.c |   10 ++++++++--
 2 files changed, 11 insertions(+), 4 deletions(-)

diff -puN lib/Kconfig.debug~lib-add-module-support-to-atomic64-tests lib/Kconfig.debug
--- a/lib/Kconfig.debug~lib-add-module-support-to-atomic64-tests
+++ a/lib/Kconfig.debug
@@ -1765,9 +1765,10 @@ config PERCPU_TEST
 	  If unsure, say N.
 
 config ATOMIC64_SELFTEST
-	bool "Perform an atomic64_t self-test at boot"
+	tristate "Perform an atomic64_t self-test"
 	help
-	  Enable this option to test the atomic64_t functions at boot.
+	  Enable this option to test the atomic64_t functions at boot or
+	  at module load time.
 
 	  If unsure, say N.
 
diff -puN lib/atomic64_test.c~lib-add-module-support-to-atomic64-tests lib/atomic64_test.c
--- a/lib/atomic64_test.c~lib-add-module-support-to-atomic64-tests
+++ a/lib/atomic64_test.c
@@ -15,6 +15,7 @@
 #include <linux/bug.h>
 #include <linux/kernel.h>
 #include <linux/atomic.h>
+#include <linux/module.h>
 
 #ifdef CONFIG_X86
 #include <asm/cpufeature.h>	/* for boot_cpu_has below */
@@ -241,7 +242,7 @@ static __init void test_atomic64(void)
 	BUG_ON(v.counter != r);
 }
 
-static __init int test_atomics(void)
+static __init int test_atomics_init(void)
 {
 	test_atomic();
 	test_atomic64();
@@ -264,4 +265,9 @@ static __init int test_atomics(void)
 	return 0;
 }
 
-core_initcall(test_atomics);
+static __exit void test_atomics_exit(void) {}
+
+module_init(test_atomics_init);
+module_exit(test_atomics_exit);
+
+MODULE_LICENSE("GPL");
_

Patches currently in -mm which might be from geert@xxxxxxxxxxxxxx are

lib-add-module-support-to-crc32-tests.patch
lib-add-module-support-to-glob-tests.patch
lib-add-module-support-to-atomic64-tests.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




[Index of Archives]     [Kernel Archive]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]

  Powered by Linux