All of lore.kernel.org
 help / color / mirror / Atom feed
From: Ingo Molnar <mingo@elte.hu>
To: "Han, Weidong" <weidong.han@intel.com>
Cc: "Siddha, Suresh B" <suresh.b.siddha@intel.com>,
	"hpa@zytor.com" <hpa@zytor.com>,
	"tglx@linutronix.de" <tglx@linutronix.de>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	"dwmw2@infradead.org" <dwmw2@infradead.org>
Subject: Re: [patch 4/5] x2apic, IR: remove reinit_intr_remapped_IO_APIC()
Date: Wed, 22 Apr 2009 12:03:35 +0200	[thread overview]
Message-ID: <20090422100335.GH18226@elte.hu> (raw)
In-Reply-To: <715D42877B251141A38726ABF5CABF2C01A6B7FC31@pdsmsx503.ccr.corp.intel.com>


* Han, Weidong <weidong.han@intel.com> wrote:

> Siddha, Suresh B wrote:
> > On Tue, 2009-04-21 at 00:01 -0700, Ingo Molnar wrote:
> >> * Han, Weidong <weidong.han@intel.com> wrote:
> >> 
> >>> Siddha, Suresh B wrote:
> >>>> When interrupt-remapping is enabled, We are relying on
> >>>> setup_IO_APIC_irqs() to configure remapped entries in the IO-APIC,
> >>>> which comes little bit later after enabling interrupt-remapping.
> >>>> 
> >>>> Meanwhile, Restore of old io-apic entries after enabling
> >>>> interrupt-remapping will not make the interrupts through io-apic
> >>>> functional anyway. 
> >>>> 
> >>>> So remove unnecessary reinit_intr_remapped_IO_APIC().
> >>>> 
> >>>> Signed-off-by: Suresh Siddha <suresh.b.siddha@intel.com>
> >>>> Cc: Weidong Han <weidong.han@intel.com>
> >>>> ---
> >>>> 
> >>>> Index: tip/arch/x86/include/asm/io_apic.h
> >>>> ===================================================================
> >>>> --- tip.orig/arch/x86/include/asm/io_apic.h
> >>>> +++ tip/arch/x86/include/asm/io_apic.h
> >>>> @@ -166,8 +166,6 @@ extern void free_ioapic_entries(struct I
> >>>>  extern int save_IO_APIC_setup(struct IO_APIC_route_entry
> >>>>  **ioapic_entries); extern void mask_IO_APIC_setup(struct
> >>>>  IO_APIC_route_entry **ioapic_entries); extern int
> >>>> restore_IO_APIC_setup(struct IO_APIC_route_entry **ioapic_entries);
> >>>> -extern void reinit_intr_remapped_IO_APIC(int intr_remapping,
> >>>> -	struct IO_APIC_route_entry **ioapic_entries);
> >>>> 
> >>>>  extern void probe_nr_irqs_gsi(void);
> >>>> 
> >>>> Index: tip/arch/x86/kernel/apic/apic.c
> >>>> ===================================================================
> >>>> --- tip.orig/arch/x86/kernel/apic/apic.c
> >>>> +++ tip/arch/x86/kernel/apic/apic.c
> >>>> @@ -1416,8 +1416,6 @@ end_restore:
> >>>>  		 * IR enabling failed
> >>>>  		 */
> >>>>  		restore_IO_APIC_setup(ioapic_entries);
> >>>> -	else
> >>>> -		reinit_intr_remapped_IO_APIC(x2apic_preenabled, ioapic_entries);
> >>> 
> >>> Whether IR enabling succeeds or fails, it always needs to restore
> >>> old IOAPIC entries. Due to removing reinit_intr_remapped_IO_APIC
> >>> here, it needs to also remove the "if (ret)" before
> >>> restore_IO_APIC_setup(ioapic_entries);
> >> 
> >> Ok - i skipped this patch for now.
> > 
> > Let me clarify what I am doing in this patch:
> > 
> > When interrupt-remapping is enabled, IO-APIC entries need to be setup
> > in the re-mappable format (pointing to interrupt-remapping table
> > entries setup by the OS). This remapping configuration is happening
> > in the same place where we traditionally configure IO-APIC (i.e., in
> > setup_IO_APIC_irqs()).
> > 
> > So when we enable interrupt-remapping successfully, there is no need
> > to restore old io-apic RTE entries before we actually do a complete
> > configuration shortly in setup_IO_APIC_irqs(). Old IO-APIC RTE's may
> > be in traditional format (non re-mappable) or in re-mappable format
> > pointing to interrupt-remapping table entries setup by BIOS. Restoring
> > both of these will not make IO-APIC functional. We have to rely on
> > setup_IO_APIC_irqs() for proper configuration by OS.
> > 
> > So I am removing this unnecessary and broken step.
> > 
> > When enabling interrupt-remapping is not successful, we are doing
> > plain restore of old RTE's (which will still work as we went back to
> > original no-remapping state). Complete IO-APIC configuration will be
> > done shortly in setup_IO_APIC_irqs().
> > 
> 
> Clear explanation. I misunderstood it. This patch is fine.

Applied to tip:x86/apic - thanks guys,

	Ingo

  reply	other threads:[~2009-04-22 10:04 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-04-20 20:02 [patch 1/5] x2apic, IR: cleanup X86_X2APIC and INTR_REMAP config checks Suresh Siddha
2009-04-20 20:02 ` [patch 2/5] x2apic, IR: Fix compiler warning with !CONFIG_INTR_REMAP Suresh Siddha
2009-04-21  8:07   ` [tip:x86/apic] x86: x2apic, IR: Move eoi_ioapic_irq() into a CONFIG_INTR_REMAP section tip-bot for Suresh Siddha
2009-04-21 14:04     ` Cyrill Gorcunov
2009-04-20 20:02 ` [patch 3/5] x2apic, IR: cleanup panic() with nox2apic boot option Suresh Siddha
2009-04-21  7:01   ` Ingo Molnar
2009-04-21  8:07   ` [tip:x86/apic] x86: x2apic, IR: Clean up " tip-bot for Suresh Siddha
2009-04-20 20:02 ` [patch 4/5] x2apic, IR: remove reinit_intr_remapped_IO_APIC() Suresh Siddha
2009-04-21  6:37   ` Han, Weidong
2009-04-21  7:01     ` Ingo Molnar
2009-04-21 18:24       ` Suresh Siddha
2009-04-22  2:55         ` Han, Weidong
2009-04-22 10:03           ` Ingo Molnar [this message]
2009-04-22 10:06   ` [tip:x86/apic] x86: " tip-bot for Suresh Siddha
2009-04-20 20:02 ` [patch 5/5] x2apic, IR: Make config X86_UV dependent on X86_X2APIC Suresh Siddha
2009-04-20 20:33   ` Jack Steiner
2009-04-21  8:07   ` [tip:x86/apic] x86: " tip-bot for Suresh Siddha
2009-04-21  6:58 ` [patch 1/5] x2apic, IR: cleanup X86_X2APIC and INTR_REMAP config checks Ingo Molnar
2009-04-21  8:06 ` [tip:x86/apic] x86: x2apic, IR: Clean up " tip-bot for Suresh Siddha

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=20090422100335.GH18226@elte.hu \
    --to=mingo@elte.hu \
    --cc=dwmw2@infradead.org \
    --cc=hpa@zytor.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=suresh.b.siddha@intel.com \
    --cc=tglx@linutronix.de \
    --cc=weidong.han@intel.com \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.