WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-merge

Re: [Xen-merge] arch/i386/mach-xen/mm/highmem.c indentical

To: "Martin J. Bligh" <mbligh@xxxxxxxxxx>
Subject: Re: [Xen-merge] arch/i386/mach-xen/mm/highmem.c indentical
From: Chris Wright <chrisw@xxxxxxxx>
Date: Sun, 7 Aug 2005 11:19:41 -0700
Cc: xen-merge <xen-merge@xxxxxxxxxxxxxxxxxxx>
Delivery-date: Sun, 07 Aug 2005 18:18:00 +0000
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
In-reply-to: <250720000.1123434133@[10.10.2.4]>
List-help: <mailto:xen-merge-request@lists.xensource.com?subject=help>
List-id: xen-merge <xen-merge.lists.xensource.com>
List-post: <mailto:xen-merge@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-merge>, <mailto:xen-merge-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-merge>, <mailto:xen-merge-request@lists.xensource.com?subject=unsubscribe>
References: <250720000.1123434133@[10.10.2.4]>
Sender: xen-merge-bounces@xxxxxxxxxxxxxxxxxxx
User-agent: Mutt/1.5.6i
* Martin J. Bligh (mbligh@xxxxxxxxxx) wrote:
> arch/i386/mach-xen/mm/highmem.c is another one to remove it seems?

Sort of, it's actually got changed, but they are in
arch/i386/mm/highmem.c.  See the broken out patch below:


--- linux-2.6.12-xen0-arch.orig/include/asm-i386/highmem.h
+++ linux-2.6.12-xen0-arch/include/asm-i386/highmem.h
@@ -69,9 +69,13 @@ extern void FASTCALL(kunmap_high(struct 
 void *kmap(struct page *page);
 void kunmap(struct page *page);
 void *kmap_atomic(struct page *page, enum km_type type);
+void *__kmap_atomic(struct page *page, enum km_type type, pgprot_t prot);
 void kunmap_atomic(void *kvaddr, enum km_type type);
 struct page *kmap_atomic_to_page(void *ptr);
 
+/* for kmap_atomic_pte */
+#include <mach_highmem.h>
+
 #define flush_cache_kmaps()    do { } while (0)
 
 #endif /* __KERNEL__ */
--- /dev/null
+++ linux-2.6.12-xen0-arch/include/asm-i386/mach-default/mach_highmem.h
@@ -0,0 +1,6 @@
+#ifndef __ASM_MACH_HIGHEMEM_H
+#define __ASM_MACH_HIGHEMEM_H
+
+#define kmap_atomic_pte(_p,_t) kmap_atomic(_p,_t)
+
+#endif
--- linux-2.6.12-xen0-arch.orig/arch/i386/mm/highmem.c
+++ linux-2.6.12-xen0-arch/arch/i386/mm/highmem.c
@@ -25,7 +25,7 @@ void kunmap(struct page *page)
  * However when holding an atomic kmap is is not legal to sleep, so atomic
  * kmaps are appropriate for short, tight code paths only.
  */
-void *kmap_atomic(struct page *page, enum km_type type)
+void *__kmap_atomic(struct page *page, enum km_type type, pgprot_t prot)
 {
        enum fixed_addresses idx;
        unsigned long vaddr;
@@ -41,12 +41,17 @@ void *kmap_atomic(struct page *page, enu
        if (!pte_none(*(kmap_pte-idx)))
                BUG();
 #endif
-       set_pte(kmap_pte-idx, mk_pte(page, kmap_prot));
+       set_pte(kmap_pte-idx, mk_pte(page, prot));
        __flush_tlb_one(vaddr);
 
        return (void*) vaddr;
 }
 
+void *kmap_atomic(struct page *page, enum km_type type)
+{
+       return __kmap_atomic(page, type, kmap_prot);
+}
+
 void kunmap_atomic(void *kvaddr, enum km_type type)
 {
 #ifdef CONFIG_DEBUG_HIGHMEM

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