Received: by 2002:a25:8b91:0:0:0:0:0 with SMTP id j17csp4144778ybl; Sat, 21 Dec 2019 00:34:07 -0800 (PST) X-Google-Smtp-Source: APXvYqyokDCvMC2mBQz/kFoE3ax1gibVEtp3vc7PSiPJe2PvEttsmaAK6GET3c3T55xU7Gd5bov2 X-Received: by 2002:a05:6830:124b:: with SMTP id s11mr19469602otp.333.1576917247203; Sat, 21 Dec 2019 00:34:07 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1576917247; cv=none; d=google.com; s=arc-20160816; b=QBzlU29O0cEWvjYW763mq1W9FJbnAOEuwVLAm5d1S34XX6gqQwveq70cjnaVcPkdqi KrZM1Xq3BfV7+EGTtVqWjrmsv0BTuft6IFupheZrE5SJUIq5O3iBST3nSfgqulsTxoBm kamJl1/oK+MpWO9vyZpsyoUtlUA3p5bBOmtT10O1u0cGiPfKgPeDrFmswdD5FtLGtHz1 CFp4XbQtXKrz4aatcDRBqfgo6UML/Ag9uRyxARaYTnwO2LgjKP4+UJx10G1rFg27g254 E1ytXrVeNL7OpQ6mNc9rVANr1qqFZXp4lpWetkWAMOPO9MEL/HDVuoAAHEumAtluv1BT B7bg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:date:cc:to:subject:from:references :in-reply-to:message-id:dkim-signature; bh=SuQxAQ4l/1mHGi45aVKRS3CT3WsuP/jKyi3kssGze6g=; b=ZKFmDoQ7cXBO/TpcCzNh0f7YCbamwx2bj8m+bpZioNffxhd0E6OkuoyWNJiSlhP7RL qn3418WS8hUz4NCP/Fx3MlMBjXpZoJR9ytSqUom+HTRGd0qbRHEeBlwbwPQi+Dn/N0p/ AUymkFSvNaeCcvSFUvXHoga0XoBwDggv5mdVdq/QwrZ6SkoOr3VknfAXAYuIk69nBJ/I 4DsnIwz8YSv0pjF4LxUVLA8SLOzs7DWIfUdn3CfHMxnRt5iZ4MzeTl0ffJnfTUsA56w3 mPLjAEbNeiwxfnYIyNqlSi6zabYkOPNxy/Eewg1uHuav9R2IMCZ2mYauIeghmmEjH64z bL2g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@c-s.fr header.s=mail header.b=bevAWRAk; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id s126si6397520oib.84.2019.12.21.00.33.56; Sat, 21 Dec 2019 00:34:07 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@c-s.fr header.s=mail header.b=bevAWRAk; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727083AbfLUIdB (ORCPT + 99 others); Sat, 21 Dec 2019 03:33:01 -0500 Received: from pegase1.c-s.fr ([93.17.236.30]:45061 "EHLO pegase1.c-s.fr" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726824AbfLUIcg (ORCPT ); Sat, 21 Dec 2019 03:32:36 -0500 Received: from localhost (mailhub1-ext [192.168.12.233]) by localhost (Postfix) with ESMTP id 47fzPs33TGz9txhD; Sat, 21 Dec 2019 09:32:33 +0100 (CET) Authentication-Results: localhost; dkim=pass reason="1024-bit key; insecure key" header.d=c-s.fr header.i=@c-s.fr header.b=bevAWRAk; dkim-adsp=pass; dkim-atps=neutral X-Virus-Scanned: Debian amavisd-new at c-s.fr Received: from pegase1.c-s.fr ([192.168.12.234]) by localhost (pegase1.c-s.fr [192.168.12.234]) (amavisd-new, port 10024) with ESMTP id jinBf02HGkT6; Sat, 21 Dec 2019 09:32:33 +0100 (CET) Received: from messagerie.si.c-s.fr (messagerie.si.c-s.fr [192.168.25.192]) by pegase1.c-s.fr (Postfix) with ESMTP id 47fzPs1yYKz9txh9; Sat, 21 Dec 2019 09:32:33 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=c-s.fr; s=mail; t=1576917153; bh=SuQxAQ4l/1mHGi45aVKRS3CT3WsuP/jKyi3kssGze6g=; h=In-Reply-To:References:From:Subject:To:Cc:Date:From; b=bevAWRAkHuoqJtSbddkmSHJCElOnPSdSrb6uVGLeQx6TE0ztmWst2oxBLsJIDsvK9 V3VNXFtmBiqpqmucdLHd+srLXc/Qvlns2sWwWO5swUSyY2Av1dOoiXRHVtl+QpGu54 s9VkrR4gBnrpq0LydyP3g1F9dU7LIcy/ePVXH7fA= Received: from localhost (localhost [127.0.0.1]) by messagerie.si.c-s.fr (Postfix) with ESMTP id 3FC5E8B77C; Sat, 21 Dec 2019 09:32:34 +0100 (CET) X-Virus-Scanned: amavisd-new at c-s.fr Received: from messagerie.si.c-s.fr ([127.0.0.1]) by localhost (messagerie.si.c-s.fr [127.0.0.1]) (amavisd-new, port 10023) with ESMTP id W4JFmiWiMMwM; Sat, 21 Dec 2019 09:32:34 +0100 (CET) Received: from localhost.localdomain (unknown [192.168.4.90]) by messagerie.si.c-s.fr (Postfix) with ESMTP id F31E38B752; Sat, 21 Dec 2019 09:32:33 +0100 (CET) Received: by localhost.localdomain (Postfix, from userid 0) id B1EF9637B6; Sat, 21 Dec 2019 08:32:33 +0000 (UTC) Message-Id: <75dd28b04efd2cbdbf01153173d99c11cdff2f08.1576916812.git.christophe.leroy@c-s.fr> In-Reply-To: References: From: Christophe Leroy Subject: [PATCH v5 12/17] powerpc/8xx: move DataStoreTLBMiss perf handler To: Benjamin Herrenschmidt , Paul Mackerras , Michael Ellerman , dja@axtens.net Cc: linux-kernel@vger.kernel.org, linuxppc-dev@lists.ozlabs.org, linux-mm@kvack.org Date: Sat, 21 Dec 2019 08:32:33 +0000 (UTC) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Move DataStoreTLBMiss perf handler in order to cope with future growing exception prolog. Signed-off-by: Christophe Leroy --- arch/powerpc/kernel/head_8xx.S | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/arch/powerpc/kernel/head_8xx.S b/arch/powerpc/kernel/head_8xx.S index 5aa63693f790..1e718e47fe3c 100644 --- a/arch/powerpc/kernel/head_8xx.S +++ b/arch/powerpc/kernel/head_8xx.S @@ -166,18 +166,6 @@ SystemCall: */ EXCEPTION(0x1000, SoftEmu, program_check_exception, EXC_XFER_STD) -/* Called from DataStoreTLBMiss when perf TLB misses events are activated */ -#ifdef CONFIG_PERF_EVENTS - patch_site 0f, patch__dtlbmiss_perf -0: lwz r10, (dtlb_miss_counter - PAGE_OFFSET)@l(0) - addi r10, r10, 1 - stw r10, (dtlb_miss_counter - PAGE_OFFSET)@l(0) - mfspr r10, SPRN_DAR - mtspr SPRN_DAR, r11 /* Tag DAR */ - mfspr r11, SPRN_M_TW - rfi -#endif - . = 0x1100 /* * For the MPC8xx, this is a software tablewalk to load the instruction @@ -486,6 +474,18 @@ DARFixed:/* Return from dcbx instruction bug workaround */ /* 0x300 is DataAccess exception, needed by bad_page_fault() */ EXC_XFER_LITE(0x300, handle_page_fault) +/* Called from DataStoreTLBMiss when perf TLB misses events are activated */ +#ifdef CONFIG_PERF_EVENTS + patch_site 0f, patch__dtlbmiss_perf +0: lwz r10, (dtlb_miss_counter - PAGE_OFFSET)@l(0) + addi r10, r10, 1 + stw r10, (dtlb_miss_counter - PAGE_OFFSET)@l(0) + mfspr r10, SPRN_DAR + mtspr SPRN_DAR, r11 /* Tag DAR */ + mfspr r11, SPRN_M_TW + rfi +#endif + /* On the MPC8xx, these next four traps are used for development * support of breakpoints and such. Someday I will get around to * using them. -- 2.13.3