Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

[PATCH] x86_64 irq_regs fix

smp_apic_timer_interrupt() needs to stack the pt_regs* for profile_tick.

If any other of those APIC interrupt handlers want to run get_irq_regs() then
their C entrypoint handlers will need the same treatment.

Cc: Andi Kleen <ak@muc.de>
Cc: David Howells <dhowells@redhat.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Acked-by: Andrew Vasquez <andrew.vasquez@qlogic.com>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>

authored by

Andrew Morton and committed by
Linus Torvalds
d150ad7b e6300155

+4 -1
+4 -1
arch/x86_64/kernel/apic.c
··· 913 913 * [ if a single-CPU system runs an SMP kernel then we call the local 914 914 * interrupt as well. Thus we cannot inline the local irq ... ] 915 915 */ 916 - void smp_apic_timer_interrupt(void) 916 + void smp_apic_timer_interrupt(struct pt_regs *regs) 917 917 { 918 + struct pt_regs *old_regs = set_irq_regs(regs); 919 + 918 920 /* 919 921 * the NMI deadlock-detector uses this. 920 922 */ ··· 936 934 irq_enter(); 937 935 smp_local_timer_interrupt(); 938 936 irq_exit(); 937 + set_irq_regs(old_regs); 939 938 } 940 939 941 940 /*