Replace module_init with appropriate alternate initcall in non modules.
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1
iQIcBAABAgAGBQJVkO6nAAoJEOvOhAQsB9HWpHMP/Aknc+lmX2dZeIn96gdkP+UK
1qL24C5oq2sm/9yTZLdoXbyApLaaTbAJHS9O4kolaOU6uOs3JrgtXqL1697PVp1R
qV4f4DOzXmmEHaE2oO21afAri3tXIVQNqA2NQl2TmKfwz0Atu01Vj5RJPu/ZOBPl
dONXcFnE6nO2p7AEFRP/GfDZwkng4xALyZPhwL7tJDAeGaBpqG/n2hCuq+Szn9g8
wjTFACBdad/mRrYsL6YsWZ1e+LKI8vsArQbdPTam+jPaEUlK7yjFReFKCJVzL2JP
xfQoTcCgFztzTUV0JTGR9sqeYA3WH9AkJOFDxNE/eIili4xiTh789WbEpHLVECSX
1LsW025I3DkRWBPT4L+9ZP805ha71kNXDFc5N3XJkzrCYaFvD2BgsUzxi6FXj7aC
9lEVKt6xO04FFG5SwTKnO0f8PEhPemZH3BDnVvjBDWQYLjUcPSNz7bfyHUhif0G5
ulOGVB0ncJJF9iP8PyZs1RA/F8kKxXWnhYMIHzvl0f0vLUA7rAKsACnhBgq8s9ZQ
uM5YjzU91Z/4pe5C2E5MmQIZ84b79ZPsee1lF0GJdjK5W3PDvnCjIdXfQ5M/f3S8
76cssXWNhS78/P+19YqirLeb0u7Zw0jf73m9t9ywRgcByWfY5ZUDm0DFpQnWKkoR
QY/aFO/yHKTO3VHj8Ril
=KDJO
-----END PGP SIGNATURE-----
Merge tag 'module_init-alternate_initcall-v4.1-rc8' of git://git.kernel.org/pub/scm/linux/kernel/git/paulg/linux
Pull module_init replacement part two from Paul Gortmaker:
"Replace module_init with appropriate alternate initcall in non
modules.
This series converts non-modular code that is using the module_init()
call to hook itself into the system to instead use one of our
alternate priority initcalls.
Unlike the previous series that used device_initcall and hence was a
runtime no-op, these commits change to one of the alternate initcalls,
because (a) we have them and (b) it seems like the right thing to do.
For example, it would seem logical to use arch_initcall for arch
specific setup code and fs_initcall for filesystem setup code.
This does mean however, that changes in the init ordering will be
taking place, and so there is a small risk that some kind of implicit
init ordering issue may lie uncovered. But I think it is still better
to give these ones sensible priorities than to just assign them all to
device_initcall in order to exactly preserve the old ordering.
Thad said, we have already made similar changes in core kernel code in
commit c96d6660dc
("kernel: audit/fix non-modular users of
module_init in core code") without any regressions reported, so this
type of change isn't without precedent. It has also got the same
local testing and linux-next coverage as all the other pull requests
that I'm sending for this merge window have got.
Once again, there is an unused module_exit function removal that shows
up as an outlier upon casual inspection of the diffstat"
* tag 'module_init-alternate_initcall-v4.1-rc8' of git://git.kernel.org/pub/scm/linux/kernel/git/paulg/linux:
x86: perf_event_intel_pt.c: use arch_initcall to hook in enabling
x86: perf_event_intel_bts.c: use arch_initcall to hook in enabling
mm/page_owner.c: use late_initcall to hook in enabling
lib/list_sort: use late_initcall to hook in self tests
arm: use subsys_initcall in non-modular pl320 IPC code
powerpc: don't use module_init for non-modular core hugetlb code
powerpc: use subsys_initcall for Freescale Local Bus
x86: don't use module_init for non-modular core bootflag code
netfilter: don't use module_init/exit in core IPV4 code
fs/notify: don't use module_init for non-modular inotify_user code
mm: replace module_init usages with subsys_initcall in nommu.c
This commit is contained in:
commit
9d90f03531
|
@ -928,7 +928,7 @@ static int __init hugetlbpage_init(void)
|
|||
return 0;
|
||||
}
|
||||
#endif
|
||||
module_init(hugetlbpage_init);
|
||||
arch_initcall(hugetlbpage_init);
|
||||
|
||||
void flush_dcache_icache_hugepage(struct page *page)
|
||||
{
|
||||
|
|
|
@ -407,4 +407,4 @@ static int __init fsl_lbc_init(void)
|
|||
{
|
||||
return platform_driver_register(&fsl_lbc_ctrl_driver);
|
||||
}
|
||||
module_init(fsl_lbc_init);
|
||||
subsys_initcall(fsl_lbc_init);
|
||||
|
|
|
@ -98,4 +98,4 @@ static int __init sbf_init(void)
|
|||
|
||||
return 0;
|
||||
}
|
||||
module_init(sbf_init);
|
||||
arch_initcall(sbf_init);
|
||||
|
|
|
@ -530,5 +530,4 @@ static __init int bts_init(void)
|
|||
|
||||
return perf_pmu_register(&bts_pmu, "intel_bts", -1);
|
||||
}
|
||||
|
||||
module_init(bts_init);
|
||||
arch_initcall(bts_init);
|
||||
|
|
|
@ -1106,5 +1106,4 @@ static __init int pt_init(void)
|
|||
|
||||
return ret;
|
||||
}
|
||||
|
||||
module_init(pt_init);
|
||||
arch_initcall(pt_init);
|
||||
|
|
|
@ -195,4 +195,4 @@ static int __init ipc_init(void)
|
|||
{
|
||||
return amba_driver_register(&pl320_driver);
|
||||
}
|
||||
module_init(ipc_init);
|
||||
subsys_initcall(ipc_init);
|
||||
|
|
|
@ -26,7 +26,7 @@
|
|||
#include <linux/fs.h> /* struct inode */
|
||||
#include <linux/fsnotify_backend.h>
|
||||
#include <linux/idr.h>
|
||||
#include <linux/init.h> /* module_init */
|
||||
#include <linux/init.h> /* fs_initcall */
|
||||
#include <linux/inotify.h>
|
||||
#include <linux/kernel.h> /* roundup() */
|
||||
#include <linux/namei.h> /* LOOKUP_FOLLOW */
|
||||
|
@ -812,4 +812,4 @@ static int __init inotify_user_setup(void)
|
|||
|
||||
return 0;
|
||||
}
|
||||
module_init(inotify_user_setup);
|
||||
fs_initcall(inotify_user_setup);
|
||||
|
|
|
@ -289,5 +289,5 @@ exit:
|
|||
kfree(elts);
|
||||
return err;
|
||||
}
|
||||
module_init(list_sort_test);
|
||||
late_initcall(list_sort_test);
|
||||
#endif /* CONFIG_TEST_LIST_SORT */
|
||||
|
|
|
@ -2085,7 +2085,7 @@ static int __meminit init_user_reserve(void)
|
|||
sysctl_user_reserve_kbytes = min(free_kbytes / 32, 1UL << 17);
|
||||
return 0;
|
||||
}
|
||||
module_init(init_user_reserve)
|
||||
subsys_initcall(init_user_reserve);
|
||||
|
||||
/*
|
||||
* Initialise sysctl_admin_reserve_kbytes.
|
||||
|
@ -2106,4 +2106,4 @@ static int __meminit init_admin_reserve(void)
|
|||
sysctl_admin_reserve_kbytes = min(free_kbytes / 32, 1UL << 13);
|
||||
return 0;
|
||||
}
|
||||
module_init(init_admin_reserve)
|
||||
subsys_initcall(init_admin_reserve);
|
||||
|
|
|
@ -310,4 +310,4 @@ static int __init pageowner_init(void)
|
|||
|
||||
return 0;
|
||||
}
|
||||
module_init(pageowner_init)
|
||||
late_initcall(pageowner_init)
|
||||
|
|
|
@ -197,11 +197,4 @@ static int __init ipv4_netfilter_init(void)
|
|||
{
|
||||
return nf_register_afinfo(&nf_ip_afinfo);
|
||||
}
|
||||
|
||||
static void __exit ipv4_netfilter_fini(void)
|
||||
{
|
||||
nf_unregister_afinfo(&nf_ip_afinfo);
|
||||
}
|
||||
|
||||
module_init(ipv4_netfilter_init);
|
||||
module_exit(ipv4_netfilter_fini);
|
||||
subsys_initcall(ipv4_netfilter_init);
|
||||
|
|
Loading…
Reference in New Issue