The patch titled Subject: x86-pci-increase-the-number-of-iommus-supported-to-be-max_io_apics-v2 has been removed from the -mm tree. Its filename was x86-pci-increase-the-number-of-iommus-supported-to-be-max_io_apics-v2.patch This patch was dropped because it was folded into x86-pci-increase-the-number-of-iommus-supported-to-be-max_io_apics.patch The current -mm tree may be found at http://userweb.kernel.org/~akpm/mmotm/ ------------------------------------------------------ From: Mike Travis <travis@xxxxxxx> Subject: x86-pci-increase-the-number-of-iommus-supported-to-be-max_io_apics-v2 Version 2: Fix compile error on ia64 (it uses the DMAR logic but does not define MAX_IO_APICS.) Check to insure that iommu_bmp does not overflow. Signed-off-by: Mike Travis <travis@xxxxxxx> Signed-off-by: Jack Steiner <steiner@xxxxxxx> Cc: Ingo Molnar <mingo@xxxxxxx> Cc: Jack Steiner <steiner@xxxxxxx> Cc: David Woodhouse <dwmw2@xxxxxxxxxxxxx> Cc: Chris Wright <chrisw@xxxxxxxxxxxx> Cc: Daniel Rahn <drahn@xxxxxxxx> Cc: Jesse Barnes <jbarnes@xxxxxxxxxxxxxxxx> Signed-off-by: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx> --- drivers/iommu/intel-iommu.c | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) diff -puN drivers/iommu/intel-iommu.c~x86-pci-increase-the-number-of-iommus-supported-to-be-max_io_apics-v2 drivers/iommu/intel-iommu.c --- a/drivers/iommu/intel-iommu.c~x86-pci-increase-the-number-of-iommus-supported-to-be-max_io_apics-v2 +++ a/drivers/iommu/intel-iommu.c @@ -354,10 +354,17 @@ static int hw_pass_through = 1; /* si_domain contains mulitple devices */ #define DOMAIN_FLAG_STATIC_IDENTITY (1 << 2) +/* define the limit of IOMMUs supported in each domain */ +#ifdef CONFIG_X86 +#define IOMMU_UNITS_SUPPORTED MAX_IO_APICS +#else +#define IOMMU_UNITS_SUPPORTED 64 +#endif + struct dmar_domain { int id; /* domain id */ int nid; /* node id */ - DECLARE_BITMAP(iommu_bmp, MAX_IO_APICS); + DECLARE_BITMAP(iommu_bmp, IOMMU_UNITS_SUPPORTED); /* bitmap of iommus this domain uses*/ struct list_head devices; /* all devices' list */ @@ -2401,12 +2408,17 @@ static int __init init_dmars(void) * endfor */ for_each_drhd_unit(drhd) { - g_num_of_iommus++; /* * lock not needed as this is only incremented in the single * threaded kernel __init code path all other access are read * only */ + if (g_num_of_iommus < IOMMU_UNITS_SUPPORTED) + g_num_of_iommus++; + else + printk_once(KERN_ERR, + "MAX number (%d) of IOMMUs supported exceeded\n", + IOMMU_UNITS_SUPPORTED); } g_iommus = kcalloc(g_num_of_iommus, sizeof(struct intel_iommu *), _ Patches currently in -mm which might be from travis@xxxxxxx are linux-next.patch x86-pci-fix-identity-mapping-for-sandy-bridge.patch x86-pci-increase-the-number-of-iommus-supported-to-be-max_io_apics.patch x86-pci-increase-the-number-of-iommus-supported-to-be-max_io_apics-v2-fix.patch -- To unsubscribe from this list: send the line "unsubscribe mm-commits" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html