浏览代码

[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.

Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
Heiko Carstens 18 年之前
父节点
当前提交
c48e09131b
共有 2 个文件被更改,包括 2 次插入4 次删除
  1. 0 1
      drivers/s390/char/sclp.c
  2. 2 3
      include/asm-s390/processor.h

+ 0 - 1
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();

+ 2 - 3
include/asm-s390/processor.h

@@ -201,9 +201,8 @@ unsigned long get_wchan(struct task_struct *p);
 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();
 }
 
 /*