1 #include <linux/module.h>
2 #include <linux/init.h>
3 #include <linux/pm_qos.h>
4 #include <linux/workqueue.h>
7 MODULE_AUTHOR("Luis R. Rodriguez");
8 MODULE_DESCRIPTION("Kernel backport module");
11 #ifndef CPTCFG_KERNEL_NAME
12 #error "You need a CPTCFG_KERNEL_NAME"
15 #ifndef CPTCFG_KERNEL_VERSION
16 #error "You need a CPTCFG_KERNEL_VERSION"
19 #ifndef CPTCFG_VERSION
20 #error "You need a CPTCFG_VERSION"
23 static char *backported_kernel_name
= CPTCFG_KERNEL_NAME
;
25 module_param(backported_kernel_name
, charp
, 0400);
26 MODULE_PARM_DESC(backported_kernel_name
,
27 "The kernel tree name that was used for this backport (" CPTCFG_KERNEL_NAME
")");
29 #ifdef BACKPORTS_GIT_TRACKED
30 static char *backports_tracker_id
= BACKPORTS_GIT_TRACKED
;
31 module_param(backports_tracker_id
, charp
, 0400);
32 MODULE_PARM_DESC(backports_tracker_id
,
33 "The version of the tree containing this backport (" BACKPORTS_GIT_TRACKED
")");
35 static char *backported_kernel_version
= CPTCFG_KERNEL_VERSION
;
36 static char *backports_version
= CPTCFG_VERSION
;
38 module_param(backported_kernel_version
, charp
, 0400);
39 MODULE_PARM_DESC(backported_kernel_version
,
40 "The kernel version that was used for this backport (" CPTCFG_KERNEL_VERSION
")");
42 module_param(backports_version
, charp
, 0400);
43 MODULE_PARM_DESC(backports_version
,
44 "The git version of the backports tree used to generate this backport (" CPTCFG_VERSION
")");
48 void backport_dependency_symbol(void)
51 EXPORT_SYMBOL_GPL(backport_dependency_symbol
);
54 static int __init
backport_init(void)
56 int ret
= crypto_ccm_module_init();
60 ret
= devcoredump_init();
62 crypto_ccm_module_exit();
66 printk(KERN_INFO
"Loading modules backported from " CPTCFG_KERNEL_NAME
67 #ifndef BACKPORTS_GIT_TRACKED
68 " version " CPTCFG_KERNEL_VERSION
71 #ifdef BACKPORTS_GIT_TRACKED
72 printk(KERN_INFO BACKPORTS_GIT_TRACKED
"\n");
75 #ifdef CONFIG_BACKPORT_INTEGRATE
76 printk(KERN_INFO
"Backport integrated by backports.git " CPTCFG_VERSION
"\n");
78 printk(KERN_INFO
"Backport generated by backports.git " CPTCFG_VERSION
"\n");
79 #endif /* CONFIG_BACKPORT_INTEGRATE */
81 #endif /* BACKPORTS_GIT_TRACKED */
85 subsys_initcall(backport_init
);
87 static void __exit
backport_exit(void)
89 crypto_ccm_module_exit();
92 module_exit(backport_exit
);