diff options
author | 2020-11-06 13:20:54 +0000 | |
---|---|---|
committer | 2020-12-09 23:48:14 +1100 | |
commit | 7bfe54b5f16561bb703de6482f880614ada8dbf2 (patch) | |
tree | 7ab5ddc8602b77cfca30f73a6bedf3edc8932c50 /tools/perf/scripts/python/export-to-postgresql.py | |
parent | powerpc/fault: Perform exception fixup in do_page_fault() (diff) | |
download | linux-dev-7bfe54b5f16561bb703de6482f880614ada8dbf2.tar.xz linux-dev-7bfe54b5f16561bb703de6482f880614ada8dbf2.zip |
powerpc/mm: Refactor the floor/ceiling check in hugetlb range freeing functions
All hugetlb range freeing functions have a verification like the following,
which only differs by the mask used, depending on the page table level.
start &= MASK;
if (start < floor)
return;
if (ceiling) {
ceiling &= MASK;
if (! ceiling)
return;
}
if (end - 1 > ceiling - 1)
return;
Refactor that into a helper function which takes the mask as
an argument, returning true when [start;end[ is not fully
contained inside [floor;ceiling[
Signed-off-by: Christophe Leroy <christophe.leroy@csgroup.eu>
Reviewed-by: Aneesh Kumar K.V <aneesh.kumar@linux.ibm.com>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Link: https://lore.kernel.org/r/16a571bb32eb6e8cd44bda484c8d81cd8a25e6d7.1604668827.git.christophe.leroy@csgroup.eu
Diffstat (limited to 'tools/perf/scripts/python/export-to-postgresql.py')
0 files changed, 0 insertions, 0 deletions