Received: by 2002:a17:90a:9307:0:0:0:0 with SMTP id p7csp2836138pjo; Mon, 16 Mar 2020 05:37:31 -0700 (PDT) X-Google-Smtp-Source: ADFU+vtLpWgoIU5MSs/5ZU4dUTZpRk07uwRdJIXoaFWECyLfV7ZfiT3Rh1UE4m75xC6p1JVcnrdW X-Received: by 2002:a9d:5e9:: with SMTP id 96mr22396197otd.307.1584362250934; Mon, 16 Mar 2020 05:37:30 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1584362250; cv=none; d=google.com; s=arc-20160816; b=ZpBXXENns5fptiCxasQTMjaR27Z2dlRQjxiesPukoHsfOrH8E47/ae0fVqn4+xi9tn 62SAwwXApqpywKiyKUC0LnkRlfqnOZTWEfqes8uOb7iCE3siv391gPvwOW8WplpXWNvF CaLkthuYzTcrGo3lPEHizHt2vfVaMmBCczFIlvwhyMPo4PP9/y6l4e0ZdCXaUdIf7oKN mtgFC5v91kmFM2jjNw0r//jpokHqqf4ct5FfFs5PcWFaZzY+YPP6DSfd+EJjKdRSrWSb EZbdTroeraADRZiYPmJcQO601fyiGDihMRYtMUVBrGNU0eDhp7wna1qrcvYen6aBW+N1 18yQ== 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=h+Kg/7jQz1Jju4W+vxb3TbFQHWpKHosAStWxiLUq+5g=; b=gpfItL5mcy/pjz6VKpC6baXq72Cw40+avBRneFohCn/ekcbBcmPZkFcCRCb41FkYoj WLcqygL18+wVzE6gy0WuyE0Twn3554NwQg0fceR/zQi2RXLUSmsDt51CVbUZ7HlOeyT1 mnKJ4vjwn1gpxVaSiTukpyKuZDICW0r2kPXjLm9+2NCLzYHRUkVaHui8H6GMY5BpELOo Ee74RF0qffbTKqpNmFU7doqcgeixB51HZVEVxselSFBeKf8e9hRG2QOD2mbW8RBgD9Ld WstgNIFfbPjNG4wDh8RCycVzexhjB56W67IoQ1GRlz4uOMDaZQenIR22ijn2/fpTKkxY jAqA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@c-s.fr header.s=mail header.b=RkjXBOKQ; 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 131si3713491oid.75.2020.03.16.05.37.16; Mon, 16 Mar 2020 05:37:30 -0700 (PDT) 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=RkjXBOKQ; 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 S1731318AbgCPMg3 (ORCPT + 99 others); Mon, 16 Mar 2020 08:36:29 -0400 Received: from pegase1.c-s.fr ([93.17.236.30]:11865 "EHLO pegase1.c-s.fr" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1731190AbgCPMgX (ORCPT ); Mon, 16 Mar 2020 08:36:23 -0400 Received: from localhost (mailhub1-int [192.168.12.234]) by localhost (Postfix) with ESMTP id 48gwlP4TQfz9v02g; Mon, 16 Mar 2020 13:36:17 +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=RkjXBOKQ; 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 blJR0p5MyG4k; Mon, 16 Mar 2020 13:36:17 +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 48gwlP3SZMz9v02f; Mon, 16 Mar 2020 13:36:17 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=c-s.fr; s=mail; t=1584362177; bh=h+Kg/7jQz1Jju4W+vxb3TbFQHWpKHosAStWxiLUq+5g=; h=In-Reply-To:References:From:Subject:To:Cc:Date:From; b=RkjXBOKQ2XQP27oegSSjVOGS2NkHD7RPbkGvwkvZwbf7azZzMARtnbeAqHv/q2S45 JYRynU97Ekd5k/wYFbGhAVZOKIfq6qZjkxuRmU8WThNTmo9WGZiFH2Lbi8j7EoLc0M pB3cdk3aX0gYFQpZrrtI5Tz67O3sOSCTfNSB9JMU= Received: from localhost (localhost [127.0.0.1]) by messagerie.si.c-s.fr (Postfix) with ESMTP id 611998B7D0; Mon, 16 Mar 2020 13:36:22 +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 yH6rcdU9c_HZ; Mon, 16 Mar 2020 13:36:22 +0100 (CET) Received: from pc16570vm.idsi0.si.c-s.fr (po15451.idsi0.si.c-s.fr [172.25.230.100]) by messagerie.si.c-s.fr (Postfix) with ESMTP id 3DD608B7CB; Mon, 16 Mar 2020 13:36:22 +0100 (CET) Received: by pc16570vm.idsi0.si.c-s.fr (Postfix, from userid 0) id 31E7865595; Mon, 16 Mar 2020 12:36:22 +0000 (UTC) Message-Id: <86d778f3a202e62c019cb133bb1360b68c8ee610.1584360344.git.christophe.leroy@c-s.fr> In-Reply-To: References: From: Christophe Leroy Subject: [PATCH v1 36/46] powerpc/8xx: Move DTLB perf handling closer. To: Benjamin Herrenschmidt , Paul Mackerras , Michael Ellerman Cc: linux-kernel@vger.kernel.org, linuxppc-dev@lists.ozlabs.org Date: Mon, 16 Mar 2020 12:36:22 +0000 (UTC) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Now that space have been freed next to the DTLB miss handler, it's associated DTLB perf handling can be brought back in the same place. Signed-off-by: Christophe Leroy --- arch/powerpc/kernel/head_8xx.S | 23 +++++++++++------------ 1 file changed, 11 insertions(+), 12 deletions(-) diff --git a/arch/powerpc/kernel/head_8xx.S b/arch/powerpc/kernel/head_8xx.S index 7fd7f7af1ac6..d12f5846d527 100644 --- a/arch/powerpc/kernel/head_8xx.S +++ b/arch/powerpc/kernel/head_8xx.S @@ -343,6 +343,17 @@ DataStoreTLBMiss: rfi patch_site 0b, patch__dtlbmiss_exit_1 +#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 + /* This is an instruction TLB error on the MPC8xx. This could be due * to many reasons, such as executing guarded memory or illegal instruction * addresses. There is nothing to do but handle a big time error fault. @@ -389,18 +400,6 @@ 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 - stack_overflow: vmap_stack_overflow_exception -- 2.25.0