From: Benjamin Herrenschmidt <benh@kernel.crashing.org>
To: Tudor Laurentiu <Laurentiu.Tudor@freescale.com>
Cc: Scott Wood <scottwood@freescale.com>,
Stuart Yoder <b08248@gmail.com>,
Anton Blanchard <anton@au1.ibm.com>,
linuxppc-dev <linuxppc-dev@lists.ozlabs.org>,
Paul Mackerras <pmac@au1.ibm.com>
Subject: Re: [PATCH v2] powerpc: Rework lazy-interrupt handling
Date: Fri, 10 Feb 2012 07:47:20 +1100 [thread overview]
Message-ID: <1328820440.2903.72.camel@pasglop> (raw)
In-Reply-To: <4F33FC65.40702@freescale.com>
On Thu, 2012-02-09 at 19:03 +0200, Tudor Laurentiu wrote:
> > +masked_interrupt_book3e_0x900:
> > + ACK_DEC(r11);
> > + li r11,PACA_HAPPENED_DEC
> > + b masked_interrupt_book3e_no_mask
> > +masked_interrupt_book3e_0x980:
> > + ACK_FIT(r11);
> > + li r11,PACA_HAPPENED_DEC
> > + b masked_interrupt_book3e_no_mask
> > +masked_interrupt_book3e_0x280:
> > +masked_interrupt_book3e_0x2c0:
> > + li r11,PACA_HAPPENED_DBELL
> > + b masked_interrupt_book3e_no_mask
> > +
> > +masked_interrupt_book3e_no_mask:
> > + mtcr r10
> > + lbz r10,PACAIRQHAPPENED(r13)
> > + ori r10,r10,r11
>
> Shouldn't this be an 'or'?
Yes, absolutely. This is a typo/thinko I do all the time ... oops.
> > + stb r10,PACAIRQHAPPENED(r13)
> > + b 1f
> > +masked_interrupt_book3e_full_mask:
> > mtcr r10
> > -masked_interrupt_book3e_common:
> > - stb r11,PACAHARDIRQEN(r13)
> > + lbz r10,PACAIRQHAPPENED(r13)
> > + ori r10,r10,r11
>
> Same comment.
I'll respin and fix.
Cheers,
Ben
> > + stb r10,PACAIRQHAPPENED(r13)
> > mfspr r10,SPRN_SRR1
> > rldicl r11,r10,48,1 /* clear MSR_EE */
> > rotldi r10,r11,16
> > mtspr SPRN_SRR1,r10
> > - ld r10,PACA_EXGEN+EX_R10(r13); /* restore registers */
> > +1: ld r10,PACA_EXGEN+EX_R10(r13);
> > ld r11,PACA_EXGEN+EX_R11(r13);
> > mfspr r13,SPRN_SPRG_GEN_SCRATCH;
> > rfi
> > b .
> >
> > /*
> > + * Called from arch_local_irq_enable when an interrupt needs
> > + * to be resent. r3 contains either 0x500,0x900,0x260 or 0x280
> > + * to indicate the kind of interrupt. MSR:EE is already off.
> > + * We generate a stackframe like if a real interrupt had happened.
> > + *
> > + * Note: While MSR:EE is off, we need to make sure that _MSR
> > + * in the generated frame has EE set to 1 or the exception
> > + * handler will not properly re-enable them.
> > + */
> > +_GLOBAL(__reemit_interrupt)
> > + /* We are going to jump to the exception common code which
> > + * will retrieve various register values from the PACA which
> > + * we don't give a damn about.
> > + */
> > + mflr r10
> > + mfmsr r11
> > + mfcr r4;
> > + mtspr SPRN_SPRG_GEN_SCRATCH,r13;
> > + std r1,PACA_EXGEN+EX_R1(r13);
> > + stw r4,PACA_EXGEN+EX_CR(r13);
> > + ori r11,r11,MSR_EE
> > + subi r1,r1,INT_FRAME_SIZE;
> > + cmpwi cr0,r3,0x500
> > + beq exc_0x500_common
> > + cmpwi cr0,r3,0x900
> > + beq+ exc_0x900_common
> > + cmpwi cr0,r3,0x280
> > + beq+ exc_0x280_common
> > + blr
> > +
> > +/*
> > * This is called from 0x300 and 0x400 handlers after the prologs with
> > * r14 and r15 containing the fault address and error code, with the
> > * original values stashed away in the PACA
> > @@ -680,6 +762,8 @@ BAD_STACK_TRAMPOLINE(0x000)
> > BAD_STACK_TRAMPOLINE(0x100)
> > BAD_STACK_TRAMPOLINE(0x200)
> > BAD_STACK_TRAMPOLINE(0x260)
> > +BAD_STACK_TRAMPOLINE(0x280)
> > +BAD_STACK_TRAMPOLINE(0x2a0)
> > BAD_STACK_TRAMPOLINE(0x2c0)
> > BAD_STACK_TRAMPOLINE(0x2e0)
> > BAD_STACK_TRAMPOLINE(0x300)
>
> ---
> Best Regards, Laurentiu
prev parent reply other threads:[~2012-02-09 20:47 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-02-09 4:25 [PATCH v2] powerpc: Rework lazy-interrupt handling Benjamin Herrenschmidt
2012-02-09 17:03 ` Tudor Laurentiu
2012-02-09 20:47 ` Benjamin Herrenschmidt [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=1328820440.2903.72.camel@pasglop \
--to=benh@kernel.crashing.org \
--cc=Laurentiu.Tudor@freescale.com \
--cc=anton@au1.ibm.com \
--cc=b08248@gmail.com \
--cc=linuxppc-dev@lists.ozlabs.org \
--cc=pmac@au1.ibm.com \
--cc=scottwood@freescale.com \
/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).