From patchwork Tue Jul 26 22:21:09 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Benjamin Herrenschmidt X-Patchwork-Id: 652966 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 3rzXpj2N19z9stY for ; Wed, 27 Jul 2016 08:29:01 +1000 (AEST) Received: from localhost ([::1]:42666 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bSAqQ-0007Ds-Sh for incoming@patchwork.ozlabs.org; Tue, 26 Jul 2016 18:28:58 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:49496) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bSAkX-0001DM-41 for qemu-devel@nongnu.org; Tue, 26 Jul 2016 18:22:54 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bSAkV-0000Mq-6V for qemu-devel@nongnu.org; Tue, 26 Jul 2016 18:22:53 -0400 Received: from gate.crashing.org ([63.228.1.57]:47440) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bSAkU-0000MX-T9; Tue, 26 Jul 2016 18:22:51 -0400 Received: from pasglop.au.ibm.com (localhost.localdomain [127.0.0.1]) by gate.crashing.org (8.14.1/8.13.8) with ESMTP id u6QMLwG9007480; Tue, 26 Jul 2016 17:22:44 -0500 From: Benjamin Herrenschmidt To: qemu-ppc@nongnu.org Date: Wed, 27 Jul 2016 08:21:09 +1000 Message-Id: <1469571686-7284-15-git-send-email-benh@kernel.crashing.org> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1469571686-7284-1-git-send-email-benh@kernel.crashing.org> References: <1469571686-7284-1-git-send-email-benh@kernel.crashing.org> X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x X-Received-From: 63.228.1.57 Subject: [Qemu-devel] [PATCH 15/32] ppc: Make tlb_fill() use new exception helper X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: qemu-devel@nongnu.org, david@gibson.dropbear.id.au Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: "Qemu-devel" Signed-off-by: Benjamin Herrenschmidt --- target-ppc/mmu_helper.c | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/target-ppc/mmu_helper.c b/target-ppc/mmu_helper.c index 3eb3cd7..80cc262 100644 --- a/target-ppc/mmu_helper.c +++ b/target-ppc/mmu_helper.c @@ -2892,10 +2892,7 @@ void tlb_fill(CPUState *cs, target_ulong addr, MMUAccessType access_type, ret = cpu_ppc_handle_mmu_fault(env, addr, access_type, mmu_idx); } if (unlikely(ret != 0)) { - if (likely(retaddr)) { - /* now we have a real cpu fault */ - cpu_restore_state(cs, retaddr); - } - helper_raise_exception_err(env, cs->exception_index, env->error_code); + raise_exception_err_ra(env, cs->exception_index, env->error_code, + retaddr); } }