mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Suresh Siddha <suresh.b.siddha@intel.com>
To: Jin Dongming <jin.dongming@np.css.fujitsu.com>
Cc: Li Zefan <lizf@cn.fujitsu.com>, Ingo Molnar <mingo@elte.hu>,
	Yinghai Lu <yinghai@kernel.org>, "H. Peter Anvin" <hpa@zytor.com>,
	LKML <linux-kernel@vger.kernel.org>
Subject: Re: [BUG] tip tree - No irq handler for vector (irq -1)
Date: Thu, 28 Jan 2010 22:51:27 -0800	[thread overview]
Message-ID: <1264747887.2689.37.camel@sbs-t61> (raw)
In-Reply-To: <4B625296.5090903@np.css.fujitsu.com>

On Thu, 2010-01-28 at 19:14 -0800, Jin Dongming wrote:
> Hi,
> 
> Maybe this problem is caused by that FIRST_DEVICE_VECTOR(IRQ 0x30)
> does not assigned really.

No. The problem is that this system's logical flat is behaving weird.

Even when the IO-APIC RTE says send the interrupt to cpu-0, it sends the
interrupt to cpu-1 (for which we haven't really initialized the vector
to irq mapping).

Actually this case is documented by Eric Biederman in the code like
this:

static void flat_vector_allocation_domain(int cpu, struct cpumask
*retmask)
{
        /* Careful. Some cpus do not strictly honor the set of cpus
         * specified in the interrupt destination when using lowest
         * priority interrupt delivery mode.
         *
         * In particular there was a hyperthreading cpu observed to
         * deliver interrupts to the wrong hyperthread when only one
         * hyperthread was specified in the interrupt desitination.
         */
        cpumask_clear(retmask);
        cpumask_bits(retmask)[0] = APIC_ALL_CPUS;
}

And the previous kernel codes were handling this and my recent changes
to vector assignments broke this behavior. My previous fix addressed a
portion of this issue and hence Zefan's keyboard etc started working.
Nevertheless there is one more corner case which needs to get addressed
and if my understanding is correct, the appended patch (ontop of the
patch that Zefan has already tested) should fix the issue.

Zefan, can you also apply this fix (untested/uncompiled) on top of the
previous fix and see if it resolves the issue? If so, I will add
appropriate changelog, comments and send it tomorrow morning for -tip
consideration after more testing. Thanks.
---

diff --git a/arch/x86/kernel/smpboot.c b/arch/x86/kernel/smpboot.c
index 678d0b8..5d9896b 100644
--- a/arch/x86/kernel/smpboot.c
+++ b/arch/x86/kernel/smpboot.c
@@ -241,6 +241,13 @@ static void __cpuinit smp_callin(void)
 	map_cpu_to_logical_apicid();
 
 	notify_cpu_starting(cpuid);
+
+	/*
+ 	 * Need to setup vector mappings before we enable interrupts.
+ 	 */
+	lock_vector_lock();
+	__setup_vector_irq(smp_processor_id());
+	unlock_vector_lock();
 	/*
 	 * Get our bogomips.
 	 *
@@ -315,7 +322,6 @@ notrace static void __cpuinit start_secondary(void
*unused)
 	 */
 	ipi_call_lock();
 	lock_vector_lock();
-	__setup_vector_irq(smp_processor_id());
 	set_cpu_online(smp_processor_id(), true);
 	unlock_vector_lock();
 	ipi_call_unlock();



      reply	other threads:[~2010-01-29  6:52 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-01-28  7:59 Li Zefan
2010-01-28 20:05 ` Suresh Siddha
2010-01-29  1:14   ` Li Zefan
2010-01-29  1:18     ` Suresh Siddha
2010-01-29  1:24       ` Li Zefan
2010-01-29  3:14         ` Jin Dongming
2010-01-29  6:51           ` Suresh Siddha [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1264747887.2689.37.camel@sbs-t61 \
    --to=suresh.b.siddha@intel.com \
    --cc=hpa@zytor.com \
    --cc=jin.dongming@np.css.fujitsu.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=lizf@cn.fujitsu.com \
    --cc=mingo@elte.hu \
    --cc=yinghai@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

Powered by JetHome