From: Julien Grall <julien.grall@linaro.org>
To: Ian Campbell <Ian.Campbell@citrix.com>,
Julien Grall <julien.grall@citrix.com>
Cc: Vladimir Murzin <murzin.v@gmail.com>, Tim Deegan <tim@xen.org>,
Stefano Stabellini <stefano.stabellini@citrix.com>,
David Vrabel <david.vrabel@citrix.com>,
Jan Beulich <jbeulich@suse.com>,
"xen-devel@lists.xenproject.org" <xen-devel@lists.xenproject.org>
Subject: Re: [PATCH] xen: arm: bitops take unsigned int (Was: Re: [PATCH] xen/arm64: disable alignment check)
Date: Mon, 12 May 2014 14:44:44 +0100 [thread overview]
Message-ID: <5370D04C.20203@linaro.org> (raw)
In-Reply-To: <1399897136.22097.12.camel@kazak.uk.xensource.com>
On 05/12/2014 01:18 PM, Ian Campbell wrote:
> On Mon, 2014-05-12 at 13:15 +0100, Julien Grall wrote:
>> Hi Ian,
>>
>> On 05/09/2014 05:19 PM, Ian Campbell wrote:
>>> (Just adding the other ARM guys...)
>>>
>>> On Fri, 2014-05-09 at 14:24 +0100, Ian Campbell wrote:
>>>> On Tue, 2014-04-29 at 09:58 +0100, Ian Campbell wrote:
>>>>> On Tue, 2014-04-29 at 08:38 +0100, Vladimir Murzin wrote:
>>>>>> On Mon, Apr 28, 2014 at 11:43 AM, Ian Campbell <Ian.Campbell@citrix.com> wrote:
>>>>>>> But I also wanted confirmation that the problematic instruction was
>>>>>>> generated by gcc and not by some handcoded asm somewhere which we hadn't
>>>>>>> properly fixed.
>>>>>
>>>>>> I believe it comes form test_bit (xen/include/asm-arm/bitops.h).
>>>>>
>>>>> Ah, then I think this code needs fixing too. Probably switching to
>>>>> unsigned int * throughout would work, what do you think?
>>>>
>>>> I finally managed to upgrade to a new enough kernel to trigger this.
>>>>
>>>> This Works For Me(tm), along with the Linux patch "xen/events/fifo:
>>>> correctly align bitops" which is queued for 3.15 Linus (but not sent
>>>> yet?)
>>>>
>>>> 8<-------------------
>>>>
>>>> From aa6afe6520ea22241fb0ce430ef315c49a73867f Mon Sep 17 00:00:00 2001
>>>> From: Ian Campbell <ian.campbell@citrix.com>
>>>> Date: Thu, 8 May 2014 16:13:55 +0100
>>>> Subject: [PATCH] xen: arm: bitops take unsigned int
>>>>
>>>> Xen bitmaps can be 4 rather than 8 byte aligned, so use the appropriate type.
>>>> Otherwise the compiler can generate unaligned 8 byte accesses and cause traps.
>>>>
>>>> Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
>>>> ---
>>>> xen/include/asm-arm/bitops.h | 37 +++++++++++++++++++------------------
>>>> 1 file changed, 19 insertions(+), 18 deletions(-)
>>>>
>>>> diff --git a/xen/include/asm-arm/bitops.h b/xen/include/asm-arm/bitops.h
>>>> index 0a7caee..25f96c8 100644
>>>> --- a/xen/include/asm-arm/bitops.h
>>>> +++ b/xen/include/asm-arm/bitops.h
>>>> @@ -18,13 +18,14 @@
>>>> #define __set_bit(n,p) set_bit(n,p)
>>>> #define __clear_bit(n,p) clear_bit(n,p)
>>>>
>>>> +#define BITS_PER_WORD 32
>>
>> Can you define BITS_PER_WORD in asm-arm/config.h rather than here?
>
> For better or worse BITS_PER_BYTE is already defined in bitops.h and
> since I've already run the majority of my pre-push commit checks on a
> branch containing this fix (along with some other bits and bobs) I'm not
> inclined to restart that process just for this change.
No problem. I guess you plan to backport this patch for Xen 4.4?
Regards,
--
Julien Grall
next prev parent reply other threads:[~2014-05-12 13:44 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-04-27 9:10 [PATCH] xen/arm64: disable alignment check Vladimir Murzin
2014-04-28 9:48 ` Ian Campbell
2014-04-28 10:24 ` David Vrabel
2014-04-28 10:36 ` Ian Campbell
2014-04-28 10:37 ` David Vrabel
2014-04-28 10:43 ` Ian Campbell
2014-04-29 7:38 ` Vladimir Murzin
2014-04-29 8:58 ` Ian Campbell
2014-05-09 13:24 ` [PATCH] xen: arm: bitops take unsigned int (Was: Re: [PATCH] xen/arm64: disable alignment check) Ian Campbell
2014-05-09 16:19 ` Ian Campbell
2014-05-11 18:34 ` Stefano Stabellini
2014-05-12 8:36 ` Ian Campbell
2014-05-12 9:45 ` Stefano Stabellini
2014-05-12 12:15 ` Julien Grall
2014-05-12 12:18 ` Ian Campbell
2014-05-12 13:44 ` Julien Grall [this message]
2014-05-12 14:08 ` Ian Campbell
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=5370D04C.20203@linaro.org \
--to=julien.grall@linaro.org \
--cc=Ian.Campbell@citrix.com \
--cc=david.vrabel@citrix.com \
--cc=jbeulich@suse.com \
--cc=julien.grall@citrix.com \
--cc=murzin.v@gmail.com \
--cc=stefano.stabellini@citrix.com \
--cc=tim@xen.org \
--cc=xen-devel@lists.xenproject.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.