]> git.neil.brown.name Git - history.git/commitdiff
moved the pci_alloc_consistent() and pci_free_consistent() functions back
authorGreg Kroah-Hartman <greg@kroah.com>
Thu, 9 May 2002 03:35:57 +0000 (20:35 -0700)
committerGreg Kroah-Hartman <greg@kroah.com>
Thu, 9 May 2002 03:35:57 +0000 (20:35 -0700)
into arch/i386/kernel as they are needed even if CONFIG_PCI is not enabled.

arch/i386/kernel/Makefile
arch/i386/kernel/pci-dma.c [new file with mode: 0644]
arch/i386/pci/Makefile
arch/i386/pci/dma.c [deleted file]

index 0dc76663bff646aaa09db68aa641097a1c765796..4b1ddecc45b8047839a50cbe1914c25320970f16 100644 (file)
@@ -18,7 +18,7 @@ export-objs     := mca.o mtrr.o msr.o cpuid.o microcode.o i386_ksyms.o time.o
 
 obj-y  := process.o semaphore.o signal.o entry.o traps.o irq.o vm86.o \
                ptrace.o i8259.o ioport.o ldt.o setup.o time.o sys_i386.o \
-               i386_ksyms.o i387.o bluesmoke.o dmi_scan.o \
+               pci-dma.o i386_ksyms.o i387.o bluesmoke.o dmi_scan.o \
                bootflag.o
 
 obj-$(CONFIG_MCA)              += mca.o
diff --git a/arch/i386/kernel/pci-dma.c b/arch/i386/kernel/pci-dma.c
new file mode 100644 (file)
index 0000000..2031b85
--- /dev/null
@@ -0,0 +1,37 @@
+/*
+ * Dynamic DMA mapping support.
+ *
+ * On i386 there is no hardware dynamic DMA address translation,
+ * so consistent alloc/free are merely page allocation/freeing.
+ * The rest of the dynamic DMA mapping interface is implemented
+ * in asm/pci.h.
+ */
+
+#include <linux/types.h>
+#include <linux/mm.h>
+#include <linux/string.h>
+#include <linux/pci.h>
+#include <asm/io.h>
+
+void *pci_alloc_consistent(struct pci_dev *hwdev, size_t size,
+                          dma_addr_t *dma_handle)
+{
+       void *ret;
+       int gfp = GFP_ATOMIC;
+
+       if (hwdev == NULL || ((u32)hwdev->dma_mask != 0xffffffff))
+               gfp |= GFP_DMA;
+       ret = (void *)__get_free_pages(gfp, get_order(size));
+
+       if (ret != NULL) {
+               memset(ret, 0, size);
+               *dma_handle = virt_to_phys(ret);
+       }
+       return ret;
+}
+
+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));
+}
index 0a905368a11ebca93a3da8c7dee31358da8c391e..d0fa50db6acaae2ef08a4899f0ab8e39258fda77 100644 (file)
@@ -1,6 +1,6 @@
 O_TARGET        := pci.o
 
-obj-y          := dma.o i386.o
+obj-y          := i386.o
 
 ifdef  CONFIG_VISWS
 obj-y          += visws.o
diff --git a/arch/i386/pci/dma.c b/arch/i386/pci/dma.c
deleted file mode 100644 (file)
index 2031b85..0000000
+++ /dev/null
@@ -1,37 +0,0 @@
-/*
- * Dynamic DMA mapping support.
- *
- * On i386 there is no hardware dynamic DMA address translation,
- * so consistent alloc/free are merely page allocation/freeing.
- * The rest of the dynamic DMA mapping interface is implemented
- * in asm/pci.h.
- */
-
-#include <linux/types.h>
-#include <linux/mm.h>
-#include <linux/string.h>
-#include <linux/pci.h>
-#include <asm/io.h>
-
-void *pci_alloc_consistent(struct pci_dev *hwdev, size_t size,
-                          dma_addr_t *dma_handle)
-{
-       void *ret;
-       int gfp = GFP_ATOMIC;
-
-       if (hwdev == NULL || ((u32)hwdev->dma_mask != 0xffffffff))
-               gfp |= GFP_DMA;
-       ret = (void *)__get_free_pages(gfp, get_order(size));
-
-       if (ret != NULL) {
-               memset(ret, 0, size);
-               *dma_handle = virt_to_phys(ret);
-       }
-       return ret;
-}
-
-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));
-}