From: Andrew Jones <ajones@ventanamicro.com>
To: Conor Dooley <conor.dooley@microchip.com>
Cc: Conor Dooley <conor@kernel.org>,
linux-riscv@lists.infradead.org, xiao.w.wang@intel.com,
pulehui@huawei.com, Charlie Jenkins <charlie@rivosinc.com>,
Paul Walmsley <paul.walmsley@sifive.com>,
Palmer Dabbelt <palmer@dabbelt.com>,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH v1] RISC-V: separate Zbb optimisations requiring and not requiring toolchain support
Date: Thu, 16 May 2024 12:29:08 +0200 [thread overview]
Message-ID: <60EFC387-B19B-46A6-AD1B-D6DAC8108836@ventanamicro.com> (raw)
In-Reply-To: <20240516-speller-target-d453ad060486@wendy>
On May 16, 2024 10:59:44 AM GMT+02:00, Conor Dooley <conor.dooley@microchip.com> wrote:
>On Thu, May 16, 2024 at 09:59:44AM +0200, Andrew Jones wrote:
>> On Wed, May 15, 2024 at 04:27:40PM GMT, Conor Dooley wrote:
>>
>> So the new hidden config is a shorthand for
>>
>> #if defined(CONFIG_RISCV_ISA_ZBB) && \
>> defined(CONFIG_TOOLCHAIN_HAS_ZBB) && \
>> defined(CONFIG_RISCV_ALTERNATIVE)
>>
>> which is reasonable to add, since that's a mouthful, but I'm not sure the
>> name, RISCV_ISA_ZBB_ALT, does a good job conveying all that.
>>
>> If we instead just dropped the 'depends on TOOLCHAIN_HAS_ZBB' from
>> config RISCV_ISA_ZBB (keeping the 'depends on RISCV_ALTERNATIVE',
>> since nobody is really complaining about that), then we could change
>> this to
>>
>> #if defined(CONFIG_RISCV_ISA_ZBB) && defined(CONFIG_TOOLCHAIN_HAS_ZBB)
>
>Yeah, I think this is a cleaner solution.
>
>> > asm goto(ALTERNATIVE("j %l[legacy]", "nop", 0,
>> > RISCV_ISA_EXT_ZBB, 1)
>> > : : : : legacy);
>> > diff --git a/arch/riscv/include/asm/bitops.h b/arch/riscv/include/asm/bitops.h
>> > index 880606b0469a..3ed810a6123d 100644
>> > --- a/arch/riscv/include/asm/bitops.h
>> > +++ b/arch/riscv/include/asm/bitops.h
>> > @@ -15,7 +15,7 @@
>> > #include <asm/barrier.h>
>> > #include <asm/bitsperlong.h>
>> >
>> > -#if !defined(CONFIG_RISCV_ISA_ZBB) || defined(NO_ALTERNATIVE)
>> > +#if !defined(CONFIG_RISCV_ISA_ZBB_ALT) || defined(NO_ALTERNATIVE)
>>
>> nit: It's sufficient to check !defined(CONFIG_RISCV_ISA_ZBB), so no need
>> for this change or its #endif comment change below.
>
>Are you sure? I did test leaving this as-was and it broke the build for
>llvm-14.
Oops, sorry. I didn't look at the full context. You were right.
Thanks,
drew
>
>Cheers,
>Conor.
_______________________________________________
linux-riscv mailing list
linux-riscv@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-riscv
prev parent reply other threads:[~2024-05-16 10:29 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-05-15 15:27 [PATCH v1] RISC-V: separate Zbb optimisations requiring and not requiring toolchain support Conor Dooley
2024-05-16 4:58 ` Charlie Jenkins
2024-05-16 6:37 ` Conor Dooley
2024-05-16 7:59 ` Andrew Jones
2024-05-16 8:59 ` Conor Dooley
2024-05-16 10:29 ` Andrew Jones [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=60EFC387-B19B-46A6-AD1B-D6DAC8108836@ventanamicro.com \
--to=ajones@ventanamicro.com \
--cc=charlie@rivosinc.com \
--cc=conor.dooley@microchip.com \
--cc=conor@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-riscv@lists.infradead.org \
--cc=palmer@dabbelt.com \
--cc=paul.walmsley@sifive.com \
--cc=pulehui@huawei.com \
--cc=xiao.w.wang@intel.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