mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Suresh Siddha <suresh.b.siddha@intel.com>
To: "Maciej W. Rozycki" <macro@linux-mips.org>
Cc: Ingo Molnar <mingo@redhat.com>, "hpa@zytor.com" <hpa@zytor.com>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	"ebiederm@xmission.com" <ebiederm@xmission.com>,
	"garyhade@us.ibm.com" <garyhade@us.ibm.com>,
	"tglx@linutronix.de" <tglx@linutronix.de>,
	"Sankaran, Rajesh" <rajesh.sankaran@intel.com>
Subject: Re: [tip:x86/apic] x86: Use EOI register in io-apic on intel platforms
Date: Thu, 05 Nov 2009 16:01:32 -0800	[thread overview]
Message-ID: <1257465692.4394.295.camel@sbs-t61.sc.intel.com> (raw)
In-Reply-To: <alpine.LFD.2.00.0911051415340.9725@eddie.linux-mips.org>

On Thu, 2009-11-05 at 06:46 -0800, Maciej W. Rozycki wrote:
>  For the record: the original ICH/ICH0 (82801AA/AB) seems to have the 
> version set to 0x11 as well.  Now its datasheet mentions the EOI register, 
> but even if it is not a mistake, 

hmm. what a mess.

I found a kernel log in an archive
(http://www.mail-archive.com/linux-usb-users@lists.sourceforge.net/msg13255.html) for ICH0 which shows that it uses an io-apic of version 0x20. So mostly the version in the datasheet is wrong here aswell :-(

And our IO/chipset architect (Rajesh) also confirmed that ICH0 indeed
has an EOI reg.

So, version 0x20 seems to be pretty safe to use EOI register. And
according to Gary Hade's experiments on IBM platforms having  an io-apic
version 0x11, magic of mask+edge and unmask+level seems to clear
remoteIRR.

So the current logic looks safe to me.

>  Also for the record: the 82489DX is a combined local and I/O APIC chip -- 

Thanks. This is what I learnt internally too yesterday and hence the
documentation update ;)

>  I've checked some docs too and you may want to check whether to qualify 
> the use of the EOI register further with the DT (Delivery Type) bit in the 
> Boot Configuration register.  It affects ICH2 at least

For relatively newer ICH's like ICH5, boot configuration register is
marked as a reserved register (perhaps with the serial bus going away,
so did this register but again with out the io-apic version change).

Anyways, our understanding is that EOI register in ICH2 should work
irrespective of DT bit in the boot config register.

>  Also you may want to see whether the complication in ack_apic_level() 
> that is meant to deal with an APIC erratum really matters for FSB delivery 
> -- I guess not, because if you explicitly ACK an interrupt in the I/O 
> unit, then even if it was incorrectly recorded as edge-triggered in the 
> local unit, the IRR bit will be correctly reset and the next message 
> delivered properly.  Given you introduce a conditional statement anyway, 
> you can place more code within it and there will be no performance hit for 
> the other path and certainly a gain for this one.

I am not sure if I follow. With the recent changes (tip commit
5231a68614b94f60e8f6c56bc6e3d75955b9e75e), we use ipi on a new cpu to
handle a pending level-triggered  interrupt on the cpu that is going
offline. It's just not only in the case of io-apic erratum for 0x11, we
see level triggered interrupt as edge interrupt at the cpu.


>  Additionally it seems to me that code to migrate an IRQ is placed 
> incorrectly -- the erratum workaround should be placed above it as it 
> complements ack_APIC_irq() -- the IRR bit will not have been reset before 
> the workaround has been executed if the erratum was hit.  Will you care 
> about this problem?

Yes. I see this issue and agree with your assesment. The result is that
we missed an irq migration attempt and delay it to the next arrival.

I will post a different fix and also update some of the code comments
around this to reflect new changes in the code.

> > Maciej, can I have your ack for the appended patch?
> 
>  Certainly, it looks good to me.
> 
> Acked-by: Maciej W. Rozycki <macro@linux-mips.org>

Thanks. Ingo, Can you please queue this patch too? I am planning to do
couple of more cleanups on top of this. I will post them shortly.

thanks,
suresh


  reply	other threads:[~2009-11-06  0:02 UTC|newest]

Thread overview: 25+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-10-26 22:24 [patch 0/6] x86: cleanups and fixes for irq migration code during cpu offline Suresh Siddha
2009-10-26 22:24 ` [patch 1/6] x86: unify fixup_irqs() for 32-bit and 64-bit kernels Suresh Siddha
2009-11-02 16:16   ` [tip:x86/apic] x86: Unify " tip-bot for Suresh Siddha
2009-10-26 22:24 ` [patch 2/6] x86, intr-remap: Avoid irq_chip mask/unmask in fixup_irqs() for intr-remapping Suresh Siddha
2009-11-02 16:16   ` [tip:x86/apic] " tip-bot for Suresh Siddha
2009-10-26 22:24 ` [patch 3/6] x86: remove move_cleanup_count from irq_cfg Suresh Siddha
2009-11-02 16:17   ` [tip:x86/apic] x86: Remove " tip-bot for Suresh Siddha
2009-10-26 22:24 ` [patch 4/6] x86: force irq complete move during cpu offline Suresh Siddha
2009-11-02 16:17   ` [tip:x86/apic] x86: Force " tip-bot for Suresh Siddha
2009-10-26 22:24 ` [RFC patch 5/6] x86: Use EOI register in io-apic on intel platforms Suresh Siddha
2009-11-02 16:17   ` [tip:x86/apic] " tip-bot for Suresh Siddha
2009-11-04  0:53     ` Maciej W. Rozycki
2009-11-04  2:24       ` Suresh Siddha
2009-11-04 23:04         ` Suresh Siddha
2009-11-05 14:46           ` Maciej W. Rozycki
2009-11-06  0:01             ` Suresh Siddha [this message]
2009-11-06  6:53               ` Maciej W. Rozycki
2009-11-07  7:27                 ` Suresh Siddha
2009-11-08 19:06                   ` Maciej W. Rozycki
2009-12-02  0:56                     ` Suresh Siddha
2009-10-26 22:24 ` [RFC patch 6/6] x86: remove local_irq_enable()/local_irq_disable() in fixup_irqs() Suresh Siddha
2009-11-02 16:17   ` [tip:x86/apic] x86: Remove " tip-bot for Suresh Siddha
2009-10-30 19:25 ` [patch 0/6] x86: cleanups and fixes for irq migration code during cpu offline Suresh Siddha
2009-11-02 14:59   ` Ingo Molnar
2009-11-02 17:35     ` Gary Hade

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=1257465692.4394.295.camel@sbs-t61.sc.intel.com \
    --to=suresh.b.siddha@intel.com \
    --cc=ebiederm@xmission.com \
    --cc=garyhade@us.ibm.com \
    --cc=hpa@zytor.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=macro@linux-mips.org \
    --cc=mingo@redhat.com \
    --cc=rajesh.sankaran@intel.com \
    --cc=tglx@linutronix.de \
    /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

all inboxes | Powered by JetHome®