Thread (6 messages) 6 messages, 3 authors, 2016-12-12

Re: [PATCH] powerpc/64: pseudo-NMI/SMP watchdog

From: Nicholas Piggin <npiggin@gmail.com>
Date: 2016-12-12 04:09:22

On Sat, 10 Dec 2016 23:24:59 +1100
Balbir Singh [off-list ref] wrote:
quoted
@@ -1295,7 +1295,7 @@ masked_##_H##interrupt:					\
 	lis	r10,0x7fff;				\
 	ori	r10,r10,0xffff;				\
 	mtspr	SPRN_DEC,r10;				\
-	b	2f;					\
+	b	masked_decrementer_##_H##interrupt;	\
 1:	cmpwi	r10,PACA_IRQ_DBELL;			\
 	beq	2f;					\
 	cmpwi	r10,PACA_IRQ_HMI;			\
@@ -1312,6 +1312,16 @@ masked_##_H##interrupt:					\
 	##_H##rfid;					\
 	b	.
 
+#define MASKED_NMI(_H)					\
+masked_decrementer_##_H##interrupt:			\
+	std	r12,PACA_EXGEN+EX_R12(r13);		\
+	GET_SCRATCH0(r10);				\
+	std	r10,PACA_EXGEN+EX_R13(r13);		\
+	EXCEPTION_PROLOG_PSERIES_1(soft_nmi_common, _H)
+  
This bit a little confusing, we are already handling an exception
do a masked_##_H##interrupt check and we redo the exception prolog?
The soft mask test is done halfway thought EXCEPTION_PROLOG_1, so I think
we have to finish that then continue with PROLOG_PSERIES_1 to get into
"common" code.

That's the main tricky part of the code, so I'll have to go back and
step through the asm and comment better, but it looked about right when
I wrote it (famous last words).

Thanks,
Nick
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help