summaryrefslogtreecommitdiff
path: root/arch/parisc/kernel
diff options
context:
space:
mode:
authorHelge Deller <deller@gmx.de>2013-02-20 22:35:36 +0100
committerHelge Deller <deller@gmx.de>2013-02-20 22:35:36 +0100
commit26ad19d8ebdb73869341b1b4159d32c0f0755946 (patch)
tree7861bb4df8b452ad5f71c8818d5f814f483f2150 /arch/parisc/kernel
parent19f949f52599ba7c3f67a5897ac6be14bfcb1200 (diff)
parent6c700d71f7faecb540b3fa4303edb5323a2768c1 (diff)
Merge tag 'parisc-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/parisc-2.6 into stable-3.8
PARISC fixes on 20130213 This is a couple of patches, one to fix a broken build with HPUX compatibility and the other to solve a coherency problem we've been seeing in our TLB where setting a page read only occasionally fails to trigger a COW because of a stale writeable TLB entry. Signed-off-by: James Bottomley <JBottomley@Parallels.com>
Diffstat (limited to 'arch/parisc/kernel')
-rw-r--r--arch/parisc/kernel/cache.c18
1 files changed, 18 insertions, 0 deletions
diff --git a/arch/parisc/kernel/cache.c b/arch/parisc/kernel/cache.c
index 48e16dc20102..b89a85ab945e 100644
--- a/arch/parisc/kernel/cache.c
+++ b/arch/parisc/kernel/cache.c
@@ -419,6 +419,24 @@ void kunmap_parisc(void *addr)
EXPORT_SYMBOL(kunmap_parisc);
#endif
+void purge_tlb_entries(struct mm_struct *mm, unsigned long addr)
+{
+ unsigned long flags;
+
+ /* Note: purge_tlb_entries can be called at startup with
+ no context. */
+
+ /* Disable preemption while we play with %sr1. */
+ preempt_disable();
+ mtsp(mm->context, 1);
+ purge_tlb_start(flags);
+ pdtlb(addr);
+ pitlb(addr);
+ purge_tlb_end(flags);
+ preempt_enable();
+}
+EXPORT_SYMBOL(purge_tlb_entries);
+
void __flush_tlb_range(unsigned long sid, unsigned long start,
unsigned long end)
{