All of lore.kernel.org
 help / color / mirror / Atom feed
From: Mark Brown <broonie@kernel.org>
To: Grant Likely <grant.likely@secretlab.ca>
Cc: Olof Johansson <olof@lixom.net>,
	Doug Anderson <dianders@chromium.org>,
	Will Deacon <will.deacon@arm.com>,
	Tomasz Figa <tomasz.figa@gmail.com>,
	"kgene.kim@samsung.com" <kgene.kim@samsung.com>,
	"linux-samsung-soc@vger.kernel.org"
	<linux-samsung-soc@vger.kernel.org>,
	Javier Martinez Canillas <javier.martinez@collabora.co.uk>,
	"linux-arm-kernel@lists.infradead.org"
	<linux-arm-kernel@lists.infradead.org>,
	"rahul.sharma@samsung.com" <rahul.sharma@samsung.com>,
	Prashanth G <prashanth.g@samsung.com>
Subject: Re: Unable to boot mainline on snow chromebook since 3.15
Date: Wed, 10 Sep 2014 17:57:23 +0100	[thread overview]
Message-ID: <20140910165723.GK7960@sirena.org.uk> (raw)
In-Reply-To: <CACxGe6uBcTPMh4p=oi7m_TVpjUrkgbQvxbStAn27HXEJxYe5fw@mail.gmail.com>

[-- Attachment #1: Type: text/plain, Size: 2315 bytes --]

On Wed, Sep 10, 2014 at 05:29:32PM +0100, Grant Likely wrote:

> What we can do is have an inhibit flag for
> simplefb/simpleuart/simplewhatever that holds off PM. When a real
> driver, or a stub that understands parsing the resource dependencies,
> takes ownership of the device (or userspace tells the kernel to stop
> caring) it can clear the inhibit.

It's not quite as simple as just disabling PM - for example in the
clocks case we've also got to worry about what happens with rate changes
(which is going to get more and more risky as we get smarter about being
able to push configuration changes back up the tree), regulators have a
similar thing with voltage changes.  With simple enables and disables we
have to worry about things like handling users who actively want to
power things on and and off but may potentially be sharing a resource
with an undeclared dependency.

If we are going to go with an approach like you suggest I think that
rather than require a userspace notification that everything is OK we
should have the stub drivers do something which causes the appropriate
behaviour to happen so long as they're loaded.  This means userspace
doesn't need an update and ensures it doesn't have to worry about cases
where we're using the stub driver at runtime due to a real driver not
being available - we can figure this stuff out within the kernel
oureslves.

That said a kick from userspace when the first round of module loading
has finished would be very helpful, I just don't think we should rely on
it for this behaviour.

> I don't want to build knowledge of resource dependencies into the
> simple case. We'll simply frequently get it wrong. For example: A
> future kernel will have better PM and will turn off more devices which
> isn't accounted for in an older DT.

That is tricky and there will be problems.  Being fairly aggressive
about doing these things and avoiding having runtime configuration hacks
since it makes it harder for people to introduce problems without
noticing them, and requiring an explicit request to do resource
management at all is the most conservative option.  Between them those
strategies should help for anything that's getting tested at least, it
makes it hard for the kernel to learn about a resource without it being
handled safely from the get go.

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 473 bytes --]

WARNING: multiple messages have this Message-ID (diff)
From: broonie@kernel.org (Mark Brown)
To: linux-arm-kernel@lists.infradead.org
Subject: Unable to boot mainline on snow chromebook since 3.15
Date: Wed, 10 Sep 2014 17:57:23 +0100	[thread overview]
Message-ID: <20140910165723.GK7960@sirena.org.uk> (raw)
In-Reply-To: <CACxGe6uBcTPMh4p=oi7m_TVpjUrkgbQvxbStAn27HXEJxYe5fw@mail.gmail.com>

On Wed, Sep 10, 2014 at 05:29:32PM +0100, Grant Likely wrote:

> What we can do is have an inhibit flag for
> simplefb/simpleuart/simplewhatever that holds off PM. When a real
> driver, or a stub that understands parsing the resource dependencies,
> takes ownership of the device (or userspace tells the kernel to stop
> caring) it can clear the inhibit.

