diff options
author | Stephen Rothwell <sfr@canb.auug.org.au> | 2015-10-21 16:53:36 +1100 |
---|---|---|
committer | Stephen Rothwell <sfr@canb.auug.org.au> | 2015-10-21 16:54:58 +1100 |
commit | 915d5c1cea69ba2622a58315ea4e6bd6920569ca (patch) | |
tree | 40aa39008e12f2ac746bfcc084c146497544e2e5 | |
parent | 2dc6c8bd4e545c5189ed55ee8a32453fb069fc35 (diff) |
Revert "powerpc/mm: add page soft dirty tracking"
This reverts commit 8bd2327907488c920e739be2df6875ed15a9e990.
Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
-rw-r--r-- | arch/powerpc/Kconfig | 2 | ||||
-rw-r--r-- | arch/powerpc/include/asm/pgtable-ppc64.h | 13 | ||||
-rw-r--r-- | arch/powerpc/include/asm/pgtable.h | 40 | ||||
-rw-r--r-- | arch/powerpc/include/asm/pte-book3e.h | 1 | ||||
-rw-r--r-- | arch/powerpc/include/asm/pte-common.h | 5 | ||||
-rw-r--r-- | arch/powerpc/include/asm/pte-hash64.h | 1 |
6 files changed, 5 insertions, 57 deletions
diff --git a/arch/powerpc/Kconfig b/arch/powerpc/Kconfig index 73a4a36a6b38..9a7057ec2154 100644 --- a/arch/powerpc/Kconfig +++ b/arch/powerpc/Kconfig @@ -559,7 +559,6 @@ choice config PPC_4K_PAGES bool "4k page size" - select HAVE_ARCH_SOFT_DIRTY if CHECKPOINT_RESTORE && PPC_BOOK3S config PPC_16K_PAGES bool "16k page size" @@ -568,7 +567,6 @@ config PPC_16K_PAGES config PPC_64K_PAGES bool "64k page size" depends on !PPC_FSL_BOOK3E && (44x || PPC_STD_MMU_64 || PPC_BOOK3E_64) - select HAVE_ARCH_SOFT_DIRTY if CHECKPOINT_RESTORE && PPC_BOOK3S config PPC_256K_PAGES bool "256k page size" diff --git a/arch/powerpc/include/asm/pgtable-ppc64.h b/arch/powerpc/include/asm/pgtable-ppc64.h index ea36398f4cd3..a0e2f861a8da 100644 --- a/arch/powerpc/include/asm/pgtable-ppc64.h +++ b/arch/powerpc/include/asm/pgtable-ppc64.h @@ -315,8 +315,7 @@ static inline void pte_clear(struct mm_struct *mm, unsigned long addr, static inline void __ptep_set_access_flags(pte_t *ptep, pte_t entry) { unsigned long bits = pte_val(entry) & - (_PAGE_DIRTY | _PAGE_ACCESSED | _PAGE_RW | _PAGE_EXEC | - _PAGE_SOFT_DIRTY); + (_PAGE_DIRTY | _PAGE_ACCESSED | _PAGE_RW | _PAGE_EXEC); #ifdef PTE_ATOMIC_UPDATES unsigned long old, tmp; @@ -355,7 +354,6 @@ static inline void __ptep_set_access_flags(pte_t *ptep, pte_t entry) * We filter HPTEFLAGS on set_pte. \ */ \ BUILD_BUG_ON(_PAGE_HPTEFLAGS & (0x1f << _PAGE_BIT_SWAP_TYPE)); \ - BUILD_BUG_ON(_PAGE_HPTEFLAGS & _PAGE_SWP_SOFT_DIRTY); \ } while (0) /* * on pte we don't need handle RADIX_TREE_EXCEPTIONAL_SHIFT; @@ -373,8 +371,6 @@ static inline void __ptep_set_access_flags(pte_t *ptep, pte_t entry) void pgtable_cache_add(unsigned shift, void (*ctor)(void *)); void pgtable_cache_init(void); - -#define _PAGE_SWP_SOFT_DIRTY (1UL << (SWP_TYPE_BITS + _PAGE_BIT_SWAP_TYPE)) #endif /* __ASSEMBLY__ */ /* @@ -387,7 +383,7 @@ void pgtable_cache_init(void); * set of bits not changed in pmd_modify. */ #define _HPAGE_CHG_MASK (PTE_RPN_MASK | _PAGE_HPTEFLAGS | _PAGE_DIRTY | \ - _PAGE_ACCESSED | _PAGE_THP_HUGE | _PAGE_SOFT_DIRTY) + _PAGE_ACCESSED | _PAGE_THP_HUGE) #ifndef __ASSEMBLY__ /* @@ -514,11 +510,6 @@ static inline pte_t *pmdp_ptep(pmd_t *pmd) #define pmd_mkyoung(pmd) pte_pmd(pte_mkyoung(pmd_pte(pmd))) #define pmd_mkwrite(pmd) pte_pmd(pte_mkwrite(pmd_pte(pmd))) -#ifdef CONFIG_HAVE_ARCH_SOFT_DIRTY -#define pmd_soft_dirty(pmd) pte_soft_dirty(pmd_pte(pmd)) -#define pmd_mksoft_dirty(pmd) pte_pmd(pte_mksoft_dirty(pmd_pte(pmd))) -#endif /* CONFIG_HAVE_ARCH_SOFT_DIRTY */ - #define __HAVE_ARCH_PMD_WRITE #define pmd_write(pmd) pte_write(pmd_pte(pmd)) diff --git a/arch/powerpc/include/asm/pgtable.h b/arch/powerpc/include/asm/pgtable.h index 9f1bc8a58ba4..b64b4212b71f 100644 --- a/arch/powerpc/include/asm/pgtable.h +++ b/arch/powerpc/include/asm/pgtable.h @@ -38,44 +38,6 @@ static inline int pte_special(pte_t pte) { return pte_val(pte) & _PAGE_SPECIAL; static inline int pte_none(pte_t pte) { return (pte_val(pte) & ~_PTE_NONE_MASK) == 0; } static inline pgprot_t pte_pgprot(pte_t pte) { return __pgprot(pte_val(pte) & PAGE_PROT_BITS); } -#ifdef CONFIG_HAVE_ARCH_SOFT_DIRTY -static inline int pte_soft_dirty(pte_t pte) -{ - return pte_val(pte) & _PAGE_SOFT_DIRTY; -} -static inline pte_t pte_mksoft_dirty(pte_t pte) -{ - pte_val(pte) |= _PAGE_SOFT_DIRTY; - return pte; -} - -static inline pte_t pte_swp_mksoft_dirty(pte_t pte) -{ - pte_val(pte) |= _PAGE_SWP_SOFT_DIRTY; - return pte; -} -static inline int pte_swp_soft_dirty(pte_t pte) -{ - return pte_val(pte) & _PAGE_SWP_SOFT_DIRTY; -} -static inline pte_t pte_swp_clear_soft_dirty(pte_t pte) -{ - pte_val(pte) &= ~_PAGE_SWP_SOFT_DIRTY; - return pte; -} - -static inline pte_t pte_clear_flags(pte_t pte, pte_basic_t clear) -{ - pte_val(pte) &= ~clear; - return pte; -} -static inline pmd_t pmd_clear_flags(pmd_t pmd, unsigned long clear) -{ - pmd_val(pmd) &= ~clear; - return pmd; -} -#endif /* CONFIG_HAVE_ARCH_SOFT_DIRTY */ - #ifdef CONFIG_NUMA_BALANCING /* * These work without NUMA balancing but the kernel does not care. See the @@ -127,7 +89,7 @@ static inline pte_t pte_mkwrite(pte_t pte) { pte_val(pte) &= ~_PAGE_RO; pte_val(pte) |= _PAGE_RW; return pte; } static inline pte_t pte_mkdirty(pte_t pte) { - pte_val(pte) |= _PAGE_DIRTY | _PAGE_SOFT_DIRTY; return pte; } + pte_val(pte) |= _PAGE_DIRTY; return pte; } static inline pte_t pte_mkyoung(pte_t pte) { pte_val(pte) |= _PAGE_ACCESSED; return pte; } static inline pte_t pte_mkspecial(pte_t pte) { diff --git a/arch/powerpc/include/asm/pte-book3e.h b/arch/powerpc/include/asm/pte-book3e.h index df5581f817f6..8d8473278d91 100644 --- a/arch/powerpc/include/asm/pte-book3e.h +++ b/arch/powerpc/include/asm/pte-book3e.h @@ -57,7 +57,6 @@ #define _PAGE_HASHPTE 0 #define _PAGE_BUSY 0 -#define _PAGE_SOFT_DIRTY 0 #define _PAGE_SPECIAL _PAGE_SW0 diff --git a/arch/powerpc/include/asm/pte-common.h b/arch/powerpc/include/asm/pte-common.h index 1bf670996df5..71537a319fc8 100644 --- a/arch/powerpc/include/asm/pte-common.h +++ b/arch/powerpc/include/asm/pte-common.h @@ -94,14 +94,13 @@ extern unsigned long bad_call_to_PMD_PAGE_SIZE(void); * pgprot changes */ #define _PAGE_CHG_MASK (PTE_RPN_MASK | _PAGE_HPTEFLAGS | _PAGE_DIRTY | \ - _PAGE_ACCESSED | _PAGE_SPECIAL | _PAGE_SOFT_DIRTY) + _PAGE_ACCESSED | _PAGE_SPECIAL) /* Mask of bits returned by pte_pgprot() */ #define PAGE_PROT_BITS (_PAGE_GUARDED | _PAGE_COHERENT | _PAGE_NO_CACHE | \ _PAGE_WRITETHRU | _PAGE_ENDIAN | _PAGE_4K_PFN | \ _PAGE_USER | _PAGE_ACCESSED | _PAGE_RO | \ - _PAGE_RW | _PAGE_HWWRITE | _PAGE_DIRTY | \ - _PAGE_EXEC | _PAGE_SOFT_DIRTY) + _PAGE_RW | _PAGE_HWWRITE | _PAGE_DIRTY | _PAGE_EXEC) /* * We define 2 sets of base prot bits, one for basic pages (ie, diff --git a/arch/powerpc/include/asm/pte-hash64.h b/arch/powerpc/include/asm/pte-hash64.h index 19ffd150957f..ef612c160da7 100644 --- a/arch/powerpc/include/asm/pte-hash64.h +++ b/arch/powerpc/include/asm/pte-hash64.h @@ -19,7 +19,6 @@ #define _PAGE_BIT_SWAP_TYPE 2 #define _PAGE_EXEC 0x0004 /* No execute on POWER4 and newer (we invert) */ #define _PAGE_GUARDED 0x0008 -#define _PAGE_SOFT_DIRTY 0x0010 /* software dirty tracking */ /* We can derive Memory coherence from _PAGE_NO_CACHE */ #define _PAGE_NO_CACHE 0x0020 /* I: cache inhibit */ #define _PAGE_WRITETHRU 0x0040 /* W: cache write-through */ |