Skip to content

Commit

Permalink
x86, sfi: Use register_lapic_address()
Browse files Browse the repository at this point in the history
register_lapic_address() and mp_sfi_register_lapic_address() are
almost identical. Use the common function.

Signed-off-by: Yinghai Lu <yinghai@kernel.org>
Cc: Suresh Siddha <suresh.b.siddha@intel.com>
Cc: "Eric W. Biederman" <ebiederm@xmission.com>
Cc: Len Brown <lenb@kernel.org>
LKML-Reference: <4CFDF693.6000908@kernel.org>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
  • Loading branch information
Yinghai Lu authored and Thomas Gleixner committed Dec 9, 2010
1 parent 326a2e6 commit 53301f3
Showing 1 changed file with 1 addition and 12 deletions.
13 changes: 1 addition & 12 deletions arch/x86/platform/sfi/sfi.c
Original file line number Diff line number Diff line change
Expand Up @@ -34,17 +34,6 @@
#ifdef CONFIG_X86_LOCAL_APIC
static unsigned long sfi_lapic_addr __initdata = APIC_DEFAULT_PHYS_BASE;

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

set_fixmap_nocache(FIX_APIC_BASE, mp_lapic_addr);
if (boot_cpu_physical_apicid == -1U)
boot_cpu_physical_apicid = read_apic_id();

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

/* All CPUs enumerated by SFI must be present and enabled */
static void __cpuinit mp_sfi_register_lapic(u8 id)
{
Expand Down Expand Up @@ -110,7 +99,7 @@ static int __init sfi_parse_ioapic(struct sfi_table_header *table)
int __init sfi_platform_init(void)
{
#ifdef CONFIG_X86_LOCAL_APIC
mp_sfi_register_lapic_address(sfi_lapic_addr);
register_lapic_address(sfi_lapic_addr);
sfi_table_parse(SFI_SIG_CPUS, NULL, NULL, sfi_parse_cpus);
#endif
#ifdef CONFIG_X86_IO_APIC
Expand Down

0 comments on commit 53301f3

Please sign in to comment.