Received: by 2002:a25:7ec1:0:0:0:0:0 with SMTP id z184csp5352543ybc; Wed, 27 Nov 2019 02:43:48 -0800 (PST) X-Google-Smtp-Source: APXvYqzSRhlSRpUBsyIH4Iudn99edlThWBkFESTAZWkvPNz5H3Oba0e4Urp81T/fJGMkeXa+Id2l X-Received: by 2002:aa7:dd4f:: with SMTP id o15mr30761176edw.189.1574851428322; Wed, 27 Nov 2019 02:43:48 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1574851428; cv=none; d=google.com; s=arc-20160816; b=RvV7Yw3CNqq/QV1MXQpGo7c3md1psFdHOehyhhxVQ6QVHNKMy+iMGHVj/lDHLnG7Ss AjWSCSQmfibchHLc0L7d52Q5ePsNXCnWi2d6tJ9xKwTQgiSx4cSMh/SwrIHZkFqWJ5fe jmcq3ISzByJX93+wcf/2n06TBqDSpR6GIX4xACK1i3iMKhmvEitxfTAwqdv2lpw2fnnV nCgL5MPeY9BXcPeIY+5slIbK1S5VLIsROwA66pphcgsWXfeSB3EodS5atrYDIJYCokU1 vPVNnZpHtnQhrwMwUWAcD7tSnQXVc0/ux683/pEb7vwVKQQqcyLCh+v/HXKe42yndEgs QeOA== 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=5ciUi9UuAR54jLdBiesCrKSBKsWGx5SB+J+B1EPvH94=; b=HrpvhczhqnS/71CQ+EF0i/lVT1GilGIgPgVNaBOxhk4XnZqM0+JdBvCKaBgbGoGpzf LfQKvK4EqV5AYrI/+v7/dlYYZbIURg1LlpqV8sk39C9rHzSA5xYs6mvID8lp/m8x+J/B OogDmL1uHttzJFbUfIU8/CeYyGHc4vZgF7BsrmytEY8Ms3Pluudfsycq4rbSoEnroQdZ G7NVTInM3s2N4QUFsKY8cuREdC7Ss2JrnK09oHQfWfYjAnIW0AdGLxddjY3A9+Z6sYjG y+ukP8h4rJQVjGSjzLpjdysAPL5zYuytn/pQ6b0ri881jmOIYYqom14TEEtLZmq9Qf3P BPSQ== 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 q16si9747238edw.406.2019.11.27.02.43.25; Wed, 27 Nov 2019 02:43:48 -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 S1726587AbfK0KjY (ORCPT + 99 others); Wed, 27 Nov 2019 05:39:24 -0500 Received: from mx2.suse.de ([195.135.220.15]:54624 "EHLO mx1.suse.de" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1726194AbfK0KjX (ORCPT ); Wed, 27 Nov 2019 05:39:23 -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 365ABB40D; Wed, 27 Nov 2019 10:39:21 +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 v2 rebase 02/34] powerpc/64s/exception: Add GEN_COMMON macro that uses INT_DEFINE parameters Date: Wed, 27 Nov 2019 11:38:38 +0100 Message-Id: <81e78969c76122dbe0b170f1f8c4abb6bfaf7c7e.1574803684.git.msuchanek@suse.de> 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 0be6d8c34536..595e215515e9 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