From: Shaohua Li <shaohua.li@intel.com>
To: linux-kernel@vger.kernel.org, linux-acpi@vger.kernel.org
Cc: lenb@kernel.org, akpm@linux-foundation.org, mingo@elte.hu
Subject: [PATCH 2/2]ACPI: assign different lockdep key for acpi works
Date: Fri, 11 Dec 2009 11:04:58 +0800 [thread overview]
Message-ID: <20091211030458.GB7772@sli10-desk.sh.intel.com> (raw)
Differentiate works for three different workqueue in ACPI. This fixes
a fase alarm from lockdep, as acpi hotplug workqueue waits other
workqueues.
http://bugzilla.kernel.org/show_bug.cgi?id=14553
Signed-off-by: Shaohua Li <shaohua.li@intel.com>
---
drivers/acpi/osl.c | 12 +++++++++++-
1 file changed, 11 insertions(+), 1 deletion(-)
Index: linux/drivers/acpi/osl.c
===================================================================
--- linux.orig/drivers/acpi/osl.c 2009-12-10 10:40:15.000000000 +0800
+++ linux/drivers/acpi/osl.c 2009-12-10 10:43:25.000000000 +0800
@@ -729,6 +729,8 @@ static acpi_status __acpi_os_execute(acp
struct acpi_os_dpc *dpc;
struct workqueue_struct *queue;
int ret;
+ static struct lock_class_key hp_key, notify_key, acpid_key;
+
ACPI_DEBUG_PRINT((ACPI_DB_EXEC,
"Scheduling function [%p(%p)] for deferred execution.\n",
function, context));
@@ -758,7 +760,15 @@ static acpi_status __acpi_os_execute(acp
queue = hp ? kacpi_hotplug_wq :
(type == OSL_NOTIFY_HANDLER ? kacpi_notify_wq : kacpid_wq);
dpc->wait = hp ? 1 : 0;
- INIT_WORK(&dpc->work, acpi_os_execute_deferred);
+ if (queue == kacpi_hotplug_wq)
+ INIT_WORK_KEY(&dpc->work, acpi_os_execute_deferred,
+ hp_key, "acpi_hp_work");
+ else if (queue == kacpi_notify_wq)
+ INIT_WORK_KEY(&dpc->work, acpi_os_execute_deferred,
+ notify_key, "acpi_notify_work");
+ else
+ INIT_WORK_KEY(&dpc->work, acpi_os_execute_deferred,
+ acpid_key, "acpi_acpid_work");
ret = queue_work(queue, &dpc->work);
if (!ret) {
next reply other threads:[~2009-12-11 3:04 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-12-11 3:04 Shaohua Li [this message]
2009-12-11 21:57 ` Andrew Morton
2009-12-14 1:08 ` Shaohua Li
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=20091211030458.GB7772@sli10-desk.sh.intel.com \
--to=shaohua.li@intel.com \
--cc=akpm@linux-foundation.org \
--cc=lenb@kernel.org \
--cc=linux-acpi@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@elte.hu \
/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
all inboxes | Powered by JetHome®