diff options
author | Ingo Molnar <mingo@elte.hu> | 2009-01-28 06:43:18 -0500 |
---|---|---|
committer | Ingo Molnar <mingo@elte.hu> | 2009-01-28 17:20:26 -0500 |
commit | 4904033302c745342e3b3a611881cdee57fbe06a (patch) | |
tree | f7c6bcbf21989edbb02b263226865a5e34f13a02 /arch | |
parent | a27a621001f4c3e57caf47feff4b014577fd01c6 (diff) |
x86: refactor ->enable_apic_mode() subarch methods
Only ES7000 has a real ->enable_apic_mode() method, the other
subarchitectures define it but keep it empty.
So mark the vector as NULL, extend the generic code to handle
NULL -setup_portio_remap() entries and remove all the empty
handlers.
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'arch')
-rw-r--r-- | arch/x86/include/asm/bigsmp/apic.h | 4 | ||||
-rw-r--r-- | arch/x86/include/asm/mach-default/mach_apic.h | 3 | ||||
-rw-r--r-- | arch/x86/include/asm/mach-generic/mach_apic.h | 1 | ||||
-rw-r--r-- | arch/x86/include/asm/numaq/apic.h | 4 | ||||
-rw-r--r-- | arch/x86/include/asm/summit/apic.h | 4 | ||||
-rw-r--r-- | arch/x86/kernel/apic.c | 3 | ||||
-rw-r--r-- | arch/x86/mach-generic/bigsmp.c | 2 | ||||
-rw-r--r-- | arch/x86/mach-generic/default.c | 2 | ||||
-rw-r--r-- | arch/x86/mach-generic/es7000.c | 6 | ||||
-rw-r--r-- | arch/x86/mach-generic/numaq.c | 2 | ||||
-rw-r--r-- | arch/x86/mach-generic/summit.c | 2 |
11 files changed, 9 insertions, 24 deletions
diff --git a/arch/x86/include/asm/bigsmp/apic.h b/arch/x86/include/asm/bigsmp/apic.h index 5ba4118fcdf2..f49d440862f1 100644 --- a/arch/x86/include/asm/bigsmp/apic.h +++ b/arch/x86/include/asm/bigsmp/apic.h | |||
@@ -104,10 +104,6 @@ static inline int bigsmp_check_phys_apicid_present(int boot_cpu_physical_apicid) | |||
104 | return 1; | 104 | return 1; |
105 | } | 105 | } |
106 | 106 | ||
107 | static inline void enable_apic_mode(void) | ||
108 | { | ||
109 | } | ||
110 | |||
111 | /* As we are using single CPU as destination, pick only one CPU here */ | 107 | /* As we are using single CPU as destination, pick only one CPU here */ |
112 | static inline unsigned int cpu_mask_to_apicid(const cpumask_t *cpumask) | 108 | static inline unsigned int cpu_mask_to_apicid(const cpumask_t *cpumask) |
113 | { | 109 | { |
diff --git a/arch/x86/include/asm/mach-default/mach_apic.h b/arch/x86/include/asm/mach-default/mach_apic.h index 0a824d3a2238..3647c92d45e5 100644 --- a/arch/x86/include/asm/mach-default/mach_apic.h +++ b/arch/x86/include/asm/mach-default/mach_apic.h | |||
@@ -145,8 +145,5 @@ static inline physid_mask_t default_apicid_to_cpu_present(int phys_apicid) | |||
145 | return physid_mask_of_physid(phys_apicid); | 145 | return physid_mask_of_physid(phys_apicid); |
146 | } | 146 | } |
147 | 147 | ||
148 | static inline void enable_apic_mode(void) | ||
149 | { | ||
150 | } | ||
151 | #endif /* CONFIG_X86_LOCAL_APIC */ | 148 | #endif /* CONFIG_X86_LOCAL_APIC */ |
152 | #endif /* _ASM_X86_MACH_DEFAULT_MACH_APIC_H */ | 149 | #endif /* _ASM_X86_MACH_DEFAULT_MACH_APIC_H */ |
diff --git a/arch/x86/include/asm/mach-generic/mach_apic.h b/arch/x86/include/asm/mach-generic/mach_apic.h index efd762d951ac..6fed521585c4 100644 --- a/arch/x86/include/asm/mach-generic/mach_apic.h +++ b/arch/x86/include/asm/mach-generic/mach_apic.h | |||
@@ -5,7 +5,6 @@ | |||
5 | 5 | ||
6 | #define cpu_mask_to_apicid (apic->cpu_mask_to_apicid) | 6 | #define cpu_mask_to_apicid (apic->cpu_mask_to_apicid) |
7 | #define cpu_mask_to_apicid_and (apic->cpu_mask_to_apicid_and) | 7 | #define cpu_mask_to_apicid_and (apic->cpu_mask_to_apicid_and) |
8 | #define enable_apic_mode (apic->enable_apic_mode) | ||
9 | #define phys_pkg_id (apic->phys_pkg_id) | 8 | #define phys_pkg_id (apic->phys_pkg_id) |
10 | #define wakeup_secondary_cpu (apic->wakeup_cpu) | 9 | #define wakeup_secondary_cpu (apic->wakeup_cpu) |
11 | 10 | ||
diff --git a/arch/x86/include/asm/numaq/apic.h b/arch/x86/include/asm/numaq/apic.h index 3be735e2ab90..dc93c30972e7 100644 --- a/arch/x86/include/asm/numaq/apic.h +++ b/arch/x86/include/asm/numaq/apic.h | |||
@@ -97,10 +97,6 @@ static inline int numaq_check_phys_apicid_present(int boot_cpu_physical_apicid) | |||
97 | return 1; | 97 | return 1; |
98 | } | 98 | } |
99 | 99 | ||
100 | static inline void enable_apic_mode(void) | ||
101 | { | ||
102 | } | ||
103 | |||
104 | /* | 100 | /* |
105 | * We use physical apicids here, not logical, so just return the default | 101 | * We use physical apicids here, not logical, so just return the default |
106 | * physical broadcast to stop people from breaking us | 102 | * physical broadcast to stop people from breaking us |
diff --git a/arch/x86/include/asm/summit/apic.h b/arch/x86/include/asm/summit/apic.h index fe578f6df782..526d19e79447 100644 --- a/arch/x86/include/asm/summit/apic.h +++ b/arch/x86/include/asm/summit/apic.h | |||
@@ -125,10 +125,6 @@ static inline int summit_check_phys_apicid_present(int boot_cpu_physical_apicid) | |||
125 | return 1; | 125 | return 1; |
126 | } | 126 | } |
127 | 127 | ||
128 | static inline void enable_apic_mode(void) | ||
129 | { | ||
130 | } | ||
131 | |||
132 | static inline unsigned int cpu_mask_to_apicid(const cpumask_t *cpumask) | 128 | static inline unsigned int cpu_mask_to_apicid(const cpumask_t *cpumask) |
133 | { | 129 | { |
134 | int num_bits_set; | 130 | int num_bits_set; |
diff --git a/arch/x86/kernel/apic.c b/arch/x86/kernel/apic.c index fcbcc03cd4bd..9d6374da4784 100644 --- a/arch/x86/kernel/apic.c +++ b/arch/x86/kernel/apic.c | |||
@@ -1763,7 +1763,8 @@ void __init connect_bsp_APIC(void) | |||
1763 | outb(0x01, 0x23); | 1763 | outb(0x01, 0x23); |
1764 | } | 1764 | } |
1765 | #endif | 1765 | #endif |
1766 | enable_apic_mode(); | 1766 | if (apic->enable_apic_mode) |
1767 | apic->enable_apic_mode(); | ||
1767 | } | 1768 | } |
1768 | 1769 | ||
1769 | /** | 1770 | /** |
diff --git a/arch/x86/mach-generic/bigsmp.c b/arch/x86/mach-generic/bigsmp.c index 82743d16c23d..e151b472456f 100644 --- a/arch/x86/mach-generic/bigsmp.c +++ b/arch/x86/mach-generic/bigsmp.c | |||
@@ -86,7 +86,7 @@ struct genapic apic_bigsmp = { | |||
86 | .apicid_to_cpu_present = bigsmp_apicid_to_cpu_present, | 86 | .apicid_to_cpu_present = bigsmp_apicid_to_cpu_present, |
87 | .setup_portio_remap = NULL, | 87 | .setup_portio_remap = NULL, |
88 | .check_phys_apicid_present = bigsmp_check_phys_apicid_present, | 88 | .check_phys_apicid_present = bigsmp_check_phys_apicid_present, |
89 | .enable_apic_mode = enable_apic_mode, | 89 | .enable_apic_mode = NULL, |
90 | .phys_pkg_id = phys_pkg_id, | 90 | .phys_pkg_id = phys_pkg_id, |
91 | .mps_oem_check = mps_oem_check, | 91 | .mps_oem_check = mps_oem_check, |
92 | 92 | ||
diff --git a/arch/x86/mach-generic/default.c b/arch/x86/mach-generic/default.c index d0374c69ad01..ac6be195b977 100644 --- a/arch/x86/mach-generic/default.c +++ b/arch/x86/mach-generic/default.c | |||
@@ -67,7 +67,7 @@ struct genapic apic_default = { | |||
67 | .apicid_to_cpu_present = default_apicid_to_cpu_present, | 67 | .apicid_to_cpu_present = default_apicid_to_cpu_present, |
68 | .setup_portio_remap = NULL, | 68 | .setup_portio_remap = NULL, |
69 | .check_phys_apicid_present = default_check_phys_apicid_present, | 69 | .check_phys_apicid_present = default_check_phys_apicid_present, |
70 | .enable_apic_mode = enable_apic_mode, | 70 | .enable_apic_mode = NULL, |
71 | .phys_pkg_id = phys_pkg_id, | 71 | .phys_pkg_id = phys_pkg_id, |
72 | .mps_oem_check = mps_oem_check, | 72 | .mps_oem_check = mps_oem_check, |
73 | 73 | ||
diff --git a/arch/x86/mach-generic/es7000.c b/arch/x86/mach-generic/es7000.c index 52b3eb5e645f..9acb71120ef6 100644 --- a/arch/x86/mach-generic/es7000.c +++ b/arch/x86/mach-generic/es7000.c | |||
@@ -36,10 +36,10 @@ static int probe_es7000(void) | |||
36 | } | 36 | } |
37 | 37 | ||
38 | extern void es7000_sw_apic(void); | 38 | extern void es7000_sw_apic(void); |
39 | static void __init enable_apic_mode(void) | 39 | |
40 | static void __init es7000_enable_apic_mode(void) | ||
40 | { | 41 | { |
41 | es7000_sw_apic(); | 42 | es7000_sw_apic(); |
42 | return; | ||
43 | } | 43 | } |
44 | 44 | ||
45 | static __init int | 45 | static __init int |
@@ -128,7 +128,7 @@ struct genapic apic_es7000 = { | |||
128 | .apicid_to_cpu_present = es7000_apicid_to_cpu_present, | 128 | .apicid_to_cpu_present = es7000_apicid_to_cpu_present, |
129 | .setup_portio_remap = NULL, | 129 | .setup_portio_remap = NULL, |
130 | .check_phys_apicid_present = es7000_check_phys_apicid_present, | 130 | .check_phys_apicid_present = es7000_check_phys_apicid_present, |
131 | .enable_apic_mode = enable_apic_mode, | 131 | .enable_apic_mode = es7000_enable_apic_mode, |
132 | .phys_pkg_id = phys_pkg_id, | 132 | .phys_pkg_id = phys_pkg_id, |
133 | .mps_oem_check = mps_oem_check, | 133 | .mps_oem_check = mps_oem_check, |
134 | 134 | ||
diff --git a/arch/x86/mach-generic/numaq.c b/arch/x86/mach-generic/numaq.c index 7ec2ca43ca20..8d3358de3fe7 100644 --- a/arch/x86/mach-generic/numaq.c +++ b/arch/x86/mach-generic/numaq.c | |||
@@ -86,7 +86,7 @@ struct genapic apic_numaq = { | |||
86 | .apicid_to_cpu_present = numaq_apicid_to_cpu_present, | 86 | .apicid_to_cpu_present = numaq_apicid_to_cpu_present, |
87 | .setup_portio_remap = numaq_setup_portio_remap, | 87 | .setup_portio_remap = numaq_setup_portio_remap, |
88 | .check_phys_apicid_present = numaq_check_phys_apicid_present, | 88 | .check_phys_apicid_present = numaq_check_phys_apicid_present, |
89 | .enable_apic_mode = enable_apic_mode, | 89 | .enable_apic_mode = NULL, |
90 | .phys_pkg_id = phys_pkg_id, | 90 | .phys_pkg_id = phys_pkg_id, |
91 | .mps_oem_check = mps_oem_check, | 91 | .mps_oem_check = mps_oem_check, |
92 | 92 | ||
diff --git a/arch/x86/mach-generic/summit.c b/arch/x86/mach-generic/summit.c index acf12de8916f..cb83bcbb2dec 100644 --- a/arch/x86/mach-generic/summit.c +++ b/arch/x86/mach-generic/summit.c | |||
@@ -66,7 +66,7 @@ struct genapic apic_summit = { | |||
66 | .apicid_to_cpu_present = summit_apicid_to_cpu_present, | 66 | .apicid_to_cpu_present = summit_apicid_to_cpu_present, |
67 | .setup_portio_remap = NULL, | 67 | .setup_portio_remap = NULL, |
68 | .check_phys_apicid_present = summit_check_phys_apicid_present, | 68 | .check_phys_apicid_present = summit_check_phys_apicid_present, |
69 | .enable_apic_mode = enable_apic_mode, | 69 | .enable_apic_mode = NULL, |
70 | .phys_pkg_id = phys_pkg_id, | 70 | .phys_pkg_id = phys_pkg_id, |
71 | .mps_oem_check = mps_oem_check, | 71 | .mps_oem_check = mps_oem_check, |
72 | 72 | ||