[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH 10/24] exec: Reduce tlb_set_dirty() declaration scope
From: |
Philippe Mathieu-Daudé |
Subject: |
[PATCH 10/24] exec: Reduce tlb_set_dirty() declaration scope |
Date: |
Thu, 18 Apr 2024 21:25:09 +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>
---
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 e4cff08db4..778c82ba8e 100644
--- a/include/exec/exec-all.h
+++ b/include/exec/exec-all.h
@@ -641,7 +641,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);
#endif
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
- Re: [PATCH 03/24] hw/core: Avoid including the full 'hw/core/cpu.h' in 'tcg-cpu-ops.h', (continued)
- [PATCH 04/24] exec: Restrict TCG specific declarations of 'cputlb.h', Philippe Mathieu-Daudé, 2024/04/18
- [PATCH 05/24] exec: Restrict 'cpu_ldst.h' to TCG accelerator, Philippe Mathieu-Daudé, 2024/04/18
- [PATCH 07/24] exec: Un-inline tlb_vaddr_to_host() and declare it in 'exec/cputlb.h', Philippe Mathieu-Daudé, 2024/04/18
- [PATCH 06/24] exec: Have guest_addr_valid() methods take abi_ptr/size_t arguments, Philippe Mathieu-Daudé, 2024/04/18
- [PATCH 10/24] exec: Reduce tlb_set_dirty() declaration scope,
Philippe Mathieu-Daudé <=
- [PATCH 11/24] exec: Move tlb_reset_dirty*() declarations to 'exec/cputlb.h', Philippe Mathieu-Daudé, 2024/04/18
- [PATCH 09/24] physmem: Restrict TCG CPU IOTLB code to TCG accel, Philippe Mathieu-Daudé, 2024/04/18
- [PATCH 08/24] physmem: Move TCG CPU IOTLB methods around, Philippe Mathieu-Daudé, 2024/04/18
- [PATCH 13/24] target/sparc: Replace abi_ulong by uint32_t for TARGET_ABI32, Philippe Mathieu-Daudé, 2024/04/18
- [PATCH 12/24] exec: Move CPUTLBEntry helpers to cputlb.c, Philippe Mathieu-Daudé, 2024/04/18