All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Trevor Gamblin" <tgamblin@baylibre.com>
To: "Mark Hatle" <mark.hatle@kernel.crashing.org>,
	"Trevor Gamblin" <tgamblin@baylibre.com>,
	<openembedded-core@lists.openembedded.org>
Cc: <raj.khem@gmail.com>
Subject: Re: [OE-core][PATCH RFC v2 01/19] tune-riscv: be explicit about riscv32gc, riscv64gc defaults
Date: Thu, 15 Oct 2026 14:46:24 -0400	[thread overview]
Message-ID: <DM5MVPEC4VF9.29QPH3XUX3XRF@baylibre.com> (raw)
In-Reply-To: <d5460230-1fd9-48b5-a854-d9140dbe04c8@kernel.crashing.org>

On Thu Oct 8, 2026 at 11:19 AM EDT, Mark Hatle wrote:
> Sorry for the late reply, but I missed this when it came in.
>
> On 9/30/26 11:38 AM, Trevor Gamblin wrote:
>> The string 'riscv64' is a generic descriptor for the 64-bit RISC-V ISA,
>> and can mean different things under different contexts. In the case of
>> tune-riscv.inc, it has served as an alias for the 'riscv64gc' profile
>> which packages are typically built against, resulting in the following
>> output (from a typical bitbake preamble):
>> 
>> |TUNE_FEATURES        = "rv 64 i m a f d c zicsr zifencei"
>> 
>> Modify tune-riscv.inc to avoid overloading the 'riscv64' string in this
>> way, instead setting DEFAULTTUNE to 'riscv64gc', and changing other
>> occurrences to match. TUNE_FEATURES remains the same under this
>> adjustment, but the .inc file is clearer which profile is being
>> targeted.
>> 
>> Do the same for riscv32 -> riscv32gc. In this case, we also need to
>> update qemuriscv32.conf, since it sets DEFAULTTUNE to override the
>> default.
>> 
>> Also add TUNE_FEATURE aliases for the old riscv32 and riscv64 names so
>> that other layers using them don't break.
>> 
>> Signed-off-by: Trevor Gamblin <tgamblin@baylibre.com>
>> ---
>>   meta/conf/machine/include/riscv/tune-riscv.inc | 18 ++++++++++++------
>>   meta/conf/machine/qemuriscv32.conf             |  2 +-
>>   2 files changed, 13 insertions(+), 7 deletions(-)
>> 
>> diff --git a/meta/conf/machine/include/riscv/tune-riscv.inc b/meta/conf/machine/include/riscv/tune-riscv.inc
>> index 12c1125c8b..8a14971d5f 100644
>> --- a/meta/conf/machine/include/riscv/tune-riscv.inc
>> +++ b/meta/conf/machine/include/riscv/tune-riscv.inc
>> @@ -1,15 +1,21 @@
>>   require conf/machine/include/riscv/arch-riscv.inc
>>   
>> -DEFAULTTUNE ?= "riscv64"
>> +DEFAULTTUNE ?= "riscv64gc"
>>   
>> -AVAILTUNES += "riscv64 riscv32 riscv64nc riscv64nf riscv32nf"
>> +AVAILTUNES += "riscv64gc riscv32gc riscv64 riscv32 riscv64nc riscv64nf riscv32nf"
>
> I am in favor of the above.  The original riscv64 was there only for legacy 
> compatibility, but I never liked it.  Being more specific, especially on 
> _embedded_ riscv systems seems like a good thing to me.

Thanks! I think I'll re-submit the simplest changes like these, since they can
be taken with little or no further review.
>
> --Mark
>
>>   # Default
>> -TUNE_FEATURES:tune-riscv64 := "${@oe.tune.riscv_isa_to_tune("rv64gc")}"
>> -PACKAGE_EXTRA_ARCHS:tune-riscv64 = "${TUNE_RISCV_PKGARCH}"
>> +TUNE_FEATURES:tune-riscv64gc := "${@oe.tune.riscv_isa_to_tune("rv64gc")}"
>> +PACKAGE_EXTRA_ARCHS:tune-riscv64gc = "${TUNE_RISCV_PKGARCH}"
>>   
>> -TUNE_FEATURES:tune-riscv32 := "${@oe.tune.riscv_isa_to_tune("rv32gc")}"
>> -PACKAGE_EXTRA_ARCHS:tune-riscv32 = "${TUNE_RISCV_PKGARCH}"
>> +TUNE_FEATURES:tune-riscv32gc := "${@oe.tune.riscv_isa_to_tune("rv32gc")}"
>> +PACKAGE_EXTRA_ARCHS:tune-riscv32gc = "${TUNE_RISCV_PKGARCH}"
>> +
>> +# Compatibility aliases so that layers using old tunes don't break
>> +TUNE_FEATURES:tune-riscv64 := "${TUNE_FEATURES:tune-riscv64gc}"
>> +PACKAGE_EXTRA_ARCHS:tune-riscv64 = "${PACKAGE_EXTRA_ARCHS:tune-riscv64gc}"
>> +TUNE_FEATURES:tune-riscv32 := "${TUNE_FEATURES:tune-riscv32gc}"
>> +PACKAGE_EXTRA_ARCHS:tune-riscv32 = "${PACKAGE_EXTRA_ARCHS:tune-riscv32gc}"
>>   
>>   # No float
>>   TUNE_FEATURES:tune-riscv64nf := "${@oe.tune.riscv_isa_to_tune("rv64imac_zicsr_zifencei")}"
>> diff --git a/meta/conf/machine/qemuriscv32.conf b/meta/conf/machine/qemuriscv32.conf
>> index aff36c28a5..5cb9ba5aa9 100644
>> --- a/meta/conf/machine/qemuriscv32.conf
>> +++ b/meta/conf/machine/qemuriscv32.conf
>> @@ -2,7 +2,7 @@
>>   #@NAME: generic riscv32 machine
>>   #@DESCRIPTION: Machine configuration for running a generic riscv32
>>   
>> -DEFAULTTUNE ?= "riscv32"
>> +DEFAULTTUNE ?= "riscv32gc"
>>   
>>   require conf/machine/include/riscv/qemuriscv.inc
>>   
>> 




  reply	other threads:[~2026-10-16  3:40 UTC|newest]

