diff options
author | Paul E. McKenney <paulmck@kernel.org> | 2020-07-04 01:23:19 +0300 |
---|---|---|
committer | Paul E. McKenney <paulmck@kernel.org> | 2020-08-25 04:38:37 +0300 |
commit | 9e66bf03f9c538863e614a72c5799bcd9579630e (patch) | |
tree | 686d919073ce1d49131a5ff2631da4c06056171a | |
parent | a7c072ef26644b632241d549869f10f8d2dd3b5c (diff) | |
download | linux-9e66bf03f9c538863e614a72c5799bcd9579630e.tar.xz |
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>
-rw-r--r-- | kernel/scftorture.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/kernel/scftorture.c b/kernel/scftorture.c index 04d3a4279413..fc22bcc9a589 100644 --- a/kernel/scftorture.c +++ b/kernel/scftorture.c @@ -363,7 +363,8 @@ static void scftorture_invoke_one(struct scf_statistics *scfp, struct torture_ra scfcp->scfc_out = true; } if (scfcp && scfsp->scfs_wait) { - if (WARN_ON_ONCE(!scfcp->scfc_out)) + if (WARN_ON_ONCE((num_online_cpus() > 1 || scfsp->scfs_prim == SCF_PRIM_SINGLE) && + !scfcp->scfc_out)) atomic_inc(&n_mb_out_errs); // Leak rather than trash! else kfree(scfcp); |