diff --git a/arch/sh/mm/Makefile_32 b/arch/sh/mm/Makefile_32 index affcc9a15ceace86515db31554d226c399e8f629..ff3b07bd772da919264f29d616254978564a7b7c 100644 --- a/arch/sh/mm/Makefile_32 +++ b/arch/sh/mm/Makefile_32 @@ -14,7 +14,7 @@ endif obj-y += $(cacheops-y) -mmu-y := tlb-nommu.o pg-nommu.o +mmu-y := nommu.o mmu-$(CONFIG_MMU) := fault_32.o kmap.o tlbflush_32.o ioremap_32.o obj-y += $(mmu-y) diff --git a/arch/sh/mm/Makefile_64 b/arch/sh/mm/Makefile_64 index 66c39106d0a88c198bbe9c6b4822c0eb86605a9e..4d5ed245ef4750672b73a5fc7d227a6532f63b96 100644 --- a/arch/sh/mm/Makefile_64 +++ b/arch/sh/mm/Makefile_64 @@ -4,7 +4,7 @@ obj-y := init.o consistent.o mmap.o -mmu-y := tlb-nommu.o pg-nommu.o extable_32.o +mmu-y := nommu.o extable_32.o mmu-$(CONFIG_MMU) := fault_64.o ioremap_64.o tlbflush_64.o tlb-sh5.o \ extable_64.o diff --git a/arch/sh/mm/tlb-nommu.c b/arch/sh/mm/nommu.c similarity index 69% rename from arch/sh/mm/tlb-nommu.c rename to arch/sh/mm/nommu.c index 0710ebb99b9a306427dbb6700a66e649e6b410bb..51b54037216f1a61b1d47b60c32d56c20f7c33e8 100644 --- a/arch/sh/mm/tlb-nommu.c +++ b/arch/sh/mm/nommu.c @@ -1,20 +1,41 @@ /* - * arch/sh/mm/tlb-nommu.c + * arch/sh/mm/nommu.c * - * TLB Operations for MMUless SH. + * Various helper routines and stubs for MMUless SH. * - * Copyright (C) 2002 Paul Mundt + * Copyright (C) 2002 - 2009 Paul Mundt * * Released under the terms of the GNU GPL v2.0. */ #include +#include +#include #include #include #include +#include +#include /* * Nothing too terribly exciting here .. */ +void copy_page(void *to, void *from) +{ + memcpy(to, from, PAGE_SIZE); +} + +__kernel_size_t __copy_user(void *to, const void *from, __kernel_size_t n) +{ + memcpy(to, from, n); + return 0; +} + +__kernel_size_t __clear_user(void *to, __kernel_size_t n) +{ + memset(to, 0, n); + return 0; +} + void local_flush_tlb_all(void) { BUG(); diff --git a/arch/sh/mm/pg-nommu.c b/arch/sh/mm/pg-nommu.c deleted file mode 100644 index 7e33b486b7e906bd8384b4c2c115c7965fbe5795..0000000000000000000000000000000000000000 --- a/arch/sh/mm/pg-nommu.c +++ /dev/null @@ -1,33 +0,0 @@ -/* - * arch/sh/mm/pg-nommu.c - * - * copy_page()/__copy_user()/__clear_user() implementations for MMUless SH. - * - * 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 -#include -#include -#include -#include - -void copy_page(void *to, void *from) -{ - memcpy(to, from, PAGE_SIZE); -} - -__kernel_size_t __copy_user(void *to, const void *from, __kernel_size_t n) -{ - memcpy(to, from, n); - return 0; -} - -__kernel_size_t __clear_user(void *to, __kernel_size_t n) -{ - memset(to, 0, n); - return 0; -}