From patchwork Fri Dec 11 03:04:58 2009 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Shaohua Li X-Patchwork-Id: 66412 Received: from vger.kernel.org (vger.kernel.org [209.132.176.167]) by demeter.kernel.org (8.14.2/8.14.2) with ESMTP id nBB35Oqn013607 for ; Fri, 11 Dec 2009 03:05:24 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754025AbZLKDEz (ORCPT ); Thu, 10 Dec 2009 22:04:55 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1752774AbZLKDEz (ORCPT ); Thu, 10 Dec 2009 22:04:55 -0500 Received: from mga14.intel.com ([143.182.124.37]:40271 "EHLO mga14.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752099AbZLKDEy (ORCPT ); Thu, 10 Dec 2009 22:04:54 -0500 Received: from azsmga001.ch.intel.com ([10.2.17.19]) by azsmga102.ch.intel.com with ESMTP; 10 Dec 2009 19:05:00 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="4.47,316,1257148800"; d="scan'208";a="221376690" Received: from sli10-conroe.sh.intel.com (HELO sli10-desk.sh.intel.com) ([10.239.13.36]) by azsmga001.ch.intel.com with ESMTP; 10 Dec 2009 19:04:59 -0800 Received: from david by sli10-desk.sh.intel.com with local (Exim 4.69) (envelope-from ) id 1NIvoQ-00021i-Kr; Fri, 11 Dec 2009 11:04:58 +0800 Date: Fri, 11 Dec 2009 11:04:58 +0800 From: Shaohua Li 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 Message-ID: <20091211030458.GB7772@sli10-desk.sh.intel.com> MIME-Version: 1.0 Content-Disposition: inline User-Agent: Mutt/1.5.20 (2009-06-14) Sender: linux-acpi-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-acpi@vger.kernel.org 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) {