All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] parisc: Ensure volatile space register %sr1 is not clobbered (v2)
@ 2013-06-29 20:42 John David Anglin
  0 siblings, 0 replies; only message in thread
From: John David Anglin @ 2013-06-29 20:42 UTC (permalink / raw)
  To: linux-parisc List; +Cc: Helge Deller, James E.J. Bottomley

[-- Attachment #1: Type: text/plain, Size: 214 bytes --]

This patch is functionally identical to the previous one except the  
computation of the space id
is moved outside the lock region in the first hunk.

Signed-off-by: John David Anglin  <dave.anglin@bell.net>
---



[-- Attachment #2: sr1-v2.d.txt --]
[-- Type: text/plain, Size: 1051 bytes --]

diff --git a/arch/parisc/include/asm/tlbflush.h b/arch/parisc/include/asm/tlbflush.h
index 5273da9..d703061 100644
--- a/arch/parisc/include/asm/tlbflush.h
+++ b/arch/parisc/include/asm/tlbflush.h
@@ -63,13 +63,14 @@ static inline void flush_tlb_mm(struct mm_struct *mm)
 static inline void flush_tlb_page(struct vm_area_struct *vma,
 	unsigned long addr)
 {
-	unsigned long flags;
+	unsigned long flags, sid;
 
 	/* For one page, it's not worth testing the split_tlb variable */
 
 	mb();
-	mtsp(vma->vm_mm->context,1);
+	sid = vma->vm_mm->context;
 	purge_tlb_start(flags);
+	mtsp(sid,1);
 	pdtlb(addr);
 	pitlb(addr);
 	purge_tlb_end(flags);
diff --git a/arch/parisc/kernel/cache.c b/arch/parisc/kernel/cache.c
index 65fb4cb..2e65aa5 100644
--- a/arch/parisc/kernel/cache.c
+++ b/arch/parisc/kernel/cache.c
@@ -440,8 +440,8 @@ void __flush_tlb_range(unsigned long sid, unsigned long start,
 	else {
 		unsigned long flags;
 
-		mtsp(sid, 1);
 		purge_tlb_start(flags);
+		mtsp(sid, 1);
 		if (split_tlb) {
 			while (npages--) {
 				pdtlb(start);

[-- Attachment #3: Type: text/plain, Size: 45 bytes --]



--
John David Anglin	dave.anglin@bell.net


^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2013-06-29 20:42 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-06-29 20:42 [PATCH] parisc: Ensure volatile space register %sr1 is not clobbered (v2) John David Anglin

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.