[lkml]   [2009]   [May]   [21]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
    SubjectRe: [PATCH V2 2/3] powerpc: Add support for swiotlb on 32-bit
    On Thu, 2009-05-21 at 16:18 -0400, Jeremy Fitzhardinge wrote:
    > I guess the test is checking for a bad implementation of map_single().

    More importantly the io_tlb_overflow_buffer is basically a second chance
    if you exhaust the swiotlb pool. The check seems to be there to ensure
    that the second chance memory is suitable for the device (it's hard to
    imagine, but possible I suppose, that it wouldn't be), a bad
    implementation of map_single() is a secondary concern I suspect.

    If all the callers of map_page did proper error handling this would all
    be unnecessary. I guess someone was worried, at least at one point, that
    they didn't. The failure case could possibly be scribbling into a random
    memory location or more worryingly sprinkling random memory locations
    onto your disk or whatever. That said I'd imagine that map_page
    returning NULL would cause an oops long before anything tried to DMA
    anything and the second chance probably doesn't buy us much in practice.


     \ /
      Last update: 2009-05-22 00:11    [W:0.040 / U:22.952 seconds]
    ©2003-2017 Jasper Spaans. hosted at Digital OceanAdvertise on this site