aboutsummaryrefslogtreecommitdiffstats
path: root/arch/x86_64/kernel
diff options
context:
space:
mode:
authorThomas Gleixner <tglx@linutronix.de>2007-03-23 20:14:37 -0400
committerLinus Torvalds <torvalds@woody.linux-foundation.org>2007-03-23 23:21:45 -0400
commitf33bc55c472295966e520c9347822fdd8b1082cd (patch)
tree9532d70dbbead840164fbfd4ad429791476d9f21 /arch/x86_64/kernel
parent6ea65ff79ceb36a1195761be857da1fdf9878450 (diff)
[PATCH] x86_64: avoid sending LOCAL_TIMER_VECTOR IPI to itself
Ray Lee reported, that on an UP kernel with "noapic" command line option set, the box locks hard during boot. Adding some debug printks revealed, that the last action on the box before stalling was "Send IPI" - a debug printk which was put into smp_send_timer_broadcast_ipi(). It seems that send_IPI_mask(mask, LOCAL_TIMER_VECTOR) fails when "noapic" is set on the command line on an UP kernel. Aside of that it does not make much sense to trigger an interrupt instead of calling the function directly on the CPU which gets the PIT/HPET interrupt in case of broadcasting. Reported-by: Ray Lee <ray-lk@madrabbit.org> Signed-off-by: Thomas Gleixner <tglx@linutronix.de> Acked-by: Ray Lee <ray-lk@madrabbit.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'arch/x86_64/kernel')
-rw-r--r--arch/x86_64/kernel/apic.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/arch/x86_64/kernel/apic.c b/arch/x86_64/kernel/apic.c
index 46acf4f2f1ec..bd3e45d47c37 100644
--- a/arch/x86_64/kernel/apic.c
+++ b/arch/x86_64/kernel/apic.c
@@ -934,9 +934,17 @@ EXPORT_SYMBOL(switch_APIC_timer_to_ipi);
934 934
935void smp_send_timer_broadcast_ipi(void) 935void smp_send_timer_broadcast_ipi(void)
936{ 936{
937 int cpu = smp_processor_id();
937 cpumask_t mask; 938 cpumask_t mask;
938 939
939 cpus_and(mask, cpu_online_map, timer_interrupt_broadcast_ipi_mask); 940 cpus_and(mask, cpu_online_map, timer_interrupt_broadcast_ipi_mask);
941
942 if (cpu_isset(cpu, mask)) {
943 cpu_clear(cpu, mask);
944 add_pda(apic_timer_irqs, 1);
945 smp_local_timer_interrupt();
946 }
947
940 if (!cpus_empty(mask)) { 948 if (!cpus_empty(mask)) {
941 send_IPI_mask(mask, LOCAL_TIMER_VECTOR); 949 send_IPI_mask(mask, LOCAL_TIMER_VECTOR);
942 } 950 }