From: tip-bot for Suresh Siddha <suresh.b.siddha@intel.com>
To: linux-tip-commits@vger.kernel.org
Cc: linux-kernel@vger.kernel.org, hpa@zytor.com, mingo@redhat.com,
weidong.han@intel.com, suresh.b.siddha@intel.com,
tglx@linutronix.de, mingo@elte.hu
Subject: [tip:x86/apic] x86: x2apic, IR: remove reinit_intr_remapped_IO_APIC()
Date: Wed, 22 Apr 2009 10:06:56 GMT [thread overview]
Message-ID: <tip-ff166cb57a17124af75714a9c11f448f56f1a4a3@git.kernel.org> (raw)
In-Reply-To: <20090420200450.552359000@linux-os.sc.intel.com>
Commit-ID: ff166cb57a17124af75714a9c11f448f56f1a4a3
Gitweb: http://git.kernel.org/tip/ff166cb57a17124af75714a9c11f448f56f1a4a3
Author: Suresh Siddha <suresh.b.siddha@intel.com>
AuthorDate: Mon, 20 Apr 2009 13:02:30 -0700
Committer: Ingo Molnar <mingo@elte.hu>
CommitDate: Wed, 22 Apr 2009 12:03:04 +0200
x86: x2apic, IR: remove reinit_intr_remapped_IO_APIC()
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, restoration of old io-apic entries after enabling
interrupt-remapping will not make the interrupts through
io-apic functional anyway.
So remove the unnecessary reinit_intr_remapped_IO_APIC() step.
The longer story:
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.
[ Impact: remove unnecessary/broken IO-APIC setup step ]
Signed-off-by: Suresh Siddha <suresh.b.siddha@intel.com>
Acked-by: Weidong Han <weidong.han@intel.com>
Cc: dwmw2@infradead.org
LKML-Reference: <20090420200450.552359000@linux-os.sc.intel.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
---
arch/x86/include/asm/io_apic.h | 2 --
arch/x86/kernel/apic/apic.c | 2 --
arch/x86/kernel/apic/io_apic.c | 14 --------------
3 files changed, 0 insertions(+), 18 deletions(-)
diff --git a/arch/x86/include/asm/io_apic.h b/arch/x86/include/asm/io_apic.h
index 34eaa37..1cf1450 100644
--- a/arch/x86/include/asm/io_apic.h
+++ b/arch/x86/include/asm/io_apic.h
@@ -166,8 +166,6 @@ extern void free_ioapic_entries(struct IO_APIC_route_entry **ioapic_entries);
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);
diff --git a/arch/x86/kernel/apic/apic.c b/arch/x86/kernel/apic/apic.c
index d32f558..1386dbe 100644
--- a/arch/x86/kernel/apic/apic.c
+++ b/arch/x86/kernel/apic/apic.c
@@ -1412,8 +1412,6 @@ end_restore:
* IR enabling failed
*/
restore_IO_APIC_setup(ioapic_entries);
- else
- reinit_intr_remapped_IO_APIC(x2apic_preenabled, ioapic_entries);
unmask_8259A();
local_irq_restore(flags);
diff --git a/arch/x86/kernel/apic/io_apic.c b/arch/x86/kernel/apic/io_apic.c
index 4baa9cb..8aef5f9 100644
--- a/arch/x86/kernel/apic/io_apic.c
+++ b/arch/x86/kernel/apic/io_apic.c
@@ -833,20 +833,6 @@ int restore_IO_APIC_setup(struct IO_APIC_route_entry **ioapic_entries)
return 0;
}
-void reinit_intr_remapped_IO_APIC(int intr_remapping,
- struct IO_APIC_route_entry **ioapic_entries)
-
-{
- /*
- * for now plain restore of previous settings.
- * TBD: In the case of OS enabling interrupt-remapping,
- * IO-APIC RTE's need to be setup to point to interrupt-remapping
- * table entries. for now, do a plain restore, and wait for
- * the setup_IO_APIC_irqs() to do proper initialization.
- */
- restore_IO_APIC_setup(ioapic_entries);
-}
-
void free_ioapic_entries(struct IO_APIC_route_entry **ioapic_entries)
{
int apic;
next prev parent reply other threads:[~2009-04-22 10:08 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
2009-04-22 10:06 ` tip-bot for Suresh Siddha [this message]
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=tip-ff166cb57a17124af75714a9c11f448f56f1a4a3@git.kernel.org \
--to=suresh.b.siddha@intel.com \
--cc=hpa@zytor.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-tip-commits@vger.kernel.org \
--cc=mingo@elte.hu \
--cc=mingo@redhat.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).