[RFC v1 0/4] x86: simpify direct_gbpages setting, add early_param_on_off()

From: Luis R. Rodriguez
Date: Wed Mar 04 2015 - 20:26:47 EST


From: "Luis R. Rodriguez" <mcgrof@xxxxxxxx>

While reviewing DIRECT_GBPAGES I noticed some inconsistancies
on when its cached "enable" variable is set and when in reality
its full feature is enabled. There's also some code simplification
possible by simply using Kconfig, so decided to take advantage of
that and then generalize this a bit under a new early_param_on_off()
which makes it easier to associate featureas with respective cached
values and their own feature related Kconfig entries.

In this case in order to use early_param_on_off() given that init.o is
shared with both 32-bit and 64-bit and before the early parameters were
only exposed on 64-bit it does mean we're exposing this kernel
parameter to 32-bit as well now but its not possible to enable it on 32-bit
as its real setting is guarded by ENABLE_DIRECT_GBPAGES.

I was tempted to grep around for this sort of grammar use but couldn't
easily find all uses with Coccinelle / grep due to the #ifder'y
and the code being outside of routines. If the generalization is not
desired we can drop the last two, but would ask that the first two patches
to be considered and reviewed.

Luis R. Rodriguez (4):
x86: mm: use IS_ENABLED() for direct_gbpages
x86: mm: simplify enabling direct_gbpages
init.h: add early_param_on_off()
x86: mm: use early_param_on_off() for direct_gbpages

arch/x86/Kconfig | 18 +++++++++++++-----
arch/x86/mm/init.c | 24 +++++++++++-------------
arch/x86/mm/init_64.c | 14 --------------
arch/x86/mm/pageattr.c | 2 --
include/linux/init.h | 15 +++++++++++++++
5 files changed, 39 insertions(+), 34 deletions(-)

--
2.2.2

--
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/