linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
From: Nicholas Piggin <npiggin@gmail.com>
To: Balbir Singh <bsingharora@gmail.com>
Cc: linuxppc-dev@lists.ozlabs.org
Subject: Re: [PATCH] powerpc/64: pseudo-NMI/SMP watchdog
Date: Mon, 12 Dec 2016 14:09:04 +1000	[thread overview]
Message-ID: <20161212140904.7a3fe955@roar.ozlabs.ibm.com> (raw)
In-Reply-To: <5f861916-f96a-484b-4d34-5253285086bd@gmail.com>

On Sat, 10 Dec 2016 23:24:59 +1100
Balbir Singh <bsingharora@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

      reply	other threads:[~2016-12-12  4:09 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-12-09 15:52 [PATCH] powerpc/64: pseudo-NMI/SMP watchdog Nicholas Piggin
2016-12-09 21:17 ` Benjamin Herrenschmidt
2016-12-10  5:22 ` Balbir Singh
2016-12-10  6:05   ` Nicholas Piggin
2016-12-10 12:24 ` Balbir Singh
2016-12-12  4:09   ` Nicholas Piggin [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20161212140904.7a3fe955@roar.ozlabs.ibm.com \
    --to=npiggin@gmail.com \
    --cc=bsingharora@gmail.com \
    --cc=linuxppc-dev@lists.ozlabs.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).