]> err.no Git - linux-2.6/commitdiff
sh: Kill off broken dma page ops.
authorPaul Mundt <lethal@linux-sh.org>
Mon, 11 Jun 2007 06:56:31 +0000 (15:56 +0900)
committerPaul Mundt <lethal@linux-sh.org>
Mon, 11 Jun 2007 06:56:31 +0000 (15:56 +0900)
There's no point in keeping these around, they've been broken
for some time, and the dmaenging/async_tx framework provides a
far more reasonable interface.

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
arch/sh/drivers/dma/Kconfig
arch/sh/mm/Makefile
arch/sh/mm/pg-dma.c [deleted file]

index 99935f9daf4b89b53825eefdf7df3ae2546e4d10..333898077c7c55f2da5ac60a06e0bf3628e4c2a0 100644 (file)
@@ -36,23 +36,6 @@ config NR_DMA_CHANNELS
          support. Setting this to a higher value allows for cascading DMACs
          with additional channels.
 
-config DMA_PAGE_OPS
-       bool "Use DMAC for page copy/clear"
-       depends on SH_DMA && BROKEN
-       help
-         Selecting this option will use a dual-address mode configured channel
-         in the SH DMAC for copy_page()/clear_page(). Primarily a performance
-         hack.
-
-config DMA_PAGE_OPS_CHANNEL
-       depends on DMA_PAGE_OPS
-       int "DMA channel for sh memory-manager page copy/clear"
-       default "3"
-       help
-         This allows the specification of the dual address dma channel,
-         in case channel 3 is unavailable. On the SH4, channels 1,2, and 3
-         are dual-address capable.
-
 config SH_DMABRG
        bool "SH7760 DMABRG support"
        depends on CPU_SUBTYPE_SH7760
index 47c330c528db1eb90c30cf224bae8967095b48fb..d677d7f3afc1d03e892eb2959f9130a71706a07c 100644 (file)
@@ -8,9 +8,6 @@ obj-$(CONFIG_CPU_SH2)   += cache-sh2.o
 obj-$(CONFIG_CPU_SH3)  += cache-sh3.o
 obj-$(CONFIG_CPU_SH4)  += cache-sh4.o
 
-obj-$(CONFIG_DMA_PAGE_OPS)     += pg-dma.o
-obj-$(CONFIG_HUGETLB_PAGE)     += hugetlbpage.o
-
 mmu-y                  := fault-nommu.o tlb-nommu.o pg-nommu.o
 mmu-$(CONFIG_MMU)      := fault.o clear_page.o copy_page.o tlb-flush.o \
                           ioremap.o
@@ -27,6 +24,7 @@ obj-$(CONFIG_CPU_SH4)         += tlb-sh4.o pg-sh4.o
 obj-$(CONFIG_SH7705_CACHE_32KB) += pg-sh7705.o
 endif
 
+obj-$(CONFIG_HUGETLB_PAGE)     += hugetlbpage.o
 obj-$(CONFIG_SH7705_CACHE_32KB)        += cache-sh7705.o
 obj-$(CONFIG_32BIT)            += pmb.o
 obj-$(CONFIG_NUMA)             += numa.o
diff --git a/arch/sh/mm/pg-dma.c b/arch/sh/mm/pg-dma.c
deleted file mode 100644 (file)
index bb23679..0000000
+++ /dev/null
@@ -1,95 +0,0 @@
-/*
- * arch/sh/mm/pg-dma.c
- *
- * Fast clear_page()/copy_page() implementation using the SH DMAC
- *
- * Copyright (C) 2003  Paul Mundt
- *
- * This file is subject to the terms and conditions of the GNU General Public
- * License.  See the file "COPYING" in the main directory of this archive
- * for more details.
- */
-#include <linux/init.h>
-#include <linux/kernel.h>
-#include <linux/module.h>
-#include <asm/semaphore.h>
-#include <asm/mmu_context.h>
-#include <asm/addrspace.h>
-#include <asm/atomic.h>
-#include <asm/page.h>
-#include <asm/dma.h>
-#include <asm/io.h>
-
-/* Channel to use for page ops, must be dual-address mode capable. */
-static int dma_channel = CONFIG_DMA_PAGE_OPS_CHANNEL;
-
-static void copy_page_dma(void *to, void *from)
-{
-       /* 
-        * This doesn't seem to get triggered until further along in the
-        * boot process, at which point the DMAC is already initialized.
-        * Fix this in the same fashion as clear_page_dma() in the event
-        * that this crashes due to the DMAC not being initialized.
-        */
-
-       flush_icache_range((unsigned long)from, PAGE_SIZE);
-       dma_write_page(dma_channel, (unsigned long)from, (unsigned long)to);
-       dma_wait_for_completion(dma_channel);
-}
-
-static void clear_page_dma(void *to)
-{
-       /*
-        * We get invoked quite early on, if the DMAC hasn't been initialized
-        * yet, fall back on the slow manual implementation.
-        */
-       if (dma_info[dma_channel].chan != dma_channel) {
-               clear_page_slow(to);
-               return;
-       }
-
-       dma_write_page(dma_channel, (unsigned long)empty_zero_page,
-                                   (unsigned long)to);
-
-       /*
-        * FIXME: Something is a bit racy here, if we poll the counter right
-        * away, we seem to lock. flushing the page from the dcache doesn't
-        * seem to make a difference one way or the other, though either a full
-        * icache or dcache flush does.
-        *
-        * The location of this is important as well, and must happen prior to
-        * the completion loop but after the transfer was initiated.
-        *
-        * Oddly enough, this doesn't appear to be an issue for copy_page()..
-        */
-       flush_icache_range((unsigned long)to, PAGE_SIZE);
-
-       dma_wait_for_completion(dma_channel);
-}
-
-static int __init pg_dma_init(void)
-{
-       int ret;
-       
-       ret = request_dma(dma_channel, "page ops");
-       if (ret != 0)
-               return ret;
-
-       copy_page = copy_page_dma;
-       clear_page = clear_page_dma;
-
-       return ret;
-}
-
-static void __exit pg_dma_exit(void)
-{
-       free_dma(dma_channel);
-}
-
-module_init(pg_dma_init);
-module_exit(pg_dma_exit);
-
-MODULE_AUTHOR("Paul Mundt <lethal@linux-sh.org>");
-MODULE_DESCRIPTION("Optimized page copy/clear routines using a dual-address mode capable DMAC channel");
-MODULE_LICENSE("GPL");
-