diff options
Diffstat (limited to 'arch')
-rw-r--r-- | arch/sh/include/asm/addrspace.h | 6 | ||||
-rw-r--r-- | arch/sh/include/asm/mmu.h | 10 | ||||
-rw-r--r-- | arch/sh/mm/init.c | 7 | ||||
-rw-r--r-- | arch/sh/mm/pmb.c | 5 |
4 files changed, 14 insertions, 14 deletions
diff --git a/arch/sh/include/asm/addrspace.h b/arch/sh/include/asm/addrspace.h index 268efd62ed21..446b3831c214 100644 --- a/arch/sh/include/asm/addrspace.h +++ b/arch/sh/include/asm/addrspace.h | |||
@@ -65,11 +65,5 @@ | |||
65 | #define P3_ADDR_MAX P4SEG | 65 | #define P3_ADDR_MAX P4SEG |
66 | #endif | 66 | #endif |
67 | 67 | ||
68 | #ifndef __ASSEMBLY__ | ||
69 | #ifdef CONFIG_PMB | ||
70 | extern int __in_29bit_mode(void); | ||
71 | #endif /* CONFIG_PMB */ | ||
72 | #endif /* __ASSEMBLY__ */ | ||
73 | |||
74 | #endif /* __KERNEL__ */ | 68 | #endif /* __KERNEL__ */ |
75 | #endif /* __ASM_SH_ADDRSPACE_H */ | 69 | #endif /* __ASM_SH_ADDRSPACE_H */ |
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 @@ | |||
31 | 31 | ||
32 | #ifndef __ASSEMBLY__ | 32 | #ifndef __ASSEMBLY__ |
33 | #include <linux/errno.h> | 33 | #include <linux/errno.h> |
34 | #include <linux/threads.h> | ||
34 | 35 | ||
35 | /* Default "unsigned long" context */ | 36 | /* Default "unsigned long" context */ |
36 | typedef unsigned long mm_context_id_t[NR_CPUS]; | 37 | typedef unsigned long mm_context_id_t[NR_CPUS]; |
@@ -72,6 +73,7 @@ long pmb_remap(unsigned long virt, unsigned long phys, | |||
72 | unsigned long size, unsigned long flags); | 73 | unsigned long size, unsigned long flags); |
73 | void pmb_unmap(unsigned long addr); | 74 | void pmb_unmap(unsigned long addr); |
74 | int pmb_init(void); | 75 | int pmb_init(void); |
76 | bool __in_29bit_mode(void); | ||
75 | #else | 77 | #else |
76 | static inline long pmb_remap(unsigned long virt, unsigned long phys, | 78 | static inline long pmb_remap(unsigned long virt, unsigned long phys, |
77 | unsigned long size, unsigned long flags) | 79 | unsigned long size, unsigned long flags) |
@@ -87,8 +89,14 @@ static inline int pmb_init(void) | |||
87 | { | 89 | { |
88 | return -ENODEV; | 90 | return -ENODEV; |
89 | } | 91 | } |
90 | #endif /* CONFIG_PMB */ | ||
91 | 92 | ||
93 | #ifdef CONFIG_29BIT | ||
94 | #define __in_29bit_mode() (1) | ||
95 | #else | ||
96 | #define __in_29bit_mode() (0) | ||
97 | #endif | ||
98 | |||
99 | #endif /* CONFIG_PMB */ | ||
92 | #endif /* __ASSEMBLY__ */ | 100 | #endif /* __ASSEMBLY__ */ |
93 | 101 | ||
94 | #endif /* __MMU_H */ | 102 | #endif /* __MMU_H */ |
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 | ||
343 | int __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 | ||
439 | bool __in_29bit_mode(void) | ||
440 | { | ||
441 | return (__raw_readl(PMB_PASCR) & PASCR_SE) == 0; | ||
442 | } | ||
443 | |||
439 | static int pmb_seq_show(struct seq_file *file, void *iter) | 444 | static int pmb_seq_show(struct seq_file *file, void *iter) |
440 | { | 445 | { |
441 | int i; | 446 | int i; |