1
0
Fork 0
alistair23-linux/arch/s390
Martin Schwidefsky d1874a0c28 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>
2019-04-23 16:30:03 +02:00
..
appldata sched: loadavg: consolidate LOAD_INT, LOAD_FRAC, CALC_LOAD 2018-10-26 16:26:32 -07:00
boot s390/protvirt: block kernel command line alteration 2019-04-10 17:47:22 +02:00
configs fscrypt: remove filesystem specific build config option 2019-01-23 23:56:43 -05:00
crypto crypto: clarify name of WEAK_KEY request flag 2019-01-25 18:41:52 +08:00
hypfs s390/hypfs: no need to check return value of debugfs_create functions 2019-01-28 15:58:54 +01:00
include s390/mm: make the pxd_offset functions more robust 2019-04-23 16:30:03 +02:00
kernel s390: Convert IS_ENABLED uses to __is_defined 2019-04-11 13:36:53 +02:00
kvm ARM: some cleanups, direct physical timer assignment, cache sanitization 2019-03-15 15:00:28 -07:00
lib s390/kasan: improve string/memory functions checks 2019-01-18 09:34:18 +01:00
mm s390/mm: make the pxd_offset functions more robust 2019-04-23 16:30:03 +02:00
net s390: Convert IS_ENABLED uses to __is_defined 2019-04-11 13:36:53 +02:00
numa treewide: add checks for the return value of memblock_alloc*() 2019-03-12 10:04:02 -07:00
oprofile License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
pci s390 updates for the 5.1 merge window 2019-03-05 11:13:10 -08:00
purgatory s390: clean up stacks setup 2018-09-20 13:20:29 +02:00
scripts s390: make chkbss work with clang 2019-04-11 13:36:52 +02:00
tools kbuild: use assignment instead of define ... endef for filechk_* rules 2019-01-06 10:22:35 +09:00
Kbuild s390/kexec_file: Add purgatory 2018-04-16 09:10:22 +02:00
Kconfig s390: don't build vdso32 with clang 2019-04-11 13:36:49 +02:00
Kconfig.debug Kconfig: consolidate the "Kernel hacking" menu 2018-08-02 08:06:48 +09:00
Makefile s390: remove -fno-strength-reduce flag 2019-04-11 13:36:46 +02:00
defconfig s390: update defconfigs 2018-11-05 15:10:27 +01:00