Commit 25dc0049 authored by Ingo Molnar's avatar Ingo Molnar

x86, smp: refactor ->inquire_remote_apic() methods

Nothing exciting - a few subarches dont want APIC remote reads to
be performed - the others are content with the default method.

 - extend the generic code to handle NULL methods

 - clear out dummy methods and replace them with NULL

 - clean up: remove wrapper macros, etc.
Signed-off-by: default avatarIngo Molnar <mingo@elte.hu>
parent 3d5f597e
...@@ -13,12 +13,4 @@ static inline void es7000_wait_for_init_deassert(atomic_t *deassert) ...@@ -13,12 +13,4 @@ static inline void es7000_wait_for_init_deassert(atomic_t *deassert)
return; return;
} }
extern void __inquire_remote_apic(int apicid);
static inline void inquire_remote_apic(int apicid)
{
if (apic_verbosity >= APIC_DEBUG)
__inquire_remote_apic(apicid);
}
#endif /* __ASM_MACH_WAKECPU_H */ #endif /* __ASM_MACH_WAKECPU_H */
...@@ -16,7 +16,7 @@ static inline void __inquire_remote_apic(int apicid) ...@@ -16,7 +16,7 @@ static inline void __inquire_remote_apic(int apicid)
} }
#endif /* CONFIG_SMP */ #endif /* CONFIG_SMP */
static inline void inquire_remote_apic(int apicid) static inline void default_inquire_remote_apic(int apicid)
{ {
if (apic_verbosity >= APIC_DEBUG) if (apic_verbosity >= APIC_DEBUG)
__inquire_remote_apic(apicid); __inquire_remote_apic(apicid);
......
#ifndef _ASM_X86_MACH_GENERIC_MACH_WAKECPU_H #ifndef _ASM_X86_MACH_GENERIC_MACH_WAKECPU_H
#define _ASM_X86_MACH_GENERIC_MACH_WAKECPU_H #define _ASM_X86_MACH_GENERIC_MACH_WAKECPU_H
#define inquire_remote_apic (apic->inquire_remote_apic)
#endif /* _ASM_X86_MACH_GENERIC_MACH_APIC_H */ #endif /* _ASM_X86_MACH_GENERIC_MACH_APIC_H */
...@@ -25,8 +25,4 @@ numaq_store_NMI_vector(unsigned short *high, unsigned short *low) ...@@ -25,8 +25,4 @@ numaq_store_NMI_vector(unsigned short *high, unsigned short *low)
*((volatile unsigned short *)phys_to_virt(NUMAQ_TRAMPOLINE_PHYS_LOW)); *((volatile unsigned short *)phys_to_virt(NUMAQ_TRAMPOLINE_PHYS_LOW));
} }
static inline void inquire_remote_apic(int apicid)
{
}
#endif /* __ASM_NUMAQ_WAKECPU_H */ #endif /* __ASM_NUMAQ_WAKECPU_H */
...@@ -876,8 +876,8 @@ do_rest: ...@@ -876,8 +876,8 @@ do_rest:
else else
/* trampoline code not run */ /* trampoline code not run */
printk(KERN_ERR "Not responding.\n"); printk(KERN_ERR "Not responding.\n");
if (get_uv_system_type() != UV_NON_UNIQUE_APIC) if (apic->inquire_remote_apic)
inquire_remote_apic(apicid); apic->inquire_remote_apic(apicid);
} }
} }
......
...@@ -111,5 +111,5 @@ struct genapic apic_bigsmp = { ...@@ -111,5 +111,5 @@ struct genapic apic_bigsmp = {
.smp_callin_clear_local_apic = NULL, .smp_callin_clear_local_apic = NULL,
.store_NMI_vector = NULL, .store_NMI_vector = NULL,
.inquire_remote_apic = inquire_remote_apic, .inquire_remote_apic = default_inquire_remote_apic,
}; };
...@@ -92,5 +92,5 @@ struct genapic apic_default = { ...@@ -92,5 +92,5 @@ struct genapic apic_default = {
.smp_callin_clear_local_apic = NULL, .smp_callin_clear_local_apic = NULL,
.store_NMI_vector = NULL, .store_NMI_vector = NULL,
.inquire_remote_apic = inquire_remote_apic, .inquire_remote_apic = default_inquire_remote_apic,
}; };
...@@ -148,5 +148,5 @@ struct genapic apic_es7000 = { ...@@ -148,5 +148,5 @@ struct genapic apic_es7000 = {
/* Nothing to do for most platforms, since cleared by the INIT cycle: */ /* Nothing to do for most platforms, since cleared by the INIT cycle: */
.smp_callin_clear_local_apic = NULL, .smp_callin_clear_local_apic = NULL,
.store_NMI_vector = NULL, .store_NMI_vector = NULL,
.inquire_remote_apic = inquire_remote_apic, .inquire_remote_apic = default_inquire_remote_apic,
}; };
...@@ -112,5 +112,5 @@ struct genapic apic_numaq = { ...@@ -112,5 +112,5 @@ struct genapic apic_numaq = {
.smp_callin_clear_local_apic = numaq_smp_callin_clear_local_apic, .smp_callin_clear_local_apic = numaq_smp_callin_clear_local_apic,
.store_NMI_vector = numaq_store_NMI_vector, .store_NMI_vector = numaq_store_NMI_vector,
.inquire_remote_apic = inquire_remote_apic, .inquire_remote_apic = NULL,
}; };
...@@ -91,5 +91,5 @@ struct genapic apic_summit = { ...@@ -91,5 +91,5 @@ struct genapic apic_summit = {
.smp_callin_clear_local_apic = NULL, .smp_callin_clear_local_apic = NULL,
.store_NMI_vector = NULL, .store_NMI_vector = NULL,
.inquire_remote_apic = inquire_remote_apic, .inquire_remote_apic = default_inquire_remote_apic,
}; };
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment