瀏覽代碼

[PARISC] Add sync required after fdc to enforce insn ordering

PA20 arch book (page 7-52 and 7-55) indicate a "sync" is required after
the FDC "to enforce instruction ordering". And we want to make
sure FIC is executed after FDC has retired.

Signed-off-by: Grant Grundler <grundler@parisc-linux.org>

Signed-off-by: Kyle McMartin <kyle@parisc-linux.org>
Grant Grundler 19 年之前
父節點
當前提交
91313d60d8
共有 1 個文件被更改,包括 1 次插入0 次删除
  1. 1 0
      arch/parisc/kernel/signal.c

+ 1 - 0
arch/parisc/kernel/signal.c

@@ -636,6 +636,7 @@ do_signal(sigset_t *oldset, struct pt_regs *regs, int in_syscall)
 			/* Stack is 64-byte aligned, and we only 
 			/* Stack is 64-byte aligned, and we only 
 			 * need to flush 1 cache line */
 			 * need to flush 1 cache line */
 			asm("fdc 0(%%sr3, %0)\n"
 			asm("fdc 0(%%sr3, %0)\n"
+			    "sync\n"
 			    "fic 0(%%sr3, %0)\n"
 			    "fic 0(%%sr3, %0)\n"
 			    "sync\n"
 			    "sync\n"
 			    : : "r"(regs->gr[30]));
 			    : : "r"(regs->gr[30]));