mirror_ubuntu-kernels/drivers/platform/x86/intel/ifs
Ashok Raj ea15f34d5f
platform/x86/intel/ifs: Replace the exit rendezvous with an entry rendezvous for ARRAY_BIST
ARRAY_BIST requires the test to be invoked only from one of the HT
siblings of a core.  If the other sibling was in mwait(), that didn't
permit the test to complete and resulted in several retries before the
test could finish.

The exit rendezvous was introduced to keep the HT sibling busy until
the primary CPU completed the test to avoid those retries. What is
actually needed is to ensure that both the threads rendezvous *before*
the wrmsr to trigger the test to give good chance to complete the test.

The `stop_machine()` function returns only after all the CPUs complete
running the function, and provides an exit rendezvous implicitly.

In kernel/stop_machine.c::multi_cpu_stop(), every CPU in the mask
needs to complete reaching MULTI_STOP_RUN. When all CPUs complete, the
state machine moves to next state, i.e MULTI_STOP_EXIT. Thus the
underlying API stop_core_cpuslocked() already provides an exit
rendezvous.

Add the rendezvous earlier in order to ensure the wrmsr is triggered
after all CPUs reach the do_array_test(). Remove the exit rendezvous
since stop_core_cpuslocked() already guarantees that.

Signed-off-by: Ashok Raj <ashok.raj@intel.com>
Reviewed-by: Tony Luck <tony.luck@intel.com>
Link: https://lore.kernel.org/r/20240125082254.424859-5-ashok.raj@intel.com
Reviewed-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>
Signed-off-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>
2024-01-31 11:57:29 +02:00
..
core.c platform/x86/intel/ifs: ARRAY BIST for Sierra Forest 2023-10-06 13:09:42 +03:00
ifs.h platform/x86/intel/ifs: ARRAY BIST for Sierra Forest 2023-10-06 13:09:42 +03:00
Kconfig Revert "platform/x86/intel/ifs: Mark as BROKEN" 2022-11-19 11:31:20 +01:00
load.c Major microcode loader restructuring, cleanup and improvements by Thomas 2023-11-04 08:46:37 -10:00
Makefile platform/x86/intel/ifs: Add IFS sysfs interface 2022-05-12 15:35:29 +02:00
runtest.c platform/x86/intel/ifs: Replace the exit rendezvous with an entry rendezvous for ARRAY_BIST 2024-01-31 11:57:29 +02:00
sysfs.c modules-6.4-rc1 2023-04-27 16:36:55 -07:00