aboutsummaryrefslogtreecommitdiffstats
path: root/arch/sh/mm/uncached.c
diff options
context:
space:
mode:
Diffstat (limited to 'arch/sh/mm/uncached.c')
-rw-r--r--arch/sh/mm/uncached.c9
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 @@
15unsigned long cached_to_uncached = SZ_512M; 17unsigned long cached_to_uncached = SZ_512M;
16unsigned long uncached_size = SZ_512M; 18unsigned long uncached_size = SZ_512M;
17unsigned long uncached_start, uncached_end; 19unsigned long uncached_start, uncached_end;
20EXPORT_SYMBOL(uncached_start);
21EXPORT_SYMBOL(uncached_end);
18 22
19int virt_addr_uncached(unsigned long kaddr) 23int 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}
27EXPORT_SYMBOL(virt_addr_uncached);
23 28
24void __init uncached_init(void) 29void __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