Skip to content

Commit 9e66bf0

Browse files
committed
scftorture: Adapt memory-ordering test to UP operation
On uniprocessor systems, smp_call_function() does nothing. This commit therefore avoids complaining about the lack of handler accesses in the single-CPU case where there is no handler. Signed-off-by: Paul E. McKenney <paulmck@kernel.org>
1 parent a7c072e commit 9e66bf0

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

kernel/scftorture.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -363,7 +363,8 @@ static void scftorture_invoke_one(struct scf_statistics *scfp, struct torture_ra
363363
scfcp->scfc_out = true;
364364
}
365365
if (scfcp && scfsp->scfs_wait) {
366-
if (WARN_ON_ONCE(!scfcp->scfc_out))
366+
if (WARN_ON_ONCE((num_online_cpus() > 1 || scfsp->scfs_prim == SCF_PRIM_SINGLE) &&
367+
!scfcp->scfc_out))
367368
atomic_inc(&n_mb_out_errs); // Leak rather than trash!
368369
else
369370
kfree(scfcp);

0 commit comments

Comments
 (0)