Skip to content

Commit 3994ff9

Browse files
committed
x86/apic: Remove dest argument from __default_send_IPI_shortcut()
The SDM states: "The destination shorthand field of the ICR allows the delivery mode to be by-passed in favor of broadcasting the IPI to all the processors on the system bus and/or back to itself (see Section 10.6.1, Interrupt Command Register (ICR)). Three destination shorthands are supported: self, all excluding self, and all including self. The destination mode is ignored when a destination shorthand is used." So there is no point to supply the destination mode to the shorthand delivery function. Signed-off-by: Thomas Gleixner <[email protected]> Acked-by: Peter Zijlstra (Intel) <[email protected]> Link: https://lkml.kernel.org/r/[email protected]
1 parent 60dcaad commit 3994ff9

File tree

4 files changed

+11
-14
lines changed

4 files changed

+11
-14
lines changed

arch/x86/kernel/apic/apic_flat_64.c

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -90,8 +90,7 @@ static void flat_send_IPI_allbutself(int vector)
9090
_flat_send_IPI_mask(mask, vector);
9191
}
9292
} else if (num_online_cpus() > 1) {
93-
__default_send_IPI_shortcut(APIC_DEST_ALLBUT,
94-
vector, apic->dest_logical);
93+
__default_send_IPI_shortcut(APIC_DEST_ALLBUT, vector);
9594
}
9695
}
9796

@@ -100,8 +99,7 @@ static void flat_send_IPI_all(int vector)
10099
if (vector == NMI_VECTOR) {
101100
flat_send_IPI_mask(cpu_online_mask, vector);
102101
} else {
103-
__default_send_IPI_shortcut(APIC_DEST_ALLINC,
104-
vector, apic->dest_logical);
102+
__default_send_IPI_shortcut(APIC_DEST_ALLINC, vector);
105103
}
106104
}
107105

arch/x86/kernel/apic/ipi.c

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ static inline void __xapic_wait_icr_idle(void)
1616
cpu_relax();
1717
}
1818

19-
void __default_send_IPI_shortcut(unsigned int shortcut, int vector, unsigned int dest)
19+
void __default_send_IPI_shortcut(unsigned int shortcut, int vector)
2020
{
2121
/*
2222
* Subtle. In the case of the 'never do double writes' workaround
@@ -33,9 +33,10 @@ void __default_send_IPI_shortcut(unsigned int shortcut, int vector, unsigned int
3333
__xapic_wait_icr_idle();
3434

3535
/*
36-
* No need to touch the target chip field
36+
* No need to touch the target chip field. Also the destination
37+
* mode is ignored when a shorthand is used.
3738
*/
38-
cfg = __prepare_ICR(shortcut, vector, dest);
39+
cfg = __prepare_ICR(shortcut, vector, 0);
3940

4041
/*
4142
* Send the IPI. The write to APIC_ICR fires this off.
@@ -202,8 +203,7 @@ void default_send_IPI_allbutself(int vector)
202203
if (no_broadcast || vector == NMI_VECTOR) {
203204
apic->send_IPI_mask_allbutself(cpu_online_mask, vector);
204205
} else {
205-
__default_send_IPI_shortcut(APIC_DEST_ALLBUT, vector,
206-
apic->dest_logical);
206+
__default_send_IPI_shortcut(APIC_DEST_ALLBUT, vector);
207207
}
208208
}
209209

@@ -212,14 +212,13 @@ void default_send_IPI_all(int vector)
212212
if (no_broadcast || vector == NMI_VECTOR) {
213213
apic->send_IPI_mask(cpu_online_mask, vector);
214214
} else {
215-
__default_send_IPI_shortcut(APIC_DEST_ALLINC, vector,
216-
apic->dest_logical);
215+
__default_send_IPI_shortcut(APIC_DEST_ALLINC, vector);
217216
}
218217
}
219218

220219
void default_send_IPI_self(int vector)
221220
{
222-
__default_send_IPI_shortcut(APIC_DEST_SELF, vector, apic->dest_logical);
221+
__default_send_IPI_shortcut(APIC_DEST_SELF, vector);
223222
}
224223

225224
/* must come after the send_IPI functions above for inlining */

arch/x86/kernel/apic/local.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ static inline unsigned int __prepare_ICR(unsigned int shortcut, int vector,
3838
return icr;
3939
}
4040

41-
void __default_send_IPI_shortcut(unsigned int shortcut, int vector, unsigned int dest);
41+
void __default_send_IPI_shortcut(unsigned int shortcut, int vector);
4242

4343
/*
4444
* This is used to send an IPI with no shorthand notation (the destination is

arch/x86/kernel/apic/probe_64.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ void __init default_setup_apic_routing(void)
4040

4141
void apic_send_IPI_self(int vector)
4242
{
43-
__default_send_IPI_shortcut(APIC_DEST_SELF, vector, APIC_DEST_PHYSICAL);
43+
__default_send_IPI_shortcut(APIC_DEST_SELF, vector);
4444
}
4545

4646
int __init default_acpi_madt_oem_check(char *oem_id, char *oem_table_id)

0 commit comments

Comments
 (0)