diff options
author | Paul Mundt | 2010-01-20 08:40:48 +0100 |
---|---|---|
committer | Paul Mundt | 2010-01-20 08:40:48 +0100 |
commit | 2efa53b269ec1e9289a108e1506f53f6f1de440b (patch) | |
tree | a5825e18be1044b2472cba5776e1ef47377f9834 /arch/sh/include/asm/mmu.h | |
parent | sh: mach-sdk7786: Split out FPGA IRQ controller setup. (diff) | |
download | kernel-qcow2-linux-2efa53b269ec1e9289a108e1506f53f6f1de440b.tar.gz kernel-qcow2-linux-2efa53b269ec1e9289a108e1506f53f6f1de440b.tar.xz kernel-qcow2-linux-2efa53b269ec1e9289a108e1506f53f6f1de440b.zip |
sh: Make 29/32-bit mode check helper generally available.
Presently __in_29bit_mode() is only defined for the PMB case, but
it's also easily derived from the CONFIG_29BIT and CONFIG_32BIT &&
CONFIG_PMB=n cases.
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
Diffstat (limited to 'arch/sh/include/asm/mmu.h')
-rw-r--r-- | arch/sh/include/asm/mmu.h | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/arch/sh/include/asm/mmu.h b/arch/sh/include/asm/mmu.h index e5e8f48830ef..ca7d91e8aa72 100644 --- a/arch/sh/include/asm/mmu.h +++ b/arch/sh/include/asm/mmu.h @@ -31,6 +31,7 @@ #ifndef __ASSEMBLY__ #include <linux/errno.h> +#include <linux/threads.h> /* Default "unsigned long" context */ typedef unsigned long mm_context_id_t[NR_CPUS]; @@ -72,6 +73,7 @@ long pmb_remap(unsigned long virt, unsigned long phys, unsigned long size, unsigned long flags); void pmb_unmap(unsigned long addr); int pmb_init(void); +bool __in_29bit_mode(void); #else static inline long pmb_remap(unsigned long virt, unsigned long phys, unsigned long size, unsigned long flags) @@ -87,8 +89,14 @@ static inline int pmb_init(void) { return -ENODEV; } -#endif /* CONFIG_PMB */ +#ifdef CONFIG_29BIT +#define __in_29bit_mode() (1) +#else +#define __in_29bit_mode() (0) +#endif + +#endif /* CONFIG_PMB */ #endif /* __ASSEMBLY__ */ #endif /* __MMU_H */ |