From: Paul E. McKenney Date: Fri, 3 Jul 2020 22:23:19 +0000 (-0700) Subject: scftorture: Adapt memory-ordering test to UP operation X-Git-Tag: v5.15~2632^2^2~2^2~2 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=9e66bf03f9c538863e614a72c5799bcd9579630e;p=platform%2Fkernel%2Flinux-starfive.git 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 --- diff --git a/kernel/scftorture.c b/kernel/scftorture.c index 04d3a42..fc22bcc 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);