From: Ian Campbell Subject: Re: [PATCH] xen: workaround for 64-bit size/alignment bitops Date: Mon, 28 Apr 2014 11:19:51 +0100 Message-ID: <1398680391.29700.33.camel@kazak.uk.xensource.com> References: <1398589752-14639-1-git-send-email-murzin.v@gmail.com> <1398676390.29700.5.camel@kazak.uk.xensource.com> <535E29E5.6020101@citrix.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 1WeifE-0005rz-AJ for xen-devel@lists.xenproject.org; Mon, 28 Apr 2014 10:19:56 +0000 In-Reply-To: <535E29E5.6020101@citrix.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: David Vrabel Cc: xen-devel@lists.xenproject.org, Vladimir Murzin , pranavkumar@linaro.org List-Id: xen-devel@lists.xenproject.org On Mon, 2014-04-28 at 11:13 +0100, David Vrabel wrote: > On 28/04/14 10:13, Ian Campbell wrote: > > 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 > > I added a comment and made the fix conditional on !x86 and 64-bit (see below) > and applied to stable/for-linus-3.15. Excellent, thanks!