From: Florian Fainelli <f.fainelli@gmail.com>
To: Jason Gunthorpe <jgg@ziepe.ca>
Cc: Mark Brown <broonie@kernel.org>,
Lino Sanfilippo <LinoSanfilippo@gmx.de>,
rjui@broadcom.com, sbranden@broadcom.com,
bcm-kernel-feedback-list@broadcom.com, nsaenz@kernel.org,
linux-spi@vger.kernel.org, linux-rpi-kernel@lists.infradead.org,
linux-arm-kernel@lists.infradead.org,
linux-kernel@vger.kernel.org, p.rosenberger@kunbus.com,
linux-integrity@vger.kernel.org, stable@vger.kernel.org
Subject: Re: [PATCH] spi: bcm2835: do not unregister controller in shutdown handler
Date: Mon, 4 Oct 2021 09:55:32 -0700 [thread overview]
Message-ID: <f481f7cc-6734-59b3-6432-5c2049cd87ea@gmail.com> (raw)
In-Reply-To: <20211004165127.GZ3544071@ziepe.ca>
On 10/4/21 9:51 AM, Jason Gunthorpe wrote:
> On Mon, Oct 04, 2021 at 09:36:37AM -0700, Florian Fainelli wrote:
>
>> No please don't, I should have arguably justified the reasons why
>> better, but the main reason is that one of the platforms on which this
>> driver is used has received extensive power management analysis and
>> changes, and shutting down every bit of hardware, including something as
>> small as a SPI controller, and its clock (and its PLL) helped meet
>> stringent power targets.
>
> Huh? for device shutdown? What would this matter if the next step is
> reboot or power off?
Power off, the device is put into a low power state (equivalent to ACPI
S5) and then a remote control key press, or a GPIO could wake-up the
device again. While it is in that mode, it consumes less than 0.5W(AC).
Imagine your stick/cast/broom behind your TV falling in that category.
>
>> TBH, I still wonder why we have .shutdown() and we simply don't use
>> .remove() which would reduce the amount of work that people have to do
>> validate that the hardware is put in a low power state and would also
>> reduce the amount of burden on the various subsystems.
>
> The difference between remove and shutdown really is that 'emergency'
> sense that shutdown is something that must complete in bounded time
> and thus only has to concern itself with quieting hardware to a safe
> state for the next step in the shutdown/reboot/kexec/kdump sequence.
I am fairly sure that no driver write knows about the being bound in
time aspect.
>
> Many remove handlers happily block until, eg all user files are closed
> or something to allow a graceful module unload.
Fair point.
--
Florian
next prev parent reply other threads:[~2021-10-04 16:55 UTC|newest]
Thread overview: 23+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-09-28 19:56 [PATCH] spi: bcm2835: do not unregister controller in shutdown handler Lino Sanfilippo
2021-09-28 20:08 ` Mark Brown
2021-09-29 8:38 ` Aw: " Lino Sanfilippo
2021-10-01 17:54 ` Mark Brown
2021-10-03 15:25 ` Lino Sanfilippo
2021-10-04 12:49 ` Mark Brown
2021-10-04 13:17 ` Jason Gunthorpe
2021-10-04 14:12 ` Mark Brown
2021-10-04 15:44 ` Jason Gunthorpe
2021-10-04 16:31 ` Mark Brown
2021-10-04 16:36 ` Florian Fainelli
2021-10-04 16:51 ` Jason Gunthorpe
2021-10-04 16:55 ` Florian Fainelli [this message]
2021-10-04 17:13 ` Jason Gunthorpe
2021-10-04 17:27 ` Mark Brown
2021-10-04 17:35 ` Jason Gunthorpe
2021-10-04 17:44 ` Florian Fainelli
2021-10-04 17:56 ` Mark Brown
2021-10-04 17:05 ` Mark Brown
2021-10-04 16:52 ` Mark Brown
2021-10-04 16:57 ` Florian Fainelli
2021-10-04 18:30 ` Lino Sanfilippo
2021-10-04 18:37 ` Jason Gunthorpe
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=f481f7cc-6734-59b3-6432-5c2049cd87ea@gmail.com \
--to=f.fainelli@gmail.com \
--cc=LinoSanfilippo@gmx.de \
--cc=bcm-kernel-feedback-list@broadcom.com \
--cc=broonie@kernel.org \
--cc=jgg@ziepe.ca \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-integrity@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-rpi-kernel@lists.infradead.org \
--cc=linux-spi@vger.kernel.org \
--cc=nsaenz@kernel.org \
--cc=p.rosenberger@kunbus.com \
--cc=rjui@broadcom.com \
--cc=sbranden@broadcom.com \
--cc=stable@vger.kernel.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 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).