Received: by 10.192.165.148 with SMTP id m20csp727811imm; Fri, 4 May 2018 05:35:46 -0700 (PDT) X-Google-Smtp-Source: AB8JxZoOBsaDs+WbHbWQb4FYuIKNqDsGRfcN2MOou9B2+V7l9ZtLO0AB7NTn6QzWD/lotgrK6Ks8 X-Received: by 2002:a65:4842:: with SMTP id i2-v6mr8162994pgs.252.1525437346510; Fri, 04 May 2018 05:35:46 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1525437346; cv=none; d=google.com; s=arc-20160816; b=EclFuRbaxJLy9RFUJPUnv/yxyMGhwpltf7i0xj33w3gU82ZIVU02O6tRAnSuj6fd5h lpIALMN0q1QJPAMUWyXRmnYAK0CaEvWQep+Guz9aTqGzHVJEsBxp6KwPSIq8lwKZ6gdA 3sPW8Z/SlVK2kV7Eg+wj47mib+h8sk4pafzJiLQ7/g4wf6jYy4OU3NZ6iaw11TRBCANZ MRv16eQiqDHBG2tWPq8dPymA/d/AIf7WZ9tXS2RDlmGr1VF8+tbfW1Lmo4qo+Hxcpxhh JJhFzjWdzJW8qxencDBqc8eMftUXbRsHLizBTzgct4ag92TQWHUe47Cu72xzp0Fj5nZ/ xHyA== 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:arc-authentication-results; bh=8z1dGS8AV/W2QtIxCdQLuni/hz9RVHlSeOFCLxDGgaw=; b=ZZueewPl1rs9fX+1bZuXYtLVcXSGdMz6jqgj4lOFwaZwKxVs7tzaGKiHoBR8nDy69n QRGXhb4QiE/O9Ix5KK07K3hoJAIjCcaiqE58GNS+w4rh6AnZJJpw4ivU4oU/olu4VDIH VV1Pcdv6n3LpjM8f0mQC7/osMzQhwzyihBC4EjxZeXMIqOCmXaIRVvzI5uuN4LVOZfTQ eZqqpQyyku2LMEf5fRs/TzkV2v3Cq/gXFNtIt15RbVX1ClsC7k0uTZBBYiNrTg6GyYne DQfd5ANI4SJ1k4wvZfjkbHMYPj5+xPD5nYBV9ipggXdFwxqulrvXaQkiqU0SSh2Vsxh3 S37w== ARC-Authentication-Results: i=1; mx.google.com; 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 l7-v6si15908936plg.82.2018.05.04.05.35.32; Fri, 04 May 2018 05:35:46 -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; 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 S1751841AbeEDMfA (ORCPT + 99 others); Fri, 4 May 2018 08:35:00 -0400 Received: from pegase1.c-s.fr ([93.17.236.30]:42004 "EHLO pegase1.c-s.fr" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751733AbeEDMeW (ORCPT ); Fri, 4 May 2018 08:34:22 -0400 Received: from localhost (mailhub1-int [192.168.12.234]) by localhost (Postfix) with ESMTP id 40crzs3kVgz9tvhx; Fri, 4 May 2018 14:34:17 +0200 (CEST) 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 jbZa421PeQk0; Fri, 4 May 2018 14:34:17 +0200 (CEST) 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 40crzs3Dx9z9ttC1; Fri, 4 May 2018 14:34:17 +0200 (CEST) Received: from localhost (localhost [127.0.0.1]) by messagerie.si.c-s.fr (Postfix) with ESMTP id 40DAA8B975; Fri, 4 May 2018 14:34:21 +0200 (CEST) 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 ZhcvW7dafdtk; Fri, 4 May 2018 14:34:21 +0200 (CEST) Received: from po14934vm.idsi0.si.c-s.fr (po15451.idsi0.si.c-s.fr [172.25.231.2]) by messagerie.si.c-s.fr (Postfix) with ESMTP id 276D28B972; Fri, 4 May 2018 14:34:21 +0200 (CEST) Received: by po14934vm.idsi0.si.c-s.fr (Postfix, from userid 0) id E78316CF2D; Fri, 4 May 2018 14:34:20 +0200 (CEST) Message-Id: <0586af3c1bf8e4f8b4121645d047dbb7ada7fba8.1525435203.git.christophe.leroy@c-s.fr> In-Reply-To: References: From: Christophe Leroy Subject: [PATCH 15/17] powerpc/8xx: Free up SPRN_SPRG_SCRATCH2 To: Benjamin Herrenschmidt , Paul Mackerras , Michael Ellerman , aneesh.kumar@linux.vnet.ibm.com Cc: linux-kernel@vger.kernel.org, linuxppc-dev@lists.ozlabs.org Date: Fri, 4 May 2018 14:34:20 +0200 (CEST) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org We can now use SPRN_M_TW in the DAR Fixup code, freeing SPRN_SPRG_SCRATCH2 Then SPRN_SPRG_SCRATCH2 may be used for something else in the future. Signed-off-by: Christophe Leroy --- arch/powerpc/kernel/head_8xx.S | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/arch/powerpc/kernel/head_8xx.S b/arch/powerpc/kernel/head_8xx.S index c98a4ebb5a4d..8e96b526f109 100644 --- a/arch/powerpc/kernel/head_8xx.S +++ b/arch/powerpc/kernel/head_8xx.S @@ -624,7 +624,7 @@ InstructionBreakpoint: /* define if you don't want to use self modifying code */ #define NO_SELF_MODIFYING_CODE FixupDAR:/* Entry point for dcbx workaround. */ - mtspr SPRN_SPRG_SCRATCH2, r10 + mtspr SPRN_M_TW, r10 /* fetch instruction from memory. */ mfspr r10, SPRN_SRR0 mtspr SPRN_MD_EPN, r10 @@ -668,7 +668,7 @@ _ENTRY(FixupDAR_cmp) beq+ 142f cmpwi cr0, r10, 1964 /* Is icbi? */ beq+ 142f -141: mfspr r10,SPRN_SPRG_SCRATCH2 +141: mfspr r10,SPRN_M_TW b DARFixed /* Nope, go back to normal TLB processing */ 200: @@ -703,7 +703,7 @@ modified_instr: bne+ 143f subf r10,r0,r10 /* r10=r10-r0, only if reg RA is r0 */ 143: mtdar r10 /* store faulting EA in DAR */ - mfspr r10,SPRN_SPRG_SCRATCH2 + mfspr r10,SPRN_M_TW b DARFixed /* Go back to normal TLB handling */ #else mfctr r10 @@ -757,7 +757,7 @@ modified_instr: mfdar r11 mtctr r11 /* restore ctr reg from DAR */ mtdar r10 /* save fault EA to DAR */ - mfspr r10,SPRN_SPRG_SCRATCH2 + mfspr r10,SPRN_M_TW b DARFixed /* Go back to normal TLB handling */ /* special handling for r10,r11 since these are modified already */ -- 2.13.3