On 08/24/2017 07:49 AM, Michael Ellerman wrote:
> Michael Ellerman writes:
>
>> Cédric Le Goater writes:
>>> When called from xive_irq_startup(), the size of the cpumask can be
>>> larger than nr_cpu_ids. Most of time, its value is NR_CPUS (2048).
> ...
>>
>>
Michael Ellerman writes:
> Cédric Le Goater writes:
>> When called from xive_irq_startup(), the size of the cpumask can be
>> larger than nr_cpu_ids. Most of time, its value is NR_CPUS (2048).
...
>
> I guess this patch is a good fix, I'll expand the change
On 08/09/2017 09:06 AM, Michael Ellerman wrote:
> Cédric Le Goater writes:
>> When called from xive_irq_startup(), the size of the cpumask can be
>> larger than nr_cpu_ids. Most of time, its value is NR_CPUS (2048).
>
> Ugh, you're right.
>
> #define nr_cpumask_bits
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
Cédric Le Goater writes:
> When called from xive_irq_startup(), the size of the cpumask can be
> larger than nr_cpu_ids. Most of time, its value is NR_CPUS (2048).
Ugh, you're right.
#define nr_cpumask_bits ((unsigned int)NR_CPUS)
...
/**
* cpumask_weight - Count
When called from xive_irq_startup(), the size of the cpumask can be
larger than nr_cpu_ids. Most of time, its value is NR_CPUS (2048).
This can result in such WARNINGs in xive_find_target_in_mask():
[0.094480] WARNING: CPU: 10 PID: 1 at
../arch/powerpc/sysdev/xive/common.c:476