]> www.pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - include/asm-sh/addrspace.h
sh: Clean up places that make 29-bit physical assumptions.
[linux-2.6-omap-h63xx.git] / include / asm-sh / addrspace.h
index e7f2deb28e06179b456d8cced784af0c9c9586f6..fa544fc38c233cc546a51c309e203dcd93570cf7 100644 (file)
@@ -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
  */
        ((__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 */