linux-riscv.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: Anup Patel <anup@brainfault.org>
To: Nick Kossifidis <mick@ics.forth.gr>
Cc: Mark Rutland <mark.rutland@arm.com>,
	devicetree@vger.kernel.org, linux-pm@vger.kernel.org,
	Sebastian Reichel <sre@kernel.org>,
	Rob Herring <robh+dt@kernel.org>,
	Palmer Dabbelt <palmer@dabbelt.com>,
	Paul Walmsley <paul.walmsley@sifive.com>,
	linux-riscv <linux-riscv@lists.infradead.org>,
	Christoph Hellwig <hch@lst.de>
Subject: Re: QEMU RISC-V virt machine poweroff driver
Date: Mon, 18 Nov 2019 11:42:14 +0530	[thread overview]
Message-ID: <CAAhSdy0N0m+ibSdOKnn3XSfcbb3y068ek6aJNUzHaVVfRcPNbg@mail.gmail.com> (raw)
In-Reply-To: <cca46a52ee91548962e2f9da4cf2202e@mailhost.ics.forth.gr>

On Sat, Nov 16, 2019 at 3:45 AM Nick Kossifidis <mick@ics.forth.gr> wrote:
>
> Στις 2019-11-07 23:24, Christoph Hellwig έγραψε:
> > Hi all,
> >
> > this patch add a driver for the test device in the Qemu RISC-V
> > virt machine which allows properly shutting down the VM.
> > It also is added to the riscv defconfig given that qemu-virt
> > is the most popular riscv platform.
> >
> > _______________________________________________
> > linux-riscv mailing list
> > linux-riscv@lists.infradead.org
> > http://lists.infradead.org/mailman/listinfo/linux-riscv
>
> We do this already through OpenSBI, I contributed a patch for this some
> time ago.
>
> https://github.com/riscv/opensbi/commit/51e543511a7425da1a5378e149de0b45928c7111#diff-36ecc47313ff13e406c53b99471f294e
>
> Last time I checked I could just halt and the system would shut down
> properly.

We only have poweroff SBI call in SBI v0.1 spec.

Also, we had proposed SBI v0.2 SRST extension having both
Poweroff and Reboot SBI calls but before we can have this SBI
extension we need to clarify scope of SBI interface in RISC-V
privilege spec so that we can have system-level SBI calls defined
in SBI spec. In future, we will bring back the proposal for SBI v0.2
SRST extension.

There are two cases in which we might need SOC specific
Poweroff and Reboot drivers in Linux:
1. SBI v0.2 onwards all SBI calls are optional so SOC vendor
can choose to provide explicit driver instead of implementing
SBI calls for Poweroff and Reboot.
2. The M-mode NOMMU Linux does not have SBI interface
so for this case SOC vendors will have to provide explicit
drivers.

If SOC Poweroff and Reboot mechanisms are simple enough
then SOC vendors can straight away use SYSCON Poweroff
and SYSCON Reboot drivers instead of writing it from scratch.

Regards,
Anup

_______________________________________________
linux-riscv mailing list
linux-riscv@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-riscv

      reply	other threads:[~2019-11-18  6:12 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-11-07 21:24 QEMU RISC-V virt machine poweroff driver Christoph Hellwig
2019-11-07 21:24 ` [PATCH 1/2] dt-bindings: power: reset: document the QEMU RISC-V virt machine poweroff device Christoph Hellwig
2019-11-07 21:52   ` Palmer Dabbelt
2019-11-07 22:32   ` Paul Walmsley
2019-11-14  1:44     ` Rob Herring
2019-11-07 21:24 ` [PATCH 2/2] power: reset: add a QEMU RISC-V virt machine poweroff driver Christoph Hellwig
2019-11-07 21:53   ` Palmer Dabbelt
2019-11-07 22:33   ` Paul Walmsley
2019-11-07 21:56 ` Palmer Dabbelt
2019-11-11 11:36 ` Anup Patel
2019-11-11 16:12   ` Christoph Hellwig
2019-11-11 17:20     ` Paul Walmsley
2019-11-12  4:16       ` Anup Patel
2019-11-14  1:50         ` Rob Herring
2019-11-15 22:14 ` Nick Kossifidis
2019-11-18  6:12   ` Anup Patel [this message]

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=CAAhSdy0N0m+ibSdOKnn3XSfcbb3y068ek6aJNUzHaVVfRcPNbg@mail.gmail.com \
    --to=anup@brainfault.org \
    --cc=devicetree@vger.kernel.org \
    --cc=hch@lst.de \
    --cc=linux-pm@vger.kernel.org \
    --cc=linux-riscv@lists.infradead.org \
    --cc=mark.rutland@arm.com \
    --cc=mick@ics.forth.gr \
    --cc=palmer@dabbelt.com \
    --cc=paul.walmsley@sifive.com \
    --cc=robh+dt@kernel.org \
    --cc=sre@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).