[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <81e78969c76122dbe0b170f1f8c4abb6bfaf7c7e.1574803684.git.msuchanek@suse.de>
Date: Wed, 27 Nov 2019 11:38:38 +0100
From: Michal Suchanek <msuchanek@...e.de>
To: linuxppc-dev@...ts.ozlabs.org
Cc: Benjamin Herrenschmidt <benh@...nel.crashing.org>,
Paul Mackerras <paulus@...ba.org>,
Michael Ellerman <mpe@...erman.id.au>,
Oleg Nesterov <oleg@...hat.com>,
Alexander Viro <viro@...iv.linux.org.uk>,
Christian Brauner <christian@...uner.io>,
Nicholas Piggin <npiggin@...il.com>,
Allison Randal <allison@...utok.net>,
"Naveen N. Rao" <naveen.n.rao@...ux.vnet.ibm.com>,
Michal Suchanek <msuchanek@...e.de>,
Thomas Gleixner <tglx@...utronix.de>,
Breno Leitao <leitao@...ian.org>,
Christophe Leroy <christophe.leroy@....fr>,
Claudio Carvalho <cclaudio@...ux.ibm.com>,
Russell Currey <ruscur@...sell.cc>,
Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
Mahesh Salgaonkar <mahesh@...ux.vnet.ibm.com>,
Arnd Bergmann <arnd@...db.de>,
Geert Uytterhoeven <geert@...ux-m68k.org>,
Firoz Khan <firoz.khan@...aro.org>,
Dmitry Vyukov <dvyukov@...gle.com>,
Masahiro Yamada <yamada.masahiro@...ionext.com>,
Hari Bathini <hbathini@...ux.ibm.com>,
Andrew Donnellan <andrew.donnellan@....ibm.com>,
Nicolai Stange <nstange@...e.de>,
Valentin Schneider <valentin.schneider@....com>,
Diana Craciun <diana.craciun@....com>,
Daniel Axtens <dja@...ens.net>,
Michael Neuling <mikey@...ling.org>,
Gustavo Romero <gromero@...ux.ibm.com>,
Mathieu Malaterre <malat@...ian.org>,
"Steven Rostedt" <rostedt@...dmis.org>,
"Eric W. Biederman" <ebiederm@...ssion.com>,
Heiko Carstens <heiko.carstens@...ibm.com>,
David Howells <dhowells@...hat.com>,
Brajeswar Ghosh <brajeswar.linux@...il.com>,
Jagadeesh Pagadala <jagdsh.linux@...il.com>,
David Hildenbrand <david@...hat.com>,
Andrew Morton <akpm@...ux-foundation.org>,
Madhavan Srinivasan <maddy@...ux.vnet.ibm.com>,
linux-kernel@...r.kernel.org
Subject: [PATCH v2 rebase 02/34] powerpc/64s/exception: Add GEN_COMMON macro that uses INT_DEFINE parameters
From: Nicholas Piggin <npiggin@...il.com>
No generated code change.
Signed-off-by: Nicholas Piggin <npiggin@...il.com>
---
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
Powered by blists - more mailing lists