]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
LoongArch: Align ACPI structures if ARCH_STRICT_ALIGN enabled
authorHuacai Chen <chenhuacai@loongson.cn>
Thu, 18 Sep 2025 11:44:01 +0000 (19:44 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 25 Sep 2025 08:58:52 +0000 (10:58 +0200)
commite481c2fd34626b0a9ca41107c7ccddefa60847ef
tree57cce3d3f26aaca26d0c56513e66070bb718b046
parent83ca7939cc32b3f14d638959a0db2908b8cb0df0
LoongArch: Align ACPI structures if ARCH_STRICT_ALIGN enabled

commit a9d13433fe17be0e867e51e71a1acd2731fbef8d upstream.

ARCH_STRICT_ALIGN is used for hardware without UAL, now it only control
the -mstrict-align flag. However, ACPI structures are packed by default
so will cause unaligned accesses.

To avoid this, define ACPI_MISALIGNMENT_NOT_SUPPORTED in asm/acenv.h to
align ACPI structures if ARCH_STRICT_ALIGN enabled.

Cc: stable@vger.kernel.org
Reported-by: Binbin Zhou <zhoubinbin@loongson.cn>
Suggested-by: Xi Ruoyao <xry111@xry111.site>
Suggested-by: Jiaxun Yang <jiaxun.yang@flygoat.com>
Signed-off-by: Huacai Chen <chenhuacai@loongson.cn>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
arch/loongarch/include/asm/acenv.h