From patchwork Wed May 28 17:25:36 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alex Zuepke X-Patchwork-Id: 353536 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 C3902140098 for ; Thu, 29 May 2014 03:28:03 +1000 (EST) Received: from localhost ([::1]:43786 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Wphdx-00026P-G6 for incoming@patchwork.ozlabs.org; Wed, 28 May 2014 13:28:01 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:40603) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Wphd6-00011F-0U for qemu-devel@nongnu.org; Wed, 28 May 2014 13:27:15 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Wphcy-0007eC-TD for qemu-devel@nongnu.org; Wed, 28 May 2014 13:27:07 -0400 Received: from mxout-1k.itc.hs-rm.de ([195.72.102.133]:60103) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Wphci-0007Yr-E6; Wed, 28 May 2014 13:26:44 -0400 Received: from mailproxy.hs-rm.de (mailproxy-1k.itc.hs-rm.de [195.72.102.159]) by mxout-1k.itc.hs-rm.de (8.14.4/8.14.4) with ESMTP id s4SHQfPc020037; Wed, 28 May 2014 19:26:42 +0200 (envelope-from alexander.zuepke@hs-rm.de) Received: from azu-lap2.speedport.ip (p54847F63.dip0.t-ipconnect.de [84.132.127.99]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mailproxy.hs-rm.de (Postfix) with ESMTPSA id BEA0C3FFD4; Wed, 28 May 2014 19:26:38 +0200 (CEST) From: Alex Zuepke To: qemu-ppc@nongnu.org Date: Wed, 28 May 2014 19:25:36 +0200 Message-Id: <1401297936-4878-2-git-send-email-alexander.zuepke@hs-rm.de> X-Mailer: git-send-email 1.7.9.5 In-Reply-To: <1401297936-4878-1-git-send-email-alexander.zuepke@hs-rm.de> References: <1400014544-6150-1-git-send-email-alexander.zuepke@hs-rm.de> <1401297936-4878-1-git-send-email-alexander.zuepke@hs-rm.de> X-RMS-MAILPROXY-RELAY: True X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x X-Received-From: 195.72.102.133 Cc: qemu-devel@nongnu.org, Alex Zuepke Subject: [Qemu-devel] [PATCH 1/1] ppc-e500: on write to MMUCSR0, pass GPR content, not SPR number, to low-level TLB-flush routine 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 A "mtspr SPRMMUCSR0, reg" always flushed TLB0, because it passed the SPR number 0x3f4 to the flush routine. But we want to flush either TLB0 or TBL1 depending on the GPR value. Signed-off-by: Alex Zuepke --- target-ppc/translate_init.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/target-ppc/translate_init.c b/target-ppc/translate_init.c index 4d94015..e4680cb 100644 --- a/target-ppc/translate_init.c +++ b/target-ppc/translate_init.c @@ -1455,9 +1455,7 @@ static void spr_write_e500_l1csr0 (void *opaque, int sprn, int gprn) static void spr_write_booke206_mmucsr0 (void *opaque, int sprn, int gprn) { - TCGv_i32 t0 = tcg_const_i32(sprn); - gen_helper_booke206_tlbflush(cpu_env, t0); - tcg_temp_free_i32(t0); + gen_helper_booke206_tlbflush(cpu_env, cpu_gpr[gprn]); } static void spr_write_booke_pid (void *opaque, int sprn, int gprn)