diff options
Diffstat (limited to 'arch/powerpc/kernel/head_fsl_booke.S')
-rw-r--r-- | arch/powerpc/kernel/head_fsl_booke.S | 49 |
1 files changed, 27 insertions, 22 deletions
diff --git a/arch/powerpc/kernel/head_fsl_booke.S b/arch/powerpc/kernel/head_fsl_booke.S index fe37dd0dfd17..50845924b7d9 100644 --- a/arch/powerpc/kernel/head_fsl_booke.S +++ b/arch/powerpc/kernel/head_fsl_booke.S | |||
@@ -346,11 +346,12 @@ interrupt_base: | |||
346 | /* Data TLB Error Interrupt */ | 346 | /* Data TLB Error Interrupt */ |
347 | START_EXCEPTION(DataTLBError) | 347 | START_EXCEPTION(DataTLBError) |
348 | mtspr SPRN_SPRG_WSCRATCH0, r10 /* Save some working registers */ | 348 | mtspr SPRN_SPRG_WSCRATCH0, r10 /* Save some working registers */ |
349 | mtspr SPRN_SPRG_WSCRATCH1, r11 | 349 | mfspr r10, SPRN_SPRG_THREAD |
350 | mtspr SPRN_SPRG_WSCRATCH2, r12 | 350 | stw r11, THREAD_NORMSAVE(0)(r10) |
351 | mtspr SPRN_SPRG_WSCRATCH3, r13 | 351 | stw r12, THREAD_NORMSAVE(1)(r10) |
352 | mfcr r11 | 352 | stw r13, THREAD_NORMSAVE(2)(r10) |
353 | mtspr SPRN_SPRG_WSCRATCH4, r11 | 353 | mfcr r13 |
354 | stw r13, THREAD_NORMSAVE(3)(r10) | ||
354 | mfspr r10, SPRN_DEAR /* Get faulting address */ | 355 | mfspr r10, SPRN_DEAR /* Get faulting address */ |
355 | 356 | ||
356 | /* If we are faulting a kernel address, we have to use the | 357 | /* If we are faulting a kernel address, we have to use the |
@@ -416,11 +417,12 @@ interrupt_base: | |||
416 | /* The bailout. Restore registers to pre-exception conditions | 417 | /* The bailout. Restore registers to pre-exception conditions |
417 | * and call the heavyweights to help us out. | 418 | * and call the heavyweights to help us out. |
418 | */ | 419 | */ |
419 | mfspr r11, SPRN_SPRG_RSCRATCH4 | 420 | mfspr r10, SPRN_SPRG_THREAD |
421 | lwz r11, THREAD_NORMSAVE(3)(r10) | ||
420 | mtcr r11 | 422 | mtcr r11 |
421 | mfspr r13, SPRN_SPRG_RSCRATCH3 | 423 | lwz r13, THREAD_NORMSAVE(2)(r10) |
422 | mfspr r12, SPRN_SPRG_RSCRATCH2 | 424 | lwz r12, THREAD_NORMSAVE(1)(r10) |
423 | mfspr r11, SPRN_SPRG_RSCRATCH1 | 425 | lwz r11, THREAD_NORMSAVE(0)(r10) |
424 | mfspr r10, SPRN_SPRG_RSCRATCH0 | 426 | mfspr r10, SPRN_SPRG_RSCRATCH0 |
425 | b DataStorage | 427 | b DataStorage |
426 | 428 | ||
@@ -432,11 +434,12 @@ interrupt_base: | |||
432 | */ | 434 | */ |
433 | START_EXCEPTION(InstructionTLBError) | 435 | START_EXCEPTION(InstructionTLBError) |
434 | mtspr SPRN_SPRG_WSCRATCH0, r10 /* Save some working registers */ | 436 | mtspr SPRN_SPRG_WSCRATCH0, r10 /* Save some working registers */ |
435 | mtspr SPRN_SPRG_WSCRATCH1, r11 | 437 | mfspr r10, SPRN_SPRG_THREAD |
436 | mtspr SPRN_SPRG_WSCRATCH2, r12 | 438 | stw r11, THREAD_NORMSAVE(0)(r10) |
437 | mtspr SPRN_SPRG_WSCRATCH3, r13 | 439 | stw r12, THREAD_NORMSAVE(1)(r10) |
438 | mfcr r11 | 440 | stw r13, THREAD_NORMSAVE(2)(r10) |
439 | mtspr SPRN_SPRG_WSCRATCH4, r11 | 441 | mfcr r13 |
442 | stw r13, THREAD_NORMSAVE(3)(r10) | ||
440 | mfspr r10, SPRN_SRR0 /* Get faulting address */ | 443 | mfspr r10, SPRN_SRR0 /* Get faulting address */ |
441 | 444 | ||
442 | /* If we are faulting a kernel address, we have to use the | 445 | /* If we are faulting a kernel address, we have to use the |
@@ -496,11 +499,12 @@ interrupt_base: | |||
496 | /* The bailout. Restore registers to pre-exception conditions | 499 | /* The bailout. Restore registers to pre-exception conditions |
497 | * and call the heavyweights to help us out. | 500 | * and call the heavyweights to help us out. |
498 | */ | 501 | */ |
499 | mfspr r11, SPRN_SPRG_RSCRATCH4 | 502 | mfspr r10, SPRN_SPRG_THREAD |
503 | lwz r11, THREAD_NORMSAVE(3)(r10) | ||
500 | mtcr r11 | 504 | mtcr r11 |
501 | mfspr r13, SPRN_SPRG_RSCRATCH3 | 505 | lwz r13, THREAD_NORMSAVE(2)(r10) |
502 | mfspr r12, SPRN_SPRG_RSCRATCH2 | 506 | lwz r12, THREAD_NORMSAVE(1)(r10) |
503 | mfspr r11, SPRN_SPRG_RSCRATCH1 | 507 | lwz r11, THREAD_NORMSAVE(0)(r10) |
504 | mfspr r10, SPRN_SPRG_RSCRATCH0 | 508 | mfspr r10, SPRN_SPRG_RSCRATCH0 |
505 | b InstructionStorage | 509 | b InstructionStorage |
506 | 510 | ||
@@ -621,11 +625,12 @@ END_MMU_FTR_SECTION_IFSET(MMU_FTR_BIG_PHYS) | |||
621 | tlbwe | 625 | tlbwe |
622 | 626 | ||
623 | /* Done...restore registers and get out of here. */ | 627 | /* Done...restore registers and get out of here. */ |
624 | mfspr r11, SPRN_SPRG_RSCRATCH4 | 628 | mfspr r10, SPRN_SPRG_THREAD |
629 | lwz r11, THREAD_NORMSAVE(3)(r10) | ||
625 | mtcr r11 | 630 | mtcr r11 |
626 | mfspr r13, SPRN_SPRG_RSCRATCH3 | 631 | lwz r13, THREAD_NORMSAVE(2)(r10) |
627 | mfspr r12, SPRN_SPRG_RSCRATCH2 | 632 | lwz r12, THREAD_NORMSAVE(1)(r10) |
628 | mfspr r11, SPRN_SPRG_RSCRATCH1 | 633 | lwz r11, THREAD_NORMSAVE(0)(r10) |
629 | mfspr r10, SPRN_SPRG_RSCRATCH0 | 634 | mfspr r10, SPRN_SPRG_RSCRATCH0 |
630 | rfi /* Force context change */ | 635 | rfi /* Force context change */ |
631 | 636 | ||