aboutsummaryrefslogtreecommitdiffstats
path: root/arch/x86/include/asm
diff options
context:
space:
mode:
authorDavid Rientjes <rientjes@google.com>2014-07-31 02:53:27 -0400
committerH. Peter Anvin <hpa@zytor.com>2014-07-31 11:05:41 -0400
commit6ab1b27c849106647c42b3ea0681a039552e24fa (patch)
tree9f399fcb99f06594d7f238d06f7ac02e6c322b5f /arch/x86/include/asm
parent80a2670379b777ea45f2f6c73b2d2bc3f99066c8 (diff)
x86, apic: Replace trampoline physical addresses with defaults
The trampoline_phys_{high,low} members of struct apic are always initialized to DEFAULT_TRAMPOLINE_PHYS_HIGH and TRAMPOLINE_PHYS_LOW, respectively. Hardwire the constants and remove the unneeded members. Signed-off-by: David Rientjes <rientjes@google.com> Link: http://lkml.kernel.org/r/alpine.DEB.2.02.1407302348330.17503@chino.kir.corp.google.com Signed-off-by: H. Peter Anvin <hpa@zytor.com>
Diffstat (limited to 'arch/x86/include/asm')
-rw-r--r--arch/x86/include/asm/apic.h9
-rw-r--r--arch/x86/include/asm/smpboot_hooks.h10
2 files changed, 8 insertions, 11 deletions
diff --git a/arch/x86/include/asm/apic.h b/arch/x86/include/asm/apic.h
index 067c2f83e329..2201c262b00c 100644
--- a/arch/x86/include/asm/apic.h
+++ b/arch/x86/include/asm/apic.h
@@ -335,9 +335,6 @@ struct apic {
335 /* wakeup_secondary_cpu */ 335 /* wakeup_secondary_cpu */
336 int (*wakeup_secondary_cpu)(int apicid, unsigned long start_eip); 336 int (*wakeup_secondary_cpu)(int apicid, unsigned long start_eip);
337 337
338 int trampoline_phys_low;
339 int trampoline_phys_high;
340
341 bool wait_for_init_deassert; 338 bool wait_for_init_deassert;
342 void (*smp_callin_clear_local_apic)(void); 339 void (*smp_callin_clear_local_apic)(void);
343 void (*inquire_remote_apic)(int apicid); 340 void (*inquire_remote_apic)(int apicid);
@@ -480,10 +477,10 @@ static inline unsigned default_get_apic_id(unsigned long x)
480} 477}
481 478
482/* 479/*
483 * Warm reset vector default position: 480 * Warm reset vector position:
484 */ 481 */
485#define DEFAULT_TRAMPOLINE_PHYS_LOW 0x467 482#define TRAMPOLINE_PHYS_LOW 0x467
486#define DEFAULT_TRAMPOLINE_PHYS_HIGH 0x469 483#define TRAMPOLINE_PHYS_HIGH 0x469
487 484
488#ifdef CONFIG_X86_64 485#ifdef CONFIG_X86_64
489extern void apic_send_IPI_self(int vector); 486extern void apic_send_IPI_self(int vector);
diff --git a/arch/x86/include/asm/smpboot_hooks.h b/arch/x86/include/asm/smpboot_hooks.h
index 49adfd7bb4a4..0da7409f0bec 100644
--- a/arch/x86/include/asm/smpboot_hooks.h
+++ b/arch/x86/include/asm/smpboot_hooks.h
@@ -17,11 +17,11 @@ static inline void smpboot_setup_warm_reset_vector(unsigned long start_eip)
17 spin_unlock_irqrestore(&rtc_lock, flags); 17 spin_unlock_irqrestore(&rtc_lock, flags);
18 local_flush_tlb(); 18 local_flush_tlb();
19 pr_debug("1.\n"); 19 pr_debug("1.\n");
20 *((volatile unsigned short *)phys_to_virt(apic->trampoline_phys_high)) = 20 *((volatile unsigned short *)phys_to_virt(TRAMPOLINE_PHYS_HIGH)) =
21 start_eip >> 4; 21 start_eip >> 4;
22 pr_debug("2.\n"); 22 pr_debug("2.\n");
23 *((volatile unsigned short *)phys_to_virt(apic->trampoline_phys_low)) = 23 *((volatile unsigned short *)phys_to_virt(TRAMPOLINE_PHYS_LOW)) =
24 start_eip & 0xf; 24 start_eip & 0xf;
25 pr_debug("3.\n"); 25 pr_debug("3.\n");
26} 26}
27 27
@@ -42,7 +42,7 @@ static inline void smpboot_restore_warm_reset_vector(void)
42 CMOS_WRITE(0, 0xf); 42 CMOS_WRITE(0, 0xf);
43 spin_unlock_irqrestore(&rtc_lock, flags); 43 spin_unlock_irqrestore(&rtc_lock, flags);
44 44
45 *((volatile u32 *)phys_to_virt(apic->trampoline_phys_low)) = 0; 45 *((volatile u32 *)phys_to_virt(TRAMPOLINE_PHYS_LOW)) = 0;
46} 46}
47 47
48static inline void __init smpboot_setup_io_apic(void) 48static inline void __init smpboot_setup_io_apic(void)