RISC-V: Update load reservation comment in do_interrupt
authorMichael Clark <mjc@sifive.com>
Sat, 16 Mar 2019 01:21:21 +0000 (01:21 +0000)
committerPalmer Dabbelt <palmer@sifive.com>
Tue, 19 Mar 2019 12:14:40 +0000 (05:14 -0700)
Cc: Palmer Dabbelt <palmer@sifive.com>
Cc: Alistair Francis <Alistair.Francis@wdc.com>
Signed-off-by: Michael Clark <mjc@sifive.com>
Signed-off-by: Alistair Francis <alistair.francis@wdc.com>
Signed-off-by: Palmer Dabbelt <palmer@sifive.com>
target/riscv/cpu_helper.c

index 6d3fbc3401652d30f6841fa0c266ef17e1e88753..b17f169681ad890c7313d52f2f2d7ae7a4e584e3 100644 (file)
@@ -525,7 +525,13 @@ void riscv_cpu_do_interrupt(CPUState *cs)
             ((async && (env->mtvec & 3) == 1) ? cause * 4 : 0);
         riscv_cpu_set_mode(env, PRV_M);
     }
-    /* TODO yield load reservation  */
+
+    /* NOTE: it is not necessary to yield load reservations here. It is only
+     * necessary for an SC from "another hart" to cause a load reservation
+     * to be yielded. Refer to the memory consistency model section of the
+     * RISC-V ISA Specification.
+     */
+
 #endif
     cs->exception_index = EXCP_NONE; /* mark handled to qemu */
 }