From 78d98277e2bdad7213ca910950175ec6ada99513 Mon Sep 17 00:00:00 2001 From: Paul Mundt Date: Tue, 31 Jul 2007 13:03:02 +0900 Subject: [PATCH 1/3] sh64: Fix fs.h removal from mm.h regressions. Signed-off-by: Paul Mundt --- arch/sh64/kernel/init_task.c | 2 +- arch/sh64/kernel/process.c | 1 + arch/sh64/kernel/sys_sh64.c | 1 + arch/sh64/lib/dbg.c | 1 + 4 files changed, 4 insertions(+), 1 deletion(-) diff --git a/arch/sh64/kernel/init_task.c b/arch/sh64/kernel/init_task.c index de2d07db1f88..deee8bfd3270 100644 --- a/arch/sh64/kernel/init_task.c +++ b/arch/sh64/kernel/init_task.c @@ -14,7 +14,7 @@ #include #include #include - +#include #include #include diff --git a/arch/sh64/kernel/process.c b/arch/sh64/kernel/process.c index 1b89c9dfb93d..ceb9458abda4 100644 --- a/arch/sh64/kernel/process.c +++ b/arch/sh64/kernel/process.c @@ -21,6 +21,7 @@ * This file handles the architecture-dependent parts of process handling.. */ #include +#include #include #include #include diff --git a/arch/sh64/kernel/sys_sh64.c b/arch/sh64/kernel/sys_sh64.c index 19126daf9f4c..b7f18e298a20 100644 --- a/arch/sh64/kernel/sys_sh64.c +++ b/arch/sh64/kernel/sys_sh64.c @@ -19,6 +19,7 @@ #include #include #include +#include #include #include #include diff --git a/arch/sh64/lib/dbg.c b/arch/sh64/lib/dbg.c index 4310fc87444e..97816e0baf19 100644 --- a/arch/sh64/lib/dbg.c +++ b/arch/sh64/lib/dbg.c @@ -12,6 +12,7 @@ #include #include #include +#include #include typedef u64 regType_t; From da9d5108f43d63f09b0328a4211f5f404ea05ab0 Mon Sep 17 00:00:00 2001 From: Paul Mundt Date: Tue, 31 Jul 2007 13:07:37 +0900 Subject: [PATCH 2/3] sh64: Fix irq_intc build failure. Needs interrupt.h: CC arch/sh64/kernel/irq_intc.o arch/sh64/kernel/irq_intc.c: In function 'make_intc_irq': arch/sh64/kernel/irq_intc.c:179: error: implicit declaration of function 'disable_irq_nosync' make[1]: *** [arch/sh64/kernel/irq_intc.o] Error 1 Signed-off-by: Paul Mundt --- arch/sh64/kernel/irq_intc.c | 1 + 1 file changed, 1 insertion(+) diff --git a/arch/sh64/kernel/irq_intc.c b/arch/sh64/kernel/irq_intc.c index 42c07d2e71d9..3b63a93198f2 100644 --- a/arch/sh64/kernel/irq_intc.c +++ b/arch/sh64/kernel/irq_intc.c @@ -16,6 +16,7 @@ */ #include +#include #include #include #include From 75c46162be3d0025d448e0b738d6f8b51ff8a6e5 Mon Sep 17 00:00:00 2001 From: Paul Mundt Date: Tue, 31 Jul 2007 13:11:25 +0900 Subject: [PATCH 3/3] sh64: Kill off virt_to_bus()/bus_to_virt(). Follows the SH change. Signed-off-by: Paul Mundt --- arch/sh64/Kconfig | 3 +++ arch/sh64/kernel/pci-dma.c | 4 ++-- include/asm-sh64/dma-mapping.h | 8 ++++---- include/asm-sh64/io.h | 4 ---- 4 files changed, 9 insertions(+), 10 deletions(-) diff --git a/arch/sh64/Kconfig b/arch/sh64/Kconfig index ff654204b7d4..5664631d8ae5 100644 --- a/arch/sh64/Kconfig +++ b/arch/sh64/Kconfig @@ -47,6 +47,9 @@ config ARCH_HAS_ILOG2_U64 bool default n +config ARCH_NO_VIRT_TO_BUS + def_bool y + source init/Kconfig menu "System type" diff --git a/arch/sh64/kernel/pci-dma.c b/arch/sh64/kernel/pci-dma.c index a36c3d71a3fe..a9328f894755 100644 --- a/arch/sh64/kernel/pci-dma.c +++ b/arch/sh64/kernel/pci-dma.c @@ -30,7 +30,7 @@ void *consistent_alloc(struct pci_dev *hwdev, size_t size, if (vp != NULL) { memset(vp, 0, size); - *dma_handle = virt_to_bus(ret); + *dma_handle = virt_to_phys(ret); dma_cache_wback_inv((unsigned long)ret, size); } @@ -42,7 +42,7 @@ void consistent_free(struct pci_dev *hwdev, size_t size, { void *alloc; - alloc = bus_to_virt((unsigned long)dma_handle); + alloc = phys_to_virt((unsigned long)dma_handle); free_pages((unsigned long)alloc, get_order(size)); iounmap(vaddr); diff --git a/include/asm-sh64/dma-mapping.h b/include/asm-sh64/dma-mapping.h index c7c0f059cdc4..d505f357f819 100644 --- a/include/asm-sh64/dma-mapping.h +++ b/include/asm-sh64/dma-mapping.h @@ -51,11 +51,11 @@ static inline dma_addr_t dma_map_single(struct device *dev, { #if defined(CONFIG_PCI) && !defined(CONFIG_SH_PCIDMA_NONCOHERENT) if (dev->bus == &pci_bus_type) - return virt_to_bus(ptr); + return virt_to_phys(ptr); #endif dma_cache_sync(dev, ptr, size, dir); - return virt_to_bus(ptr); + return virt_to_phys(ptr); } #define dma_unmap_single(dev, addr, size, dir) do { } while (0) @@ -98,7 +98,7 @@ static inline void dma_sync_single(struct device *dev, dma_addr_t dma_handle, if (dev->bus == &pci_bus_type) return; #endif - dma_cache_sync(dev, bus_to_virt(dma_handle), size, dir); + dma_cache_sync(dev, phys_to_virt(dma_handle), size, dir); } static inline void dma_sync_single_range(struct device *dev, @@ -110,7 +110,7 @@ static inline void dma_sync_single_range(struct device *dev, if (dev->bus == &pci_bus_type) return; #endif - dma_cache_sync(dev, bus_to_virt(dma_handle) + offset, size, dir); + dma_cache_sync(dev, phys_to_virt(dma_handle) + offset, size, dir); } static inline void dma_sync_sg(struct device *dev, struct scatterlist *sg, diff --git a/include/asm-sh64/io.h b/include/asm-sh64/io.h index 14d8e7b4bf4b..1f37b6931922 100644 --- a/include/asm-sh64/io.h +++ b/include/asm-sh64/io.h @@ -31,10 +31,6 @@ #include #include -#define virt_to_bus virt_to_phys -#define bus_to_virt phys_to_virt -#define page_to_bus page_to_phys - /* * Nothing overly special here.. instead of doing the same thing * over and over again, we just define a set of sh64_in/out functions