diff options
author | Jan Beulich <JBeulich@novell.com> | 2009-08-28 09:11:57 -0400 |
---|---|---|
committer | Ingo Molnar <mingo@elte.hu> | 2009-08-29 09:47:32 -0400 |
commit | 47d25003cbd9e9030a95f7ccc4e70fec6aa7b844 (patch) | |
tree | 7928401e154672714e3db17f15e701fd38ed85fd | |
parent | b855192c08fcb14adbc5d3a7cab182022d433cca (diff) |
x86: Fix earlyprintk=dbgp for machines without NX
Since parse_early_param() may (e.g. for earlyprintk=dbgp)
involve calls to page table manipulation functions (here
set_fixmap_nocache()), NX hardware support must be determined
before calling that function (so that __supported_pte_mask gets
properly set up).
But the call after parse_early_param() can also not go away, as
that will honor eventual command line specified disabling of
the NX functionality.
( This will then just result in whatever mappings got
established during parse_early_param() having the NX bit set
despite it being disabled on the command line, but I think
that's tolerable).
Signed-off-by: Jan Beulich <jbeulich@novell.com>
Cc: Yinghai Lu <yhlu.kernel@gmail.com>
LKML-Reference: <4A97F3BD02000078000121B9@vpn.id2.novell.com>
[ merged to x86/pat to resolve a conflict. ]
Signed-off-by: Ingo Molnar <mingo@elte.hu>
-rw-r--r-- | arch/x86/kernel/setup.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/arch/x86/kernel/setup.c b/arch/x86/kernel/setup.c index 02643cc3bf26..eb1f1e6e52b0 100644 --- a/arch/x86/kernel/setup.c +++ b/arch/x86/kernel/setup.c | |||
@@ -714,6 +714,16 @@ void __init setup_arch(char **cmdline_p) | |||
714 | strlcpy(command_line, boot_command_line, COMMAND_LINE_SIZE); | 714 | strlcpy(command_line, boot_command_line, COMMAND_LINE_SIZE); |
715 | *cmdline_p = command_line; | 715 | *cmdline_p = command_line; |
716 | 716 | ||
717 | #ifdef CONFIG_X86_64 | ||
718 | /* | ||
719 | * Must call this twice: Once just to detect whether hardware doesn't | ||
720 | * support NX (so that the early EHCI debug console setup can safely | ||
721 | * call set_fixmap(), and then again after parsing early parameters to | ||
722 | * honor the respective command line option. | ||
723 | */ | ||
724 | check_efer(); | ||
725 | #endif | ||
726 | |||
717 | parse_early_param(); | 727 | parse_early_param(); |
718 | 728 | ||
719 | /* VMI may relocate the fixmap; do this before touching ioremap area */ | 729 | /* VMI may relocate the fixmap; do this before touching ioremap area */ |