Skip to content

RFC x86: simpify direct_gbpages setting, add early_param_on_off()

Luis R. Rodriguez lkml 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 RFC Latest4 patches 7 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/4x86: mm: use IS_ENABLED() for direct_gbpagesarch/x86/mm/init.c+1 -50 replies
2/4x86: mm: simplify enabling direct_gbpagesarch/x86/Kconfig arch/x86/mm/init.c arch/x86/mm/pageattr.c+22 -150 replies
3/4init.h: add early_param_on_off()include/linux/init.h+15 -00 replies
4/4x86: mm: use early_param_on_off() for direct_gbpagesarch/x86/mm/init.c arch/x86/mm/init_64.c+2 -150 replies

Reviews trailers per patch

None of the 4 patches has a Reviewed-by or Acked-by of their own; the series has one for all of them.

PatchJuergen Gross
SeriesR-b
1/4
2/4
3/4
4/4

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v1 thread

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

From: "Luis R. Rodriguez" <[email protected]>

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(-)
Signature · 1 line
2.2.2