mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-04 00:03:54 -06:00
memory: inline a few small accessors
These are used in the address_space_* fast paths. Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
This commit is contained in:
parent
a203ac702e
commit
1619d1fe73
2 changed files with 18 additions and 24 deletions
20
memory.c
20
memory.c
|
@ -1403,11 +1403,6 @@ const char *memory_region_name(const MemoryRegion *mr)
|
|||
return mr->name;
|
||||
}
|
||||
|
||||
bool memory_region_is_ram(MemoryRegion *mr)
|
||||
{
|
||||
return mr->ram;
|
||||
}
|
||||
|
||||
bool memory_region_is_skip_dump(MemoryRegion *mr)
|
||||
{
|
||||
return mr->skip_dump;
|
||||
|
@ -1427,16 +1422,6 @@ bool memory_region_is_logging(MemoryRegion *mr, uint8_t client)
|
|||
return memory_region_get_dirty_log_mask(mr) & (1 << client);
|
||||
}
|
||||
|
||||
bool memory_region_is_rom(MemoryRegion *mr)
|
||||
{
|
||||
return mr->ram && mr->readonly;
|
||||
}
|
||||
|
||||
bool memory_region_is_iommu(MemoryRegion *mr)
|
||||
{
|
||||
return mr->iommu_ops;
|
||||
}
|
||||
|
||||
void memory_region_register_iommu_notifier(MemoryRegion *mr, Notifier *n)
|
||||
{
|
||||
notifier_list_add(&mr->iommu_notify, n);
|
||||
|
@ -1928,11 +1913,6 @@ void memory_region_set_alias_offset(MemoryRegion *mr, hwaddr offset)
|
|||
memory_region_transaction_commit();
|
||||
}
|
||||
|
||||
ram_addr_t memory_region_get_ram_addr(MemoryRegion *mr)
|
||||
{
|
||||
return mr->ram_addr;
|
||||
}
|
||||
|
||||
uint64_t memory_region_get_alignment(const MemoryRegion *mr)
|
||||
{
|
||||
return mr->align;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue