lkml.org 
[lkml]   [2015]   [Mar]   [4]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
Subject[RFC v1 0/4] x86: simpify direct_gbpages setting, add early_param_on_off()
Date
From: "Luis R. Rodriguez" <mcgrof@suse.com>

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



\
 
 \ /
  Last update: 2015-03-05 02:41    [W:0.149 / U:1.784 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site