[PATCH] powerpc/64: pseudo-NMI/SMP watchdog
Nicholas Piggin
npiggin at gmail.com
Mon Dec 12 15:09:04 AEDT 2016
On Sat, 10 Dec 2016 23:24:59 +1100
Balbir Singh <bsingharora at gmail.com> wrote:
> > @@ -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
More information about the Linuxppc-dev
mailing list