Received: by 2002:a25:4158:0:0:0:0:0 with SMTP id o85csp4862265yba; Tue, 30 Apr 2019 05:41:38 -0700 (PDT) X-Google-Smtp-Source: APXvYqy0IeoCDfwJvKy8Czawa4DNJOMoqDzG/lS1cOPpSrkrNOTtcCiLtEFiM413iuWAbIbVbprT X-Received: by 2002:a17:902:e086:: with SMTP id cb6mr7384890plb.237.1556628098755; Tue, 30 Apr 2019 05:41:38 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1556628098; cv=none; d=google.com; s=arc-20160816; b=YFkgUIulP1gI5SiKwTGY67EN7W6DaQCtwJEhC1W62iTc6IyhjyfwtLNn0ImGvaeB4r xNNvVio1H3p2ZZLITyjtGGdLtfoJoWOjM+8TLLKhK+QN0TszdC0iFOEqhEuncgDB5Ui2 LIIaLuV0aGrqseYIHw08jg7IJ2Uy2mO7GunK0Mf+GlBk2uGtvVKTKeIxHONKx2GWtsTU 0Wv3leMnSmkHKp0yWipnRsVJvYXYtz+SDA4wHmE42zeIvMeqERfDSQI7+syHpVHe0DfQ 1kIhy54EeheEgMxRZK9ZCZye4ShzHh7TxEG1JxZ6/nwOiUZhYApFcAXzxxzZcuPy6BhS jo3g== 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=3cTg49j7kaqjz/JFl/xsM6+jMcAItBSkH7yaOvqokj0=; b=HOTKL+7+h7tTvD/1ZrEZ/tu+b9hicuVnegTWaXBuiM7SOxFhBZTVi7BSR8IKXHmdj7 0VTE/Nqxz1FIjZB0yqxUhPlld8Gdeq8MQUfktFBN449zUSk2rYyoVjR6X4ji2OuJDczr OmRy9Fsf2ux7ochH7vgYp9tTpWA/l6V3VTVSFY7uhAr72MSabKpKluPXTewPK7rKEyG9 qscD7GP5RxBx1bMTYIAny0fvTmZp7yB1UPwQJOoXUK40F3JusegRBUB1xQuYXhiVvc6c 6WgZByUV8Al1q0rpwbjUx48CqxdpSKnSrkB/DSIloVWQ9cwa76HYhcrrvjrrz7a+aTqm fGOA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@c-s.fr header.s=mail header.b=t85LiozE; 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 b2si18611248pgh.159.2019.04.30.05.41.23; Tue, 30 Apr 2019 05:41:38 -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=t85LiozE; 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 S1728068AbfD3Miz (ORCPT + 99 others); Tue, 30 Apr 2019 08:38:55 -0400 Received: from pegase1.c-s.fr ([93.17.236.30]:53029 "EHLO pegase1.c-s.fr" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727826AbfD3Miy (ORCPT ); Tue, 30 Apr 2019 08:38:54 -0400 Received: from localhost (mailhub1-int [192.168.12.234]) by localhost (Postfix) with ESMTP id 44th0W2nz5z9vD35; Tue, 30 Apr 2019 14:38:51 +0200 (CEST) Authentication-Results: localhost; dkim=pass reason="1024-bit key; insecure key" header.d=c-s.fr header.i=@c-s.fr header.b=t85LiozE; 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 lsDz9f8Oyfao; Tue, 30 Apr 2019 14:38:51 +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 44th0W1nYWz9vD30; Tue, 30 Apr 2019 14:38:51 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=c-s.fr; s=mail; t=1556627931; bh=3cTg49j7kaqjz/JFl/xsM6+jMcAItBSkH7yaOvqokj0=; h=In-Reply-To:References:From:Subject:To:Cc:Date:From; b=t85LiozE3aDWaGar702PabeTQ5i+z7JKR8xMWKYdnKYxLTmCyze6ShCHpp4Sfn1AQ GKULi1TTrahOMKFN1WGbRwOxcHEREorNdrcegDOZ3mQ6rKGwHwjwqte7rYcKDdW+TE O3nqExu1m9sshaI4LlhSiRjO8WUNnAkTuTgKoV0c= Received: from localhost (localhost [127.0.0.1]) by messagerie.si.c-s.fr (Postfix) with ESMTP id 980C28B8DF; Tue, 30 Apr 2019 14:38:52 +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 9oZ3o2EPl7bC; Tue, 30 Apr 2019 14:38:52 +0200 (CEST) Received: from po16846vm.idsi0.si.c-s.fr (unknown [192.168.4.90]) by messagerie.si.c-s.fr (Postfix) with ESMTP id 728138B8C2; Tue, 30 Apr 2019 14:38:52 +0200 (CEST) Received: by po16846vm.idsi0.si.c-s.fr (Postfix, from userid 0) id 32772666F8; Tue, 30 Apr 2019 12:38:52 +0000 (UTC) Message-Id: <44f43878d300c5c357c92adceccf0ad8ff582c85.1556627571.git.christophe.leroy@c-s.fr> In-Reply-To: References: From: Christophe Leroy Subject: [PATCH v3 03/16] powerpc/32: make the 6xx/8xx EXC_XFER_TEMPLATE() similar to the 40x/booke one To: Benjamin Herrenschmidt , Paul Mackerras , Michael Ellerman , Nicholas Piggin Cc: linux-kernel@vger.kernel.org, linuxppc-dev@lists.ozlabs.org Date: Tue, 30 Apr 2019 12:38:52 +0000 (UTC) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 6xx/8xx EXC_XFER_TEMPLATE() macro adds a i##n symbol which is unused and can be removed. 40x and booke EXC_XFER_TEMPLATE() macros takes msr from the caller while the 6xx/8xx version uses only MSR_KERNEL as msr value. This patch modifies the 6xx/8xx version to make it similar to the 40x and booke versions. Signed-off-by: Christophe Leroy --- arch/powerpc/kernel/head_32.h | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/arch/powerpc/kernel/head_32.h b/arch/powerpc/kernel/head_32.h index cf3d00844597..985758cbf577 100644 --- a/arch/powerpc/kernel/head_32.h +++ b/arch/powerpc/kernel/head_32.h @@ -99,13 +99,12 @@ addi r3,r1,STACK_FRAME_OVERHEAD; \ xfer(n, hdlr) -#define EXC_XFER_TEMPLATE(n, hdlr, trap, copyee, tfer, ret) \ +#define EXC_XFER_TEMPLATE(hdlr, trap, msr, copyee, tfer, ret) \ li r10,trap; \ stw r10,_TRAP(r11); \ - LOAD_MSR_KERNEL(r10, MSR_KERNEL); \ + LOAD_MSR_KERNEL(r10, msr); \ copyee(r10, r9); \ bl tfer; \ -i##n: \ .long hdlr; \ .long ret @@ -113,19 +112,19 @@ i##n: \ #define NOCOPY(d, s) #define EXC_XFER_STD(n, hdlr) \ - EXC_XFER_TEMPLATE(n, hdlr, n, NOCOPY, transfer_to_handler_full, \ + EXC_XFER_TEMPLATE(hdlr, n, MSR_KERNEL, NOCOPY, transfer_to_handler_full, \ ret_from_except_full) #define EXC_XFER_LITE(n, hdlr) \ - EXC_XFER_TEMPLATE(n, hdlr, n+1, NOCOPY, transfer_to_handler, \ + EXC_XFER_TEMPLATE(hdlr, n+1, MSR_KERNEL, NOCOPY, transfer_to_handler, \ ret_from_except) #define EXC_XFER_EE(n, hdlr) \ - EXC_XFER_TEMPLATE(n, hdlr, n, COPY_EE, transfer_to_handler_full, \ + EXC_XFER_TEMPLATE(hdlr, n, MSR_KERNEL, COPY_EE, transfer_to_handler_full, \ ret_from_except_full) #define EXC_XFER_EE_LITE(n, hdlr) \ - EXC_XFER_TEMPLATE(n, hdlr, n+1, COPY_EE, transfer_to_handler, \ + EXC_XFER_TEMPLATE(hdlr, n+1, MSR_KERNEL, COPY_EE, transfer_to_handler, \ ret_from_except) #endif /* __HEAD_32_H__ */ -- 2.13.3