[linux-usb-devel] USB on PPC440GP (cache incoherent)
Roland Dreier
roland at topspin.com
Sun Jun 9 06:43:26 EST 2002
>>>>> "Oliver" == Oliver Neukum <Oliver.Neukum at lrz.uni-muenchen.de> writes:
Oliver> This can be used in error handling by storage devices. You
Oliver> must use GFP_NOIO. And you should check for a failure due
Oliver> to OOM.
Yep, I caught those missed checks for allocation failure. And I will
change to using GFP_NOIO where appropriate.
Roland> - srb->request_buffer = srb->sense_buffer;
Roland> + srb->request_buffer = kmalloc(18, in_interrupt() ? GFP_ATOMIC :
Oliver> However, why do you do this ? The srb is kmalloced.
Yes, but srb->sense_buffer is not aligned on a cache line boundary.
My feeling is that this could corrupt the rest of the cache line,
though others have questioned whether this is strictly necessary. I
just posted a question on lkml to try to and get an authoritative
answer on DMA into unaligned buffers is OK.
Thanks for the comments,
Roland
** Sent via the linuxppc-embedded mail list. See http://lists.linuxppc.org/
More information about the Linuxppc-embedded
mailing list