History

Merge branch 'core/speculation' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip into for-next/mitigations

Pull in core support for the "mitigations=" cmdline option from Thomas Gleixner via -tip, which we can build on top of when we expose our mitigation state via sysfs.

Will Deacon committed 7 years ago

Commit cbafee52 parents 79a3aaa 0336e048 files · +89 −8Browse files

Showing the changes to include/linux (1 of 8 files). Show all

Unified · Split

include/linux/cpu.h+24−0
@@ -187,4 +187,28 @@ static inline void cpu_smt_disable(bool force) { } · 186 unmodified lines
187static inline void cpu_smt_check_topology(void) { }187static inline void cpu_smt_check_topology(void) { }
188#endif188#endif
189 189
190/*
191 * These are used for a global "mitigations=" cmdline option for toggling
192 * optional CPU mitigations.
193 */
194enum cpu_mitigations {
195 CPU_MITIGATIONS_OFF,
196 CPU_MITIGATIONS_AUTO,
197 CPU_MITIGATIONS_AUTO_NOSMT,
198};
199
200extern enum cpu_mitigations cpu_mitigations;
201
202/* mitigations=off */
203static inline bool cpu_mitigations_off(void)
204{
205 return cpu_mitigations == CPU_MITIGATIONS_OFF;
206}
207
208/* mitigations=auto,nosmt */
209static inline bool cpu_mitigations_auto_nosmt(void)
210{
211 return cpu_mitigations == CPU_MITIGATIONS_AUTO_NOSMT;
212}
213
190#endif /* _LINUX_CPU_H_ */214#endif /* _LINUX_CPU_H_ */

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t