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

Configure Feed

Select the types of activity you want to include in your feed.

powerpc/8xx: Modify ptep_get()

Move ptep_get() close to pte_update(), in an ifdef section already
dedicated to powerpc 8xx. This section contains explanation about
the layout of page table entries.

Also modify it to return 4 times the pte value instead of padding
with zeroes.

Signed-off-by: Christophe Leroy <christophe.leroy@csgroup.eu>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Link: https://lore.kernel.org/r/9f2df6621fcaf9eba15fadc61c169d0c8e2fb849.1592481938.git.christophe.leroy@csgroup.eu

authored by

Christophe Leroy and committed by
Michael Ellerman
105fb381 86590e52

+12 -10
+12 -10
arch/powerpc/include/asm/nohash/32/pgtable.h
··· 249 249 250 250 return old; 251 251 } 252 + 253 + #ifdef CONFIG_PPC_16K_PAGES 254 + #define __HAVE_ARCH_PTEP_GET 255 + static inline pte_t ptep_get(pte_t *ptep) 256 + { 257 + pte_basic_t val = READ_ONCE(ptep->pte); 258 + pte_t pte = {val, val, val, val}; 259 + 260 + return pte; 261 + } 262 + #endif /* CONFIG_PPC_16K_PAGES */ 263 + 252 264 #else 253 265 static inline pte_basic_t pte_update(struct mm_struct *mm, unsigned long addr, pte_t *p, 254 266 unsigned long clr, unsigned long set, int huge) ··· 295 283 { 296 284 return __pte(pte_update(mm, addr, ptep, ~0, 0, 0)); 297 285 } 298 - 299 - #if defined(CONFIG_PPC_8xx) && defined(CONFIG_PPC_16K_PAGES) 300 - #define __HAVE_ARCH_PTEP_GET 301 - static inline pte_t ptep_get(pte_t *ptep) 302 - { 303 - pte_t pte = {READ_ONCE(ptep->pte), 0, 0, 0}; 304 - 305 - return pte; 306 - } 307 - #endif 308 286 309 287 #define __HAVE_ARCH_PTEP_SET_WRPROTECT 310 288 static inline void ptep_set_wrprotect(struct mm_struct *mm, unsigned long addr,