• Yuri Nudelman's avatar
    habanalabs: wrong VA size calculation · f06bad02
    Yuri Nudelman authored
    VA blocks are currently stored in an inconsistent way. Sometimes block
    end is inclusive, sometimes exclusive. This leads to wrong size
    calculations in certain cases, plus could lead to a segmentation fault
    in case mapping process fails in the middle and we try to roll it back.
    Need to make this consistent - start inclusive till end inclusive.
    
    For example, the regions table may now look like this:
        0x0000 - 0x1fff : allocated
        0x2000 - 0x2fff : free
        0x3000 - 0x3fff : allocated
    Signed-off-by: default avatarYuri Nudelman <ynudelman@habana.ai>
    Reviewed-by: default avatarOded Gabbay <ogabbay@kernel.org>
    Signed-off-by: default avatarOded Gabbay <ogabbay@kernel.org>
    f06bad02
memory.c 74.2 KB