mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-06 17:23:56 -06:00
target/riscv: Remove atomic accesses to MIP CSR
Instead of relying on atomics to access the MIP register let's update our helper function to instead just lock the IO mutex thread before writing. This follows the same concept as used in PPC for handling interrupts Signed-off-by: Alistair Francis <alistair.francis@wdc.com> Reviewed-by: Richard Henderson <richard.henderson@linaro.org> Reviewed-by: Palmer Dabbelt <palmer@dabbelt.com> Signed-off-by: Palmer Dabbelt <palmer@sifive.com> Signed-off-by: Palmer Dabbelt <palmer@dabbelt.com>
This commit is contained in:
parent
f480f6e8c5
commit
7ec5d3030b
4 changed files with 21 additions and 43 deletions
|
@ -579,7 +579,7 @@ static int rmw_mip(CPURISCVState *env, int csrno, target_ulong *ret_value,
|
|||
if (mask) {
|
||||
old_mip = riscv_cpu_update_mip(cpu, mask, (new_value & mask));
|
||||
} else {
|
||||
old_mip = atomic_read(&env->mip);
|
||||
old_mip = env->mip;
|
||||
}
|
||||
|
||||
if (ret_value) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue