mirror of
https://github.com/yuzu-emu/unicorn.git
synced 2024-12-31 23:15:44 +00:00
exec: remove ram_addr argument from qemu_ram_block_from_host
Of the two callers, one does not use it, and the other can compute it itself based on the other output argument (offset) and the RAMBlock. Backports commit f615f39616c4fd1a3a3b078af8d75bb4be6390de from qemu
This commit is contained in:
parent
f26f1f123c
commit
918c626847
|
@ -1433,7 +1433,6 @@ static void *qemu_ram_ptr_length(struct uc_struct *uc, RAMBlock *ram_block,
|
|||
* ram_addr_t.
|
||||
*/
|
||||
RAMBlock *qemu_ram_block_from_host(struct uc_struct* uc, void *ptr, bool round_offset,
|
||||
ram_addr_t *ram_addr,
|
||||
ram_addr_t *offset)
|
||||
{
|
||||
RAMBlock *block;
|
||||
|
@ -1461,7 +1460,6 @@ found:
|
|||
if (round_offset) {
|
||||
*offset &= TARGET_PAGE_MASK;
|
||||
}
|
||||
*ram_addr = block->offset + *offset;
|
||||
return block;
|
||||
}
|
||||
|
||||
|
@ -1491,10 +1489,10 @@ RAMBlock *qemu_ram_block_by_name(struct uc_struct* uc, const char *name)
|
|||
MemoryRegion *qemu_ram_addr_from_host(struct uc_struct* uc, void *ptr, ram_addr_t *ram_addr)
|
||||
{
|
||||
RAMBlock *block;
|
||||
ram_addr_t offset; /* Not used */
|
||||
|
||||
block = qemu_ram_block_from_host(uc, ptr, false, ram_addr, &offset);
|
||||
ram_addr_t offset;
|
||||
|
||||
block = qemu_ram_block_from_host(uc, ptr, false, &offset);
|
||||
*ram_addr = block->offset + offset;
|
||||
if (!block) {
|
||||
return NULL;
|
||||
}
|
||||
|
|
|
@ -51,7 +51,7 @@ void qemu_ram_remap(struct uc_struct *uc, ram_addr_t addr, ram_addr_t length);
|
|||
MemoryRegion *qemu_ram_addr_from_host(struct uc_struct* uc, void *ptr, ram_addr_t *ram_addr);
|
||||
RAMBlock *qemu_ram_block_by_name(struct uc_struct* uc, const char *name);
|
||||
RAMBlock *qemu_ram_block_from_host(struct uc_struct* uc, void *ptr, bool round_offset,
|
||||
ram_addr_t *ram_addr, ram_addr_t *offset);
|
||||
ram_addr_t *offset);
|
||||
void qemu_ram_set_idstr(struct uc_struct *uc, RAMBlock *block, const char *name, DeviceState *dev);
|
||||
void qemu_ram_unset_idstr(struct uc_struct *uc, RAMBlock *block);
|
||||
const char *qemu_ram_get_idstr(RAMBlock *rb);
|
||||
|
|
Loading…
Reference in a new issue