Received: by 2002:a25:5b86:0:0:0:0:0 with SMTP id p128csp1708306ybb; Fri, 29 Mar 2019 09:41:18 -0700 (PDT) X-Google-Smtp-Source: APXvYqySyfdABSZCCSo9PVCXRL7aCPAFYP0O0r6anZ3VLExNL3UJWegxMGNkwP8HVU0Ef3uQfCI7 X-Received: by 2002:a17:902:b713:: with SMTP id d19mr34340026pls.54.1553877678390; Fri, 29 Mar 2019 09:41:18 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1553877678; cv=none; d=google.com; s=arc-20160816; b=krzqjG9GniBNpDeij9hWs+eCI1PHRvsoinCp/CfFXKzM7owkkOvC8SF+JTfB0DCd4+ i1OknOud/De7v7nzAzc4LjNWicFe3zT+vq8ahq8mE78/0Ipdea3xldIouWPS19CnH3GM sZ5jViIH2DB9qyLpLNIvjQytXx03ceMvc7eIIkprxmHYQLJnZ7wQXLiBgK10SkiLTbQM 8Ok/bRdpW8eLnF8F1rCiRDDucAZXq+0Q8bT8sk6gxdVQjJvTmJiHeOisOKuAjNR+IIKG +Jzp5M8yAjrXg2uuUZXqbRZMygYcrksyRlI21wmCEfwokmgA016h9/lHnW/NEXe0Rpv+ go0w== 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=TPZ7wk++khqNxjcTLBkQL6d3wvJtxDpca6V/+t9y3sMds5vdXogdgykhCGSobxcSAO HkBfGNED0y8KTyq1QLQqViTZ9kKMSEvQJfrb3A2WsmrKPhqX74lbmOn+V93qkdtX9jA3 iVCd6ohn5YZ5k3D8aloxF/OKQigmBh9uxRKA+JC0EIE9A+8jLMqAibyD06jtNDyzBKe2 ferxMH2H+REdw8Z4LluYfhGPneE7H9fz8BBFhEpJRuzUi+EHwKQfxS7ZRC1UttlPOroO LXzVE3xlAiyei4tove7JvuU7bNfsLmvGcx2H+npcJE4As4mpotHbmW7B7b9XpNAqTD7/ ujAg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@c-s.fr header.s=mail header.b=tb4uX6sM; 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 a5si2232777plm.171.2019.03.29.09.41.02; Fri, 29 Mar 2019 09:41:18 -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=tb4uX6sM; 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 S1730025AbfC2Qjo (ORCPT + 99 others); Fri, 29 Mar 2019 12:39:44 -0400 Received: from pegase1.c-s.fr ([93.17.236.30]:4784 "EHLO pegase1.c-s.fr" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729787AbfC2Qi1 (ORCPT ); Fri, 29 Mar 2019 12:38:27 -0400 Received: from localhost (mailhub1-int [192.168.12.234]) by localhost (Postfix) with ESMTP id 44W6qh0drbz9tyQT; Fri, 29 Mar 2019 17:38:24 +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=tb4uX6sM; 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 vY2VubH2up8d; Fri, 29 Mar 2019 17:38:24 +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 44W6qg6j5Gz9tyQP; Fri, 29 Mar 2019 17:38:23 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=c-s.fr; s=mail; t=1553877503; bh=3cTg49j7kaqjz/JFl/xsM6+jMcAItBSkH7yaOvqokj0=; h=In-Reply-To:References:From:Subject:To:Cc:Date:From; b=tb4uX6sM8D1to86mybhrcQevfejteOeOjlOATLI2QYCkG/fxomE+ySWdwJR81sdR2 FJC0Ss7p3N6kZ1MJpn02jTNeiKOzVE99amxoeZnCM6+vyXqJbYW36LeneYFe5VFjk5 79N89DZ7eLB9BaAXf32xTCq4aog5UV7wKAMgG/Sg= Received: from localhost (localhost [127.0.0.1]) by messagerie.si.c-s.fr (Postfix) with ESMTP id 837158B93D; Fri, 29 Mar 2019 17:38:25 +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 z-qGNRMOjuTu; Fri, 29 Mar 2019 17:38:25 +0100 (CET) Received: from po16846vm.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 6AE788B938; Fri, 29 Mar 2019 17:38:25 +0100 (CET) Received: by po16846vm.idsi0.si.c-s.fr (Postfix, from userid 0) id 5FEC26FC56; Fri, 29 Mar 2019 16:38:25 +0000 (UTC) Message-Id: <73122cc474d11fc86153aa7dde0ea74323af5251.1553877076.git.christophe.leroy@c-s.fr> In-Reply-To: References: From: Christophe Leroy Subject: [PATCH v2 03/17] 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: Fri, 29 Mar 2019 16:38:25 +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