aboutsummaryrefslogtreecommitdiffstats
path: root/include/asm-sh/system_32.h
diff options
context:
space:
mode:
authorStuart Menefy <stuart.menefy@st.com>2007-11-30 03:06:36 -0500
committerPaul Mundt <lethal@linux-sh.org>2008-01-27 23:18:59 -0500
commitcbaa118ecfd99fc5ed7adbd9c34a30e1c05e3c93 (patch)
treee60db5c0f3573558c97f39cfab78732220a72e6d /include/asm-sh/system_32.h
parent325df7f20467da07901c4f2b006d3457bba0adec (diff)
sh: Preparation for uncached jumps through PMB.
Presently most of the 29-bit physical parts do P1/P2 segmentation with a 1:1 cached/uncached mapping, jumping between the two to control the caching behaviour. This provides the basic infrastructure to maintain this behaviour on 32-bit physical parts that don't map P1/P2 at all, using a shiny new linker section and corresponding fixmap entry. Signed-off-by: Stuart Menefy <stuart.menefy@st.com> Signed-off-by: Paul Mundt <lethal@linux-sh.org>
Diffstat (limited to 'include/asm-sh/system_32.h')
-rw-r--r--include/asm-sh/system_32.h36
1 files changed, 19 insertions, 17 deletions
diff --git a/include/asm-sh/system_32.h b/include/asm-sh/system_32.h
index ad37e8d5f31e..e918bacd5ecf 100644
--- a/include/asm-sh/system_32.h
+++ b/include/asm-sh/system_32.h
@@ -58,29 +58,31 @@ do { \
58 last = __last; \ 58 last = __last; \
59} while (0) 59} while (0)
60 60
61#define __uses_jump_to_uncached __attribute__ ((__section__ (".uncached.text")))
62
61/* 63/*
62 * Jump to P2 area. 64 * Jump to uncached area.
63 * When handling TLB or caches, we need to do it from P2 area. 65 * When handling TLB or caches, we need to do it from an uncached area.
64 */ 66 */
65#define jump_to_P2() \ 67#define jump_to_uncached() \
66do { \ 68do { \
67 unsigned long __dummy; \ 69 unsigned long __dummy; \
68 __asm__ __volatile__( \ 70 \
69 "mov.l 1f, %0\n\t" \ 71 __asm__ __volatile__( \
70 "or %1, %0\n\t" \ 72 "mova 1f, %0\n\t" \
71 "jmp @%0\n\t" \ 73 "add %1, %0\n\t" \
72 " nop\n\t" \ 74 "jmp @%0\n\t" \
73 ".balign 4\n" \ 75 " nop\n\t" \
74 "1: .long 2f\n" \ 76 ".balign 4\n" \
75 "2:" \ 77 "1:" \
76 : "=&r" (__dummy) \ 78 : "=&z" (__dummy) \
77 : "r" (0x20000000)); \ 79 : "r" (cached_to_uncached)); \
78} while (0) 80} while (0)
79 81
80/* 82/*
81 * Back to P1 area. 83 * Back to cached area.
82 */ 84 */
83#define back_to_P1() \ 85#define back_to_cached() \
84do { \ 86do { \
85 unsigned long __dummy; \ 87 unsigned long __dummy; \
86 ctrl_barrier(); \ 88 ctrl_barrier(); \