Thread (6 messages) flat view 6 messages, 3 authors, 2002-06-08

Re: [linux-usb-devel] USB on PPC440GP (cache incoherent)

From: Roland Dreier <hidden>
Date: 2002-06-08 20:43:26

quoted
quoted
quoted
quoted
"Oliver" == Oliver Neukum [off-list ref] 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/
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help