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

Commit 656bba30 authored by Len Brown's avatar Len Brown Committed by Ingo Molnar
Browse files

x86/smpboot: Remove APIC.wait_for_init_deassert and atomic init_deasserted



Both the per-APIC flag ".wait_for_init_deassert",
and the global atomic_t "init_deasserted"
are dead code -- remove them.

For all APIC types, "wait_for_master()"
prevents an AP from proceeding until the BSP has set
cpu_callout_mask, making "init_deasserted" {unnecessary}:

	BSP: <de-assert INIT>
	...
	BSP: {set init_deasserted}
	AP: wait_for_master()
		set cpu_initialized_mask
		wait for cpu_callout_mask
	BSP: test cpu_initialized_mask
	BSP: set cpu_callout_mask
	AP: test cpu_callout_mask
	AP: {wait for init_deasserted}
	...
	AP: <touch APIC>

Deleting the {dead code} above is necessary to enable
some parallelism in a future patch.

Signed-off-by: default avatarLen Brown <len.brown@intel.com>
Cc: Andy Lutomirski <luto@amacapital.net>
Cc: Arjan van de Ven <arjan@linux.intel.com>
Cc: Boris Ostrovsky <boris.ostrovsky@oracle.com>
Cc: Borislav Petkov <bp@alien8.de>
Cc: Dave Hansen <dave.hansen@linux.intel.com>
Cc: Igor Mammedov <imammedo@redhat.com>
Cc: Jan H. Schönherr <jschoenh@amazon.de>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: Zhu Guihua <zhugh.fnst@cn.fujitsu.com>
Link: http://lkml.kernel.org/r/de4b3a9bab894735e285870b5296da25ee6a8a5a.1439739165.git.len.brown@intel.com


Signed-off-by: default avatarIngo Molnar <mingo@kernel.org>
parent a9bcaa02
Loading
Loading
Loading
Loading
+0 −2
Original line number Diff line number Diff line
@@ -313,7 +313,6 @@ struct apic {
	/* wakeup_secondary_cpu */
	int (*wakeup_secondary_cpu)(int apicid, unsigned long start_eip);

	bool wait_for_init_deassert;
	void (*inquire_remote_apic)(int apicid);

	/* apic ops */
@@ -378,7 +377,6 @@ extern struct apic *__apicdrivers[], *__apicdrivers_end[];
 * APIC functionality to boot other CPUs - only used on SMP:
 */
#ifdef CONFIG_SMP
extern atomic_t init_deasserted;
extern int wakeup_secondary_cpu_via_nmi(int apicid, unsigned long start_eip);
#endif

+0 −2
Original line number Diff line number Diff line
@@ -191,7 +191,6 @@ static struct apic apic_flat = {
	.send_IPI_all			= flat_send_IPI_all,
	.send_IPI_self			= apic_send_IPI_self,

	.wait_for_init_deassert		= false,
	.inquire_remote_apic		= default_inquire_remote_apic,

	.read				= native_apic_mem_read,
@@ -299,7 +298,6 @@ static struct apic apic_physflat = {
	.send_IPI_all			= physflat_send_IPI_all,
	.send_IPI_self			= apic_send_IPI_self,

	.wait_for_init_deassert		= false,
	.inquire_remote_apic		= default_inquire_remote_apic,

	.read				= native_apic_mem_read,
+0 −1
Original line number Diff line number Diff line
@@ -152,7 +152,6 @@ struct apic apic_noop = {

	.wakeup_secondary_cpu		= noop_wakeup_secondary_cpu,

	.wait_for_init_deassert		= false,
	.inquire_remote_apic		= NULL,

	.read				= noop_apic_read,
+0 −2
Original line number Diff line number Diff line
@@ -92,7 +92,6 @@ static int numachip_wakeup_secondary(int phys_apicid, unsigned long start_rip)

	write_lcsr(CSR_G3_EXT_IRQ_GEN, int_gen.v);

	atomic_set(&init_deasserted, 1);
	return 0;
}

@@ -235,7 +234,6 @@ static const struct apic apic_numachip __refconst = {
	.send_IPI_self			= numachip_send_IPI_self,

	.wakeup_secondary_cpu		= numachip_wakeup_secondary,
	.wait_for_init_deassert		= false,
	.inquire_remote_apic		= NULL, /* REMRD not supported */

	.read				= native_apic_mem_read,
+0 −1
Original line number Diff line number Diff line
@@ -186,7 +186,6 @@ static struct apic apic_bigsmp = {
	.send_IPI_all			= bigsmp_send_IPI_all,
	.send_IPI_self			= default_send_IPI_self,

	.wait_for_init_deassert		= true,
	.inquire_remote_apic		= default_inquire_remote_apic,

	.read				= native_apic_mem_read,
Loading