Skip to content

Commit 12ca7c8

Browse files
committed
Merge branch 'x86-apic-for-linus' of git://git.kernel.org/pub/scm/linux/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
2 parents a52bbaf + 5ba039a commit 12ca7c8

2 files changed

Lines changed: 4 additions & 9 deletions

File tree

‎arch/x86/include/asm/apic.h‎

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -252,12 +252,6 @@ static inline int x2apic_enabled(void) { return 0; }
252252
#define x2apic_supported() (0)
253253
#endif /* !CONFIG_X86_X2APIC */
254254

255-
#ifdef CONFIG_X86_64
256-
#define SET_APIC_ID(x) (apic->set_apic_id(x))
257-
#else
258-
259-
#endif
260-
261255
/*
262256
* Copyright 2004 James Cleverdon, IBM.
263257
* Subject to the GNU Public License, v.2
@@ -299,6 +293,7 @@ struct apic {
299293
int (*phys_pkg_id)(int cpuid_apic, int index_msb);
300294

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

304299
int (*cpu_mask_to_apicid_and)(const struct cpumask *cpumask,

‎arch/x86/kernel/apic/apic.c‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1793,8 +1793,8 @@ void __init init_apic_mappings(void)
17931793
apic_phys = mp_lapic_addr;
17941794

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

0 commit comments

Comments
 (0)