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-changelog

[Xen-changelog] [PATCH] [PATCH] Eliminate kernel version checks from

To: xen-changelog@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-changelog] [PATCH] [PATCH] Eliminate kernel version checks from
From: BitKeeper Bot <riel@xxxxxxxxxxx>
Date: Fri, 15 Apr 2005 22:15:40 +0000
Delivery-date: Fri, 15 Apr 2005 23:03:24 +0000
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-changelog-request@lists.xensource.com?subject=help>
List-id: BK change log <xen-changelog.lists.xensource.com>
List-post: <mailto:xen-changelog@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=unsubscribe>
Reply-to: Xen Development List <xen-devel@xxxxxxxxxxxxxxxxxxx>
Sender: xen-changelog-bounces@xxxxxxxxxxxxxxxxxxx
ChangeSet 1.1304, 2005/04/15 23:15:40+01:00, chrisw@xxxxxxxx

        [PATCH] [PATCH] Eliminate kernel version checks from
        
        Eliminate kernel version checks from i386/kernel/pci-dma.c as a trivial
        first pass cleanup towards merging.
        
        Signed-off-by: Chris Wright <chrisw@xxxxxxxx>



 pci-dma.c |   29 -----------------------------
 1 files changed, 29 deletions(-)


diff -Nru a/linux-2.6.11-xen-sparse/arch/xen/i386/kernel/pci-dma.c 
b/linux-2.6.11-xen-sparse/arch/xen/i386/kernel/pci-dma.c
--- a/linux-2.6.11-xen-sparse/arch/xen/i386/kernel/pci-dma.c    2005-04-15 
19:03:38 -04:00
+++ b/linux-2.6.11-xen-sparse/arch/xen/i386/kernel/pci-dma.c    2005-04-15 
19:03:38 -04:00
@@ -14,14 +14,7 @@
 #include <linux/version.h>
 #include <asm/io.h>
 #include <asm-xen/balloon.h>
-
-#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,0)
 #include <asm/tlbflush.h>
-#else
-#define pte_offset_kernel pte_offset
-#define pud_t pgd_t
-#define pud_offset(d, va) d
-#endif
 
 struct dma_coherent_mem {
        void            *virt_base;
@@ -85,24 +78,13 @@
        balloon_unlock(flags);
 }
 
-#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,0)
-void *pci_alloc_consistent(struct pci_dev *hwdev, size_t size,
-                          dma_addr_t *dma_handle)
-#else
 void *dma_alloc_coherent(struct device *dev, size_t size,
                           dma_addr_t *dma_handle, int gfp)
-#endif
 {
        void *ret;
        unsigned int order = get_order(size);
        unsigned long vstart;
 
-#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,0)
-       int gfp = GFP_ATOMIC;
-
-       if (hwdev == NULL || ((u32)hwdev->dma_mask < 0xffffffff))
-               gfp |= GFP_DMA;
-#else
        struct dma_coherent_mem *mem = dev ? dev->dma_mem : NULL;
 
        /* ignore region specifiers */
@@ -123,7 +105,6 @@
 
        if (dev == NULL || (dev->coherent_dma_mask < 0xffffffff))
                gfp |= GFP_DMA;
-#endif
 
        vstart = __get_free_pages(gfp, order);
        ret = (void *)vstart;
@@ -138,14 +119,6 @@
        return ret;
 }
 
-#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,0)
-void pci_free_consistent(struct pci_dev *hwdev, size_t size,
-                        void *vaddr, dma_addr_t dma_handle)
-{
-       free_pages((unsigned long)vaddr, get_order(size));
-}
-#else
-
 void dma_free_coherent(struct device *dev, size_t size,
                         void *vaddr, dma_addr_t dma_handle)
 {
@@ -236,5 +209,3 @@
        return mem->virt_base + (pos << PAGE_SHIFT);
 }
 EXPORT_SYMBOL(dma_mark_declared_memory_occupied);
-
-#endif

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

<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-changelog] [PATCH] [PATCH] Eliminate kernel version checks from, BitKeeper Bot <=