aboutsummaryrefslogtreecommitdiffstats
path: root/arch/mn10300/mm
diff options
context:
space:
mode:
authorAkira Takeuchi <takeuchi.akr@jp.panasonic.com>2010-10-27 12:28:48 -0400
committerDavid Howells <dhowells@redhat.com>2010-10-27 12:28:48 -0400
commit8f19e3daf3fffee9e18a8812067a6a4b538ae6c8 (patch)
tree854a50f4fae7f35688171cb20874cfddabda99a4 /arch/mn10300/mm
parent633171861a3120af011bb1ee8dd40069951dfeac (diff)
MN10300: AM34 erratum requires MMUCTR read and write on exception entry
An AM34 erratum requires MMUCTR read and write on entry to certain exceptions, prior to EPSW.NMID being cleared to allow NMIs to happen. Signed-off-by: Akira Takeuchi <takeuchi.akr@jp.panasonic.com> Signed-off-by: Kiyoshi Owada <owada.kiyoshi@jp.panasonic.com> Signed-off-by: David Howells <dhowells@redhat.com>
Diffstat (limited to 'arch/mn10300/mm')
-rw-r--r--arch/mn10300/mm/tlb-mn10300.S32
1 files changed, 26 insertions, 6 deletions
diff --git a/arch/mn10300/mm/tlb-mn10300.S b/arch/mn10300/mm/tlb-mn10300.S
index 7095147dcb8..ccf622999a5 100644
--- a/arch/mn10300/mm/tlb-mn10300.S
+++ b/arch/mn10300/mm/tlb-mn10300.S
@@ -27,7 +27,6 @@
27############################################################################### 27###############################################################################
28 .type itlb_miss,@function 28 .type itlb_miss,@function
29ENTRY(itlb_miss) 29ENTRY(itlb_miss)
30 and ~EPSW_NMID,epsw
31#ifdef CONFIG_GDBSTUB 30#ifdef CONFIG_GDBSTUB
32 movm [d2,d3,a2],(sp) 31 movm [d2,d3,a2],(sp)
33#else 32#else
@@ -38,6 +37,12 @@ ENTRY(itlb_miss)
38 nop 37 nop
39#endif 38#endif
40 39
40#if defined(CONFIG_ERRATUM_NEED_TO_RELOAD_MMUCTR)
41 mov (MMUCTR),d2
42 mov d2,(MMUCTR)
43#endif
44
45 and ~EPSW_NMID,epsw
41 mov (IPTEU),d3 46 mov (IPTEU),d3
42 mov (PTBR),a2 47 mov (PTBR),a2
43 mov d3,d2 48 mov d3,d2
@@ -79,7 +84,6 @@ itlb_miss_fault:
79############################################################################### 84###############################################################################
80 .type dtlb_miss,@function 85 .type dtlb_miss,@function
81ENTRY(dtlb_miss) 86ENTRY(dtlb_miss)
82 and ~EPSW_NMID,epsw
83#ifdef CONFIG_GDBSTUB 87#ifdef CONFIG_GDBSTUB
84 movm [d2,d3,a2],(sp) 88 movm [d2,d3,a2],(sp)
85#else 89#else
@@ -90,6 +94,12 @@ ENTRY(dtlb_miss)
90 nop 94 nop
91#endif 95#endif
92 96
97#if defined(CONFIG_ERRATUM_NEED_TO_RELOAD_MMUCTR)
98 mov (MMUCTR),d2
99 mov d2,(MMUCTR)
100#endif
101
102 and ~EPSW_NMID,epsw
93 mov (DPTEU),d3 103 mov (DPTEU),d3
94 mov (PTBR),a2 104 mov (PTBR),a2
95 mov d3,d2 105 mov d3,d2
@@ -130,9 +140,15 @@ dtlb_miss_fault:
130############################################################################### 140###############################################################################
131 .type itlb_aerror,@function 141 .type itlb_aerror,@function
132ENTRY(itlb_aerror) 142ENTRY(itlb_aerror)
133 and ~EPSW_NMID,epsw
134 add -4,sp 143 add -4,sp
135 SAVE_ALL 144 SAVE_ALL
145
146#if defined(CONFIG_ERRATUM_NEED_TO_RELOAD_MMUCTR)
147 mov (MMUCTR),d1
148 mov d1,(MMUCTR)
149#endif
150
151 and ~EPSW_NMID,epsw
136 add -4,sp # need to pass three params 152 add -4,sp # need to pass three params
137 153
138 # calculate the fault code 154 # calculate the fault code
@@ -148,7 +164,6 @@ ENTRY(itlb_aerror)
148 clr d0 164 clr d0
149 mov d0,(IPTEL) 165 mov d0,(IPTEL)
150 166
151 and ~EPSW_NMID,epsw
152 or EPSW_IE,epsw 167 or EPSW_IE,epsw
153 mov fp,d0 168 mov fp,d0
154 call do_page_fault[],0 # do_page_fault(regs,code,addr 169 call do_page_fault[],0 # do_page_fault(regs,code,addr
@@ -163,10 +178,16 @@ ENTRY(itlb_aerror)
163############################################################################### 178###############################################################################
164 .type dtlb_aerror,@function 179 .type dtlb_aerror,@function
165ENTRY(dtlb_aerror) 180ENTRY(dtlb_aerror)
166 and ~EPSW_NMID,epsw
167 add -4,sp 181 add -4,sp
168 SAVE_ALL 182 SAVE_ALL
183
184#if defined(CONFIG_ERRATUM_NEED_TO_RELOAD_MMUCTR)
185 mov (MMUCTR),d1
186 mov d1,(MMUCTR)
187#endif
188
169 add -4,sp # need to pass three params 189 add -4,sp # need to pass three params
190 and ~EPSW_NMID,epsw
170 191
171 # calculate the fault code 192 # calculate the fault code
172 movhu (MMUFCR_DFC),d1 193 movhu (MMUFCR_DFC),d1
@@ -180,7 +201,6 @@ ENTRY(dtlb_aerror)
180 clr d0 201 clr d0
181 mov d0,(DPTEL) 202 mov d0,(DPTEL)
182 203
183 and ~EPSW_NMID,epsw
184 or EPSW_IE,epsw 204 or EPSW_IE,epsw
185 mov fp,d0 205 mov fp,d0
186 call do_page_fault[],0 # do_page_fault(regs,code,addr 206 call do_page_fault[],0 # do_page_fault(regs,code,addr