From patchwork Fri Mar 20 13:50:58 2009 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Rajendra Nayak X-Patchwork-Id: 13328 X-Patchwork-Delegate: khilman@deeprootsystems.com 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 n2KDpT9F031701 for ; Fri, 20 Mar 2009 13:51:30 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753949AbZCTNvK (ORCPT ); Fri, 20 Mar 2009 09:51:10 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1754573AbZCTNvK (ORCPT ); Fri, 20 Mar 2009 09:51:10 -0400 Received: from comal.ext.ti.com ([198.47.26.152]:34694 "EHLO comal.ext.ti.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753949AbZCTNvJ convert rfc822-to-8bit (ORCPT ); Fri, 20 Mar 2009 09:51:09 -0400 Received: from dbdp20.itg.ti.com ([172.24.170.38]) by comal.ext.ti.com (8.13.7/8.13.7) with ESMTP id n2KDp0Yi018081 for ; Fri, 20 Mar 2009 08:51:07 -0500 Received: from dbde71.ent.ti.com (localhost [127.0.0.1]) by dbdp20.itg.ti.com (8.13.8/8.13.8) with ESMTP id n2KDp0tb006897 for ; Fri, 20 Mar 2009 19:21:00 +0530 (IST) Received: from dbde02.ent.ti.com ([172.24.170.145]) by dbde71.ent.ti.com ([172.24.170.149]) with mapi; Fri, 20 Mar 2009 19:21:00 +0530 From: "Nayak, Rajendra" To: "linux-omap@vger.kernel.org" CC: "Nayak, Rajendra" Date: Fri, 20 Mar 2009 19:20:58 +0530 Subject: [PATCH 03/03] OMAP3 clock: Fix locking in notifier register Thread-Topic: [PATCH 03/03] OMAP3 clock: Fix locking in notifier register Thread-Index: AcmpYuYZJL4hv9K3RgGhQ8Kck+o/hA== Message-ID: <5A47E75E594F054BAF48C5E4FC4B92AB02FAF6EF3A@dbde02.ent.ti.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: acceptlanguage: en-US MIME-Version: 1.0 Sender: linux-omap-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-omap@vger.kernel.org From: Rajendra Nayak This patch avoids spinlocks being held when calling blocking_notifier_chain_register(). Signed-off-by: Rajendra Nayak Signed-off-by: Tero Kristo --- arch/arm/plat-omap/clock.c | 4 ++++ 1 files changed, 4 insertions(+) To unsubscribe from this list: send the line "unsubscribe linux-omap" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Index: linux-omap-pm/arch/arm/plat-omap/clock.c =================================================================== --- linux-omap-pm.orig/arch/arm/plat-omap/clock.c 2009-03-20 17:11:54.000000000 +0530 +++ linux-omap-pm/arch/arm/plat-omap/clock.c 2009-03-20 19:14:35.387298482 +0530 @@ -673,7 +673,11 @@ int clk_notifier_register(struct clk *cl kfree(cn_new); /* didn't need it after all */ } + spin_unlock_irqrestore(&clockfw_lock, flags); + r = blocking_notifier_chain_register(&cn->notifier_head, nb); + + spin_lock_irqsave(&clockfw_lock, flags); if (!r) { clkp = clk; do {--