diff options
| author | Philippe Mathieu-Daudé <philmd@linaro.org> | 2024-01-29 17:44:46 +0100 |
|---|---|---|
| committer | Thomas Huth <thuth@redhat.com> | 2024-03-12 11:46:16 +0100 |
| commit | 94956d7b510d18f4449d1392b86e1a8f3e467612 (patch) | |
| tree | a3366429557d71ed9a4a8b77a1a2d0ce540dacaa /target/hppa/mem_helper.c | |
| parent | 97e03106018301969f9e7c1eb22d3838adbe0bcc (diff) | |
| download | focaccia-qemu-94956d7b510d18f4449d1392b86e1a8f3e467612.tar.gz focaccia-qemu-94956d7b510d18f4449d1392b86e1a8f3e467612.zip | |
bulk: Call in place single use cpu_env()
Avoid CPUArchState local variable when cpu_env() is used once.
Mechanical patch using the following Coccinelle spatch script:
@@
type CPUArchState;
identifier env;
expression cs;
@@
{
- CPUArchState *env = cpu_env(cs);
... when != env
- env
+ cpu_env(cs)
... when != env
}
Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Message-ID: <20240129164514.73104-5-philmd@linaro.org>
Signed-off-by: Thomas Huth <thuth@redhat.com>
Diffstat (limited to 'target/hppa/mem_helper.c')
| -rw-r--r-- | target/hppa/mem_helper.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/target/hppa/mem_helper.c b/target/hppa/mem_helper.c index 3fc895c1c2..80f51e753f 100644 --- a/target/hppa/mem_helper.c +++ b/target/hppa/mem_helper.c @@ -538,7 +538,6 @@ void HELPER(iitlbt_pa20)(CPUHPPAState *env, target_ulong r1, target_ulong r2) /* Purge (Insn/Data) TLB. */ static void ptlb_work(CPUState *cpu, run_on_cpu_data data) { - CPUHPPAState *env = cpu_env(cpu); vaddr start = data.target_ptr; vaddr end; @@ -552,7 +551,7 @@ static void ptlb_work(CPUState *cpu, run_on_cpu_data data) end = (vaddr)TARGET_PAGE_SIZE << (2 * end); end = start + end - 1; - hppa_flush_tlb_range(env, start, end); + hppa_flush_tlb_range(cpu_env(cpu), start, end); } /* This is local to the current cpu. */ |