mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Samuel Holland <samuel@sholland.org>
To: Anup Patel <apatel@ventanamicro.com>
Cc: Palmer Dabbelt <palmer@rivosinc.com>,
	conor.dooley@microchip.com, anup@brainfault.org,
	Conor Dooley <conor@kernel.org>,
	rafael@kernel.org, daniel.lezcano@linaro.org,
	Paul Walmsley <paul.walmsley@sifive.com>,
	aou@eecs.berkeley.edu, linux-pm@vger.kernel.org,
	linux-riscv@lists.infradead.org, linux-kernel@vger.kernel.org,
	linux@rivosinc.com
Subject: Re: [PATCH] cpuidle: riscv-sbi: Stop using non-retentive suspend
Date: Tue, 22 Nov 2022 23:38:22 -0600	[thread overview]
Message-ID: <a591599e-d133-e19a-4898-5645c3862daa@sholland.org> (raw)
In-Reply-To: <CAK9=C2WLOa_zgboFE5UCgnwMB-kbWMAVtmXsBxoswqY63-5QHw@mail.gmail.com>

Hi Anup,

On 11/22/22 23:35, Anup Patel wrote:
> On Wed, Nov 23, 2022 at 10:41 AM Samuel Holland <samuel@sholland.org> wrote:
>> On 11/22/22 09:28, Palmer Dabbelt wrote:
>>> I also think we should stop entering non-retentive suspend until we can
>>> sort out how reliably wake up from it, as the SBI makes that a
>>> platform-specific detail.  If the answer there is "non-retentive suspend
>>> is fine on the D1 as long as we don't use the SBI timers" then that
>>> seems fine, we just need some way to describe that in Linux -- that
>>> doesn't fix other platforms and other interrupts, but at least it's a
>>> start.
>>
>> We need some way to describe the situation from the SBI implementation
>> to Linux.
>>
>> Non-retentive suspend is fine on the D1 as long as either one of these
>> conditions is met:
>>  1) we don't use the SBI timers, or
>>  2) the SBI timer implementation does not use the CLINT
>>
>> And it is up to the SBI implementation which timer hardware it uses, so
>> the SBI implementation needs to patch this information in to the DT at
>> runtime.
> 
> Rather than SBI implementation patching information in DT, it is much
> simpler to add a quirk in RISC-V timer driver for D1 platform (i.e. based
> on D1 compatible string in root node).

It would be simpler, but it would be wrong, as I just explained.

Only the SBI implementation knows if the SBI timer extension can wake
any given CPU from any given non-retentive suspend state.

Regards,
Samuel


  reply	other threads:[~2022-11-23  5:38 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-11-21 20:56 Palmer Dabbelt
2022-11-21 21:10 ` Conor Dooley
2022-11-22  0:45 ` Samuel Holland
2022-11-22 11:06   ` Conor Dooley
2022-11-23  3:42     ` Samuel Holland
2022-11-23 10:46       ` Conor Dooley
2022-11-22  3:45 ` Anup Patel
2022-11-22  5:16   ` Palmer Dabbelt
2022-11-22  5:36     ` Anup Patel
2022-11-22 11:19       ` Conor Dooley
2022-11-22 15:28         ` Palmer Dabbelt
2022-11-23  4:38           ` Anup Patel
2022-11-23  5:11           ` Samuel Holland
2022-11-23  5:35             ` Anup Patel
2022-11-23  5:38               ` Samuel Holland [this message]
2022-11-23  6:10                 ` Anup Patel
2022-11-23  6:27                   ` Samuel Holland
2022-11-23  6:41                     ` Anup Patel
2022-11-23  6:49                       ` Samuel Holland
2022-11-23  7:13                         ` Anup Patel
2022-11-23 10:20             ` Sudeep Holla
2022-11-23  4:26         ` Anup Patel
2022-11-23 10:09           ` Conor Dooley
2022-11-23 10:36             ` Anup Patel

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=a591599e-d133-e19a-4898-5645c3862daa@sholland.org \
    --to=samuel@sholland.org \
    --cc=anup@brainfault.org \
    --cc=aou@eecs.berkeley.edu \
    --cc=apatel@ventanamicro.com \
    --cc=conor.dooley@microchip.com \
    --cc=conor@kernel.org \
    --cc=daniel.lezcano@linaro.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pm@vger.kernel.org \
    --cc=linux-riscv@lists.infradead.org \
    --cc=linux@rivosinc.com \
    --cc=palmer@rivosinc.com \
    --cc=paul.walmsley@sifive.com \
    --cc=rafael@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

all inboxes | Powered by JetHome®