]> www.infradead.org Git - nvme.git/commit
x86/split_lock: Simplify reenabling
authorMaksim Davydov <davydov-max@yandex-team.ru>
Tue, 25 Mar 2025 08:58:07 +0000 (11:58 +0300)
committerIngo Molnar <mingo@kernel.org>
Tue, 25 Mar 2025 09:16:50 +0000 (10:16 +0100)
commit0e1ff67d164be45e8ddfea5aaf5803224ede0805
tree616042b07ae438046e060566dd05a85161ee9748
parent2df0c02dab829dd89360d98a8a1abaa026ef5798
x86/split_lock: Simplify reenabling

When split_lock_mitigate is disabled, each CPU needs its own delayed_work
structure. They are used to reenable split lock detection after its
disabling. But delayed_work structure must be correctly initialized after
its allocation.

Current implementation uses deferred initialization that makes the
split lock handler code unclear. The code can be simplified a bit
if the initialization is moved to the appropriate initcall.

sld_setup() is called before setup_per_cpu_areas(), thus it can't be used
for this purpose, so introduce an independent initcall for
the initialization.

[ mingo: Simplified the 'work' assignment line a bit more. ]

Signed-off-by: Maksim Davydov <davydov-max@yandex-team.ru>
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Link: https://lore.kernel.org/r/20250325085807.171885-1-davydov-max@yandex-team.ru
arch/x86/kernel/cpu/bus_lock.c