1
0
Fork 0
alistair23-linux/arch
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
..
alpha Kbuild updates for v5.1 (2nd) 2019-03-17 13:25:26 -07:00
arc ARC updates for 5.1-rc2 2019-03-20 11:01:52 -07:00
arm i.MX fixes for 5.1: 2019-03-25 17:06:41 +01:00
arm64 arm64: tegra: Disable CQE Support for SDMMC4 on Tegra186 2019-03-25 17:12:20 +01:00
c6x kbuild: force all architectures except um to include mandatory-y 2019-03-17 12:56:32 +09:00
csky kbuild: force all architectures except um to include mandatory-y 2019-03-17 12:56:32 +09:00
h8300 kbuild: force all architectures except um to include mandatory-y 2019-03-17 12:56:32 +09:00
hexagon kbuild: force all architectures except um to include mandatory-y 2019-03-17 12:56:32 +09:00
ia64 Kbuild updates for v5.1 (2nd) 2019-03-17 13:25:26 -07:00
m68k kbuild: force all architectures except um to include mandatory-y 2019-03-17 12:56:32 +09:00
microblaze Kbuild updates for v5.1 (2nd) 2019-03-17 13:25:26 -07:00
mips A small batch of MIPS fixes for 5.1: 2019-03-19 10:50:15 -07:00
nds32 kbuild: force all architectures except um to include mandatory-y 2019-03-17 12:56:32 +09:00
nios2 kbuild: force all architectures except um to include mandatory-y 2019-03-17 12:56:32 +09:00
openrisc kbuild: force all architectures except um to include mandatory-y 2019-03-17 12:56:32 +09:00
parisc Kbuild updates for v5.1 (2nd) 2019-03-17 13:25:26 -07:00
powerpc Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net 2019-03-27 12:22:57 -07:00
riscv kbuild: force all architectures except um to include mandatory-y 2019-03-17 12:56:32 +09:00
s390 s390/mm: make the pxd_offset functions more robust 2019-04-23 16:30:03 +02:00
sh kbuild: force all architectures except um to include mandatory-y 2019-03-17 12:56:32 +09:00
sparc Kbuild updates for v5.1 (2nd) 2019-03-17 13:25:26 -07:00
um Merge branch 'for-linus-5.1-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/rw/uml 2019-03-15 15:07:32 -07:00
unicore32 kbuild: force all architectures except um to include mandatory-y 2019-03-17 12:56:32 +09:00
x86 x86/gart: Exclude GART aperture from kcore 2019-03-23 12:11:49 +01:00
xtensa kbuild: force all architectures except um to include mandatory-y 2019-03-17 12:56:32 +09:00
.gitignore
Kconfig Char/Misc driver patches for 5.1-rc1 2019-03-06 14:18:59 -08:00