]> git.proxmox.com Git - mirror_ubuntu-kernels.git/commitdiff
parisc: Convert PTE lookup to use extru_safe() macro
authorHelge Deller <deller@gmx.de>
Fri, 19 Nov 2021 21:20:14 +0000 (22:20 +0100)
committerHelge Deller <deller@gmx.de>
Mon, 22 Nov 2021 06:37:31 +0000 (07:37 +0100)
Convert the PTE lookup functions to use the safer extru_safe macro.

Signed-off-by: Helge Deller <deller@gmx.de>
arch/parisc/kernel/entry.S

index 88c188a965d86f23f5df390c831cdd601c574aee..6e9cdb26986282466a9ec5ba62e0613f9129de9f 100644 (file)
         */
        .macro          L2_ptep pmd,pte,index,va,fault
 #if CONFIG_PGTABLE_LEVELS == 3
-       extru           \va,31-ASM_PMD_SHIFT,ASM_BITS_PER_PMD,\index
+       extru_safe      \va,31-ASM_PMD_SHIFT,ASM_BITS_PER_PMD,\index
 #else
-# if defined(CONFIG_64BIT)
-       extrd,u         \va,63-ASM_PGDIR_SHIFT,ASM_BITS_PER_PGD,\index
-  #else
-  # if PAGE_SIZE > 4096
-       extru           \va,31-ASM_PGDIR_SHIFT,32-ASM_PGDIR_SHIFT,\index
-  # else
-       extru           \va,31-ASM_PGDIR_SHIFT,ASM_BITS_PER_PGD,\index
-  # endif
-# endif
+       extru_safe      \va,31-ASM_PGDIR_SHIFT,ASM_BITS_PER_PGD,\index
 #endif
        dep             %r0,31,PAGE_SHIFT,\pmd  /* clear offset */
 #if CONFIG_PGTABLE_LEVELS < 3
        bb,>=,n         \pmd,_PxD_PRESENT_BIT,\fault
        dep             %r0,31,PxD_FLAG_SHIFT,\pmd /* clear flags */
        SHLREG          \pmd,PxD_VALUE_SHIFT,\pmd
-       extru           \va,31-PAGE_SHIFT,ASM_BITS_PER_PTE,\index
+       extru_safe      \va,31-PAGE_SHIFT,ASM_BITS_PER_PTE,\index
        dep             %r0,31,PAGE_SHIFT,\pmd  /* clear offset */
        shladd          \index,BITS_PER_PTE_ENTRY,\pmd,\pmd /* pmd is now pte */
        .endm