public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] Real-Time Preemption, fixed kexec kernel relocation oops
@ 2005-08-29 16:04 Luca Falavigna
  0 siblings, 0 replies; only message in thread
From: Luca Falavigna @ 2005-08-29 16:04 UTC (permalink / raw)
  To: Ingo Molnar; +Cc: Linux Kernel Mailing List

This patch, built against kernel version 2.6.13-rc7 (and not against -RT tree
patch, sorry), fixes a few local_irq_disable() calls which leads to an oops
during kernel relocation in kexec subsystem. Currently, only i386 implementation
of kexec is fixed.

Anyway, this patch does not fix a strange behaviour when using kexec with a -RT
kernel. Here is dmesg output:

Uncompressing Linux... OK, booting the kernel.
Unknown interrupt or fault at EIP 00000203 00000060 c011dfe3
Linux version 2.6.13-rc7-rt1 (root@sauron) (gcc version 3.3.4 (Debian
1:3.3.4-13)) #2 Fri Aug 26 16:55:12 UTC 2005
[...]
hda: lost interrupt
hda: lost interrupt
hda: lost interrupt
[...]

System is very slow and there are tons of "lost interrupt" messages.



Signed-off-by: Luca Falavigna <dktrkranz@gmail.com>

--- ./arch/i386/kernel/machine_kexec.c.orig	2005-08-28 22:03:52.000000000 +0000
+++ ./arch/i386/kernel/machine_kexec.c	2005-08-28 22:05:28.000000000 +0000
@@ -187,7 +187,7 @@ NORET_TYPE void machine_kexec(struct kim
 	relocate_new_kernel_t rnk;

 	/* Interrupts aren't acceptable while we reboot */
-	local_irq_disable();
+	raw_local_irq_disable();

 	/* Compute some offsets */
 	reboot_code_buffer = page_to_pfn(image->control_code_page)
--- ./arch/i386/kernel/crash.c.orig	2005-08-28 22:04:08.000000000 +0000
+++ ./arch/i386/kernel/crash.c	2005-08-28 22:04:55.000000000 +0000
@@ -143,7 +143,7 @@ static int crash_nmi_callback(struct pt_
 	 */
 	if (cpu == crashing_cpu)
 		return 1;
-	local_irq_disable();
+	raw_local_irq_disable();

 	if (!user_mode(regs)) {
 		crash_setup_regs(&fixed_regs, regs);
@@ -210,7 +210,7 @@ void machine_crash_shutdown(struct pt_re
 	 * an SMP system.
 	 */
 	/* The kernel is broken so disable interrupts */
-	local_irq_disable();
+	raw_local_irq_disable();

 	/* Make a note of crashing cpu. Will be used in NMI callback.*/
 	crashing_cpu = smp_processor_id();




Regards,
-- 
					Luca



^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2005-08-29 17:25 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-08-29 16:04 [PATCH] Real-Time Preemption, fixed kexec kernel relocation oops Luca Falavigna

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox