Skip to content

Commit

Permalink
sh: consolidate nommu stubs in arch/sh/mm/nommu.c.
Browse files Browse the repository at this point in the history
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 <lethal@linux-sh.org>
  • Loading branch information
Paul Mundt committed Aug 15, 2009
1 parent dde5e3f commit aae4d14
Show file tree
Hide file tree
Showing 4 changed files with 26 additions and 38 deletions.
2 changes: 1 addition & 1 deletion arch/sh/mm/Makefile_32
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
2 changes: 1 addition & 1 deletion arch/sh/mm/Makefile_64
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
27 changes: 24 additions & 3 deletions arch/sh/mm/tlb-nommu.c → arch/sh/mm/nommu.c
Original file line number Diff line number Diff line change
@@ -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 <linux/kernel.h>
#include <linux/init.h>
#include <linux/string.h>
#include <linux/mm.h>
#include <asm/pgtable.h>
#include <asm/tlbflush.h>
#include <asm/page.h>
#include <asm/uaccess.h>

/*
* 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();
Expand Down
33 changes: 0 additions & 33 deletions arch/sh/mm/pg-nommu.c

This file was deleted.

0 comments on commit aae4d14

Please sign in to comment.