mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* Genapic cleanup & NUMAQ/es7000 removal
@ 2009-01-30 10:17 Andi Kleen
  2009-01-30 10:17 ` [PATCH] Move wakeup_secondary_via_nmi into numaq_32.c Andi Kleen
  2009-02-05 16:15 ` Genapic cleanup & NUMAQ/es7000 removal Tim Pepper
  0 siblings, 2 replies; 18+ messages in thread
From: Andi Kleen @ 2009-01-30 10:17 UTC (permalink / raw)
  To: mingo; +Cc: linux-kernel, lnxninja

Just to demonstrate the clean up possibilities by removing es7000
and numaq here's a sample patch series. It doesn't actually remove
the es7000/numaq code, but just marks them broken and then
removes all the hooks only used by them. I'm not actually sure
I caught all the now unused hooks, there are probably now more.
Also I think there's still some other NUMAQ only code in smpboot.c
that could be exercised.

This removes 6 hooks and 2 fields out of struct genapic (out of 26
hooks, a reduction of ~23%!) 

The first three patches are independent cleanups that should
be applied anyways.

This gives a nice generic cleanup:

 Kconfig                     |    4 +-
 include/asm/bigsmp/apic.h   |    4 --
 include/asm/genapic.h       |   17 ++----------
 include/asm/setup.h         |    3 --
 include/asm/smpboot_hooks.h |   10 +++----
 kernel/apic.c               |    2 -
 kernel/bigsmp_32.c          |   12 --------
 kernel/es7000_32.c          |   32 ----------------------
 kernel/genapic_flat_64.c    |   16 -----------
 kernel/genx2apic_cluster.c  |    8 -----
 kernel/genx2apic_phys.c     |    8 -----
 kernel/genx2apic_uv_x.c     |    8 -----
 kernel/io_apic.c            |   11 -------
 kernel/numaq_32.c           |   62 --------------------------------------------
 kernel/probe_32.c           |    8 -----
 kernel/setup.c              |   11 -------
 kernel/smpboot.c            |   54 ++------------------------------------
 kernel/summit_32.c          |   12 --------
 18 files changed, 13 insertions(+), 269 deletions(-)

-Andi

^ permalink raw reply	[flat|nested] 18+ messages in thread

* [PATCH] Move wakeup_secondary_via_nmi into numaq_32.c
  2009-01-30 10:17 Genapic cleanup & NUMAQ/es7000 removal Andi Kleen
@ 2009-01-30 10:17 ` Andi Kleen
  2009-01-30 10:17   ` [PATCH] Remove empty setup_portio_remap inlines in bigsmp/summit Andi Kleen
  2009-02-05 16:15 ` Genapic cleanup & NUMAQ/es7000 removal Tim Pepper
  1 sibling, 1 reply; 18+ messages in thread
From: Andi Kleen @ 2009-01-30 10:17 UTC (permalink / raw)
  To: mingo; +Cc: linux-kernel, lnxninja, Andi Kleen

From: Andi Kleen <ak@linux.intel.com>

It's only used there.

Signed-off-by: Andi Kleen <ak@linux.intel.com>
---
 arch/x86/include/asm/setup.h |    1 -
 arch/x86/kernel/numaq_32.c   |   39 +++++++++++++++++++++++++++++++++++++++
 arch/x86/kernel/smpboot.c    |   39 ---------------------------------------
 3 files changed, 39 insertions(+), 40 deletions(-)

diff --git a/arch/x86/include/asm/setup.h b/arch/x86/include/asm/setup.h
index 45b4027..8c8289c 100644
--- a/arch/x86/include/asm/setup.h
+++ b/arch/x86/include/asm/setup.h
@@ -20,7 +20,6 @@ static inline void visws_early_detect(void) { }
 static inline int is_visws_box(void) { return 0; }
 #endif
 
-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);
 /*
  * Any setup quirks to be performed?
diff --git a/arch/x86/kernel/numaq_32.c b/arch/x86/kernel/numaq_32.c
index 83bb055..295c82e 100644
--- a/arch/x86/kernel/numaq_32.c
+++ b/arch/x86/kernel/numaq_32.c
@@ -234,6 +234,45 @@ static int __init numaq_setup_ioapic_ids(void)
 	return 1;
 }
 
+/*
+ * Poke the other CPU in the eye via NMI to wake it up. Remember that the normal
+ * INIT, INIT, STARTUP sequence will reset the chip hard for us, and this
+ * won't ... remember to clear down the APIC, etc later.
+ */
+static int __devinit
+wakeup_secondary_cpu_via_nmi(int logical_apicid, unsigned long start_eip)
+{
+	unsigned long send_status, accept_status = 0;
+	int maxlvt;
+
+	/* Target chip */
+	/* Boot on the stack */
+	/* Kick the second */
+	apic_icr_write(APIC_DM_NMI | apic->dest_logical, logical_apicid);
+
+	pr_debug("Waiting for send to finish...\n");
+	send_status = safe_apic_wait_icr_idle();
+
+	/*
+	 * Give the other CPU some time to accept the IPI.
+	 */
+	udelay(200);
+	if (APIC_INTEGRATED(apic_version[boot_cpu_physical_apicid])) {
+		maxlvt = lapic_get_maxlvt();
+		if (maxlvt > 3)			/* Due to the Pentium erratum 3AP.  */
+			apic_write(APIC_ESR, 0);
+		accept_status = (apic_read(APIC_ESR) & 0xEF);
+	}
+	pr_debug("NMI sent.\n");
+
+	if (send_status)
+		printk(KERN_ERR "APIC never delivered???\n");
+	if (accept_status)
+		printk(KERN_ERR "APIC delivery error (%lx).\n", accept_status);
+
+	return (send_status | accept_status);
+}
+
 static int __init numaq_update_genapic(void)
 {
 	apic->wakeup_cpu = wakeup_secondary_cpu_via_nmi;
diff --git a/arch/x86/kernel/smpboot.c b/arch/x86/kernel/smpboot.c
index 2912fa3..709b65d 100644
--- a/arch/x86/kernel/smpboot.c
+++ b/arch/x86/kernel/smpboot.c
@@ -570,45 +570,6 @@ void __inquire_remote_apic(int apicid)
 	}
 }
 
-/*
- * Poke the other CPU in the eye via NMI to wake it up. Remember that the normal
- * INIT, INIT, STARTUP sequence will reset the chip hard for us, and this
- * won't ... remember to clear down the APIC, etc later.
- */
-int __devinit
-wakeup_secondary_cpu_via_nmi(int logical_apicid, unsigned long start_eip)
-{
-	unsigned long send_status, accept_status = 0;
-	int maxlvt;
-
-	/* Target chip */
-	/* Boot on the stack */
-	/* Kick the second */
-	apic_icr_write(APIC_DM_NMI | apic->dest_logical, logical_apicid);
-
-	pr_debug("Waiting for send to finish...\n");
-	send_status = safe_apic_wait_icr_idle();
-
-	/*
-	 * Give the other CPU some time to accept the IPI.
-	 */
-	udelay(200);
-	if (APIC_INTEGRATED(apic_version[boot_cpu_physical_apicid])) {
-		maxlvt = lapic_get_maxlvt();
-		if (maxlvt > 3)			/* Due to the Pentium erratum 3AP.  */
-			apic_write(APIC_ESR, 0);
-		accept_status = (apic_read(APIC_ESR) & 0xEF);
-	}
-	pr_debug("NMI sent.\n");
-
-	if (send_status)
-		printk(KERN_ERR "APIC never delivered???\n");
-	if (accept_status)
-		printk(KERN_ERR "APIC delivery error (%lx).\n", accept_status);
-
-	return (send_status | accept_status);
-}
-
 int __devinit
 wakeup_secondary_cpu_via_init(int phys_apicid, unsigned long start_eip)
 {
-- 
1.5.6.5


^ permalink raw reply	[flat|nested] 18+ messages in thread

* [PATCH] Remove empty setup_portio_remap inlines in bigsmp/summit
  2009-01-30 10:17 ` [PATCH] Move wakeup_secondary_via_nmi into numaq_32.c Andi Kleen
@ 2009-01-30 10:17   ` Andi Kleen
  2009-01-30 10:17     ` [PATCH] Mark NUMAQ broken Andi Kleen
  0 siblings, 1 reply; 18+ messages in thread
From: Andi Kleen @ 2009-01-30 10:17 UTC (permalink / raw)
  To: mingo; +Cc: linux-kernel, lnxninja, Andi Kleen

From: Andi Kleen <ak@linux.intel.com>

These are all unused inlines

Signed-off-by: Andi Kleen <ak@linux.intel.com>
---
 arch/x86/include/asm/bigsmp/apic.h |    4 ----
 arch/x86/kernel/bigsmp_32.c        |    4 ----
 arch/x86/kernel/summit_32.c        |    4 ----
 3 files changed, 0 insertions(+), 12 deletions(-)

diff --git a/arch/x86/include/asm/bigsmp/apic.h b/arch/x86/include/asm/bigsmp/apic.h
index ee29d66..646697e 100644
--- a/arch/x86/include/asm/bigsmp/apic.h
+++ b/arch/x86/include/asm/bigsmp/apic.h
@@ -95,10 +95,6 @@ static inline physid_mask_t bigsmp_ioapic_phys_id_map(physid_mask_t phys_map)
 	return physids_promote(0xFFL);
 }
 
-static inline void bigsmp_setup_portio_remap(void)
-{
-}
-
 static inline int bigsmp_check_phys_apicid_present(int boot_cpu_physical_apicid)
 {
 	return 1;
diff --git a/arch/x86/kernel/bigsmp_32.c b/arch/x86/kernel/bigsmp_32.c
index b1f9193..b74f070 100644
--- a/arch/x86/kernel/bigsmp_32.c
+++ b/arch/x86/kernel/bigsmp_32.c
@@ -114,10 +114,6 @@ static inline physid_mask_t bigsmp_ioapic_phys_id_map(physid_mask_t phys_map)
 	return physids_promote(0xFFL);
 }
 
-static inline void bigsmp_setup_portio_remap(void)
-{
-}
-
 static inline int bigsmp_check_phys_apicid_present(int boot_cpu_physical_apicid)
 {
 	return 1;
diff --git a/arch/x86/kernel/summit_32.c b/arch/x86/kernel/summit_32.c
index 84ff9eb..a04bc99 100644
--- a/arch/x86/kernel/summit_32.c
+++ b/arch/x86/kernel/summit_32.c
@@ -294,10 +294,6 @@ static inline physid_mask_t summit_apicid_to_cpu_present(int apicid)
 	return physid_mask_of_physid(0);
 }
 
