Received: by 2002:a25:7ec1:0:0:0:0:0 with SMTP id z184csp767343ybc; Tue, 12 Nov 2019 08:54:23 -0800 (PST) X-Google-Smtp-Source: APXvYqw6O6UjEFoE7AeiqbGASfrJP9WTqyyz8sSlO1tEICVrWIH/9JJbBcC/S/+/58t4M6YcYHX1 X-Received: by 2002:a50:ff12:: with SMTP id a18mr33448200edu.200.1573577663846; Tue, 12 Nov 2019 08:54:23 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1573577663; cv=none; d=google.com; s=arc-20160816; b=Qk30cR6S6BpO3DgXEQYO6ps/aPQdAoiQ+xUhEUaYsWJsT0cx9Tc746Dbaldo/DZYAA 4IZu7DPnrRDGwRXHpHSjDaGgVLMoGX+JoLS9XdpQGdtL3gz3omrbscUP9Yz5dlHv22G7 OeXZT8eDwVotBd88BEW5NmBLFq2w3T/uX1Cs5ZHeizCi5EwutCjXGWp10RJc16H0cxtg n76YMecTJ3gr1rSbxF+IVRRVQ8eQ29Q1K4L3H9u9gdEpIuZb5DMoBnoSOKY/DLRyUd2P jfU+PXbL8A/5Z63UriTxpLHNz2VMTqx1+kiyC17E8JlRM8A/FNzNQrgYqYH4ZRKAqqID vazw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from; bh=I7Nr1VLlspNcM9Aa0dMD9jt1mWnZxWob8AVNMpdZbAY=; b=j8O94R91IPd2t2r8gKqPXdVw8z8aqaYajBoAdhXBS/chzMSUlhrLKqgY6HiM6bnnZs h3RXiI/cB+j7/7Dbfckppqw6gJg/OKPo+ZkcsKlwzPLdlJyMO/KpdbsuJnx/jL3SeJ81 ClV0uvY0EbVSAHeQXsYiwvPjsLnaNw++h3DZ4D0C/ry0ZiZLxfVGACyfFHZbphCuvvuP L/SLOpDCbPEOi1B/oDvFD6vrUJdpZ7wXbHVT+9a/CNaoBNJV0aNF2bEa6u/0Xn5+B2eO PfdFmekLTntC9DC+55wML2xvEmwNfiV4EyEJZQdBV8SHfJcaTAL6gABKlmRgSX+HE8+f fX5w== 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 s8si322427ejx.271.2019.11.12.08.53.59; Tue, 12 Nov 2019 08:54:23 -0800 (PST) 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 S1726960AbfKLQxV (ORCPT + 99 others); Tue, 12 Nov 2019 11:53:21 -0500 Received: from mx2.suse.de ([195.135.220.15]:33160 "EHLO mx1.suse.de" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1727133AbfKLQxT (ORCPT ); Tue, 12 Nov 2019 11:53:19 -0500 X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay2.suse.de (unknown [195.135.220.254]) by mx1.suse.de (Postfix) with ESMTP id 419B8B2B9; Tue, 12 Nov 2019 16:53:17 +0000 (UTC) From: Michal Suchanek To: linuxppc-dev@lists.ozlabs.org Cc: Benjamin Herrenschmidt , Paul Mackerras , Michael Ellerman , Oleg Nesterov , Alexander Viro , Christian Brauner , Nicholas Piggin , Allison Randal , "Naveen N. Rao" , Michal Suchanek , Thomas Gleixner , Breno Leitao , Christophe Leroy , Claudio Carvalho , Russell Currey , Greg Kroah-Hartman , Mahesh Salgaonkar , Arnd Bergmann , Geert Uytterhoeven , Firoz Khan , Dmitry Vyukov , Masahiro Yamada , Hari Bathini , Andrew Donnellan , Nicolai Stange , Valentin Schneider , Diana Craciun , Daniel Axtens , Michael Neuling , Gustavo Romero , Mathieu Malaterre , "Steven Rostedt" , "Eric W. Biederman" , Heiko Carstens , David Howells , Brajeswar Ghosh , Jagadeesh Pagadala , David Hildenbrand , Andrew Morton , Madhavan Srinivasan , linux-kernel@vger.kernel.org Subject: [PATCH 02/33] powerpc/64s/exception: Add GEN_COMMON macro that uses INT_DEFINE parameters Date: Tue, 12 Nov 2019 17:52:00 +0100 Message-Id: X-Mailer: git-send-email 2.23.0 In-Reply-To: References: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Nicholas Piggin No generated code change. Signed-off-by: Nicholas Piggin --- arch/powerpc/kernel/exceptions-64s.S | 24 +++++++++++++++++------- 1 file changed, 17 insertions(+), 7 deletions(-) diff --git a/arch/powerpc/kernel/exceptions-64s.S b/arch/powerpc/kernel/exceptions-64s.S index e6ad6e6cf65e..591ae2a73e18 100644 --- a/arch/powerpc/kernel/exceptions-64s.S +++ b/arch/powerpc/kernel/exceptions-64s.S @@ -206,6 +206,9 @@ END_FTR_SECTION_NESTED(ftr,ftr,943) #define IMASK .L_IMASK_\name\() #define IKVM_REAL .L_IKVM_REAL_\name\() #define IKVM_VIRT .L_IKVM_VIRT_\name\() +#define ISTACK .L_ISTACK_\name\() +#define IRECONCILE .L_IRECONCILE_\name\() +#define IKUAP .L_IKUAP_\name\() #define INT_DEFINE_BEGIN(n) \ .macro int_define_ ## n name @@ -246,6 +249,15 @@ do_define_int n .ifndef IKVM_VIRT IKVM_VIRT=0 .endif + .ifndef ISTACK + ISTACK=1 + .endif + .ifndef IRECONCILE + IRECONCILE=1 + .endif + .ifndef IKUAP + IKUAP=1 + .endif .endm .macro INT_KVM_HANDLER name, vec, hsrr, area, skip @@ -670,6 +682,10 @@ END_FTR_SECTION_NESTED(CPU_FTR_CFAR, CPU_FTR_CFAR, 66) .endif .endm +.macro GEN_COMMON name + INT_COMMON IVEC, IAREA, ISTACK, IKUAP, IRECONCILE, IDAR, IDSISR +.endm + /* * Restore all registers including H/SRR0/1 saved in a stack frame of a * standard exception. @@ -1221,13 +1237,7 @@ EXC_VIRT_BEGIN(data_access, 0x4300, 0x80) EXC_VIRT_END(data_access, 0x4300, 0x80) INT_KVM_HANDLER data_access, 0x300, EXC_STD, PACA_EXGEN, 1 EXC_COMMON_BEGIN(data_access_common) - /* - * Here r13 points to the paca, r9 contains the saved CR, - * SRR0 and SRR1 are saved in r11 and r12, - * r9 - r13 are saved in paca->exgen. - * EX_DAR and EX_DSISR have saved DAR/DSISR - */ - INT_COMMON 0x300, PACA_EXGEN, 1, 1, 1, 1, 1 + GEN_COMMON data_access ld r4,_DAR(r1) ld r5,_DSISR(r1) BEGIN_MMU_FTR_SECTION -- 2.23.0