diff options
author | Akira Takeuchi <takeuchi.akr@jp.panasonic.com> | 2010-10-27 12:28:50 -0400 |
---|---|---|
committer | David Howells <dhowells@redhat.com> | 2010-10-27 12:28:50 -0400 |
commit | dccbf4853a31a3f774f38c402209d23388d99f52 (patch) | |
tree | ec13031e27ee4ee5687dc2e178e6edcf86227e4c /arch/mn10300/mm | |
parent | a9bc60ebfd5766ce5f6095d0fed3d9978990122f (diff) |
MN10300: Use the [ID]PTEL2 registers rather than [ID]PTEL for TLB control
Use the [ID]PTEL2 registers rather than [ID]PTEL for TLB control as the bits
are a more suitable layout.
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.S | 27 |
1 files changed, 19 insertions, 8 deletions
diff --git a/arch/mn10300/mm/tlb-mn10300.S b/arch/mn10300/mm/tlb-mn10300.S index ccf622999a5b..b9940177d81b 100644 --- a/arch/mn10300/mm/tlb-mn10300.S +++ b/arch/mn10300/mm/tlb-mn10300.S | |||
@@ -61,10 +61,16 @@ ENTRY(itlb_miss) | |||
61 | btst _PAGE_VALID,d2 | 61 | btst _PAGE_VALID,d2 |
62 | beq itlb_miss_fault # jump if doesn't point to a page | 62 | beq itlb_miss_fault # jump if doesn't point to a page |
63 | # (might be a swap id) | 63 | # (might be a swap id) |
64 | #if ((_PAGE_ACCESSED & 0xffffff00) == 0) | ||
64 | bset _PAGE_ACCESSED,(0,a2) | 65 | bset _PAGE_ACCESSED,(0,a2) |
65 | and ~(xPTEL_UNUSED1|xPTEL_UNUSED2),d2 | 66 | #elif ((_PAGE_ACCESSED & 0xffff00ff) == 0) |
67 | bset +(_PAGE_ACCESSED >> 8),(1,a2) | ||
68 | #else | ||
69 | #error "_PAGE_ACCESSED value is out of range" | ||
70 | #endif | ||
71 | and ~xPTEL2_UNUSED1,d2 | ||
66 | itlb_miss_set: | 72 | itlb_miss_set: |
67 | mov d2,(IPTEL) # change the TLB | 73 | mov d2,(IPTEL2) # change the TLB |
68 | #ifdef CONFIG_GDBSTUB | 74 | #ifdef CONFIG_GDBSTUB |
69 | movm (sp),[d2,d3,a2] | 75 | movm (sp),[d2,d3,a2] |
70 | #endif | 76 | #endif |
@@ -118,10 +124,16 @@ ENTRY(dtlb_miss) | |||
118 | btst _PAGE_VALID,d2 | 124 | btst _PAGE_VALID,d2 |
119 | beq dtlb_miss_fault # jump if doesn't point to a page | 125 | beq dtlb_miss_fault # jump if doesn't point to a page |
120 | # (might be a swap id) | 126 | # (might be a swap id) |
127 | #if ((_PAGE_ACCESSED & 0xffffff00) == 0) | ||
121 | bset _PAGE_ACCESSED,(0,a2) | 128 | bset _PAGE_ACCESSED,(0,a2) |
122 | and ~(xPTEL_UNUSED1|xPTEL_UNUSED2),d2 | 129 | #elif ((_PAGE_ACCESSED & 0xffff00ff) == 0) |
130 | bset +(_PAGE_ACCESSED >> 8),(1,a2) | ||
131 | #else | ||
132 | #error "_PAGE_ACCESSED value is out of range" | ||
133 | #endif | ||
134 | and ~xPTEL2_UNUSED1,d2 | ||
123 | dtlb_miss_set: | 135 | dtlb_miss_set: |
124 | mov d2,(DPTEL) # change the TLB | 136 | mov d2,(DPTEL2) # change the TLB |
125 | #ifdef CONFIG_GDBSTUB | 137 | #ifdef CONFIG_GDBSTUB |
126 | movm (sp),[d2,d3,a2] | 138 | movm (sp),[d2,d3,a2] |
127 | #endif | 139 | #endif |
@@ -156,13 +168,12 @@ ENTRY(itlb_aerror) | |||
156 | or 0x00010000,d1 # it's an instruction fetch | 168 | or 0x00010000,d1 # it's an instruction fetch |
157 | 169 | ||
158 | # determine the page address | 170 | # determine the page address |
159 | mov (IPTEU),a2 | 171 | mov (IPTEU),d0 |
160 | mov a2,d0 | ||
161 | and PAGE_MASK,d0 | 172 | and PAGE_MASK,d0 |
162 | mov d0,(12,sp) | 173 | mov d0,(12,sp) |
163 | 174 | ||
164 | clr d0 | 175 | clr d0 |
165 | mov d0,(IPTEL) | 176 | mov d0,(IPTEL2) |
166 | 177 | ||
167 | or EPSW_IE,epsw | 178 | or EPSW_IE,epsw |
168 | mov fp,d0 | 179 | mov fp,d0 |
@@ -199,7 +210,7 @@ ENTRY(dtlb_aerror) | |||
199 | mov d0,(12,sp) | 210 | mov d0,(12,sp) |
200 | 211 | ||
201 | clr d0 | 212 | clr d0 |
202 | mov d0,(DPTEL) | 213 | mov d0,(DPTEL2) |
203 | 214 | ||
204 | or EPSW_IE,epsw | 215 | or EPSW_IE,epsw |
205 | mov fp,d0 | 216 | mov fp,d0 |