Thread overview: 29+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-09-30 16:38 [OE-core][PATCH RFC v2 00/19] riscv: add new ISA extensions and profile support Trevor Gamblin
2026-09-30 16:38 ` [OE-core][PATCH RFC v2 01/19] tune-riscv: be explicit about riscv32gc, riscv64gc defaults Trevor Gamblin
2026-10-08 15:19   ` Mark Hatle
2026-10-15 18:46     ` Trevor Gamblin [this message]
2026-09-30 16:38 ` [OE-core][PATCH RFC v2 02/19] tune-riscv.inc: add 'riscv64gcv' tune Trevor Gamblin
2026-09-30 16:38 ` [OE-core][PATCH RFC v2 03/19] arch-riscv.inc: add missing RVA20 extensions Trevor Gamblin
2026-09-30 16:38 ` [OE-core][PATCH RFC v2 04/19] meta/lib/oe/tune.py: support profile strings, add rva20u64 Trevor Gamblin
2026-09-30 16:38 ` [OE-core][PATCH RFC v2 05/19] tune-riscv.inc: add rva20u64 to AVAILTUNES Trevor Gamblin
2026-09-30 16:38 ` [OE-core][PATCH RFC v2 06/19] arch-riscv.inc: add rva22u64 extensions Trevor Gamblin
2026-09-30 16:38 ` [OE-core][PATCH RFC v2 07/19] meta/lib/oe/tune.py: add rva22u64 profile Trevor Gamblin
2026-09-30 16:38 ` [OE-core][PATCH RFC v2 08/19] tune-riscv.inc: add rva22u64 to AVAILTUNES Trevor Gamblin
2026-09-30 16:38 ` [OE-core][PATCH RFC v2 09/19] arch-riscv.inc: add rva23u64 extensions Trevor Gamblin
2026-09-30 16:38 ` [OE-core][PATCH RFC v2 10/19] meta/lib/oe/tune.py: add rva23u64 profile Trevor Gamblin
2026-09-30 16:38 ` [OE-core][PATCH RFC v2 11/19] tune-riscv.inc: add rva23u64 to AVAILTUNES Trevor Gamblin
2026-09-30 16:38 ` [OE-core][PATCH RFC v2 12/19] meta/lib/oe/tune.py: add riscv_pkgarch() Trevor Gamblin
2026-10-08 15:26   ` Mark Hatle
2026-10-15 19:06     ` Trevor Gamblin
2026-09-30 16:38 ` [OE-core][PATCH RFC v2 13/19] arch-riscv.inc: rename TUNE_RISCV_PKGARCH -> TUNE_RISCV_PKGARCH_EXACT in assignments Trevor Gamblin
2026-09-30 16:38 ` [OE-core][PATCH RFC v2 14/19] tune.py: add implied tuning logic Trevor Gamblin
2026-09-30 16:38 ` [OE-core][PATCH RFC v2 15/19] tune.py: add vector extensions to RISCV_IMPLIED Trevor Gamblin
2026-09-30 16:38 ` [OE-core][PATCH RFC v2 16/19] tune-riscv.inc: add RISCV_PKGARCH vars, set PACKAGE_EXTRA_ARCHS Trevor Gamblin
2026-09-30 16:38 ` [OE-core][PATCH RFC v2 17/19] tune-riscv.inc: clarify zifencei comment Trevor Gamblin
2026-09-30 16:38 ` [OE-core][PATCH RFC v2 18/19] selftest: oelib: add tune.py Trevor Gamblin
2026-09-30 16:38 ` [OE-core][PATCH RFC v2 19/19] selftest: cases: add riscvtune.py Trevor Gamblin
2026-10-01  9:13 ` [OE-core][PATCH RFC v2 00/19] riscv: add new ISA extensions and profile support Paul Barker
2026-10-08  7:15   ` Trevor Gamblin
2026-10-08 10:56   ` Khem Raj
2026-10-08 15:42     ` Mark Hatle
2026-10-15 20:00       ` Trevor Gamblin

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=DM5MVPEC4VF9.29QPH3XUX3XRF@baylibre.com \
    --to=tgamblin@baylibre.com \
    --cc=mark.hatle@kernel.crashing.org \
    --cc=openembedded-core@lists.openembedded.org \
    --cc=raj.khem@gmail.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.