Link: https://lore.kernel.org/r/20260217200002.683975158@linuxfoundation.org Tested-by: Florian Fainelli <florian.fainelli@broadcom.com> Tested-by: Takeshi Ogasawara <takeshi.ogasawara@futuring-girl.com> Tested-by: Peter Schneider <pschneider1968@googlemail.com> Tested-by: Jon Hunter <jonathanh@nvidia.com> Tested-by: Salvatore Bonaccorso <carnil@debian.org> Tested-by: Brett A C Sheffield <bacs@librecast.net> Tested-by: Mark Brown <broonie@kernel.org> Tested-by: Luna Jernberg <droidbittin@gmail.com> Tested-by: Ronald Warsow <rwarsow@gmx.de> Tested-by: Justin M. Forbes <jforbes@fedoraproject.org> Tested-by: Ron Economos <re@w6rz.net> Tested-by: Miguel Ojeda <ojeda@kernel.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
34 lines
564 B
Plaintext
34 lines
564 B
Plaintext
C MP+unlocklockonceonce+fencermbonceonce
|
|
|
|
(*
|
|
* Result: Never
|
|
*
|
|
* If two locked critical sections execute on the same CPU, stores in the
|
|
* first must propagate to each CPU before stores in the second do, even if
|
|
* the critical sections are protected by different locks.
|
|
*)
|
|
|
|
{}
|
|
|
|
P0(spinlock_t *s, spinlock_t *t, int *x, int *y)
|
|
{
|
|
spin_lock(s);
|
|
WRITE_ONCE(*x, 1);
|
|
spin_unlock(s);
|
|
spin_lock(t);
|
|
WRITE_ONCE(*y, 1);
|
|
spin_unlock(t);
|
|
}
|
|
|
|
P1(int *x, int *y)
|
|
{
|
|
int r1;
|
|
int r2;
|
|
|
|
r1 = READ_ONCE(*y);
|
|
smp_rmb();
|
|
r2 = READ_ONCE(*x);
|
|
}
|
|
|
|
exists (1:r1=1 /\ 1:r2=0)
|