Skip to contentSkip to conversation

Real-Time Preemption, fixed kexec kernel relocation oops

PATCH New Luca Falavigna 1 participant 1 message Aug 29, 2005

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 Real-Time Preemption, fixed kexec kernel relocation oops

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.

arch/i386/kernel/machine_kexec.c renamed from arch/i386/kernel/machine_kexec.c.orig +1 -1
@@ -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 renamed from arch/i386/kernel/crash.c.orig +2 -2
@@ -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,

Signature · 1 line
					Luca