aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--arch/powerpc/kernel/head_8xx.S41
1 files changed, 8 insertions, 33 deletions
diff --git a/arch/powerpc/kernel/head_8xx.S b/arch/powerpc/kernel/head_8xx.S
index 73715cd0de45..32cc9e55b772 100644
--- a/arch/powerpc/kernel/head_8xx.S
+++ b/arch/powerpc/kernel/head_8xx.S
@@ -329,12 +329,9 @@ InstructionTLBMiss:
329 /* Extract level 1 index */ 329 /* Extract level 1 index */
330 rlwinm r10, r10, 32 - ((PAGE_SHIFT - 2) << 1), (PAGE_SHIFT - 2) << 1, 29 330 rlwinm r10, r10, 32 - ((PAGE_SHIFT - 2) << 1), (PAGE_SHIFT - 2) << 1, 29
331 lwzx r11, r10, r11 /* Get the level 1 entry */ 331 lwzx r11, r10, r11 /* Get the level 1 entry */
332 rlwinm. r10, r11,0,0,19 /* Extract page descriptor page address */ 332 rlwinm r10, r11,0,0,19 /* Extract page descriptor page address */
333 beq 2f /* If zero, don't try to find a pte */
334 333
335 /* We have a pte table, so load the MI_TWC with the attributes 334 /* Load the MI_TWC with the attributes for this "segment." */
336 * for this "segment."
337 */
338 MTSPR_CPU6(SPRN_MI_TWC, r11, r3) /* Set segment attributes */ 335 MTSPR_CPU6(SPRN_MI_TWC, r11, r3) /* Set segment attributes */
339 mfspr r11, SPRN_SRR0 /* Get effective address of fault */ 336 mfspr r11, SPRN_SRR0 /* Get effective address of fault */
340 /* Extract level 2 index */ 337 /* Extract level 2 index */
@@ -342,13 +339,11 @@ InstructionTLBMiss:
342 lwzx r10, r10, r11 /* Get the pte */ 339 lwzx r10, r10, r11 /* Get the pte */
343 340
344#ifdef CONFIG_SWAP 341#ifdef CONFIG_SWAP
345 andi. r11, r10, _PAGE_ACCESSED | _PAGE_PRESENT 342 rlwinm r11, r10, 32-5, _PAGE_PRESENT
346 cmpwi cr0, r11, _PAGE_ACCESSED | _PAGE_PRESENT 343 and r11, r11, r10
347 li r11, RPN_PATTERN 344 rlwimi r10, r11, 0, _PAGE_PRESENT
348 bne- cr0, 2f
349#else
350 li r11, RPN_PATTERN
351#endif 345#endif
346 li r11, RPN_PATTERN
352 /* The Linux PTE won't go exactly into the MMU TLB. 347 /* The Linux PTE won't go exactly into the MMU TLB.
353 * Software indicator bits 21 and 28 must be clear. 348 * Software indicator bits 21 and 28 must be clear.
354 * Software indicator bits 24, 25, 26, and 27 must be 349 * Software indicator bits 24, 25, 26, and 27 must be
@@ -366,21 +361,6 @@ InstructionTLBMiss:
366 mfspr r10, SPRN_SPRG_SCRATCH2 361 mfspr r10, SPRN_SPRG_SCRATCH2
367 EXCEPTION_EPILOG_0 362 EXCEPTION_EPILOG_0
368 rfi 363 rfi
3692:
370 mfspr r10, SPRN_SRR1
371 /* clear all error bits as TLB Miss
372 * sets a few unconditionally
373 */
374 rlwinm r10, r10, 0, 0xffff
375 mtspr SPRN_SRR1, r10
376
377 /* Restore registers */
378#ifdef CONFIG_8xx_CPU6
379 mfspr r3, SPRN_DAR
380 mtspr SPRN_DAR, r11 /* Tag DAR */
381#endif
382 mfspr r10, SPRN_SPRG_SCRATCH2
383 b InstructionTLBError1
384 364
385 . = 0x1200 365 . = 0x1200
386DataStoreTLBMiss: 366DataStoreTLBMiss:
@@ -403,8 +383,6 @@ DataStoreTLBMiss:
403 /* Extract level 1 index */ 383 /* Extract level 1 index */
404 rlwinm r10, r10, 32 - ((PAGE_SHIFT - 2) << 1), (PAGE_SHIFT - 2) << 1, 29 384 rlwinm r10, r10, 32 - ((PAGE_SHIFT - 2) << 1), (PAGE_SHIFT - 2) << 1, 29
405 lwzx r11, r10, r11 /* Get the level 1 entry */ 385 lwzx r11, r10, r11 /* Get the level 1 entry */
406 rlwinm. r10, r11,0,0,19 /* Extract page descriptor page address */
407 beq 2f /* If zero, don't try to find a pte */
408 386
409 /* We have a pte table, so load fetch the pte from the table. 387 /* We have a pte table, so load fetch the pte from the table.
410 */ 388 */
@@ -447,7 +425,7 @@ DataStoreTLBMiss:
447 * set. All other Linux PTE bits control the behavior 425 * set. All other Linux PTE bits control the behavior
448 * of the MMU. 426 * of the MMU.
449 */ 427 */
4502: li r11, RPN_PATTERN 428 li r11, RPN_PATTERN
451 rlwimi r10, r11, 0, 24, 28 /* Set 24-27, clear 28 */ 429 rlwimi r10, r11, 0, 24, 28 /* Set 24-27, clear 28 */
452 MTSPR_CPU6(SPRN_MD_RPN, r10, r3) /* Update TLB entry */ 430 MTSPR_CPU6(SPRN_MD_RPN, r10, r3) /* Update TLB entry */
453 431
@@ -466,10 +444,7 @@ DataStoreTLBMiss:
466 */ 444 */
467 . = 0x1300 445 . = 0x1300
468InstructionTLBError: 446InstructionTLBError:
469 EXCEPTION_PROLOG_0 447 EXCEPTION_PROLOG
470InstructionTLBError1:
471 EXCEPTION_PROLOG_1
472 EXCEPTION_PROLOG_2
473 mr r4,r12 448 mr r4,r12
474 mr r5,r9 449 mr r5,r9
475 andis. r10,r5,0x4000 450 andis. r10,r5,0x4000