debuggers.hg
changeset 4585:73ef7f1fc714
bitkeeper revision 1.1307 (42604f23zhUwzxPQ-mNyzol0cpHWlg)
[PATCH] Eliminate kernel version checks from
Eliminate kernel version checks from x86_64/kernel/pci-dma.c as a trivial
first pass cleanup towards merging.
Signed-off-by: Chris Wright <chrisw@osdl.org>
[PATCH] Eliminate kernel version checks from
Eliminate kernel version checks from x86_64/kernel/pci-dma.c as a trivial
first pass cleanup towards merging.
Signed-off-by: Chris Wright <chrisw@osdl.org>
author | chrisw@osdl.org[iap10] |
---|---|
date | Fri Apr 15 23:32:51 2005 +0000 (2005-04-15) |
parents | 189085197f6d |
children | 8ce73ebd1311 |
files | linux-2.6.11-xen-sparse/arch/xen/x86_64/kernel/pci-dma.c |
line diff
1.1 --- a/linux-2.6.11-xen-sparse/arch/xen/x86_64/kernel/pci-dma.c Fri Apr 15 22:32:57 2005 +0000 1.2 +++ b/linux-2.6.11-xen-sparse/arch/xen/x86_64/kernel/pci-dma.c Fri Apr 15 23:32:51 2005 +0000 1.3 @@ -10,12 +10,6 @@ 1.4 #include <asm/io.h> 1.5 #include <asm-xen/balloon.h> 1.6 1.7 -#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,0) 1.8 -#define pte_offset_kernel pte_offset 1.9 -#define pud_t pgd_t 1.10 -#define pud_offset(d, va) d 1.11 -#endif 1.12 - 1.13 /* Map a set of buffers described by scatterlist in streaming 1.14 * mode for DMA. This is the scatter-gather version of the 1.15 * above pci_map_single interface. Here the scatter gather list 1.16 @@ -125,24 +119,13 @@ xen_contig_memory(unsigned long vstart, 1.17 balloon_unlock(flags); 1.18 } 1.19 1.20 -#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,0) 1.21 -void *pci_alloc_consistent(struct pci_dev *hwdev, size_t size, 1.22 - dma_addr_t *dma_handle) 1.23 -#else 1.24 void *dma_alloc_coherent(struct device *dev, size_t size, 1.25 dma_addr_t *dma_handle, unsigned gfp) 1.26 -#endif 1.27 { 1.28 void *ret; 1.29 unsigned int order = get_order(size); 1.30 unsigned long vstart; 1.31 1.32 -#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,0) 1.33 - int gfp = GFP_ATOMIC; 1.34 - 1.35 - if (hwdev == NULL || ((u32)hwdev->dma_mask < 0xffffffff)) 1.36 - gfp |= GFP_DMA; 1.37 -#else 1.38 struct dma_coherent_mem *mem = dev ? dev->dma_mem : NULL; 1.39 1.40 /* ignore region specifiers */ 1.41 @@ -163,7 +146,6 @@ void *dma_alloc_coherent(struct device * 1.42 1.43 if (dev == NULL || (dev->coherent_dma_mask < 0xffffffff)) 1.44 gfp |= GFP_DMA; 1.45 -#endif 1.46 1.47 vstart = __get_free_pages(gfp, order); 1.48 ret = (void *)vstart; 1.49 @@ -179,14 +161,6 @@ void *dma_alloc_coherent(struct device * 1.50 } 1.51 EXPORT_SYMBOL(dma_alloc_coherent); 1.52 1.53 -#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,0) 1.54 -void pci_free_consistent(struct pci_dev *hwdev, size_t size, 1.55 - void *vaddr, dma_addr_t dma_handle) 1.56 -{ 1.57 - free_pages((unsigned long)vaddr, get_order(size)); 1.58 -} 1.59 -#else 1.60 - 1.61 void dma_free_coherent(struct device *dev, size_t size, 1.62 void *vaddr, dma_addr_t dma_handle) 1.63 { 1.64 @@ -280,4 +254,3 @@ void *dma_mark_declared_memory_occupied( 1.65 } 1.66 EXPORT_SYMBOL(dma_mark_declared_memory_occupied); 1.67 #endif 1.68 -#endif