[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Xen-changelog] [xen-3.0-testing] Fix the kunmap_atomic() change in 10529:4260eb8c08740de0000081c61a6237ffcb95b2d5.



# HG changeset patch
# User kaf24@xxxxxxxxxxxxxxxxxxxx
# Node ID 1e225598ce827a8d810ad57e82547ad6ed9c0258
# Parent  49a0f2160a6c806333fb3174e431f52117fff54a
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@xxxxxxxxxxxxx>
xen-unstable changeset:   10533:cb9443bfdff811619a94bebb5346ee74e936eee8
xen-unstable date:        Thu Jun 29 10:48:07 2006 +0100
---
 linux-2.6-xen-sparse/arch/i386/mm/highmem-xen.c |    6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)

diff -r 49a0f2160a6c -r 1e225598ce82 
linux-2.6-xen-sparse/arch/i386/mm/highmem-xen.c
--- a/linux-2.6-xen-sparse/arch/i386/mm/highmem-xen.c   Wed Jun 28 18:40:23 
2006 +0100
+++ b/linux-2.6-xen-sparse/arch/i386/mm/highmem-xen.c   Thu Jun 29 10:51:49 
2006 +0100
@@ -60,7 +60,7 @@ void *kmap_atomic_pte(struct page *page,
 
 void kunmap_atomic(void *kvaddr, enum km_type type)
 {
-#ifdef CONFIG_DEBUG_HIGHMEM
+#if defined(CONFIG_DEBUG_HIGHMEM) || defined(CONFIG_XEN)
        unsigned long vaddr = (unsigned long) kvaddr & PAGE_MASK;
        enum fixed_addresses idx = type + KM_TYPE_NR*smp_processor_id();
 
@@ -69,7 +69,9 @@ void kunmap_atomic(void *kvaddr, enum km
                preempt_check_resched();
                return;
        }
+#endif
 
+#if defined(CONFIG_DEBUG_HIGHMEM)
        if (vaddr != __fix_to_virt(FIX_KMAP_BEGIN+idx))
                BUG();
 
@@ -86,8 +88,6 @@ void kunmap_atomic(void *kvaddr, enum km
         * XXX TODO: We could make this faster by only zapping when
         * kmap_flush_unused is called but that is trickier and more invasive.
         */
-       unsigned long vaddr = (unsigned long) kvaddr & PAGE_MASK;
-       enum fixed_addresses idx = type + KM_TYPE_NR*smp_processor_id();
        pte_clear(&init_mm, vaddr, kmap_pte-idx);
 #endif
 

_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-changelog


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.