diff options
author | Joerg Roedel <joro@8bytes.org> | 2013-04-09 13:06:18 -0400 |
---|---|---|
committer | Joerg Roedel <joro@8bytes.org> | 2013-04-19 14:52:34 -0400 |
commit | dfbb6d476de5a7a6e9ed10d43f626caa669cfd28 (patch) | |
tree | a1f23cb3999e601698f7fafd89c2fbafb98ba58d /drivers/iommu | |
parent | 440e899805411d827d4fcce9eb37bf2417c812db (diff) |
iommu/amd: Don't report firmware bugs with cmd-line ivrs overrides
When the IVRS entries for IOAPIC and HPET are overridden on
the kernel command line, a problem detected in the check
function might not be a firmware bug anymore. So disable
the firmware bug reporting if the user provided valid
ivrs_ioapic or ivrs_hpet entries on the command line.
Reviewed-by: Shuah Khan <shuahkhan@gmail.com>
Signed-off-by: Joerg Roedel <joro@8bytes.org>
Diffstat (limited to 'drivers/iommu')
-rw-r--r-- | drivers/iommu/amd_iommu_init.c | 19 |
1 files changed, 16 insertions, 3 deletions
diff --git a/drivers/iommu/amd_iommu_init.c b/drivers/iommu/amd_iommu_init.c index 030d6abf31e7..976794166481 100644 --- a/drivers/iommu/amd_iommu_init.c +++ b/drivers/iommu/amd_iommu_init.c | |||
@@ -219,6 +219,7 @@ static struct devid_map __initdata early_ioapic_map[EARLY_MAP_SIZE]; | |||
219 | static struct devid_map __initdata early_hpet_map[EARLY_MAP_SIZE]; | 219 | static struct devid_map __initdata early_hpet_map[EARLY_MAP_SIZE]; |
220 | static int __initdata early_ioapic_map_size; | 220 | static int __initdata early_ioapic_map_size; |
221 | static int __initdata early_hpet_map_size; | 221 | static int __initdata early_hpet_map_size; |
222 | static bool __initdata cmdline_maps; | ||
222 | 223 | ||
223 | static enum iommu_init_state init_state = IOMMU_START_STATE; | 224 | static enum iommu_init_state init_state = IOMMU_START_STATE; |
224 | 225 | ||
@@ -1686,18 +1687,28 @@ static void __init free_on_init_error(void) | |||
1686 | 1687 | ||
1687 | static bool __init check_ioapic_information(void) | 1688 | static bool __init check_ioapic_information(void) |
1688 | { | 1689 | { |
1690 | const char *fw_bug = FW_BUG; | ||
1689 | bool ret, has_sb_ioapic; | 1691 | bool ret, has_sb_ioapic; |
1690 | int idx; | 1692 | int idx; |
1691 | 1693 | ||
1692 | has_sb_ioapic = false; | 1694 | has_sb_ioapic = false; |
1693 | ret = false; | 1695 | ret = false; |
1694 | 1696 | ||
1697 | /* | ||
1698 | * If we have map overrides on the kernel command line the | ||
1699 | * messages in this function might not describe firmware bugs | ||
1700 | * anymore - so be careful | ||
1701 | */ | ||
1702 | if (cmdline_maps) | ||
1703 | fw_bug = ""; | ||
1704 | |||
1695 | for (idx = 0; idx < nr_ioapics; idx++) { | 1705 | for (idx = 0; idx < nr_ioapics; idx++) { |
1696 | int devid, id = mpc_ioapic_id(idx); | 1706 | int devid, id = mpc_ioapic_id(idx); |
1697 | 1707 | ||
1698 | devid = get_ioapic_devid(id); | 1708 | devid = get_ioapic_devid(id); |
1699 | if (devid < 0) { | 1709 | if (devid < 0) { |
1700 | pr_err(FW_BUG "AMD-Vi: IOAPIC[%d] not in IVRS table\n", id); | 1710 | pr_err("%sAMD-Vi: IOAPIC[%d] not in IVRS table\n", |
1711 | fw_bug, id); | ||
1701 | ret = false; | 1712 | ret = false; |
1702 | } else if (devid == IOAPIC_SB_DEVID) { | 1713 | } else if (devid == IOAPIC_SB_DEVID) { |
1703 | has_sb_ioapic = true; | 1714 | has_sb_ioapic = true; |
@@ -1714,11 +1725,11 @@ static bool __init check_ioapic_information(void) | |||
1714 | * when the BIOS is buggy and provides us the wrong | 1725 | * when the BIOS is buggy and provides us the wrong |
1715 | * device id for the IOAPIC in the system. | 1726 | * device id for the IOAPIC in the system. |
1716 | */ | 1727 | */ |
1717 | pr_err(FW_BUG "AMD-Vi: No southbridge IOAPIC found in IVRS table\n"); | 1728 | pr_err("%sAMD-Vi: No southbridge IOAPIC found\n", fw_bug); |
1718 | } | 1729 | } |
1719 | 1730 | ||
1720 | if (!ret) | 1731 | if (!ret) |
1721 | pr_err("AMD-Vi: Disabling interrupt remapping due to BIOS Bug(s)\n"); | 1732 | pr_err("AMD-Vi: Disabling interrupt remapping\n"); |
1722 | 1733 | ||
1723 | return ret; | 1734 | return ret; |
1724 | } | 1735 | } |
@@ -2166,6 +2177,7 @@ static int __init parse_ivrs_ioapic(char *str) | |||
2166 | 2177 | ||
2167 | devid = ((bus & 0xff) << 8) | ((dev & 0x1f) << 3) | (fn & 0x7); | 2178 | devid = ((bus & 0xff) << 8) | ((dev & 0x1f) << 3) | (fn & 0x7); |
2168 | 2179 | ||
2180 | cmdline_maps = true; | ||
2169 | i = early_ioapic_map_size++; | 2181 | i = early_ioapic_map_size++; |
2170 | early_ioapic_map[i].id = id; | 2182 | early_ioapic_map[i].id = id; |
2171 | early_ioapic_map[i].devid = devid; | 2183 | early_ioapic_map[i].devid = devid; |
@@ -2195,6 +2207,7 @@ static int __init parse_ivrs_hpet(char *str) | |||
2195 | 2207 | ||
2196 | devid = ((bus & 0xff) << 8) | ((dev & 0x1f) << 3) | (fn & 0x7); | 2208 | devid = ((bus & 0xff) << 8) | ((dev & 0x1f) << 3) | (fn & 0x7); |
2197 | 2209 | ||
2210 | cmdline_maps = true; | ||
2198 | i = early_hpet_map_size++; | 2211 | i = early_hpet_map_size++; |
2199 | early_hpet_map[i].id = id; | 2212 | early_hpet_map[i].id = id; |
2200 | early_hpet_map[i].devid = devid; | 2213 | early_hpet_map[i].devid = devid; |