Displaying 2 results from an estimated 2 matches for "dma_coherent_mem".
2005 Apr 15
0
[PATCH] Eliminate kernel version checks from i386/kernel/pci-dma.c
...@@
#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 @@ xen_contig_memory(unsigned long vstart,
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...
2007 Jun 11
5
[PATCH][Linux] gnttab: make dma address conversion logic of gnttab dma arch specific.
...@@ static int __init pci_iommu_init(void)
/* Must execute after PCI subsystem */
fs_initcall(pci_iommu_init);
#endif
+
+/* this should be in somewhere appropriate */
+int gnttab_dma_local_pfn(struct page *page)
+{
+ return pfn_valid(mfn_to_local_pfn(pfn_to_mfn(page_to_pfn(page))));
+}
struct dma_coherent_mem {
void *virt_base;
diff -r d5e0eb7dd069 -r 69e2dd4e06c4 arch/i386/kernel/swiotlb.c
--- a/arch/i386/kernel/swiotlb.c Sun Jun 10 19:50:32 2007 +0100
+++ b/arch/i386/kernel/swiotlb.c Mon Jun 11 16:13:06 2007 +0900
@@ -27,6 +27,7 @@
#include <asm/uaccess.h>
#include <xen/gnttab.h>
#in...