direct-io.hg

changeset 14686:b0a6220047e3

linux: Avoid use of ptep_get_and_clear_full name as it's a macro on
some architectures.
Signed-off-by: Keir Fraser <keir@xensource.com>
author Keir Fraser <keir@xensource.com>
date Sat Mar 31 17:22:46 2007 +0100 (2007-03-31)
parents 2e5b6c02566f
children 8f9ca49175ce
files linux-2.6-xen-sparse/drivers/xen/gntdev/gntdev.c linux-2.6-xen-sparse/include/linux/mm.h linux-2.6-xen-sparse/mm/memory.c
line diff
     1.1 --- a/linux-2.6-xen-sparse/drivers/xen/gntdev/gntdev.c	Sat Mar 31 16:52:36 2007 +0100
     1.2 +++ b/linux-2.6-xen-sparse/drivers/xen/gntdev/gntdev.c	Sat Mar 31 17:22:46 2007 +0100
     1.3 @@ -151,7 +151,7 @@ static pte_t gntdev_clear_pte(struct vm_
     1.4  
     1.5  static struct vm_operations_struct gntdev_vmops = {
     1.6  	.close = gntdev_vma_close,
     1.7 -	.ptep_get_and_clear_full = gntdev_clear_pte
     1.8 +	.zap_pte = gntdev_clear_pte
     1.9  };
    1.10  
    1.11  /* Global variables. */
     2.1 --- a/linux-2.6-xen-sparse/include/linux/mm.h	Sat Mar 31 16:52:36 2007 +0100
     2.2 +++ b/linux-2.6-xen-sparse/include/linux/mm.h	Sat Mar 31 17:22:46 2007 +0100
     2.3 @@ -207,9 +207,8 @@ struct vm_operations_struct {
     2.4  	int (*page_mkwrite)(struct vm_area_struct *vma, struct page *page);
     2.5  	/* Area-specific function for clearing the PTE at @ptep. Returns the
     2.6  	 * original value of @ptep. */
     2.7 -	pte_t (*ptep_get_and_clear_full)(struct vm_area_struct *vma, 
     2.8 -					 unsigned long addr, pte_t *ptep, 
     2.9 -					 int is_fullmm);
    2.10 +	pte_t (*zap_pte)(struct vm_area_struct *vma, 
    2.11 +			 unsigned long addr, pte_t *ptep, int is_fullmm);
    2.12  #ifdef CONFIG_NUMA
    2.13  	int (*set_policy)(struct vm_area_struct *vma, struct mempolicy *new);
    2.14  	struct mempolicy *(*get_policy)(struct vm_area_struct *vma,
     3.1 --- a/linux-2.6-xen-sparse/mm/memory.c	Sat Mar 31 16:52:36 2007 +0100
     3.2 +++ b/linux-2.6-xen-sparse/mm/memory.c	Sat Mar 31 17:22:46 2007 +0100
     3.3 @@ -659,12 +659,9 @@ static unsigned long zap_pte_range(struc
     3.4  				     page->index > details->last_index))
     3.5  					continue;
     3.6  			}
     3.7 -			if (unlikely(vma->vm_ops && 
     3.8 -				     vma->vm_ops->ptep_get_and_clear_full))
     3.9 -				ptent = vma->vm_ops->
    3.10 -					ptep_get_and_clear_full(vma, addr,
    3.11 -								pte,
    3.12 -								tlb->fullmm);
    3.13 +			if (unlikely(vma->vm_ops && vma->vm_ops->zap_pte))
    3.14 +				ptent = vma->vm_ops->zap_pte(vma, addr, pte,
    3.15 +							     tlb->fullmm);
    3.16  			else
    3.17  				ptent = ptep_get_and_clear_full(mm, addr, pte,
    3.18  								tlb->fullmm);