• Oded Gabbay's avatar
    habanalabs: fix bug in checking huge page optimization · d7241701
    Oded Gabbay authored
    This patch fix a bug in the mmu code that checks whether we can use huge
    page mappings for host pages.
    
    The code is supposed to enable huge page mappings only if ALL DMA
    addresses are aligned to 2MB AND the number of pages in each DMA chunk is
    a modulo of the number of pages in 2MB. However, the code ignored the
    first requirement for the first DMA chunk.
    
    This patch fix that issue by making sure the requirement of address
    alignment is validated against all DMA chunks.
    Signed-off-by: default avatarOded Gabbay <oded.gabbay@gmail.com>
    d7241701
memory.c 44 KB