Received: by 2002:a25:7ec1:0:0:0:0:0 with SMTP id z184csp4163989ybc; Tue, 26 Nov 2019 04:58:17 -0800 (PST) X-Google-Smtp-Source: APXvYqxZHfx5E1UOuvAgH6zJyPDfjolKm1jshsmn+d4SAWQNDX3YNJmU6hioYpvk2SmpswEMWjzs X-Received: by 2002:a17:906:5e4d:: with SMTP id b13mr379212eju.266.1574773097150; Tue, 26 Nov 2019 04:58:17 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1574773097; cv=none; d=google.com; s=arc-20160816; b=jVGOjyEXf4yJzKCrS6eHG3hPLr6t4bmek+x7iE1h2oTv/4HsKeGXHVDzupGQAQ2tDv XVwmAf2OG7y5V0antsxA0S43lb6SqSd5Gcc5Nde52s0Xbw/0JPqgcAQsQA526VjitPdH P9z1FdGCSNHC6bVoR1NoiwmqkyhwN0Ql0XGTfowdF25Cw2EAaSR+rVytf6OqfUDDFGhn OmP3XjDw57uOdvp/qOpnY2DuTPdvpwPvVKccaVpSq72kFD9GmG0MZiDaZh40DB4dCABb 6J0e/jBgnBNCNI6Cn0aVv34w6G7XlPt8Ih9+HHPfloh3TvRo6K0PPmhsYxfglmSSGb4F SLaw== 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=tjeiTKz5UTQ7CGJPFpPVBxU4TH3bNb3PzGYOYUy9cDKtEjhbQPTkh0jn2nRoZ6vd3W Hk/C/zXa53nEZcpPmevoLZKRlQkVMQ0wCC+60mC6V6JnCkmsFfLqV7ZSwQdRHISraas2 35FJOa6zuym4dFpA+Qfblw2dIsBe3RkYFVsj3ANNY8shkFBVMeMHCumvPAZTZ5p8KYCC uOPJeDjgB2JCz1It0pe7+A4YmotG1qup+xp6PZ3Ghr3F6AzSEDGmjbj0x6eBl5X28GzJ Nt3++fX8vgfziABZCyst7Lm5C4GeGD+IuPEMiCUMODDlEQ7r0MzFDHtdn71UzfmVlU2U qRoA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@c-s.fr header.s=mail header.b=F+CezjWa; 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 y3si7411259edv.423.2019.11.26.04.57.53; Tue, 26 Nov 2019 04:58:17 -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=F+CezjWa; 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 S1728535AbfKZMgY (ORCPT + 99 others); Tue, 26 Nov 2019 07:36:24 -0500 Received: from pegase1.c-s.fr ([93.17.236.30]:25835 "EHLO pegase1.c-s.fr" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728469AbfKZMgR (ORCPT ); Tue, 26 Nov 2019 07:36:17 -0500 Received: from localhost (mailhub1-ext [192.168.12.233]) by localhost (Postfix) with ESMTP id 47Mk0Z3Hlmz9v0G8; Tue, 26 Nov 2019 13:36:14 +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=F+CezjWa; 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 5NS0X-0jvC8c; Tue, 26 Nov 2019 13:36:14 +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 47Mk0Z2F25z9v0G3; Tue, 26 Nov 2019 13:36:14 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=c-s.fr; s=mail; t=1574771774; bh=SuQxAQ4l/1mHGi45aVKRS3CT3WsuP/jKyi3kssGze6g=; h=In-Reply-To:References:From:Subject:To:Cc:Date:From; b=F+CezjWaWcLVWwfzSbZHbxkNkW2eY/uQkx1c6+/ORauptQeeDq/bsmg1Xi1F4jEQ+ YskD5wLgPMujZJMHQFfDf0v1sbPXZw9UF0LDlh/NdqEE4uJpVhhkawjz2Jm/TqJBEd V+UuRUJpq1oREQ/aC85ATds8+wi8jrcWF55Ee2tw= Received: from localhost (localhost [127.0.0.1]) by messagerie.si.c-s.fr (Postfix) with ESMTP id 9D43B8B7FC; Tue, 26 Nov 2019 13:36:15 +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 4rld6BwlFtzU; Tue, 26 Nov 2019 13:36:15 +0100 (CET) Received: from po16098vm.idsi0.si.c-s.fr (unknown [192.168.4.90]) by messagerie.si.c-s.fr (Postfix) with ESMTP id 6526D8B771; Tue, 26 Nov 2019 13:36:15 +0100 (CET) Received: by po16098vm.idsi0.si.c-s.fr (Postfix, from userid 0) id EA2866B76A; Tue, 26 Nov 2019 12:36:14 +0000 (UTC) Message-Id: In-Reply-To: References: From: Christophe Leroy Subject: [PATCH v4 11/16] powerpc/8xx: move DataStoreTLBMiss perf handler To: Benjamin Herrenschmidt , Paul Mackerras , Michael Ellerman Cc: linux-kernel@vger.kernel.org, linuxppc-dev@lists.ozlabs.org, linux-mm@kvack.org Date: Tue, 26 Nov 2019 12:36:14 +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