aboutsummaryrefslogtreecommitdiff
path: root/arch/x86/kernel/mpparse_64.c
diff options
context:
space:
mode:
authorAlexey Starikovskiy <astarikovskiy@suse.de>2008-04-04 23:42:53 +0400
committerIngo Molnar <mingo@elte.hu>2008-04-17 17:41:36 +0200
commit22cbb4bd12a86b80125accb77515482894ee670f (patch)
tree0a12dbb766272c5b0fc27f915e07c5c96887b75f /arch/x86/kernel/mpparse_64.c
parent92fd4b7abdb2b5b85d73ca0adbb6ad3f8b79f805 (diff)
x86: unify uniq_io_apic_id
Signed-off-by: Alexey Starikovskiy <astarikovskiy@suse.de> Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'arch/x86/kernel/mpparse_64.c')
-rw-r--r--arch/x86/kernel/mpparse_64.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/arch/x86/kernel/mpparse_64.c b/arch/x86/kernel/mpparse_64.c
index 9a961008991..de64a89434c 100644
--- a/arch/x86/kernel/mpparse_64.c
+++ b/arch/x86/kernel/mpparse_64.c
@@ -707,6 +707,13 @@ static int mp_find_ioapic(int gsi)
static u8 uniq_ioapic_id(u8 id)
{
+#ifdef CONFIG_X86_32
+ if ((boot_cpu_data.x86_vendor == X86_VENDOR_INTEL) &&
+ !APIC_XAPIC(apic_version[boot_cpu_physical_apicid]))
+ return io_apic_get_unique_id(nr_ioapics, id);
+ else
+ return id;
+#else
int i;
DECLARE_BITMAP(used, 256);
bitmap_zero(used, 256);
@@ -717,6 +724,7 @@ static u8 uniq_ioapic_id(u8 id)
if (!test_bit(id, used))
return id;
return find_first_zero_bit(used, 256);
+#endif
}
void __init mp_register_ioapic(int id, u32 address, u32 gsi_base)