diff options
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 @@ | |||
| 1 | /* | ||
| 2 | * arch/sh/mm/mmap.c | ||
| 3 | * | ||
| 4 | * Copyright (C) 2008 Paul Mundt | ||
| 5 | * | ||
| 6 | * This file is subject to the terms and conditions of the GNU General Public | ||
| 7 | * License. See the file "COPYING" in the main directory of this archive | ||
| 8 | * for more details. | ||
| 9 | */ | ||
| 10 | #include <linux/io.h> | ||
| 11 | #include <linux/mm.h> | ||
| 12 | #include <asm/page.h> | ||
| 13 | |||
| 14 | /* | ||
| 15 | * You really shouldn't be using read() or write() on /dev/mem. This | ||
| 16 | * might go away in the future. | ||
| 17 | */ | ||
| 18 | int valid_phys_addr_range(unsigned long addr, size_t count) | ||
| 19 | { | ||
| 20 | if (addr < __MEMORY_START) | ||
| 21 | return 0; | ||
| 22 | if (addr + count > __pa(high_memory)) | ||
| 23 | return 0; | ||
| 24 | |||
| 25 | return 1; | ||
| 26 | } | ||
| 27 | |||
| 28 | int valid_mmap_phys_addr_range(unsigned long pfn, size_t size) | ||
| 29 | { | ||
| 30 | return 1; | ||
| 31 | } | ||
