[PATCH 07/13] target/mips: Let page_table_walk_refill() take MMUAccessType argument

Philippe Mathieu-Daudé posted 13 patches 5 years ago
Maintainers: Jiaxun Yang <jiaxun.yang@flygoat.com>, Aurelien Jarno <aurelien@aurel32.net>, Aleksandar Rikalo <aleksandar.rikalo@syrmia.com>, "Philippe Mathieu-Daudé" <f4bug@amsat.org>
[PATCH 07/13] target/mips: Let page_table_walk_refill() take MMUAccessType argument
Posted by Philippe Mathieu-Daudé 5 years ago
The single caller, mips_cpu_tlb_fill(), passes MMUAccessType
to page_table_walk_refill(). Let the prototype use it as
argument, as it is stricter than an integer.

Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
---
 target/mips/tlb_helper.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/target/mips/tlb_helper.c b/target/mips/tlb_helper.c
index 9216c7a91b3..afcc269750d 100644
--- a/target/mips/tlb_helper.c
+++ b/target/mips/tlb_helper.c
@@ -621,8 +621,8 @@ static int walk_directory(CPUMIPSState *env, uint64_t *vaddr,
     }
 }
 
-static bool page_table_walk_refill(CPUMIPSState *env, vaddr address, int rw,
-        int mmu_idx)
+static bool page_table_walk_refill(CPUMIPSState *env, vaddr address,
+                                   MMUAccessType access_type, int mmu_idx)
 {
     int gdw = (env->CP0_PWSize >> CP0PS_GDW) & 0x3F;
     int udw = (env->CP0_PWSize >> CP0PS_UDW) & 0x3F;
-- 
2.26.2

Re: [PATCH 07/13] target/mips: Let page_table_walk_refill() take MMUAccessType argument
Posted by Richard Henderson 5 years ago
On 1/28/21 4:41 AM, Philippe Mathieu-Daudé wrote:
> -static bool page_table_walk_refill(CPUMIPSState *env, vaddr address, int rw,
> -        int mmu_idx)
> +static bool page_table_walk_refill(CPUMIPSState *env, vaddr address,
> +                                   MMUAccessType access_type, int mmu_idx)

The parameter name has changed without any other change to the function.  If
this compiles, it surely means that the parameter is unused.


r~

Re: [PATCH 07/13] target/mips: Let page_table_walk_refill() take MMUAccessType argument
Posted by Jiaxun Yang 5 years ago
在 2021/1/28 下午10:41, Philippe Mathieu-Daudé 写道:
> The single caller, mips_cpu_tlb_fill(), passes MMUAccessType
> to page_table_walk_refill(). Let the prototype use it as
> argument, as it is stricter than an integer.
>
> Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>

Reviewed-by: Jiaxun Yang <jiaxun.yang@flygoat.com>

> ---
>   target/mips/tlb_helper.c | 4 ++--
>   1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/target/mips/tlb_helper.c b/target/mips/tlb_helper.c
> index 9216c7a91b3..afcc269750d 100644
> --- a/target/mips/tlb_helper.c
> +++ b/target/mips/tlb_helper.c
> @@ -621,8 +621,8 @@ static int walk_directory(CPUMIPSState *env, uint64_t *vaddr,
>       }
>   }
>   
> -static bool page_table_walk_refill(CPUMIPSState *env, vaddr address, int rw,
> -        int mmu_idx)
> +static bool page_table_walk_refill(CPUMIPSState *env, vaddr address,
> +                                   MMUAccessType access_type, int mmu_idx)
>   {
>       int gdw = (env->CP0_PWSize >> CP0PS_GDW) & 0x3F;
>       int udw = (env->CP0_PWSize >> CP0PS_UDW) & 0x3F;