aboutsummaryrefslogtreecommitdiffstats
path: root/arch/x86/kernel/genapic_flat_64.c
diff options
context:
space:
mode:
authorIngo Molnar <mingo@elte.hu>2009-01-27 23:13:04 -0500
committerIngo Molnar <mingo@elte.hu>2009-01-28 17:20:18 -0500
commit0b06e734bff7554c31eac4aad2fc9be4adb7c1c1 (patch)
tree52b3f9ccf6d85e503cf949c888ded6722c66e3a3 /arch/x86/kernel/genapic_flat_64.c
parent08125d3edab90644724652eedec3e219e3e0f2e7 (diff)
x86: clean up the APIC_DEST_LOGICAL logic
Impact: cleanup The bigsmp and es7000 subarchitectures un-defined APIC_DEST_LOGICAL in a rather nasty way by re-defining it to zero. That is infinitely fragile and makes it very hard to see what to code really does in a given context. The very same constant has different meanings and values - depending on which subarch is enabled. Untangle this mess by never undefining the constant, but instead propagating the right values into the genapic driver templates. Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'arch/x86/kernel/genapic_flat_64.c')
-rw-r--r--arch/x86/kernel/genapic_flat_64.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/arch/x86/kernel/genapic_flat_64.c b/arch/x86/kernel/genapic_flat_64.c
index d437a60cc589..fd242c6b3ba1 100644
--- a/arch/x86/kernel/genapic_flat_64.c
+++ b/arch/x86/kernel/genapic_flat_64.c
@@ -74,7 +74,7 @@ static inline void _flat_send_IPI_mask(unsigned long mask, int vector)
74 unsigned long flags; 74 unsigned long flags;
75 75
76 local_irq_save(flags); 76 local_irq_save(flags);
77 __send_IPI_dest_field(mask, vector, APIC_DEST_LOGICAL); 77 __send_IPI_dest_field(mask, vector, apic->apic_destination_logical);
78 local_irq_restore(flags); 78 local_irq_restore(flags);
79} 79}
80 80
@@ -114,7 +114,7 @@ static void flat_send_IPI_allbutself(int vector)
114 _flat_send_IPI_mask(mask, vector); 114 _flat_send_IPI_mask(mask, vector);
115 } 115 }
116 } else if (num_online_cpus() > 1) { 116 } else if (num_online_cpus() > 1) {
117 __send_IPI_shortcut(APIC_DEST_ALLBUT, vector,APIC_DEST_LOGICAL); 117 __send_IPI_shortcut(APIC_DEST_ALLBUT, vector, apic->apic_destination_logical);
118 } 118 }
119} 119}
120 120
@@ -123,7 +123,7 @@ static void flat_send_IPI_all(int vector)
123 if (vector == NMI_VECTOR) 123 if (vector == NMI_VECTOR)
124 flat_send_IPI_mask(cpu_online_mask, vector); 124 flat_send_IPI_mask(cpu_online_mask, vector);
125 else 125 else
126 __send_IPI_shortcut(APIC_DEST_ALLINC, vector, APIC_DEST_LOGICAL); 126 __send_IPI_shortcut(APIC_DEST_ALLINC, vector, apic->apic_destination_logical);
127} 127}
128 128
129static unsigned int get_apic_id(unsigned long x) 129static unsigned int get_apic_id(unsigned long x)
@@ -181,11 +181,11 @@ struct genapic apic_flat = {
181 .apic_id_registered = flat_apic_id_registered, 181 .apic_id_registered = flat_apic_id_registered,
182 182
183 .irq_delivery_mode = dest_LowestPrio, 183 .irq_delivery_mode = dest_LowestPrio,
184 .irq_dest_mode = (APIC_DEST_LOGICAL != 0), 184 .irq_dest_mode = 1, /* logical */
185 185
186 .target_cpus = flat_target_cpus, 186 .target_cpus = flat_target_cpus,
187 .disable_esr = 0, 187 .disable_esr = 0,
188 .apic_destination_logical = 0, 188 .apic_destination_logical = APIC_DEST_LOGICAL,
189 .check_apicid_used = NULL, 189 .check_apicid_used = NULL,
190 .check_apicid_present = NULL, 190 .check_apicid_present = NULL,
191 191
@@ -327,7 +327,7 @@ struct genapic apic_physflat = {
327 .apic_id_registered = flat_apic_id_registered, 327 .apic_id_registered = flat_apic_id_registered,
328 328
329 .irq_delivery_mode = dest_Fixed, 329 .irq_delivery_mode = dest_Fixed,
330 .irq_dest_mode = (APIC_DEST_PHYSICAL != 0), 330 .irq_dest_mode = 0, /* physical */
331 331
332 .target_cpus = physflat_target_cpus, 332 .target_cpus = physflat_target_cpus,
333 .disable_esr = 0, 333 .disable_esr = 0,