From d150ad7bd946f066c98a9725685109dcffae0cba Mon Sep 17 00:00:00 2001 From: Andrew Morton Date: Fri, 6 Oct 2006 13:28:09 -0700 Subject: [PATCH] [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 Cc: David Howells Signed-off-by: Andrew Morton Acked-by: Andrew Vasquez Signed-off-by: Linus Torvalds --- arch/x86_64/kernel/apic.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/arch/x86_64/kernel/apic.c b/arch/x86_64/kernel/apic.c index af4a1c71a80d..4d9d5ed942b2 100644 --- a/arch/x86_64/kernel/apic.c +++ b/arch/x86_64/kernel/apic.c @@ -913,8 +913,10 @@ void smp_local_timer_interrupt(void) * [ if a single-CPU system runs an SMP kernel then we call the local * interrupt as well. Thus we cannot inline the local irq ... ] */ -void smp_apic_timer_interrupt(void) +void smp_apic_timer_interrupt(struct pt_regs *regs) { + struct pt_regs *old_regs = set_irq_regs(regs); + /* * the NMI deadlock-detector uses this. */ @@ -934,6 +936,7 @@ void smp_apic_timer_interrupt(void) irq_enter(); smp_local_timer_interrupt(); irq_exit(); + set_irq_regs(old_regs); } /* -- 2.11.0