diff options
author | Artem Bityutskiy <Artem.Bityutskiy@nokia.com> | 2011-03-25 11:41:20 -0400 |
---|---|---|
committer | Artem Bityutskiy <Artem.Bityutskiy@nokia.com> | 2011-03-25 11:41:20 -0400 |
commit | 7bf7e370d5919112c223a269462cd0b546903829 (patch) | |
tree | 03ccc715239df14ae168277dbccc9d9cf4d8a2c8 /arch/arm/mm/proc-v7.S | |
parent | 68b1a1e786f29c900fa1c516a402e24f0ece622a (diff) | |
parent | d39dd11c3e6a7af5c20bfac40594db36cf270f42 (diff) |
Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux-2.6 into for-linus-1
* 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux-2.6: (9356 commits)
[media] rc: update for bitop name changes
fs: simplify iget & friends
fs: pull inode->i_lock up out of writeback_single_inode
fs: rename inode_lock to inode_hash_lock
fs: move i_wb_list out from under inode_lock
fs: move i_sb_list out from under inode_lock
fs: remove inode_lock from iput_final and prune_icache
fs: Lock the inode LRU list separately
fs: factor inode disposal
fs: protect inode->i_state with inode->i_lock
lib, arch: add filter argument to show_mem and fix private implementations
SLUB: Write to per cpu data when allocating it
slub: Fix debugobjects with lockless fastpath
autofs4: Do not potentially dereference NULL pointer returned by fget() in autofs_dev_ioctl_setpipefd()
autofs4 - remove autofs4_lock
autofs4 - fix d_manage() return on rcu-walk
autofs4 - fix autofs4_expire_indirect() traversal
autofs4 - fix dentry leak in autofs4_expire_direct()
autofs4 - reinstate last used update on access
vfs - check non-mountpoint dentry might block in __follow_mount_rcu()
...
NOTE!
This merge commit was created to fix compilation error. The block
tree was merged upstream and removed the 'elv_queue_empty()'
function which the new 'mtdswap' driver is using. So a simple
merge of the mtd tree with upstream does not compile. And the
mtd tree has already be published, so re-basing it is not an option.
To fix this unfortunate situation, I had to merge upstream into the
mtd-2.6.git tree without committing, put the fixup patch on top of
this, and then commit this. The result is that we do not have commits
which do not compile.
In other words, this merge commit "merges" 3 things: the MTD tree, the
upstream tree, and the fixup patch.
Diffstat (limited to 'arch/arm/mm/proc-v7.S')
-rw-r--r-- | arch/arm/mm/proc-v7.S | 128 |
1 files changed, 98 insertions, 30 deletions
diff --git a/arch/arm/mm/proc-v7.S b/arch/arm/mm/proc-v7.S index 0c1172b56b4e..262fa88a7439 100644 --- a/arch/arm/mm/proc-v7.S +++ b/arch/arm/mm/proc-v7.S | |||
@@ -108,10 +108,16 @@ ENTRY(cpu_v7_switch_mm) | |||
108 | #ifdef CONFIG_ARM_ERRATA_430973 | 108 | #ifdef CONFIG_ARM_ERRATA_430973 |
109 | mcr p15, 0, r2, c7, c5, 6 @ flush BTAC/BTB | 109 | mcr p15, 0, r2, c7, c5, 6 @ flush BTAC/BTB |
110 | #endif | 110 | #endif |
111 | #ifdef CONFIG_ARM_ERRATA_754322 | ||
112 | dsb | ||
113 | #endif | ||
111 | mcr p15, 0, r2, c13, c0, 1 @ set reserved context ID | 114 | mcr p15, 0, r2, c13, c0, 1 @ set reserved context ID |
112 | isb | 115 | isb |
113 | 1: mcr p15, 0, r0, c2, c0, 0 @ set TTB 0 | 116 | 1: mcr p15, 0, r0, c2, c0, 0 @ set TTB 0 |
114 | isb | 117 | isb |
118 | #ifdef CONFIG_ARM_ERRATA_754322 | ||
119 | dsb | ||
120 | #endif | ||
115 | mcr p15, 0, r1, c13, c0, 1 @ set context ID | 121 | mcr p15, 0, r1, c13, c0, 1 @ set context ID |
116 | isb | 122 | isb |
117 | #endif | 123 | #endif |
@@ -171,6 +177,87 @@ cpu_v7_name: | |||
171 | .ascii "ARMv7 Processor" | 177 | .ascii "ARMv7 Processor" |
172 | .align | 178 | .align |
173 | 179 | ||
180 | /* | ||
181 | * Memory region attributes with SCTLR.TRE=1 | ||
182 | * | ||
183 | * n = TEX[0],C,B | ||
184 | * TR = PRRR[2n+1:2n] - memory type | ||
185 | * IR = NMRR[2n+1:2n] - inner cacheable property | ||
186 | * OR = NMRR[2n+17:2n+16] - outer cacheable property | ||
187 | * | ||
188 | * n TR IR OR | ||
189 | * UNCACHED 000 00 | ||
190 | * BUFFERABLE 001 10 00 00 | ||
191 | * WRITETHROUGH 010 10 10 10 | ||
192 | * WRITEBACK 011 10 11 11 | ||
193 | * reserved 110 | ||
194 | * WRITEALLOC 111 10 01 01 | ||
195 | * DEV_SHARED 100 01 | ||
196 | * DEV_NONSHARED 100 01 | ||
197 | * DEV_WC 001 10 | ||
198 | * DEV_CACHED 011 10 | ||
199 | * | ||
200 | * Other attributes: | ||
201 | * | ||
202 | * DS0 = PRRR[16] = 0 - device shareable property | ||
203 | * DS1 = PRRR[17] = 1 - device shareable property | ||
204 | * NS0 = PRRR[18] = 0 - normal shareable property | ||
205 | * NS1 = PRRR[19] = 1 - normal shareable property | ||
206 | * NOS = PRRR[24+n] = 1 - not outer shareable | ||
207 | */ | ||
208 | .equ PRRR, 0xff0a81a8 | ||
209 | .equ NMRR, 0x40e040e0 | ||
210 | |||
211 | /* Suspend/resume support: derived from arch/arm/mach-s5pv210/sleep.S */ | ||
212 | .globl cpu_v7_suspend_size | ||
213 | .equ cpu_v7_suspend_size, 4 * 8 | ||
214 | #ifdef CONFIG_PM | ||
215 | ENTRY(cpu_v7_do_suspend) | ||
216 | stmfd sp!, {r4 - r11, lr} | ||
217 | mrc p15, 0, r4, c13, c0, 0 @ FCSE/PID | ||
218 | mrc p15, 0, r5, c13, c0, 1 @ Context ID | ||
219 | mrc p15, 0, r6, c3, c0, 0 @ Domain ID | ||
220 | mrc p15, 0, r7, c2, c0, 0 @ TTB 0 | ||
221 | mrc p15, 0, r8, c2, c0, 1 @ TTB 1 | ||
222 | mrc p15, 0, r9, c1, c0, 0 @ Control register | ||
223 | mrc p15, 0, r10, c1, c0, 1 @ Auxiliary control register | ||
224 | mrc p15, 0, r11, c1, c0, 2 @ Co-processor access control | ||
225 | stmia r0, {r4 - r11} | ||
226 | ldmfd sp!, {r4 - r11, pc} | ||
227 | ENDPROC(cpu_v7_do_suspend) | ||
228 | |||
229 | ENTRY(cpu_v7_do_resume) | ||
230 | mov ip, #0 | ||
231 | mcr p15, 0, ip, c8, c7, 0 @ invalidate TLBs | ||
232 | mcr p15, 0, ip, c7, c5, 0 @ invalidate I cache | ||
233 | ldmia r0, {r4 - r11} | ||
234 | mcr p15, 0, r4, c13, c0, 0 @ FCSE/PID | ||
235 | mcr p15, 0, r5, c13, c0, 1 @ Context ID | ||
236 | mcr p15, 0, r6, c3, c0, 0 @ Domain ID | ||
237 | mcr p15, 0, r7, c2, c0, 0 @ TTB 0 | ||
238 | mcr p15, 0, r8, c2, c0, 1 @ TTB 1 | ||
239 | mcr p15, 0, ip, c2, c0, 2 @ TTB control register | ||
240 | mcr p15, 0, r10, c1, c0, 1 @ Auxillary control register | ||
241 | mcr p15, 0, r11, c1, c0, 2 @ Co-processor access control | ||
242 | ldr r4, =PRRR @ PRRR | ||
243 | ldr r5, =NMRR @ NMRR | ||
244 | mcr p15, 0, r4, c10, c2, 0 @ write PRRR | ||
245 | mcr p15, 0, r5, c10, c2, 1 @ write NMRR | ||
246 | isb | ||
247 | mov r0, r9 @ control register | ||
248 | mov r2, r7, lsr #14 @ get TTB0 base | ||
249 | mov r2, r2, lsl #14 | ||
250 | ldr r3, cpu_resume_l1_flags | ||
251 | b cpu_resume_mmu | ||
252 | ENDPROC(cpu_v7_do_resume) | ||
253 | cpu_resume_l1_flags: | ||
254 | ALT_SMP(.long PMD_TYPE_SECT | PMD_SECT_AP_WRITE | PMD_FLAGS_SMP) | ||
255 | ALT_UP(.long PMD_TYPE_SECT | PMD_SECT_AP_WRITE | PMD_FLAGS_UP) | ||
256 | #else | ||
257 | #define cpu_v7_do_suspend 0 | ||
258 | #define cpu_v7_do_resume 0 | ||
259 | #endif | ||
260 | |||
174 | __CPUINIT | 261 | __CPUINIT |
175 | 262 | ||
176 | /* | 263 | /* |
@@ -264,6 +351,12 @@ __v7_setup: | |||
264 | orreq r10, r10, #1 << 6 @ set bit #6 | 351 | orreq r10, r10, #1 << 6 @ set bit #6 |
265 | mcreq p15, 0, r10, c15, c0, 1 @ write diagnostic register | 352 | mcreq p15, 0, r10, c15, c0, 1 @ write diagnostic register |
266 | #endif | 353 | #endif |
354 | #ifdef CONFIG_ARM_ERRATA_751472 | ||
355 | cmp r6, #0x30 @ present prior to r3p0 | ||
356 | mrclt p15, 0, r10, c15, c0, 1 @ read diagnostic register | ||
357 | orrlt r10, r10, #1 << 11 @ set bit #11 | ||
358 | mcrlt p15, 0, r10, c15, c0, 1 @ write diagnostic register | ||
359 | #endif | ||
267 | 360 | ||
268 | 3: mov r10, #0 | 361 | 3: mov r10, #0 |
269 | #ifdef HARVARD_CACHE | 362 | #ifdef HARVARD_CACHE |
@@ -276,36 +369,8 @@ __v7_setup: | |||
276 | ALT_SMP(orr r4, r4, #TTB_FLAGS_SMP) | 369 | ALT_SMP(orr r4, r4, #TTB_FLAGS_SMP) |
277 | ALT_UP(orr r4, r4, #TTB_FLAGS_UP) | 370 | ALT_UP(orr r4, r4, #TTB_FLAGS_UP) |
278 | mcr p15, 0, r4, c2, c0, 1 @ load TTB1 | 371 | mcr p15, 0, r4, c2, c0, 1 @ load TTB1 |
279 | /* | 372 | ldr r5, =PRRR @ PRRR |
280 | * Memory region attributes with SCTLR.TRE=1 | 373 | ldr r6, =NMRR @ NMRR |
281 | * | ||
282 | * n = TEX[0],C,B | ||
283 | * TR = PRRR[2n+1:2n] - memory type | ||
284 | * IR = NMRR[2n+1:2n] - inner cacheable property | ||
285 | * OR = NMRR[2n+17:2n+16] - outer cacheable property | ||
286 | * | ||
287 | * n TR IR OR | ||
288 | * UNCACHED 000 00 | ||
289 | * BUFFERABLE 001 10 00 00 | ||
290 | * WRITETHROUGH 010 10 10 10 | ||
291 | * WRITEBACK 011 10 11 11 | ||
292 | * reserved 110 | ||
293 | * WRITEALLOC 111 10 01 01 | ||
294 | * DEV_SHARED 100 01 | ||
295 | * DEV_NONSHARED 100 01 | ||
296 | * DEV_WC 001 10 | ||
297 | * DEV_CACHED 011 10 | ||
298 | * | ||
299 | * Other attributes: | ||
300 | * | ||
301 | * DS0 = PRRR[16] = 0 - device shareable property | ||
302 | * DS1 = PRRR[17] = 1 - device shareable property | ||
303 | * NS0 = PRRR[18] = 0 - normal shareable property | ||
304 | * NS1 = PRRR[19] = 1 - normal shareable property | ||
305 | * NOS = PRRR[24+n] = 1 - not outer shareable | ||
306 | */ | ||
307 | ldr r5, =0xff0a81a8 @ PRRR | ||
308 | ldr r6, =0x40e040e0 @ NMRR | ||
309 | mcr p15, 0, r5, c10, c2, 0 @ write PRRR | 374 | mcr p15, 0, r5, c10, c2, 0 @ write PRRR |
310 | mcr p15, 0, r6, c10, c2, 1 @ write NMRR | 375 | mcr p15, 0, r6, c10, c2, 1 @ write NMRR |
311 | #endif | 376 | #endif |
@@ -351,6 +416,9 @@ ENTRY(v7_processor_functions) | |||
351 | .word cpu_v7_dcache_clean_area | 416 | .word cpu_v7_dcache_clean_area |
352 | .word cpu_v7_switch_mm | 417 | .word cpu_v7_switch_mm |
353 | .word cpu_v7_set_pte_ext | 418 | .word cpu_v7_set_pte_ext |
419 | .word 0 | ||
420 | .word 0 | ||
421 | .word 0 | ||
354 | .size v7_processor_functions, . - v7_processor_functions | 422 | .size v7_processor_functions, . - v7_processor_functions |
355 | 423 | ||
356 | .section ".rodata" | 424 | .section ".rodata" |