From 0d317fb72fe3cf0f611608cf3a3015bbe6cd2a66 Mon Sep 17 00:00:00 2001 From: "Eric W. Biederman" Date: Sat, 6 Aug 2005 13:47:36 -0600 Subject: [PATCH] x86_64 bootmem: sparse_mem/kexec merge bug. When the sparse mem changes and the kexec changes were merged into setup.c they came in, in the wrong order. This patch changes the order so we don't run sparse_init which uses the bootmem allocator until we all of the reserve_bootmem calls has been made. Signed-off-by: Eric W. Biederman Signed-off-by: Linus Torvalds --- arch/x86_64/kernel/setup.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'arch/x86_64') diff --git a/arch/x86_64/kernel/setup.c b/arch/x86_64/kernel/setup.c index 0aa526298e9..116a491e296 100644 --- a/arch/x86_64/kernel/setup.c +++ b/arch/x86_64/kernel/setup.c @@ -645,15 +645,15 @@ void __init setup_arch(char **cmdline_p) } } #endif - - sparse_init(); - #ifdef CONFIG_KEXEC if (crashk_res.start != crashk_res.end) { reserve_bootmem(crashk_res.start, crashk_res.end - crashk_res.start + 1); } #endif + + sparse_init(); + paging_init(); check_ioapic(); -- cgit v1.2.3 From d5172f263f76ca6d588f533c0989b22521fcbac2 Mon Sep 17 00:00:00 2001 From: Andi Kleen Date: Sun, 7 Aug 2005 09:42:07 -0700 Subject: [PATCH] x86_64: ignore machine checks from boot time Don't log machine check events left over from boot. Too many BIOSes leave bogus events in there. This unfortunately also makes it impossible to log events that caused a reboot. For people with non broken BIOS there is mce=bootlog Signed-off-by: Andi Kleen Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- arch/x86_64/kernel/mce.c | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) (limited to 'arch/x86_64') diff --git a/arch/x86_64/kernel/mce.c b/arch/x86_64/kernel/mce.c index 3b267c91bb0..8aa56736cde 100644 --- a/arch/x86_64/kernel/mce.c +++ b/arch/x86_64/kernel/mce.c @@ -36,6 +36,7 @@ static unsigned long bank[NR_BANKS] = { [0 ... NR_BANKS-1] = ~0UL }; static unsigned long console_logged; static int notify_user; static int rip_msr; +static int mce_bootlog; /* * Lockless MCE logging infrastructure. @@ -197,10 +198,11 @@ void do_machine_check(struct pt_regs * regs, long error_code) rdmsrl(MSR_IA32_MC0_ADDR + i*4, m.addr); mce_get_rip(&m, regs); - if (error_code != -1) + if (error_code >= 0) rdtscll(m.tsc); wrmsrl(MSR_IA32_MC0_STATUS + i*4, 0); - mce_log(&m); + if (error_code != -2) + mce_log(&m); /* Did this bank cause the exception? */ /* Assume that the bank with uncorrectable errors did it, @@ -315,7 +317,7 @@ static void mce_init(void *dummy) /* Log the machine checks left over from the previous reset. This also clears all registers */ - do_machine_check(NULL, -1); + do_machine_check(NULL, mce_bootlog ? -1 : -2); set_in_cr4(X86_CR4_MCE); @@ -476,11 +478,17 @@ static int __init mcheck_disable(char *str) } /* mce=off disables machine check. Note you can reenable it later - using sysfs */ + using sysfs. + mce=bootlog Log MCEs from before booting. Disabled by default to work + around buggy BIOS that leave bogus MCEs. */ static int __init mcheck_enable(char *str) { + if (*str == '=') + str++; if (!strcmp(str, "off")) mce_dont_init = 1; + else if (!strcmp(str, "bootlog")) + mce_bootlog = 1; else printk("mce= argument %s ignored. Please use /sys", str); return 0; -- cgit v1.2.3 From 03c6b749b364fe7b8e47ed8e1ce26baca167c322 Mon Sep 17 00:00:00 2001 From: Olaf Hering Date: Mon, 8 Aug 2005 14:49:18 -0700 Subject: [PATCH] x86_64: add MODULE_ALIAS for aes modprobe aes does not work on x86_64. i386 has a similar line, this could be the right fix. Would be nice to have in 2.6.13 final. Signed-off-by: Olaf Hering Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- arch/x86_64/crypto/aes.c | 1 + 1 file changed, 1 insertion(+) (limited to 'arch/x86_64') diff --git a/arch/x86_64/crypto/aes.c b/arch/x86_64/crypto/aes.c index 2b5c4010ce3..acfdaa28791 100644 --- a/arch/x86_64/crypto/aes.c +++ b/arch/x86_64/crypto/aes.c @@ -322,3 +322,4 @@ module_exit(aes_fini); MODULE_DESCRIPTION("Rijndael (AES) Cipher Algorithm"); MODULE_LICENSE("GPL"); +MODULE_ALIAS("aes"); -- cgit v1.2.3