summaryrefslogtreecommitdiffstats
path: root/arch/s390/mm/Makefile
diff options
context:
space:
mode:
authorMartin Schwidefsky <schwidefsky@de.ibm.com>2019-04-23 10:51:12 +0200
committerMartin Schwidefsky <schwidefsky@de.ibm.com>2019-04-23 16:30:03 +0200
commitd1874a0c2805fcfa9162c972d6b7541e57adb542 (patch)
treefc8e0108f91e8db9163800e724d56d4aac996c95 /arch/s390/mm/Makefile
parent6bcf74e2d15c8339f0e4a0f0613638873098e85f (diff)
downloadlinux-d1874a0c2805fcfa9162c972d6b7541e57adb542.tar.bz2
s390/mm: make the pxd_offset functions more robust
Change the way how pgd_offset, p4d_offset, pud_offset and pmd_offset walk the page tables. pgd_offset now always calculates the index for the top-level page table and adds it to the pgd, this is either a segment table offset for a 2-level setup, a region-3 offset for 3-levels, region-2 offset for 4-levels, or a region-1 offset for a 5-level setup. The other three functions p4d_offset, pud_offset and pmd_offset will only add the respective offset if they dereference the passed pointer. With the new way of walking the page tables a sequence like this from mm/gup.c now works: pgdp = pgd_offset(current->mm, addr); pgd = READ_ONCE(*pgdp); p4dp = p4d_offset(&pgd, addr); p4d = READ_ONCE(*p4dp); pudp = pud_offset(&p4d, addr); pud = READ_ONCE(*pudp); pmdp = pmd_offset(&pud, addr); pmd = READ_ONCE(*pmdp); Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
Diffstat (limited to 'arch/s390/mm/Makefile')
0 files changed, 0 insertions, 0 deletions