[libcpu/riscv/c906] fix "next_asid" type error (#7031)

MAX_ASID最大为0x10000,在next_asid==MAX_ASID时进入下一个generation。因此next_asid不能只有16位,否则将不能进入下一个generation。修改rt_uint16_t为rt_uint32_t。
This commit is contained in:
chenhy0106 2023-03-09 20:25:54 +08:00 committed by GitHub
parent 95fea2f159
commit f6847af0cd
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -42,7 +42,7 @@ volatile __attribute__((aligned(4 * 1024)))
rt_ubase_t MMUTable[__SIZE(VPN2_BIT)]; rt_ubase_t MMUTable[__SIZE(VPN2_BIT)];
static rt_uint8_t ASID_BITS = 0; static rt_uint8_t ASID_BITS = 0;
static rt_uint16_t next_asid; static rt_uint32_t next_asid;
static rt_uint64_t global_asid_generation; static rt_uint64_t global_asid_generation;
#define ASID_MASK ((1 << ASID_BITS) - 1) #define ASID_MASK ((1 << ASID_BITS) - 1)
#define ASID_FIRST_GENERATION (1 << ASID_BITS) #define ASID_FIRST_GENERATION (1 << ASID_BITS)