Commit 093d7ca2 authored by Christophe Leroy's avatar Christophe Leroy Committed by Michael Ellerman

powerpc/mm: drop unused page flags

The following page flags in pte-common.h can be dropped:

_PAGE_ENDIAN is only used in mm/fsl_booke_mmu.c and is defined in
asm/nohash/32/pte-fsl-booke.h

_PAGE_4K_PFN is nowhere defined nor used

_PAGE_READ, _PAGE_WRITE and _PAGE_PTE are only defined and used
in book3s/64

The following page flags in book3s/64/pgtable.h can be dropped as
they are not used on this platform nor by common code.

_PAGE_NA, _PAGE_RO, _PAGE_USER and _PAGE_PSIZE
Reviewed-by: default avatarAneesh Kumar K.V <aneesh.kumar@linux.ibm.com>
Signed-off-by: default avatarChristophe Leroy <christophe.leroy@c-s.fr>
Signed-off-by: default avatarMichael Ellerman <mpe@ellerman.id.au>
parent 97026b5a
...@@ -14,10 +14,6 @@ ...@@ -14,10 +14,6 @@
*/ */
#define _PAGE_BIT_SWAP_TYPE 0 #define _PAGE_BIT_SWAP_TYPE 0
#define _PAGE_NA 0
#define _PAGE_RO 0
#define _PAGE_USER 0
#define _PAGE_EXEC 0x00001 /* execute permission */ #define _PAGE_EXEC 0x00001 /* execute permission */
#define _PAGE_WRITE 0x00002 /* write access allowed */ #define _PAGE_WRITE 0x00002 /* write access allowed */
#define _PAGE_READ 0x00004 /* read access allowed */ #define _PAGE_READ 0x00004 /* read access allowed */
...@@ -122,10 +118,6 @@ ...@@ -122,10 +118,6 @@
#define _PAGE_KERNEL_RO (_PAGE_PRIVILEGED | _PAGE_READ) #define _PAGE_KERNEL_RO (_PAGE_PRIVILEGED | _PAGE_READ)
#define _PAGE_KERNEL_RWX (_PAGE_PRIVILEGED | _PAGE_DIRTY | \ #define _PAGE_KERNEL_RWX (_PAGE_PRIVILEGED | _PAGE_DIRTY | \
_PAGE_RW | _PAGE_EXEC) _PAGE_RW | _PAGE_EXEC)
/*
* No page size encoding in the linux PTE
*/
#define _PAGE_PSIZE 0
/* /*
* _PAGE_CHG_MASK masks of bits that are to be preserved across * _PAGE_CHG_MASK masks of bits that are to be preserved across
* pgprot changes * pgprot changes
...@@ -149,7 +141,7 @@ ...@@ -149,7 +141,7 @@
* pages. We always set _PAGE_COHERENT when SMP is enabled or * pages. We always set _PAGE_COHERENT when SMP is enabled or
* the processor might need it for DMA coherency. * the processor might need it for DMA coherency.
*/ */
#define _PAGE_BASE_NC (_PAGE_PRESENT | _PAGE_ACCESSED | _PAGE_PSIZE) #define _PAGE_BASE_NC (_PAGE_PRESENT | _PAGE_ACCESSED)
#define _PAGE_BASE (_PAGE_BASE_NC) #define _PAGE_BASE (_PAGE_BASE_NC)
/* Permission masks used to generate the __P and __S table, /* Permission masks used to generate the __P and __S table,
......
...@@ -14,18 +14,12 @@ ...@@ -14,18 +14,12 @@
#ifndef _PAGE_EXEC #ifndef _PAGE_EXEC
#define _PAGE_EXEC 0 #define _PAGE_EXEC 0
#endif #endif
#ifndef _PAGE_ENDIAN
#define _PAGE_ENDIAN 0
#endif
#ifndef _PAGE_COHERENT #ifndef _PAGE_COHERENT
#define _PAGE_COHERENT 0 #define _PAGE_COHERENT 0
#endif #endif
#ifndef _PAGE_WRITETHRU #ifndef _PAGE_WRITETHRU
#define _PAGE_WRITETHRU 0 #define _PAGE_WRITETHRU 0
#endif #endif
#ifndef _PAGE_4K_PFN
#define _PAGE_4K_PFN 0
#endif
#ifndef _PAGE_SAO #ifndef _PAGE_SAO
#define _PAGE_SAO 0 #define _PAGE_SAO 0
#endif #endif
...@@ -39,9 +33,6 @@ ...@@ -39,9 +33,6 @@
#define _PAGE_RW 0 #define _PAGE_RW 0
#endif #endif
#ifndef _PAGE_PTE
#define _PAGE_PTE 0
#endif
/* At least one of _PAGE_PRIVILEGED or _PAGE_USER must be defined */ /* At least one of _PAGE_PRIVILEGED or _PAGE_USER must be defined */
#ifndef _PAGE_PRIVILEGED #ifndef _PAGE_PRIVILEGED
#define _PAGE_PRIVILEGED 0 #define _PAGE_PRIVILEGED 0
...@@ -122,7 +113,7 @@ static inline bool pte_user(pte_t pte) ...@@ -122,7 +113,7 @@ static inline bool pte_user(pte_t pte)
/* Mask of bits returned by pte_pgprot() */ /* Mask of bits returned by pte_pgprot() */
#define PAGE_PROT_BITS (_PAGE_GUARDED | _PAGE_COHERENT | _PAGE_NO_CACHE | \ #define PAGE_PROT_BITS (_PAGE_GUARDED | _PAGE_COHERENT | _PAGE_NO_CACHE | \
_PAGE_WRITETHRU | _PAGE_ENDIAN | _PAGE_4K_PFN | \ _PAGE_WRITETHRU | \
_PAGE_USER | _PAGE_ACCESSED | _PAGE_RO | _PAGE_NA | \ _PAGE_USER | _PAGE_ACCESSED | _PAGE_RO | _PAGE_NA | \
_PAGE_PRIVILEGED | \ _PAGE_PRIVILEGED | \
_PAGE_RW | _PAGE_HWWRITE | _PAGE_DIRTY | _PAGE_EXEC) _PAGE_RW | _PAGE_HWWRITE | _PAGE_DIRTY | _PAGE_EXEC)
...@@ -208,12 +199,6 @@ static inline bool pte_user(pte_t pte) ...@@ -208,12 +199,6 @@ static inline bool pte_user(pte_t pte)
#define PAGE_AGP (PAGE_KERNEL_NC) #define PAGE_AGP (PAGE_KERNEL_NC)
#define HAVE_PAGE_AGP #define HAVE_PAGE_AGP
#ifndef _PAGE_READ
/* if not defined, we should not find _PAGE_WRITE too */
#define _PAGE_READ 0
#define _PAGE_WRITE _PAGE_RW
#endif
#ifndef H_PAGE_4K_PFN #ifndef H_PAGE_4K_PFN
#define H_PAGE_4K_PFN 0 #define H_PAGE_4K_PFN 0
#endif #endif
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment