[U-Boot] [PATCH] USB:host: Attribute packed removed from usb structures

Amit Virdi amit.virdi at st.com
Wed Mar 7 09:23:42 CET 2012


Mike,

>>
>> I did the changes suggested by you and tested the build. The issue
>> didn't come up. Then I reverted the code to the original (attributes
>> retained and ehci directly de-referencing the pointers. The issue didn't
>> come here too.
>>
>> Today, I used armv7-linux-gcc (GCC) v4.6.2
>> So I suspect there has been some fix done in the GCC.
>>
>> Now, even with the packed attributes, the word fields are accessed
>> word-by-word in contrast to the earlier observed behavior
>> (byte-by-byte). I could see ldr and str in the disassembly.
>>
>> May be, we can discard this patch and keep drivers/usb/host/ehci.h intact.
>
> not sure ... in general, device registers should be accessed with io.h helpers
> instead of dereferenced by volatile pointers.  i can think of cases on Blackfin
> where the io.h helpers would be required, and even using volatile pointers
> could result in misbehavior.

If you guys agree, I can float the patch but how can we distribute the 
responsibility for testing on other architectures?

Thanks
Amit Virdi


More information about the U-Boot mailing list