-static inline void summit_setup_portio_remap(void)
-{
-}
-
 static inline int summit_check_phys_apicid_present(int boot_cpu_physical_apicid)
 {
 	return 1;
-- 
1.5.6.5


^ permalink raw reply	[flat|nested] 18+ messages in thread

* [PATCH] Mark NUMAQ broken
  2009-01-30 10:17   ` [PATCH] Remove empty setup_portio_remap inlines in bigsmp/summit Andi Kleen
@ 2009-01-30 10:17     ` Andi Kleen
  2009-01-30 10:17       ` [PATCH] Mark ES7000 subarch broken Andi Kleen
  0 siblings, 1 reply; 18+ messages in thread
From: Andi Kleen @ 2009-01-30 10:17 UTC (permalink / raw)
  To: mingo; +Cc: linux-kernel, lnxninja, Andi Kleen

From: Andi Kleen <ak@linux.intel.com>

In preparation from removal

Signed-off-by: Andi Kleen <ak@linux.intel.com>
---
 arch/x86/Kconfig |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/arch/x86/Kconfig b/arch/x86/Kconfig
index afaf2cb..fa234a5 100644
--- a/arch/x86/Kconfig
+++ b/arch/x86/Kconfig
@@ -347,7 +347,7 @@ config X86_BIGSMP
 
 config X86_NUMAQ
 	bool "NUMAQ (IBM/Sequent)"
-	depends on X86_32_NON_STANDARD
+	depends on X86_32_NON_STANDARD && BROKEN
 	select NUMA
 	select X86_MPPARSE
 	help
-- 
1.5.6.5


^ permalink raw reply	[flat|nested] 18+ messages in thread

* [PATCH] Mark ES7000 subarch broken
  2009-01-30 10:17     ` [PATCH] Mark NUMAQ broken Andi Kleen
@ 2009-01-30 10:17       ` Andi Kleen
  2009-01-30 10:17         ` [PATCH] Remove store_NMI_vector in genapic Andi Kleen
  0 siblings, 1 reply; 18+ messages in thread
From: Andi Kleen @ 2009-01-30 10:17 UTC (permalink / raw)
  To: mingo; +Cc: linux-kernel, lnxninja, Andi Kleen

From: Andi Kleen <ak@linux.intel.com>

In preparation for removal

Signed-off-by: Andi Kleen <ak@linux.intel.com>
---
 arch/x86/Kconfig |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/arch/x86/Kconfig b/arch/x86/Kconfig
index fa234a5..a753336 100644
--- a/arch/x86/Kconfig
+++ b/arch/x86/Kconfig
@@ -366,7 +366,7 @@ config X86_SUMMIT
 
 config X86_ES7000
 	bool "Support for Unisys ES7000 IA32 series"
-	depends on X86_32_NON_STANDARD
+	depends on X86_32_NON_STANDARD && BROKEN
 	help
 	  Support for Unisys ES7000 systems.  Say 'Y' here if this kernel is
 	  supposed to run on an IA32-based Unisys ES7000 system.
-- 
1.5.6.5


^ permalink raw reply	[flat|nested] 18+ messages in thread

* [PATCH] Remove store_NMI_vector in genapic
  2009-01-30 10:17       ` [PATCH] Mark ES7000 subarch broken Andi Kleen
@ 2009-01-30 10:17         ` Andi Kleen
  2009-01-30 10:17           ` [PATCH] Remove smp_callin_clear_local_apic hook Andi Kleen
  0 siblings, 1 reply; 18+ messages in thread
From: Andi Kleen @ 2009-01-30 10:17 UTC (permalink / raw)
  To: mingo; +Cc: linux-kernel, lnxninja, Andi Kleen

From: Andi Kleen <ak@linux.intel.com>

Only used by NUMAQ

Signed-off-by: Andi Kleen <ak@linux.intel.com>
---
 arch/x86/include/asm/genapic.h      |    1 -
 arch/x86/kernel/bigsmp_32.c         |    1 -
 arch/x86/kernel/es7000_32.c         |    1 -
 arch/x86/kernel/genapic_flat_64.c   |    2 --
 arch/x86/kernel/genx2apic_cluster.c |    1 -
 arch/x86/kernel/genx2apic_phys.c    |    1 -
 arch/x86/kernel/genx2apic_uv_x.c    |    1 -
 arch/x86/kernel/numaq_32.c          |   11 -----------
 arch/x86/kernel/probe_32.c          |    1 -
 arch/x86/kernel/smpboot.c           |    4 ----
 arch/x86/kernel/summit_32.c         |    1 -
 11 files changed, 0 insertions(+), 25 deletions(-)

diff --git a/arch/x86/include/asm/genapic.h b/arch/x86/include/asm/genapic.h
index 273b994..f57d4d4 100644
--- a/arch/x86/include/asm/genapic.h
+++ b/arch/x86/include/asm/genapic.h
@@ -81,7 +81,6 @@ struct genapic {
 
 	void (*wait_for_init_deassert)(atomic_t *deassert);
 	void (*smp_callin_clear_local_apic)(void);
-	void (*store_NMI_vector)(unsigned short *high, unsigned short *low);
 	void (*inquire_remote_apic)(int apicid);
 };
 
diff --git a/arch/x86/kernel/bigsmp_32.c b/arch/x86/kernel/bigsmp_32.c
index b74f070..f728f9d 100644
--- a/arch/x86/kernel/bigsmp_32.c
+++ b/arch/x86/kernel/bigsmp_32.c
@@ -259,6 +259,5 @@ struct genapic apic_bigsmp = {
 	.wait_for_init_deassert		= default_wait_for_init_deassert,
 
 	.smp_callin_clear_local_apic	= NULL,
-	.store_NMI_vector		= NULL,
 	.inquire_remote_apic		= default_inquire_remote_apic,
 };
diff --git a/arch/x86/kernel/es7000_32.c b/arch/x86/kernel/es7000_32.c
index 078364c..c0789b7 100644
--- a/arch/x86/kernel/es7000_32.c
+++ b/arch/x86/kernel/es7000_32.c
@@ -797,6 +797,5 @@ struct genapic apic_es7000 = {
 
 	/* Nothing to do for most platforms, since cleared by the INIT cycle: */
 	.smp_callin_clear_local_apic	= NULL,
-	.store_NMI_vector		= NULL,
 	.inquire_remote_apic		= default_inquire_remote_apic,
 };
diff --git a/arch/x86/kernel/genapic_flat_64.c b/arch/x86/kernel/genapic_flat_64.c
index 19bffb3..c1bcf11 100644
--- a/arch/x86/kernel/genapic_flat_64.c
+++ b/arch/x86/kernel/genapic_flat_64.c
@@ -227,7 +227,6 @@ struct genapic apic_flat =  {
 	.trampoline_phys_high		= DEFAULT_TRAMPOLINE_PHYS_HIGH,
 	.wait_for_init_deassert		= NULL,
 	.smp_callin_clear_local_apic	= NULL,
-	.store_NMI_vector		= NULL,
 	.inquire_remote_apic		= NULL,
 };
 
@@ -372,6 +371,5 @@ struct genapic apic_physflat =  {
 	.trampoline_phys_high		= DEFAULT_TRAMPOLINE_PHYS_HIGH,
 	.wait_for_init_deassert		= NULL,
 	.smp_callin_clear_local_apic	= NULL,
-	.store_NMI_vector		= NULL,
 	.inquire_remote_apic		= NULL,
 };
diff --git a/arch/x86/kernel/genx2apic_cluster.c b/arch/x86/kernel/genx2apic_cluster.c
index 7c87156..49ae07e 100644
--- a/arch/x86/kernel/genx2apic_cluster.c
+++ b/arch/x86/kernel/genx2apic_cluster.c
@@ -232,6 +232,5 @@ struct genapic apic_x2apic_cluster = {
 	.trampoline_phys_high		= DEFAULT_TRAMPOLINE_PHYS_HIGH,
 	.wait_for_init_deassert		= NULL,
 	.smp_callin_clear_local_apic	= NULL,
-	.store_NMI_vector		= NULL,
 	.inquire_remote_apic		= NULL,
 };
diff --git a/arch/x86/kernel/genx2apic_phys.c b/arch/x86/kernel/genx2apic_phys.c
index 5cbae8a..2599aaf 100644
--- a/arch/x86/kernel/genx2apic_phys.c
+++ b/arch/x86/kernel/genx2apic_phys.c
@@ -218,6 +218,5 @@ struct genapic apic_x2apic_phys = {
 	.trampoline_phys_high		= DEFAULT_TRAMPOLINE_PHYS_HIGH,
 	.wait_for_init_deassert		= NULL,
 	.smp_callin_clear_local_apic	= NULL,
-	.store_NMI_vector		= NULL,
 	.inquire_remote_apic		= NULL,
 };
diff --git a/arch/x86/kernel/genx2apic_uv_x.c b/arch/x86/kernel/genx2apic_uv_x.c
index 6adb5e6..1d4d503 100644
--- a/arch/x86/kernel/genx2apic_uv_x.c
+++ b/arch/x86/kernel/genx2apic_uv_x.c
@@ -291,7 +291,6 @@ struct genapic apic_x2apic_uv_x = {
 	.trampoline_phys_high		= DEFAULT_TRAMPOLINE_PHYS_HIGH,
 	.wait_for_init_deassert		= NULL,
 	.smp_callin_clear_local_apic	= NULL,
-	.store_NMI_vector		= NULL,
 	.inquire_remote_apic		= NULL,
 };
 
diff --git a/arch/x86/kernel/numaq_32.c b/arch/x86/kernel/numaq_32.c
index 295c82e..be1fdd7 100644
--- a/arch/x86/kernel/numaq_32.c
+++ b/arch/x86/kernel/numaq_32.c
@@ -390,16 +390,6 @@ static inline void numaq_smp_callin_clear_local_apic(void)
 	clear_local_APIC();
 }
 
-static inline void
-numaq_store_NMI_vector(unsigned short *high, unsigned short *low)
-{
-	printk("Storing NMI vector\n");
-	*high =
-	  *((volatile unsigned short *)phys_to_virt(NUMAQ_TRAMPOLINE_PHYS_HIGH));
-	*low =
-	  *((volatile unsigned short *)phys_to_virt(NUMAQ_TRAMPOLINE_PHYS_LOW));
-}
-
 static inline const cpumask_t *numaq_target_cpus(void)
 {
 	return &CPU_MASK_ALL;
@@ -605,6 +595,5 @@ struct genapic apic_numaq = {
 	.wait_for_init_deassert		= NULL,
 
 	.smp_callin_clear_local_apic	= numaq_smp_callin_clear_local_apic,
-	.store_NMI_vector		= numaq_store_NMI_vector,
 	.inquire_remote_apic		= NULL,
 };
diff --git a/arch/x86/kernel/probe_32.c b/arch/x86/kernel/probe_32.c
index b5db26f..7445f66 100644
--- a/arch/x86/kernel/probe_32.c
+++ b/arch/x86/kernel/probe_32.c
@@ -125,7 +125,6 @@ struct genapic apic_default = {
 	.wait_for_init_deassert		= default_wait_for_init_deassert,
 
 	.smp_callin_clear_local_apic	= NULL,
-	.store_NMI_vector		= NULL,
 	.inquire_remote_apic		= default_inquire_remote_apic,
 };
 
diff --git a/arch/x86/kernel/smpboot.c b/arch/x86/kernel/smpboot.c
index 709b65d..401b649 100644
--- a/arch/x86/kernel/smpboot.c
+++ b/arch/x86/kernel/smpboot.c
@@ -717,7 +717,6 @@ static int __cpuinit do_boot_cpu(int apicid, int cpu)
 	unsigned long boot_error = 0;
 	int timeout;
 	unsigned long start_ip;
-	unsigned short nmi_high = 0, nmi_low = 0;
 	struct create_idle c_idle = {
 		.cpu = cpu,
 		.done = COMPLETION_INITIALIZER_ONSTACK(c_idle.done),
@@ -786,9 +785,6 @@ do_rest:
 
 		pr_debug("Setting warm reset code and vector.\n");
 
-		if (apic->store_NMI_vector)
-			apic->store_NMI_vector(&nmi_high, &nmi_low);
-
 		smpboot_setup_warm_reset_vector(start_ip);
 		/*
 		 * Be paranoid about clearing APIC errors.
diff --git a/arch/x86/kernel/summit_32.c b/arch/x86/kernel/summit_32.c
index a04bc99..17197fc 100644
--- a/arch/x86/kernel/summit_32.c
+++ b/arch/x86/kernel/summit_32.c
@@ -595,6 +595,5 @@ struct genapic apic_summit = {
 	.wait_for_init_deassert		= default_wait_for_init_deassert,
 
 	.smp_callin_clear_local_apic	= NULL,
-	.store_NMI_vector		= NULL,
 	.inquire_remote_apic		= default_inquire_remote_apic,
 };
-- 
1.5.6.5


^ permalink raw reply	[flat|nested] 18+ messages in thread

* [PATCH] Remove smp_callin_clear_local_apic hook
  2009-01-30 10:17         ` [PATCH] Remove store_NMI_vector in genapic Andi Kleen
@ 2009-01-30 10:17           ` Andi Kleen
  2009-01-30 10:17             ` [PATCH] Remove multi_timer_check Andi Kleen
  0 siblings, 1 reply; 18+ messages in thread
From: Andi Kleen @ 2009-01-30 10:17 UTC (permalink / raw)
  To: mingo; +Cc: linux-kernel, lnxninja, Andi Kleen

From: Andi Kleen <ak@linux.intel.com>

Only used by NUMAQ

Signed-off-by: Andi Kleen <ak@linux.intel.com>
---
 arch/x86/include/asm/genapic.h      |    1 -
 arch/x86/kernel/bigsmp_32.c         |    1 -
 arch/x86/kernel/es7000_32.c         |    1 -
 arch/x86/kernel/genapic_flat_64.c   |    2 --
 arch/x86/kernel/genx2apic_cluster.c |    1 -
 arch/x86/kernel/genx2apic_phys.c    |    1 -
 arch/x86/kernel/genx2apic_uv_x.c    |    1 -
 arch/x86/kernel/numaq_32.c          |   10 ----------
 arch/x86/kernel/probe_32.c          |    1 -
 arch/x86/kernel/smpboot.c           |    2 --
 arch/x86/kernel/summit_32.c         |    1 -
 11 files changed, 0 insertions(+), 22 deletions(-)

diff --git a/arch/x86/include/asm/genapic.h b/arch/x86/include/asm/genapic.h
index f57d4d4..07bab93 100644
--- a/arch/x86/include/asm/genapic.h
+++ b/arch/x86/include/asm/genapic.h
@@ -80,7 +80,6 @@ struct genapic {
 	int trampoline_phys_high;
 
 	void (*wait_for_init_deassert)(atomic_t *deassert);
-	void (*smp_callin_clear_local_apic)(void);
 	void (*inquire_remote_apic)(int apicid);
 };
 
diff --git a/arch/x86/kernel/bigsmp_32.c b/arch/x86/kernel/bigsmp_32.c
index f728f9d..85d72ee 100644
--- a/arch/x86/kernel/bigsmp_32.c
+++ b/arch/x86/kernel/bigsmp_32.c
@@ -258,6 +258,5 @@ struct genapic apic_bigsmp = {
 
 	.wait_for_init_deassert		= default_wait_for_init_deassert,
 
-	.smp_callin_clear_local_apic	= NULL,
 	.inquire_remote_apic		= default_inquire_remote_apic,
 };
diff --git a/arch/x86/kernel/es7000_32.c b/arch/x86/kernel/es7000_32.c
index c0789b7..770205b 100644
--- a/arch/x86/kernel/es7000_32.c
+++ b/arch/x86/kernel/es7000_32.c
@@ -796,6 +796,5 @@ struct genapic apic_es7000 = {
 	.wait_for_init_deassert		= es7000_wait_for_init_deassert,
 
 	/* Nothing to do for most platforms, since cleared by the INIT cycle: */
-	.smp_callin_clear_local_apic	= NULL,
 	.inquire_remote_apic		= default_inquire_remote_apic,
 };
diff --git a/arch/x86/kernel/genapic_flat_64.c b/arch/x86/kernel/genapic_flat_64.c
index c1bcf11..b42e724 100644
--- a/arch/x86/kernel/genapic_flat_64.c
+++ b/arch/x86/kernel/genapic_flat_64.c
@@ -226,7 +226,6 @@ struct genapic apic_flat =  {
 	.trampoline_phys_low		= DEFAULT_TRAMPOLINE_PHYS_LOW,
 	.trampoline_phys_high		= DEFAULT_TRAMPOLINE_PHYS_HIGH,
 	.wait_for_init_deassert		= NULL,
-	.smp_callin_clear_local_apic	= NULL,
 	.inquire_remote_apic		= NULL,
 };
 
@@ -370,6 +369,5 @@ struct genapic apic_physflat =  {
 	.trampoline_phys_low		= DEFAULT_TRAMPOLINE_PHYS_LOW,
 	.trampoline_phys_high		= DEFAULT_TRAMPOLINE_PHYS_HIGH,
 	.wait_for_init_deassert		= NULL,
-	.smp_callin_clear_local_apic	= NULL,
 	.inquire_remote_apic		= NULL,
 };
diff --git a/arch/x86/kernel/genx2apic_cluster.c b/arch/x86/kernel/genx2apic_cluster.c
index 49ae07e..6cccd3a 100644
--- a/arch/x86/kernel/genx2apic_cluster.c
+++ b/arch/x86/kernel/genx2apic_cluster.c
@@ -231,6 +231,5 @@ struct genapic apic_x2apic_cluster = {
 	.trampoline_phys_low		= DEFAULT_TRAMPOLINE_PHYS_LOW,
 	.trampoline_phys_high		= DEFAULT_TRAMPOLINE_PHYS_HIGH,
 	.wait_for_init_deassert		= NULL,
-	.smp_callin_clear_local_apic	= NULL,
 	.inquire_remote_apic		= NULL,
 };
diff --git a/arch/x86/kernel/genx2apic_phys.c b/arch/x86/kernel/genx2apic_phys.c
index 2599aaf..17ff29a 100644
--- a/arch/x86/kernel/genx2apic_phys.c
+++ b/arch/x86/kernel/genx2apic_phys.c
@@ -217,6 +217,5 @@ struct genapic apic_x2apic_phys = {
 	.trampoline_phys_low		= DEFAULT_TRAMPOLINE_PHYS_LOW,
 	.trampoline_phys_high		= DEFAULT_TRAMPOLINE_PHYS_HIGH,
 	.wait_for_init_deassert		= NULL,
-	.smp_callin_clear_local_apic	= NULL,
 	.inquire_remote_apic		= NULL,
 };
diff --git a/arch/x86/kernel/genx2apic_uv_x.c b/arch/x86/kernel/genx2apic_uv_x.c
index 1d4d503..d46531d 100644
--- a/arch/x86/kernel/genx2apic_uv_x.c
+++ b/arch/x86/kernel/genx2apic_uv_x.c
@@ -290,7 +290,6 @@ struct genapic apic_x2apic_uv_x = {
 	.trampoline_phys_low		= DEFAULT_TRAMPOLINE_PHYS_LOW,
 	.trampoline_phys_high		= DEFAULT_TRAMPOLINE_PHYS_HIGH,
 	.wait_for_init_deassert		= NULL,
-	.smp_callin_clear_local_apic	= NULL,
 	.inquire_remote_apic		= NULL,
 };
 
diff --git a/arch/x86/kernel/numaq_32.c b/arch/x86/kernel/numaq_32.c
index be1fdd7..07954d1 100644
--- a/arch/x86/kernel/numaq_32.c
+++ b/arch/x86/kernel/numaq_32.c
@@ -381,15 +381,6 @@ extern void numaq_mps_oem_check(struct mpc_table *, char *, char *);
 #define NUMAQ_TRAMPOLINE_PHYS_LOW (0x8)
 #define NUMAQ_TRAMPOLINE_PHYS_HIGH (0xa)
 
-/*
- * Because we use NMIs rather than the INIT-STARTUP sequence to
- * bootstrap the CPUs, the APIC may be in a weird state. Kick it:
- */
-static inline void numaq_smp_callin_clear_local_apic(void)
-{
-	clear_local_APIC();
-}
-
 static inline const cpumask_t *numaq_target_cpus(void)
 {
 	return &CPU_MASK_ALL;
@@ -594,6 +585,5 @@ struct genapic apic_numaq = {
 	/* We don't do anything here because we use NMI's to boot instead */
 	.wait_for_init_deassert		= NULL,
 
-	.smp_callin_clear_local_apic	= numaq_smp_callin_clear_local_apic,
 	.inquire_remote_apic		= NULL,
 };
diff --git a/arch/x86/kernel/probe_32.c b/arch/x86/kernel/probe_32.c
index 7445f66..e96b6b2 100644
--- a/arch/x86/kernel/probe_32.c
+++ b/arch/x86/kernel/probe_32.c
@@ -124,7 +124,6 @@ struct genapic apic_default = {
 
 	.wait_for_init_deassert		= default_wait_for_init_deassert,
 
-	.smp_callin_clear_local_apic	= NULL,
 	.inquire_remote_apic		= default_inquire_remote_apic,
 };
 
diff --git a/arch/x86/kernel/smpboot.c b/arch/x86/kernel/smpboot.c
index 401b649..a04b219 100644
--- a/arch/x86/kernel/smpboot.c
+++ b/arch/x86/kernel/smpboot.c
@@ -243,8 +243,6 @@ static void __cpuinit smp_callin(void)
 	 */
 
 	pr_debug("CALLIN, before setup_local_APIC().\n");
-	if (apic->smp_callin_clear_local_apic)
-		apic->smp_callin_clear_local_apic();
 	setup_local_APIC();
 	end_local_APIC_setup();
 	map_cpu_to_logical_apicid();
diff --git a/arch/x86/kernel/summit_32.c b/arch/x86/kernel/summit_32.c
index 17197fc..7b7eeb6 100644
--- a/arch/x86/kernel/summit_32.c
+++ b/arch/x86/kernel/summit_32.c
@@ -594,6 +594,5 @@ struct genapic apic_summit = {
 
 	.wait_for_init_deassert		= default_wait_for_init_deassert,
 
-	.smp_callin_clear_local_apic	= NULL,
 	.inquire_remote_apic		= default_inquire_remote_apic,
 };
-- 
1.5.6.5


^ permalink raw reply	[flat|nested] 18+ messages in thread

* [PATCH] Remove multi_timer_check
  2009-01-30 10:17           ` [PATCH] Remove smp_callin_clear_local_apic hook Andi Kleen
@ 2009-01-30 10:17             ` Andi Kleen
  2009-01-30 10:17               ` [PATCH] Remove setup_portio_remap Andi Kleen
  0 siblings, 1 reply; 18+ messages in thread
From: Andi Kleen @ 2009-01-30 10:17 UTC (permalink / raw)
  To: mingo; +Cc: linux-kernel, lnxninja, Andi Kleen

From: Andi Kleen <ak@linux.intel.com>

Only used by NUMAQ

Signed-off-by: Andi Kleen <ak@linux.intel.com>
---
 arch/x86/include/asm/genapic.h      |    1 -
 arch/x86/kernel/bigsmp_32.c         |    1 -
 arch/x86/kernel/es7000_32.c         |    1 -
 arch/x86/kernel/genapic_flat_64.c   |    2 --
 arch/x86/kernel/genx2apic_cluster.c |    1 -
 arch/x86/kernel/genx2apic_phys.c    |    1 -
 arch/x86/kernel/genx2apic_uv_x.c    |    1 -
 arch/x86/kernel/io_apic.c           |    8 --------
 arch/x86/kernel/numaq_32.c          |   10 ----------
 arch/x86/kernel/probe_32.c          |    1 -
 arch/x86/kernel/summit_32.c         |    1 -
 11 files changed, 0 insertions(+), 28 deletions(-)

diff --git a/arch/x86/include/asm/genapic.h b/arch/x86/include/asm/genapic.h
index 07bab93..6197803 100644
--- a/arch/x86/include/asm/genapic.h
+++ b/arch/x86/include/asm/genapic.h
@@ -40,7 +40,6 @@ struct genapic {
 	physid_mask_t (*ioapic_phys_id_map)(physid_mask_t map);
 
 	void (*setup_apic_routing)(void);
-	int (*multi_timer_check)(int apic, int irq);
 	int (*apicid_to_node)(int logical_apicid);
 	int (*cpu_to_logical_apicid)(int cpu);
 	int (*cpu_present_to_apicid)(int mps_cpu);
diff --git a/arch/x86/kernel/bigsmp_32.c b/arch/x86/kernel/bigsmp_32.c
index 85d72ee..9c1e464 100644
--- a/arch/x86/kernel/bigsmp_32.c
+++ b/arch/x86/kernel/bigsmp_32.c
@@ -228,7 +228,6 @@ struct genapic apic_bigsmp = {
 
 	.ioapic_phys_id_map		= bigsmp_ioapic_phys_id_map,
 	.setup_apic_routing		= bigsmp_setup_apic_routing,
-	.multi_timer_check		= NULL,
 	.apicid_to_node			= bigsmp_apicid_to_node,
 	.cpu_to_logical_apicid		= bigsmp_cpu_to_logical_apicid,
 	.cpu_present_to_apicid		= bigsmp_cpu_present_to_apicid,
diff --git a/arch/x86/kernel/es7000_32.c b/arch/x86/kernel/es7000_32.c
index 770205b..5e1c4aa 100644
--- a/arch/x86/kernel/es7000_32.c
+++ b/arch/x86/kernel/es7000_32.c
@@ -764,7 +764,6 @@ struct genapic apic_es7000 = {
 
 	.ioapic_phys_id_map		= es7000_ioapic_phys_id_map,
 	.setup_apic_routing		= es7000_setup_apic_routing,
-	.multi_timer_check		= NULL,
 	.apicid_to_node			= es7000_apicid_to_node,
 	.cpu_to_logical_apicid		= es7000_cpu_to_logical_apicid,
 	.cpu_present_to_apicid		= es7000_cpu_present_to_apicid,
diff --git a/arch/x86/kernel/genapic_flat_64.c b/arch/x86/kernel/genapic_flat_64.c
index b42e724..6a00ea8 100644
--- a/arch/x86/kernel/genapic_flat_64.c
+++ b/arch/x86/kernel/genapic_flat_64.c
@@ -198,7 +198,6 @@ struct genapic apic_flat =  {
 
 	.ioapic_phys_id_map		= NULL,
 	.setup_apic_routing		= NULL,
-	.multi_timer_check		= NULL,
 	.apicid_to_node			= NULL,
 	.cpu_to_logical_apicid		= NULL,
 	.cpu_present_to_apicid		= default_cpu_present_to_apicid,
@@ -341,7 +340,6 @@ struct genapic apic_physflat =  {
 
 	.ioapic_phys_id_map		= NULL,
 	.setup_apic_routing		= NULL,
-	.multi_timer_check		= NULL,
 	.apicid_to_node			= NULL,
 	.cpu_to_logical_apicid		= NULL,
 	.cpu_present_to_apicid		= default_cpu_present_to_apicid,
diff --git a/arch/x86/kernel/genx2apic_cluster.c b/arch/x86/kernel/genx2apic_cluster.c
index 6cccd3a..7e01834 100644
--- a/arch/x86/kernel/genx2apic_cluster.c
+++ b/arch/x86/kernel/genx2apic_cluster.c
@@ -203,7 +203,6 @@ struct genapic apic_x2apic_cluster = {
 
 	.ioapic_phys_id_map		= NULL,
 	.setup_apic_routing		= NULL,
-	.multi_timer_check		= NULL,
 	.apicid_to_node			= NULL,
 	.cpu_to_logical_apicid		= NULL,
 	.cpu_present_to_apicid		= default_cpu_present_to_apicid,
diff --git a/arch/x86/kernel/genx2apic_phys.c b/arch/x86/kernel/genx2apic_phys.c
index 17ff29a..b92d60b 100644
--- a/arch/x86/kernel/genx2apic_phys.c
+++ b/arch/x86/kernel/genx2apic_phys.c
@@ -189,7 +189,6 @@ struct genapic apic_x2apic_phys = {
 
 	.ioapic_phys_id_map		= NULL,
 	.setup_apic_routing		= NULL,
-	.multi_timer_check		= NULL,
 	.apicid_to_node			= NULL,
 	.cpu_to_logical_apicid		= NULL,
 	.cpu_present_to_apicid		= default_cpu_present_to_apicid,
diff --git a/arch/x86/kernel/genx2apic_uv_x.c b/arch/x86/kernel/genx2apic_uv_x.c
index d46531d..6394b0e 100644
--- a/arch/x86/kernel/genx2apic_uv_x.c
+++ b/arch/x86/kernel/genx2apic_uv_x.c
@@ -262,7 +262,6 @@ struct genapic apic_x2apic_uv_x = {
 
 	.ioapic_phys_id_map		= NULL,
 	.setup_apic_routing		= NULL,
-	.multi_timer_check		= NULL,
 	.apicid_to_node			= NULL,
 	.cpu_to_logical_apicid		= NULL,
 	.cpu_present_to_apicid		= default_cpu_present_to_apicid,
diff --git a/arch/x86/kernel/io_apic.c b/arch/x86/kernel/io_apic.c
index 3378ffb..9a3e66f 100644
--- a/arch/x86/kernel/io_apic.c
+++ b/arch/x86/kernel/io_apic.c
@@ -1602,14 +1602,6 @@ static void __init setup_IO_APIC_irqs(void)
 
 			irq = pin_2_irq(idx, apic_id, pin);
 
-			/*
-			 * Skip the timer IRQ if there's a quirk handler
-			 * installed and if it returns 1:
-			 */
-			if (apic->multi_timer_check &&
-					apic->multi_timer_check(apic_id, irq))
-				continue;
-
 			desc = irq_to_desc_alloc_cpu(irq, cpu);
 			if (!desc) {
 				printk(KERN_INFO "can not get irq_desc for %d\n", irq);
diff --git a/arch/x86/kernel/numaq_32.c b/arch/x86/kernel/numaq_32.c
index 07954d1..73ce5ef 100644
--- a/arch/x86/kernel/numaq_32.c
+++ b/arch/x86/kernel/numaq_32.c
@@ -415,15 +415,6 @@ static inline void numaq_setup_apic_routing(void)
 		"NUMA-Q", nr_ioapics);
 }
 
-/*
- * Skip adding the timer int on secondary nodes, which causes
- * a small but painful rift in the time-space continuum.
- */
-static inline int numaq_multi_timer_check(int apic, int irq)
-{
-	return apic != 0 && irq == 0;
-}
-
 static inline physid_mask_t numaq_ioapic_phys_id_map(physid_mask_t phys_map)
 {
 	/* We don't have a good way to do this yet - hack */
@@ -554,7 +545,6 @@ struct genapic apic_numaq = {
 
 	.ioapic_phys_id_map		= numaq_ioapic_phys_id_map,
 	.setup_apic_routing		= numaq_setup_apic_routing,
-	.multi_timer_check		= numaq_multi_timer_check,
 	.apicid_to_node			= numaq_apicid_to_node,
 	.cpu_to_logical_apicid		= numaq_cpu_to_logical_apicid,
 	.cpu_present_to_apicid		= numaq_cpu_present_to_apicid,
diff --git a/arch/x86/kernel/probe_32.c b/arch/x86/kernel/probe_32.c
index e96b6b2..c296fb4 100644
--- a/arch/x86/kernel/probe_32.c
+++ b/arch/x86/kernel/probe_32.c
@@ -94,7 +94,6 @@ struct genapic apic_default = {
 
 	.ioapic_phys_id_map		= default_ioapic_phys_id_map,
 	.setup_apic_routing		= default_setup_apic_routing,
-	.multi_timer_check		= NULL,
 	.apicid_to_node			= default_apicid_to_node,
 	.cpu_to_logical_apicid		= default_cpu_to_logical_apicid,
 	.cpu_present_to_apicid		= default_cpu_present_to_apicid,
diff --git a/arch/x86/kernel/summit_32.c b/arch/x86/kernel/summit_32.c
index 7b7eeb6..dbb7206 100644
--- a/arch/x86/kernel/summit_32.c
+++ b/arch/x86/kernel/summit_32.c
@@ -564,7 +564,6 @@ struct genapic apic_summit = {
 
 	.ioapic_phys_id_map		= summit_ioapic_phys_id_map,
 	.setup_apic_routing		= summit_setup_apic_routing,
-	.multi_timer_check		= NULL,
 	.apicid_to_node			= summit_apicid_to_node,
 	.cpu_to_logical_apicid		= summit_cpu_to_logical_apicid,
 	.cpu_present_to_apicid		= summit_cpu_present_to_apicid,
-- 
1.5.6.5


^ permalink raw reply	[flat|nested] 18+ messages in thread

* [PATCH] Remove setup_portio_remap
  2009-01-30 10:17             ` [PATCH] Remove multi_timer_check Andi Kleen
@ 2009-01-30 10:17               ` Andi Kleen
  2009-01-30 10:17                 ` [PATCH] Remove wakeup_cpu genapic vector Andi Kleen
  0 siblings, 1 reply; 18+ messages in thread
From: Andi Kleen @ 2009-01-30 10:17 UTC (permalink / raw)
  To: mingo; +Cc: linux-kernel, lnxninja, Andi Kleen

From: Andi Kleen <ak@linux.intel.com>

Only used by NUMAQ

Signed-off-by: Andi Kleen <ak@linux.intel.com>
---
 arch/x86/include/asm/genapic.h      |    1 -
 arch/x86/kernel/bigsmp_32.c         |    1 -
 arch/x86/kernel/es7000_32.c         |    1 -
 arch/x86/kernel/genapic_flat_64.c   |    2 --
 arch/x86/kernel/genx2apic_cluster.c |    1 -
 arch/x86/kernel/genx2apic_phys.c    |    1 -
 arch/x86/kernel/genx2apic_uv_x.c    |    1 -
 arch/x86/kernel/numaq_32.c          |   14 --------------
 arch/x86/kernel/probe_32.c          |    1 -
 arch/x86/kernel/smpboot.c           |    3 ---
 arch/x86/kernel/summit_32.c         |    1 -
 11 files changed, 0 insertions(+), 27 deletions(-)

diff --git a/arch/x86/include/asm/genapic.h b/arch/x86/include/asm/genapic.h
index 6197803..988e1bc 100644
--- a/arch/x86/include/asm/genapic.h
+++ b/arch/x86/include/asm/genapic.h
@@ -44,7 +44,6 @@ struct genapic {
 	int (*cpu_to_logical_apicid)(int cpu);
 	int (*cpu_present_to_apicid)(int mps_cpu);
 	physid_mask_t (*apicid_to_cpu_present)(int phys_apicid);
-	void (*setup_portio_remap)(void);
 	int (*check_phys_apicid_present)(int boot_cpu_physical_apicid);
 	void (*enable_apic_mode)(void);
 	int (*phys_pkg_id)(int cpuid_apic, int index_msb);
diff --git a/arch/x86/kernel/bigsmp_32.c b/arch/x86/kernel/bigsmp_32.c
index 9c1e464..e3d31ae 100644
--- a/arch/x86/kernel/bigsmp_32.c
+++ b/arch/x86/kernel/bigsmp_32.c
@@ -232,7 +232,6 @@ struct genapic apic_bigsmp = {
 	.cpu_to_logical_apicid		= bigsmp_cpu_to_logical_apicid,
 	.cpu_present_to_apicid		= bigsmp_cpu_present_to_apicid,
 	.apicid_to_cpu_present		= bigsmp_apicid_to_cpu_present,
-	.setup_portio_remap		= NULL,
 	.check_phys_apicid_present	= bigsmp_check_phys_apicid_present,
 	.enable_apic_mode		= NULL,
 	.phys_pkg_id			= bigsmp_phys_pkg_id,
diff --git a/arch/x86/kernel/es7000_32.c b/arch/x86/kernel/es7000_32.c
index 5e1c4aa..b50f0f5 100644
--- a/arch/x86/kernel/es7000_32.c
+++ b/arch/x86/kernel/es7000_32.c
@@ -768,7 +768,6 @@ struct genapic apic_es7000 = {
 	.cpu_to_logical_apicid		= es7000_cpu_to_logical_apicid,
 	.cpu_present_to_apicid		= es7000_cpu_present_to_apicid,
 	.apicid_to_cpu_present		= es7000_apicid_to_cpu_present,
-	.setup_portio_remap		= NULL,
 	.check_phys_apicid_present	= es7000_check_phys_apicid_present,
 	.enable_apic_mode		= es7000_enable_apic_mode,
 	.phys_pkg_id			= es7000_phys_pkg_id,
diff --git a/arch/x86/kernel/genapic_flat_64.c b/arch/x86/kernel/genapic_flat_64.c
index 6a00ea8..d85b7fc 100644
--- a/arch/x86/kernel/genapic_flat_64.c
+++ b/arch/x86/kernel/genapic_flat_64.c
@@ -202,7 +202,6 @@ struct genapic apic_flat =  {
 	.cpu_to_logical_apicid		= NULL,
 	.cpu_present_to_apicid		= default_cpu_present_to_apicid,
 	.apicid_to_cpu_present		= NULL,
-	.setup_portio_remap		= NULL,
 	.check_phys_apicid_present	= default_check_phys_apicid_present,
 	.enable_apic_mode		= NULL,
 	.phys_pkg_id			= flat_phys_pkg_id,
@@ -344,7 +343,6 @@ struct genapic apic_physflat =  {
 	.cpu_to_logical_apicid		= NULL,
 	.cpu_present_to_apicid		= default_cpu_present_to_apicid,
 	.apicid_to_cpu_present		= NULL,
-	.setup_portio_remap		= NULL,
 	.check_phys_apicid_present	= default_check_phys_apicid_present,
 	.enable_apic_mode		= NULL,
 	.phys_pkg_id			= flat_phys_pkg_id,
diff --git a/arch/x86/kernel/genx2apic_cluster.c b/arch/x86/kernel/genx2apic_cluster.c
index 7e01834..9fc9582 100644
--- a/arch/x86/kernel/genx2apic_cluster.c
+++ b/arch/x86/kernel/genx2apic_cluster.c
@@ -207,7 +207,6 @@ struct genapic apic_x2apic_cluster = {
 	.cpu_to_logical_apicid		= NULL,
 	.cpu_present_to_apicid		= default_cpu_present_to_apicid,
 	.apicid_to_cpu_present		= NULL,
-	.setup_portio_remap		= NULL,
 	.check_phys_apicid_present	= default_check_phys_apicid_present,
 	.enable_apic_mode		= NULL,
 	.phys_pkg_id			= x2apic_cluster_phys_pkg_id,
diff --git a/arch/x86/kernel/genx2apic_phys.c b/arch/x86/kernel/genx2apic_phys.c
index b92d60b..04fb617 100644
--- a/arch/x86/kernel/genx2apic_phys.c
+++ b/arch/x86/kernel/genx2apic_phys.c
@@ -193,7 +193,6 @@ struct genapic apic_x2apic_phys = {
 	.cpu_to_logical_apicid		= NULL,
 	.cpu_present_to_apicid		= default_cpu_present_to_apicid,
 	.apicid_to_cpu_present		= NULL,
-	.setup_portio_remap		= NULL,
 	.check_phys_apicid_present	= default_check_phys_apicid_present,
 	.enable_apic_mode		= NULL,
 	.phys_pkg_id			= x2apic_phys_pkg_id,
diff --git a/arch/x86/kernel/genx2apic_uv_x.c b/arch/x86/kernel/genx2apic_uv_x.c
index 6394b0e..ac0e23b 100644
--- a/arch/x86/kernel/genx2apic_uv_x.c
+++ b/arch/x86/kernel/genx2apic_uv_x.c
@@ -266,7 +266,6 @@ struct genapic apic_x2apic_uv_x = {
 	.cpu_to_logical_apicid		= NULL,
 	.cpu_present_to_apicid		= default_cpu_present_to_apicid,
 	.apicid_to_cpu_present		= NULL,
-	.setup_portio_remap		= NULL,
 	.check_phys_apicid_present	= default_check_phys_apicid_present,
 	.enable_apic_mode		= NULL,
 	.phys_pkg_id			= uv_phys_pkg_id,
diff --git a/arch/x86/kernel/numaq_32.c b/arch/x86/kernel/numaq_32.c
index 73ce5ef..9c9b3c7 100644
--- a/arch/x86/kernel/numaq_32.c
+++ b/arch/x86/kernel/numaq_32.c
@@ -510,19 +510,6 @@ static void numaq_vector_allocation_domain(int cpu, cpumask_t *retmask)
 	*retmask = (cpumask_t){ { [0] = APIC_ALL_CPUS, } };
 }
 
-static void numaq_setup_portio_remap(void)
-{
-	int num_quads = num_online_nodes();
-
-	if (num_quads <= 1)
-       		return;
-
-	printk("Remapping cross-quad port I/O for %d quads\n", num_quads);
-	xquad_portio = ioremap(XQUAD_PORTIO_BASE, num_quads*XQUAD_PORTIO_QUAD);
-	printk("xquad_portio vaddr 0x%08lx, len %08lx\n",
-		(u_long) xquad_portio, (u_long) num_quads*XQUAD_PORTIO_QUAD);
-}
-
 struct genapic apic_numaq = {
 
 	.name				= "NUMAQ",
@@ -549,7 +536,6 @@ struct genapic apic_numaq = {
 	.cpu_to_logical_apicid		= numaq_cpu_to_logical_apicid,
 	.cpu_present_to_apicid		= numaq_cpu_present_to_apicid,
 	.apicid_to_cpu_present		= numaq_apicid_to_cpu_present,
-	.setup_portio_remap		= numaq_setup_portio_remap,
 	.check_phys_apicid_present	= numaq_check_phys_apicid_present,
 	.enable_apic_mode		= NULL,
 	.phys_pkg_id			= numaq_phys_pkg_id,
diff --git a/arch/x86/kernel/probe_32.c b/arch/x86/kernel/probe_32.c
index c296fb4..905295e 100644
--- a/arch/x86/kernel/probe_32.c
+++ b/arch/x86/kernel/probe_32.c
@@ -98,7 +98,6 @@ struct genapic apic_default = {
 	.cpu_to_logical_apicid		= default_cpu_to_logical_apicid,
 	.cpu_present_to_apicid		= default_cpu_present_to_apicid,
 	.apicid_to_cpu_present		= default_apicid_to_cpu_present,
-	.setup_portio_remap		= NULL,
 	.check_phys_apicid_present	= default_check_phys_apicid_present,
 	.enable_apic_mode		= NULL,
 	.phys_pkg_id			= default_phys_pkg_id,
diff --git a/arch/x86/kernel/smpboot.c b/arch/x86/kernel/smpboot.c
index a04b219..f479bba 100644
--- a/arch/x86/kernel/smpboot.c
+++ b/arch/x86/kernel/smpboot.c
@@ -1120,9 +1120,6 @@ void __init native_smp_prepare_cpus(unsigned int max_cpus)
 
 	map_cpu_to_logical_apicid();
 
-	if (apic->setup_portio_remap)
-		apic->setup_portio_remap();
-
 	smpboot_setup_io_apic();
 	/*
 	 * Set up local APIC timer on boot CPU.
diff --git a/arch/x86/kernel/summit_32.c b/arch/x86/kernel/summit_32.c
index dbb7206..f0dde1c 100644
--- a/arch/x86/kernel/summit_32.c
+++ b/arch/x86/kernel/summit_32.c
@@ -568,7 +568,6 @@ struct genapic apic_summit = {
 	.cpu_to_logical_apicid		= summit_cpu_to_logical_apicid,
 	.cpu_present_to_apicid		= summit_cpu_present_to_apicid,
 	.apicid_to_cpu_present		= summit_apicid_to_cpu_present,
-	.setup_portio_remap		= NULL,
 	.check_phys_apicid_present	= summit_check_phys_apicid_present,
 	.enable_apic_mode		= NULL,
 	.phys_pkg_id			= summit_phys_pkg_id,
-- 
1.5.6.5


^ permalink raw reply	[flat|nested] 18+ messages in thread

* [PATCH] Remove wakeup_cpu genapic vector
  2009-01-30 10:17               ` [PATCH] Remove setup_portio_remap Andi Kleen
@ 2009-01-30 10:17                 ` Andi Kleen
  2009-01-30 10:17                   ` [PATCH] Remove now unused default_update_genapic Andi Kleen
  0 siblings, 1 reply; 18+ messages in thread
From: Andi Kleen @ 2009-01-30 10:17 UTC (permalink / raw)
  To: mingo; +Cc: linux-kernel, lnxninja, Andi Kleen

From: Andi Kleen <ak@linux.intel.com>

... and instead call wakeup_secondary_cpu_via_init directly in smpboot.c

Was only used by es7000 and numaq

Signed-off-by: Andi Kleen <ak@linux.intel.com>
---
 arch/x86/include/asm/genapic.h      |    3 --
 arch/x86/include/asm/setup.h        |    1 -
 arch/x86/kernel/bigsmp_32.c         |    1 -
 arch/x86/kernel/es7000_32.c         |    4 ---
 arch/x86/kernel/genapic_flat_64.c   |    2 -
 arch/x86/kernel/genx2apic_cluster.c |    1 -
 arch/x86/kernel/genx2apic_phys.c    |    1 -
 arch/x86/kernel/genx2apic_uv_x.c    |    1 -
 arch/x86/kernel/numaq_32.c          |   42 -----------------------------------
 arch/x86/kernel/probe_32.c          |    1 -
 arch/x86/kernel/setup.c             |    5 ----
 arch/x86/kernel/smpboot.c           |    6 ++--
 arch/x86/kernel/summit_32.c         |    1 -
 13 files changed, 3 insertions(+), 66 deletions(-)

diff --git a/arch/x86/include/asm/genapic.h b/arch/x86/include/asm/genapic.h
index 988e1bc..2047b14 100644
--- a/arch/x86/include/asm/genapic.h
+++ b/arch/x86/include/asm/genapic.h
@@ -71,9 +71,6 @@ struct genapic {
 	void (*send_IPI_all)(int vector);
 	void (*send_IPI_self)(int vector);
 
-	/* wakeup_secondary_cpu */
-	int (*wakeup_cpu)(int apicid, unsigned long start_eip);
-
 	int trampoline_phys_low;
 	int trampoline_phys_high;
 
diff --git a/arch/x86/include/asm/setup.h b/arch/x86/include/asm/setup.h
index 8c8289c..e0b651e 100644
--- a/arch/x86/include/asm/setup.h
+++ b/arch/x86/include/asm/setup.h
@@ -20,7 +20,6 @@ static inline void visws_early_detect(void) { }
 static inline int is_visws_box(void) { return 0; }
 #endif
 
-extern int wakeup_secondary_cpu_via_init(int apicid, unsigned long start_eip);
 /*
  * Any setup quirks to be performed?
  */
diff --git a/arch/x86/kernel/bigsmp_32.c b/arch/x86/kernel/bigsmp_32.c
index e3d31ae..e35e1ff 100644
--- a/arch/x86/kernel/bigsmp_32.c
+++ b/arch/x86/kernel/bigsmp_32.c
@@ -250,7 +250,6 @@ struct genapic apic_bigsmp = {
 	.send_IPI_all			= bigsmp_send_IPI_all,
 	.send_IPI_self			= NULL,
 
-	.wakeup_cpu			= NULL,
 	.trampoline_phys_low		= DEFAULT_TRAMPOLINE_PHYS_LOW,
 	.trampoline_phys_high		= DEFAULT_TRAMPOLINE_PHYS_HIGH,
 
diff --git a/arch/x86/kernel/es7000_32.c b/arch/x86/kernel/es7000_32.c
index b50f0f5..c94fc21 100644
--- a/arch/x86/kernel/es7000_32.c
+++ b/arch/x86/kernel/es7000_32.c
@@ -183,14 +183,11 @@ static int wakeup_secondary_cpu_via_mip(int cpu, unsigned long eip)
 
 static int __init es7000_update_genapic(void)
 {
-	apic->wakeup_cpu = wakeup_secondary_cpu_via_mip;
-
 	/* MPENTIUMIII */
 	if (boot_cpu_data.x86 == 6 &&
 	    (boot_cpu_data.x86_model >= 7 || boot_cpu_data.x86_model <= 11)) {
 		es7000_update_genapic_to_cluster();
 		apic->wait_for_init_deassert = NULL;
-		apic->wakeup_cpu = wakeup_secondary_cpu_via_mip;
 	}
 
 	return 0;
@@ -786,7 +783,6 @@ struct genapic apic_es7000 = {
 	.send_IPI_all			= es7000_send_IPI_all,
 	.send_IPI_self			= NULL,
 
-	.wakeup_cpu			= NULL,
 
 	.trampoline_phys_low		= 0x467,
 	.trampoline_phys_high		= 0x469,
diff --git a/arch/x86/kernel/genapic_flat_64.c b/arch/x86/kernel/genapic_flat_64.c
index d85b7fc..e87c3bc 100644
--- a/arch/x86/kernel/genapic_flat_64.c
+++ b/arch/x86/kernel/genapic_flat_64.c
@@ -220,7 +220,6 @@ struct genapic apic_flat =  {
 	.send_IPI_all			= flat_send_IPI_all,
 	.send_IPI_self			= apic_send_IPI_self,
 
-	.wakeup_cpu			= NULL,
 	.trampoline_phys_low		= DEFAULT_TRAMPOLINE_PHYS_LOW,
 	.trampoline_phys_high		= DEFAULT_TRAMPOLINE_PHYS_HIGH,
 	.wait_for_init_deassert		= NULL,
@@ -361,7 +360,6 @@ struct genapic apic_physflat =  {
 	.send_IPI_all			= physflat_send_IPI_all,
 	.send_IPI_self			= apic_send_IPI_self,
 
-	.wakeup_cpu			= NULL,
 	.trampoline_phys_low		= DEFAULT_TRAMPOLINE_PHYS_LOW,
 	.trampoline_phys_high		= DEFAULT_TRAMPOLINE_PHYS_HIGH,
 	.wait_for_init_deassert		= NULL,
diff --git a/arch/x86/kernel/genx2apic_cluster.c b/arch/x86/kernel/genx2apic_cluster.c
index 9fc9582..2e7497b 100644
--- a/arch/x86/kernel/genx2apic_cluster.c
+++ b/arch/x86/kernel/genx2apic_cluster.c
@@ -225,7 +225,6 @@ struct genapic apic_x2apic_cluster = {
 	.send_IPI_all			= x2apic_send_IPI_all,
 	.send_IPI_self			= x2apic_send_IPI_self,
 
-	.wakeup_cpu			= NULL,
 	.trampoline_phys_low		= DEFAULT_TRAMPOLINE_PHYS_LOW,
 	.trampoline_phys_high		= DEFAULT_TRAMPOLINE_PHYS_HIGH,
 	.wait_for_init_deassert		= NULL,
diff --git a/arch/x86/kernel/genx2apic_phys.c b/arch/x86/kernel/genx2apic_phys.c
index 04fb617..f47c2ff 100644
--- a/arch/x86/kernel/genx2apic_phys.c
+++ b/arch/x86/kernel/genx2apic_phys.c
@@ -211,7 +211,6 @@ struct genapic apic_x2apic_phys = {
 	.send_IPI_all			= x2apic_send_IPI_all,
 	.send_IPI_self			= x2apic_send_IPI_self,
 
-	.wakeup_cpu			= NULL,
 	.trampoline_phys_low		= DEFAULT_TRAMPOLINE_PHYS_LOW,
 	.trampoline_phys_high		= DEFAULT_TRAMPOLINE_PHYS_HIGH,
 	.wait_for_init_deassert		= NULL,
diff --git a/arch/x86/kernel/genx2apic_uv_x.c b/arch/x86/kernel/genx2apic_uv_x.c
index ac0e23b..ba1e3b1 100644
--- a/arch/x86/kernel/genx2apic_uv_x.c
+++ b/arch/x86/kernel/genx2apic_uv_x.c
@@ -284,7 +284,6 @@ struct genapic apic_x2apic_uv_x = {
 	.send_IPI_all			= uv_send_IPI_all,
 	.send_IPI_self			= uv_send_IPI_self,
 
-	.wakeup_cpu			= NULL,
 	.trampoline_phys_low		= DEFAULT_TRAMPOLINE_PHYS_LOW,
 	.trampoline_phys_high		= DEFAULT_TRAMPOLINE_PHYS_HIGH,
 	.wait_for_init_deassert		= NULL,
diff --git a/arch/x86/kernel/numaq_32.c b/arch/x86/kernel/numaq_32.c
index 9c9b3c7..d412d0e 100644
--- a/arch/x86/kernel/numaq_32.c
+++ b/arch/x86/kernel/numaq_32.c
@@ -234,49 +234,8 @@ static int __init numaq_setup_ioapic_ids(void)
 	return 1;
 }
 
-/*
- * Poke the other CPU in the eye via NMI to wake it up. Remember that the normal
- * INIT, INIT, STARTUP sequence will reset the chip hard for us, and this
- * won't ... remember to clear down the APIC, etc later.
- */
-static int __devinit
-wakeup_secondary_cpu_via_nmi(int logical_apicid, unsigned long start_eip)
-{
-	unsigned long send_status, accept_status = 0;
-	int maxlvt;
-
-	/* Target chip */
-	/* Boot on the stack */
-	/* Kick the second */
-	apic_icr_write(APIC_DM_NMI | apic->dest_logical, logical_apicid);
-
-	pr_debug("Waiting for send to finish...\n");
-	send_status = safe_apic_wait_icr_idle();
-
-	/*
-	 * Give the other CPU some time to accept the IPI.
-	 */
-	udelay(200);
-	if (APIC_INTEGRATED(apic_version[boot_cpu_physical_apicid])) {
-		maxlvt = lapic_get_maxlvt();
-		if (maxlvt > 3)			/* Due to the Pentium erratum 3AP.  */
-			apic_write(APIC_ESR, 0);
-		accept_status = (apic_read(APIC_ESR) & 0xEF);
-	}
-	pr_debug("NMI sent.\n");
-
-	if (send_status)
-		printk(KERN_ERR "APIC never delivered???\n");
-	if (accept_status)
-		printk(KERN_ERR "APIC delivery error (%lx).\n", accept_status);
-
-	return (send_status | accept_status);
-}
-
 static int __init numaq_update_genapic(void)
 {
-	apic->wakeup_cpu = wakeup_secondary_cpu_via_nmi;
-
 	return 0;
 }
 
@@ -554,7 +513,6 @@ struct genapic apic_numaq = {
 	.send_IPI_all			= numaq_send_IPI_all,
 	.send_IPI_self			= NULL,
 
-	.wakeup_cpu			= NULL,
 	.trampoline_phys_low		= NUMAQ_TRAMPOLINE_PHYS_LOW,
 	.trampoline_phys_high		= NUMAQ_TRAMPOLINE_PHYS_HIGH,
 
diff --git a/arch/x86/kernel/probe_32.c b/arch/x86/kernel/probe_32.c
index 905295e..b01936f 100644
--- a/arch/x86/kernel/probe_32.c
+++ b/arch/x86/kernel/probe_32.c
@@ -116,7 +116,6 @@ struct genapic apic_default = {
 	.send_IPI_all			= default_send_IPI_all,
 	.send_IPI_self			= NULL,
 
-	.wakeup_cpu			= NULL,
 	.trampoline_phys_low		= DEFAULT_TRAMPOLINE_PHYS_LOW,
 	.trampoline_phys_high		= DEFAULT_TRAMPOLINE_PHYS_HIGH,
 
diff --git a/arch/x86/kernel/setup.c b/arch/x86/kernel/setup.c
index f64e1a4..d6627cf 100644
--- a/arch/x86/kernel/setup.c
+++ b/arch/x86/kernel/setup.c
@@ -602,11 +602,6 @@ early_param("elfcorehdr", setup_elfcorehdr);
 
 static int __init default_update_genapic(void)
 {
-#ifdef CONFIG_SMP
-	if (!apic->wakeup_cpu)
-		apic->wakeup_cpu = wakeup_secondary_cpu_via_init;
-#endif
-
 	return 0;
 }
 
diff --git a/arch/x86/kernel/smpboot.c b/arch/x86/kernel/smpboot.c
index f479bba..2e32144 100644
--- a/arch/x86/kernel/smpboot.c
+++ b/arch/x86/kernel/smpboot.c
@@ -115,7 +115,6 @@ EXPORT_PER_CPU_SYMBOL(cpu_info);
 
 static atomic_t init_deasserted;
 
-
 /* Set if we find a B stepping CPU */
 static int __cpuinitdata smp_b_stepping;
 
@@ -709,7 +708,8 @@ static int __cpuinit do_boot_cpu(int apicid, int cpu)
 /*
  * NOTE - on most systems this is a PHYSICAL apic ID, but on multiquad
  * (ie clustered apic addressing mode), this is a LOGICAL apic ID.
- * Returns zero if CPU booted OK, else error code from ->wakeup_cpu.
+ * Returns zero if CPU booted OK, else error code from 
+ * wakeup_secondary_via_init.
  */
 {
 	unsigned long boot_error = 0;
@@ -796,7 +796,7 @@ do_rest:
 	/*
 	 * Starting actual IPI sequence...
 	 */
-	boot_error = apic->wakeup_cpu(apicid, start_ip);
+	boot_error = wakeup_secondary_cpu_via_init(apicid, start_ip);
 
 	if (!boot_error) {
 		/*
diff --git a/arch/x86/kernel/summit_32.c b/arch/x86/kernel/summit_32.c
index f0dde1c..ec815fe 100644
--- a/arch/x86/kernel/summit_32.c
+++ b/arch/x86/kernel/summit_32.c
@@ -586,7 +586,6 @@ struct genapic apic_summit = {
 	.send_IPI_all			= summit_send_IPI_all,
 	.send_IPI_self			= NULL,
 
-	.wakeup_cpu			= NULL,
 	.trampoline_phys_low		= DEFAULT_TRAMPOLINE_PHYS_LOW,
 	.trampoline_phys_high		= DEFAULT_TRAMPOLINE_PHYS_HIGH,
 
-- 
1.5.6.5


^ permalink raw reply	[flat|nested] 18+ messages in thread

* [PATCH] Remove now unused default_update_genapic
  2009-01-30 10:17                 ` [PATCH] Remove wakeup_cpu genapic vector Andi Kleen
@ 2009-01-30 10:17                   ` Andi Kleen
  2009-01-30 10:17                     ` [PATCH] Remove trampoline_phys_low/high genapic fields Andi Kleen
  0 siblings, 1 reply; 18+ messages in thread
From: Andi Kleen @ 2009-01-30 10:17 UTC (permalink / raw)
  To: mingo; +Cc: linux-kernel, lnxninja, Andi Kleen

From: Andi Kleen <ak@linux.intel.com>

Signed-off-by: Andi Kleen <ak@linux.intel.com>
---
 arch/x86/kernel/setup.c |    6 ------
 1 files changed, 0 insertions(+), 6 deletions(-)

diff --git a/arch/x86/kernel/setup.c b/arch/x86/kernel/setup.c
index d6627cf..535e6bd 100644
--- a/arch/x86/kernel/setup.c
+++ b/arch/x86/kernel/setup.c
@@ -600,13 +600,7 @@ static int __init setup_elfcorehdr(char *arg)
 early_param("elfcorehdr", setup_elfcorehdr);
 #endif
 
-static int __init default_update_genapic(void)
-{
-	return 0;
-}
-
 static struct x86_quirks default_x86_quirks __initdata = {
-	.update_genapic         = default_update_genapic,
 };
 
 struct x86_quirks *x86_quirks __initdata = &default_x86_quirks;
-- 
1.5.6.5


^ permalink raw reply	[flat|nested] 18+ messages in thread

* [PATCH] Remove trampoline_phys_low/high genapic fields
  2009-01-30 10:17                   ` [PATCH] Remove now unused default_update_genapic Andi Kleen
@ 2009-01-30 10:17                     ` Andi Kleen
  2009-01-30 10:17                       ` [PATCH] Remove enable_apic_mode genapic hook Andi Kleen
  0 siblings, 1 reply; 18+ messages in thread
From: Andi Kleen @ 2009-01-30 10:17 UTC (permalink / raw)
  To: mingo; +Cc: linux-kernel, lnxninja, Andi Kleen

From: Andi Kleen <ak@linux.intel.com>

were only used by NUMAQ and es7000

Signed-off-by: Andi Kleen <ak@linux.intel.com>
---
 arch/x86/include/asm/genapic.h       |    9 +++------
 arch/x86/include/asm/smpboot_hooks.h |   10 +++++-----
 arch/x86/kernel/bigsmp_32.c          |    2 --
 arch/x86/kernel/es7000_32.c          |    3 ---
 arch/x86/kernel/genapic_flat_64.c    |    4 ----
 arch/x86/kernel/genx2apic_cluster.c  |    2 --
 arch/x86/kernel/genx2apic_phys.c     |    2 --
 arch/x86/kernel/genx2apic_uv_x.c     |    2 --
 arch/x86/kernel/numaq_32.c           |    6 ------
 arch/x86/kernel/probe_32.c           |    2 --
 arch/x86/kernel/summit_32.c          |    2 --
 11 files changed, 8 insertions(+), 36 deletions(-)

diff --git a/arch/x86/include/asm/genapic.h b/arch/x86/include/asm/genapic.h
index 2047b14..658d66a 100644
--- a/arch/x86/include/asm/genapic.h
+++ b/arch/x86/include/asm/genapic.h
@@ -71,9 +71,6 @@ struct genapic {
 	void (*send_IPI_all)(int vector);
 	void (*send_IPI_self)(int vector);
 
-	int trampoline_phys_low;
-	int trampoline_phys_high;
-
 	void (*wait_for_init_deassert)(atomic_t *deassert);
 	void (*inquire_remote_apic)(int apicid);
 };
@@ -81,10 +78,10 @@ struct genapic {
 extern struct genapic *apic;
 
 /*
- * Warm reset vector default position:
+ * Warm reset vector position:
  */
-#define DEFAULT_TRAMPOLINE_PHYS_LOW		0x467
-#define DEFAULT_TRAMPOLINE_PHYS_HIGH		0x469
+#define TRAMPOLINE_PHYS_LOW		0x467
+#define TRAMPOLINE_PHYS_HIGH		0x469
 
 #ifdef CONFIG_X86_32
 extern void es7000_update_genapic_to_cluster(void);
diff --git a/arch/x86/include/asm/smpboot_hooks.h b/arch/x86/include/asm/smpboot_hooks.h
index 1def601..a104f84 100644
--- a/arch/x86/include/asm/smpboot_hooks.h
+++ b/arch/x86/include/asm/smpboot_hooks.h
@@ -13,11 +13,11 @@ static inline void smpboot_setup_warm_reset_vector(unsigned long start_eip)
 	CMOS_WRITE(0xa, 0xf);
 	local_flush_tlb();
 	pr_debug("1.\n");
-	*((volatile unsigned short *)phys_to_virt(apic->trampoline_phys_high)) =
-								 start_eip >> 4;
+	*((volatile unsigned short *)
+		phys_to_virt(TRAMPOLINE_PHYS_HIGH)) = start_eip >> 4;
 	pr_debug("2.\n");
-	*((volatile unsigned short *)phys_to_virt(apic->trampoline_phys_low)) =
-							 start_eip & 0xf;
+	*((volatile unsigned short *)
+		phys_to_virt(TRAMPOLINE_PHYS_LOW)) = start_eip & 0xf;
 	pr_debug("3.\n");
 }
 
@@ -34,7 +34,7 @@ static inline void smpboot_restore_warm_reset_vector(void)
 	 */
 	CMOS_WRITE(0, 0xf);
 
-	*((volatile long *)phys_to_virt(apic->trampoline_phys_low)) = 0;
+	*((volatile long *)phys_to_virt(TRAMPOLINE_PHYS_LOW)) = 0;
 }
 
 static inline void __init smpboot_setup_io_apic(void)
diff --git a/arch/x86/kernel/bigsmp_32.c b/arch/x86/kernel/bigsmp_32.c
index e35e1ff..17c6c06 100644
--- a/arch/x86/kernel/bigsmp_32.c
+++ b/arch/x86/kernel/bigsmp_32.c
@@ -250,8 +250,6 @@ struct genapic apic_bigsmp = {
 	.send_IPI_all			= bigsmp_send_IPI_all,
 	.send_IPI_self			= NULL,
 
-	.trampoline_phys_low		= DEFAULT_TRAMPOLINE_PHYS_LOW,
-	.trampoline_phys_high		= DEFAULT_TRAMPOLINE_PHYS_HIGH,
 
 	.wait_for_init_deassert		= default_wait_for_init_deassert,
 
diff --git a/arch/x86/kernel/es7000_32.c b/arch/x86/kernel/es7000_32.c
index c94fc21..bb4f525 100644
--- a/arch/x86/kernel/es7000_32.c
+++ b/arch/x86/kernel/es7000_32.c
@@ -784,9 +784,6 @@ struct genapic apic_es7000 = {
 	.send_IPI_self			= NULL,
 
 
-	.trampoline_phys_low		= 0x467,
-	.trampoline_phys_high		= 0x469,
-
 	.wait_for_init_deassert		= es7000_wait_for_init_deassert,
 
 	/* Nothing to do for most platforms, since cleared by the INIT cycle: */
diff --git a/arch/x86/kernel/genapic_flat_64.c b/arch/x86/kernel/genapic_flat_64.c
index e87c3bc..a7c42d4 100644
--- a/arch/x86/kernel/genapic_flat_64.c
+++ b/arch/x86/kernel/genapic_flat_64.c
@@ -220,8 +220,6 @@ struct genapic apic_flat =  {
 	.send_IPI_all			= flat_send_IPI_all,
 	.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		= NULL,
 	.inquire_remote_apic		= NULL,
 };
@@ -360,8 +358,6 @@ struct genapic apic_physflat =  {
 	.send_IPI_all			= physflat_send_IPI_all,
 	.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		= NULL,
 	.inquire_remote_apic		= NULL,
 };
diff --git a/arch/x86/kernel/genx2apic_cluster.c b/arch/x86/kernel/genx2apic_cluster.c
index 2e7497b..71534eb 100644
--- a/arch/x86/kernel/genx2apic_cluster.c
+++ b/arch/x86/kernel/genx2apic_cluster.c
@@ -225,8 +225,6 @@ struct genapic apic_x2apic_cluster = {
 	.send_IPI_all			= x2apic_send_IPI_all,
 	.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		= NULL,
 	.inquire_remote_apic		= NULL,
 };
diff --git a/arch/x86/kernel/genx2apic_phys.c b/arch/x86/kernel/genx2apic_phys.c
index f47c2ff..02b3e37 100644
--- a/arch/x86/kernel/genx2apic_phys.c
+++ b/arch/x86/kernel/genx2apic_phys.c
@@ -211,8 +211,6 @@ struct genapic apic_x2apic_phys = {
 	.send_IPI_all			= x2apic_send_IPI_all,
 	.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		= NULL,
 	.inquire_remote_apic		= NULL,
 };
diff --git a/arch/x86/kernel/genx2apic_uv_x.c b/arch/x86/kernel/genx2apic_uv_x.c
index ba1e3b1..def1b26 100644
--- a/arch/x86/kernel/genx2apic_uv_x.c
+++ b/arch/x86/kernel/genx2apic_uv_x.c
@@ -284,8 +284,6 @@ struct genapic apic_x2apic_uv_x = {
 	.send_IPI_all			= uv_send_IPI_all,
 	.send_IPI_self			= uv_send_IPI_self,
 
-	.trampoline_phys_low		= DEFAULT_TRAMPOLINE_PHYS_LOW,
-	.trampoline_phys_high		= DEFAULT_TRAMPOLINE_PHYS_HIGH,
 	.wait_for_init_deassert		= NULL,
 	.inquire_remote_apic		= NULL,
 };
diff --git a/arch/x86/kernel/numaq_32.c b/arch/x86/kernel/numaq_32.c
index d412d0e..e719520 100644
--- a/arch/x86/kernel/numaq_32.c
+++ b/arch/x86/kernel/numaq_32.c
@@ -337,9 +337,6 @@ static inline void numaq_send_IPI_all(int vector)
 
 extern void numaq_mps_oem_check(struct mpc_table *, char *, char *);
 
-#define NUMAQ_TRAMPOLINE_PHYS_LOW (0x8)
-#define NUMAQ_TRAMPOLINE_PHYS_HIGH (0xa)
-
 static inline const cpumask_t *numaq_target_cpus(void)
 {
 	return &CPU_MASK_ALL;
@@ -513,9 +510,6 @@ struct genapic apic_numaq = {
 	.send_IPI_all			= numaq_send_IPI_all,
 	.send_IPI_self			= NULL,
 
-	.trampoline_phys_low		= NUMAQ_TRAMPOLINE_PHYS_LOW,
-	.trampoline_phys_high		= NUMAQ_TRAMPOLINE_PHYS_HIGH,
-
 	/* We don't do anything here because we use NMI's to boot instead */
 	.wait_for_init_deassert		= NULL,
 
diff --git a/arch/x86/kernel/probe_32.c b/arch/x86/kernel/probe_32.c
index b01936f..826bc86 100644
--- a/arch/x86/kernel/probe_32.c
+++ b/arch/x86/kernel/probe_32.c
@@ -116,8 +116,6 @@ struct genapic apic_default = {
 	.send_IPI_all			= default_send_IPI_all,
 	.send_IPI_self			= NULL,
 
-	.trampoline_phys_low		= DEFAULT_TRAMPOLINE_PHYS_LOW,
-	.trampoline_phys_high		= DEFAULT_TRAMPOLINE_PHYS_HIGH,
 
 	.wait_for_init_deassert		= default_wait_for_init_deassert,
 
diff --git a/arch/x86/kernel/summit_32.c b/arch/x86/kernel/summit_32.c
index ec815fe..f528723 100644
--- a/arch/x86/kernel/summit_32.c
+++ b/arch/x86/kernel/summit_32.c
@@ -586,8 +586,6 @@ struct genapic apic_summit = {
 	.send_IPI_all			= summit_send_IPI_all,
 	.send_IPI_self			= NULL,
 
-	.trampoline_phys_low		= DEFAULT_TRAMPOLINE_PHYS_LOW,
-	.trampoline_phys_high		= DEFAULT_TRAMPOLINE_PHYS_HIGH,
 
 	.wait_for_init_deassert		= default_wait_for_init_deassert,
 
-- 
1.5.6.5


^ permalink raw reply	[flat|nested] 18+ messages in thread

* [PATCH] Remove enable_apic_mode genapic hook
  2009-01-30 10:17                     ` [PATCH] Remove trampoline_phys_low/high genapic fields Andi Kleen
@ 2009-01-30 10:17                       ` Andi Kleen
  2009-01-30 10:17                         ` [PATCH] Remove setup_ioapic_ids x86_quirks hook Andi Kleen
  0 siblings, 1 reply; 18+ messages in thread
From: Andi Kleen @ 2009-01-30 10:17 UTC (permalink / raw)
  To: mingo; +Cc: linux-kernel, lnxninja, Andi Kleen

From: Andi Kleen <ak@linux.intel.com>

Only used by es7000

Signed-off-by: Andi Kleen <ak@linux.intel.com>
---
 arch/x86/include/asm/genapic.h      |    1 -
 arch/x86/kernel/apic.c              |    2 --
 arch/x86/kernel/bigsmp_32.c         |    1 -
 arch/x86/kernel/es7000_32.c         |   21 ---------------------
 arch/x86/kernel/genapic_flat_64.c   |    2 --
 arch/x86/kernel/genx2apic_cluster.c |    1 -
 arch/x86/kernel/genx2apic_phys.c    |    1 -
 arch/x86/kernel/genx2apic_uv_x.c    |    1 -
 arch/x86/kernel/numaq_32.c          |    1 -
 arch/x86/kernel/probe_32.c          |    1 -
 arch/x86/kernel/summit_32.c         |    1 -
 11 files changed, 0 insertions(+), 33 deletions(-)

diff --git a/arch/x86/include/asm/genapic.h b/arch/x86/include/asm/genapic.h
index 658d66a..7ffa1e6 100644
--- a/arch/x86/include/asm/genapic.h
+++ b/arch/x86/include/asm/genapic.h
@@ -45,7 +45,6 @@ struct genapic {
 	int (*cpu_present_to_apicid)(int mps_cpu);
 	physid_mask_t (*apicid_to_cpu_present)(int phys_apicid);
 	int (*check_phys_apicid_present)(int boot_cpu_physical_apicid);
-	void (*enable_apic_mode)(void);
 	int (*phys_pkg_id)(int cpuid_apic, int index_msb);
 
 	/*
diff --git a/arch/x86/kernel/apic.c b/arch/x86/kernel/apic.c
index 968c817..0bb30b7 100644
--- a/arch/x86/kernel/apic.c
+++ b/arch/x86/kernel/apic.c
@@ -1761,8 +1761,6 @@ void __init connect_bsp_APIC(void)
 		outb(0x01, 0x23);
 	}
 #endif
-	if (apic->enable_apic_mode)
-		apic->enable_apic_mode();
 }
 
 /**
diff --git a/arch/x86/kernel/bigsmp_32.c b/arch/x86/kernel/bigsmp_32.c
index 17c6c06..bbc78ff 100644
--- a/arch/x86/kernel/bigsmp_32.c
+++ b/arch/x86/kernel/bigsmp_32.c
@@ -233,7 +233,6 @@ struct genapic apic_bigsmp = {
 	.cpu_present_to_apicid		= bigsmp_cpu_present_to_apicid,
 	.apicid_to_cpu_present		= bigsmp_apicid_to_cpu_present,
 	.check_phys_apicid_present	= bigsmp_check_phys_apicid_present,
-	.enable_apic_mode		= NULL,
 	.phys_pkg_id			= bigsmp_phys_pkg_id,
 	.mps_oem_check			= NULL,
 
diff --git a/arch/x86/kernel/es7000_32.c b/arch/x86/kernel/es7000_32.c
index bb4f525..4dd4557 100644
--- a/arch/x86/kernel/es7000_32.c
+++ b/arch/x86/kernel/es7000_32.c
@@ -351,25 +351,6 @@ es7000_mip_write(struct mip_reg *mip_reg)
 	return status;
 }
 
-void __init es7000_enable_apic_mode(void)
-{
-	struct mip_reg es7000_mip_reg;
-	int mip_status;
-
-	if (!es7000_plat)
-		return;
-
-	printk("ES7000: Enabling APIC mode.\n");
-       	memset(&es7000_mip_reg, 0, sizeof(struct mip_reg));
-       	es7000_mip_reg.off_0 = MIP_SW_APIC;
-       	es7000_mip_reg.off_38 = MIP_VALID;
-
-       	while ((mip_status = es7000_mip_write(&es7000_mip_reg)) != 0) {
-		printk("es7000_enable_apic_mode: command failed, status = %x\n",
-			mip_status);
-	}
-}
-
 /*
  * APIC driver for the Unisys ES7000 chipset.
  */
@@ -393,7 +374,6 @@ void __init es7000_enable_apic_mode(void)
 
 #define APIC_DFR_VALUE			(APIC_DFR_FLAT)
 
-extern void es7000_enable_apic_mode(void);
 extern int apic_version [MAX_APICS];
 extern u8 cpu_2_logical_apicid[];
 extern unsigned int boot_cpu_physical_apicid;
@@ -766,7 +746,6 @@ struct genapic apic_es7000 = {
 	.cpu_present_to_apicid		= es7000_cpu_present_to_apicid,
 	.apicid_to_cpu_present		= es7000_apicid_to_cpu_present,
 	.check_phys_apicid_present	= es7000_check_phys_apicid_present,
-	.enable_apic_mode		= es7000_enable_apic_mode,
 	.phys_pkg_id			= es7000_phys_pkg_id,
 	.mps_oem_check			= es7000_mps_oem_check,
 
diff --git a/arch/x86/kernel/genapic_flat_64.c b/arch/x86/kernel/genapic_flat_64.c
index a7c42d4..b88003a 100644
--- a/arch/x86/kernel/genapic_flat_64.c
+++ b/arch/x86/kernel/genapic_flat_64.c
@@ -203,7 +203,6 @@ struct genapic apic_flat =  {
 	.cpu_present_to_apicid		= default_cpu_present_to_apicid,
 	.apicid_to_cpu_present		= NULL,
 	.check_phys_apicid_present	= default_check_phys_apicid_present,
-	.enable_apic_mode		= NULL,
 	.phys_pkg_id			= flat_phys_pkg_id,
 	.mps_oem_check			= NULL,
 
@@ -341,7 +340,6 @@ struct genapic apic_physflat =  {
 	.cpu_present_to_apicid		= default_cpu_present_to_apicid,
 	.apicid_to_cpu_present		= NULL,
 	.check_phys_apicid_present	= default_check_phys_apicid_present,
-	.enable_apic_mode		= NULL,
 	.phys_pkg_id			= flat_phys_pkg_id,
 	.mps_oem_check			= NULL,
 
diff --git a/arch/x86/kernel/genx2apic_cluster.c b/arch/x86/kernel/genx2apic_cluster.c
index 71534eb..c0bbe5a 100644
--- a/arch/x86/kernel/genx2apic_cluster.c
+++ b/arch/x86/kernel/genx2apic_cluster.c
@@ -208,7 +208,6 @@ struct genapic apic_x2apic_cluster = {
 	.cpu_present_to_apicid		= default_cpu_present_to_apicid,
 	.apicid_to_cpu_present		= NULL,
 	.check_phys_apicid_present	= default_check_phys_apicid_present,
-	.enable_apic_mode		= NULL,
 	.phys_pkg_id			= x2apic_cluster_phys_pkg_id,
 	.mps_oem_check			= NULL,
 
diff --git a/arch/x86/kernel/genx2apic_phys.c b/arch/x86/kernel/genx2apic_phys.c
index 02b3e37..b039497 100644
--- a/arch/x86/kernel/genx2apic_phys.c
+++ b/arch/x86/kernel/genx2apic_phys.c
@@ -194,7 +194,6 @@ struct genapic apic_x2apic_phys = {
 	.cpu_present_to_apicid		= default_cpu_present_to_apicid,
 	.apicid_to_cpu_present		= NULL,
 	.check_phys_apicid_present	= default_check_phys_apicid_present,
-	.enable_apic_mode		= NULL,
 	.phys_pkg_id			= x2apic_phys_pkg_id,
 	.mps_oem_check			= NULL,
 
diff --git a/arch/x86/kernel/genx2apic_uv_x.c b/arch/x86/kernel/genx2apic_uv_x.c
index def1b26..e1c72aa 100644
--- a/arch/x86/kernel/genx2apic_uv_x.c
+++ b/arch/x86/kernel/genx2apic_uv_x.c
@@ -267,7 +267,6 @@ struct genapic apic_x2apic_uv_x = {
 	.cpu_present_to_apicid		= default_cpu_present_to_apicid,
 	.apicid_to_cpu_present		= NULL,
 	.check_phys_apicid_present	= default_check_phys_apicid_present,
-	.enable_apic_mode		= NULL,
 	.phys_pkg_id			= uv_phys_pkg_id,
 	.mps_oem_check			= NULL,
 
diff --git a/arch/x86/kernel/numaq_32.c b/arch/x86/kernel/numaq_32.c
index e719520..6ddacbc 100644
--- a/arch/x86/kernel/numaq_32.c
+++ b/arch/x86/kernel/numaq_32.c
@@ -493,7 +493,6 @@ struct genapic apic_numaq = {
 	.cpu_present_to_apicid		= numaq_cpu_present_to_apicid,
 	.apicid_to_cpu_present		= numaq_apicid_to_cpu_present,
 	.check_phys_apicid_present	= numaq_check_phys_apicid_present,
-	.enable_apic_mode		= NULL,
 	.phys_pkg_id			= numaq_phys_pkg_id,
 	.mps_oem_check			= __numaq_mps_oem_check,
 
diff --git a/arch/x86/kernel/probe_32.c b/arch/x86/kernel/probe_32.c
index 826bc86..de86aa0 100644
--- a/arch/x86/kernel/probe_32.c
+++ b/arch/x86/kernel/probe_32.c
@@ -99,7 +99,6 @@ struct genapic apic_default = {
 	.cpu_present_to_apicid		= default_cpu_present_to_apicid,
 	.apicid_to_cpu_present		= default_apicid_to_cpu_present,
 	.check_phys_apicid_present	= default_check_phys_apicid_present,
-	.enable_apic_mode		= NULL,
 	.phys_pkg_id			= default_phys_pkg_id,
 	.mps_oem_check			= NULL,
 
diff --git a/arch/x86/kernel/summit_32.c b/arch/x86/kernel/summit_32.c
index f528723..950c5cb 100644
--- a/arch/x86/kernel/summit_32.c
+++ b/arch/x86/kernel/summit_32.c
@@ -569,7 +569,6 @@ struct genapic apic_summit = {
 	.cpu_present_to_apicid		= summit_cpu_present_to_apicid,
 	.apicid_to_cpu_present		= summit_apicid_to_cpu_present,
 	.check_phys_apicid_present	= summit_check_phys_apicid_present,
-	.enable_apic_mode		= NULL,
 	.phys_pkg_id			= summit_phys_pkg_id,
 	.mps_oem_check			= summit_mps_oem_check,
 
-- 
1.5.6.5


^ permalink raw reply	[flat|nested] 18+ messages in thread

* [PATCH] Remove setup_ioapic_ids x86_quirks hook
  2009-01-30 10:17                       ` [PATCH] Remove enable_apic_mode genapic hook Andi Kleen
@ 2009-01-30 10:17                         ` Andi Kleen
  0 siblings, 0 replies; 18+ messages in thread
From: Andi Kleen @ 2009-01-30 10:17 UTC (permalink / raw)
  To: mingo; +Cc: linux-kernel, lnxninja, Andi Kleen

From: Andi Kleen <ak@linux.intel.com>

Was only used by NUMAQ

Signed-off-by: Andi Kleen <ak@linux.intel.com>
---
 arch/x86/include/asm/setup.h |    1 -
 arch/x86/kernel/io_apic.c    |    3 ---
 arch/x86/kernel/numaq_32.c   |    7 -------
 3 files changed, 0 insertions(+), 11 deletions(-)

diff --git a/arch/x86/include/asm/setup.h b/arch/x86/include/asm/setup.h
index e0b651e..0d3fd5d 100644
--- a/arch/x86/include/asm/setup.h
+++ b/arch/x86/include/asm/setup.h
@@ -42,7 +42,6 @@ struct x86_quirks {
 	void (*mpc_oem_pci_bus)(struct mpc_bus *m);
 	void (*smp_read_mpc_oem)(struct mpc_oemtable *oemtable,
 				unsigned short oemsize);
-	int (*setup_ioapic_ids)(void);
 	int (*update_genapic)(void);
 };
 
diff --git a/arch/x86/kernel/io_apic.c b/arch/x86/kernel/io_apic.c
index 9a3e66f..7743890 100644
--- a/arch/x86/kernel/io_apic.c
+++ b/arch/x86/kernel/io_apic.c
@@ -2074,9 +2074,6 @@ static void __init setup_ioapic_ids_from_mpc(void)
 	unsigned char old_id;
 	unsigned long flags;
 
-	if (x86_quirks->setup_ioapic_ids && x86_quirks->setup_ioapic_ids())
-		return;
-
 	/*
 	 * Don't check I/O APIC IDs for xAPIC systems.  They have
 	 * no meaning without the serial APIC bus.
diff --git a/arch/x86/kernel/numaq_32.c b/arch/x86/kernel/numaq_32.c
index 6ddacbc..67d994d 100644
--- a/arch/x86/kernel/numaq_32.c
+++ b/arch/x86/kernel/numaq_32.c
@@ -228,12 +228,6 @@ static void __init smp_read_mpc_oem(struct mpc_oemtable *oemtable,
 	}
 }
 
-static int __init numaq_setup_ioapic_ids(void)
-{
-	/* so can skip it */
-	return 1;
-}
-
 static int __init numaq_update_genapic(void)
 {
 	return 0;
@@ -253,7 +247,6 @@ static struct x86_quirks numaq_x86_quirks __initdata = {
 	.mpc_oem_bus_info	= mpc_oem_bus_info,
 	.mpc_oem_pci_bus	= mpc_oem_pci_bus,
 	.smp_read_mpc_oem	= smp_read_mpc_oem,
-	.setup_ioapic_ids	= numaq_setup_ioapic_ids,
 	.update_genapic		= numaq_update_genapic,
 };
 
-- 
1.5.6.5


^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: Genapic cleanup & NUMAQ/es7000 removal
  2009-01-30 10:17 Genapic cleanup & NUMAQ/es7000 removal Andi Kleen
  2009-01-30 10:17 ` [PATCH] Move wakeup_secondary_via_nmi into numaq_32.c Andi Kleen
@ 2009-02-05 16:15 ` Tim Pepper
  2009-02-05 17:29   ` Ingo Molnar
  1 sibling, 1 reply; 18+ messages in thread
From: Tim Pepper @ 2009-02-05 16:15 UTC (permalink / raw)
  To: Andi Kleen; +Cc: mingo, linux-kernel

On Fri, Jan 30, 2009 at 2:17 AM, Andi Kleen <andi@firstfloor.org> wrote:
> Just to demonstrate the clean up possibilities by removing es7000
> and numaq here's a sample patch series. It doesn't actually remove
> the es7000/numaq code, but just marks them broken and then
> removes all the hooks only used by them. I'm not actually sure
> I caught all the now unused hooks, there are probably now more.
> Also I think there's still some other NUMAQ only code in smpboot.c
> that could be exercised.
>
> This removes 6 hooks and 2 fields out of struct genapic (out of 26
> hooks, a reduction of ~23%!)
>
> The first three patches are independent cleanups that should
> be applied anyways.
>
> This gives a nice generic cleanup:


These look good to me for inclusion along with the big "x86: unify
genapic code, unify subarchitectures, remove old subarchitecture code"
series, or as Andi's indicated the initial cleanups themselves if the
other big set doesn't make the 2.6.30 for some reason.  For this
series:

Acked-by: Tim Pepper <lnxninja@linux.vnet.ibm.com>

^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: Genapic cleanup & NUMAQ/es7000 removal
  2009-02-05 16:15 ` Genapic cleanup & NUMAQ/es7000 removal Tim Pepper
@ 2009-02-05 17:29   ` Ingo Molnar
  2009-02-05 20:27     ` Andi Kleen
  0 siblings, 1 reply; 18+ messages in thread
From: Ingo Molnar @ 2009-02-05 17:29 UTC (permalink / raw)
  To: Tim Pepper; +Cc: Andi Kleen, linux-kernel


* Tim Pepper <tpepper@gmail.com> wrote:

> On Fri, Jan 30, 2009 at 2:17 AM, Andi Kleen <andi@firstfloor.org> wrote:
> > Just to demonstrate the clean up possibilities by removing es7000
> > and numaq here's a sample patch series. It doesn't actually remove
> > the es7000/numaq code, but just marks them broken and then
> > removes all the hooks only used by them. I'm not actually sure
> > I caught all the now unused hooks, there are probably now more.
> > Also I think there's still some other NUMAQ only code in smpboot.c
> > that could be exercised.
> >
> > This removes 6 hooks and 2 fields out of struct genapic (out of 26
> > hooks, a reduction of ~23%!)
> >
> > The first three patches are independent cleanups that should
> > be applied anyways.
> >
> > This gives a nice generic cleanup:
> 
> These look good to me for inclusion along with the big "x86: unify genapic 
> code, unify subarchitectures, remove old subarchitecture code" series, or 
> as Andi's indicated the initial cleanups themselves if the other big set 
> doesn't make the 2.6.30 for some reason.  For this series:
> 
> Acked-by: Tim Pepper <lnxninja@linux.vnet.ibm.com>

I'm not going to apply that series for the reasons i outlined in the NUMAQ 
discussion already. The runtime callbacks arent really a maintenance 
problem: most of them are in boot code so it's not a runtime overhead issue.

The build and code readability complications that came from the broken 
subarch design were the real maintenance problem - and i fixed that. If i 
wanted to simply drop these subarchitectures i could have done that via 5 
straightforward patches.

The unified x86 tree and the whole x86 platform is all about being 
compatible. We do drop hardware features occasionally but only when they are 
undeniably not reachable via any Linux user anymore and have been broken and 
unfixed for a long time. We are not there yet.

We could de-quirk the whole x86 code but then there would not be much code 
left :-)

	Ingo

^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: Genapic cleanup & NUMAQ/es7000 removal
  2009-02-05 17:29   ` Ingo Molnar
@ 2009-02-05 20:27     ` Andi Kleen
  2009-02-05 21:25       ` Ingo Molnar
  0 siblings, 1 reply; 18+ messages in thread
From: Andi Kleen @ 2009-02-05 20:27 UTC (permalink / raw)
  To: Ingo Molnar; +Cc: Tim Pepper, Andi Kleen, linux-kernel

> I'm not going to apply that series for the reasons i outlined in the NUMAQ 
> discussion already. The runtime callbacks arent really a maintenance 
> problem: most of them are in boot code so it's not a runtime overhead issue.

Ok.  It's basically dead code now, dropping it would just make
the kernels a little smaller and also the code somewhat easier
to read.

If you keep them I would be interested in hearing about your testing plan 
for es7000 and NUMAQ AFAIK there is noone currently running them which
makes that likely challenging.

Also the first two patches in the series were independent cleanups
not directly related and should be applied anyways independent
whether unused code should be dropped or not.

commit fa9b9131b555b1d72d6bbfa8c1d6cb22659cc011

    Remove empty setup_portio_remap inlines in bigsmp/summit

    These are all unused inlines

commit 47e05d047c0e9c5c75003ec7ce97de753b264ed6

    Move wakeup_secondary_via_nmi into numaq_32.c

    It's only used there.

-Andi

^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: Genapic cleanup & NUMAQ/es7000 removal
  2009-02-05 20:27     ` Andi Kleen
@ 2009-02-05 21:25       ` Ingo Molnar
  0 siblings, 0 replies; 18+ messages in thread
From: Ingo Molnar @ 2009-02-05 21:25 UTC (permalink / raw)
  To: Andi Kleen, H. Peter Anvin, Thomas Gleixner; +Cc: Tim Pepper, linux-kernel


* Andi Kleen <andi@firstfloor.org> wrote:

> > I'm not going to apply that series for the reasons i outlined in the NUMAQ 
> > discussion already. The runtime callbacks arent really a maintenance 
> > problem: most of them are in boot code so it's not a runtime overhead issue.
> 
> Ok.  It's basically dead code now, dropping it would just make
> the kernels a little smaller and also the code somewhat easier
> to read.
> 
> If you keep them I would be interested in hearing about your testing plan 
> for es7000 and NUMAQ AFAIK there is noone currently running them which
> makes that likely challenging.

For example we havent had reports about boot hangs with certain rare types 
of Cyrix CPU based boards (obsolete, desupported, manufacturer gone) for 
multiple stable kernel releases - still eventually someone came across the 
problem and a fix was done. The testing exposure of the upstream kernel is 
still very narrow in practice.

Anyway, i stated our maintenance position about x86 compatibility clearly 
and unless there's some good technical reason for the removal the code stays 
in the kernel.

	Ingo

^ permalink raw reply	[flat|nested] 18+ messages in thread

end of thread, other threads:[~2009-02-05 21:25 UTC | newest]

Thread overview: 18+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-01-30 10:17 Genapic cleanup & NUMAQ/es7000 removal Andi Kleen
2009-01-30 10:17 ` [PATCH] Move wakeup_secondary_via_nmi into numaq_32.c Andi Kleen
2009-01-30 10:17   ` [PATCH] Remove empty setup_portio_remap inlines in bigsmp/summit Andi Kleen
2009-01-30 10:17     ` [PATCH] Mark NUMAQ broken Andi Kleen
2009-01-30 10:17       ` [PATCH] Mark ES7000 subarch broken Andi Kleen
2009-01-30 10:17         ` [PATCH] Remove store_NMI_vector in genapic Andi Kleen
2009-01-30 10:17           ` [PATCH] Remove smp_callin_clear_local_apic hook Andi Kleen
2009-01-30 10:17             ` [PATCH] Remove multi_timer_check Andi Kleen
2009-01-30 10:17               ` [PATCH] Remove setup_portio_remap Andi Kleen
2009-01-30 10:17                 ` [PATCH] Remove wakeup_cpu genapic vector Andi Kleen
2009-01-30 10:17                   ` [PATCH] Remove now unused default_update_genapic Andi Kleen
2009-01-30 10:17                     ` [PATCH] Remove trampoline_phys_low/high genapic fields Andi Kleen
2009-01-30 10:17                       ` [PATCH] Remove enable_apic_mode genapic hook Andi Kleen
2009-01-30 10:17                         ` [PATCH] Remove setup_ioapic_ids x86_quirks hook Andi Kleen
2009-02-05 16:15 ` Genapic cleanup & NUMAQ/es7000 removal Tim Pepper
2009-02-05 17:29   ` Ingo Molnar
2009-02-05 20:27     ` Andi Kleen
2009-02-05 21:25       ` Ingo Molnar

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®