Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

powerpc: Finally remove _PAGE_USER

_PAGE_USER is now gone on all targets. Remove it completely.

Signed-off-by: Christophe Leroy <christophe.leroy@csgroup.eu>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Link: https://msgid.link/76ebe74fdaed4297a1d8203a61174650c1d8d278.1695659959.git.christophe.leroy@csgroup.eu

authored by

Christophe Leroy and committed by
Michael Ellerman
163a72fa ceaba662

+3 -7
+3 -7
arch/powerpc/include/asm/nohash/pgtable.h
··· 182 182 } 183 183 184 184 /* 185 - * Don't just check for any non zero bits in __PAGE_USER, since for book3e 185 + * Don't just check for any non zero bits in __PAGE_READ, since for book3e 186 186 * and PTE_64BIT, PAGE_KERNEL_X contains _PAGE_BAP_SR which is also in 187 - * _PAGE_USER. Need to explicitly match _PAGE_BAP_UR bit in that case too. 187 + * _PAGE_READ. Need to explicitly match _PAGE_BAP_UR bit in that case too. 188 188 */ 189 189 #ifndef pte_read 190 190 static inline bool pte_read(pte_t pte) 191 191 { 192 - #ifdef _PAGE_READ 193 192 return (pte_val(pte) & _PAGE_READ) == _PAGE_READ; 194 - #else 195 - return (pte_val(pte) & _PAGE_USER) == _PAGE_USER; 196 - #endif 197 193 } 198 194 #endif 199 195 ··· 201 205 static inline bool pte_access_permitted(pte_t pte, bool write) 202 206 { 203 207 /* 204 - * A read-only access is controlled by _PAGE_USER bit. 208 + * A read-only access is controlled by _PAGE_READ bit. 205 209 * We have _PAGE_READ set for WRITE and EXECUTE 206 210 */ 207 211 if (!pte_present(pte) || !pte_read(pte))