• Alex Elder's avatar
    net: ipa: use a separate pointer for adjusted GSI memory · 571b1e7e
    Alex Elder authored
    This patch actually fixes a bug, though it doesn't affect the two
    platforms supported currently.  The fix implements GSI memory
    pointers a bit differently.
    
    For IPA version 4.5 and above, the address space for almost all GSI
    registers is adjusted downward by a fixed amount.  This is currently
    handled by adjusting the I/O virtual address pointer after it has
    been mapped.  The bug is that the pointer is not "de-adjusted" as it
    should be when it's unmapped.
    
    This patch fixes that error, but it does so by maintaining one "raw"
    pointer for the mapped memory range.  This is assigned when the
    memory is mapped and used to unmap the memory.  This pointer is also
    used to access the two registers that do *not* sit in the "adjusted"
    memory space.
    
    Rather than adjusting *that* pointer, we maintain a separate pointer
    that's an adjusted copy of the "raw" pointer, and that is used for
    most GSI register accesses.
    Signed-off-by: default avatarAlex Elder <elder@linaro.org>
    Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
    571b1e7e
gsi.h 8.29 KB