From: Stephen Rothwell <sfr@canb•auug.org.au>
To: Thomas Gleixner <tglx@linutronix•de>, Ingo Molnar <mingo@elte•hu>,
"H. Peter Anvin" <hpa@zytor•com>,
Peter Zijlstra <peterz@infradead•org>,
Joerg Roedel <joro@8bytes•org>
Cc: linux-next@vger•kernel.org, linux-kernel@vger•kernel.org,
Joerg Roedel <jroedel@suse•de>,
Jiang Liu <jiang.liu@linux•intel.com>
Subject: linux-next: manual merge of the tip tree with the iommu tree
Date: Tue, 9 Jun 2015 16:57:26 +1000 [thread overview]
Message-ID: <20150609165726.5f5440d4@canb.auug.org.au> (raw)
[-- Attachment #1: Type: text/plain, Size: 3911 bytes --]
Hi all,
Today's linux-next merge of the tip tree got a conflict in
drivers/iommu/intel_irq_remapping.c between commits 82a09c904f6a
("iommu/vt-d: Load old data structures only in kdump kernel") and
b1e27c302979 ("iommu/vt-d: Move EIM detection to
intel_prepare_irq_remapping") from the iommu tree and commits
b106ee63abcc ("irq_remapping/vt-d: Enhance Intel IR driver to support
hierarchical irqdomains") and 84bea5cc7709 ("x86/irq: Remove
x86_io_apic_ops.print_entries and related interfaces") from the tip
tree.
I fixed it up (see below) and can carry the fix as necessary (no action
is required).
--
Cheers,
Stephen Rothwell sfr@canb•auug.org.au
diff --cc drivers/iommu/intel_irq_remapping.c
index b49aa8cf9d13,8fad71cc27e7..000000000000
--- a/drivers/iommu/intel_irq_remapping.c
+++ b/drivers/iommu/intel_irq_remapping.c
@@@ -11,7 -8,7 +11,8 @@@
#include <linux/irq.h>
#include <linux/intel-iommu.h>
#include <linux/acpi.h>
+#include <linux/crash_dump.h>
+ #include <linux/irqdomain.h>
#include <asm/io_apic.h>
#include <asm/smp.h>
#include <asm/cpu.h>
@@@ -118,9 -98,8 +105,8 @@@ static int alloc_irte(struct intel_iomm
index = bitmap_find_free_region(table->bitmap,
INTR_REMAP_TABLE_ENTRIES, mask);
if (index < 0) {
- pr_warn("IR%d: can't allocate an IRTE\n", iommu->seq_id);
+ pr_warn("Can't allocate an IRTE for IR[%d]\n", iommu->seq_id);
} else {
- cfg->remapped = 1;
irq_iommu->iommu = iommu;
irq_iommu->irte_index = index;
irq_iommu->sub_handle = 0;
@@@ -502,10 -413,9 +427,9 @@@ static int intel_setup_irq_remapping(st
pages = alloc_pages_node(iommu->node, GFP_KERNEL | __GFP_ZERO,
INTR_REMAP_PAGE_ORDER);
-
if (!pages) {
- pr_err("IR%d: failed to allocate pages of order %d\n",
- iommu->seq_id, INTR_REMAP_PAGE_ORDER);
+ pr_err("Failed to allocate pages of order %d for IR[%d]\n",
+ INTR_REMAP_PAGE_ORDER, iommu->seq_id);
goto out_free_table;
}
@@@ -519,41 -439,10 +453,43 @@@
ir_table->base = page_address(pages);
ir_table->bitmap = bitmap;
iommu->ir_table = ir_table;
+
+ if (!iommu->qi) {
+ /*
+ * Clear previous faults.
+ */
+ dmar_fault(-1, iommu);
+ dmar_disable_qi(iommu);
+ if (dmar_enable_qi(iommu)) {
+ pr_err("Failed to enable queued invalidation\n");
+ goto out_free_pages;
+ }
+ }
+
+ iommu_check_pre_ir_status(iommu);
+
+ if (!is_kdump_kernel() && iommu->pre_enabled_ir) {
+ iommu_disable_irq_remapping(iommu);
+ iommu->pre_enabled_ir = 0;
+ pr_warn("IRQ remapping was enabled on %s but we are not in kdump mode\n",
+ iommu->name);
+ }
+
+ if (iommu->pre_enabled_ir) {
+ if (iommu_load_old_irte(iommu))
+ pr_err("Failed to copy IR table for %s from previous kernel\n",
+ iommu->name);
+ else
+ pr_info("Copied IR table for %s from previous kernel\n",
+ iommu->name);
+ }
+
+ iommu_set_irq_remapping(iommu, eim_mode);
+
return 0;
+ out_free_bitmap:
+ kfree(bitmap);
out_free_pages:
__free_pages(pages, INTR_REMAP_PAGE_ORDER);
out_free_table:
@@@ -709,16 -646,9 +653,9 @@@ static int __init intel_enable_irq_rema
irq_remapping_enabled = 1;
- /*
- * VT-d has a different layout for IO-APIC entries when
- * interrupt remapping is enabled. So it needs a special routine
- * to print IO-APIC entries for debugging purposes too.
- */
- x86_io_apic_ops.print_entries = intel_ir_io_apic_print_entries;
-
- pr_info("Enabled IRQ remapping in %s mode\n", eim_mode ? "x2apic" : "xapic");
+ pr_info("Enabled IRQ remapping in %s mode\n", eim ? "x2apic" : "xapic");
- return eim ? IRQ_REMAP_X2APIC_MODE : IRQ_REMAP_XAPIC_MODE;
+ return eim_mode ? IRQ_REMAP_X2APIC_MODE : IRQ_REMAP_XAPIC_MODE;
error:
intel_cleanup_irq_remapping();
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 819 bytes --]
next reply other threads:[~2015-06-09 6:57 UTC|newest]
Thread overview: 25+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-06-09 6:57 Stephen Rothwell [this message]
-- strict thread matches above, loose matches on Subject: below --
2023-04-03 4:36 linux-next: manual merge of the tip tree with the iommu tree Stephen Rothwell
2023-04-03 5:11 ` Stephen Rothwell
2022-11-14 4:10 Stephen Rothwell
2022-03-07 1:50 Stephen Rothwell
2021-10-21 1:35 Stephen Rothwell
2021-10-21 15:29 ` Borislav Petkov
2021-11-02 2:57 ` Stephen Rothwell
2020-10-02 5:22 Stephen Rothwell
2020-10-13 3:38 ` Stephen Rothwell
2017-08-22 3:50 Stephen Rothwell
2017-08-22 5:57 ` Baoquan He
2017-08-22 7:49 ` Stephen Rothwell
2017-08-22 8:01 ` Baoquan He
2017-08-22 8:43 ` Stephen Rothwell
2017-08-22 8:50 ` Baoquan He
2017-08-22 8:11 ` Baoquan He
2017-08-23 14:15 ` Tom Lendacky
2017-09-04 5:45 ` Stephen Rothwell
2015-06-17 3:22 Michael Ellerman
2015-06-17 9:57 ` Joerg Roedel
2015-06-17 21:15 ` Michael Ellerman
2015-06-09 6:57 Stephen Rothwell
[not found] <20150605085030.17051140293@ozlabs.org>
2015-06-05 8:57 ` Joerg Roedel
2011-09-27 5:03 Stephen Rothwell
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=20150609165726.5f5440d4@canb.auug.org.au \
--to=sfr@canb$(echo .)auug.org.au \
--cc=hpa@zytor$(echo .)com \
--cc=jiang.liu@linux$(echo .)intel.com \
--cc=joro@8bytes$(echo .)org \
--cc=jroedel@suse$(echo .)de \
--cc=linux-kernel@vger$(echo .)kernel.org \
--cc=linux-next@vger$(echo .)kernel.org \
--cc=mingo@elte$(echo .)hu \
--cc=peterz@infradead$(echo .)org \
--cc=tglx@linutronix$(echo .)de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
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