diff options
author | Ingo Molnar <mingo@elte.hu> | 2009-01-27 21:43:47 -0500 |
---|---|---|
committer | Ingo Molnar <mingo@elte.hu> | 2009-01-28 17:20:12 -0500 |
commit | 7ed248daa56156f2fd7175f90b62fc6397b0c7b7 (patch) | |
tree | 7b03f5fa08ee6cec1c7af4e8b0327a4ac8f882cd /arch/x86 | |
parent | 306db03b0d71bf9c94155c0c4771a79fc70b4b27 (diff) |
x86: clean up apic->apic_id_registered() methods
Impact: cleanup
x86 subarchitectures each defined a "apic_id_registered()" method,
which could be an inline function depending on which subarch we build
for, and which was also the name of a genapic field.
Untangle this namespace spaghetti by giving each of the instances
a separate name.
Also remove wrapper macro obfuscation.
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'arch/x86')
-rw-r--r-- | arch/x86/include/asm/bigsmp/apic.h | 4 | ||||
-rw-r--r-- | arch/x86/include/asm/es7000/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 | 2 | ||||
-rw-r--r-- | arch/x86/include/asm/summit/apic.h | 2 | ||||
-rw-r--r-- | arch/x86/kernel/apic.c | 2 | ||||
-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 | 2 | ||||
-rw-r--r-- | arch/x86/mach-generic/numaq.c | 2 | ||||
-rw-r--r-- | arch/x86/mach-generic/summit.c | 2 |
12 files changed, 13 insertions, 15 deletions
diff --git a/arch/x86/include/asm/bigsmp/apic.h b/arch/x86/include/asm/bigsmp/apic.h index d8dd9f537911..42c56df3ff32 100644 --- a/arch/x86/include/asm/bigsmp/apic.h +++ b/arch/x86/include/asm/bigsmp/apic.h | |||
@@ -4,9 +4,9 @@ | |||
4 | #define xapic_phys_to_log_apicid(cpu) (per_cpu(x86_bios_cpu_apicid, cpu)) | 4 | #define xapic_phys_to_log_apicid(cpu) (per_cpu(x86_bios_cpu_apicid, cpu)) |
5 | #define esr_disable (1) | 5 | #define esr_disable (1) |
6 | 6 | ||
7 | static inline int apic_id_registered(void) | 7 | static inline int bigsmp_apic_id_registered(void) |
8 | { | 8 | { |
9 | return (1); | 9 | return 1; |
10 | } | 10 | } |
11 | 11 | ||
12 | static inline const cpumask_t *target_cpus(void) | 12 | static inline const cpumask_t *target_cpus(void) |
diff --git a/arch/x86/include/asm/es7000/apic.h b/arch/x86/include/asm/es7000/apic.h index c58b9cc74465..a1819b510de3 100644 --- a/arch/x86/include/asm/es7000/apic.h +++ b/arch/x86/include/asm/es7000/apic.h | |||
@@ -6,9 +6,9 @@ | |||
6 | #define xapic_phys_to_log_apicid(cpu) per_cpu(x86_bios_cpu_apicid, cpu) | 6 | #define xapic_phys_to_log_apicid(cpu) per_cpu(x86_bios_cpu_apicid, cpu) |
7 | #define esr_disable (1) | 7 | #define esr_disable (1) |
8 | 8 | ||
9 | static inline int apic_id_registered(void) | 9 | static inline int es7000_apic_id_registered(void) |
10 | { | 10 | { |
11 | return (1); | 11 | return 1; |
12 | } | 12 | } |
13 | 13 | ||
14 | static inline const cpumask_t *target_cpus_cluster(void) | 14 | static inline const cpumask_t *target_cpus_cluster(void) |
diff --git a/arch/x86/include/asm/mach-default/mach_apic.h b/arch/x86/include/asm/mach-default/mach_apic.h index 2448b927b644..6a454fa0b433 100644 --- a/arch/x86/include/asm/mach-default/mach_apic.h +++ b/arch/x86/include/asm/mach-default/mach_apic.h | |||
@@ -25,7 +25,6 @@ static inline const struct cpumask *target_cpus(void) | |||
25 | #define INT_DELIVERY_MODE (apic->int_delivery_mode) | 25 | #define INT_DELIVERY_MODE (apic->int_delivery_mode) |
26 | #define INT_DEST_MODE (apic->int_dest_mode) | 26 | #define INT_DEST_MODE (apic->int_dest_mode) |
27 | #define TARGET_CPUS (apic->target_cpus()) | 27 | #define TARGET_CPUS (apic->target_cpus()) |
28 | #define apic_id_registered (apic->apic_id_registered) | ||
29 | #define init_apic_ldr (apic->init_apic_ldr) | 28 | #define init_apic_ldr (apic->init_apic_ldr) |
30 | #define cpu_mask_to_apicid (apic->cpu_mask_to_apicid) | 29 | #define cpu_mask_to_apicid (apic->cpu_mask_to_apicid) |
31 | #define cpu_mask_to_apicid_and (apic->cpu_mask_to_apicid_and) | 30 | #define cpu_mask_to_apicid_and (apic->cpu_mask_to_apicid_and) |
@@ -57,7 +56,7 @@ static inline void init_apic_ldr(void) | |||
57 | apic_write(APIC_LDR, val); | 56 | apic_write(APIC_LDR, val); |
58 | } | 57 | } |
59 | 58 | ||
60 | static inline int apic_id_registered(void) | 59 | static inline int default_apic_id_registered(void) |
61 | { | 60 | { |
62 | return physid_isset(read_apic_id(), phys_cpu_present_map); | 61 | return physid_isset(read_apic_id(), phys_cpu_present_map); |
63 | } | 62 | } |
diff --git a/arch/x86/include/asm/mach-generic/mach_apic.h b/arch/x86/include/asm/mach-generic/mach_apic.h index 59972d94ff18..cc6e9d70f06e 100644 --- a/arch/x86/include/asm/mach-generic/mach_apic.h +++ b/arch/x86/include/asm/mach-generic/mach_apic.h | |||
@@ -10,7 +10,6 @@ | |||
10 | #undef APIC_DEST_LOGICAL | 10 | #undef APIC_DEST_LOGICAL |
11 | #define APIC_DEST_LOGICAL (apic->apic_destination_logical) | 11 | #define APIC_DEST_LOGICAL (apic->apic_destination_logical) |
12 | #define TARGET_CPUS (apic->target_cpus()) | 12 | #define TARGET_CPUS (apic->target_cpus()) |
13 | #define apic_id_registered (apic->apic_id_registered) | ||
14 | #define init_apic_ldr (apic->init_apic_ldr) | 13 | #define init_apic_ldr (apic->init_apic_ldr) |
15 | #define ioapic_phys_id_map (apic->ioapic_phys_id_map) | 14 | #define ioapic_phys_id_map (apic->ioapic_phys_id_map) |
16 | #define setup_apic_routing (apic->setup_apic_routing) | 15 | #define setup_apic_routing (apic->setup_apic_routing) |
diff --git a/arch/x86/include/asm/numaq/apic.h b/arch/x86/include/asm/numaq/apic.h index bf37bc49bd8e..59b62b19d02c 100644 --- a/arch/x86/include/asm/numaq/apic.h +++ b/arch/x86/include/asm/numaq/apic.h | |||
@@ -28,7 +28,7 @@ static inline unsigned long check_apicid_present(int bit) | |||
28 | } | 28 | } |
29 | #define apicid_cluster(apicid) (apicid & 0xF0) | 29 | #define apicid_cluster(apicid) (apicid & 0xF0) |
30 | 30 | ||
31 | static inline int apic_id_registered(void) | 31 | static inline int numaq_apic_id_registered(void) |
32 | { | 32 | { |
33 | return 1; | 33 | return 1; |
34 | } | 34 | } |
diff --git a/arch/x86/include/asm/summit/apic.h b/arch/x86/include/asm/summit/apic.h index 93d2c8667cfe..a36ef6e4b1ff 100644 --- a/arch/x86/include/asm/summit/apic.h +++ b/arch/x86/include/asm/summit/apic.h | |||
@@ -74,7 +74,7 @@ static inline int multi_timer_check(int apic, int irq) | |||
74 | return 0; | 74 | return 0; |
75 | } | 75 | } |
76 | 76 | ||
77 | static inline int apic_id_registered(void) | 77 | static inline int summit_apic_id_registered(void) |
78 | { | 78 | { |
79 | return 1; | 79 | return 1; |
80 | } | 80 | } |
diff --git a/arch/x86/kernel/apic.c b/arch/x86/kernel/apic.c index c6f15647eba9..b6740de18fbb 100644 --- a/arch/x86/kernel/apic.c +++ b/arch/x86/kernel/apic.c | |||
@@ -1171,7 +1171,7 @@ void __cpuinit setup_local_APIC(void) | |||
1171 | * Double-check whether this APIC is really registered. | 1171 | * Double-check whether this APIC is really registered. |
1172 | * This is meaningless in clustered apic mode, so we skip it. | 1172 | * This is meaningless in clustered apic mode, so we skip it. |
1173 | */ | 1173 | */ |
1174 | if (!apic_id_registered()) | 1174 | if (!apic->apic_id_registered()) |
1175 | BUG(); | 1175 | BUG(); |
1176 | 1176 | ||
1177 | /* | 1177 | /* |
diff --git a/arch/x86/mach-generic/bigsmp.c b/arch/x86/mach-generic/bigsmp.c index 22c3608b80dd..17abf5c62429 100644 --- a/arch/x86/mach-generic/bigsmp.c +++ b/arch/x86/mach-generic/bigsmp.c | |||
@@ -62,7 +62,7 @@ struct genapic apic_bigsmp = { | |||
62 | .name = "bigsmp", | 62 | .name = "bigsmp", |
63 | .probe = probe_bigsmp, | 63 | .probe = probe_bigsmp, |
64 | .acpi_madt_oem_check = NULL, | 64 | .acpi_madt_oem_check = NULL, |
65 | .apic_id_registered = apic_id_registered, | 65 | .apic_id_registered = bigsmp_apic_id_registered, |
66 | 66 | ||
67 | .int_delivery_mode = INT_DELIVERY_MODE, | 67 | .int_delivery_mode = INT_DELIVERY_MODE, |
68 | .int_dest_mode = INT_DEST_MODE, | 68 | .int_dest_mode = INT_DEST_MODE, |
diff --git a/arch/x86/mach-generic/default.c b/arch/x86/mach-generic/default.c index cfec3494a967..1f30559e9d8d 100644 --- a/arch/x86/mach-generic/default.c +++ b/arch/x86/mach-generic/default.c | |||
@@ -29,7 +29,7 @@ struct genapic apic_default = { | |||
29 | .name = "default", | 29 | .name = "default", |
30 | .probe = probe_default, | 30 | .probe = probe_default, |
31 | .acpi_madt_oem_check = NULL, | 31 | .acpi_madt_oem_check = NULL, |
32 | .apic_id_registered = apic_id_registered, | 32 | .apic_id_registered = default_apic_id_registered, |
33 | 33 | ||
34 | .int_delivery_mode = INT_DELIVERY_MODE, | 34 | .int_delivery_mode = INT_DELIVERY_MODE, |
35 | .int_dest_mode = INT_DEST_MODE, | 35 | .int_dest_mode = INT_DEST_MODE, |
diff --git a/arch/x86/mach-generic/es7000.c b/arch/x86/mach-generic/es7000.c index 23fe6f1c9691..d68ca0bce675 100644 --- a/arch/x86/mach-generic/es7000.c +++ b/arch/x86/mach-generic/es7000.c | |||
@@ -105,7 +105,7 @@ struct genapic apic_es7000 = { | |||
105 | .name = "es7000", | 105 | .name = "es7000", |
106 | .probe = probe_es7000, | 106 | .probe = probe_es7000, |
107 | .acpi_madt_oem_check = es7000_acpi_madt_oem_check, | 107 | .acpi_madt_oem_check = es7000_acpi_madt_oem_check, |
108 | .apic_id_registered = apic_id_registered, | 108 | .apic_id_registered = es7000_apic_id_registered, |
109 | 109 | ||
110 | .int_delivery_mode = INT_DELIVERY_MODE, | 110 | .int_delivery_mode = INT_DELIVERY_MODE, |
111 | .int_dest_mode = INT_DEST_MODE, | 111 | .int_dest_mode = INT_DEST_MODE, |
diff --git a/arch/x86/mach-generic/numaq.c b/arch/x86/mach-generic/numaq.c index 9691b4e1654d..b22a79b15b19 100644 --- a/arch/x86/mach-generic/numaq.c +++ b/arch/x86/mach-generic/numaq.c | |||
@@ -49,7 +49,7 @@ struct genapic apic_numaq = { | |||
49 | .name = "NUMAQ", | 49 | .name = "NUMAQ", |
50 | .probe = probe_numaq, | 50 | .probe = probe_numaq, |
51 | .acpi_madt_oem_check = NULL, | 51 | .acpi_madt_oem_check = NULL, |
52 | .apic_id_registered = apic_id_registered, | 52 | .apic_id_registered = numaq_apic_id_registered, |
53 | 53 | ||
54 | .int_delivery_mode = INT_DELIVERY_MODE, | 54 | .int_delivery_mode = INT_DELIVERY_MODE, |
55 | .int_dest_mode = INT_DEST_MODE, | 55 | .int_dest_mode = INT_DEST_MODE, |
diff --git a/arch/x86/mach-generic/summit.c b/arch/x86/mach-generic/summit.c index 0eea9fbb2a50..744fa1b86ef4 100644 --- a/arch/x86/mach-generic/summit.c +++ b/arch/x86/mach-generic/summit.c | |||
@@ -42,7 +42,7 @@ struct genapic apic_summit = { | |||
42 | .name = "summit", | 42 | .name = "summit", |
43 | .probe = probe_summit, | 43 | .probe = probe_summit, |
44 | .acpi_madt_oem_check = summit_acpi_madt_oem_check, | 44 | .acpi_madt_oem_check = summit_acpi_madt_oem_check, |
45 | .apic_id_registered = apic_id_registered, | 45 | .apic_id_registered = summit_apic_id_registered, |
46 | 46 | ||
47 | .int_delivery_mode = INT_DELIVERY_MODE, | 47 | .int_delivery_mode = INT_DELIVERY_MODE, |
48 | .int_dest_mode = INT_DEST_MODE, | 48 | .int_dest_mode = INT_DEST_MODE, |