x86: mtrr fix debug parameter
PATCH 1/1 x86: mtrr fix debug parameter
while looking at:
http://bugzilla.kernel.org/show_bug.cgi?id=11541
I realized that the mtrr.show param cannot work, because the code is processed much too early.
This patch:
- Declares mtrr.show as early_param
- Stays consistent with the previous param (which I doubt that it ever worked), so mtrr.show=1 would still work
- Declares mtrr_show as initdata
--- arch/x86/kernel/cpu/mtrr/generic.c | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-)
arch/x86/kernel/cpu/mtrr/generic.c +7 -5
@@ -33,11 +33,13 @@ u64 mtrr_tom2;struct mtrr_state_type mtrr_state = {};EXPORT_SYMBOL_GPL (mtrr_state); -#undef MODULE_PARAM_PREFIX -#define MODULE_PARAM_PREFIX "mtrr." - -static int mtrr_show; -module_param_named (show, mtrr_show, bool,0 ); +static int __initdata mtrr_show; +static int __init mtrr_debug (char *opt) +{ + mtrr_show =1 ; +return 0 ; +} +early_param ("mtrr.show" , mtrr_debug);/* * Returns the effective MTRR type for the region
I've been carrying a change like this for quite some time in a bigger patch, but never got to actually split it out and submit it. Thanks for doing this, Thomas! (And yes, it did work at the time it was added.)
Quoted 1 line
Quoted 1 line
Quoted 1 line
Thomas Renninger <[email protected]> 20.01.09 10:37 >>>
while looking at:
http://bugzilla.kernel.org/show_bug.cgi?id=11541
I realized that the mtrr.show param cannot work, because the code is processed much too early.
This patch:
- Declares mtrr.show as early_param
- Stays consistent with the previous param (which I doubt that it ever worked), so mtrr.show=1 would still work
- Declares mtrr_show as initdata
--- arch/x86/kernel/cpu/mtrr/generic.c | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-)
arch/x86/kernel/cpu/mtrr/generic.c +7 -5
@@ -33,11 +33,13 @@ u64 mtrr_tom2;struct mtrr_state_type mtrr_state = {};EXPORT_SYMBOL_GPL (mtrr_state); -#undef MODULE_PARAM_PREFIX -#define MODULE_PARAM_PREFIX "mtrr." - -static int mtrr_show; -module_param_named (show, mtrr_show, bool,0 ); +static int __initdata mtrr_show; +static int __init mtrr_debug (char *opt) +{ + mtrr_show =1 ; +return 0 ; +} +early_param ("mtrr.show" , mtrr_debug);/* * Returns the effective MTRR type for the region
Ingo Molnar
AppliedQuoted 5 lines · Jan Beulich
I've been carrying a change like this for quite some time in a bigger patch, but never got to actually split it out and submit it. Thanks for doing this, Thomas! (And yes, it did work at the time it was added.)
Signed-off-by Jan Beulich <[email protected]>
applied to tip/x86/urgent, thanks guys!
Ingo