diff options
author | Benjamin Herrenschmidt <benh@kernel.crashing.org> | 2010-02-16 18:00:42 -0500 |
---|---|---|
committer | Benjamin Herrenschmidt <benh@kernel.crashing.org> | 2010-02-16 18:00:42 -0500 |
commit | ec144a81ade915b5b38adedf10e84690813ed768 (patch) | |
tree | c94b53c971ab2c39e27433267318b3c7bc86ff1b /arch/powerpc | |
parent | b919ee827e048826786fd7e889a2b04f63382fe6 (diff) | |
parent | 88626272549b94310975932a9970d11a9b362a16 (diff) |
Merge commit 'origin/master' into next
Diffstat (limited to 'arch/powerpc')
-rw-r--r-- | arch/powerpc/mm/tlb_hash64.c | 12 | ||||
-rw-r--r-- | arch/powerpc/platforms/pseries/xics.c | 14 |
2 files changed, 21 insertions, 5 deletions
diff --git a/arch/powerpc/mm/tlb_hash64.c b/arch/powerpc/mm/tlb_hash64.c index 282d9306361..1ec06576f61 100644 --- a/arch/powerpc/mm/tlb_hash64.c +++ b/arch/powerpc/mm/tlb_hash64.c | |||
@@ -63,15 +63,21 @@ void hpte_need_flush(struct mm_struct *mm, unsigned long addr, | |||
63 | if (huge) { | 63 | if (huge) { |
64 | #ifdef CONFIG_HUGETLB_PAGE | 64 | #ifdef CONFIG_HUGETLB_PAGE |
65 | psize = get_slice_psize(mm, addr); | 65 | psize = get_slice_psize(mm, addr); |
66 | /* Mask the address for the correct page size */ | ||
67 | addr &= ~((1UL << mmu_psize_defs[psize].shift) - 1); | ||
66 | #else | 68 | #else |
67 | BUG(); | 69 | BUG(); |
68 | psize = pte_pagesize_index(mm, addr, pte); /* shutup gcc */ | 70 | psize = pte_pagesize_index(mm, addr, pte); /* shutup gcc */ |
69 | #endif | 71 | #endif |
70 | } else | 72 | } else { |
71 | psize = pte_pagesize_index(mm, addr, pte); | 73 | psize = pte_pagesize_index(mm, addr, pte); |
74 | /* Mask the address for the standard page size. If we | ||
75 | * have a 64k page kernel, but the hardware does not | ||
76 | * support 64k pages, this might be different from the | ||
77 | * hardware page size encoded in the slice table. */ | ||
78 | addr &= PAGE_MASK; | ||
79 | } | ||
72 | 80 | ||
73 | /* Mask the address for the correct page size */ | ||
74 | addr &= ~((1UL << mmu_psize_defs[psize].shift) - 1); | ||
75 | 81 | ||
76 | /* Build full vaddr */ | 82 | /* Build full vaddr */ |
77 | if (!is_kernel_addr(addr)) { | 83 | if (!is_kernel_addr(addr)) { |
diff --git a/arch/powerpc/platforms/pseries/xics.c b/arch/powerpc/platforms/pseries/xics.c index e9a52ec05a0..63eaa8a220c 100644 --- a/arch/powerpc/platforms/pseries/xics.c +++ b/arch/powerpc/platforms/pseries/xics.c | |||
@@ -784,9 +784,13 @@ static void xics_set_cpu_priority(unsigned char cppr) | |||
784 | { | 784 | { |
785 | struct xics_cppr *os_cppr = &__get_cpu_var(xics_cppr); | 785 | struct xics_cppr *os_cppr = &__get_cpu_var(xics_cppr); |
786 | 786 | ||
787 | BUG_ON(os_cppr->index != 0); | 787 | /* |
788 | * we only really want to set the priority when there's | ||
789 | * just one cppr value on the stack | ||
790 | */ | ||
791 | WARN_ON(os_cppr->index != 0); | ||
788 | 792 | ||
789 | os_cppr->stack[os_cppr->index] = cppr; | 793 | os_cppr->stack[0] = cppr; |
790 | 794 | ||
791 | if (firmware_has_feature(FW_FEATURE_LPAR)) | 795 | if (firmware_has_feature(FW_FEATURE_LPAR)) |
792 | lpar_cppr_info(cppr); | 796 | lpar_cppr_info(cppr); |
@@ -821,8 +825,14 @@ void xics_setup_cpu(void) | |||
821 | 825 | ||
822 | void xics_teardown_cpu(void) | 826 | void xics_teardown_cpu(void) |
823 | { | 827 | { |
828 | struct xics_cppr *os_cppr = &__get_cpu_var(xics_cppr); | ||
824 | int cpu = smp_processor_id(); | 829 | int cpu = smp_processor_id(); |
825 | 830 | ||
831 | /* | ||
832 | * we have to reset the cppr index to 0 because we're | ||
833 | * not going to return from the IPI | ||
834 | */ | ||
835 | os_cppr->index = 0; | ||
826 | xics_set_cpu_priority(0); | 836 | xics_set_cpu_priority(0); |
827 | 837 | ||
828 | /* Clear any pending IPI request */ | 838 | /* Clear any pending IPI request */ |