diff options
author | Thomas Gleixner <tglx@linutronix.de> | 2023-10-02 13:59:59 +0200 |
---|---|---|
committer | Borislav Petkov (AMD) <bp@alien8.de> | 2023-10-24 15:05:54 +0200 |
commit | 0772b9aa1a8f7322dce8588c231cff8b57298a53 (patch) | |
tree | 635b14036ad5f1d2d4590d19b083d860cabed888 /tools/perf/scripts/python/export-to-sqlite.py | |
parent | 6f059e634dcd0d725854514c94c114bbdd83950d (diff) |
x86/microcode: Sanitize __wait_for_cpus()
The code is too complicated for no reason:
- The return value is pointless as this is a strict boolean.
- It's way simpler to count down from num_online_cpus() and check for
zero.
- The timeout argument is pointless as this is always one second.
- Touching the NMI watchdog every 100ns does not make any sense, neither
does checking every 100ns. This is really not a hotpath operation.
Preload the atomic counter with the number of online CPUs and simplify the
whole timeout logic. Delay for one microsecond and touch the NMI watchdog
once per millisecond.
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: Borislav Petkov (AMD) <bp@alien8.de>
Link: https://lore.kernel.org/r/20231002115903.204251527@linutronix.de
Diffstat (limited to 'tools/perf/scripts/python/export-to-sqlite.py')
0 files changed, 0 insertions, 0 deletions