From: Bo Gan <ganboing@gmail.com>
To: Vladimir Kondratiev <vladimir.kondratiev@mobileye.com>,
anup@brainfault.org
Cc: opensbi@lists.infradead.org
Subject: Re: [PATCH] p8700: don't use AMO instructions
Date: Thu, 18 Dec 2025 13:17:16 -0800 [thread overview]
Message-ID: <e1906c35-c28a-429b-896b-fe80920ec5f4@gmail.com> (raw)
In-Reply-To: <20251218114705.1650842-1-vladimir.kondratiev@mobileye.com>
Why not override PLATFORM_RISCV_ISA at build time? I think this change is
going to affect the entire generic/ platform. Specifically jh7110 won't
even boot with lrsc. The Hart 0 (S7 core) only support AMO, not LR/SC,
the opposite of your p8700.
Bo
On 12/18/25 03:47, Vladimir Kondratiev wrote:
> P8700 supports LR/SC but not AMO instructions.
> Tell this to the compiler, it will in turn
> define __riscv_zalrsc and undefine __riscv_atomic
> that used in the code to generate appropriate instructions
>
> Signed-off-by: Vladimir Kondratiev <vladimir.kondratiev@mobileye.com>
> ---
> platform/generic/mips/objects.mk | 1 +
> 1 file changed, 1 insertion(+)
>
> diff --git a/platform/generic/mips/objects.mk b/platform/generic/mips/objects.mk
> index a08c4c632997..84e21b7995bc 100644
> --- a/platform/generic/mips/objects.mk
> +++ b/platform/generic/mips/objects.mk
> @@ -5,4 +5,5 @@
> ifeq ($(PLATFORM_RISCV_XLEN), 64)
> carray-platform_override_modules-$(CONFIG_PLATFORM_MIPS_P8700) += mips_p8700
> platform-objs-$(CONFIG_PLATFORM_MIPS_P8700) += mips/p8700.o mips/mips_warm_boot.o
> +PLATFORM_RISCV_ISA = rv64imfdc_zalrsc_zicsr_zifencei
> endif
>
> base-commit: 111738090c6cdf2d852717b3ad15b65e2085d237
--
opensbi mailing list
opensbi@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/opensbi
prev parent reply other threads:[~2025-12-18 21:19 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-12-18 11:47 [PATCH] p8700: don't use AMO instructions Vladimir Kondratiev
2025-12-18 21:17 ` Bo Gan [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=e1906c35-c28a-429b-896b-fe80920ec5f4@gmail.com \
--to=ganboing@gmail.com \
--cc=anup@brainfault.org \
--cc=opensbi@lists.infradead.org \
--cc=vladimir.kondratiev@mobileye.com \
/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