Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 373565
b: refs/heads/master
c: dfbb6d4
h: refs/heads/master
i:
  373563: f2eaaac
v: v3
  • Loading branch information
Joerg Roedel committed Apr 19, 2013
1 parent 8ff2bec commit 4146a50
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 4 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 440e899805411d827d4fcce9eb37bf2417c812db
refs/heads/master: dfbb6d476de5a7a6e9ed10d43f626caa669cfd28
19 changes: 16 additions & 3 deletions trunk/drivers/iommu/amd_iommu_init.c
Original file line number Diff line number Diff line change
Expand Up @@ -219,6 +219,7 @@ static struct devid_map __initdata early_ioapic_map[EARLY_MAP_SIZE];
static struct devid_map __initdata early_hpet_map[EARLY_MAP_SIZE];
static int __initdata early_ioapic_map_size;
static int __initdata early_hpet_map_size;
static bool __initdata cmdline_maps;

static enum iommu_init_state init_state = IOMMU_START_STATE;

Expand Down Expand Up @@ -1686,18 +1687,28 @@ static void __init free_on_init_error(void)

static bool __init check_ioapic_information(void)
{
const char *fw_bug = FW_BUG;
bool ret, has_sb_ioapic;
int idx;

has_sb_ioapic = false;
ret = false;

/*
* If we have map overrides on the kernel command line the
* messages in this function might not describe firmware bugs
* anymore - so be careful
*/
if (cmdline_maps)
fw_bug = "";

for (idx = 0; idx < nr_ioapics; idx++) {
int devid, id = mpc_ioapic_id(idx);

devid = get_ioapic_devid(id);
if (devid < 0) {
pr_err(FW_BUG "AMD-Vi: IOAPIC[%d] not in IVRS table\n", id);
pr_err("%sAMD-Vi: IOAPIC[%d] not in IVRS table\n",
fw_bug, id);
ret = false;
} else if (devid == IOAPIC_SB_DEVID) {
has_sb_ioapic = true;
Expand All @@ -1714,11 +1725,11 @@ static bool __init check_ioapic_information(void)
* when the BIOS is buggy and provides us the wrong
* device id for the IOAPIC in the system.
*/
pr_err(FW_BUG "AMD-Vi: No southbridge IOAPIC found in IVRS table\n");
pr_err("%sAMD-Vi: No southbridge IOAPIC found\n", fw_bug);
}

if (!ret)
pr_err("AMD-Vi: Disabling interrupt remapping due to BIOS Bug(s)\n");
pr_err("AMD-Vi: Disabling interrupt remapping\n");

return ret;
}
Expand Down Expand Up @@ -2166,6 +2177,7 @@ static int __init parse_ivrs_ioapic(char *str)

devid = ((bus & 0xff) << 8) | ((dev & 0x1f) << 3) | (fn & 0x7);

cmdline_maps = true;
i = early_ioapic_map_size++;
early_ioapic_map[i].id = id;
early_ioapic_map[i].devid = devid;
Expand Down Expand Up @@ -2195,6 +2207,7 @@ static int __init parse_ivrs_hpet(char *str)

devid = ((bus & 0xff) << 8) | ((dev & 0x1f) << 3) | (fn & 0x7);

cmdline_maps = true;
i = early_hpet_map_size++;
early_hpet_map[i].id = id;
early_hpet_map[i].devid = devid;
Expand Down

0 comments on commit 4146a50

Please sign in to comment.