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

2017-08-24 Thread Cédric Le Goater
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). > ... >> >>

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

2017-08-23 Thread Michael Ellerman
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

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

2017-08-09 Thread Cédric Le Goater
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

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

2017-08-09 Thread Benjamin Herrenschmidt
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

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

2017-08-09 Thread Michael Ellerman
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

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

2017-08-08 Thread Cédric Le Goater
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