From: Conor Dooley <conor.dooley@microchip.com>
To: Charlie Jenkins <charlie@rivosinc.com>
Cc: "Albert Ou" <aou@eecs.berkeley.edu>,
linux-kernel@vger.kernel.org,
"Eric Biggers" <ebiggers@kernel.org>,
"Evan Green" <evan@rivosinc.com>,
"Palmer Dabbelt" <palmer@dabbelt.com>,
"Jisheng Zhang" <jszhang@kernel.org>,
"Paul Walmsley" <paul.walmsley@sifive.com>,
"Clément Léger" <cleger@rivosinc.com>,
linux-riscv@lists.infradead.org,
"Charles Lohr" <lohr85@gmail.com>
Subject: Re: [PATCH v7 4/4] riscv: Set unaligned access speed at compile time
Date: Thu, 7 Mar 2024 08:24:37 +0000 [thread overview]
Message-ID: <20240307-defraud-antonym-407fc29261d1@wendy> (raw)
In-Reply-To: <20240306-disable_misaligned_probe_config-v7-4-6c90419e7a96@rivosinc.com>
[-- Attachment #1.1: Type: text/plain, Size: 1157 bytes --]
On Wed, Mar 06, 2024 at 12:00:04PM -0800, Charlie Jenkins wrote:
> +static u64 hwprobe_misaligned(const struct cpumask *cpus)
> +{
> + if (IS_ENABLED(CONFIG_RISCV_EMULATED_UNALIGNED_ACCESS))
> + if (unaligned_ctl_available())
> + return RISCV_HWPROBE_MISALIGNED_EMULATED;
> + else
> + return RISCV_HWPROBE_MISALIGNED_SLOW;
> + else if (IS_ENABLED(CONFIG_RISCV_SLOW_UNALIGNED_ACCESS))
> + return RISCV_HWPROBE_MISALIGNED_SLOW;
> + else if (IS_ENABLED(CONFIG_RISCV_EFFICIENT_UNALIGNED_ACCESS))
> + return RISCV_HWPROBE_MISALIGNED_FAST;
> +}
> +#endif
Isn't this just
static u64 hwprobe_misaligned(const struct cpumask *cpus)
{
if (IS_ENABLED(CONFIG_RISCV_EFFICIENT_UNALIGNED_ACCESS))
return RISCV_HWPROBE_MISALIGNED_FAST;
if (IS_ENABLED(CONFIG_RISCV_EMULATED_UNALIGNED_ACCESS) && unaligned_ctl_available())
return RISCV_HWPROBE_MISALIGNED_EMULATED;
return RISCV_HWPROBE_MISALIGNED_SLOW;
}
?
Otherwise,
Reviewed-by: Conor Dooley <conor.dooley@microchip.com>
The kconfig stuff looks ~good to me, I wanted to make one comment about
the wording of a sentence I wrote being pretty meh, but I think it's
time to let go there...
Cheers,
Conor.
[-- Attachment #1.2: signature.asc --]
[-- Type: application/pgp-signature, Size: 228 bytes --]
[-- Attachment #2: Type: text/plain, Size: 161 bytes --]
_______________________________________________
linux-riscv mailing list
linux-riscv@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-riscv
prev parent reply other threads:[~2024-03-07 8:25 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-03-06 20:00 [PATCH v7 0/4] riscv: Use Kconfig to set unaligned access speed Charlie Jenkins
2024-03-06 20:00 ` [PATCH v7 1/4] riscv: lib: Introduce has_fast_unaligned_access function Charlie Jenkins
2024-03-07 7:49 ` Conor Dooley
2024-03-06 20:00 ` [PATCH v7 2/4] riscv: Only check online cpus for emulated accesses Charlie Jenkins
2024-03-06 20:00 ` [PATCH v7 3/4] riscv: Decouple emulated unaligned accesses from access speed Charlie Jenkins
2024-03-07 7:54 ` Conor Dooley
2024-03-06 20:00 ` [PATCH v7 4/4] riscv: Set unaligned access speed at compile time Charlie Jenkins
2024-03-07 8:24 ` Conor Dooley [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=20240307-defraud-antonym-407fc29261d1@wendy \
--to=conor.dooley@microchip.com \
--cc=aou@eecs.berkeley.edu \
--cc=charlie@rivosinc.com \
--cc=cleger@rivosinc.com \
--cc=ebiggers@kernel.org \
--cc=evan@rivosinc.com \
--cc=jszhang@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-riscv@lists.infradead.org \
--cc=lohr85@gmail.com \
--cc=palmer@dabbelt.com \
--cc=paul.walmsley@sifive.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