On Tue, 25 Jul 2017 11:03:45 +1000 Benjamin Herrenschmidt <b...@kernel.crashing.org> wrote:
> On Tue, 2017-07-25 at 10:44 +1000, Nicholas Piggin wrote: > > The two variants are just cleaner versions of the two variants you > > already introduced. > > > > static inline bool mm_activate_cpu(struct mm_struct *mm) > > { > > if (!cpumask_test_cpu(smp_processor_id(), mm_cpumask(next))) { > > cpumask_set_cpu(smp_processor_id(), mm_cpumask(next)); > > #if CONFIG_PPC_BOOK3S_64 > > atomic_inc(&mm->context.active_cpus); > > #endif > > smp_mb(); > > return true; > > } > > return false; > > } > > Well the above is what I originally wrote, which Michael encouraged me > to turn into a helper ;-) I was removing ifdef's from switch_mm in > this series... Well I won't harp on about it if you guys prefer the increment helper. Just the comment would be good. The rest of the series seems okay to me. Thanks, Nick