• David Gibson's avatar
    [PATCH] powerpc: More hugepage boundary case fixes · 9a94c579
    David Gibson authored
    Blah.  The patch [0] I recently sent fixing errors with
    in_hugepage_area() and prepare_hugepage_range() for powerpc itself has
    an off-by-one bug.  Furthermore, the related functions
    touches_hugepage_*_range() and within_hugepage_*_range() are also
    buggy.  Some of the bugs, like those addressed in [0] originated with
    commit 7d24f0b8 where we tweaked the
    semantics of where hugepages are allowed.  Other bugs have been there
    essentially forever, and are due to the undefined behaviour of '<<'
    with shift counts greater than the type width (LOW_ESID_MASK could
    return non-zero for high ranges with the right congruences).
    
    The good news is that I now have a testsuite which should pick up
    things like this if they creep in again.
    
    [0] "powerpc-fix-for-hugepage-areas-straddling-4gb-boundary"
    Signed-off-by: default avatarDavid Gibson <david@gibson.dropbear.id.au>
    Signed-off-by: default avatarPaul Mackerras <paulus@samba.org>
    9a94c579
page_64.h 5.46 KB