diff options
author | Ingo Molnar <mingo@elte.hu> | 2009-01-27 23:41:42 -0500 |
---|---|---|
committer | Ingo Molnar <mingo@elte.hu> | 2009-01-28 17:20:19 -0500 |
commit | d1d7cae8fd54a301a0de531b48451649933ffdcf (patch) | |
tree | 7cbd78a527f79564adf8f3ed095e1df051e0764d | |
parent | bdb1a9b62fc182d4da3143e346f7a0925d243352 (diff) |
x86, apic: clean up check_apicid*() callbacks
Clean up these methods - to make it clearer which function is
used in which case.
Signed-off-by: Ingo Molnar <mingo@elte.hu>
-rw-r--r-- | arch/x86/include/asm/bigsmp/apic.h | 9 | ||||
-rw-r--r-- | arch/x86/include/asm/es7000/apic.h | 5 | ||||
-rw-r--r-- | arch/x86/include/asm/mach-default/mach_apic.h | 4 | ||||
-rw-r--r-- | arch/x86/include/asm/mach-generic/mach_apic.h | 2 | ||||
-rw-r--r-- | arch/x86/include/asm/numaq/apic.h | 5 | ||||
-rw-r--r-- | arch/x86/include/asm/summit/apic.h | 5 | ||||
-rw-r--r-- | arch/x86/kernel/io_apic.c | 6 | ||||
-rw-r--r-- | arch/x86/mach-generic/bigsmp.c | 4 | ||||
-rw-r--r-- | arch/x86/mach-generic/default.c | 4 | ||||
-rw-r--r-- | arch/x86/mach-generic/es7000.c | 4 | ||||
-rw-r--r-- | arch/x86/mach-generic/numaq.c | 4 | ||||
-rw-r--r-- | arch/x86/mach-generic/summit.c | 4 |
12 files changed, 29 insertions, 27 deletions
diff --git a/arch/x86/include/asm/bigsmp/apic.h b/arch/x86/include/asm/bigsmp/apic.h index 7e6e33a6db02..bd52d4d86f0e 100644 --- a/arch/x86/include/asm/bigsmp/apic.h +++ b/arch/x86/include/asm/bigsmp/apic.h | |||
@@ -20,14 +20,15 @@ static inline const cpumask_t *bigsmp_target_cpus(void) | |||
20 | #define APIC_DFR_VALUE (APIC_DFR_FLAT) | 20 | #define APIC_DFR_VALUE (APIC_DFR_FLAT) |
21 | #define NO_BALANCE_IRQ (0) | 21 | #define NO_BALANCE_IRQ (0) |
22 | 22 | ||
23 | static inline unsigned long check_apicid_used(physid_mask_t bitmap, int apicid) | 23 | static inline unsigned long |
24 | bigsmp_check_apicid_used(physid_mask_t bitmap, int apicid) | ||
24 | { | 25 | { |
25 | return (0); | 26 | return 0; |
26 | } | 27 | } |
27 | 28 | ||
28 | static inline unsigned long check_apicid_present(int bit) | 29 | static inline unsigned long bigsmp_check_apicid_present(int bit) |
29 | { | 30 | { |
30 | return (1); | 31 | return 1; |
31 | } | 32 | } |
32 | 33 | ||
33 | static inline unsigned long calculate_ldr(int cpu) | 34 | static inline unsigned long calculate_ldr(int cpu) |
diff --git a/arch/x86/include/asm/es7000/apic.h b/arch/x86/include/asm/es7000/apic.h index 0d770fce4b28..cd888daa1930 100644 --- a/arch/x86/include/asm/es7000/apic.h +++ b/arch/x86/include/asm/es7000/apic.h | |||
@@ -28,11 +28,12 @@ static inline const cpumask_t *es7000_target_cpus(void) | |||
28 | #define APIC_DFR_VALUE (APIC_DFR_FLAT) | 28 | #define APIC_DFR_VALUE (APIC_DFR_FLAT) |
29 | #define NO_BALANCE_IRQ (0) | 29 | #define NO_BALANCE_IRQ (0) |
30 | 30 | ||
31 | static inline unsigned long check_apicid_used(physid_mask_t bitmap, int apicid) | 31 | static inline unsigned long |
32 | es7000_check_apicid_used(physid_mask_t bitmap, int apicid) | ||
32 | { | 33 | { |
33 | return 0; | 34 | return 0; |
34 | } | 35 | } |
35 | static inline unsigned long check_apicid_present(int bit) | 36 | static inline unsigned long es7000_check_apicid_present(int bit) |
36 | { | 37 | { |
37 | return physid_isset(bit, phys_cpu_present_map); | 38 | return physid_isset(bit, phys_cpu_present_map); |
38 | } | 39 | } |
diff --git a/arch/x86/include/asm/mach-default/mach_apic.h b/arch/x86/include/asm/mach-default/mach_apic.h index 5f8d17fdc965..064bc11a991c 100644 --- a/arch/x86/include/asm/mach-default/mach_apic.h +++ b/arch/x86/include/asm/mach-default/mach_apic.h | |||
@@ -105,12 +105,12 @@ static inline void vector_allocation_domain(int cpu, struct cpumask *retmask) | |||
105 | } | 105 | } |
106 | #endif | 106 | #endif |
107 | 107 | ||
108 | static inline unsigned long check_apicid_used(physid_mask_t bitmap, int apicid) | 108 | static inline unsigned long default_check_apicid_used(physid_mask_t bitmap, int apicid) |
109 | { | 109 | { |
110 | return physid_isset(apicid, bitmap); | 110 | return physid_isset(apicid, bitmap); |
111 | } | 111 | } |
112 | 112 | ||
113 | static inline unsigned long check_apicid_present(int bit) | 113 | static inline unsigned long default_check_apicid_present(int bit) |
114 | { | 114 | { |
115 | return physid_isset(bit, phys_cpu_present_map); | 115 | return physid_isset(bit, phys_cpu_present_map); |
116 | } | 116 | } |
diff --git a/arch/x86/include/asm/mach-generic/mach_apic.h b/arch/x86/include/asm/mach-generic/mach_apic.h index 00d5fe6e6769..e035f88dfcde 100644 --- a/arch/x86/include/asm/mach-generic/mach_apic.h +++ b/arch/x86/include/asm/mach-generic/mach_apic.h | |||
@@ -13,9 +13,7 @@ | |||
13 | #define cpu_present_to_apicid (apic->cpu_present_to_apicid) | 13 | #define cpu_present_to_apicid (apic->cpu_present_to_apicid) |
14 | #define apicid_to_cpu_present (apic->apicid_to_cpu_present) | 14 | #define apicid_to_cpu_present (apic->apicid_to_cpu_present) |
15 | #define setup_portio_remap (apic->setup_portio_remap) | 15 | #define setup_portio_remap (apic->setup_portio_remap) |
16 | #define check_apicid_present (apic->check_apicid_present) | ||
17 | #define check_phys_apicid_present (apic->check_phys_apicid_present) | 16 | #define check_phys_apicid_present (apic->check_phys_apicid_present) |
18 | #define check_apicid_used (apic->check_apicid_used) | ||
19 | #define cpu_mask_to_apicid (apic->cpu_mask_to_apicid) | 17 | #define cpu_mask_to_apicid (apic->cpu_mask_to_apicid) |
20 | #define cpu_mask_to_apicid_and (apic->cpu_mask_to_apicid_and) | 18 | #define cpu_mask_to_apicid_and (apic->cpu_mask_to_apicid_and) |
21 | #define vector_allocation_domain (apic->vector_allocation_domain) | 19 | #define vector_allocation_domain (apic->vector_allocation_domain) |
diff --git a/arch/x86/include/asm/numaq/apic.h b/arch/x86/include/asm/numaq/apic.h index 8ecb3b45c6c4..571fdaeafaa8 100644 --- a/arch/x86/include/asm/numaq/apic.h +++ b/arch/x86/include/asm/numaq/apic.h | |||
@@ -14,11 +14,12 @@ static inline const cpumask_t *numaq_target_cpus(void) | |||
14 | 14 | ||
15 | #define NO_BALANCE_IRQ (1) | 15 | #define NO_BALANCE_IRQ (1) |
16 | 16 | ||
17 | static inline unsigned long check_apicid_used(physid_mask_t bitmap, int apicid) | 17 | static inline unsigned long |
18 | numaq_check_apicid_used(physid_mask_t bitmap, int apicid) | ||
18 | { | 19 | { |
19 | return physid_isset(apicid, bitmap); | 20 | return physid_isset(apicid, bitmap); |
20 | } | 21 | } |
21 | static inline unsigned long check_apicid_present(int bit) | 22 | static inline unsigned long numaq_check_apicid_present(int bit) |
22 | { | 23 | { |
23 | return physid_isset(bit, phys_cpu_present_map); | 24 | return physid_isset(bit, phys_cpu_present_map); |
24 | } | 25 | } |
diff --git a/arch/x86/include/asm/summit/apic.h b/arch/x86/include/asm/summit/apic.h index 84679e687add..482038b244b0 100644 --- a/arch/x86/include/asm/summit/apic.h +++ b/arch/x86/include/asm/summit/apic.h | |||
@@ -23,13 +23,14 @@ static inline const cpumask_t *summit_target_cpus(void) | |||
23 | return &cpumask_of_cpu(0); | 23 | return &cpumask_of_cpu(0); |
24 | } | 24 | } |
25 | 25 | ||
26 | static inline unsigned long check_apicid_used(physid_mask_t bitmap, int apicid) | 26 | static inline unsigned long |
27 | summit_check_apicid_used(physid_mask_t bitmap, int apicid) | ||
27 | { | 28 | { |
28 | return 0; | 29 | return 0; |
29 | } | 30 | } |
30 | 31 | ||
31 | /* we don't use the phys_cpu_present_map to indicate apicid presence */ | 32 | /* we don't use the phys_cpu_present_map to indicate apicid presence */ |
32 | static inline unsigned long check_apicid_present(int bit) | 33 | static inline unsigned long summit_check_apicid_present(int bit) |
33 | { | 34 | { |
34 | return 1; | 35 | return 1; |
35 | } | 36 | } |
diff --git a/arch/x86/kernel/io_apic.c b/arch/x86/kernel/io_apic.c index 7f8b32b20897..733ecf172724 100644 --- a/arch/x86/kernel/io_apic.c +++ b/arch/x86/kernel/io_apic.c | |||
@@ -2135,7 +2135,7 @@ static void __init setup_ioapic_ids_from_mpc(void) | |||
2135 | * system must have a unique ID or we get lots of nice | 2135 | * system must have a unique ID or we get lots of nice |
2136 | * 'stuck on smp_invalidate_needed IPI wait' messages. | 2136 | * 'stuck on smp_invalidate_needed IPI wait' messages. |
2137 | */ | 2137 | */ |
2138 | if (check_apicid_used(phys_id_present_map, | 2138 | if (apic->check_apicid_used(phys_id_present_map, |
2139 | mp_ioapics[apic_id].apicid)) { | 2139 | mp_ioapics[apic_id].apicid)) { |
2140 | printk(KERN_ERR "BIOS bug, IO-APIC#%d ID %d is already used!...\n", | 2140 | printk(KERN_ERR "BIOS bug, IO-APIC#%d ID %d is already used!...\n", |
2141 | apic_id, mp_ioapics[apic_id].apicid); | 2141 | apic_id, mp_ioapics[apic_id].apicid); |
@@ -3878,10 +3878,10 @@ int __init io_apic_get_unique_id(int ioapic, int apic_id) | |||
3878 | * Every APIC in a system must have a unique ID or we get lots of nice | 3878 | * Every APIC in a system must have a unique ID or we get lots of nice |
3879 | * 'stuck on smp_invalidate_needed IPI wait' messages. | 3879 | * 'stuck on smp_invalidate_needed IPI wait' messages. |
3880 | */ | 3880 | */ |
3881 | if (check_apicid_used(apic_id_map, apic_id)) { | 3881 | if (apic->check_apicid_used(apic_id_map, apic_id)) { |
3882 | 3882 | ||
3883 | for (i = 0; i < get_physical_broadcast(); i++) { | 3883 | for (i = 0; i < get_physical_broadcast(); i++) { |
3884 | if (!check_apicid_used(apic_id_map, i)) | 3884 | if (!apic->check_apicid_used(apic_id_map, i)) |
3885 | break; | 3885 | break; |
3886 | } | 3886 | } |
3887 | 3887 | ||
diff --git a/arch/x86/mach-generic/bigsmp.c b/arch/x86/mach-generic/bigsmp.c index 7c52840f2050..aa8443f6c0f7 100644 --- a/arch/x86/mach-generic/bigsmp.c +++ b/arch/x86/mach-generic/bigsmp.c | |||
@@ -71,8 +71,8 @@ struct genapic apic_bigsmp = { | |||
71 | .target_cpus = bigsmp_target_cpus, | 71 | .target_cpus = bigsmp_target_cpus, |
72 | .disable_esr = 1, | 72 | .disable_esr = 1, |
73 | .dest_logical = 0, | 73 | .dest_logical = 0, |
74 | .check_apicid_used = check_apicid_used, | 74 | .check_apicid_used = bigsmp_check_apicid_used, |
75 | .check_apicid_present = check_apicid_present, | 75 | .check_apicid_present = bigsmp_check_apicid_present, |
76 | 76 | ||
77 | .no_balance_irq = NO_BALANCE_IRQ, | 77 | .no_balance_irq = NO_BALANCE_IRQ, |
78 | .no_ioapic_check = 0, | 78 | .no_ioapic_check = 0, |
diff --git a/arch/x86/mach-generic/default.c b/arch/x86/mach-generic/default.c index 53fa1ad83184..47f6b5b06ba1 100644 --- a/arch/x86/mach-generic/default.c +++ b/arch/x86/mach-generic/default.c | |||
@@ -38,8 +38,8 @@ struct genapic apic_default = { | |||
38 | .target_cpus = default_target_cpus, | 38 | .target_cpus = default_target_cpus, |
39 | .disable_esr = 0, | 39 | .disable_esr = 0, |
40 | .dest_logical = APIC_DEST_LOGICAL, | 40 | .dest_logical = APIC_DEST_LOGICAL, |
41 | .check_apicid_used = check_apicid_used, | 41 | .check_apicid_used = default_check_apicid_used, |
42 | .check_apicid_present = check_apicid_present, | 42 | .check_apicid_present = default_check_apicid_present, |
43 | 43 | ||
44 | .no_balance_irq = NO_BALANCE_IRQ, | 44 | .no_balance_irq = NO_BALANCE_IRQ, |
45 | .no_ioapic_check = 0, | 45 | .no_ioapic_check = 0, |
diff --git a/arch/x86/mach-generic/es7000.c b/arch/x86/mach-generic/es7000.c index 50fed0225cda..5633f3296e1c 100644 --- a/arch/x86/mach-generic/es7000.c +++ b/arch/x86/mach-generic/es7000.c | |||
@@ -114,8 +114,8 @@ struct genapic apic_es7000 = { | |||
114 | .target_cpus = es7000_target_cpus, | 114 | .target_cpus = es7000_target_cpus, |
115 | .disable_esr = 1, | 115 | .disable_esr = 1, |
116 | .dest_logical = 0, | 116 | .dest_logical = 0, |
117 | .check_apicid_used = check_apicid_used, | 117 | .check_apicid_used = es7000_check_apicid_used, |
118 | .check_apicid_present = check_apicid_present, | 118 | .check_apicid_present = es7000_check_apicid_present, |
119 | 119 | ||
120 | .no_balance_irq = NO_BALANCE_IRQ, | 120 | .no_balance_irq = NO_BALANCE_IRQ, |
121 | .no_ioapic_check = 0, | 121 | .no_ioapic_check = 0, |
diff --git a/arch/x86/mach-generic/numaq.c b/arch/x86/mach-generic/numaq.c index 1fb1b1a4aa00..d85206d8e4ae 100644 --- a/arch/x86/mach-generic/numaq.c +++ b/arch/x86/mach-generic/numaq.c | |||
@@ -58,8 +58,8 @@ struct genapic apic_numaq = { | |||
58 | .target_cpus = numaq_target_cpus, | 58 | .target_cpus = numaq_target_cpus, |
59 | .disable_esr = 1, | 59 | .disable_esr = 1, |
60 | .dest_logical = APIC_DEST_LOGICAL, | 60 | .dest_logical = APIC_DEST_LOGICAL, |
61 | .check_apicid_used = check_apicid_used, | 61 | .check_apicid_used = numaq_check_apicid_used, |
62 | .check_apicid_present = check_apicid_present, | 62 | .check_apicid_present = numaq_check_apicid_present, |
63 | 63 | ||
64 | .no_balance_irq = NO_BALANCE_IRQ, | 64 | .no_balance_irq = NO_BALANCE_IRQ, |
65 | .no_ioapic_check = 0, | 65 | .no_ioapic_check = 0, |
diff --git a/arch/x86/mach-generic/summit.c b/arch/x86/mach-generic/summit.c index 5c27d4d824e5..f54cf73d3edb 100644 --- a/arch/x86/mach-generic/summit.c +++ b/arch/x86/mach-generic/summit.c | |||
@@ -51,8 +51,8 @@ struct genapic apic_summit = { | |||
51 | .target_cpus = summit_target_cpus, | 51 | .target_cpus = summit_target_cpus, |
52 | .disable_esr = 1, | 52 | .disable_esr = 1, |
53 | .dest_logical = APIC_DEST_LOGICAL, | 53 | .dest_logical = APIC_DEST_LOGICAL, |
54 | .check_apicid_used = check_apicid_used, | 54 | .check_apicid_used = summit_check_apicid_used, |
55 | .check_apicid_present = check_apicid_present, | 55 | .check_apicid_present = summit_check_apicid_present, |
56 | 56 | ||
57 | .no_balance_irq = NO_BALANCE_IRQ, | 57 | .no_balance_irq = NO_BALANCE_IRQ, |
58 | .no_ioapic_check = 0, | 58 | .no_ioapic_check = 0, |