mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Kenji Kaneshige <kaneshige.kenji@jp.fujitsu.com>
To: Suresh Siddha <suresh.b.siddha@intel.com>
Cc: "tglx@linutronix.de" <tglx@linutronix.de>,
	"mingo@redhat.com" <mingo@redhat.com>,
	"hpa@zytor.com" <hpa@zytor.com>,
	"x86@kernel.org" <x86@kernel.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	"indou.takao@jp.fujitsu.com" <indou.takao@jp.fujitsu.com>
Subject: Re: [PATCH 1/2] dmar: fix fault interrupt setup
Date: Wed, 01 Dec 2010 14:13:52 +0900	[thread overview]
Message-ID: <4CF5D990.7070407@jp.fujitsu.com> (raw)
In-Reply-To: <1291148304.5836.1.camel@sbsiddha-MOBL3>

(2010/12/01 5:18), Suresh Siddha wrote:
> On Tue, 2010-11-30 at 00:30 -0800, Kenji Kaneshige wrote:
>> Fix the problem dmar fault event is not notified in x2apic cluster mode.
>>
>> In the current code, dmar fault event is configured before setting up
>> the x86_cpu_to_logical_apicid percpu variable in x2apic cluster
>> mode. Because of this, invalid apic ID is used for dmar fault
>> interrupt and this cuases the problem.
>>
>> To fix the problem, do dmar fault event configuration after local apic
>> setup (after end_local_APIC_setup()).
>>
>> Signed-off-by: Kenji Kaneshige<kaneshige.kenji@jp.fujitsu.com>
>>
>>
>> ---
>>   arch/x86/kernel/apic/apic.c     |    9 +++++++++
>>   arch/x86/kernel/apic/probe_64.c |    7 -------
>>   2 files changed, 9 insertions(+), 7 deletions(-)
>>
>> Index: linux-next-20101125/arch/x86/kernel/apic/apic.c
>> ===================================================================
>> --- linux-next-20101125.orig/arch/x86/kernel/apic/apic.c
>> +++ linux-next-20101125/arch/x86/kernel/apic/apic.c
>> @@ -1745,6 +1745,15 @@ int __init APIC_init_uniprocessor(void)
>>
>>   	end_local_APIC_setup();
>>
>> +#ifdef CONFIG_INTR_REMAP
>> +	/*
>> +	 * Now that local APIC setup is completed, configure the fault
>> +	 * handling for interrupt remapping.
>> +	 */
>> +	if (intr_remapping_enabled)
>> +		enable_drhd_fault_handling();
>> +#endif
> 
> BTW, this is wrong. APIC_init_uniprocessor() gets called only for UP
> kernel. I will move it to the end_local_APIC_setup()
> 

Oh, it's totally wrong. I'm sorry about that.

Maybe even with my wrong patch, dmar interrupt is configured in the
intel_iommu_init()->init_dmars()->dmar_set_interrupt() code path. I
think this is why I could not noticed my badness in my test.

By the way, why do we need to try to configure dmar interrupt in the
intel_iommu_init() code path again?

Regards,
Kenji Kaneshige


  reply	other threads:[~2010-12-01  5:14 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-11-30  8:28 [PATCH 0/2] Fix dmar fault interrupt problems Kenji Kaneshige
2010-11-30  8:30 ` [PATCH 1/2] dmar: fix fault interrupt setup Kenji Kaneshige
2010-11-30 20:18   ` Suresh Siddha
2010-12-01  5:13     ` Kenji Kaneshige [this message]
2010-11-30  8:32 ` [PATCH 2/2] dmar: Fix dmar interrupt affinity handling Kenji Kaneshige
2010-11-30 18:09 ` [PATCH 0/2] Fix dmar fault interrupt problems Suresh Siddha
2010-11-30 18:13   ` Chris Wright
2010-11-30 18:20     ` Suresh Siddha
2010-11-30 19:28       ` Chris Wright
2010-11-30 19:52         ` Suresh Siddha
2010-11-30 22:20           ` Chris Wright

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=4CF5D990.7070407@jp.fujitsu.com \
    --to=kaneshige.kenji@jp.fujitsu.com \
    --cc=hpa@zytor.com \
    --cc=indou.takao@jp.fujitsu.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@redhat.com \
    --cc=suresh.b.siddha@intel.com \
    --cc=tglx@linutronix.de \
    --cc=x86@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