Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp1178016pxj; Fri, 4 Jun 2021 07:55:57 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwa1RaVoY629OBfO6JHzK5td4MHTtKcqxgrGyhdZJqp7F2efsDIuc1mCrKLoMjkQwEENaHR X-Received: by 2002:a17:906:7f8d:: with SMTP id f13mr4642186ejr.272.1622818557362; Fri, 04 Jun 2021 07:55:57 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1622818557; cv=none; d=google.com; s=arc-20160816; b=MhZSjcwOi5SN0BTR+wBw+RsdHixlbkHLLs81pNF2d/t93ZtQrDvF/RsDthDmTqbO5f /aJPCEaopawDwO9FswoaniuyLo/Sd6oO/gSq4v8AkfwxI4iH0tJ5QDUXttGrJBUY6Fdj SlG2Z77WoH6ti+PLAiwpf5n+nRgNy0aUqcUhb/6tBTKi0tCbQJlGI9G+9b2wZMq1ja/H qyd6vewHuGhvCkpiDF6q5raCF5GG15jOH8wYiRSibsKlpWAPVmxNXL7p8wgE6XIBLHLh LTo1J4iXjKOcTfFMMA+OijIDmkDtrIrg+WA5QOuK9PKDi8RQZE6Slm/pBCqti+FywVHt xCog== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:date:cc:to:subject:from:references:in-reply-to :message-id; bh=fk46gvsntqyg4MO1cjk2SAWTzeX1+Hu1RjsTfZk/DXo=; b=c+gXV/CJvAQKicsHlVuxcnm0/VGsgDQcl4+KgoSpUZSanSkW2NImTGo+I5WW5ba7KS OcBu2FKaG5GlGJipKmmMeDCcnuaZxqfrMEy9/fBb8zDfD7FBY2KBDZbdQuCtIDuYe6A8 DHHSgimOXqkh7elGLw+3KhH6BZmRVhDMJ/kGTLdW7YUJfB8cFTJ0m+AQxx273HT/Dz6C WeHdhTPE3cx8jgP+ANsNisYzDwQx4N+x0OrtiVxuxiNU5FGBSnpnyHabcdr53Dm9r4us f0Emh3i8Mw5KfsMREQHaN3MkWQyx4vzhcUFkYsSVg5g0O8B0ZtWAzxhrb52X5AV5mQQK +1ew== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id dg2si4844365edb.424.2021.06.04.07.55.34; Fri, 04 Jun 2021 07:55:57 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230208AbhFDO4E (ORCPT + 99 others); Fri, 4 Jun 2021 10:56:04 -0400 Received: from pegase1.c-s.fr ([93.17.236.30]:19683 "EHLO pegase1.c-s.fr" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229746AbhFDO4E (ORCPT ); Fri, 4 Jun 2021 10:56:04 -0400 Received: from localhost (mailhub3.si.c-s.fr [192.168.12.233]) by localhost (Postfix) with ESMTP id 4FxQlB33kLzBCvh; Fri, 4 Jun 2021 16:54:14 +0200 (CEST) X-Virus-Scanned: amavisd-new at c-s.fr Received: from pegase1.c-s.fr ([192.168.12.234]) by localhost (pegase1.c-s.fr [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id Q1UtYnGTUR70; Fri, 4 Jun 2021 16:54:14 +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 4FxQlB2BpLzBCtv; Fri, 4 Jun 2021 16:54:14 +0200 (CEST) Received: from localhost (localhost [127.0.0.1]) by messagerie.si.c-s.fr (Postfix) with ESMTP id 438888B8A9; Fri, 4 Jun 2021 16:54:14 +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 vbUKUYTHH2Wa; Fri, 4 Jun 2021 16:54:14 +0200 (CEST) Received: from po15610vm.idsi0.si.c-s.fr (unknown [192.168.4.90]) by messagerie.si.c-s.fr (Postfix) with ESMTP id 133C38B885; Fri, 4 Jun 2021 16:54:14 +0200 (CEST) Received: by po15610vm.idsi0.si.c-s.fr (Postfix, from userid 0) id DF5DA64BDB; Fri, 4 Jun 2021 14:54:13 +0000 (UTC) Message-Id: <1684c39724a069b0ce1aa82eaee6ec194e354e4e.1622818435.git.christophe.leroy@csgroup.eu> In-Reply-To: <5ab3a517bc883a2fc905fb2cb5ee9344f37b2cfa.1622818435.git.christophe.leroy@csgroup.eu> References: <5ab3a517bc883a2fc905fb2cb5ee9344f37b2cfa.1622818435.git.christophe.leroy@csgroup.eu> From: Christophe Leroy Subject: [PATCH 2/4] powerpc/32: Interchange r1 and r11 in SYSCALL_ENTRY on booke To: Benjamin Herrenschmidt , Paul Mackerras , Michael Ellerman Cc: linux-kernel@vger.kernel.org, linuxppc-dev@lists.ozlabs.org Date: Fri, 4 Jun 2021 14:54:13 +0000 (UTC) Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org To better match non booke version of SYSCALL_ENTRY macro, interchange r1 and r11 in the booke version. While at it, in both versions use r1 instead of r11 to save _NIP and _CCR. All other uses of r11 will go away in next patch, so don't bother changing them for now. Signed-off-by: Christophe Leroy --- arch/powerpc/kernel/head_32.h | 4 ++-- arch/powerpc/kernel/head_booke.h | 17 +++++++++-------- 2 files changed, 11 insertions(+), 10 deletions(-) diff --git a/arch/powerpc/kernel/head_32.h b/arch/powerpc/kernel/head_32.h index 1e55bc054659..7ca25eb9bc75 100644 --- a/arch/powerpc/kernel/head_32.h +++ b/arch/powerpc/kernel/head_32.h @@ -158,12 +158,12 @@ _ASM_NOKPROBE_SYMBOL(\name\()_virt) stw r11,GPR1(r1) stw r11,0(r1) mr r11, r1 - stw r12,_NIP(r11) + stw r12,_NIP(r1) mflr r12 stw r12, _LINK(r11) mfcr r12 rlwinm r12,r12,0,4,2 /* Clear SO bit in CR */ - stw r12,_CCR(r11) /* save registers */ + stw r12,_CCR(r1) #ifdef CONFIG_40x rlwinm r9,r9,0,14,12 /* clear MSR_WE (necessary?) */ #endif diff --git a/arch/powerpc/kernel/head_booke.h b/arch/powerpc/kernel/head_booke.h index f82470091697..4a2fad9f225e 100644 --- a/arch/powerpc/kernel/head_booke.h +++ b/arch/powerpc/kernel/head_booke.h @@ -135,17 +135,18 @@ ALT_FTR_SECTION_END_IFSET(CPU_FTR_EMB_HV) #endif mfspr r9, SPRN_SRR1 BOOKE_CLEAR_BTB(r11) - lwz r11, TASK_STACK - THREAD(r10) + mr r11, r1 + lwz r1, TASK_STACK - THREAD(r10) rlwinm r12,r12,0,4,2 /* Clear SO bit in CR */ - ALLOC_STACK_FRAME(r11, THREAD_SIZE - INT_FRAME_SIZE) - stw r12, _CCR(r11) /* save various registers */ + ALLOC_STACK_FRAME(r1, THREAD_SIZE - INT_FRAME_SIZE) + stw r12, _CCR(r1) mflr r12 - stw r12,_LINK(r11) + stw r12,_LINK(r1) mfspr r12,SPRN_SRR0 - stw r1, GPR1(r11) - stw r1, 0(r11) - mr r1, r11 - stw r12,_NIP(r11) + stw r11, GPR1(r1) + stw r11, 0(r1) + mr r11, r1 + stw r12,_NIP(r1) rlwinm r9,r9,0,14,12 /* clear MSR_WE (necessary?) */ lis r12, STACK_FRAME_REGS_MARKER@ha /* exception frame marker */ stw r2,GPR2(r11) -- 2.25.0