From 4f39178b3ab54538759df92a38655063f5d59301 Mon Sep 17 00:00:00 2001 From: Paolo Bonzini Date: Tue, 14 May 2013 11:44:02 +0200 Subject: exec: eliminate qemu_put_ram_ptr Reviewed-by: Peter Maydell Signed-off-by: Paolo Bonzini --- include/exec/cpu-common.h | 1 - 1 file changed, 1 deletion(-) (limited to 'include/exec/cpu-common.h') diff --git a/include/exec/cpu-common.h b/include/exec/cpu-common.h index 2e5f11f47f..cafc3c21b1 100644 --- a/include/exec/cpu-common.h +++ b/include/exec/cpu-common.h @@ -51,7 +51,6 @@ typedef uint32_t CPUReadMemoryFunc(void *opaque, hwaddr addr); void qemu_ram_remap(ram_addr_t addr, ram_addr_t length); /* This should only be used for ram local to a device. */ void *qemu_get_ram_ptr(ram_addr_t addr); -void qemu_put_ram_ptr(void *addr); /* This should not be used by devices. */ int qemu_ram_addr_from_host(void *ptr, ram_addr_t *ram_addr); ram_addr_t qemu_ram_addr_from_host_nofail(void *ptr); -- cgit v1.2.3-55-g7522 From ee983cb3cc8f856b408a272269f434cc9a82ceff Mon Sep 17 00:00:00 2001 From: Paolo Bonzini Date: Tue, 14 May 2013 11:47:56 +0200 Subject: exec: make qemu_get_ram_ptr private It is a private interface between exec.c and memory.c. Reviewed-by: Peter Maydell Signed-off-by: Paolo Bonzini --- include/exec/cpu-common.h | 2 -- include/exec/memory-internal.h | 1 + 2 files changed, 1 insertion(+), 2 deletions(-) (limited to 'include/exec/cpu-common.h') diff --git a/include/exec/cpu-common.h b/include/exec/cpu-common.h index cafc3c21b1..af851aa633 100644 --- a/include/exec/cpu-common.h +++ b/include/exec/cpu-common.h @@ -49,8 +49,6 @@ typedef void CPUWriteMemoryFunc(void *opaque, hwaddr addr, uint32_t value); typedef uint32_t CPUReadMemoryFunc(void *opaque, hwaddr addr); void qemu_ram_remap(ram_addr_t addr, ram_addr_t length); -/* This should only be used for ram local to a device. */ -void *qemu_get_ram_ptr(ram_addr_t addr); /* This should not be used by devices. */ int qemu_ram_addr_from_host(void *ptr, ram_addr_t *ram_addr); ram_addr_t qemu_ram_addr_from_host_nofail(void *ptr); diff --git a/include/exec/memory-internal.h b/include/exec/memory-internal.h index 1b156fd58f..8d15f90417 100644 --- a/include/exec/memory-internal.h +++ b/include/exec/memory-internal.h @@ -46,6 +46,7 @@ void address_space_destroy_dispatch(AddressSpace *as); ram_addr_t qemu_ram_alloc_from_ptr(ram_addr_t size, void *host, MemoryRegion *mr); ram_addr_t qemu_ram_alloc(ram_addr_t size, MemoryRegion *mr); +void *qemu_get_ram_ptr(ram_addr_t addr); void qemu_ram_free(ram_addr_t addr); void qemu_ram_free_from_ptr(ram_addr_t addr); -- cgit v1.2.3-55-g7522 From 8b0d6711a276bdb9edcd9299b194c7c0d6b56a88 Mon Sep 17 00:00:00 2001 From: Paolo Bonzini Date: Mon, 20 May 2013 12:40:58 +0200 Subject: exec: eliminate stq_phys_notdirty It is not used anywhere. Reviewed-by: Peter Maydell Signed-off-by: Paolo Bonzini --- exec.c | 27 --------------------------- include/exec/cpu-common.h | 1 - include/exec/poison.h | 1 - 3 files changed, 29 deletions(-) (limited to 'include/exec/cpu-common.h') diff --git a/exec.c b/exec.c index fa5f9c3171..1355661963 100644 --- a/exec.c +++ b/exec.c @@ -2390,33 +2390,6 @@ void stl_phys_notdirty(hwaddr addr, uint32_t val) } } -void stq_phys_notdirty(hwaddr addr, uint64_t val) -{ - uint8_t *ptr; - MemoryRegionSection *section; - - section = phys_page_find(address_space_memory.dispatch, addr >> TARGET_PAGE_BITS); - - if (!memory_region_is_ram(section->mr) || section->readonly) { - addr = memory_region_section_addr(section, addr); - if (memory_region_is_ram(section->mr)) { - section = &phys_sections[phys_section_rom]; - } -#ifdef TARGET_WORDS_BIGENDIAN - io_mem_write(section->mr, addr, val >> 32, 4); - io_mem_write(section->mr, addr + 4, (uint32_t)val, 4); -#else - io_mem_write(section->mr, addr, (uint32_t)val, 4); - io_mem_write(section->mr, addr + 4, val >> 32, 4); -#endif - } else { - ptr = qemu_get_ram_ptr((memory_region_get_ram_addr(section->mr) - & TARGET_PAGE_MASK) - + memory_region_section_addr(section, addr)); - stq_p(ptr, val); - } -} - /* warning: addr must be aligned */ static inline void stl_phys_internal(hwaddr addr, uint32_t val, enum device_endian endian) diff --git a/include/exec/cpu-common.h b/include/exec/cpu-common.h index af851aa633..af5258d414 100644 --- a/include/exec/cpu-common.h +++ b/include/exec/cpu-common.h @@ -102,7 +102,6 @@ uint32_t lduw_phys(hwaddr addr); uint32_t ldl_phys(hwaddr addr); uint64_t ldq_phys(hwaddr addr); void stl_phys_notdirty(hwaddr addr, uint32_t val); -void stq_phys_notdirty(hwaddr addr, uint64_t val); void stw_phys(hwaddr addr, uint32_t val); void stl_phys(hwaddr addr, uint32_t val); void stq_phys(hwaddr addr, uint64_t val); diff --git a/include/exec/poison.h b/include/exec/poison.h index 7d7b23b1fc..2341a75041 100644 --- a/include/exec/poison.h +++ b/include/exec/poison.h @@ -42,7 +42,6 @@ #pragma GCC poison ldl_phys #pragma GCC poison ldq_phys #pragma GCC poison stl_phys_notdirty -#pragma GCC poison stq_phys_notdirty #pragma GCC poison stw_phys #pragma GCC poison stl_phys #pragma GCC poison stq_phys -- cgit v1.2.3-55-g7522