Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 1f5bcabf authored by Ingo Molnar's avatar Ingo Molnar
Browse files

x86: apic: simplify secondary CPU wakeup methods



Impact: cleanup

- rename apic->wakeup_cpu  to apic->wakeup_secondary_cpu, to
  make it apparent that this is an SMP-only method

- handle NULL ->wakeup_secondary_cpus to mean the default INIT
  wakeup sequence - this allows simplification of the APIC
  driver templates.

Cc: Yinghai Lu <yinghai@kernel.org>
Signed-off-by: default avatarIngo Molnar <mingo@elte.hu>
parent 0917c01f
Loading
Loading
Loading
Loading
+1 −8
Original line number Diff line number Diff line
@@ -313,7 +313,7 @@ struct apic {
	void (*send_IPI_self)(int vector);

	/* wakeup_secondary_cpu */
	int (*wakeup_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;
@@ -344,13 +344,6 @@ extern struct apic *apic;
#ifdef CONFIG_SMP
extern atomic_t init_deasserted;
extern int wakeup_secondary_cpu_via_nmi(int apicid, unsigned long start_eip);
extern int wakeup_secondary_cpu_via_init(int apicid, unsigned long start_eip);
#else
static inline int
wakeup_secondary_cpu_via_init(int apicid, unsigned long start_eip)
{
	return 0;
}
#endif

static inline u32 apic_read(u32 reg)
+0 −2
Original line number Diff line number Diff line
@@ -222,7 +222,6 @@ struct apic apic_flat = {
	.send_IPI_all			= flat_send_IPI_all,
	.send_IPI_self			= apic_send_IPI_self,

	.wakeup_cpu			= wakeup_secondary_cpu_via_init,
	.trampoline_phys_low		= DEFAULT_TRAMPOLINE_PHYS_LOW,
	.trampoline_phys_high		= DEFAULT_TRAMPOLINE_PHYS_HIGH,
	.wait_for_init_deassert		= NULL,
@@ -373,7 +372,6 @@ struct apic apic_physflat = {
	.send_IPI_all			= physflat_send_IPI_all,
	.send_IPI_self			= apic_send_IPI_self,

	.wakeup_cpu			= wakeup_secondary_cpu_via_init,
	.trampoline_phys_low		= DEFAULT_TRAMPOLINE_PHYS_LOW,
	.trampoline_phys_high		= DEFAULT_TRAMPOLINE_PHYS_HIGH,
	.wait_for_init_deassert		= NULL,
+0 −1
Original line number Diff line number Diff line
@@ -256,7 +256,6 @@ struct apic apic_bigsmp = {
	.send_IPI_all			= bigsmp_send_IPI_all,
	.send_IPI_self			= default_send_IPI_self,

	.wakeup_cpu			= wakeup_secondary_cpu_via_init,
	.trampoline_phys_low		= DEFAULT_TRAMPOLINE_PHYS_LOW,
	.trampoline_phys_high		= DEFAULT_TRAMPOLINE_PHYS_HIGH,

+1 −3
Original line number Diff line number Diff line
@@ -741,7 +741,7 @@ struct apic apic_es7000_cluster = {
	.send_IPI_all			= es7000_send_IPI_all,
	.send_IPI_self			= default_send_IPI_self,

	.wakeup_cpu			= wakeup_secondary_cpu_via_mip,
	.wakeup_secondary_cpu		= wakeup_secondary_cpu_via_mip,

	.trampoline_phys_low		= 0x467,
	.trampoline_phys_high		= 0x469,
@@ -806,8 +806,6 @@ struct apic apic_es7000 = {
	.send_IPI_all			= es7000_send_IPI_all,
	.send_IPI_self			= default_send_IPI_self,

	.wakeup_cpu			= wakeup_secondary_cpu_via_init,

	.trampoline_phys_low		= 0x467,
	.trampoline_phys_high		= 0x469,

+1 −1
Original line number Diff line number Diff line
@@ -538,7 +538,7 @@ struct apic apic_numaq = {
	.send_IPI_all			= numaq_send_IPI_all,
	.send_IPI_self			= default_send_IPI_self,

	.wakeup_cpu			= wakeup_secondary_cpu_via_nmi,
	.wakeup_secondary_cpu		= wakeup_secondary_cpu_via_nmi,
	.trampoline_phys_low		= NUMAQ_TRAMPOLINE_PHYS_LOW,
	.trampoline_phys_high		= NUMAQ_TRAMPOLINE_PHYS_HIGH,

Loading