From: Alex Elder <elder@linaro.org>
To: davem@davemloft.net, kuba@kernel.org
Cc: bjorn.andersson@linaro.org, evgreen@chromium.org,
cpratapa@codeaurora.org, subashab@codeaurora.org,
elder@kernel.org, netdev@vger.kernel.org,
linux-kernel@vger.kernel.org
Subject: [PATCH net-next 0/5] net: ipa: kill off ipa_clock_get()
Date: Thu, 19 Aug 2021 17:19:22 -0500 [thread overview]
Message-ID: <20210819221927.3286267-1-elder@linaro.org> (raw)
This series replaces the remaining uses of ipa_clock_get() with
calls to pm_runtime_get_sync() instead. It replaces all calls to
ipa_clock_put() with calls to pm_runtime_put().
This completes the preparation for enabling automated suspend under
the control of the power management core code. The next patch (in
an upcoming series) enables that. Then the "ipa_clock" files and
symbols will switch to using an "ipa_power" naming convention instead.
Additional info
It is possible for pm_runtime_get_sync() to return an error. There
are really three cases, identified by return value:
- 1, meaning power was already active
- 0, meaning power was not previously active, but is now
- EACCES, meaning runtime PM is disabled
One additional case is EINVAL, meaning a previous suspend or resume
(or idle) call returned an error. But we have always assumed this
won't happen (we previously didn't even check for an error).
But because we use pm_runtime_force_suspend() to implement system
suspend, there's a chance we'd get an EACCES error (the first thing
that function does is disable runtime suspend). Individual patches
explain what happens in that case, but generally we just accept that
it could be an unlikely problem (occurring only at startup time).
Similarly, pm_runtime_put() could return an error. There too, we
ignore EINVAL, assuming the IPA suspend and resume operations won't
produce an error. EBUSY and EPERM are not applicable, EAGAIN is not
expected (and harmless). We should never get EACCES (runtime
suspend disabled), because pm_runtime_put() calls match prior
pm_runtime_get_sync() calls, and a system suspend will not be
started while a runtime suspend or resume is underway. In summary,
the value returned from pm_runtime_put() is not meaningful, so we
explicitly ignore it.
-Alex
Alex Elder (5):
net: ipa: don't use ipa_clock_get() in "ipa_main.c"
net: ipa: don't use ipa_clock_get() in "ipa_smp2p.c"
net: ipa: don't use ipa_clock_get() in "ipa_uc.c"
net: ipa: don't use ipa_clock_get() in "ipa_modem.c"
net: ipa: kill ipa_clock_get()
drivers/net/ipa/ipa_clock.c | 17 --------------
drivers/net/ipa/ipa_clock.h | 24 --------------------
drivers/net/ipa/ipa_interrupt.c | 14 ++++++------
drivers/net/ipa/ipa_main.c | 21 ++++++++---------
drivers/net/ipa/ipa_modem.c | 40 +++++++++++++++++++--------------
drivers/net/ipa/ipa_smp2p.c | 19 +++++++++-------
drivers/net/ipa/ipa_uc.c | 22 ++++++++++--------
7 files changed, 65 insertions(+), 92 deletions(-)
--
2.27.0
next reply other threads:[~2021-08-19 22:19 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-08-19 22:19 Alex Elder [this message]
2021-08-19 22:19 ` [PATCH net-next 1/5] net: ipa: don't use ipa_clock_get() in "ipa_main.c" Alex Elder
2021-08-19 22:19 ` [PATCH net-next 2/5] net: ipa: don't use ipa_clock_get() in "ipa_smp2p.c" Alex Elder
2021-08-19 22:19 ` [PATCH net-next 3/5] net: ipa: don't use ipa_clock_get() in "ipa_uc.c" Alex Elder
2021-08-19 22:19 ` [PATCH net-next 4/5] net: ipa: don't use ipa_clock_get() in "ipa_modem.c" Alex Elder
2021-08-19 22:19 ` [PATCH net-next 5/5] net: ipa: kill ipa_clock_get() Alex Elder
2021-08-20 14:00 ` [PATCH net-next 0/5] net: ipa: kill off ipa_clock_get() patchwork-bot+netdevbpf
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=20210819221927.3286267-1-elder@linaro.org \
--to=elder@linaro.org \
--cc=bjorn.andersson@linaro.org \
--cc=cpratapa@codeaurora.org \
--cc=davem@davemloft.net \
--cc=elder@kernel.org \
--cc=evgreen@chromium.org \
--cc=kuba@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=subashab@codeaurora.org \
/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.