[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PULL 02/38] exec: Reduce tlb_set_dirty() declaration scope
From: |
Philippe Mathieu-Daudé |
Subject: |
[PULL 02/38] exec: Reduce tlb_set_dirty() declaration scope |
Date: |
Fri, 26 Apr 2024 21:41:22 +0200 |
tlb_set_dirty() is only used in accel/tcg/cputlb.c,
where it is defined. Declare it statically, removing
the stub.
Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Reviewed-by: Harsh Prateek Bora <harshpb@linux.ibm.com>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Message-Id: <20240418192525.97451-11-philmd@linaro.org>
---
include/exec/exec-all.h | 1 -
accel/stubs/tcg-stub.c | 4 ----
accel/tcg/cputlb.c | 2 +-
3 files changed, 1 insertion(+), 6 deletions(-)
diff --git a/include/exec/exec-all.h b/include/exec/exec-all.h
index 3e53501691..9599e16a09 100644
--- a/include/exec/exec-all.h
+++ b/include/exec/exec-all.h
@@ -654,7 +654,6 @@ static inline void mmap_unlock(void) {}
#define WITH_MMAP_LOCK_GUARD()
void tlb_reset_dirty(CPUState *cpu, ram_addr_t start1, ram_addr_t length);
-void tlb_set_dirty(CPUState *cpu, vaddr addr);
void tlb_reset_dirty_range_all(ram_addr_t start, ram_addr_t length);
MemoryRegionSection *
diff --git a/accel/stubs/tcg-stub.c b/accel/stubs/tcg-stub.c
index 8a496a2a6f..dd890d6cf6 100644
--- a/accel/stubs/tcg-stub.c
+++ b/accel/stubs/tcg-stub.c
@@ -18,10 +18,6 @@ void tb_flush(CPUState *cpu)
{
}
-void tlb_set_dirty(CPUState *cpu, vaddr vaddr)
-{
-}
-
int probe_access_flags(CPUArchState *env, vaddr addr, int size,
MMUAccessType access_type, int mmu_idx,
bool nonfault, void **phost, uintptr_t retaddr)
diff --git a/accel/tcg/cputlb.c b/accel/tcg/cputlb.c
index 93b1ca810b..e16d02a62c 100644
--- a/accel/tcg/cputlb.c
+++ b/accel/tcg/cputlb.c
@@ -1039,7 +1039,7 @@ static inline void tlb_set_dirty1_locked(CPUTLBEntry
*tlb_entry,
/* update the TLB corresponding to virtual page vaddr
so that it is no longer dirty */
-void tlb_set_dirty(CPUState *cpu, vaddr addr)
+static void tlb_set_dirty(CPUState *cpu, vaddr addr)
{
int mmu_idx;
--
2.41.0
- [PULL 00/38] Exec / accelerators patches, Philippe Mathieu-Daudé, 2024/04/26
- [PULL 02/38] exec: Reduce tlb_set_dirty() declaration scope,
Philippe Mathieu-Daudé <=
- [PULL 01/38] exec: Rename NEED_CPU_H -> COMPILING_PER_TARGET, Philippe Mathieu-Daudé, 2024/04/26
- [PULL 04/38] exec: Expose 'target_page.h' API to user emulation, Philippe Mathieu-Daudé, 2024/04/26
- [PULL 03/38] exec: Include 'cpu.h' before validating CPUArchState placement, Philippe Mathieu-Daudé, 2024/04/26
- [PULL 05/38] accel: Include missing 'exec/cpu_ldst.h' header, Philippe Mathieu-Daudé, 2024/04/26
- [PULL 06/38] gdbstub: Include missing 'hw/core/cpu.h' header, Philippe Mathieu-Daudé, 2024/04/26
- [PULL 07/38] gdbstub: Simplify #ifdef'ry in helpers.h, Philippe Mathieu-Daudé, 2024/04/26
- [PULL 08/38] gdbstub: Avoid including 'cpu.h' in 'gdbstub/helpers.h', Philippe Mathieu-Daudé, 2024/04/26
- [PULL 09/38] semihosting/uaccess: Avoid including 'cpu.h', Philippe Mathieu-Daudé, 2024/04/26
- [PULL 10/38] semihosting/guestfd: Remove unused 'semihosting/uaccess.h' header, Philippe Mathieu-Daudé, 2024/04/26
- [PULL 11/38] target: Define TCG_GUEST_DEFAULT_MO in 'cpu-param.h', Philippe Mathieu-Daudé, 2024/04/26