riscvarchive / riscv-linux

RISC-V Linux Port
606 stars 210 forks source link

riscv: Improve atomic memory access and support -mno-atomic. #6

Closed darius-bluespec closed 10 years ago

darius-bluespec commented 10 years ago

Use CONFIG_GENERIC_ATOMIC64 if 32-bit. Add system call to emulate atomic compare exchange, primarily for targets lacking hardware suport (i.e., lacking RV32A, RV64A). Support excluding use of atomic memory instructions (-mno-atomic).

This change is mutually dependent on the corresponding change to riscv-gcc.

This change is also dependent on three patches outside of arch/riscv/ which have been submitted upstream.

a0u commented 10 years ago

Looks fine to me, thanks. Closed by 8a7d518352a82991213a6457af211801384864e1.