diff options
author | Alexey Starikovskiy <astarikovskiy@suse.de> | 2008-04-04 15:43:00 -0400 |
---|---|---|
committer | Ingo Molnar <mingo@elte.hu> | 2008-04-17 11:41:36 -0400 |
commit | 57b733e902f179dc453609db6334f8e9801cbb7a (patch) | |
tree | 4a8a77619bc1bed1356253b44e71a26123f7b6bf /arch/x86/kernel | |
parent | 22cbb4bd12a86b80125accb77515482894ee670f (diff) |
x86: unify mp_register_ioapic
Signed-off-by: Alexey Starikovskiy <astarikovskiy@suse.de>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'arch/x86/kernel')
-rw-r--r-- | arch/x86/kernel/mpparse_32.c | 10 | ||||
-rw-r--r-- | arch/x86/kernel/mpparse_64.c | 16 |
2 files changed, 15 insertions, 11 deletions
diff --git a/arch/x86/kernel/mpparse_32.c b/arch/x86/kernel/mpparse_32.c index a50a31331f97..1ad8a5d4e3ee 100644 --- a/arch/x86/kernel/mpparse_32.c +++ b/arch/x86/kernel/mpparse_32.c | |||
@@ -854,8 +854,11 @@ void __init mp_register_ioapic(int id, u32 address, u32 gsi_base) | |||
854 | 854 | ||
855 | set_fixmap_nocache(FIX_IO_APIC_BASE_0 + idx, address); | 855 | set_fixmap_nocache(FIX_IO_APIC_BASE_0 + idx, address); |
856 | mp_ioapics[idx].mpc_apicid = uniq_ioapic_id(id); | 856 | mp_ioapics[idx].mpc_apicid = uniq_ioapic_id(id); |
857 | #ifdef CONFIG_X86_32 | ||
857 | mp_ioapics[idx].mpc_apicver = io_apic_get_version(idx); | 858 | mp_ioapics[idx].mpc_apicver = io_apic_get_version(idx); |
858 | 859 | #else | |
860 | mp_ioapics[idx].mpc_apicver = 0; | ||
861 | #endif | ||
859 | /* | 862 | /* |
860 | * Build basic GSI lookup table to facilitate gsi->io_apic lookups | 863 | * Build basic GSI lookup table to facilitate gsi->io_apic lookups |
861 | * and to prevent reprogramming of IOAPIC pins (PCI GSIs). | 864 | * and to prevent reprogramming of IOAPIC pins (PCI GSIs). |
@@ -865,10 +868,9 @@ void __init mp_register_ioapic(int id, u32 address, u32 gsi_base) | |||
865 | mp_ioapic_routing[idx].gsi_end = gsi_base + | 868 | mp_ioapic_routing[idx].gsi_end = gsi_base + |
866 | io_apic_get_redir_entries(idx); | 869 | io_apic_get_redir_entries(idx); |
867 | 870 | ||
868 | printk("IOAPIC[%d]: apic_id %d, version %d, address 0x%x, " | 871 | printk(KERN_INFO "IOAPIC[%d]: apic_id %d, version %d, address 0x%x, " |
869 | "GSI %d-%d\n", idx, mp_ioapics[idx].mpc_apicid, | 872 | "GSI %d-%d\n", idx, mp_ioapics[idx].mpc_apicid, |
870 | mp_ioapics[idx].mpc_apicver, | 873 | mp_ioapics[idx].mpc_apicver, mp_ioapics[idx].mpc_apicaddr, |
871 | mp_ioapics[idx].mpc_apicaddr, | ||
872 | mp_ioapic_routing[idx].gsi_base, mp_ioapic_routing[idx].gsi_end); | 874 | mp_ioapic_routing[idx].gsi_base, mp_ioapic_routing[idx].gsi_end); |
873 | 875 | ||
874 | nr_ioapics++; | 876 | nr_ioapics++; |
diff --git a/arch/x86/kernel/mpparse_64.c b/arch/x86/kernel/mpparse_64.c index de64a89434c6..5f1f7fdcd627 100644 --- a/arch/x86/kernel/mpparse_64.c +++ b/arch/x86/kernel/mpparse_64.c | |||
@@ -742,11 +742,14 @@ void __init mp_register_ioapic(int id, u32 address, u32 gsi_base) | |||
742 | 742 | ||
743 | set_fixmap_nocache(FIX_IO_APIC_BASE_0 + idx, address); | 743 | set_fixmap_nocache(FIX_IO_APIC_BASE_0 + idx, address); |
744 | mp_ioapics[idx].mpc_apicid = uniq_ioapic_id(id); | 744 | mp_ioapics[idx].mpc_apicid = uniq_ioapic_id(id); |
745 | #ifdef CONFIG_X86_32 | ||
746 | mp_ioapics[idx].mpc_apicver = io_apic_get_version(idx); | ||
747 | #else | ||
745 | mp_ioapics[idx].mpc_apicver = 0; | 748 | mp_ioapics[idx].mpc_apicver = 0; |
746 | 749 | #endif | |
747 | /* | 750 | /* |
748 | * Build basic IRQ lookup table to facilitate gsi->io_apic lookups | 751 | * Build basic GSI lookup table to facilitate gsi->io_apic lookups |
749 | * and to prevent reprogramming of IOAPIC pins (PCI IRQs). | 752 | * and to prevent reprogramming of IOAPIC pins (PCI GSIs). |
750 | */ | 753 | */ |
751 | mp_ioapic_routing[idx].apic_id = mp_ioapics[idx].mpc_apicid; | 754 | mp_ioapic_routing[idx].apic_id = mp_ioapics[idx].mpc_apicid; |
752 | mp_ioapic_routing[idx].gsi_base = gsi_base; | 755 | mp_ioapic_routing[idx].gsi_base = gsi_base; |
@@ -755,9 +758,8 @@ void __init mp_register_ioapic(int id, u32 address, u32 gsi_base) | |||
755 | 758 | ||
756 | printk(KERN_INFO "IOAPIC[%d]: apic_id %d, address 0x%x, " | 759 | printk(KERN_INFO "IOAPIC[%d]: apic_id %d, address 0x%x, " |
757 | "GSI %d-%d\n", idx, mp_ioapics[idx].mpc_apicid, | 760 | "GSI %d-%d\n", idx, mp_ioapics[idx].mpc_apicid, |
758 | mp_ioapics[idx].mpc_apicaddr, | 761 | mp_ioapics[idx].mpc_apicver, mp_ioapics[idx].mpc_apicaddr, |
759 | mp_ioapic_routing[idx].gsi_base, | 762 | mp_ioapic_routing[idx].gsi_base, mp_ioapic_routing[idx].gsi_end); |
760 | mp_ioapic_routing[idx].gsi_end); | ||
761 | 763 | ||
762 | nr_ioapics++; | 764 | nr_ioapics++; |
763 | } | 765 | } |