Re: [PATCH v2] parisc: Fix boot with kernel v5.14

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thu, Sep 2, 2021 at 2:06 PM Helge Deller <deller@xxxxxx> wrote:
>
> Kernel v5.14 has various changes to optimize unaligned memory accesses,
> e.g. commit 0652035a5794 ("asm-generic: unaligned: remove byteshift helpers").
>
> Those changes break the bootloader and other places in kernel for parisc
> which needs byte-wise accesses to unaligned memory.
>
> Here is an updated patch/hack which fixes those boot problems by adding
> a compiler optimization barrier. More info and background can be found in BZ:
> https://gcc.gnu.org/bugzilla/show_bug.cgi?id=102162
>
> Signed-off-by: Helge Deller <deller@xxxxxx>

Right, this should fix it, but I tend to agree with what Andrew Pinski
said: the existing version is actually correct and allows valid
optimizations on static variables as long as those are correctly
annotated in C. The problem on parisc seems to be that at least
one variable is generated by the linker in a way that is incompatible
with the psABI but declared as a regular __u32.

       Arnd



[Index of Archives]     [Linux SoC]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux