aboutsummaryrefslogtreecommitdiffstats
path: root/include/asm-powerpc
diff options
context:
space:
mode:
authorMartin Schwidefsky <schwidefsky@de.ibm.com>2007-07-17 07:03:03 -0400
committerLinus Torvalds <torvalds@woody.linux-foundation.org>2007-07-17 13:22:59 -0400
commite21ea246bce5bb93dd822de420172ec280aed492 (patch)
treed624d1257728d8d869d54420c83d4bf4c4e19189 /include/asm-powerpc
parentf0e47c229b489e37ba7e4159ef7f9cf9ccd44e19 (diff)
mm: remove ptep_test_and_clear_dirty and ptep_clear_flush_dirty
Nobody is using ptep_test_and_clear_dirty and ptep_clear_flush_dirty. Remove the functions from all architectures. Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com> Cc: Hugh Dickins <hugh@veritas.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'include/asm-powerpc')
-rw-r--r--include/asm-powerpc/pgtable-ppc32.h7
-rw-r--r--include/asm-powerpc/pgtable-ppc64.h31
2 files changed, 0 insertions, 38 deletions
diff --git a/include/asm-powerpc/pgtable-ppc32.h b/include/asm-powerpc/pgtable-ppc32.h
index 6c236d4d6262..86a54a4a8a2a 100644
--- a/include/asm-powerpc/pgtable-ppc32.h
+++ b/include/asm-powerpc/pgtable-ppc32.h
@@ -621,13 +621,6 @@ static inline int __ptep_test_and_clear_young(unsigned int context, unsigned lon
621#define ptep_test_and_clear_young(__vma, __addr, __ptep) \ 621#define ptep_test_and_clear_young(__vma, __addr, __ptep) \
622 __ptep_test_and_clear_young((__vma)->vm_mm->context.id, __addr, __ptep) 622 __ptep_test_and_clear_young((__vma)->vm_mm->context.id, __addr, __ptep)
623 623
624#define __HAVE_ARCH_PTEP_TEST_AND_CLEAR_DIRTY
625static inline int ptep_test_and_clear_dirty(struct vm_area_struct *vma,
626 unsigned long addr, pte_t *ptep)
627{
628 return (pte_update(ptep, (_PAGE_DIRTY | _PAGE_HWWRITE), 0) & _PAGE_DIRTY) != 0;
629}
630
631#define __HAVE_ARCH_PTEP_GET_AND_CLEAR 624#define __HAVE_ARCH_PTEP_GET_AND_CLEAR
632static inline pte_t ptep_get_and_clear(struct mm_struct *mm, unsigned long addr, 625static inline pte_t ptep_get_and_clear(struct mm_struct *mm, unsigned long addr,
633 pte_t *ptep) 626 pte_t *ptep)
diff --git a/include/asm-powerpc/pgtable-ppc64.h b/include/asm-powerpc/pgtable-ppc64.h
index 7ca8b5c10019..300f9a199bf2 100644
--- a/include/asm-powerpc/pgtable-ppc64.h
+++ b/include/asm-powerpc/pgtable-ppc64.h
@@ -292,29 +292,6 @@ static inline int __ptep_test_and_clear_young(struct mm_struct *mm,
292 __r; \ 292 __r; \
293}) 293})
294 294
295/*
296 * On RW/DIRTY bit transitions we can avoid flushing the hpte. For the
297 * moment we always flush but we need to fix hpte_update and test if the
298 * optimisation is worth it.
299 */
300static inline int __ptep_test_and_clear_dirty(struct mm_struct *mm,
301 unsigned long addr, pte_t *ptep)
302{
303 unsigned long old;
304
305 if ((pte_val(*ptep) & _PAGE_DIRTY) == 0)
306 return 0;
307 old = pte_update(mm, addr, ptep, _PAGE_DIRTY, 0);
308 return (old & _PAGE_DIRTY) != 0;
309}
310#define __HAVE_ARCH_PTEP_TEST_AND_CLEAR_DIRTY
311#define ptep_test_and_clear_dirty(__vma, __addr, __ptep) \
312({ \
313 int __r; \
314 __r = __ptep_test_and_clear_dirty((__vma)->vm_mm, __addr, __ptep); \
315 __r; \
316})
317
318#define __HAVE_ARCH_PTEP_SET_WRPROTECT 295#define __HAVE_ARCH_PTEP_SET_WRPROTECT
319static inline void ptep_set_wrprotect(struct mm_struct *mm, unsigned long addr, 296static inline void ptep_set_wrprotect(struct mm_struct *mm, unsigned long addr,
320 pte_t *ptep) 297 pte_t *ptep)
@@ -342,14 +319,6 @@ static inline void ptep_set_wrprotect(struct mm_struct *mm, unsigned long addr,
342 __young; \ 319 __young; \
343}) 320})
344 321
345#define __HAVE_ARCH_PTEP_CLEAR_DIRTY_FLUSH
346#define ptep_clear_flush_dirty(__vma, __address, __ptep) \
347({ \
348 int __dirty = __ptep_test_and_clear_dirty((__vma)->vm_mm, __address, \
349 __ptep); \
350 __dirty; \
351})
352
353#define __HAVE_ARCH_PTEP_GET_AND_CLEAR 322#define __HAVE_ARCH_PTEP_GET_AND_CLEAR
354static inline pte_t ptep_get_and_clear(struct mm_struct *mm, 323static inline pte_t ptep_get_and_clear(struct mm_struct *mm,
355 unsigned long addr, pte_t *ptep) 324 unsigned long addr, pte_t *ptep)