Received: by 2002:a25:7ec1:0:0:0:0:0 with SMTP id z184csp4647198ybc; Tue, 26 Nov 2019 12:15:43 -0800 (PST) X-Google-Smtp-Source: APXvYqxxsuy9bX3nytKC6KZkroPfTWTMc8TeMkMKzrKX+8KpcfXbIw8Fdnk74vHF/GVFcIrqKT8d X-Received: by 2002:a17:906:891:: with SMTP id n17mr42834475eje.230.1574799342890; Tue, 26 Nov 2019 12:15:42 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1574799342; cv=none; d=google.com; s=arc-20160816; b=ef2yW2SITVerOcztUc0BsM+XR2JlxCrb5SwmNvYd4AZRs8IvNsk4MgAqg6WINbijP+ RrI2t8rf2N7AEuba2uX3zkuISzk8HkW2qSgHj+E0q8RhAwDCyjbBT81LZHbedonbSLvC Jun3r6HZ0Gd0EzfMEpEPwXMBqggLiF1LeD+qiWYFRjW6xpvYJnv9V/r/MaRrNMT6Lyhx ox0b/0exUo0t0TEc3ykIJBd0s4pPUH50dx10ZFK5b7syEmFaZGs85F2tyvdZ15af1vTz jYvnRiV1Qw17x/vLIBVeMpXUaXHxnePdJm2bGTu5Z3YXGJ7sf3uWT/NJ2gRcdTSzk+5V 2rPA== 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=FUw4Giq7Q07zT9gumKoY4pgT9XfPpC1wajn35kMRMb6NXGgUvzhTxyaw0FHsC6/6Hq LNrDYhnILD+8TJSMgOwuA3ENXC86m17t47bGWeBL+DyDRStCLuXx35PGFCk4r2YpmhMZ BIBN5NKsXtySLz6FAX1TGRcJVR6/kT5sMbWUGOAk4yGUAOyyQD45AwcKwaEQyk3ZtpJT 5vkY3ji5wVhUmS/CflswyhL1SYQVbVpv1ug58vGjbpSLNBocYrDF/FLv5Tzqj7uhy6j9 LKIQKWzeqLgXldpubTKolxackwXNZAopOKuKHcqeM7zyzfuDDctoANl5KTGSN3DMSy+y 8pCA== 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 oz10si7585688ejb.163.2019.11.26.12.15.17; Tue, 26 Nov 2019 12:15:42 -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 S1727105AbfKZUOG (ORCPT + 99 others); Tue, 26 Nov 2019 15:14:06 -0500 Received: from mx2.suse.de ([195.135.220.15]:45704 "EHLO mx1.suse.de" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1726957AbfKZUOE (ORCPT ); Tue, 26 Nov 2019 15:14:04 -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 2AB20AF3B; Tue, 26 Nov 2019 20:14:02 +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 02/35] powerpc/64s/exception: Add GEN_COMMON macro that uses INT_DEFINE parameters Date: Tue, 26 Nov 2019 21:13:16 +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