From patchwork Sat Apr 14 22:12:43 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Andreas_F=C3=A4rber?= X-Patchwork-Id: 152577 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (Client did not present a certificate) by ozlabs.org (Postfix) with ESMTPS id CDC66B7004 for ; Sun, 15 Apr 2012 09:00:44 +1000 (EST) Received: from localhost ([::1]:46686 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SJBEX-0002j1-BH for incoming@patchwork.ozlabs.org; Sat, 14 Apr 2012 18:14:17 -0400 Received: from eggs.gnu.org ([208.118.235.92]:40375) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SJBDI-0000TZ-E1 for qemu-devel@nongnu.org; Sat, 14 Apr 2012 18:13:01 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1SJBDF-0000tS-4i for qemu-devel@nongnu.org; Sat, 14 Apr 2012 18:12:59 -0400 Received: from cantor2.suse.de ([195.135.220.15]:57832 helo=mx2.suse.de) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SJBDE-0000sp-Uu for qemu-devel@nongnu.org; Sat, 14 Apr 2012 18:12:57 -0400 Received: from relay2.suse.de (unknown [195.135.220.254]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mx2.suse.de (Postfix) with ESMTP id E4BB3937E7; Sun, 15 Apr 2012 00:12:55 +0200 (CEST) From: =?UTF-8?q?Andreas=20F=C3=A4rber?= To: qemu-devel@nongnu.org Date: Sun, 15 Apr 2012 00:12:43 +0200 Message-Id: <1334441565-26433-12-git-send-email-afaerber@suse.de> X-Mailer: git-send-email 1.7.7 In-Reply-To: <1334441565-26433-1-git-send-email-afaerber@suse.de> References: <1334441565-26433-1-git-send-email-afaerber@suse.de> MIME-Version: 1.0 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.4-2.6 X-Received-From: 195.135.220.15 Cc: =?UTF-8?q?Andreas=20F=C3=A4rber?= , Aurelien Jarno Subject: [Qemu-devel] [PATCH v3 11/13] target-sh4: Make copy_utlb_entry_itlb() take SuperHCPU 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 Signed-off-by: Andreas Färber --- target-sh4/helper.c | 14 +++++++------- 1 files changed, 7 insertions(+), 7 deletions(-) diff --git a/target-sh4/helper.c b/target-sh4/helper.c index d273097..ffe79ec 100644 --- a/target-sh4/helper.c +++ b/target-sh4/helper.c @@ -286,18 +286,18 @@ static void increment_urc(SuperHCPU *cpu) /* Copy and utlb entry into itlb Return entry */ -static int copy_utlb_entry_itlb(CPUSH4State *env, int utlb) +static int copy_utlb_entry_itlb(SuperHCPU *cpu, int utlb) { int itlb; tlb_t * ientry; - itlb = itlb_replacement(env); - ientry = &env->itlb[itlb]; + itlb = itlb_replacement(&cpu->env); + ientry = &cpu->env.itlb[itlb]; if (ientry->v) { - tlb_flush_page(env, ientry->vpn << 10); + tlb_flush_page(&cpu->env, ientry->vpn << 10); } - *ientry = env->utlb[utlb]; - update_itlb_use(env, itlb); + *ientry = cpu->env.utlb[utlb]; + update_itlb_use(&cpu->env, itlb); return itlb; } @@ -360,7 +360,7 @@ static int get_mmu_address(SuperHCPU *cpu, target_ulong *physical, } else { n = find_utlb_entry(cpu, address, use_asid); if (n >= 0) { - n = copy_utlb_entry_itlb(&cpu->env, n); + n = copy_utlb_entry_itlb(cpu, n); matching = &cpu->env.itlb[n]; if (!(cpu->env.sr & SR_MD) && !(matching->pr & 2)) { n = MMU_ITLB_VIOLATION;