From: Peter Maydell <[email protected]> All the callers of cpu_get_phys_addr_debug() and cpu_get_phys_addr_attrs_debug() have now been updated to use cpu_translate_for_debug(), so we can remove them.
Signed-off-by: Peter Maydell <[email protected]> Reviewed-by: Richard Henderson <[email protected]> Reviewed-by: Philippe Mathieu-Daudé <[email protected]> Message-ID: <[email protected]> Signed-off-by: Philippe Mathieu-Daudé <[email protected]> --- include/hw/core/cpu.h | 34 ---------------------------------- hw/core/cpu-system.c | 20 -------------------- 2 files changed, 54 deletions(-) diff --git a/include/hw/core/cpu.h b/include/hw/core/cpu.h index a7256aeb9dc..59d601465b4 100644 --- a/include/hw/core/cpu.h +++ b/include/hw/core/cpu.h @@ -738,40 +738,6 @@ enum CPUDumpFlags { */ void cpu_dump_state(CPUState *cpu, FILE *f, int flags); -/** - * cpu_get_phys_addr_attrs_debug: - * @cpu: The CPU to use for the virtual-to-physical translation - * @addr: The virtual address. - * @attrs: Updated on return with the memory transaction attributes to use - * for this access. - * - * Obtains the physical address corresponding to a virtual one, together - * with the corresponding memory transaction attributes to use for the access. - * Use it only for debugging because no protection checks are done. - * - * The address need not be page-aligned; the returned address will - * be the physical address corresponding to that virtual address. - * - * Returns: Corresponding physical page address or -1 if no page found. - */ -hwaddr cpu_get_phys_addr_attrs_debug(CPUState *cpu, vaddr addr, - MemTxAttrs *attrs); - -/** - * cpu_get_phys_addr_debug: - * @cpu: The CPU to use for the virtual-to-physical translation - * @addr: The virtual address. - * - * Obtains the physical address corresponding to a virtual one. - * Use it only for debugging because no protection checks are done. - * - * The address need not be page-aligned; the returned address will - * be the physical address corresponding to that virtual address. - * - * Returns: Corresponding physical address, or -1 if no page found. - */ -hwaddr cpu_get_phys_addr_debug(CPUState *cpu, vaddr addr); - /** * TranslateForDebugResult: gives result of cpu_translate_for_debug() * diff --git a/hw/core/cpu-system.c b/hw/core/cpu-system.c index 954b81931d8..16f048c9565 100644 --- a/hw/core/cpu-system.c +++ b/hw/core/cpu-system.c @@ -87,26 +87,6 @@ bool cpu_translate_for_debug(CPUState *cpu, vaddr addr, } } -hwaddr cpu_get_phys_addr_attrs_debug(CPUState *cpu, vaddr addr, - MemTxAttrs *attrs) -{ - TranslateForDebugResult result; - - if (!cpu_translate_for_debug(cpu, addr, &result)) { - return -1; - } - - *attrs = result.attrs; - return result.physaddr; -} - -hwaddr cpu_get_phys_addr_debug(CPUState *cpu, vaddr addr) -{ - MemTxAttrs attrs = {}; - - return cpu_get_phys_addr_attrs_debug(cpu, addr, &attrs); -} - int cpu_asidx_from_attrs(CPUState *cpu, MemTxAttrs attrs) { int ret = 0; -- 2.53.0
