lkml.org 
[lkml]   [2020]   [Dec]   [4]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH v2 2/8] earlycon: simplify earlycon-table implementation
Greg,

On Mon, Nov 23, 2020 at 11:23:13AM +0100, Johan Hovold wrote:
> Instead of using the array-of-pointers trick to avoid having gcc mess up
> the earlycon array stride, specify type alignment when declaring entries
> to prevent gcc from increasing alignment.
>
> This is essentially an alternative (one-line) fix to the problem
> addressed by commit dd709e72cb93 ("earlycon: Use a pointer table to fix
> __earlycon_table stride").
>
> gcc can increase the alignment of larger objects with static extent as
> an optimisation, but this can be suppressed by using the aligned
> attribute when declaring variables.
>
> Note that we have been relying on this behaviour for kernel parameters
> for 16 years and it indeed hasn't changed since the introduction of the
> aligned attribute in gcc-3.1.
>
> Signed-off-by: Johan Hovold <johan@kernel.org>

Could you pick this one up for 5.11?

Johan

\
 
 \ /
  Last update: 2020-12-04 15:04    [W:4.509 / U:0.268 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site