Genapic cleanup & NUMAQ/es7000 removal
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
PATCH 1/1 Move wakeup_secondary_via_nmi into numaq_32.c
From: Andi Kleen <[email protected]>
It's only used there.
--- 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(-)
arch/x86/include/asm/setup.h +0 -1
@@ -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?
arch/x86/kernel/numaq_32.c +39 -0
@@ -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;
arch/x86/kernel/smpboot.c +0 -39
@@ -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) {
Signature · 1 line
1.5.6.5
PATCH 1/1 Remove empty setup_portio_remap inlines in bigsmp/summit
From: Andi Kleen <[email protected]>
These are all unused inlines
--- 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(-)
arch/x86/include/asm/bigsmp/apic.h +0 -4
@@ -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 ;
arch/x86/kernel/bigsmp_32.c +0 -4
@@ -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 ;
arch/x86/kernel/summit_32.c +0 -4
@@ -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 ;
Signature · 1 line
1.5.6.5
PATCH 1/1 Mark NUMAQ broken
From: Andi Kleen <[email protected]>
In preparation from removal
--- arch/x86/Kconfig | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)
arch/x86/Kconfig +1 -1
@@ -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
Signature · 1 line
1.5.6.5
PATCH 1/1 Mark ES7000 subarch broken
From: Andi Kleen <[email protected]>
In preparation for removal
--- arch/x86/Kconfig | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)
arch/x86/Kconfig +1 -1
@@ -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.
Signature · 1 line
1.5.6.5
PATCH 1/1 Remove store_NMI_vector in genapic
From: Andi Kleen <[email protected]>
Only used by NUMAQ
--- 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(-)
arch/x86/include/asm/genapic.h +0 -1
@@ -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); };
arch/x86/kernel/bigsmp_32.c +0 -1
@@ -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, };
arch/x86/kernel/es7000_32.c +0 -1
@@ -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, };
arch/x86/kernel/genapic_flat_64.c +0 -2
@@ -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, };
arch/x86/kernel/genx2apic_cluster.c +0 -1
@@ -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, };
arch/x86/kernel/genx2apic_phys.c +0 -1
@@ -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, };
arch/x86/kernel/genx2apic_uv_x.c +0 -1
@@ -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, };
arch/x86/kernel/numaq_32.c +0 -11
@@ -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, };
arch/x86/kernel/probe_32.c +0 -1
@@ -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, };
arch/x86/kernel/smpboot.c +0 -4
@@ -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.
arch/x86/kernel/summit_32.c +0 -1
@@ -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, };
Signature · 1 line
1.5.6.5
PATCH 1/1 Remove smp_callin_clear_local_apic hook
From: Andi Kleen <[email protected]>
Only used by NUMAQ
--- 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(-)
arch/x86/include/asm/genapic.h +0 -1
@@ -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); };
arch/x86/kernel/bigsmp_32.c +0 -1
@@ -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, };
arch/x86/kernel/es7000_32.c +0 -1
@@ -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, };
arch/x86/kernel/genapic_flat_64.c +0 -2
@@ -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, };
arch/x86/kernel/genx2apic_cluster.c +0 -1
@@ -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, };
arch/x86/kernel/genx2apic_phys.c +0 -1
@@ -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, };
arch/x86/kernel/genx2apic_uv_x.c +0 -1
@@ -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, };
arch/x86/kernel/numaq_32.c +0 -10
@@ -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, };
arch/x86/kernel/probe_32.c +0 -1
@@ -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, };
arch/x86/kernel/smpboot.c +0 -2
@@ -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 ();
arch/x86/kernel/summit_32.c +0 -1
@@ -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, };
Signature · 1 line
1.5.6.5
PATCH 1/1 Remove multi_timer_check
From: Andi Kleen <[email protected]>
Only used by NUMAQ
--- 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(-)
arch/x86/include/asm/genapic.h +0 -1
@@ -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);
arch/x86/kernel/bigsmp_32.c +0 -1
@@ -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,
arch/x86/kernel/es7000_32.c +0 -1
@@ -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,
arch/x86/kernel/genapic_flat_64.c +0 -2
@@ -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,
arch/x86/kernel/genx2apic_cluster.c +0 -1
@@ -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,
arch/x86/kernel/genx2apic_phys.c +0 -1
@@ -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,
arch/x86/kernel/genx2apic_uv_x.c +0 -1
@@ -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,
arch/x86/kernel/io_apic.c +0 -8
@@ -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);
arch/x86/kernel/numaq_32.c +0 -10
@@ -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,
arch/x86/kernel/probe_32.c +0 -1
@@ -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,
arch/x86/kernel/summit_32.c +0 -1
@@ -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,
Signature · 1 line
1.5.6.5
PATCH 1/1 Remove setup_portio_remap
From: Andi Kleen <[email protected]>
Only used by NUMAQ
--- 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(-)
arch/x86/include/asm/genapic.h +0 -1
@@ -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);
arch/x86/kernel/bigsmp_32.c +0 -1
@@ -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,
arch/x86/kernel/es7000_32.c +0 -1
@@ -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,
arch/x86/kernel/genapic_flat_64.c +0 -2
@@ -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,
arch/x86/kernel/genx2apic_cluster.c +0 -1
@@ -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,
arch/x86/kernel/genx2apic_phys.c +0 -1
@@ -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,
arch/x86/kernel/genx2apic_uv_x.c +0 -1
@@ -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,
arch/x86/kernel/numaq_32.c +0 -14
@@ -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,
arch/x86/kernel/probe_32.c +0 -1
@@ -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,
arch/x86/kernel/smpboot.c +0 -3
@@ -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.
arch/x86/kernel/summit_32.c +0 -1
@@ -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,
Signature · 1 line
1.5.6.5
PATCH 1/1 Remove wakeup_cpu genapic vector
From: Andi Kleen <[email protected]>
... and instead call wakeup_secondary_cpu_via_init directly in smpboot.c
Was only used by es7000 and numaq
--- 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(-)
arch/x86/include/asm/genapic.h +0 -3
@@ -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;
arch/x86/include/asm/setup.h +0 -1
@@ -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? */
arch/x86/kernel/bigsmp_32.c +0 -1
@@ -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,
arch/x86/kernel/es7000_32.c +0 -4
@@ -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,
arch/x86/kernel/genapic_flat_64.c +0 -2
@@ -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,
arch/x86/kernel/genx2apic_cluster.c +0 -1
@@ -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,
arch/x86/kernel/genx2apic_phys.c +0 -1
@@ -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,
arch/x86/kernel/genx2apic_uv_x.c +0 -1
@@ -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,
arch/x86/kernel/numaq_32.c +0 -42
56 lines not on this page · raw message
arch/x86/kernel/probe_32.c +0 -1
@@ -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,
arch/x86/kernel/setup.c +0 -5
@@ -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 ; }
arch/x86/kernel/smpboot.c +3 -3
@@ -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) {/*
arch/x86/kernel/summit_32.c +0 -1
@@ -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,
Signature · 1 line
1.5.6.5
PATCH 1/1 Remove now unused default_update_genapic
From: Andi Kleen <[email protected]>
--- arch/x86/kernel/setup.c | 6 ------ 1 files changed, 0 insertions(+), 6 deletions(-)
arch/x86/kernel/setup.c +0 -6
@@ -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;
Signature · 1 line
1.5.6.5
PATCH 1/1 Remove trampoline_phys_low/high genapic fields
From: Andi Kleen <[email protected]>
were only used by NUMAQ and es7000
--- 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(-)
arch/x86/include/asm/genapic.h +3 -6
@@ -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 );
arch/x86/include/asm/smpboot_hooks.h +5 -5
@@ -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 )
arch/x86/kernel/bigsmp_32.c +0 -2
@@ -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,
arch/x86/kernel/es7000_32.c +0 -3
@@ -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: */
arch/x86/kernel/genapic_flat_64.c +0 -4
@@ -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, };
arch/x86/kernel/genx2apic_cluster.c +0 -2
@@ -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, };
arch/x86/kernel/genx2apic_phys.c +0 -2
@@ -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, };
arch/x86/kernel/genx2apic_uv_x.c +0 -2
@@ -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, };
arch/x86/kernel/numaq_32.c +0 -6
@@ -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,
arch/x86/kernel/probe_32.c +0 -2
@@ -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,
arch/x86/kernel/summit_32.c +0 -2
@@ -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,
Signature · 1 line
1.5.6.5
PATCH 1/1 Remove enable_apic_mode genapic hook
From: Andi Kleen <[email protected]>
Only used by es7000
--- 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(-)
arch/x86/include/asm/genapic.h +0 -1
@@ -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);/*
arch/x86/kernel/apic.c +0 -2
@@ -1761,8 +1761,6 @@ void __init connect_bsp_APIC(void) outb(0x01, 0x23); }#endif -if (apic->enable_apic_mode) - apic->enable_apic_mode (); }/**
arch/x86/kernel/bigsmp_32.c +0 -1
@@ -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,
arch/x86/kernel/es7000_32.c +0 -21
@@ -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,
arch/x86/kernel/genapic_flat_64.c +0 -2
@@ -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,
arch/x86/kernel/genx2apic_cluster.c +0 -1
@@ -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,
arch/x86/kernel/genx2apic_phys.c +0 -1
@@ -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,
arch/x86/kernel/genx2apic_uv_x.c +0 -1
@@ -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,
arch/x86/kernel/numaq_32.c +0 -1
@@ -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,
arch/x86/kernel/probe_32.c +0 -1
@@ -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,
arch/x86/kernel/summit_32.c +0 -1
@@ -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,
Signature · 1 line
1.5.6.5
PATCH 1/1 Remove setup_ioapic_ids x86_quirks hook
From: Andi Kleen <[email protected]>
Was only used by NUMAQ
--- 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(-)
arch/x86/include/asm/setup.h +0 -1
@@ -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 ); };
arch/x86/kernel/io_apic.c +0 -3
@@ -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.
arch/x86/kernel/numaq_32.c +0 -7
@@ -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, };
Signature · 1 line
1.5.6.5
Tim Pepper
Acked-byQuoted 8 lines · Andi Kleen
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.cthat could be exercised.
Quoted 7 lines
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:
Quoted 15 lines · Tim Pepper
Quoted 14 lines · Andi Kleen
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.cthat 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.
Quoted 8 lines
Quoted 1 line
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 <[email protected]>
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
Quoted 3 lines
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
Quoted 11 lines · Andi Kleen
Quoted 3 lines
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