mail archive of the barebox mailing list
 help / color / mirror / Atom feed
From: Antony Pavlov <antonynpavlov@gmail.com>
To: Ahmad Fatoum <a.fatoum@pengutronix.de>
Cc: barebox@lists.infradead.org
Subject: Re: [PATCH 2/2] RISC-V: extend multi-image to support both S- and M-Mode
Date: Tue, 11 May 2021 14:11:58 +0300	[thread overview]
Message-ID: <20210511141158.17cebe7b03b888a1a8bea331@gmail.com> (raw)
In-Reply-To: <20210511064144.4930-2-a.fatoum@pengutronix.de>

On Tue, 11 May 2021 08:41:44 +0200
Ahmad Fatoum <a.fatoum@pengutronix.de> wrote:

> We can't currently mix S-Mode and M-Mode images in the same build
> and there's no straight-forward way to determine which mode we are in.
> 
> Move the decision on which mode barebox is targeted at out of Kconfig
> and into the PBL. PBL code can call either barebox_riscv_supervisor_entry
> or barebox_riscv_machine_entry to signal to barebox proper which mode
> it's running in.

It looks like this comment is slightly outdated.
There is neither barebox_riscv_supervisor_entry nor barebox_riscv_machine_entry
inside the patch.

> Currently the only user of this information is the
> RISC-V timer clocksource driver.

Please add necessary mode check to the sbi_init() from arch/riscv/lib/sbi.c too.

> Any new code that does IS_ENABLED(CONFIG_RISCV_SBI) or
> IS_ENABLED(CONFIG_RISCV_M_MODE) should also be adapted to use riscv_mode().
> 

-- 
Best regards,
  Antony Pavlov

_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox


  reply	other threads:[~2021-05-11 13:05 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-05-11  6:41 [PATCH 1/2] fixup! gpio: generic: sync with upstream Linux gpio-mmio driver Ahmad Fatoum
2021-05-11  6:41 ` [PATCH 2/2] RISC-V: extend multi-image to support both S- and M-Mode Ahmad Fatoum
2021-05-11 11:11   ` Antony Pavlov [this message]
2021-05-11 11:26     ` Ahmad Fatoum

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=20210511141158.17cebe7b03b888a1a8bea331@gmail.com \
    --to=antonynpavlov@gmail.com \
    --cc=a.fatoum@pengutronix.de \
    --cc=barebox@lists.infradead.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