From: Vivek Goyal 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 Cc: Andi Kleen Signed-off-by: Andrew Morton --- arch/x86_64/kernel/io_apic.c | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) diff -puN arch/x86_64/kernel/io_apic.c~x86_64-ioapic-virtual-wire-mode-fix arch/x86_64/kernel/io_apic.c --- devel/arch/x86_64/kernel/io_apic.c~x86_64-ioapic-virtual-wire-mode-fix 2006-01-04 03:56:40.000000000 -0800 +++ devel-akpm/arch/x86_64/kernel/io_apic.c 2006-01-04 03:56:40.000000000 -0800 @@ -1242,8 +1242,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: _