aboutsummaryrefslogtreecommitdiffstats
path: root/arch/ppc64
diff options
context:
space:
mode:
authorPaul Mackerras <paulus@samba.org>2005-09-28 23:13:36 -0400
committerPaul Mackerras <paulus@samba.org>2005-09-28 23:13:36 -0400
commitab11d1ea281e85895369ef57c5259ad8a432fabb (patch)
tree684147479c6a8bb2fbed21bdcf12de1dd519c730 /arch/ppc64
parent952ecef7a0479049c8abb7c34a688ec2981ceadd (diff)
parent664cceb0093b755739e56572b836a99104ee8a75 (diff)
Merge by hand from Linus' tree.
Signed-off-by: Paul Mackerras <paulus@samba.org>
Diffstat (limited to 'arch/ppc64')
-rw-r--r--arch/ppc64/kernel/machine_kexec.c1
-rw-r--r--arch/ppc64/mm/hash_native.c5
-rw-r--r--arch/ppc64/mm/tlb.c6
3 files changed, 7 insertions, 5 deletions
diff --git a/arch/ppc64/kernel/machine_kexec.c b/arch/ppc64/kernel/machine_kexec.c
index 4775f12a013c..bf7cc4f8210f 100644
--- a/arch/ppc64/kernel/machine_kexec.c
+++ b/arch/ppc64/kernel/machine_kexec.c
@@ -205,6 +205,7 @@ static void kexec_prepare_cpus(void)
205 continue; 205 continue;
206 206
207 while (paca[i].hw_cpu_id != -1) { 207 while (paca[i].hw_cpu_id != -1) {
208 barrier();
208 if (!cpu_possible(i)) { 209 if (!cpu_possible(i)) {
209 printk("kexec: cpu %d hw_cpu_id %d is not" 210 printk("kexec: cpu %d hw_cpu_id %d is not"
210 " possible, ignoring\n", 211 " possible, ignoring\n",
diff --git a/arch/ppc64/mm/hash_native.c b/arch/ppc64/mm/hash_native.c
index 874cf96938ff..174d14576c28 100644
--- a/arch/ppc64/mm/hash_native.c
+++ b/arch/ppc64/mm/hash_native.c
@@ -342,14 +342,13 @@ static void native_flush_hash_range(unsigned long number, int local)
342 hpte_t *hptep; 342 hpte_t *hptep;
343 unsigned long hpte_v; 343 unsigned long hpte_v;
344 struct ppc64_tlb_batch *batch = &__get_cpu_var(ppc64_tlb_batch); 344 struct ppc64_tlb_batch *batch = &__get_cpu_var(ppc64_tlb_batch);
345 unsigned long large; 345 unsigned long large = batch->large;
346 346
347 local_irq_save(flags); 347 local_irq_save(flags);
348 348
349 j = 0; 349 j = 0;
350 for (i = 0; i < number; i++) { 350 for (i = 0; i < number; i++) {
351 va = batch->vaddr[j]; 351 va = batch->vaddr[j];
352 large = pte_huge(batch->pte[i]);
353 if (large) 352 if (large)
354 vpn = va >> HPAGE_SHIFT; 353 vpn = va >> HPAGE_SHIFT;
355 else 354 else
@@ -399,7 +398,7 @@ static void native_flush_hash_range(unsigned long number, int local)
399 asm volatile("ptesync":::"memory"); 398 asm volatile("ptesync":::"memory");
400 399
401 for (i = 0; i < j; i++) 400 for (i = 0; i < j; i++)
402 __tlbie(batch->vaddr[i], 0); 401 __tlbie(batch->vaddr[i], large);
403 402
404 asm volatile("eieio; tlbsync; ptesync":::"memory"); 403 asm volatile("eieio; tlbsync; ptesync":::"memory");
405 404
diff --git a/arch/ppc64/mm/tlb.c b/arch/ppc64/mm/tlb.c
index 31afd95bf870..09ab81a10f4f 100644
--- a/arch/ppc64/mm/tlb.c
+++ b/arch/ppc64/mm/tlb.c
@@ -141,12 +141,14 @@ void hpte_update(struct mm_struct *mm, unsigned long addr,
141 * up scanning and resetting referenced bits then our batch context 141 * up scanning and resetting referenced bits then our batch context
142 * will change mid stream. 142 * will change mid stream.
143 */ 143 */
144 if (unlikely(i != 0 && mm != batch->mm)) { 144 if (i != 0 && (mm != batch->mm || batch->large != pte_huge(pte))) {
145 flush_tlb_pending(); 145 flush_tlb_pending();
146 i = 0; 146 i = 0;
147 } 147 }
148 if (i == 0) 148 if (i == 0) {
149 batch->mm = mm; 149 batch->mm = mm;
150 batch->large = pte_huge(pte);
151 }
150 if (addr < KERNELBASE) { 152 if (addr < KERNELBASE) {
151 vsid = get_vsid(mm->context.id, addr); 153 vsid = get_vsid(mm->context.id, addr);
152 WARN_ON(vsid == 0); 154 WARN_ON(vsid == 0);