linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: linux@arm.linux.org.uk (Russell King - ARM Linux)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH] arm: fix lockdep warning of "unannotated irqs-off"
Date: Wed, 1 Jun 2011 15:46:30 +0100	[thread overview]
Message-ID: <20110601144630.GL3660@n2100.arm.linux.org.uk> (raw)
In-Reply-To: <20110601222829.6eaad0e6@tom-ThinkPad-T410>

On Wed, Jun 01, 2011 at 10:28:29PM +0800, Ming Lei wrote:
> From lib/Kconfig.debug:
> 
> 	config PROVE_LOCKING
> 		bool "Lock debugging: prove locking correctness"
> 		......
> 		select TRACE_IRQFLAGS
> 
> you can find locking prove does need to enable TRACE_IRQFLAGS. Meantime,
> we may not enable irq off tracer via below:
> 	
> 	Kernel hacking  --->
> 		Tracers  --->
> 			[ ]   Interrupts-off Latency Tracer	
> 
> so making this depend on CONFIG_TRACE_IRQFLAGS is reasonable.

I still don't see what the problem is.  If CONFIG_IRQSOFF_TRACER is not
set, then we do not tell the kernel that IRQs have been enabled upon exit
to user space, and we do not tell the kernel that IRQs have been disabled
upon entry to kernel space.

So your patch which makes us always report an IRQs off condition on entry
to __irq_usr makes no sense what so ever to me.

Please explain how we get to a situation where we're entering __irq_usr
in the CONFIG_IRQSOFF_TRACER unset case where the kernel incorrectly
believes that IRQs are unmasked.

Once you've done that, now analyze the case where CONFIG_IRQSOFF_TRACER
is set.  There, we tell the kernel that IRQs are enabled before returning
to userspace, and that IRQs are disabled when entering the kernel.  It
is only _now_ that we're missing the irq-off annotation on entry to the
interrupt handler.

Ergo, it should depend on CONFIG_IRQSOFF_TRACER, not CONFIG_TRACE_IRQFLAGS.

  reply	other threads:[~2011-06-01 14:46 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-06-01  7:42 [PATCH] arm: fix lockdep warning of "unannotated irqs-off" Ming Lei
2011-06-01  9:34 ` Russell King - ARM Linux
2011-06-01 13:17   ` Ming Lei
2011-06-01 13:22     ` Russell King - ARM Linux
2011-06-01 14:28       ` Ming Lei
2011-06-01 14:46         ` Russell King - ARM Linux [this message]
2011-06-01 15:52           ` Ming Lei
2011-06-01 16:01             ` Russell King - ARM Linux
2011-06-02  1:32               ` Ming Lei

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=20110601144630.GL3660@n2100.arm.linux.org.uk \
    --to=linux@arm.linux.org.uk \
    --cc=linux-arm-kernel@lists.infradead.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).