Skip to content

Commit

Permalink
x86: move mp_register_lapic_address to boot.c
Browse files Browse the repository at this point in the history
Signed-off-by: Alexey Starikovskiy <astarikovskiy@suse.de>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
  • Loading branch information
Alexey Starikovskiy authored and Ingo Molnar committed Apr 17, 2008
1 parent dfac218 commit 31d2092
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 22 deletions.
12 changes: 11 additions & 1 deletion arch/x86/kernel/acpi/boot.c
Original file line number Diff line number Diff line change
Expand Up @@ -765,6 +765,16 @@ static int __init acpi_parse_fadt(struct acpi_table_header *table)
* Parse LAPIC entries in MADT
* returns 0 on success, < 0 on error
*/

static void __init acpi_register_lapic_address(unsigned long address)
{
mp_lapic_addr = address;

set_fixmap_nocache(FIX_APIC_BASE, address);
if (boot_cpu_physical_apicid == -1U)
boot_cpu_physical_apicid = GET_APIC_ID(read_apic_id());
}

static int __init acpi_parse_madt_lapic_entries(void)
{
int count;
Expand All @@ -786,7 +796,7 @@ static int __init acpi_parse_madt_lapic_entries(void)
return count;
}

mp_register_lapic_address(acpi_lapic_addr);
acpi_register_lapic_address(acpi_lapic_addr);

count = acpi_table_parse_madt(ACPI_MADT_TYPE_LOCAL_SAPIC,
acpi_parse_sapic, MAX_APICS);
Expand Down
12 changes: 0 additions & 12 deletions arch/x86/kernel/mpparse_32.c
Original file line number Diff line number Diff line change
Expand Up @@ -785,18 +785,6 @@ void __init find_smp_config (void)

#ifdef CONFIG_ACPI

void __init mp_register_lapic_address(u64 address)
{
mp_lapic_addr = (unsigned long) address;

set_fixmap_nocache(FIX_APIC_BASE, mp_lapic_addr);

if (boot_cpu_physical_apicid == -1U)
boot_cpu_physical_apicid = GET_APIC_ID(read_apic_id());

Dprintk("Boot CPU = %d\n", boot_cpu_physical_apicid);
}

#ifdef CONFIG_X86_IO_APIC

#define MP_ISA_BUS 0
Expand Down
8 changes: 0 additions & 8 deletions arch/x86/kernel/mpparse_64.c
Original file line number Diff line number Diff line change
Expand Up @@ -594,14 +594,6 @@ void __init find_smp_config(void)

#ifdef CONFIG_ACPI

void __init mp_register_lapic_address(u64 address)
{
mp_lapic_addr = (unsigned long)address;
set_fixmap_nocache(FIX_APIC_BASE, mp_lapic_addr);
if (boot_cpu_physical_apicid == -1U)
boot_cpu_physical_apicid = GET_APIC_ID(read_apic_id());
}

#define MP_ISA_BUS 0
#define MP_MAX_IOAPIC_PIN 127

Expand Down
1 change: 0 additions & 1 deletion include/asm-x86/mpspec.h
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,6 @@ extern void get_smp_config(void);

void __cpuinit generic_processor_info(int apicid, int version);
#ifdef CONFIG_ACPI
extern void mp_register_lapic_address(u64 address);
extern void mp_register_ioapic(int id, u32 address, u32 gsi_base);
extern void mp_override_legacy_irq(u8 bus_irq, u8 polarity, u8 trigger,
u32 gsi);
Expand Down

0 comments on commit 31d2092

Please sign in to comment.