Skip to content

Commit

Permalink
[PATCH] x86-64: don't use set_irq_regs()
Browse files Browse the repository at this point in the history
We don't need to setup _irq_regs in smp_xxx_interrupt (except apic timer).
These handlers run with irqs disabled and do not call functions which need
"struct pt_regs".

Signed-off-by: Oleg Nesterov <oleg@tv-sign.ru>
Signed-off-by: Andi Kleen <ak@suse.de>
Acked-by: Ingo Molnar <mingo@elte.hu>
Cc: Andi Kleen <ak@suse.de>
Acked-By: David Howells <dhowells@redhat.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
  • Loading branch information
Oleg Nesterov authored and Andi Kleen committed Dec 7, 2006
1 parent ad892f5 commit 6bedb2c
Showing 1 changed file with 0 additions and 6 deletions.
6 changes: 0 additions & 6 deletions arch/i386/kernel/smp.c
Original file line number Diff line number Diff line change
Expand Up @@ -321,7 +321,6 @@ static inline void leave_mm (unsigned long cpu)

fastcall void smp_invalidate_interrupt(struct pt_regs *regs)
{
struct pt_regs *old_regs = set_irq_regs(regs);
unsigned long cpu;

cpu = get_cpu();
Expand Down Expand Up @@ -352,7 +351,6 @@ fastcall void smp_invalidate_interrupt(struct pt_regs *regs)
smp_mb__after_clear_bit();
out:
put_cpu_no_resched();
set_irq_regs(old_regs);
}

static void flush_tlb_others(cpumask_t cpumask, struct mm_struct *mm,
Expand Down Expand Up @@ -607,14 +605,11 @@ void smp_send_stop(void)
*/
fastcall void smp_reschedule_interrupt(struct pt_regs *regs)
{
struct pt_regs *old_regs = set_irq_regs(regs);
ack_APIC_irq();
set_irq_regs(old_regs);
}

fastcall void smp_call_function_interrupt(struct pt_regs *regs)
{
struct pt_regs *old_regs = set_irq_regs(regs);
void (*func) (void *info) = call_data->func;
void *info = call_data->info;
int wait = call_data->wait;
Expand All @@ -637,7 +632,6 @@ fastcall void smp_call_function_interrupt(struct pt_regs *regs)
mb();
atomic_inc(&call_data->finished);
}
set_irq_regs(old_regs);
}

/*
Expand Down

0 comments on commit 6bedb2c

Please sign in to comment.