From: Benjamin Herrenschmidt <benh@kernel.crashing.org>
To: Scott Wood <scottwood@freescale.com>
Cc: linuxppc-dev@lists.ozlabs.org, Alexander Graf <agraf@suse.de>,
kvm-ppc@vger.kernel.org, kvm@vger.kernel.org
Subject: Re: [PATCH v2 1/4] powerpc: hard_irq_disable(): Call trace_hardirqs_off after disabling
Date: Fri, 10 May 2013 17:00:45 +1000 [thread overview]
Message-ID: <1368169245.4524.10.camel@pasglop> (raw)
In-Reply-To: <1368155384-11035-2-git-send-email-scottwood@freescale.com>
On Thu, 2013-05-09 at 22:09 -0500, Scott Wood wrote:
> lockdep.c has this:
> /*
> * So we're supposed to get called after you mask local IRQs,
> * but for some reason the hardware doesn't quite think you did
> * a proper job.
> */
> if (DEBUG_LOCKS_WARN_ON(!irqs_disabled()))
> return;
>
> Since irqs_disabled() is based on soft_enabled(), that (not just the
> hard EE bit) needs to be 0 before we call trace_hardirqs_off.
>
> Signed-off-by: Scott Wood <scottwood@freescale.com>
Oops ;-)
I'll apply that to my tree and will send it to Linus right after -rc1,
the rest will go the normal way for KVM patches.
Cheers,
Ben.
> ---
> arch/powerpc/include/asm/hw_irq.h | 5 +++--
> 1 file changed, 3 insertions(+), 2 deletions(-)
>
> diff --git a/arch/powerpc/include/asm/hw_irq.h b/arch/powerpc/include/asm/hw_irq.h
> index d615b28..ba713f1 100644
> --- a/arch/powerpc/include/asm/hw_irq.h
> +++ b/arch/powerpc/include/asm/hw_irq.h
> @@ -96,11 +96,12 @@ static inline bool arch_irqs_disabled(void)
> #endif
>
> #define hard_irq_disable() do { \
> + u8 _was_enabled = get_paca()->soft_enabled; \
> __hard_irq_disable(); \
> - if (local_paca->soft_enabled) \
> - trace_hardirqs_off(); \
> get_paca()->soft_enabled = 0; \
> get_paca()->irq_happened |= PACA_IRQ_HARD_DIS; \
> + if (_was_enabled) \
> + trace_hardirqs_off(); \
> } while(0)
>
> static inline bool lazy_irq_pending(void)
next prev parent reply other threads:[~2013-05-10 7:00 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-05-10 3:09 [PATCH v2 0/4] kvm/ppc: interrupt disabling fixes Scott Wood
2013-05-10 3:09 ` [PATCH v2 1/4] powerpc: hard_irq_disable(): Call trace_hardirqs_off after disabling Scott Wood
2013-05-10 7:00 ` Benjamin Herrenschmidt [this message]
2013-05-10 3:09 ` [PATCH v2 2/4] kvm/ppc/booke64: Fix lazy ee handling in kvmppc_handle_exit() Scott Wood
2013-05-10 5:01 ` Bhushan Bharat-R65777
2013-05-10 22:43 ` Scott Wood
2013-05-10 3:09 ` [PATCH v2 3/4] kvm/ppc: Call trace_hardirqs_on before entry Scott Wood
2013-05-10 3:34 ` Bhushan Bharat-R65777
2013-05-10 4:40 ` tiejun.chen
2013-05-10 22:47 ` Scott Wood
2013-05-10 3:09 ` [PATCH v2 4/4] kvm/ppc: IRQ disabling cleanup Scott Wood
2013-05-10 5:01 ` Bhushan Bharat-R65777
2013-05-10 5:31 ` tiejun.chen
2013-05-10 22:53 ` Scott Wood
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=1368169245.4524.10.camel@pasglop \
--to=benh@kernel.crashing.org \
--cc=agraf@suse.de \
--cc=kvm-ppc@vger.kernel.org \
--cc=kvm@vger.kernel.org \
--cc=linuxppc-dev@lists.ozlabs.org \
--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).