From: David Vrabel <david.vrabel@citrix.com>
To: Vladimir Murzin <murzin.v@gmail.com>
Cc: Ian Campbell <ian.campbell@citrix.com>,
Stefano Stabellini <stefano.stabellini@eu.citrix.com>,
Catalin Marinas <catalin.marinas@arm.com>,
Will Deacon <will.deacon@arm.com>,
david.vrabel@citrix.com, xen-devel@lists.xenproject.org,
boris.ostrovsky@oracle.com
Subject: Re: [PATCH] xen: fix alignment for bitops
Date: Tue, 15 Apr 2014 11:17:27 +0100 [thread overview]
Message-ID: <534D0737.1060703@citrix.com> (raw)
In-Reply-To: <1397508202-16249-1-git-send-email-murzin.v@gmail.com>
On 14/04/14 21:43, Vladimir Murzin wrote:
> Bitops operations like set/clear/change mandate world aligned pointer, mainly
> because architectures specific implementation.
>
> Looks that DEFINE_PER_CPU does required alignment for cpu_control_block;
> however, local copy used for bitops might not be world aligned.
>
> Instruct compiler to keep local copy of "ready" world aligned.
[...]
> --- a/drivers/xen/events/events_fifo.c
> +++ b/drivers/xen/events/events_fifo.c
> @@ -285,7 +285,7 @@ static void consume_one_event(unsigned cpu,
> static void evtchn_fifo_handle_events(unsigned cpu)
> {
> struct evtchn_fifo_control_block *control_block;
> - uint32_t ready;
> + uint32_t __aligned(sizeof(long)) ready;
This doesn't look sufficient to me. The event words within the event
array are 32-bit sized/aligned and sync_set_bit() and sync_clear_bit()
etc. are done on these words.
I think arm64 is going to have to provide sync_clear_bit(),
sync_set_bit(), sync_test_bit() and sync_test_and_set_bit() that work
with 32-bit sized and aligned words.
David
next prev parent reply other threads:[~2014-04-15 10:17 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-04-14 20:43 [PATCH] xen: fix alignment for bitops Vladimir Murzin
2014-04-15 7:35 ` Jan Beulich
2014-04-15 8:29 ` Vladimir Murzin
2014-04-15 8:49 ` Jan Beulich
2014-04-15 9:15 ` Ian Campbell
2014-04-15 9:30 ` Vladimir Murzin
2014-04-15 9:37 ` Ian Campbell
2014-04-15 9:34 ` Jan Beulich
2014-04-15 10:17 ` David Vrabel [this message]
2014-04-15 13:05 ` Vladimir Murzin
2014-04-15 13:13 ` Vladimir Murzin
2014-04-15 13:18 ` David Vrabel
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=534D0737.1060703@citrix.com \
--to=david.vrabel@citrix.com \
--cc=boris.ostrovsky@oracle.com \
--cc=catalin.marinas@arm.com \
--cc=ian.campbell@citrix.com \
--cc=murzin.v@gmail.com \
--cc=stefano.stabellini@eu.citrix.com \
--cc=will.deacon@arm.com \
--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.