aboutsummaryrefslogtreecommitdiffstats
path: root/include/asm-sh/addrspace.h
diff options
context:
space:
mode:
authorStuart Menefy <stuart.menefy@st.com>2007-11-30 17:52:53 +0900
committerPaul Mundt <lethal@linux-sh.org>2008-01-28 13:18:59 +0900
commitd02b08f6e8b184ffef349e395210a5e82ff4f4bc (patch)
tree1dbec9fe6d2315a95855ce5a91f92a2a1fbf5a22 /include/asm-sh/addrspace.h
parentsh: Preparation for uncached jumps through PMB. (diff)
downloadlinux-dev-d02b08f6e8b184ffef349e395210a5e82ff4f4bc.tar.xz
linux-dev-d02b08f6e8b184ffef349e395210a5e82ff4f4bc.zip
sh: Clean up places that make 29-bit physical assumptions.
Signed-off-by: Stuart Menefy <stuart.menefy@st.com> Signed-off-by: Paul Mundt <lethal@linux-sh.org>
Diffstat (limited to 'include/asm-sh/addrspace.h')
-rw-r--r--include/asm-sh/addrspace.h6
1 files changed, 5 insertions, 1 deletions
diff --git a/include/asm-sh/addrspace.h b/include/asm-sh/addrspace.h
index e7f2deb28e06..fa544fc38c23 100644
--- a/include/asm-sh/addrspace.h
+++ b/include/asm-sh/addrspace.h
@@ -31,6 +31,7 @@
/* Returns the physical address of a PnSEG (n=1,2) address */
#define PHYSADDR(a) (((unsigned long)(a)) & 0x1fffffff)
+#ifdef CONFIG_29BIT
/*
* Map an address to a certain privileged segment
*/
@@ -42,8 +43,11 @@
((__typeof__(a))(((unsigned long)(a) & 0x1fffffff) | P3SEG))
#define P4SEGADDR(a) \
((__typeof__(a))(((unsigned long)(a) & 0x1fffffff) | P4SEG))
-
+#endif /* 29BIT */
#endif /* P1SEG */
+/* Check if an address can be reached in 29 bits */
+#define IS_29BIT(a) (((unsigned long)(a)) < 0x20000000)
+
#endif /* __KERNEL__ */
#endif /* __ASM_SH_ADDRSPACE_H */