It's not quite as simple as just disabling PM - for example in the
clocks case we've also got to worry about what happens with rate changes
(which is going to get more and more risky as we get smarter about being
able to push configuration changes back up the tree), regulators have a
similar thing with voltage changes.  With simple enables and disables we
have to worry about things like handling users who actively want to
power things on and and off but may potentially be sharing a resource
with an undeclared dependency.

If we are going to go with an approach like you suggest I think that
rather than require a userspace notification that everything is OK we
should have the stub drivers do something which causes the appropriate
behaviour to happen so long as they're loaded.  This means userspace
doesn't need an update and ensures it doesn't have to worry about cases
where we're using the stub driver at runtime due to a real driver not
being available - we can figure this stuff out within the kernel
oureslves.

That said a kick from userspace when the first round of module loading
has finished would be very helpful, I just don't think we should rely on
it for this behaviour.

> I don't want to build knowledge of resource dependencies into the
> simple case. We'll simply frequently get it wrong. For example: A
> future kernel will have better PM and will turn off more devices which
> isn't accounted for in an older DT.

That is tricky and there will be problems.  Being fairly aggressive
about doing these things and avoiding having runtime configuration hacks
since it makes it harder for people to introduce problems without
noticing them, and requiring an explicit request to do resource
management at all is the most conservative option.  Between them those
strategies should help for anything that's getting tested at least, it
makes it hard for the kernel to learn about a resource without it being
handled safely from the get go.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 473 bytes
Desc: Digital signature
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20140910/3d8ea088/attachment.sig>

  parent reply	other threads:[~2014-09-10 16:58 UTC|newest]

