From: Ian Campbell Subject: Re: [PATCH] xen: workaround for 64-bit size/alignment bitops Date: Mon, 28 Apr 2014 10:13:10 +0100 Message-ID: <1398676390.29700.5.camel@kazak.uk.xensource.com> References: <1398589752-14639-1-git-send-email-murzin.v@gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Received: from mail6.bemta3.messagelabs.com ([195.245.230.39]) by lists.xen.org with esmtp (Exim 4.72) (envelope-from ) id 1Wehcx-0006Qa-Cs for xen-devel@lists.xenproject.org; Mon, 28 Apr 2014 09:13:31 +0000 In-Reply-To: <1398589752-14639-1-git-send-email-murzin.v@gmail.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: Vladimir Murzin Cc: xen-devel@lists.xenproject.org, David Vrabel , pranavkumar@linaro.org List-Id: xen-devel@lists.xenproject.org On Sun, 2014-04-27 at 10:09 +0100, Vladimir Murzin wrote: > diff --git a/drivers/xen/events/events_fifo.c b/drivers/xen/events/events_fifo.c > index 96109a9..bff9841 100644 > --- a/drivers/xen/events/events_fifo.c > +++ b/drivers/xen/events/events_fifo.c > @@ -66,7 +66,9 @@ static DEFINE_PER_CPU(struct evtchn_fifo_queue, cpu_queue); > static event_word_t *event_array[MAX_EVENT_ARRAY_PAGES] __read_mostly; > static unsigned event_array_pages __read_mostly; > > -#define BM(w) ((unsigned long *)(w)) > + > +#define BM(w) (unsigned long *)((unsigned long)w & ~0x7UL) > +#define EVTCHN_FIFO_BIT(b, w) (((unsigned long)w & 0x4UL) ? (EVTCHN_FIFO_ ##b + 32) : EVTCHN_FIFO_ ##b) A comment to describe why we jump through these hoops might be nice. Apart from that: Reviewed-by: Ian Campbell