linux-stable/arch/powerpc
Christophe Leroy b1b93cb7e7 powerpc/nohash: Fix __ptep_set_access_flags() and ptep_set_wrprotect()
Commit 26973fa5ac ("powerpc/mm: use pte helpers in generic code")
changed those two functions to use pte helpers to determine which
bits to clear and which bits to set.

This change was based on the assumption that bits to be set/cleared
are always the same and can be determined by applying the pte
manipulation helpers on __pte(0).

But on platforms like book3e, the bits depend on whether the page
is a user page or not.

For the time being it more or less works because of _PAGE_EXEC being
used for user pages only and exec right being set at all time on
kernel page. But following patch will clean that and output of
pte_mkexec() will depend on the page being a user or kernel page.

Instead of trying to make an even more complicated helper where bits
would become dependent on the final pte value, come back to a more
static situation like before commit 26973fa5ac ("powerpc/mm: use
pte helpers in generic code"), by introducing an 8xx specific
version of __ptep_set_access_flags() and ptep_set_wrprotect().

Fixes: 26973fa5ac ("powerpc/mm: use pte helpers in generic code")
Signed-off-by: Christophe Leroy <christophe.leroy@csgroup.eu>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Link: https://lore.kernel.org/r/922bdab3a220781bae2360ff3dd5adb7fe4d34f1.1635226743.git.christophe.leroy@csgroup.eu
2021-10-28 00:41:28 +11:00
..
boot powerpc/boot: Set LC_ALL=C in wrapper script 2021-10-27 22:31:22 +11:00
configs powerpc/64s: Default to 64K pages for 64 bit book3s 2021-10-27 22:31:22 +11:00
crypto
include powerpc/nohash: Fix __ptep_set_access_flags() and ptep_set_wrprotect() 2021-10-28 00:41:28 +11:00
kernel powerpc/64s/interrupt: Fix check_return_regs_valid() false positive 2021-10-27 22:33:47 +11:00
kexec powerpc/machdep: Remove stale functions from ppc_md structure 2021-10-22 15:22:05 +11:00
kvm powerpc/asm: Remove UPD_CONSTR after GCC 4.9 removal 2021-10-09 00:15:59 +11:00
lib powerpc/lib/sstep: Don't use __{get/put}_user() on kernel addresses 2021-10-22 15:22:05 +11:00
math-emu powerpc/64s: avoid reloading (H)SRR registers if they are still valid 2021-06-25 00:06:55 +10:00
mm powerpc/32: Don't use a struct based type for pte_t 2021-10-22 15:22:06 +11:00
net powerpc/bpf: Fix write protecting JIT code 2021-10-28 00:08:32 +11:00
perf powerpc/perf: Fix cycles/instructions as PM_CYC/PM_INST_CMPL in power10 2021-10-14 21:46:45 +11:00
platforms powerpc/pseries/mobility: ignore ibm, platform-facilities updates 2021-10-22 15:22:06 +11:00
purgatory powerpc/kexec: Don't use .machine ppc64 in trampoline_64.S 2021-04-08 21:17:43 +10:00
sysdev powerpc/xics: Set the IRQ chip data for the ICS native backend 2021-09-15 22:05:53 +10:00
tools powerpc/head_check: Fix shellcheck errors 2021-08-17 22:52:02 +10:00
xmon powerpc: Refactor verification of MSR_RI 2021-08-26 21:21:07 +10:00
Kbuild
Kconfig powerpc/64s: Default to 64K pages for 64 bit book3s 2021-10-27 22:31:22 +11:00
Kconfig.debug powerpc/ptdump: Convert powerpc to GENERIC_PTDUMP 2021-08-25 13:35:48 +10:00
Makefile powerpc: Add "-z notext" flag to disable diagnostic 2021-08-15 13:49:39 +10:00
Makefile.postlink