From aae4d1428c03b03f9fe6204a83e35822fe9cc591 Mon Sep 17 00:00:00 2001 From: Paul Mundt Date: Sat, 15 Aug 2009 09:57:57 +0900 Subject: sh: consolidate nommu stubs in arch/sh/mm/nommu.c. These were previous littered around tlb-nommu.c and pg-nommu.c, though at this point there are more stubs than are strictly TLB or page op related, so just consolidate them in a single nommu.c. Signed-off-by: Paul Mundt --- arch/sh/mm/Makefile_32 | 2 +- arch/sh/mm/Makefile_64 | 2 +- arch/sh/mm/nommu.c | 96 ++++++++++++++++++++++++++++++++++++++++++++++++++ arch/sh/mm/pg-nommu.c | 33 ----------------- arch/sh/mm/tlb-nommu.c | 75 --------------------------------------- 5 files changed, 98 insertions(+), 110 deletions(-) create mode 100644 arch/sh/mm/nommu.c delete mode 100644 arch/sh/mm/pg-nommu.c delete mode 100644 arch/sh/mm/tlb-nommu.c (limited to 'arch/sh/mm') diff --git a/arch/sh/mm/Makefile_32 b/arch/sh/mm/Makefile_32 index affcc9a15ce..ff3b07bd772 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 66c39106d0a..4d5ed245ef4 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/nommu.c b/arch/sh/mm/nommu.c new file mode 100644 index 00000000000..51b54037216 --- /dev/null +++ b/arch/sh/mm/nommu.c @@ -0,0 +1,96 @@ +/* + * arch/sh/mm/nommu.c + * + * Various helper routines and stubs for MMUless SH. + * + * 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(); +} + +void local_flush_tlb_mm(struct mm_struct *mm) +{ + BUG(); +} + +void local_flush_tlb_range(struct vm_area_struct *vma, unsigned long start, + unsigned long end) +{ + BUG(); +} + +void local_flush_tlb_page(struct vm_area_struct *vma, unsigned long page) +{ + BUG(); +} + +void local_flush_tlb_one(unsigned long asid, unsigned long page) +{ + BUG(); +} + +void local_flush_tlb_kernel_range(unsigned long start, unsigned long end) +{ + BUG(); +} + +void __update_tlb(struct vm_area_struct *vma, unsigned long address, pte_t pte) +{ +} + +void __init kmap_coherent_init(void) +{ +} + +void *kmap_coherent(struct page *page, unsigned long addr) +{ + BUG(); + return NULL; +} + +void kunmap_coherent(void) +{ + BUG(); +} + +void __init page_table_range_init(unsigned long start, unsigned long end, + pgd_t *pgd_base) +{ +} + +void __set_fixmap(enum fixed_addresses idx, unsigned long phys, pgprot_t prot) +{ +} diff --git a/arch/sh/mm/pg-nommu.c b/arch/sh/mm/pg-nommu.c deleted file mode 100644 index 7e33b486b7e..00000000000 --- 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; -} diff --git a/arch/sh/mm/tlb-nommu.c b/arch/sh/mm/tlb-nommu.c deleted file mode 100644 index 0710ebb99b9..00000000000 --- a/arch/sh/mm/tlb-nommu.c +++ /dev/null @@ -1,75 +0,0 @@ -/* - * arch/sh/mm/tlb-nommu.c - * - * TLB Operations for MMUless SH. - * - * Copyright (C) 2002 Paul Mundt - * - * Released under the terms of the GNU GPL v2.0. - */ -#include -#include -#include -#include - -/* - * Nothing too terribly exciting here .. - */ -void local_flush_tlb_all(void) -{ - BUG(); -} - -void local_flush_tlb_mm(struct mm_struct *mm) -{ - BUG(); -} - -void local_flush_tlb_range(struct vm_area_struct *vma, unsigned long start, - unsigned long end) -{ - BUG(); -} - -void local_flush_tlb_page(struct vm_area_struct *vma, unsigned long page) -{ - BUG(); -} - -void local_flush_tlb_one(unsigned long asid, unsigned long page) -{ - BUG(); -} - -void local_flush_tlb_kernel_range(unsigned long start, unsigned long end) -{ - BUG(); -} - -void __update_tlb(struct vm_area_struct *vma, unsigned long address, pte_t pte) -{ -} - -void __init kmap_coherent_init(void) -{ -} - -void *kmap_coherent(struct page *page, unsigned long addr) -{ - BUG(); - return NULL; -} - -void kunmap_coherent(void) -{ - BUG(); -} - -void __init page_table_range_init(unsigned long start, unsigned long end, - pgd_t *pgd_base) -{ -} - -void __set_fixmap(enum fixed_addresses idx, unsigned long phys, pgprot_t prot) -{ -} -- cgit v1.2.3