ia64/xen-unstable

changeset 6252:67a13c0ac87d

Fix direct_remap_area_pages() to handle pagetables
above 4GB.

Signed-off-by: Keir Fraser <keir@xensource.com>
author kaf24@firebug.cl.cam.ac.uk
date Thu Aug 18 17:46:26 2005 +0000 (2005-08-18)
parents 082a537ff4de
children 0cd6a23b8d6e
files linux-2.6-xen-sparse/arch/xen/i386/mm/ioremap.c
line diff
     1.1 --- a/linux-2.6-xen-sparse/arch/xen/i386/mm/ioremap.c	Thu Aug 18 17:04:48 2005 +0000
     1.2 +++ b/linux-2.6-xen-sparse/arch/xen/i386/mm/ioremap.c	Thu Aug 18 17:46:26 2005 +0000
     1.3 @@ -300,17 +300,17 @@ void __init bt_iounmap(void *addr, unsig
     1.4  
     1.5  
     1.6  static int direct_remap_area_pte_fn(pte_t *pte, 
     1.7 -                                    struct page *pte_page,
     1.8 -                                    unsigned long address, 
     1.9 -                                    void *data)
    1.10 +				    struct page *pte_page,
    1.11 +				    unsigned long address, 
    1.12 +				    void *data)
    1.13  {
    1.14 -        mmu_update_t **v = (mmu_update_t **)data;
    1.15 +	mmu_update_t **v = (mmu_update_t **)data;
    1.16  
    1.17 -        (*v)->ptr = (pfn_to_mfn(page_to_pfn(pte_page)) << PAGE_SHIFT)
    1.18 -                    | ((unsigned long)pte & ~PAGE_MASK);
    1.19 -        (*v)++;
    1.20 +	(*v)->ptr = ((physaddr_t)pfn_to_mfn(page_to_pfn(pte_page)) <<
    1.21 +		     PAGE_SHIFT) | ((unsigned long)pte & ~PAGE_MASK);
    1.22 +	(*v)++;
    1.23  
    1.24 -        return 0;
    1.25 +	return 0;
    1.26  }
    1.27  
    1.28  int direct_remap_area_pages(struct mm_struct *mm,
    1.29 @@ -397,6 +397,16 @@ int touch_pte_range(struct mm_struct *mm
    1.30  	}
    1.31  
    1.32  	return generic_page_range(mm, address, size, f, NULL);
    1.33 -}                 
    1.34 +} 
    1.35  
    1.36  EXPORT_SYMBOL(touch_pte_range);
    1.37 +
    1.38 +/*
    1.39 + * Local variables:
    1.40 + *  c-file-style: "linux"
    1.41 + *  indent-tabs-mode: t
    1.42 + *  c-indent-level: 8
    1.43 + *  c-basic-offset: 8
    1.44 + *  tab-width: 8
    1.45 + * End:
    1.46 + */