[PATCH 0/3] x86: fix instances of non-modular code using modular fcns

From: Paul Gortmaker
Date: Mon Aug 24 2015 - 19:35:43 EST


In the previous merge window, we made changes to allow better
delineation between modular and non-modular code in commit
0fd972a7d91d6e15393c449492a04d94c0b89351 ("module: relocate module_init
from init.h to module.h"). This allows us to now ensure module code
looks modular and non-modular code does not accidentally look modular
without suffering build breakage from header entanglement.

Here we target x86 code that is, by nature of the Kconfig/Makefile, only
available to be built-in, but implicitly presenting itself as being
possibly modular by way of using modular headers and macros.

The goal here is to remove that illusion of modularity from these
files, but in a way that leaves the actual runtime unchanged.
We also get the side benefit of a reduced CPP overhead, since the
removal of module.h from a file can reduce the number of lines emitted
by 20k.

Two of the three are the trivial mapping of module_init onto the
equivalent device_initcall ; the pmc_atom change is that too, but also
includes the removal of a no-op MODULE_DEVICE_TABLE and a corrected
comment relating to that, hence the larger diffstat there.

Paul.
---

Cc: Andy Shevchenko <andriy.shevchenko@xxxxxxxxxxxxxxx>
Cc: "H. Peter Anvin" <hpa@xxxxxxxxx>
Cc: Ingo Molnar <mingo@xxxxxxxxxx>
Cc: Thomas Gleixner <tglx@xxxxxxxxxxxxx>
Cc: x86@xxxxxxxxxx


Paul Gortmaker (3):
x86/platform: make atom/pmc_atom.c explicitly non-modular
arch/x86: make mm/pageattr[-test].c explicitly non-modular
arch/x86: make kernel/check.c explicitly non-modular

arch/x86/kernel/check.c | 5 ++---
arch/x86/mm/pageattr-test.c | 4 ++--
arch/x86/mm/pageattr.c | 1 -
arch/x86/platform/atom/pmc_atom.c | 13 ++++---------
4 files changed, 8 insertions(+), 15 deletions(-)

--
2.5.0

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/