lkml.org 
[lkml]   [2023]   [Feb]   [2]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRE: [PATCH] LoongArch: Make -mstrict-align be configurable
Date
From: Huacai Chen
> Sent: 02 February 2023 08:43
>
> Introduce Kconfig option ARCH_STRICT_ALIGN to make -mstrict-align be
> configurable.
>
> Not all LoongArch cores support h/w unaligned access, we can use the
> -mstrict-align build parameter to prevent unaligned accesses.
>
> This option is disabled by default to optimise for performance, but you
> can enabled it manually if you want to run kernel on systems without h/w
> unaligned access support.

Should there be an associated run-time check during kernel initialisation
that a kernel compiled without -mstrict-align isn't being run on hardware
that doesn't support unaligned accesses.

It can be quite a while before you get a compiler-generated misaligned accesses.

Also isn't there a HAVE_EFFICIENT_MISALIGNED_ACCESS define that would
also need to be set correctly??

David

-
Registered Address Lakeside, Bramley Road, Mount Farm, Milton Keynes, MK1 1PT, UK
Registration No: 1397386 (Wales)

\
 
 \ /
  Last update: 2023-03-27 00:07    [W:0.114 / U:0.092 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site