|
From: | LIU Zhiwei |
Subject: | Re: [PATCH 2/2] target/riscv: Support xtheadmaee for thead-c906 |
Date: | Wed, 31 Jan 2024 14:21:18 +0800 |
User-agent: | Mozilla Thunderbird |
On 2024/1/31 13:07, Richard Henderson wrote:
On 1/30/24 21:11, LIU Zhiwei wrote:+riscv_csr_operations th_csr_ops[CSR_TABLE_SIZE] = { +#if !defined(CONFIG_USER_ONLY)+ [CSR_TH_MXSTATUS] = { "th_mxstatus", th_maee_check, read_th_mxstatus,+ write_th_mxstatus}, +#endif /* !CONFIG_USER_ONLY */ +};This is clearly the wrong data structure for a single entry in the array.
This array should have the same size with csr_ops so that we can override custom CSR behavior directly. Besides, It will have other entries in the near future.
I see that I missed surround the th_maee_check, read_th_mxstatus, write_mxstatus with !CONFIG_USER_ONLY. But I don't understand why it is wrong for a single entry in the array, at least the compiler think it has no error.
Thanks, Zhiwei
r~
[Prev in Thread] | Current Thread | [Next in Thread] |