From: Benjamin Herrenschmidt <benh@kernel.crashing.org>
To: Balbir Singh <bsingharora@gmail.com>,
Nicholas Piggin <npiggin@gmail.com>
Cc: linuxppc-dev@ozlabs.org, Michael Ellerman <mpe@ellerman.id.au>,
Paul Mackerras <paulus@samba.org>
Subject: Re: [powerpc/nmi: RFC 2/2] Keep interrupts enabled even on soft disable
Date: Thu, 15 Dec 2016 09:15:29 -0600 [thread overview]
Message-ID: <1481814929.17253.106.camel@kernel.crashing.org> (raw)
In-Reply-To: <b1455ef8-7583-bafb-fce9-0c2829d87c0b@gmail.com>
On Wed, 2016-12-14 at 11:41 +1100, Balbir Singh wrote:
> I was planning to skipping other IRQ chips for now and support just
> XICS/XIVE with BOOK3S and PPC64. But we can discuss this.
Well you still need to make sure you don't do your lazy stuff on
them and actually mask EE.
> > That's why I mentioned opt-in. Maybe make it conditional on a
> > global
> > boolean that gets enabled by the PIC itself, or make it an enum
> >
> > enum lazy_irq_masking_mode {
> > lazy_irq_mask_ee, /* Use CPU EE bit (default) */
> > lazy_irq_mask_fetch, /* Fetch the interrupt and stash it
> > away */
> > lazy_irq_mask_prio /* Change processor priority */
> > };
> >
> > For the latter we'd need a ppc_md. hook to do the priority change
> > which xive (and potentially others like MPIC) could use.
>
> We have set_cpu_priority for XICS, which sets the base_priority
> only for the CPPR at the moment. It can be extended
Well, that's what I said earlier. XICS can do that in *theory* but it's
broken in HW. There's a race condition or two, if you whack the CPPR in
a way that causes a pending interrupt to be rejected, there's a timing
window where the ICP can wedge itself or the interrupt be lost, I don't
remember.
The only safe way on XICS is to fetch the interrupt (which implicitly
raises the CPPR) and lower it using EOI.
Cheers,
Ben.
prev parent reply other threads:[~2016-12-15 15:15 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-12-12 9:50 [powerpc/nmi: RFC 0/2] Support Soft NMI Balbir Singh
2016-12-12 9:50 ` [powerpc/nmi: RFC 1/2] Merge IPI and DEFAULT priorities Balbir Singh
2016-12-12 9:50 ` [powerpc/nmi: RFC 2/2] Keep interrupts enabled even on soft disable Balbir Singh
2016-12-12 13:31 ` Nicholas Piggin
2016-12-12 15:24 ` Benjamin Herrenschmidt
2016-12-13 3:28 ` Balbir Singh
2016-12-13 15:22 ` Benjamin Herrenschmidt
2016-12-13 5:36 ` Balbir Singh
2016-12-13 6:06 ` Nicholas Piggin
2016-12-13 15:27 ` Benjamin Herrenschmidt
2016-12-14 0:41 ` Balbir Singh
2016-12-15 15:15 ` 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=1481814929.17253.106.camel@kernel.crashing.org \
--to=benh@kernel.crashing.org \
--cc=bsingharora@gmail.com \
--cc=linuxppc-dev@ozlabs.org \
--cc=mpe@ellerman.id.au \
--cc=npiggin@gmail.com \
--cc=paulus@samba.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.