Re: [PATCH v6 3/4] riscv: Decouple emulated unaligned accesses from access speed

From: Conor Dooley
Date: Wed Mar 06 2024 - 08:21:42 EST


On Fri, Mar 01, 2024 at 05:45:34PM -0800, Charlie Jenkins wrote:

> -void unaligned_emulation_finish(void)
> +bool check_unaligned_access_emulated_all_cpus(void)
> {
> int cpu;
>
> - /*
> - * We can only support PR_UNALIGN controls if all CPUs have misaligned
> - * accesses emulated since tasks requesting such control can run on any
> - * CPU.
> - */

Why was this comment removed? This patch doesn't change the situations
in which PR_UNALIGN is allowed, right?

> - for_each_online_cpu(cpu) {
> - if (per_cpu(misaligned_access_speed, cpu) !=
> - RISCV_HWPROBE_MISALIGNED_EMULATED) {
> - return;
> - }
> - }
> + for_each_online_cpu(cpu)
> + if (check_unaligned_access_emulated(cpu))
> + return false;
> +
> unaligned_ctl = true;
> + return true;
> }

Attachment: signature.asc
Description: PGP signature