Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 349730
b: refs/heads/master
c: cb214ed
h: refs/heads/master
v: v3
  • Loading branch information
Stoney Wang authored and Ingo Molnar committed Feb 11, 2013
1 parent 8d78643 commit c05d116
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 11 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: 686966d881bd49bd6349b47c59dfc4bfc7b5e3b6
refs/heads/master: cb214ede7657db458fd0b2a25ea0b28dbf900ebc
21 changes: 11 additions & 10 deletions trunk/arch/x86/kernel/apic/x2apic_phys.c
Original file line number Diff line number Diff line change
Expand Up @@ -20,18 +20,19 @@ static int set_x2apic_phys_mode(char *arg)
}
early_param("x2apic_phys", set_x2apic_phys_mode);

static int x2apic_acpi_madt_oem_check(char *oem_id, char *oem_table_id)
static bool x2apic_fadt_phys(void)
{
if (x2apic_phys)
return x2apic_enabled();
else if ((acpi_gbl_FADT.header.revision >= FADT2_REVISION_ID) &&
(acpi_gbl_FADT.flags & ACPI_FADT_APIC_PHYSICAL) &&
x2apic_enabled()) {
if ((acpi_gbl_FADT.header.revision >= FADT2_REVISION_ID) &&
(acpi_gbl_FADT.flags & ACPI_FADT_APIC_PHYSICAL)) {
printk(KERN_DEBUG "System requires x2apic physical mode\n");
return 1;
return true;
}
else
return 0;
return false;
}

static int x2apic_acpi_madt_oem_check(char *oem_id, char *oem_table_id)
{
return x2apic_enabled() && (x2apic_phys || x2apic_fadt_phys());
}

static void
Expand Down Expand Up @@ -82,7 +83,7 @@ static void init_x2apic_ldr(void)

static int x2apic_phys_probe(void)
{
if (x2apic_mode && x2apic_phys)
if (x2apic_mode && (x2apic_phys || x2apic_fadt_phys()))
return 1;

return apic == &apic_x2apic_phys;
Expand Down

0 comments on commit c05d116

Please sign in to comment.