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

Conor Dooley conor.dooley at microchip.com
Wed Mar 6 05:19:37 PST 2024


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;
>  }

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 228 bytes
Desc: not available
URL: <http://lists.infradead.org/pipermail/linux-riscv/attachments/20240306/a704619b/attachment.sig>


More information about the linux-riscv mailing list