aboutsummaryrefslogtreecommitdiffstats
path: root/arch/parisc/kernel
diff options
context:
space:
mode:
authorJohn David Anglin <dave.anglin@bell.net>2013-04-23 16:42:07 -0400
committerHelge Deller <deller@gmx.de>2013-04-25 16:37:00 -0400
commitbda079d336cd8183e1d844a265ea87ae3e1bbe78 (patch)
tree0e2a80cf2dacd44299e55baa485dd7dd4a2ff3d9 /arch/parisc/kernel
parentcf71130d630d773ef1861adbd8a034d3ac806f3e (diff)
parisc: use spin_lock_irqsave/spin_unlock_irqrestore for PTE updates
User applications running on SMP kernels have long suffered from instability and random segmentation faults. This patch improves the situation although there is more work to be done. One of the problems is the various routines in pgtable.h that update page table entries use different locking mechanisms, or no lock at all (set_pte_at). This change modifies the routines to all use the same lock pa_dbit_lock. This lock is used for dirty bit updates in the interruption code. The patch also purges the TLB entries associated with the PTE to ensure that inconsistent values are not used after the page table entry is updated. The UP and SMP code are now identical. The change also includes a minor update to the purge_tlb_entries function in cache.c to improve its efficiency. Signed-off-by: John David Anglin <dave.anglin@bell.net> Cc: Helge Deller <deller@gmx.de> Signed-off-by: Helge Deller <deller@gmx.de>
Diffstat (limited to 'arch/parisc/kernel')
-rw-r--r--arch/parisc/kernel/cache.c5
1 files changed, 1 insertions, 4 deletions
diff --git a/arch/parisc/kernel/cache.c b/arch/parisc/kernel/cache.c
index 4b12890642eb..83ded26cad06 100644
--- a/arch/parisc/kernel/cache.c
+++ b/arch/parisc/kernel/cache.c
@@ -421,14 +421,11 @@ void purge_tlb_entries(struct mm_struct *mm, unsigned long addr)
421 /* Note: purge_tlb_entries can be called at startup with 421 /* Note: purge_tlb_entries can be called at startup with
422 no context. */ 422 no context. */
423 423
424 /* Disable preemption while we play with %sr1. */
425 preempt_disable();
426 mtsp(mm->context, 1);
427 purge_tlb_start(flags); 424 purge_tlb_start(flags);
425 mtsp(mm->context, 1);
428 pdtlb(addr); 426 pdtlb(addr);
429 pitlb(addr); 427 pitlb(addr);
430 purge_tlb_end(flags); 428 purge_tlb_end(flags);
431 preempt_enable();
432} 429}
433EXPORT_SYMBOL(purge_tlb_entries); 430EXPORT_SYMBOL(purge_tlb_entries);
434 431