From: Suresh Siddha <suresh.b.siddha@intel.com>
To: mingo@elte.hu, tglx@linutronix.de, hpa@zytor.com, dwmw2@infradead.org
Cc: yinghai@kernel.org, youquan.song@intel.com, joerg.roedel@amd.com,
tony.luck@intel.com, linux-kernel@vger.kernel.org,
Suresh Siddha <suresh.b.siddha@intel.com>
Subject: [patch 5/8] iommu: cleanup ifdefs in detect_intel_iommu()
Date: Tue, 23 Aug 2011 17:05:22 -0700 [thread overview]
Message-ID: <20110824001456.386003047@sbsiddha-desk.sc.intel.com> (raw)
In-Reply-To: <20110824000517.710353624@sbsiddha-desk.sc.intel.com>
[-- Attachment #1: add_dmar_irq_remapping_disabled_routines.patch --]
[-- Type: text/plain, Size: 2708 bytes --]
Signed-off-by: Suresh Siddha <suresh.b.siddha@intel.com>
---
arch/ia64/include/asm/iommu.h | 6 ++++--
drivers/iommu/dmar.c | 13 ++++++-------
include/linux/dma_remapping.h | 3 ++-
3 files changed, 12 insertions(+), 10 deletions(-)
Index: linux-2.6-tip/drivers/iommu/dmar.c
===================================================================
--- linux-2.6-tip.orig/drivers/iommu/dmar.c
+++ linux-2.6-tip/drivers/iommu/dmar.c
@@ -551,22 +551,21 @@ int __init detect_intel_iommu(void)
if (ret)
ret = check_zero_address();
{
-#ifdef CONFIG_INTR_REMAP
struct acpi_table_dmar *dmar;
dmar = (struct acpi_table_dmar *) dmar_tbl;
- if (ret && cpu_has_x2apic && dmar->flags & 0x1)
+
+ if (ret && intr_remapping_enabled && cpu_has_x2apic &&
+ dmar->flags & 0x1)
printk(KERN_INFO
- "Queued invalidation will be enabled to support "
- "x2apic and Intr-remapping.\n");
-#endif
-#ifdef CONFIG_DMAR
+ "Queued invalidation will be enabled to support x2apic and Intr-remapping.\n");
+
if (ret && !no_iommu && !iommu_detected && !dmar_disabled) {
iommu_detected = 1;
/* Make sure ACS will be enabled */
pci_request_acs();
}
-#endif
+
#ifdef CONFIG_X86
if (ret)
x86_init.iommu.iommu_init = intel_iommu_init;
Index: linux-2.6-tip/include/linux/dma_remapping.h
===================================================================
--- linux-2.6-tip.orig/include/linux/dma_remapping.h
+++ linux-2.6-tip/include/linux/dma_remapping.h
@@ -30,6 +30,7 @@ struct root_entry;
extern void free_dmar_iommu(struct intel_iommu *iommu);
extern int iommu_calculate_agaw(struct intel_iommu *iommu);
extern int iommu_calculate_max_sagaw(struct intel_iommu *iommu);
+extern int dmar_disabled;
#else
static inline int iommu_calculate_agaw(struct intel_iommu *iommu)
{
@@ -42,8 +43,8 @@ static inline int iommu_calculate_max_sa
static inline void free_dmar_iommu(struct intel_iommu *iommu)
{
}
+#define dmar_disabled (1)
#endif
-extern int dmar_disabled;
#endif
Index: linux-2.6-tip/arch/ia64/include/asm/iommu.h
===================================================================
--- linux-2.6-tip.orig/arch/ia64/include/asm/iommu.h
+++ linux-2.6-tip/arch/ia64/include/asm/iommu.h
@@ -7,12 +7,14 @@
extern void pci_iommu_shutdown(void);
extern void no_iommu_init(void);
-extern int force_iommu, no_iommu;
-extern int iommu_detected;
#ifdef CONFIG_DMAR
+extern int force_iommu, no_iommu;
extern int iommu_pass_through;
+extern int iommu_detected;
#else
#define iommu_pass_through (0)
+#define no_iommu (1)
+#define iommu_detected (0)
#endif
extern void iommu_dma_init(void);
extern void machvec_init(const char *name);
next prev parent reply other threads:[~2011-08-24 0:50 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-08-24 0:05 [patch 0/8] intel iommu, irq-remap, x2apic bug fixes and cleanups Suresh Siddha
2011-08-24 0:05 ` [patch 1/8] x86, x2apic: enable the bios request for x2apic optout Suresh Siddha
2011-08-24 0:05 ` [patch 2/8] intr_remap: call dmar_dev_scope_init() explicitly Suresh Siddha
2011-08-24 0:05 ` [patch 3/8] iommu: move IOMMU specific code to intel-iommu.c Suresh Siddha
2011-08-24 9:27 ` Roedel, Joerg
2011-08-24 18:31 ` Suresh Siddha
2011-08-25 17:05 ` Roedel, Joerg
2011-08-24 0:05 ` [patch 4/8] iommu: no need to set dmar_disabled in check_zero_address() Suresh Siddha
2011-08-24 0:05 ` Suresh Siddha [this message]
2011-08-24 0:05 ` [patch 6/8] x86, msi, intr-remap: use the ioapic set affinity routine Suresh Siddha
2011-08-24 6:57 ` Yinghai Lu
2011-08-24 0:05 ` [patch 7/8] x86, ioapic: define irq_remap_modify_chip_defaults() Suresh Siddha
2011-08-24 0:05 ` [patch 8/8] iommu: rename the DMAR and INTR_REMAP config options Suresh Siddha
2011-08-24 6:47 ` Yinghai Lu
2011-08-24 8:28 ` Roedel, Joerg
2011-08-24 18:25 ` 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=20110824001456.386003047@sbsiddha-desk.sc.intel.com \
--to=suresh.b.siddha@intel.com \
--cc=dwmw2@infradead.org \
--cc=hpa@zytor.com \
--cc=joerg.roedel@amd.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@elte.hu \
--cc=tglx@linutronix.de \
--cc=tony.luck@intel.com \
--cc=yinghai@kernel.org \
--cc=youquan.song@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
all inboxes | Powered by JetHome®