ia64/xen-unstable

changeset 7164:5fbc42383481

remove useless ptep_establish_new function (called set_pte_at now)

Signed-off-by: Vincent Hanquez <vincent@xensource.com>
author vh249@kneesaa.uk.xensource.com
date Sun Oct 02 17:45:32 2005 -0400 (2005-10-02)
parents d443f03f8be0
children bb03b43404bb
files linux-2.6-xen-sparse/include/asm-xen/asm-i386/pgtable.h
line diff
     1.1 --- a/linux-2.6-xen-sparse/include/asm-generic/pgtable.h	Sun Oct 02 18:24:41 2005 +0100
     1.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.3 @@ -1,221 +0,0 @@
     1.4 -#ifndef _ASM_GENERIC_PGTABLE_H
     1.5 -#define _ASM_GENERIC_PGTABLE_H
     1.6 -
     1.7 -#ifndef __HAVE_ARCH_PTEP_ESTABLISH
     1.8 -/*
     1.9 - * Establish a new mapping:
    1.10 - *  - flush the old one
    1.11 - *  - update the page tables
    1.12 - *  - inform the TLB about the new one
    1.13 - *
    1.14 - * We hold the mm semaphore for reading and vma->vm_mm->page_table_lock.
    1.15 - *
    1.16 - * Note: the old pte is known to not be writable, so we don't need to
    1.17 - * worry about dirty bits etc getting lost.
    1.18 - */
    1.19 -#ifndef __HAVE_ARCH_SET_PTE_ATOMIC
    1.20 -#define ptep_establish(__vma, __address, __ptep, __entry)		\
    1.21 -do {				  					\
    1.22 -	set_pte_at((__vma)->vm_mm, (__address), __ptep, __entry);	\
    1.23 -	flush_tlb_page(__vma, __address);				\
    1.24 -} while (0)
    1.25 -#else /* __HAVE_ARCH_SET_PTE_ATOMIC */
    1.26 -#define ptep_establish(__vma, __address, __ptep, __entry)		\
    1.27 -do {				  					\
    1.28 -	set_pte_atomic(__ptep, __entry);				\
    1.29 -	flush_tlb_page(__vma, __address);				\
    1.30 -} while (0)
    1.31 -#endif /* __HAVE_ARCH_SET_PTE_ATOMIC */
    1.32 -#endif
    1.33 -
    1.34 -#ifndef __HAVE_ARCH_PTEP_SET_ACCESS_FLAGS
    1.35 -/*
    1.36 - * Largely same as above, but only sets the access flags (dirty,
    1.37 - * accessed, and writable). Furthermore, we know it always gets set
    1.38 - * to a "more permissive" setting, which allows most architectures
    1.39 - * to optimize this.
    1.40 - */
    1.41 -#define ptep_set_access_flags(__vma, __address, __ptep, __entry, __dirty) \
    1.42 -do {				  					  \
    1.43 -	set_pte_at((__vma)->vm_mm, (__address), __ptep, __entry);	  \
    1.44 -	flush_tlb_page(__vma, __address);				  \
    1.45 -} while (0)
    1.46 -#endif
    1.47 -
    1.48 -#ifndef __HAVE_ARCH_PTEP_ESTABLISH_NEW
    1.49 -/*
    1.50 - * Establish a mapping where none previously existed
    1.51 - */
    1.52 -#define ptep_establish_new(__vma, __address, __ptep, __entry)		\
    1.53 -do {									\
    1.54 -	set_pte(__ptep, __entry);					\
    1.55 -} while (0)
    1.56 -#endif
    1.57 -
    1.58 -#ifndef __HAVE_ARCH_PTEP_TEST_AND_CLEAR_YOUNG
    1.59 -#define ptep_test_and_clear_young(__vma, __address, __ptep)		\
    1.60 -({									\
    1.61 -	pte_t __pte = *(__ptep);					\
    1.62 -	int r = 1;							\
    1.63 -	if (!pte_young(__pte))						\
    1.64 -		r = 0;							\
    1.65 -	else								\
    1.66 -		set_pte_at((__vma)->vm_mm, (__address),			\
    1.67 -			   (__ptep), pte_mkold(__pte));			\
    1.68 -	r;								\
    1.69 -})
    1.70 -#endif
    1.71 -
    1.72 -#ifndef __HAVE_ARCH_PTEP_CLEAR_YOUNG_FLUSH
    1.73 -#define ptep_clear_flush_young(__vma, __address, __ptep)		\
    1.74 -({									\
    1.75 -	int __young;							\
    1.76 -	__young = ptep_test_and_clear_young(__vma, __address, __ptep);	\
    1.77 -	if (__young)							\
    1.78 -		flush_tlb_page(__vma, __address);			\
    1.79 -	__young;							\
    1.80 -})
    1.81 -#endif
    1.82 -
    1.83 -#ifndef __HAVE_ARCH_PTEP_TEST_AND_CLEAR_DIRTY
    1.84 -#define ptep_test_and_clear_dirty(__vma, __address, __ptep)		\
    1.85 -({									\
    1.86 -	pte_t __pte = *__ptep;						\
    1.87 -	int r = 1;							\
    1.88 -	if (!pte_dirty(__pte))						\
    1.89 -		r = 0;							\
    1.90 -	else								\
    1.91 -		set_pte_at((__vma)->vm_mm, (__address), (__ptep),	\
    1.92 -			   pte_mkclean(__pte));				\
    1.93 -	r;								\
    1.94 -})
    1.95 -#endif
    1.96 -
    1.97 -#ifndef __HAVE_ARCH_PTEP_CLEAR_DIRTY_FLUSH
    1.98 -#define ptep_clear_flush_dirty(__vma, __address, __ptep)		\
    1.99 -({									\
   1.100 -	int __dirty;							\
   1.101 -	__dirty = ptep_test_and_clear_dirty(__vma, __address, __ptep);	\
   1.102 -	if (__dirty)							\
   1.103 -		flush_tlb_page(__vma, __address);			\
   1.104 -	__dirty;							\
   1.105 -})
   1.106 -#endif
   1.107 -
   1.108 -#ifndef __HAVE_ARCH_PTEP_GET_AND_CLEAR
   1.109 -#define ptep_get_and_clear(__mm, __address, __ptep)			\
   1.110 -({									\
   1.111 -	pte_t __pte = *(__ptep);					\
   1.112 -	pte_clear((__mm), (__address), (__ptep));			\
   1.113 -	__pte;								\
   1.114 -})
   1.115 -#endif
   1.116 -
   1.117 -#ifndef __HAVE_ARCH_PTEP_CLEAR_FLUSH
   1.118 -#define ptep_clear_flush(__vma, __address, __ptep)			\
   1.119 -({									\
   1.120 -	pte_t __pte;							\
   1.121 -	__pte = ptep_get_and_clear((__vma)->vm_mm, __address, __ptep);	\
   1.122 -	flush_tlb_page(__vma, __address);				\
   1.123 -	__pte;								\
   1.124 -})
   1.125 -#endif
   1.126 -
   1.127 -#ifndef __HAVE_ARCH_PTEP_SET_WRPROTECT
   1.128 -static inline void ptep_set_wrprotect(struct mm_struct *mm, unsigned long address, pte_t *ptep)
   1.129 -{
   1.130 -	pte_t old_pte = *ptep;
   1.131 -	set_pte_at(mm, address, ptep, pte_wrprotect(old_pte));
   1.132 -}
   1.133 -#endif
   1.134 -
   1.135 -#ifndef __HAVE_ARCH_PTE_SAME
   1.136 -#define pte_same(A,B)	(pte_val(A) == pte_val(B))
   1.137 -#endif
   1.138 -
   1.139 -#ifndef __HAVE_ARCH_PAGE_TEST_AND_CLEAR_DIRTY
   1.140 -#define page_test_and_clear_dirty(page) (0)
   1.141 -#endif
   1.142 -
   1.143 -#ifndef __HAVE_ARCH_PAGE_TEST_AND_CLEAR_YOUNG
   1.144 -#define page_test_and_clear_young(page) (0)
   1.145 -#endif
   1.146 -
   1.147 -#ifndef __HAVE_ARCH_PGD_OFFSET_GATE
   1.148 -#define pgd_offset_gate(mm, addr)	pgd_offset(mm, addr)
   1.149 -#endif
   1.150 -
   1.151 -#ifndef __HAVE_ARCH_LAZY_MMU_PROT_UPDATE
   1.152 -#define lazy_mmu_prot_update(pte)	do { } while (0)
   1.153 -#endif
   1.154 -
   1.155 -/*
   1.156 - * When walking page tables, get the address of the next boundary,
   1.157 - * or the end address of the range if that comes earlier.  Although no
   1.158 - * vma end wraps to 0, rounded up __boundary may wrap to 0 throughout.
   1.159 - */
   1.160 -
   1.161 -#define pgd_addr_end(addr, end)						\
   1.162 -({	unsigned long __boundary = ((addr) + PGDIR_SIZE) & PGDIR_MASK;	\
   1.163 -	(__boundary - 1 < (end) - 1)? __boundary: (end);		\
   1.164 -})
   1.165 -
   1.166 -#ifndef pud_addr_end
   1.167 -#define pud_addr_end(addr, end)						\
   1.168 -({	unsigned long __boundary = ((addr) + PUD_SIZE) & PUD_MASK;	\
   1.169 -	(__boundary - 1 < (end) - 1)? __boundary: (end);		\
   1.170 -})
   1.171 -#endif
   1.172 -
   1.173 -#ifndef pmd_addr_end
   1.174 -#define pmd_addr_end(addr, end)						\
   1.175 -({	unsigned long __boundary = ((addr) + PMD_SIZE) & PMD_MASK;	\
   1.176 -	(__boundary - 1 < (end) - 1)? __boundary: (end);		\
   1.177 -})
   1.178 -#endif
   1.179 -
   1.180 -#ifndef __ASSEMBLY__
   1.181 -/*
   1.182 - * When walking page tables, we usually want to skip any p?d_none entries;
   1.183 - * and any p?d_bad entries - reporting the error before resetting to none.
   1.184 - * Do the tests inline, but report and clear the bad entry in mm/memory.c.
   1.185 - */
   1.186 -void pgd_clear_bad(pgd_t *);
   1.187 -void pud_clear_bad(pud_t *);
   1.188 -void pmd_clear_bad(pmd_t *);
   1.189 -
   1.190 -static inline int pgd_none_or_clear_bad(pgd_t *pgd)
   1.191 -{
   1.192 -	if (pgd_none(*pgd))
   1.193 -		return 1;
   1.194 -	if (unlikely(pgd_bad(*pgd))) {
   1.195 -		pgd_clear_bad(pgd);
   1.196 -		return 1;
   1.197 -	}
   1.198 -	return 0;
   1.199 -}
   1.200 -
   1.201 -static inline int pud_none_or_clear_bad(pud_t *pud)
   1.202 -{
   1.203 -	if (pud_none(*pud))
   1.204 -		return 1;
   1.205 -	if (unlikely(pud_bad(*pud))) {
   1.206 -		pud_clear_bad(pud);
   1.207 -		return 1;
   1.208 -	}
   1.209 -	return 0;
   1.210 -}
   1.211 -
   1.212 -static inline int pmd_none_or_clear_bad(pmd_t *pmd)
   1.213 -{
   1.214 -	if (pmd_none(*pmd))
   1.215 -		return 1;
   1.216 -	if (unlikely(pmd_bad(*pmd))) {
   1.217 -		pmd_clear_bad(pmd);
   1.218 -		return 1;
   1.219 -	}
   1.220 -	return 0;
   1.221 -}
   1.222 -#endif /* !__ASSEMBLY__ */
   1.223 -
   1.224 -#endif /* _ASM_GENERIC_PGTABLE_H */
     2.1 --- a/linux-2.6-xen-sparse/include/asm-xen/asm-i386/pgtable.h	Sun Oct 02 18:24:41 2005 +0100
     2.2 +++ b/linux-2.6-xen-sparse/include/asm-xen/asm-i386/pgtable.h	Sun Oct 02 17:45:32 2005 -0400
     2.3 @@ -412,17 +412,6 @@ do {				  					\
     2.4  	ptep_set_access_flags(__vma, __address, __ptep, __entry, 1);	\
     2.5  } while (0)
     2.6  
     2.7 -#define __HAVE_ARCH_PTEP_ESTABLISH_NEW
     2.8 -#define ptep_establish_new(__vma, __address, __ptep, __entry)		\
     2.9 -do {				  					\
    2.10 -	if (likely((__vma)->vm_mm == current->mm)) {			\
    2.11 -		BUG_ON(HYPERVISOR_update_va_mapping((__address),	\
    2.12 -					     __entry, 0));		\
    2.13 -	} else {							\
    2.14 -		xen_l1_entry_update((__ptep), (__entry));	\
    2.15 -	}								\
    2.16 -} while (0)
    2.17 -
    2.18  #ifndef CONFIG_XEN_SHADOW_MODE
    2.19  void make_lowmem_page_readonly(void *va);
    2.20  void make_lowmem_page_writable(void *va);