public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH 1/2] x86_64: ioapic virtual wire mode fix
@ 2006-01-04  9:33 Vivek Goyal
  0 siblings, 0 replies; only message in thread
From: Vivek Goyal @ 2006-01-04  9:33 UTC (permalink / raw)
  To: Morton Andrew Morton
  Cc: Eric W. Biederman, linux kernel mailing list,
	Fastboot mailing list, Andi Kleen


o Currently, during kexec reboot, IOAPIC is re-programmed back to virtual
  wire mode if there was an i8259 connected to it. This enables getting
  timer interrupts in second kernel in legacy mode.

o After putting into virtual wire mode, IOAPIC delivers the i8259 interrupts
  to CPU0. This works well for kexec but not for kdump as we might crash
  on a different CPU and second kernel will not see timer interrupts.

o This patch modifies the redirection table entry to deliver the timer 
  interrupts to the cpu we are rebooting (instead of hardcoding to zero).
  This ensures that second kernel receives timer interrupts even on a 
  non-boot cpu.

Signed-off-by: Vivek Goyal <vgoyal@in.ibm.com>
---


diff -puN arch/x86_64/kernel/io_apic.c~kdump-x86_64-program-ioapic-non-boot-cpu-timer-interrupts arch/x86_64/kernel/io_apic.c
--- linux-2.6.15/arch/x86_64/kernel/io_apic.c~kdump-x86_64-program-ioapic-non-boot-cpu-timer-interrupts	2006-01-04 05:12:48.000000000 -0800
+++ linux-2.6.15-root/arch/x86_64/kernel/io_apic.c	2006-01-04 06:55:42.000000000 -0800
@@ -1245,8 +1245,8 @@ void disable_IO_APIC(void)
 		entry.dest_mode       = 0; /* Physical */
 		entry.delivery_mode   = 7; /* ExtInt */
 		entry.vector          = 0;
-		entry.dest.physical.physical_dest = 0;
-
+		entry.dest.physical.physical_dest =
+					GET_APIC_ID(apic_read(APIC_ID));
 
 		/*
 		 * Add it to the IO-APIC irq-routing table:
_

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

only message in thread, other threads:[~2006-01-04  9:33 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-01-04  9:33 [PATCH 1/2] x86_64: ioapic virtual wire mode fix Vivek Goyal

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