Skip to contentSkip to conversation

Small barrier() and cpu_relax() cleanup.

S390 Martin Schwidefsky 1 participant 1 message Jan 26, 2007 s390

lore
Share & tools
lore
#0 lore raw

From: Heiko Carstens <[email protected]>

[S390] Small barrier() and cpu_relax() cleanup.

cpu_relax() has barrier() semantics hence there is no need to use both of them in conjunction in sclp_sync_wait(). Also change cpu_relax() so it's more obvious that it has barrier semantics.

---

 drivers/s390/char/sclp.c     |    1 -
 include/asm-s390/processor.h |    5 ++---
 2 files changed, 2 insertions(+), 4 deletions(-)
drivers/s390/char/sclp.c +0 -1
diff -urpN linux-2.6/drivers/s390/char/sclp.c linux-2.6-patched/drivers/s390/char/sclp.c
@@ -433,7 +433,6 @@ sclp_sync_wait(void)
 		    get_clock() > timeout &&
 		    del_timer(&sclp_request_timer))
 			sclp_request_timer.function(sclp_request_timer.data);
-		barrier();
 		cpu_relax();
 	}
 	local_irq_disable();
include/asm-s390/processor.h +2 -3
diff -urpN linux-2.6/include/asm-s390/processor.h linux-2.6-patched/include/asm-s390/processor.h
@@ -201,9 +201,8 @@ unsigned long get_wchan(struct task_stru
 static inline void cpu_relax(void)
 {
 	if (MACHINE_HAS_DIAG44)
-		asm volatile("diag 0,0,68" : : : "memory");
-	else
-		barrier();
+		asm volatile("diag 0,0,68");
+	barrier();
 }
 
 /*