linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Viresh Kumar <viresh.kumar@linaro.org>
To: Marek Szyprowski <m.szyprowski@samsung.com>
Cc: linux-kernel@vger.kernel.org, linux-pm@vger.kernel.org,
	linux-samsung-soc@vger.kernel.org,
	"Rafael J . Wysocki" <rjw@rjwysocki.net>,
	Nishanth Menon <nm@ti.com>, Stephen Boyd <sboyd@kernel.org>,
	Bartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com>,
	Dave Gerlach <d-gerlach@ti.com>, Wolfram Sang <wsa@the-dreams.de>
Subject: Re: [PATCH 0/2] cpufreq/opp: rework regulator initialization
Date: Fri, 8 Feb 2019 14:25:44 +0530	[thread overview]
Message-ID: <20190208085544.vqkebcgg7jpbv2a6@vireshk-i7> (raw)
In-Reply-To: <dc3802db-2931-e4fa-72f4-fa6e9b5c0e9a@samsung.com>

On 08-02-19, 09:12, Marek Szyprowski wrote:
> On 2019-02-08 07:49, Viresh Kumar wrote:
> > Why don't you get similar problem during suspend? I think you can get
> > it when the CPUs are offlined as I2C would have gone by then. The
> > cpufreq or OPP core can try and run some regulator or genpd or clk
> > calls to disable resources, etc. Even if doesn't happen, it certainly
> > can.
> 
> CPUfreq is suspended very early during system suspend and thus it does
> nothing when CPUs are being offlined.

> > Also at resume the cpufreq core may try to change the frequency right
> > from ->init() on certain cases, though not everytime and so the
> > problem can come despite of this series.
> 
> cpufreq is still in suspended state (it is being 'resume' very late in
> the system resume procedure), so if driver doesn't explicitly change any
> opp in ->init(), then cpufreq core waits until everything is resumed. To
> sum up, this seems to be fine, beside the issue with regulator
> initialization I've addressed in this patchset.

Yeah, the governors are suspended very soon, but any frequency change
starting from cpufreq core can still happen. There are at least two
points in cpufreq_online() where we may end up changing the frequency,
but that is conditional and may not be getting hit.

> > We guarantee that the resources are available during probe but not
> > during resume, that's where the problem is.
> 
> Yes, so I've changed cpufreq-dt to the common approach, in which the
> driver keeps all needed resources for the whole lifetime of the device.

That's not what I was saying actually. I was saying that it should be
fine to do a I2C transfer during resume, else we will always have
problems and have to fix them with hacks like the one you proposed
where you acquire resources for all the possible CPUs. Maybe we can
fix it once and for all.

-- 
viresh

  reply	other threads:[~2019-02-08  8:55 UTC|newest]

Thread overview: 37+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <CGME20190207122255eucas1p1cdebed838c799eca46cce6a654a26187@eucas1p1.samsung.com>
2019-02-07 12:22 ` [PATCH 0/2] cpufreq/opp: rework regulator initialization Marek Szyprowski
     [not found]   ` <CGME20190207122255eucas1p1444023f01217a43cfb958fe0bd48ef4d@eucas1p1.samsung.com>
2019-02-07 12:22     ` [PATCH 1/2] cpufreq: dt/ti/opp: move regulators initialization to the drivers Marek Szyprowski
     [not found]   ` <CGME20190207122256eucas1p17e8742176bda911263d2d14d2797a886@eucas1p1.samsung.com>
2019-02-07 12:22     ` [PATCH 2/2] cpufreq: dt: rework resources initialization Marek Szyprowski
2019-02-08  1:26       ` kbuild test robot
2019-02-08  6:49   ` [PATCH 0/2] cpufreq/opp: rework regulator initialization Viresh Kumar
2019-02-08  8:12     ` Marek Szyprowski
2019-02-08  8:55       ` Viresh Kumar [this message]
2019-02-08  9:15         ` Marek Szyprowski
2019-02-08  9:23           ` Viresh Kumar
2019-02-08 10:02             ` Marek Szyprowski
2019-02-08 10:08             ` Rafael J. Wysocki
2019-02-08 10:18         ` Rafael J. Wysocki
2019-02-08 10:28           ` Viresh Kumar
2019-02-08 10:22     ` Rafael J. Wysocki
2019-02-08 10:31       ` Marek Szyprowski
2019-02-08 10:31       ` Viresh Kumar
2019-02-08 10:42         ` Rafael J. Wysocki
2019-02-08 10:52           ` Rafael J. Wysocki
2019-02-08 11:39           ` Sudeep Holla
2019-02-08 12:03             ` Rafael J. Wysocki
2019-02-08 12:09               ` Sudeep Holla
2019-02-08 12:23                 ` Rafael J. Wysocki
2019-02-08 14:28                   ` Sudeep Holla
2019-02-08 11:00   ` Sudeep Holla
2019-02-08 11:47     ` Marek Szyprowski
2019-02-08 11:51       ` Sudeep Holla
2019-02-08 12:04         ` Marek Szyprowski
2019-02-08 12:11           ` Rafael J. Wysocki
2019-02-08 12:16           ` Sudeep Holla
2019-02-08 17:41           ` Sudeep Holla
2019-02-11  8:47             ` Viresh Kumar
2019-02-11 14:08               ` Sudeep Holla
2019-02-11  8:44   ` Viresh Kumar
2019-02-11  9:52     ` Marek Szyprowski
2019-02-11  9:55       ` Viresh Kumar
2019-02-11 12:22         ` Marek Szyprowski
2019-02-12  5:08           ` Viresh Kumar

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=20190208085544.vqkebcgg7jpbv2a6@vireshk-i7 \
    --to=viresh.kumar@linaro.org \
    --cc=b.zolnierkie@samsung.com \
    --cc=d-gerlach@ti.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pm@vger.kernel.org \
    --cc=linux-samsung-soc@vger.kernel.org \
    --cc=m.szyprowski@samsung.com \
    --cc=nm@ti.com \
    --cc=rjw@rjwysocki.net \
    --cc=sboyd@kernel.org \
    --cc=wsa@the-dreams.de \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).