VisionFive2 Linux kernel

StarFive Tech Linux Kernel for VisionFive (JH7110) boards (mirror)

More than 9999 Commits   32 Branches   54 Tags
09c434b8a0047 (Thomas Gleixner 2019-05-19 13:08:20 +0100  1) // SPDX-License-Identifier: GPL-2.0-only
93e9ef83f4060 (Kees Cook       2014-01-23 15:54:37 -0800  2) /*
93e9ef83f4060 (Kees Cook       2014-01-23 15:54:37 -0800  3)  * This module emits "Hello, world" on printk when loaded.
93e9ef83f4060 (Kees Cook       2014-01-23 15:54:37 -0800  4)  *
93e9ef83f4060 (Kees Cook       2014-01-23 15:54:37 -0800  5)  * It is designed to be used for basic evaluation of the module loading
93e9ef83f4060 (Kees Cook       2014-01-23 15:54:37 -0800  6)  * subsystem (for example when validating module signing/verification). It
93e9ef83f4060 (Kees Cook       2014-01-23 15:54:37 -0800  7)  * lacks any extra dependencies, and will not normally be loaded by the
93e9ef83f4060 (Kees Cook       2014-01-23 15:54:37 -0800  8)  * system unless explicitly requested by name.
93e9ef83f4060 (Kees Cook       2014-01-23 15:54:37 -0800  9)  */
93e9ef83f4060 (Kees Cook       2014-01-23 15:54:37 -0800 10) 
93e9ef83f4060 (Kees Cook       2014-01-23 15:54:37 -0800 11) #define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
93e9ef83f4060 (Kees Cook       2014-01-23 15:54:37 -0800 12) 
93e9ef83f4060 (Kees Cook       2014-01-23 15:54:37 -0800 13) #include <linux/init.h>
93e9ef83f4060 (Kees Cook       2014-01-23 15:54:37 -0800 14) #include <linux/module.h>
93e9ef83f4060 (Kees Cook       2014-01-23 15:54:37 -0800 15) #include <linux/printk.h>
93e9ef83f4060 (Kees Cook       2014-01-23 15:54:37 -0800 16) 
93e9ef83f4060 (Kees Cook       2014-01-23 15:54:37 -0800 17) static int __init test_module_init(void)
93e9ef83f4060 (Kees Cook       2014-01-23 15:54:37 -0800 18) {
93e9ef83f4060 (Kees Cook       2014-01-23 15:54:37 -0800 19) 	pr_warn("Hello, world\n");
93e9ef83f4060 (Kees Cook       2014-01-23 15:54:37 -0800 20) 
93e9ef83f4060 (Kees Cook       2014-01-23 15:54:37 -0800 21) 	return 0;
93e9ef83f4060 (Kees Cook       2014-01-23 15:54:37 -0800 22) }
93e9ef83f4060 (Kees Cook       2014-01-23 15:54:37 -0800 23) 
93e9ef83f4060 (Kees Cook       2014-01-23 15:54:37 -0800 24) module_init(test_module_init);
93e9ef83f4060 (Kees Cook       2014-01-23 15:54:37 -0800 25) 
93e9ef83f4060 (Kees Cook       2014-01-23 15:54:37 -0800 26) static void __exit test_module_exit(void)
93e9ef83f4060 (Kees Cook       2014-01-23 15:54:37 -0800 27) {
93e9ef83f4060 (Kees Cook       2014-01-23 15:54:37 -0800 28) 	pr_warn("Goodbye\n");
93e9ef83f4060 (Kees Cook       2014-01-23 15:54:37 -0800 29) }
93e9ef83f4060 (Kees Cook       2014-01-23 15:54:37 -0800 30) 
93e9ef83f4060 (Kees Cook       2014-01-23 15:54:37 -0800 31) module_exit(test_module_exit);
93e9ef83f4060 (Kees Cook       2014-01-23 15:54:37 -0800 32) 
93e9ef83f4060 (Kees Cook       2014-01-23 15:54:37 -0800 33) MODULE_AUTHOR("Kees Cook <keescook@chromium.org>");
93e9ef83f4060 (Kees Cook       2014-01-23 15:54:37 -0800 34) MODULE_LICENSE("GPL");