aboutsummaryrefslogtreecommitdiffstats
path: root/arch/sh/mm
diff options
context:
space:
mode:
authorPaul Mundt <lethal@linux-sh.org>2010-01-20 02:40:48 -0500
committerPaul Mundt <lethal@linux-sh.org>2010-01-20 02:40:48 -0500
commit2efa53b269ec1e9289a108e1506f53f6f1de440b (patch)
treea5825e18be1044b2472cba5776e1ef47377f9834 /arch/sh/mm
parent5f240718b475dcddee86b138b624f24c681dbb29 (diff)
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/mm')
-rw-r--r--arch/sh/mm/init.c7
-rw-r--r--arch/sh/mm/pmb.c5
2 files changed, 5 insertions, 7 deletions
diff --git a/arch/sh/mm/init.c b/arch/sh/mm/init.c
index 32ebd1592e63..491d9d5c8e0d 100644
--- a/arch/sh/mm/init.c
+++ b/arch/sh/mm/init.c
@@ -338,10 +338,3 @@ EXPORT_SYMBOL_GPL(memory_add_physaddr_to_nid);
338#endif 338#endif
339 339
340#endif /* CONFIG_MEMORY_HOTPLUG */ 340#endif /* CONFIG_MEMORY_HOTPLUG */
341
342#ifdef CONFIG_PMB
343int __in_29bit_mode(void)
344{
345 return !(ctrl_inl(PMB_PASCR) & PASCR_SE);
346}
347#endif /* CONFIG_PMB */
diff --git a/arch/sh/mm/pmb.c b/arch/sh/mm/pmb.c
index b796b6c021b4..d318fa6caffe 100644
--- a/arch/sh/mm/pmb.c
+++ b/arch/sh/mm/pmb.c
@@ -436,6 +436,11 @@ int __uses_jump_to_uncached pmb_init(void)
436 return 0; 436 return 0;
437} 437}
438 438
439bool __in_29bit_mode(void)
440{
441 return (__raw_readl(PMB_PASCR) & PASCR_SE) == 0;
442}
443
439static int pmb_seq_show(struct seq_file *file, void *iter) 444static int pmb_seq_show(struct seq_file *file, void *iter)
440{ 445{
441 int i; 446 int i;