diff options
| author | Atish Patra <[email protected]> | 2019-02-12 18:32:06 -0800 |
|---|---|---|
| committer | Anup Patel <[email protected]> | 2019-02-14 09:31:18 +0530 |
| commit | 70a474d2c24dc3e0c8841e6ef5cc96797deadbf5 (patch) | |
| tree | 0c1456134e4815aadea0f523d7fb570454e23d0d /lib/sbi_misaligned_ldst.c | |
| parent | 4cb4d46875dd0f0dd01d3ff1fee4f0d6cefb857a (diff) | |
lib: Use CSR_<FOO> instead of <foo> for csr_*()
Some older toolchains may not have all the csr's defined. Update all
the csr functions to use the CSR_ #define values instead of the
toolchain defined values.
Suggested-by: Olof Johansson <[email protected]>
Signed-off-by: Atish Patra <[email protected]>
Diffstat (limited to 'lib/sbi_misaligned_ldst.c')
| -rw-r--r-- | lib/sbi_misaligned_ldst.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/sbi_misaligned_ldst.c b/lib/sbi_misaligned_ldst.c index 85222554..8ab01c18 100644 --- a/lib/sbi_misaligned_ldst.c +++ b/lib/sbi_misaligned_ldst.c @@ -26,7 +26,7 @@ int sbi_misaligned_load_handler(u32 hartid, ulong mcause, struct sbi_scratch *scratch) { union reg_data val; - ulong mstatus = csr_read(mstatus); + ulong mstatus = csr_read(CSR_MSTATUS); ulong insn = get_insn(regs->mepc, &mstatus); ulong addr = csr_read(CSR_MTVAL); int i, fp = 0, shift = 0, len = 0; @@ -112,7 +112,7 @@ int sbi_misaligned_store_handler(u32 hartid, ulong mcause, struct sbi_scratch *scratch) { union reg_data val; - ulong mstatus = csr_read(mstatus); + ulong mstatus = csr_read(CSR_MSTATUS); ulong insn = get_insn(regs->mepc, &mstatus); ulong addr = csr_read(CSR_MTVAL); int i, len = 0; |
