From mboxrd@z Thu Jan 1 00:00:00 1970 From: Andrew Cooper Subject: Re: [PATCH v2] complete conversion set_bit() -> __cpumask_set_cpu() by 4aaca0e9cd Date: Mon, 23 Feb 2015 13:49:50 +0000 Message-ID: <54EB2FFE.7000904@citrix.com> References: <54EB3D880200007800062834@mail.emea.novell.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Received: from mail6.bemta14.messagelabs.com ([193.109.254.103]) by lists.xen.org with esmtp (Exim 4.72) (envelope-from ) id 1YPtOY-0008QJ-Kk for xen-devel@lists.xenproject.org; Mon, 23 Feb 2015 13:49:58 +0000 In-Reply-To: <54EB3D880200007800062834@mail.emea.novell.com> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: Jan Beulich , xen-devel Cc: Ian Campbell , Sander Eikelenboom , Keir Fraser , Ian Jackson , Tim Deegan List-Id: xen-devel@lists.xenproject.org On 23/02/15 13:47, Jan Beulich wrote: > While converting to __cpumask_set_cpu() was correct, the first argument > passed should have been corrected to be "cpu" instead of "nr" at once. > The wrong construct results in problems on systems with relatively few > CPUs. > > Reported-by: Sander Eikelenboom > Signed-off-by: Jan Beulich Looks better. Reviewed-by: Andrew Cooper > --- > v2: As Andrew points out the original code was wrong too, and hence > the use of __cpumask_set_cpu) was correct. What was wrong was the > use of "nr" as the bit position. > > --- a/xen/common/softirq.c > +++ b/xen/common/softirq.c > @@ -106,7 +106,7 @@ void cpu_raise_softirq(unsigned int cpu, > if ( !per_cpu(batching, this_cpu) || in_irq() ) > smp_send_event_check_cpu(cpu); > else > - __cpumask_set_cpu(nr, &per_cpu(batch_mask, this_cpu)); > + __cpumask_set_cpu(cpu, &per_cpu(batch_mask, this_cpu)); > } > > void cpu_raise_softirq_batch_begin(void) > > >