[PATCH 10/10] powerpc/xive: fix the size of the cpumask used in xive_find_target_in_mask()

Benjamin Herrenschmidt benh at kernel.crashing.org
Wed Aug 9 17:29:09 AEST 2017


On Wed, 2017-08-09 at 17:06 +1000, Michael Ellerman wrote:
>   /**
>    * cpumask_weight - Count of bits in *srcp
>    * @srcp: the cpumask to count bits (< nr_cpu_ids) in.
>    */
>   static inline unsigned int cpumask_weight(const struct cpumask *srcp)
>   {
>         return bitmap_weight(cpumask_bits(srcp), nr_cpumask_bits);
>   }
> 
> 
> I don't know what the comment on srcp is trying to say. It's not true
> that it only counts nr_cpu_ids worth of bits.

Right, and that's what bit me. We should report that on lkml and maybe
propose a patch that crops the result...

Cheers,
Ben.



More information about the Linuxppc-dev mailing list