Re: [PATCH v7 1/6] usb: chipidea: udc: add attribute aligned(4) to shared memory structs

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

 



On Wed, Mar 27, 2013 at 05:21:13PM +0100, Michael Grzeschik wrote:
> The udc uses an shared dma memory space between hard and software. This
> memory layout is described in ci13xxx_qh and ci13xxx_td which are marked
> with the attribute ((packed)).
> 
> The compiler currently does not know about the alignment of the memory
> layout, and will create strb and ldrb operations.
> 
> The Datasheet of the synopsys core describes, that some operations on
> the mapped memory need to be atomic double word operations. I.e. the
> next pointer addressing in the qhead, as otherwise the hardware could
> read wrong data and totally stuck.
> 
> This patch adds the attribute ((aligned(4))) to the structures to tell
> the compiler to use 32bit operations. It also adds an wmb() for the
> prepared TD data before it gets enqueued into the qhead.
> 
> Cc: stable <stable@xxxxxxxxxxxxxxx>

How does this (and the other patches in this series) meet the
stable_kernel_rules.txt requirements?

greg k-h
--
To unsubscribe from this list: send the line "unsubscribe stable" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Linux Kernel]     [Kernel Development Newbies]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite Hiking]     [Linux Kernel]     [Linux SCSI]