diff options
author | Lachlan McIlroy <lachlan@redback.melbourne.sgi.com> | 2008-11-28 15:23:52 +1100 |
---|---|---|
committer | Lachlan McIlroy <lachlan@redback.melbourne.sgi.com> | 2008-11-28 15:23:52 +1100 |
commit | b5a20aa2657063cbf3b47fc700603180de4bb554 (patch) | |
tree | 9419fb851cda53a7f1fd67a3697bdf8550df19e4 /arch/sh/mm/mmap.c | |
parent | cc09c0dc57de7f7d2ed89d480b5653e5f6a32f2c (diff) | |
parent | ed313489badef16d700f5a3be50e8fd8f8294bc8 (diff) |
Merge git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux-2.6
Diffstat (limited to 'arch/sh/mm/mmap.c')
-rw-r--r-- | arch/sh/mm/mmap.c | 31 |
1 files changed, 31 insertions, 0 deletions
diff --git a/arch/sh/mm/mmap.c b/arch/sh/mm/mmap.c new file mode 100644 index 000000000000..8837d511710a --- /dev/null +++ b/arch/sh/mm/mmap.c @@ -0,0 +1,31 @@ +/* + * arch/sh/mm/mmap.c + * + * Copyright (C) 2008 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/io.h> +#include <linux/mm.h> +#include <asm/page.h> + +/* + * You really shouldn't be using read() or write() on /dev/mem. This + * might go away in the future. + */ +int valid_phys_addr_range(unsigned long addr, size_t count) +{ + if (addr < __MEMORY_START) + return 0; + if (addr + count > __pa(high_memory)) + return 0; + + return 1; +} + +int valid_mmap_phys_addr_range(unsigned long pfn, size_t size) +{ + return 1; +} |