[PATCH 00/11] Replace module_init with an alternate initcall in non modules

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

 



This series of commits converts non-modular code that is using the
module_init() call to hook itself into the system to instead use one of
the alternate priority initcalls.

Unlike the earlier series[1] 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 c96d6660dc65b0a90aea9834bfd8be1d5656da18 ("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.

This work is factored out from what was a previously larger series[2] so
that there is a common theme and lower patch count to ease review.

Paul.

[1] https://lkml.org/lkml/2015/5/28/809
[2] https://marc.info/?l=linux-kernel&m=139033951228828

---

Cc: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx>
Cc: Arnaldo Carvalho de Melo <acme@xxxxxxxxxx>
Cc: Benjamin Herrenschmidt <benh@xxxxxxxxxxxxxxxxxxx>
Cc: "David S. Miller" <davem@xxxxxxxxxxxxx>
Cc: Eric Paris <eparis@xxxxxxxxxxxxxx>
Cc: "H. Peter Anvin" <hpa@xxxxxxxxx>
Cc: Ingo Molnar <mingo@xxxxxxxxxx>
Cc: John McCutchan <john@xxxxxxxxxxxxxxxxx>
Cc: Jozsef Kadlecsik <kadlec@xxxxxxxxxxxxxxxxx>
Cc: Pablo Neira Ayuso <pablo@xxxxxxxxxxxxx>
Cc: Patrick McHardy <kaber@xxxxxxxxx>
Cc: Paul Mackerras <paulus@xxxxxxxxx>
Cc: Peter Zijlstra <a.p.zijlstra@xxxxxxxxx>
Cc: Robert Love <rlove@xxxxxxxxx>
Cc: Russell King <linux@xxxxxxxxxxxxxxxx>
Cc: Scott Wood <scottwood@xxxxxxxxxxxxx>
Cc: Thomas Gleixner <tglx@xxxxxxxxxxxxx>
Cc: linux-arm-kernel@xxxxxxxxxxxxxxxxxxx
Cc: linux-mm@xxxxxxxxx
Cc: linuxppc-dev@xxxxxxxxxxxxxxxx
Cc: netdev@xxxxxxxxxxxxxxx
Cc: netfilter-devel@xxxxxxxxxxxxxxx
Cc: x86@xxxxxxxxxx


Paul Gortmaker (11):
  mm: replace module_init usages with subsys_initcall in nommu.c
  fs/notify: don't use module_init for non-modular inotify_user code
  netfilter: don't use module_init/exit in core IPV4 code
  x86: don't use module_init for non-modular core bootflag code
  powerpc: use subsys_initcall for Freescale Local Bus
  powerpc: don't use module_init for non-modular core hugetlb code
  arm: use subsys_initcall in non-modular pl320 IPC code
  lib/list_sort: use late_initcall to hook in self tests
  mm/page_owner.c: use late_initcall to hook in enabling
  x86: perf_event_intel_bts.c: use arch_initcall to hook in enabling
  x86: perf_event_intel_pt.c: use arch_initcall to hook in enabling

 arch/powerpc/mm/hugetlbpage.c              | 2 +-
 arch/powerpc/sysdev/fsl_lbc.c              | 2 +-
 arch/x86/kernel/bootflag.c                 | 2 +-
 arch/x86/kernel/cpu/perf_event_intel_bts.c | 3 +--
 arch/x86/kernel/cpu/perf_event_intel_pt.c  | 3 +--
 drivers/mailbox/pl320-ipc.c                | 2 +-
 fs/notify/inotify/inotify_user.c           | 4 ++--
 lib/list_sort.c                            | 2 +-
 mm/nommu.c                                 | 4 ++--
 mm/page_owner.c                            | 2 +-
 net/ipv4/netfilter.c                       | 9 +--------
 11 files changed, 13 insertions(+), 22 deletions(-)

-- 
2.2.1

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@xxxxxxxxx.  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@xxxxxxxxx";> email@xxxxxxxxx </a>




[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Bugtraq]     [Linux]     [Linux OMAP]     [Linux MIPS]     [ECOS]     [Asterisk Internet PBX]     [Linux API]