[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Xen-devel] [PATCH] xen: fix alignment for bitops



>>> On 14.04.14 at 22:43, <murzin.v@xxxxxxxxx> wrote:
>  I'd appreciate any thought how to fix it in the right way if suggest patch
>  doesn't look appropriate ;) 

Clearly by making the bitops tolerate 32-bit aligned pointers rather
than modifying common code with ugly hacks that aren't even
necessary on x86 and arm32; I don't think this would remain the
only place you'd need to alter - we simply assume bitops on 32-bit
aligned quantities to work.

Jan

> --- 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;
>       unsigned q;
>  
>       control_block = per_cpu(cpu_control_block, cpu);



_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
http://lists.xen.org/xen-devel


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.