From: Kevin Hilman <khilman@deeprootsystems.com>
To: linux-arm-kernel@lists.infradead.org
Cc: linux-omap@vger.kernel.org
Subject: [RFC/PATCH] arm: oprofile: remove locking from suspend/resume
Date: Tue, 18 May 2010 17:13:01 -0700 [thread overview]
Message-ID: <1274227981-20130-1-git-send-email-khilman@deeprootsystems.com> (raw)
Since oprofile is a sysdev, its suspend/resume methods are called with
interrupts disabled. Using a mutex (which might sleep) in this atomic
context is not safe.
Since these methods are already called in atomic context, simply
remove the locking in the suspend/resume methods.
Found using lockdep on OMAP3 (Cortex-A8)
Signed-off-by: Kevin Hilman <khilman@deeprootsystems.com>
---
arch/arm/oprofile/common.c | 4 ----
1 files changed, 0 insertions(+), 4 deletions(-)
diff --git a/arch/arm/oprofile/common.c b/arch/arm/oprofile/common.c
index 3fcd752..ea005d8 100644
--- a/arch/arm/oprofile/common.c
+++ b/arch/arm/oprofile/common.c
@@ -79,19 +79,15 @@ static void op_arm_stop(void)
#ifdef CONFIG_PM
static int op_arm_suspend(struct sys_device *dev, pm_message_t state)
{
- mutex_lock(&op_arm_mutex);
if (op_arm_enabled)
op_arm_model->stop();
- mutex_unlock(&op_arm_mutex);
return 0;
}
static int op_arm_resume(struct sys_device *dev)
{
- mutex_lock(&op_arm_mutex);
if (op_arm_enabled && op_arm_model->start())
op_arm_enabled = 0;
- mutex_unlock(&op_arm_mutex);
return 0;
}
--
1.7.0.2
next reply other threads:[~2010-05-19 0:13 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-05-19 0:13 Kevin Hilman [this message]
2010-05-19 7:04 ` [RFC/PATCH] arm: oprofile: remove locking from suspend/resume Russell King - ARM Linux
2010-05-19 22:44 ` Kevin Hilman
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=1274227981-20130-1-git-send-email-khilman@deeprootsystems.com \
--to=khilman@deeprootsystems.com \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-omap@vger.kernel.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).