diff options
Diffstat (limited to 'arch/powerpc/kernel')
-rw-r--r-- | arch/powerpc/kernel/head_fsl_booke.S | 26 | ||||
-rw-r--r-- | arch/powerpc/kernel/sysfs.c | 6 |
2 files changed, 25 insertions, 7 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 |
diff --git a/arch/powerpc/kernel/sysfs.c b/arch/powerpc/kernel/sysfs.c index ef2ad92a417f..86a2ffccef25 100644 --- a/arch/powerpc/kernel/sysfs.c +++ b/arch/powerpc/kernel/sysfs.c | |||
@@ -134,6 +134,7 @@ void ppc_enable_pmcs(void) | |||
134 | } | 134 | } |
135 | EXPORT_SYMBOL(ppc_enable_pmcs); | 135 | EXPORT_SYMBOL(ppc_enable_pmcs); |
136 | 136 | ||
137 | #if defined(CONFIG_6xx) || defined(CONFIG_PPC64) | ||
137 | /* XXX convert to rusty's on_one_cpu */ | 138 | /* XXX convert to rusty's on_one_cpu */ |
138 | static unsigned long run_on_cpu(unsigned long cpu, | 139 | static unsigned long run_on_cpu(unsigned long cpu, |
139 | unsigned long (*func)(unsigned long), | 140 | unsigned long (*func)(unsigned long), |
@@ -152,6 +153,7 @@ static unsigned long run_on_cpu(unsigned long cpu, | |||
152 | 153 | ||
153 | return ret; | 154 | return ret; |
154 | } | 155 | } |
156 | #endif | ||
155 | 157 | ||
156 | #define SYSFS_PMCSETUP(NAME, ADDRESS) \ | 158 | #define SYSFS_PMCSETUP(NAME, ADDRESS) \ |
157 | static unsigned long read_##NAME(unsigned long junk) \ | 159 | static unsigned long read_##NAME(unsigned long junk) \ |
@@ -190,11 +192,11 @@ static ssize_t __used \ | |||
190 | * that are implemented on the current processor | 192 | * that are implemented on the current processor |
191 | */ | 193 | */ |
192 | 194 | ||
193 | #ifdef CONFIG_PPC64 | 195 | #if defined(CONFIG_PPC64) |
194 | #define HAS_PPC_PMC_CLASSIC 1 | 196 | #define HAS_PPC_PMC_CLASSIC 1 |
195 | #define HAS_PPC_PMC_IBM 1 | 197 | #define HAS_PPC_PMC_IBM 1 |
196 | #define HAS_PPC_PMC_PA6T 1 | 198 | #define HAS_PPC_PMC_PA6T 1 |
197 | #elif CONFIG_6xx | 199 | #elif defined(CONFIG_6xx) |
198 | #define HAS_PPC_PMC_CLASSIC 1 | 200 | #define HAS_PPC_PMC_CLASSIC 1 |
199 | #define HAS_PPC_PMC_IBM 1 | 201 | #define HAS_PPC_PMC_IBM 1 |
200 | #define HAS_PPC_PMC_G4 1 | 202 | #define HAS_PPC_PMC_G4 1 |