linux/arch
Gerald Schaefer bc29b7ac1d s390/mm: clean up pte/pmd encoding
The hugetlbfs pte<->pmd conversion functions currently assume that the pmd
bit layout is consistent with the pte layout, which is not really true.

The SW read and write bits are encoded as the sequence "wr" in a pte, but
in a pmd it is "rw". The hugetlbfs conversion assumes that the sequence
is identical in both cases, which results in swapped read and write bits
in the pmd. In practice this is not a problem, because those pmd bits are
only relevant for THP pmds and not for hugetlbfs pmds. The hugetlbfs code
works on (fake) ptes, and the converted pte bits are correct.

There is another variation in pte/pmd encoding which affects dirty
prot-none ptes/pmds. In this case, a pmd has both its HW read-only and
invalid bit set, while it is only the invalid bit for a pte. This also has
no effect in practice, but it should better be consistent.

This patch fixes both inconsistencies by changing the SW read/write bit
layout for pmds as well as the PAGE_NONE encoding for ptes. It also makes
the hugetlbfs conversion functions more robust by introducing a
move_set_bit() macro that uses the pte/pmd bit #defines instead of
constant shifts.

Signed-off-by: Gerald Schaefer <gerald.schaefer@de.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
2016-07-31 05:27:57 -04:00
..
alpha mm: do not pass mm_struct into handle_mm_fault 2016-07-26 16:19:19 -07:00
arc DeviceTree update for 4.8: 2016-07-30 11:32:01 -07:00
arm DeviceTree update for 4.8: 2016-07-30 11:32:01 -07:00
arm64 DeviceTree update for 4.8: 2016-07-30 11:32:01 -07:00
avr32 Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/egtvedt/linux-avr32 2016-07-29 13:09:55 -07:00
blackfin Merge branch 'smp-hotplug-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip 2016-07-29 13:55:30 -07:00
c6x
cris DeviceTree update for 4.8: 2016-07-30 11:32:01 -07:00
frv mm: do not pass mm_struct into handle_mm_fault 2016-07-26 16:19:19 -07:00
h8300
hexagon Merge branch 'akpm' (patches from Andrew) 2016-07-26 19:55:54 -07:00
ia64 Merge branch 'akpm' (patches from Andrew) 2016-07-26 19:55:54 -07:00
m32r mm: do not pass mm_struct into handle_mm_fault 2016-07-26 16:19:19 -07:00
m68k mm: do not pass mm_struct into handle_mm_fault 2016-07-26 16:19:19 -07:00
metag DeviceTree update for 4.8: 2016-07-30 11:32:01 -07:00
microblaze Merge branch 'akpm' (patches from Andrew) 2016-07-26 19:55:54 -07:00
mips DeviceTree update for 4.8: 2016-07-30 11:32:01 -07:00
mn10300 mm: do not pass mm_struct into handle_mm_fault 2016-07-26 16:19:19 -07:00
nios2 DeviceTree update for 4.8: 2016-07-30 11:32:01 -07:00
openrisc Merge branch 'akpm' (patches from Andrew) 2016-07-26 19:55:54 -07:00
parisc Merge branch 'next' of git://git.kernel.org/pub/scm/linux/kernel/git/jmorris/linux-security 2016-07-29 17:38:46 -07:00
powerpc powerpc updates for 4.8 # 1 2016-07-30 21:01:36 -07:00
s390 s390/mm: clean up pte/pmd encoding 2016-07-31 05:27:57 -04:00
score mm: do not pass mm_struct into handle_mm_fault 2016-07-26 16:19:19 -07:00
sh DeviceTree update for 4.8: 2016-07-30 11:32:01 -07:00
sparc sparc64: Trim page tables for 8M hugepages 2016-07-29 10:49:16 -07:00
tile Merge branch 'next' of git://git.kernel.org/pub/scm/linux/kernel/git/jmorris/linux-security 2016-07-29 17:38:46 -07:00
um Merge branch 'next' of git://git.kernel.org/pub/scm/linux/kernel/git/jmorris/linux-security 2016-07-29 17:38:46 -07:00
unicore32 New LED class driver: 2016-07-27 14:03:52 -07:00
x86 Merge branch 'x86-microcode-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip 2016-07-30 13:18:33 -07:00
xtensa DeviceTree update for 4.8: 2016-07-30 11:32:01 -07:00
.gitignore
Kconfig