[PATCH v6 3/4] riscv: Decouple emulated unaligned accesses from access speed
Charlie Jenkins
charlie at rivosinc.com
Wed Mar 6 10:25:05 PST 2024
On Wed, Mar 06, 2024 at 01:19:37PM +0000, Conor Dooley wrote:
> 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?
I'll add it back, that was unintentional. Thank you.
- Charlie
>
> > - 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;
> > }
>
More information about the linux-riscv
mailing list