Skip to content

Commit

Permalink
Merge branch 'x86-apic-for-linus' of git://git.kernel.org/pub/scm/lin…
Browse files Browse the repository at this point in the history
…ux/kernel/git/tip/tip

Pull x86 apic updates from Ingo Molnar:
 "Two small cleanups"

* 'x86-apic-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
  x86/apic: Fix a comment in init_apic_mappings()
  x86/apic: Remove the SET_APIC_ID(x) macro
  • Loading branch information
torvalds committed May 2, 2017
2 parents a52bbaf + 5ba039a commit 12ca7c8
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 9 deletions.
7 changes: 1 addition & 6 deletions arch/x86/include/asm/apic.h
Original file line number Diff line number Diff line change
Expand Up @@ -252,12 +252,6 @@ static inline int x2apic_enabled(void) { return 0; }
#define x2apic_supported() (0)
#endif /* !CONFIG_X86_X2APIC */

#ifdef CONFIG_X86_64
#define SET_APIC_ID(x) (apic->set_apic_id(x))
#else

#endif

/*
* Copyright 2004 James Cleverdon, IBM.
* Subject to the GNU Public License, v.2
Expand Down Expand Up @@ -299,6 +293,7 @@ struct apic {
int (*phys_pkg_id)(int cpuid_apic, int index_msb);

unsigned int (*get_apic_id)(unsigned long x);
/* Can't be NULL on 64-bit */
unsigned long (*set_apic_id)(unsigned int id);

int (*cpu_mask_to_apicid_and)(const struct cpumask *cpumask,
Expand Down
6 changes: 3 additions & 3 deletions arch/x86/kernel/apic/apic.c
Original file line number Diff line number Diff line change
Expand Up @@ -1793,8 +1793,8 @@ void __init init_apic_mappings(void)
apic_phys = mp_lapic_addr;

/*
* acpi lapic path already maps that address in
* acpi_register_lapic_address()
* If the system has ACPI MADT tables or MP info, the LAPIC
* address is already registered.
*/
if (!acpi_lapic && !smp_found_config)
register_lapic_address(apic_phys);
Expand Down Expand Up @@ -2241,7 +2241,7 @@ void __init apic_set_eoi_write(void (*eoi_write)(u32 reg, u32 v))
static void __init apic_bsp_up_setup(void)
{
#ifdef CONFIG_X86_64
apic_write(APIC_ID, SET_APIC_ID(boot_cpu_physical_apicid));
apic_write(APIC_ID, apic->set_apic_id(boot_cpu_physical_apicid));
#else
/*
* Hack: In case of kdump, after a crash, kernel might be booting
Expand Down

0 comments on commit 12ca7c8

Please sign in to comment.