Commit ae9a71af authored by Aneesh Kumar K.V's avatar Aneesh Kumar K.V Committed by Michael Ellerman

powerpc/mm: Don't have conditional defines for real_pte_t

We remove real_pte_t out of STRICT_MM_TYPESCHECK.
Reviewed-by: default avatarPaul Mackerras <paulus@samba.org>
Signed-off-by: default avatarAneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com>
Signed-off-by: default avatarMichael Ellerman <mpe@ellerman.id.au>
parent 2bf59916
...@@ -43,13 +43,8 @@ ...@@ -43,13 +43,8 @@
*/ */
#ifndef __real_pte #ifndef __real_pte
#ifdef CONFIG_STRICT_MM_TYPECHECKS
#define __real_pte(e,p) ((real_pte_t){(e)}) #define __real_pte(e,p) ((real_pte_t){(e)})
#define __rpte_to_pte(r) ((r).pte) #define __rpte_to_pte(r) ((r).pte)
#else
#define __real_pte(e,p) (e)
#define __rpte_to_pte(r) (__pte(r))
#endif
#define __rpte_to_hidx(r,index) (pte_val(__rpte_to_pte(r)) >>_PAGE_F_GIX_SHIFT) #define __rpte_to_hidx(r,index) (pte_val(__rpte_to_pte(r)) >>_PAGE_F_GIX_SHIFT)
#define pte_iterate_hashed_subpages(rpte, psize, va, index, shift) \ #define pte_iterate_hashed_subpages(rpte, psize, va, index, shift) \
......
...@@ -12,15 +12,6 @@ static inline pte_basic_t pte_val(pte_t x) ...@@ -12,15 +12,6 @@ static inline pte_basic_t pte_val(pte_t x)
return x.pte; return x.pte;
} }
/* 64k pages additionally define a bigger "real PTE" type that gathers
* the "second half" part of the PTE for pseudo 64k pages
*/
#if defined(CONFIG_PPC_64K_PAGES) && defined(CONFIG_PPC_STD_MMU_64)
typedef struct { pte_t pte; unsigned long hidx; } real_pte_t;
#else
typedef struct { pte_t pte; } real_pte_t;
#endif
/* PMD level */ /* PMD level */
#ifdef CONFIG_PPC64 #ifdef CONFIG_PPC64
typedef struct { unsigned long pmd; } pmd_t; typedef struct { unsigned long pmd; } pmd_t;
...@@ -67,13 +58,6 @@ static inline pte_basic_t pte_val(pte_t pte) ...@@ -67,13 +58,6 @@ static inline pte_basic_t pte_val(pte_t pte)
return pte; return pte;
} }
#if defined(CONFIG_PPC_64K_PAGES) && defined(CONFIG_PPC_STD_MMU_64)
typedef struct { pte_t pte; unsigned long hidx; } real_pte_t;
#else
typedef pte_t real_pte_t;
#endif
#ifdef CONFIG_PPC64 #ifdef CONFIG_PPC64
typedef unsigned long pmd_t; typedef unsigned long pmd_t;
#define __pmd(x) (x) #define __pmd(x) (x)
...@@ -103,6 +87,14 @@ typedef unsigned long pgprot_t; ...@@ -103,6 +87,14 @@ typedef unsigned long pgprot_t;
#define pgprot_val(x) (x) #define pgprot_val(x) (x)
#define __pgprot(x) (x) #define __pgprot(x) (x)
#endif /* CONFIG_STRICT_MM_TYPECHECKS */
/*
* With hash config 64k pages additionally define a bigger "real PTE" type that
* gathers the "second half" part of the PTE for pseudo 64k pages
*/
#if defined(CONFIG_PPC_64K_PAGES) && defined(CONFIG_PPC_STD_MMU_64)
typedef struct { pte_t pte; unsigned long hidx; } real_pte_t;
#else
typedef struct { pte_t pte; } real_pte_t;
#endif #endif
#endif /* _ASM_POWERPC_PGTABLE_TYPES_H */ #endif /* _ASM_POWERPC_PGTABLE_TYPES_H */
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