diff options
Diffstat (limited to 'arch/sh/mm/uncached.c')
-rw-r--r-- | arch/sh/mm/uncached.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/arch/sh/mm/uncached.c b/arch/sh/mm/uncached.c index cf20a5c5136a..8a4eca551fc0 100644 --- a/arch/sh/mm/uncached.c +++ b/arch/sh/mm/uncached.c | |||
@@ -1,6 +1,8 @@ | |||
1 | #include <linux/init.h> | 1 | #include <linux/init.h> |
2 | #include <linux/module.h> | ||
2 | #include <asm/sizes.h> | 3 | #include <asm/sizes.h> |
3 | #include <asm/page.h> | 4 | #include <asm/page.h> |
5 | #include <asm/addrspace.h> | ||
4 | 6 | ||
5 | /* | 7 | /* |
6 | * This is the offset of the uncached section from its cached alias. | 8 | * This is the offset of the uncached section from its cached alias. |
@@ -15,15 +17,22 @@ | |||
15 | unsigned long cached_to_uncached = SZ_512M; | 17 | unsigned long cached_to_uncached = SZ_512M; |
16 | unsigned long uncached_size = SZ_512M; | 18 | unsigned long uncached_size = SZ_512M; |
17 | unsigned long uncached_start, uncached_end; | 19 | unsigned long uncached_start, uncached_end; |
20 | EXPORT_SYMBOL(uncached_start); | ||
21 | EXPORT_SYMBOL(uncached_end); | ||
18 | 22 | ||
19 | int virt_addr_uncached(unsigned long kaddr) | 23 | int virt_addr_uncached(unsigned long kaddr) |
20 | { | 24 | { |
21 | return (kaddr >= uncached_start) && (kaddr < uncached_end); | 25 | return (kaddr >= uncached_start) && (kaddr < uncached_end); |
22 | } | 26 | } |
27 | EXPORT_SYMBOL(virt_addr_uncached); | ||
23 | 28 | ||
24 | void __init uncached_init(void) | 29 | void __init uncached_init(void) |
25 | { | 30 | { |
31 | #ifdef CONFIG_29BIT | ||
32 | uncached_start = P2SEG; | ||
33 | #else | ||
26 | uncached_start = memory_end; | 34 | uncached_start = memory_end; |
35 | #endif | ||
27 | uncached_end = uncached_start + uncached_size; | 36 | uncached_end = uncached_start + uncached_size; |
28 | } | 37 | } |
29 | 38 | ||