Commit:     f33bc55c472295966e520c9347822fdd8b1082cd
Parent:     6ea65ff79ceb36a1195761be857da1fdf9878450
Author:     Thomas Gleixner <[EMAIL PROTECTED]>
AuthorDate: Fri Mar 23 17:14:37 2007 -0700
Committer:  Linus Torvalds <[EMAIL PROTECTED]>
CommitDate: Fri Mar 23 20:21:45 2007 -0700

    [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
    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 <[EMAIL PROTECTED]>
    Signed-off-by: Thomas Gleixner <[EMAIL PROTECTED]>
    Acked-by:  Ray Lee <[EMAIL PROTECTED]>
    Signed-off-by: Linus Torvalds <[EMAIL PROTECTED]>
 arch/x86_64/kernel/apic.c |    8 ++++++++
 1 files changed, 8 insertions(+), 0 deletions(-)

diff --git a/arch/x86_64/kernel/apic.c b/arch/x86_64/kernel/apic.c
index 46acf4f..bd3e45d 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);
 void smp_send_timer_broadcast_ipi(void)
+       int cpu = smp_processor_id();
        cpumask_t mask;
        cpus_and(mask, cpu_online_map, timer_interrupt_broadcast_ipi_mask);
+       if (cpu_isset(cpu, mask)) {
+               cpu_clear(cpu, mask);
+               add_pda(apic_timer_irqs, 1);
+               smp_local_timer_interrupt();
+       }
        if (!cpus_empty(mask)) {
                send_IPI_mask(mask, LOCAL_TIMER_VECTOR);
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at

Reply via email to