TencentOS-kernel/include
Fangrui Song 7fadeab939 firmware_loader: align .builtin_fw to 8
[ Upstream commit 793f49a87aae24e5bcf92ad98d764153fc936570 ]

arm64 references the start address of .builtin_fw (__start_builtin_fw)
with a pair of R_AARCH64_ADR_PREL_PG_HI21/R_AARCH64_LDST64_ABS_LO12_NC
relocations.  The compiler is allowed to emit the
R_AARCH64_LDST64_ABS_LO12_NC relocation because struct builtin_fw in
include/linux/firmware.h is 8-byte aligned.

The R_AARCH64_LDST64_ABS_LO12_NC relocation requires the address to be a
multiple of 8, which may not be the case if .builtin_fw is empty.
Unconditionally align .builtin_fw to fix the linker error.  32-bit
architectures could use ALIGN(4) but that would add unnecessary
complexity, so just use ALIGN(8).

Link: https://lkml.kernel.org/r/20201208054646.2913063-1-maskray@google.com
Link: https://github.com/ClangBuiltLinux/linux/issues/1204
Fixes: 5658c76 ("firmware: allow firmware files to be built into kernel image")
Signed-off-by: Fangrui Song <maskray@google.com>
Reported-by: kernel test robot <lkp@intel.com>
Acked-by: Arnd Bergmann <arnd@arndb.de>
Reviewed-by: Nick Desaulniers <ndesaulniers@google.com>
Tested-by: Nick Desaulniers <ndesaulniers@google.com>
Tested-by: Douglas Anderson <dianders@chromium.org>
Acked-by: Nathan Chancellor <nathan@kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2021-04-12 12:52:04 +08:00
..
acpi irqchip/gic-phytium-2500: Add support for GIC of Phytium S2500 2021-03-19 10:33:26 +08:00
asm-generic firmware_loader: align .builtin_fw to 8 2021-04-12 12:52:04 +08:00
clocksource Init Repo base on linux 5.4.32 long term, and add base tlinux kernel interfaces. 2021-03-16 11:01:34 +08:00
crypto crypto: algif_aead - Only wake up when ctx->more is zero 2021-03-16 16:34:11 +08:00
drm iommu/vt-d: Move intel_iommu_gfx_mapped to Intel IOMMU header 2021-03-16 16:41:21 +08:00
dt-bindings Init Repo base on linux 5.4.32 long term, and add base tlinux kernel interfaces. 2021-03-16 11:01:34 +08:00
keys KEYS: Don't write out to userspace while holding key semaphore 2021-03-16 16:26:42 +08:00
kvm Init Repo base on linux 5.4.32 long term, and add base tlinux kernel interfaces. 2021-03-16 11:01:34 +08:00
linux vmlinux.lds.h: Create section for protection against instrumentation 2021-04-12 12:52:03 +08:00
math-emu Init Repo base on linux 5.4.32 long term, and add base tlinux kernel interfaces. 2021-03-16 11:01:34 +08:00
media media: v4l2-fwnode: Return -EINVAL for invalid bus-type 2021-03-16 16:42:46 +08:00
misc Init Repo base on linux 5.4.32 long term, and add base tlinux kernel interfaces. 2021-03-16 11:01:34 +08:00
net net: sched: replaced invalid qdisc tree flush helper in qdisc_replace 2021-04-12 12:51:58 +08:00
pcmcia Init Repo base on linux 5.4.32 long term, and add base tlinux kernel interfaces. 2021-03-16 11:01:34 +08:00
ras Init Repo base on linux 5.4.32 long term, and add base tlinux kernel interfaces. 2021-03-16 11:01:34 +08:00
rdma RDMA/umem: Fix signature of stub ib_umem_find_best_pgsz() 2021-03-16 16:38:49 +08:00
scsi scsi: libiscsi: Fix NOP race condition 2021-03-16 16:41:40 +08:00
soc irqchip/eznps: Fix build error for !ARC700 builds 2021-03-16 16:35:56 +08:00
sound ALSA: hda: fix jack detection with Realtek codecs when in D3 2021-03-16 16:38:15 +08:00
target scsi: target: fix hang when multiple threads try to destroy the same iscsi session 2021-03-16 16:26:27 +08:00
trace writeback: Drop I_DIRTY_TIME_EXPIRE 2021-04-12 12:51:42 +08:00
uapi ICMPv6: Add ICMPv6 Parameter Problem, code 3 definition 2021-04-12 12:51:42 +08:00
vdso Init Repo base on linux 5.4.32 long term, and add base tlinux kernel interfaces. 2021-03-16 11:01:34 +08:00
video Init Repo base on linux 5.4.32 long term, and add base tlinux kernel interfaces. 2021-03-16 11:01:34 +08:00
xen arm/xen: Don't probe xenbus as part of an early initcall 2021-04-12 12:52:01 +08:00