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 09:31:33AM -0700, Greg KH wrote:
> 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
                                          this should be "will" --->^^^^^

> > 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?

Beside the other patches, this one meets the requirements. I will reword
that patch, leave the "Cc: stable" in it, remove it from the others and
repost the series.

Thanks,
Michael

-- 
Pengutronix e.K.                           |                             |
Industrial Linux Solutions                 | http://www.pengutronix.de/  |
Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |
--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Linux Media]     [Linux Input]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Old Linux USB Devel Archive]

  Powered by Linux