ia64/xen-unstable

changeset 10588:cb9443bfdff8

Fix the kunmap_atomic() change in 10529:4260eb8c08740de0000081c61a6237ffcb95b2d5.
Mustn't zap the PTE if the virtual address is not in kmap_atomic range!
Signed-off-by: Keir Fraser <keir@xensource.com>
author kaf24@firebug.cl.cam.ac.uk
date Thu Jun 29 10:48:07 2006 +0100 (2006-06-29)
parents 4b45f7f62dc7
children c77b066f864a 9b35fada9e65
files linux-2.6-xen-sparse/arch/i386/mm/highmem-xen.c
line diff
     1.1 --- a/linux-2.6-xen-sparse/arch/i386/mm/highmem-xen.c	Wed Jun 28 21:51:01 2006 +0100
     1.2 +++ b/linux-2.6-xen-sparse/arch/i386/mm/highmem-xen.c	Thu Jun 29 10:48:07 2006 +0100
     1.3 @@ -60,7 +60,7 @@ void *kmap_atomic_pte(struct page *page,
     1.4  
     1.5  void kunmap_atomic(void *kvaddr, enum km_type type)
     1.6  {
     1.7 -#ifdef CONFIG_DEBUG_HIGHMEM
     1.8 +#if defined(CONFIG_DEBUG_HIGHMEM) || defined(CONFIG_XEN)
     1.9  	unsigned long vaddr = (unsigned long) kvaddr & PAGE_MASK;
    1.10  	enum fixed_addresses idx = type + KM_TYPE_NR*smp_processor_id();
    1.11  
    1.12 @@ -69,7 +69,9 @@ void kunmap_atomic(void *kvaddr, enum km
    1.13  		preempt_check_resched();
    1.14  		return;
    1.15  	}
    1.16 +#endif
    1.17  
    1.18 +#if defined(CONFIG_DEBUG_HIGHMEM)
    1.19  	if (vaddr != __fix_to_virt(FIX_KMAP_BEGIN+idx))
    1.20  		BUG();
    1.21  
    1.22 @@ -86,8 +88,6 @@ void kunmap_atomic(void *kvaddr, enum km
    1.23  	 * XXX TODO: We could make this faster by only zapping when
    1.24  	 * kmap_flush_unused is called but that is trickier and more invasive.
    1.25  	 */
    1.26 -	unsigned long vaddr = (unsigned long) kvaddr & PAGE_MASK;
    1.27 -	enum fixed_addresses idx = type + KM_TYPE_NR*smp_processor_id();
    1.28  	pte_clear(&init_mm, vaddr, kmap_pte-idx);
    1.29  #endif
    1.30