From mboxrd@z Thu Jan 1 00:00:00 1970 From: Kevin Hilman Subject: Re: [PATCH 2/2] OMAP2+: GPIO: move late PM out of interrupts-disabled idle path Date: Thu, 23 Sep 2010 16:53:02 -0700 Message-ID: <87wrqcnhk1.fsf@deeprootsystems.com> References: <1284418958-5887-1-git-send-email-khilman@deeprootsystems.com> <1284418958-5887-3-git-send-email-khilman@deeprootsystems.com> <87d3sgs1nw.fsf@deeprootsystems.com> <87mxr84gip.fsf@deeprootsystems.com> <87y6asqc9u.fsf@deeprootsystems.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Return-path: Received: from mail-iw0-f174.google.com ([209.85.214.174]:56635 "EHLO mail-iw0-f174.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752546Ab0IWXxF (ORCPT ); Thu, 23 Sep 2010 19:53:05 -0400 Received: by iwn5 with SMTP id 5so1846326iwn.19 for ; Thu, 23 Sep 2010 16:53:04 -0700 (PDT) In-Reply-To: <87y6asqc9u.fsf@deeprootsystems.com> (Kevin Hilman's message of "Thu, 23 Sep 2010 16:18:53 -0700") Sender: linux-omap-owner@vger.kernel.org List-Id: linux-omap@vger.kernel.org To: "Basak, Partha" Cc: "linux-omap@vger.kernel.org" , "Varadarajan, Charulatha" , Tero Kristo , "Cousson, Benoit" Kevin Hilman writes: [...] >> >> We cannot do a get_sync() from ISR context, right? > > Right, but we *should* be able to. ;) > > I'm still trying to craft a good description of this problem so I can > argue better for it on linux-pm. > > Until then... > > A bit of a hack, but you could do a _get_noresume() (which is safe from > interrupt context) and directly call the drivers ->runtime_resume() > method, which would be the equivalent of a _get_sync(). Followed of > course by a _put() (async version, also interrupt safe) at the end of > the ISR to keep the usecount correct. You probably figured this out already, but I just realized that this won't currently work either as omap_hwmod is using mutexes, and is safe in ISR context either. :( What about for now just directly enabling (and re-disabling) the hwmod clocks in the ISR using omap_hwmod_[enable|disable]_clocks() Since this is a core driver in arch/arm/*omap*, you can directly call the omap_hwmod API. Kevin