mirror of
https://github.com/torvalds/linux.git
synced 2024-11-17 01:22:07 +00:00
IOMMU Fixes for Linux v3.6-rc2
Two fixes are necessary. One patch fixes a boot crash on MacBook Air with interrupt remapping enabled and the other patch fixes a regression (which causes a boot crash on AMD IOMMUv2 systems too) in the init code of the AMD IOMMU driver. -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.11 (GNU/Linux) iQIcBAABAgAGBQJQMgntAAoJECvwRC2XARrjhTgP/jW6k9NYwJD4QOyrDkj7957V KkOfTF+TsPVlhtxwyY+hauvtKywf4rNK5l5/pYTiZlV4m06qZIlwpl/fYxjLKESA +xMgRc7GAGK0g3RKBgSqBXzmwCLPMuUab83GgmKHvjMvq7SbhMDgWklsGKRA9uni 38nOnLby1TZfTctJlZ/6SqBkYYMz13GGqdxcdlCls8OSQVa+MbgyE7eWBhhwgWVA gvuCKL6vWkl6xMZYP8lR+rf6v0DRU01aHdCduIXdpqAUr5r4qXd7yxOQEYVXPE4s xgnq4AA2un0O4c2OibrXUBCzZhKVo/yKYpTThMAmuC0RTqPhfrZ6VMyuRvbBWKgE ozRKqsKq7TrwYebGvDWVFe9wHqX7BBha4p4C5wuhX411qFXLtynYs2dcHDhf7qBk mSivpWj9K+Gmetl+HaeJ4kOpMCPLtxMu7EytsZAlfunb3VzARtv6JDLx6zceuk8g rImHNdT6kh3Oat7K1a5/tBimRm/o+3MHVCE8EDg1/XPKRWa1a5VyWaeRx4CLVxZ3 Cjqo8yvwj7EgVbyHzCMMISUEm70+Yn+l2dVJYRXCnlPaH99YXn1WLSOvlqWGpmQI rSUqH78mTPu2r5mfwqUT3cEzCgjQQfbVQ2wVBH2uY7/R5xAExukz/+6swVOdZiD/ Mo2fAVGUBz+YaaUJnqWi =nnta -----END PGP SIGNATURE----- Merge tag 'iommu-fixes-v3.6-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/joro/iommu Pull IOMMU fixes from Joerg Roedel: "Two fixes are necessary. One patch fixes a boot crash on MacBook Air with interrupt remapping enabled and the other patch fixes a regression (which causes a boot crash on AMD IOMMUv2 systems too) in the init code of the AMD IOMMU driver." * tag 'iommu-fixes-v3.6-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/joro/iommu: iommu/amd: Fix wrong check for ARRAY_SIZE() irq_remap: disable IRQ remapping if any IOAPIC lacks an IOMMU
This commit is contained in:
commit
d408ea2a0d
@ -1111,7 +1111,7 @@ static void print_iommu_info(void)
|
||||
|
||||
if (iommu->cap & (1 << IOMMU_CAP_EFR)) {
|
||||
pr_info("AMD-Vi: Extended features: ");
|
||||
for (i = 0; ARRAY_SIZE(feat_str); ++i) {
|
||||
for (i = 0; i < ARRAY_SIZE(feat_str); ++i) {
|
||||
if (iommu_feature(iommu, (1ULL << i)))
|
||||
pr_cont(" %s", feat_str[i]);
|
||||
}
|
||||
|
@ -736,6 +736,7 @@ int __init parse_ioapics_under_ir(void)
|
||||
{
|
||||
struct dmar_drhd_unit *drhd;
|
||||
int ir_supported = 0;
|
||||
int ioapic_idx;
|
||||
|
||||
for_each_drhd_unit(drhd) {
|
||||
struct intel_iommu *iommu = drhd->iommu;
|
||||
@ -748,13 +749,20 @@ int __init parse_ioapics_under_ir(void)
|
||||
}
|
||||
}
|
||||
|
||||
if (ir_supported && ir_ioapic_num != nr_ioapics) {
|
||||
printk(KERN_WARNING
|
||||
"Not all IO-APIC's listed under remapping hardware\n");
|
||||
return -1;
|
||||
if (!ir_supported)
|
||||
return 0;
|
||||
|
||||
for (ioapic_idx = 0; ioapic_idx < nr_ioapics; ioapic_idx++) {
|
||||
int ioapic_id = mpc_ioapic_id(ioapic_idx);
|
||||
if (!map_ioapic_to_ir(ioapic_id)) {
|
||||
pr_err(FW_BUG "ioapic %d has no mapping iommu, "
|
||||
"interrupt remapping will be disabled\n",
|
||||
ioapic_id);
|
||||
return -1;
|
||||
}
|
||||
}
|
||||
|
||||
return ir_supported;
|
||||
return 1;
|
||||
}
|
||||
|
||||
int __init ir_dev_scope_init(void)
|
||||
|
Loading…
Reference in New Issue
Block a user