From patchwork Fri Jun 5 15:15:22 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Paolo Bonzini X-Patchwork-Id: 481400 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.gnu.org (lists.gnu.org [IPv6:2001:4830:134:3::11]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 2F9B31402AC for ; Sat, 6 Jun 2015 01:25:12 +1000 (AEST) Received: from localhost ([::1]:48044 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Z0tUc-0007LJ-9r for incoming@patchwork.ozlabs.org; Fri, 05 Jun 2015 11:25:10 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:59442) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Z0tMS-0002XR-W1 for qemu-devel@nongnu.org; Fri, 05 Jun 2015 11:16:45 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Z0tMQ-0008Dd-MC for qemu-devel@nongnu.org; Fri, 05 Jun 2015 11:16:44 -0400 Received: from mx1.redhat.com ([209.132.183.28]:55293) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Z0tMQ-0008DR-Fz for qemu-devel@nongnu.org; Fri, 05 Jun 2015 11:16:42 -0400 Received: from int-mx09.intmail.prod.int.phx2.redhat.com (int-mx09.intmail.prod.int.phx2.redhat.com [10.5.11.22]) by mx1.redhat.com (Postfix) with ESMTPS id 37022C6A04 for ; Fri, 5 Jun 2015 15:16:42 +0000 (UTC) Received: from donizetti.redhat.com (ovpn-112-29.ams2.redhat.com [10.36.112.29]) by int-mx09.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id t55FG4kX012808 for ; Fri, 5 Jun 2015 11:16:41 -0400 From: Paolo Bonzini To: qemu-devel@nongnu.org Date: Fri, 5 Jun 2015 17:15:22 +0200 Message-Id: <1433517363-32335-22-git-send-email-pbonzini@redhat.com> In-Reply-To: <1433517363-32335-1-git-send-email-pbonzini@redhat.com> References: <1433517363-32335-1-git-send-email-pbonzini@redhat.com> X-Scanned-By: MIMEDefang 2.68 on 10.5.11.22 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x X-Received-From: 209.132.183.28 Subject: [Qemu-devel] [PULL 21/62] translate-all: remove unnecessary argument to tb_invalidate_phys_range X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: qemu-devel-bounces+incoming=patchwork.ozlabs.org@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 950fea4..650cfa8 100644 --- a/exec.c +++ b/exec.c @@ -2256,7 +2256,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 f1a40a5..0384640 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 tb_check_watchpoint(CPUState *cpu); #ifdef CONFIG_USER_ONLY