[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH] target/riscv/pmp: Raise exception if no PMP entry is configu
From: |
Richard Henderson |
Subject: |
Re: [PATCH] target/riscv/pmp: Raise exception if no PMP entry is configured |
Date: |
Tue, 22 Dec 2020 18:49:56 -0800 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.10.0 |
On 12/22/20 5:21 PM, Atish Patra wrote:
> +++ b/target/riscv/pmp.c
> @@ -74,7 +74,7 @@ static inline int pmp_is_locked(CPURISCVState *env,
> uint32_t pmp_index)
> /*
> * Count the number of active rules.
> */
> -static inline uint32_t pmp_get_num_rules(CPURISCVState *env)
> +inline uint32_t pmp_get_num_rules(CPURISCVState *env)
> {
> return env->pmp_state.num_rules;
> }
...
> --- a/target/riscv/pmp.h
> +++ b/target/riscv/pmp.h
> @@ -64,5 +64,6 @@ bool pmp_is_range_in_tlb(CPURISCVState *env, hwaddr tlb_sa,
> target_ulong *tlb_size);
> void pmp_update_rule_addr(CPURISCVState *env, uint32_t pmp_index);
> void pmp_update_rule_nums(CPURISCVState *env);
> +uint32_t pmp_get_num_rules(CPURISCVState *env);
You need to remove the inline as well.
r~