Received: from eggs.gnu.org ([2001:4830:134:3::10]:36526) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UiA1M-0003Ti-Ls for qemu-devel@nongnu.org; Thu, 30 May 2013 17:04:33 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UiA1H-0001gR-VH for qemu-devel@nongnu.org; Thu, 30 May 2013 17:04:28 -0400 Received: from mail-ea0-x231.google.com ([2a00:1450:4013:c01::231]:49745) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UiA1H-0001gJ-OC for qemu-devel@nongnu.org; Thu, 30 May 2013 17:04:23 -0400 Received: by mail-ea0-f177.google.com with SMTP id q14so854356eaj.8 for ; Thu, 30 May 2013 14:04:22 -0700 (PDT) Received: from playground.lan (net-37-116-217-184.cust.dsl.vodafone.it. [37.116.217.184]) by mx.google.com with ESMTPSA id y2sm62707218eeu.2.2013.05.30.14.04.21 for (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Thu, 30 May 2013 14:04:21 -0700 (PDT) Sender: Paolo Bonzini From: Paolo Bonzini Date: Thu, 30 May 2013 23:03:44 +0200 Message-Id: <1369947836-2638-11-git-send-email-pbonzini@redhat.com> In-Reply-To: <1369947836-2638-1-git-send-email-pbonzini@redhat.com> References: <1369947836-2638-1-git-send-email-pbonzini@redhat.com> Subject: [Qemu-devel] [PATCH 10/22] exec: expect mr->ops to be initialized for ROM List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org There is no need to use the special phys_section_rom section. Reviewed-by: Richard Henderson Signed-off-by: Paolo Bonzini --- exec.c | 9 --------- 1 files changed, 0 insertions(+), 9 deletions(-) diff --git a/exec.c b/exec.c index 03003b2..f6cebd6 100644 --- a/exec.c +++ b/exec.c @@ -2335,9 +2335,6 @@ void stl_phys_notdirty(hwaddr addr, uint32_t val) section = address_space_translate(&address_space_memory, addr, &addr1, &l, true); if (l < 4 || !memory_region_is_ram(section->mr) || section->readonly) { - if (memory_region_is_ram(section->mr)) { - section = &phys_sections[phys_section_rom]; - } io_mem_write(section->mr, addr1, val, 4); } else { addr1 += memory_region_get_ram_addr(section->mr) & TARGET_PAGE_MASK; @@ -2368,9 +2365,6 @@ static inline void stl_phys_internal(hwaddr addr, uint32_t val, section = address_space_translate(&address_space_memory, addr, &addr1, &l, true); if (l < 4 || !memory_region_is_ram(section->mr) || section->readonly) { - if (memory_region_is_ram(section->mr)) { - section = &phys_sections[phys_section_rom]; - } #if defined(TARGET_WORDS_BIGENDIAN) if (endian == DEVICE_LITTLE_ENDIAN) { val = bswap32(val); @@ -2434,9 +2428,6 @@ static inline void stw_phys_internal(hwaddr addr, uint32_t val, section = address_space_translate(&address_space_memory, addr, &addr1, &l, true); if (l < 2 || !memory_region_is_ram(section->mr) || section->readonly) { - if (memory_region_is_ram(section->mr)) { - section = &phys_sections[phys_section_rom]; - } #if defined(TARGET_WORDS_BIGENDIAN) if (endian == DEVICE_LITTLE_ENDIAN) { val = bswap16(val); -- 1.7.4.1