diff options
author | Kumar Gala <galak@kernel.crashing.org> | 2008-07-16 17:17:08 -0400 |
---|---|---|
committer | Kumar Gala <galak@kernel.crashing.org> | 2008-09-19 14:31:04 -0400 |
commit | b38fd42ff46a4a31dced8533e8a6e549693500b6 (patch) | |
tree | fa5bc10bf838f0a91dc7ac6b5104b7cf25ccc914 /arch | |
parent | 33a7f122740bd820a029faf450a9a0caa9458426 (diff) |
powerpc/fsl-booke: Fixup 64-bit PTE reading for SMP support
We need to create a false data dependency to ensure the loads of
the pte are done in the right order.
Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
Diffstat (limited to 'arch')
-rw-r--r-- | arch/powerpc/kernel/head_fsl_booke.S | 26 |
1 files changed, 21 insertions, 5 deletions
diff --git a/arch/powerpc/kernel/head_fsl_booke.S b/arch/powerpc/kernel/head_fsl_booke.S index 3cb52fa0eda3..377e0c155c95 100644 --- a/arch/powerpc/kernel/head_fsl_booke.S +++ b/arch/powerpc/kernel/head_fsl_booke.S | |||
@@ -579,13 +579,19 @@ interrupt_base: | |||
579 | 579 | ||
580 | FIND_PTE | 580 | FIND_PTE |
581 | andc. r13,r13,r11 /* Check permission */ | 581 | andc. r13,r13,r11 /* Check permission */ |
582 | bne 2f /* Bail if permission mismach */ | ||
583 | 582 | ||
584 | #ifdef CONFIG_PTE_64BIT | 583 | #ifdef CONFIG_PTE_64BIT |
585 | lwz r13, 0(r12) | 584 | #ifdef CONFIG_SMP |
585 | subf r10,r11,r12 /* create false data dep */ | ||
586 | lwzx r13,r11,r10 /* Get upper pte bits */ | ||
587 | #else | ||
588 | lwz r13,0(r12) /* Get upper pte bits */ | ||
589 | #endif | ||
586 | #endif | 590 | #endif |
587 | 591 | ||
588 | /* Jump to common tlb load */ | 592 | bne 2f /* Bail if permission/valid mismach */ |
593 | |||
594 | /* Jump to common tlb load */ | ||
589 | b finish_tlb_load | 595 | b finish_tlb_load |
590 | 2: | 596 | 2: |
591 | /* The bailout. Restore registers to pre-exception conditions | 597 | /* The bailout. Restore registers to pre-exception conditions |
@@ -640,10 +646,20 @@ interrupt_base: | |||
640 | 646 | ||
641 | FIND_PTE | 647 | FIND_PTE |
642 | andc. r13,r13,r11 /* Check permission */ | 648 | andc. r13,r13,r11 /* Check permission */ |
649 | |||
650 | #ifdef CONFIG_PTE_64BIT | ||
651 | #ifdef CONFIG_SMP | ||
652 | subf r10,r11,r12 /* create false data dep */ | ||
653 | lwzx r13,r11,r10 /* Get upper pte bits */ | ||
654 | #else | ||
655 | lwz r13,0(r12) /* Get upper pte bits */ | ||
656 | #endif | ||
657 | #endif | ||
658 | |||
643 | bne 2f /* Bail if permission mismach */ | 659 | bne 2f /* Bail if permission mismach */ |
644 | 660 | ||
645 | #ifdef CONFIG_PTE_64BIT | 661 | #ifdef CONFIG_PTE_64BIT |
646 | lwz r13, 0(r12) | 662 | lwz r13,0(r12) |
647 | #endif | 663 | #endif |
648 | 664 | ||
649 | /* Jump to common TLB load point */ | 665 | /* Jump to common TLB load point */ |
@@ -702,7 +718,7 @@ interrupt_base: | |||
702 | /* | 718 | /* |
703 | * Both the instruction and data TLB miss get to this | 719 | * Both the instruction and data TLB miss get to this |
704 | * point to load the TLB. | 720 | * point to load the TLB. |
705 | * r10 - EA of fault | 721 | * r10 - available to use |
706 | * r11 - TLB (info from Linux PTE) | 722 | * r11 - TLB (info from Linux PTE) |
707 | * r12 - available to use | 723 | * r12 - available to use |
708 | * r13 - upper bits of PTE (if PTE_64BIT) or available to use | 724 | * r13 - upper bits of PTE (if PTE_64BIT) or available to use |