accel/tcg: Unify declarations of tb_invalidate_phys_range

We missed this function when we introduced tb_page_addr_t.

Reviewed-by: Alex Bennée <alex.bennee@linaro.org>
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
This commit is contained in:
Richard Henderson 2022-10-05 13:50:32 -07:00
parent d6d1fd2973
commit 65cd34e8c4
3 changed files with 3 additions and 14 deletions

View File

@ -20,6 +20,7 @@
#include "qemu/osdep.h" #include "qemu/osdep.h"
#include "exec/cputlb.h" #include "exec/cputlb.h"
#include "exec/log.h" #include "exec/log.h"
#include "exec/exec-all.h"
#include "exec/translate-all.h" #include "exec/translate-all.h"
#include "sysemu/tcg.h" #include "sysemu/tcg.h"
#include "tcg/tcg.h" #include "tcg/tcg.h"
@ -27,12 +28,6 @@
#include "tb-context.h" #include "tb-context.h"
#include "internal.h" #include "internal.h"
/* FIXME: tb_invalidate_phys_range is declared in different places. */
#ifdef CONFIG_USER_ONLY
#include "exec/exec-all.h"
#else
#include "exec/ram_addr.h"
#endif
static bool tb_cmp(const void *ap, const void *bp) static bool tb_cmp(const void *ap, const void *bp)
{ {
@ -599,11 +594,7 @@ void tb_invalidate_phys_page(tb_page_addr_t addr)
* *
* Called with mmap_lock held for user-mode emulation. * Called with mmap_lock held for user-mode emulation.
*/ */
#ifdef CONFIG_SOFTMMU void tb_invalidate_phys_range(tb_page_addr_t start, tb_page_addr_t end)
void tb_invalidate_phys_range(ram_addr_t start, ram_addr_t end)
#else
void tb_invalidate_phys_range(target_ulong start, target_ulong end)
#endif
{ {
struct page_collection *pages; struct page_collection *pages;
tb_page_addr_t next; tb_page_addr_t next;

View File

@ -638,12 +638,12 @@ uint32_t curr_cflags(CPUState *cpu);
/* TranslationBlock invalidate API */ /* TranslationBlock invalidate API */
#if defined(CONFIG_USER_ONLY) #if defined(CONFIG_USER_ONLY)
void tb_invalidate_phys_addr(target_ulong addr); void tb_invalidate_phys_addr(target_ulong addr);
void tb_invalidate_phys_range(target_ulong start, target_ulong end);
#else #else
void tb_invalidate_phys_addr(AddressSpace *as, hwaddr addr, MemTxAttrs attrs); void tb_invalidate_phys_addr(AddressSpace *as, hwaddr addr, MemTxAttrs attrs);
#endif #endif
void tb_flush(CPUState *cpu); void tb_flush(CPUState *cpu);
void tb_phys_invalidate(TranslationBlock *tb, tb_page_addr_t page_addr); void tb_phys_invalidate(TranslationBlock *tb, tb_page_addr_t page_addr);
void tb_invalidate_phys_range(tb_page_addr_t start, tb_page_addr_t end);
void tb_set_jmp_target(TranslationBlock *tb, int n, uintptr_t addr); void tb_set_jmp_target(TranslationBlock *tb, int n, uintptr_t addr);
/* GETPC is the true target of the return instruction that we'll execute. */ /* GETPC is the true target of the return instruction that we'll execute. */

View File

@ -147,8 +147,6 @@ static inline void qemu_ram_block_writeback(RAMBlock *block)
#define DIRTY_CLIENTS_ALL ((1 << DIRTY_MEMORY_NUM) - 1) #define DIRTY_CLIENTS_ALL ((1 << DIRTY_MEMORY_NUM) - 1)
#define DIRTY_CLIENTS_NOCODE (DIRTY_CLIENTS_ALL & ~(1 << DIRTY_MEMORY_CODE)) #define DIRTY_CLIENTS_NOCODE (DIRTY_CLIENTS_ALL & ~(1 << DIRTY_MEMORY_CODE))
void tb_invalidate_phys_range(ram_addr_t start, ram_addr_t end);
static inline bool cpu_physical_memory_get_dirty(ram_addr_t start, static inline bool cpu_physical_memory_get_dirty(ram_addr_t start,
ram_addr_t length, ram_addr_t length,
unsigned client) unsigned client)