Thread overview: 106+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-09-05 11:57 Unable to boot mainline on snow chromebook since 3.15 Will Deacon
2014-09-05 12:22 ` Will Deacon
2014-09-05 12:22   ` Will Deacon
2014-09-05 13:46   ` Ajay kumar
2014-09-05 13:46     ` Ajay kumar
2014-09-05 13:56     ` Vivek Gautam
2014-09-05 13:56       ` Vivek Gautam
2014-09-08 11:17       ` Will Deacon
2014-09-08 11:17         ` Will Deacon
2014-09-05 14:12     ` Marc Zyngier
2014-09-05 14:12       ` Marc Zyngier
2014-09-05 20:25   ` Doug Anderson
2014-09-05 20:25     ` Doug Anderson
2014-09-07  9:06     ` Javier Martinez Canillas
2014-09-07  9:06       ` Javier Martinez Canillas
2014-09-07 15:01       ` Mark Brown
2014-09-07 15:01         ` Mark Brown
2014-09-07 15:51         ` Javier Martinez Canillas
2014-09-07 15:51           ` Javier Martinez Canillas
2014-09-07 15:52       ` Tomasz Figa
2014-09-07 15:52         ` Tomasz Figa
2014-09-07 16:12         ` Javier Martinez Canillas
2014-09-07 16:12           ` Javier Martinez Canillas
2014-09-07 16:19           ` Tomasz Figa
2014-09-07 16:19             ` Tomasz Figa
2014-09-07 16:40             ` Javier Martinez Canillas
2014-09-07 16:40               ` Javier Martinez Canillas
2014-09-08 11:21             ` Will Deacon
2014-09-08 11:21               ` Will Deacon
2014-09-08 11:55               ` Javier Martinez Canillas
2014-09-08 11:55                 ` Javier Martinez Canillas
2014-09-08 12:46                 ` Will Deacon
2014-09-08 12:46                   ` Will Deacon
2014-09-08 12:20               ` Grant Likely
2014-09-08 12:20                 ` Grant Likely
2014-09-08 13:49                 ` Mark Brown
2014-09-08 13:49                   ` Mark Brown
2014-09-08 14:05                   ` Javier Martinez Canillas
2014-09-08 14:05                     ` Javier Martinez Canillas
2014-09-10 11:17                     ` Will Deacon
2014-09-10 11:17                       ` Will Deacon
2014-09-10 16:03                       ` Doug Anderson
2014-09-10 16:03                         ` Doug Anderson
2014-09-10 16:23                         ` Will Deacon
2014-09-10 16:23                           ` Will Deacon
2014-09-08 15:58                 ` Doug Anderson
2014-09-08 15:58                   ` Doug Anderson
2014-09-08 19:40                   ` Grant Likely
2014-09-08 19:40                     ` Grant Likely
2014-09-10 13:06                     ` Olof Johansson
2014-09-10 13:06                       ` Olof Johansson
2014-09-10 14:31                       ` Mark Brown
2014-09-10 14:31                         ` Mark Brown
2014-09-10 14:56                         ` Grant Likely
2014-09-10 14:56                           ` Grant Likely
2014-09-10 15:39                           ` Mark Brown
2014-09-10 15:39                             ` Mark Brown
2014-09-10 16:29                             ` Grant Likely
2014-09-10 16:29                               ` Grant Likely
2014-09-10 16:45                               ` Doug Anderson
2014-09-10 16:45                                 ` Doug Anderson
2014-09-10 19:45                                 ` Mark Brown
2014-09-10 19:45                                   ` Mark Brown
2014-09-10 19:51                                   ` Doug Anderson
2014-09-10 19:51                                     ` Doug Anderson
2014-09-10 16:57                               ` Mark Brown [this message]
2014-09-10 16:57                                 ` Mark Brown
2014-09-11  9:22                                 ` Grant Likely
2014-09-11  9:22                                   ` Grant Likely
2014-09-11 18:03                                   ` Mark Brown
2014-09-11 18:03                                     ` Mark Brown
2014-09-11 22:54                                     ` Doug Anderson
2014-09-11 22:54                                       ` Doug Anderson
2014-09-29 12:57                           ` Thierry Reding
2014-09-29 12:57                             ` Thierry Reding
2014-09-29 13:12                             ` Grant Likely
2014-09-29 13:12                               ` Grant Likely
2014-09-29 16:37                               ` Mark Brown
2014-09-29 16:37                                 ` Mark Brown
2014-09-30  6:12                               ` Thierry Reding
2014-09-30  6:12                                 ` Thierry Reding
2014-09-29 20:46                             ` Maxime Ripard
2014-09-29 20:46                               ` Maxime Ripard
2014-09-10 16:36                         ` Olof Johansson
2014-09-10 16:36                           ` Olof Johansson
2014-09-10 18:17                           ` Mark Brown
2014-09-10 18:17                             ` Mark Brown
2014-09-11  9:06                         ` Grant Likely
2014-09-11  9:06                           ` Grant Likely
2014-09-11 16:16                           ` Mark Brown
2014-09-11 16:16                             ` Mark Brown
2014-09-08  4:36         ` Doug Anderson
2014-09-08  4:36           ` Doug Anderson
2014-09-08  6:09           ` Javier Martinez Canillas
2014-09-08  6:09             ` Javier Martinez Canillas
2014-09-08 15:55             ` Doug Anderson
2014-09-08 15:55               ` Doug Anderson
2014-09-08 16:07               ` Will Deacon
2014-09-08 16:07                 ` Will Deacon
2014-09-08 16:12                 ` Doug Anderson
2014-09-08 16:12                   ` Doug Anderson
2014-09-08 10:20           ` Mark Brown
2014-09-08 10:20             ` Mark Brown
2014-09-08  4:43         ` Doug Anderson
2014-09-08  4:43           ` Doug Anderson
2015-01-30  4:56 bruce m beach

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=20140910165723.GK7960@sirena.org.uk \
    --to=broonie@kernel.org \
    --cc=dianders@chromium.org \
    --cc=grant.likely@secretlab.ca \
    --cc=javier.martinez@collabora.co.uk \
    --cc=kgene.kim@samsung.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-samsung-soc@vger.kernel.org \
    --cc=olof@lixom.net \
    --cc=prashanth.g@samsung.com \
    --cc=rahul.sharma@samsung.com \
    --cc=tomasz.figa@gmail.com \
    --cc=will.deacon@arm.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.