riscv: Avoid io read/write cause wrong result
authorNick Hu <nick.hu@sifive.com>
Mon, 18 Oct 2021 03:50:05 +0000 (11:50 +0800)
committerLeo Yu-Chi Liang <ycliang@andestech.com>
Wed, 20 Oct 2021 02:59:17 +0000 (10:59 +0800)
commitddf4972834fdf33f0a3360ff4a68fde333995113
treec704b0558d4ab6a32c95327865ebb7fa6b37208f
parentb18c4ae82f266d81281d63ac58945d92ed67afde
riscv: Avoid io read/write cause wrong result

io read/write may cause wrong result because they may read/write data
from/to register instead of memory. Add 'volatile' to avoid it.

Signed-off-by: Nick Hu <nick.hu@sifive.com>
Reviewed-by: Leo Yu-Chi Liang <ycliang@andestech.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
arch/riscv/include/asm/io.h