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>
This commit is contained in:
Родитель
80a2670379
Коммит
6ab1b27c84
|
@ -335,9 +335,6 @@ struct apic {
|
||||||
/* wakeup_secondary_cpu */
|
/* wakeup_secondary_cpu */
|
||||||
int (*wakeup_secondary_cpu)(int apicid, unsigned long start_eip);
|
int (*wakeup_secondary_cpu)(int apicid, unsigned long start_eip);
|
||||||
|
|
||||||
int trampoline_phys_low;
|
|
||||||
int trampoline_phys_high;
|
|
||||||
|
|
||||||
bool wait_for_init_deassert;
|
bool wait_for_init_deassert;
|
||||||
void (*smp_callin_clear_local_apic)(void);
|
void (*smp_callin_clear_local_apic)(void);
|
||||||
void (*inquire_remote_apic)(int apicid);
|
void (*inquire_remote_apic)(int apicid);
|
||||||
|
@ -480,10 +477,10 @@ static inline unsigned default_get_apic_id(unsigned long x)
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Warm reset vector default position:
|
* Warm reset vector position:
|
||||||
*/
|
*/
|
||||||
#define DEFAULT_TRAMPOLINE_PHYS_LOW 0x467
|
#define TRAMPOLINE_PHYS_LOW 0x467
|
||||||
#define DEFAULT_TRAMPOLINE_PHYS_HIGH 0x469
|
#define TRAMPOLINE_PHYS_HIGH 0x469
|
||||||
|
|
||||||
#ifdef CONFIG_X86_64
|
#ifdef CONFIG_X86_64
|
||||||
extern void apic_send_IPI_self(int vector);
|
extern void apic_send_IPI_self(int vector);
|
||||||
|
|
|
@ -17,11 +17,11 @@ static inline void smpboot_setup_warm_reset_vector(unsigned long start_eip)
|
||||||
spin_unlock_irqrestore(&rtc_lock, flags);
|
spin_unlock_irqrestore(&rtc_lock, flags);
|
||||||
local_flush_tlb();
|
local_flush_tlb();
|
||||||
pr_debug("1.\n");
|
pr_debug("1.\n");
|
||||||
*((volatile unsigned short *)phys_to_virt(apic->trampoline_phys_high)) =
|
*((volatile unsigned short *)phys_to_virt(TRAMPOLINE_PHYS_HIGH)) =
|
||||||
start_eip >> 4;
|
start_eip >> 4;
|
||||||
pr_debug("2.\n");
|
pr_debug("2.\n");
|
||||||
*((volatile unsigned short *)phys_to_virt(apic->trampoline_phys_low)) =
|
*((volatile unsigned short *)phys_to_virt(TRAMPOLINE_PHYS_LOW)) =
|
||||||
start_eip & 0xf;
|
start_eip & 0xf;
|
||||||
pr_debug("3.\n");
|
pr_debug("3.\n");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -42,7 +42,7 @@ static inline void smpboot_restore_warm_reset_vector(void)
|
||||||
CMOS_WRITE(0, 0xf);
|
CMOS_WRITE(0, 0xf);
|
||||||
spin_unlock_irqrestore(&rtc_lock, flags);
|
spin_unlock_irqrestore(&rtc_lock, flags);
|
||||||
|
|
||||||
*((volatile u32 *)phys_to_virt(apic->trampoline_phys_low)) = 0;
|
*((volatile u32 *)phys_to_virt(TRAMPOLINE_PHYS_LOW)) = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
static inline void __init smpboot_setup_io_apic(void)
|
static inline void __init smpboot_setup_io_apic(void)
|
||||||
|
|
|
@ -196,8 +196,6 @@ static struct apic apic_flat = {
|
||||||
.send_IPI_all = flat_send_IPI_all,
|
.send_IPI_all = flat_send_IPI_all,
|
||||||
.send_IPI_self = apic_send_IPI_self,
|
.send_IPI_self = apic_send_IPI_self,
|
||||||
|
|
||||||
.trampoline_phys_low = DEFAULT_TRAMPOLINE_PHYS_LOW,
|
|
||||||
.trampoline_phys_high = DEFAULT_TRAMPOLINE_PHYS_HIGH,
|
|
||||||
.wait_for_init_deassert = false,
|
.wait_for_init_deassert = false,
|
||||||
.smp_callin_clear_local_apic = NULL,
|
.smp_callin_clear_local_apic = NULL,
|
||||||
.inquire_remote_apic = default_inquire_remote_apic,
|
.inquire_remote_apic = default_inquire_remote_apic,
|
||||||
|
@ -312,8 +310,6 @@ static struct apic apic_physflat = {
|
||||||
.send_IPI_all = physflat_send_IPI_all,
|
.send_IPI_all = physflat_send_IPI_all,
|
||||||
.send_IPI_self = apic_send_IPI_self,
|
.send_IPI_self = apic_send_IPI_self,
|
||||||
|
|
||||||
.trampoline_phys_low = DEFAULT_TRAMPOLINE_PHYS_LOW,
|
|
||||||
.trampoline_phys_high = DEFAULT_TRAMPOLINE_PHYS_HIGH,
|
|
||||||
.wait_for_init_deassert = false,
|
.wait_for_init_deassert = false,
|
||||||
.smp_callin_clear_local_apic = NULL,
|
.smp_callin_clear_local_apic = NULL,
|
||||||
.inquire_remote_apic = default_inquire_remote_apic,
|
.inquire_remote_apic = default_inquire_remote_apic,
|
||||||
|
|
|
@ -168,10 +168,6 @@ struct apic apic_noop = {
|
||||||
|
|
||||||
.wakeup_secondary_cpu = noop_wakeup_secondary_cpu,
|
.wakeup_secondary_cpu = noop_wakeup_secondary_cpu,
|
||||||
|
|
||||||
/* should be safe */
|
|
||||||
.trampoline_phys_low = DEFAULT_TRAMPOLINE_PHYS_LOW,
|
|
||||||
.trampoline_phys_high = DEFAULT_TRAMPOLINE_PHYS_HIGH,
|
|
||||||
|
|
||||||
.wait_for_init_deassert = false,
|
.wait_for_init_deassert = false,
|
||||||
.smp_callin_clear_local_apic = NULL,
|
.smp_callin_clear_local_apic = NULL,
|
||||||
.inquire_remote_apic = NULL,
|
.inquire_remote_apic = NULL,
|
||||||
|
|
|
@ -246,8 +246,6 @@ static const struct apic apic_numachip __refconst = {
|
||||||
.send_IPI_self = numachip_send_IPI_self,
|
.send_IPI_self = numachip_send_IPI_self,
|
||||||
|
|
||||||
.wakeup_secondary_cpu = numachip_wakeup_secondary,
|
.wakeup_secondary_cpu = numachip_wakeup_secondary,
|
||||||
.trampoline_phys_low = DEFAULT_TRAMPOLINE_PHYS_LOW,
|
|
||||||
.trampoline_phys_high = DEFAULT_TRAMPOLINE_PHYS_HIGH,
|
|
||||||
.wait_for_init_deassert = false,
|
.wait_for_init_deassert = false,
|
||||||
.smp_callin_clear_local_apic = NULL,
|
.smp_callin_clear_local_apic = NULL,
|
||||||
.inquire_remote_apic = NULL, /* REMRD not supported */
|
.inquire_remote_apic = NULL, /* REMRD not supported */
|
||||||
|
|
|
@ -196,9 +196,6 @@ static struct apic apic_bigsmp = {
|
||||||
.send_IPI_all = bigsmp_send_IPI_all,
|
.send_IPI_all = bigsmp_send_IPI_all,
|
||||||
.send_IPI_self = default_send_IPI_self,
|
.send_IPI_self = default_send_IPI_self,
|
||||||
|
|
||||||
.trampoline_phys_low = DEFAULT_TRAMPOLINE_PHYS_LOW,
|
|
||||||
.trampoline_phys_high = DEFAULT_TRAMPOLINE_PHYS_HIGH,
|
|
||||||
|
|
||||||
.wait_for_init_deassert = true,
|
.wait_for_init_deassert = true,
|
||||||
.smp_callin_clear_local_apic = NULL,
|
.smp_callin_clear_local_apic = NULL,
|
||||||
.inquire_remote_apic = default_inquire_remote_apic,
|
.inquire_remote_apic = default_inquire_remote_apic,
|
||||||
|
|
|
@ -116,9 +116,6 @@ static struct apic apic_default = {
|
||||||
.send_IPI_all = default_send_IPI_all,
|
.send_IPI_all = default_send_IPI_all,
|
||||||
.send_IPI_self = default_send_IPI_self,
|
.send_IPI_self = default_send_IPI_self,
|
||||||
|
|
||||||
.trampoline_phys_low = DEFAULT_TRAMPOLINE_PHYS_LOW,
|
|
||||||
.trampoline_phys_high = DEFAULT_TRAMPOLINE_PHYS_HIGH,
|
|
||||||
|
|
||||||
.wait_for_init_deassert = true,
|
.wait_for_init_deassert = true,
|
||||||
.smp_callin_clear_local_apic = NULL,
|
.smp_callin_clear_local_apic = NULL,
|
||||||
.inquire_remote_apic = default_inquire_remote_apic,
|
.inquire_remote_apic = default_inquire_remote_apic,
|
||||||
|
|
|
@ -277,8 +277,6 @@ static struct apic apic_x2apic_cluster = {
|
||||||
.send_IPI_all = x2apic_send_IPI_all,
|
.send_IPI_all = x2apic_send_IPI_all,
|
||||||
.send_IPI_self = x2apic_send_IPI_self,
|
.send_IPI_self = x2apic_send_IPI_self,
|
||||||
|
|
||||||
.trampoline_phys_low = DEFAULT_TRAMPOLINE_PHYS_LOW,
|
|
||||||
.trampoline_phys_high = DEFAULT_TRAMPOLINE_PHYS_HIGH,
|
|
||||||
.wait_for_init_deassert = false,
|
.wait_for_init_deassert = false,
|
||||||
.smp_callin_clear_local_apic = NULL,
|
.smp_callin_clear_local_apic = NULL,
|
||||||
.inquire_remote_apic = NULL,
|
.inquire_remote_apic = NULL,
|
||||||
|
|
|
@ -131,8 +131,6 @@ static struct apic apic_x2apic_phys = {
|
||||||
.send_IPI_all = x2apic_send_IPI_all,
|
.send_IPI_all = x2apic_send_IPI_all,
|
||||||
.send_IPI_self = x2apic_send_IPI_self,
|
.send_IPI_self = x2apic_send_IPI_self,
|
||||||
|
|
||||||
.trampoline_phys_low = DEFAULT_TRAMPOLINE_PHYS_LOW,
|
|
||||||
.trampoline_phys_high = DEFAULT_TRAMPOLINE_PHYS_HIGH,
|
|
||||||
.wait_for_init_deassert = false,
|
.wait_for_init_deassert = false,
|
||||||
.smp_callin_clear_local_apic = NULL,
|
.smp_callin_clear_local_apic = NULL,
|
||||||
.inquire_remote_apic = NULL,
|
.inquire_remote_apic = NULL,
|
||||||
|
|
|
@ -394,8 +394,6 @@ static struct apic __refdata apic_x2apic_uv_x = {
|
||||||
.send_IPI_self = uv_send_IPI_self,
|
.send_IPI_self = uv_send_IPI_self,
|
||||||
|
|
||||||
.wakeup_secondary_cpu = uv_wakeup_secondary,
|
.wakeup_secondary_cpu = uv_wakeup_secondary,
|
||||||
.trampoline_phys_low = DEFAULT_TRAMPOLINE_PHYS_LOW,
|
|
||||||
.trampoline_phys_high = DEFAULT_TRAMPOLINE_PHYS_HIGH,
|
|
||||||
.wait_for_init_deassert = false,
|
.wait_for_init_deassert = false,
|
||||||
.smp_callin_clear_local_apic = NULL,
|
.smp_callin_clear_local_apic = NULL,
|
||||||
.inquire_remote_apic = NULL,
|
.inquire_remote_apic = NULL,
|
||||||
|
|
Загрузка…
Ссылка в новой задаче