From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:46544) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YxI9E-00055I-Hq for qemu-devel@nongnu.org; Tue, 26 May 2015 12:56:13 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YxI9D-0004qM-53 for qemu-devel@nongnu.org; Tue, 26 May 2015 12:56:12 -0400 Received: from mail-wi0-x235.google.com ([2a00:1450:400c:c05::235]:38010) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YxI9C-0004oq-KZ for qemu-devel@nongnu.org; Tue, 26 May 2015 12:56:10 -0400 Received: by wichy4 with SMTP id hy4so89309521wic.1 for ; Tue, 26 May 2015 09:55:54 -0700 (PDT) Received: from 640k.localdomain (dynamic-adsl-94-39-199-114.clienti.tiscali.it. [94.39.199.114]) by mx.google.com with ESMTPSA id x3sm17749309wiy.20.2015.05.26.09.55.53 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 26 May 2015 09:55:53 -0700 (PDT) Sender: Paolo Bonzini From: Paolo Bonzini Date: Tue, 26 May 2015 18:54:52 +0200 Message-Id: <1432659305-54578-17-git-send-email-pbonzini@redhat.com> In-Reply-To: <1432659305-54578-1-git-send-email-pbonzini@redhat.com> References: <1432659305-54578-1-git-send-email-pbonzini@redhat.com> Subject: [Qemu-devel] [PATCH v3 16/29] translate-all: remove unnecessary argument to tb_invalidate_phys_range List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org The is_cpu_write_access argument is always 0, remove it. Reviewed-by: Fam Zheng Signed-off-by: Paolo Bonzini --- exec.c | 2 +- linux-user/mmap.c | 6 +++--- translate-all.c | 5 ++--- translate-all.h | 3 +-- 4 files changed, 7 insertions(+), 9 deletions(-) diff --git a/exec.c b/exec.c index 9486347..0a0b89e 100644 --- a/exec.c +++ b/exec.c @@ -2260,7 +2260,7 @@ static void invalidate_and_set_dirty(MemoryRegion *mr, hwaddr addr, if (cpu_physical_memory_range_includes_clean(addr, length)) { uint8_t dirty_log_mask = memory_region_get_dirty_log_mask(mr); if (dirty_log_mask & (1 << DIRTY_MEMORY_CODE)) { - tb_invalidate_phys_range(addr, addr + length, 0); + tb_invalidate_phys_range(addr, addr + length); dirty_log_mask &= ~(1 << DIRTY_MEMORY_CODE); } if (dirty_log_mask) { diff --git a/linux-user/mmap.c b/linux-user/mmap.c index 959ff4d..78e1b2d 100644 --- a/linux-user/mmap.c +++ b/linux-user/mmap.c @@ -575,7 +575,7 @@ abi_long target_mmap(abi_ulong start, abi_ulong len, int prot, page_dump(stdout); printf("\n"); #endif - tb_invalidate_phys_range(start, start + len, 0); + tb_invalidate_phys_range(start, start + len); mmap_unlock(); return start; fail: @@ -680,7 +680,7 @@ int target_munmap(abi_ulong start, abi_ulong len) if (ret == 0) { page_set_flags(start, start + len, 0); - tb_invalidate_phys_range(start, start + len, 0); + tb_invalidate_phys_range(start, start + len); } mmap_unlock(); return ret; @@ -759,7 +759,7 @@ abi_long target_mremap(abi_ulong old_addr, abi_ulong old_size, page_set_flags(old_addr, old_addr + old_size, 0); page_set_flags(new_addr, new_addr + new_size, prot | PAGE_VALID); } - tb_invalidate_phys_range(new_addr, new_addr + new_size, 0); + tb_invalidate_phys_range(new_addr, new_addr + new_size); mmap_unlock(); return new_addr; } diff --git a/translate-all.c b/translate-all.c index 536008f..d118c6c 100644 --- a/translate-all.c +++ b/translate-all.c @@ -1042,11 +1042,10 @@ TranslationBlock *tb_gen_code(CPUState *cpu, * access: the virtual CPU will exit the current TB if code is modified inside * this TB. */ -void tb_invalidate_phys_range(tb_page_addr_t start, tb_page_addr_t end, - int is_cpu_write_access) +void tb_invalidate_phys_range(tb_page_addr_t start, tb_page_addr_t end) { while (start < end) { - tb_invalidate_phys_page_range(start, end, is_cpu_write_access); + tb_invalidate_phys_page_range(start, end, 0); start &= TARGET_PAGE_MASK; start += TARGET_PAGE_SIZE; } diff --git a/translate-all.h b/translate-all.h index 9d115a6..ef9166c 100644 --- a/translate-all.h +++ b/translate-all.h @@ -23,8 +23,7 @@ void tb_invalidate_phys_page_fast(tb_page_addr_t start, int len); void tb_invalidate_phys_page_range(tb_page_addr_t start, tb_page_addr_t end, int is_cpu_write_access); -void tb_invalidate_phys_range(tb_page_addr_t start, tb_page_addr_t end, - int is_cpu_write_access); +void tb_invalidate_phys_range(tb_page_addr_t start, tb_page_addr_t end); void cpu_unlink_tb(CPUState *cpu); void tb_check_watchpoint(CPUState *cpu); -- 1.8.3.1