All of lore.kernel.org
 help / color / mirror / Atom feed
From: Kevin Hilman <khilman@linaro.org>
To: Tony Lindgren <tony@atomide.com>
Cc: Nishanth Menon <nm@ti.com>,
	linux-omap@vger.kernel.org, linux-arm-kernel@lists.infradead.org,
	linux-kernel@vger.kernel.org,
	Tobias Jakobi <tjakobi@math.uni-bielefeld.de>,
	Joel F <joelf@ti.com>
Subject: Re: [PATCH] ARM: OMAP2+: omap_device: add fail hook for runtime_pm when bad data is detected
Date: Mon, 09 Dec 2013 08:06:29 -0800	[thread overview]
Message-ID: <87mwka80vu.fsf@linaro.org> (raw)
In-Reply-To: <20131205190343.GI26766@atomide.com> (Tony Lindgren's message of "Thu, 5 Dec 2013 11:03:43 -0800")

Tony Lindgren <tony@atomide.com> writes:

> * Nishanth Menon <nm@ti.com> [131203 17:40]:
>> Due to the cross dependencies between hwmod for automanaged device
>> information for OMAP and dts node definitions, we can run into scenarios
>> where the dts node is defined, however it's hwmod entry is yet to be
>> added. In these cases:
>> a) omap_device does not register a pm_domain (since it cannot find
>>    hwmod entry).
>> b) driver does not know about (a), does a pm_runtime_get_sync which
>>    never fails
>> c) It then tries to do some operation on the device (such as read the
>>   revision register (as part of probe) without clock or adequate OMAP
>>   generic PM operation performed for enabling the module.
>> 
>> This causes a crash such as that reported in:
>> https://bugzilla.kernel.org/show_bug.cgi?id=66441
>> 
>> When 'ti,hwmod' is provided in dt node, it is expected that the device
>> will not function without the OMAP's power automanagement. Hence, when
>> we hit a fail condition (due to hwmod entries not present or other
>> similar scenario), fail at pm_domain level due to lack of data, provide
>> enough information for it to be fixed, however, it allows for the driver
>> to take appropriate measures to prevent crash.
>
> Kevin, any comments on this one?

Looks like a good approach to catch these corner cases.

Acked-by: Kevin Hilman <khilman@linaro.org>

WARNING: multiple messages have this Message-ID (diff)
From: khilman@linaro.org (Kevin Hilman)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH] ARM: OMAP2+: omap_device: add fail hook for runtime_pm when bad data is detected
Date: Mon, 09 Dec 2013 08:06:29 -0800	[thread overview]
Message-ID: <87mwka80vu.fsf@linaro.org> (raw)
In-Reply-To: <20131205190343.GI26766@atomide.com> (Tony Lindgren's message of "Thu, 5 Dec 2013 11:03:43 -0800")

Tony Lindgren <tony@atomide.com> writes:

> * Nishanth Menon <nm@ti.com> [131203 17:40]:
>> Due to the cross dependencies between hwmod for automanaged device
>> information for OMAP and dts node definitions, we can run into scenarios
>> where the dts node is defined, however it's hwmod entry is yet to be
>> added. In these cases:
>> a) omap_device does not register a pm_domain (since it cannot find
>>    hwmod entry).
>> b) driver does not know about (a), does a pm_runtime_get_sync which
>>    never fails
>> c) It then tries to do some operation on the device (such as read the
>>   revision register (as part of probe) without clock or adequate OMAP
>>   generic PM operation performed for enabling the module.
>> 
>> This causes a crash such as that reported in:
>> https://bugzilla.kernel.org/show_bug.cgi?id=66441
>> 
>> When 'ti,hwmod' is provided in dt node, it is expected that the device
>> will not function without the OMAP's power automanagement. Hence, when
>> we hit a fail condition (due to hwmod entries not present or other
>> similar scenario), fail at pm_domain level due to lack of data, provide
>> enough information for it to be fixed, however, it allows for the driver
>> to take appropriate measures to prevent crash.
>
> Kevin, any comments on this one?

Looks like a good approach to catch these corner cases.

Acked-by: Kevin Hilman <khilman@linaro.org>

  reply	other threads:[~2013-12-09 16:06 UTC|newest]

Thread overview: 25+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-12-04  1:39 [PATCH] ARM: OMAP2+: omap_device: add fail hook for runtime_pm when bad data is detected Nishanth Menon
2013-12-04  1:39 ` Nishanth Menon
2013-12-04  1:39 ` Nishanth Menon
2013-12-04  8:08 ` Joel Fernandes
2013-12-04  8:08   ` Joel Fernandes
2013-12-04  8:08   ` Joel Fernandes
2013-12-04 11:33   ` Nishanth Menon
2013-12-04 11:33     ` Nishanth Menon
2013-12-04 12:44     ` Joel Fernandes
2013-12-04 12:44       ` Joel Fernandes
2013-12-04 12:44       ` Joel Fernandes
2013-12-04 13:37       ` Nishanth Menon
2013-12-04 13:37         ` Nishanth Menon
2013-12-04 13:37         ` Nishanth Menon
2013-12-05  9:36         ` Joel Fernandes
2013-12-05  9:36           ` Joel Fernandes
2013-12-05  9:36           ` Joel Fernandes
2013-12-05 19:03 ` Tony Lindgren
2013-12-05 19:03   ` Tony Lindgren
2013-12-09 16:06   ` Kevin Hilman [this message]
2013-12-09 16:06     ` Kevin Hilman
2013-12-10 17:30     ` Tony Lindgren
2013-12-10 17:30       ` Tony Lindgren
2013-12-10 17:41       ` Kevin Hilman
2013-12-10 17:41         ` 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=87mwka80vu.fsf@linaro.org \
    --to=khilman@linaro.org \
    --cc=joelf@ti.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-omap@vger.kernel.org \
    --cc=nm@ti.com \
    --cc=tjakobi@math.uni-bielefeld.de \
    --cc=tony@atomide.com \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.