From Ard: "Simply disabling -mgeneral-regs-only left and right is risky, given that the standard AArch64 ABI permits the use of FP/SIMD registers anywhere, and GCC is known to use SIMD registers for spilling, and may invent other uses of the FP/SIMD register file that have nothing to do with the floating point code in question. Note that putting kernel_neon_begin() and kernel_neon_end() around the code that does use FP is not sufficient here, the problem is in all the other code that may be emitted with references to SIMD registers in it. So the only way to do this properly is to put all floating point code in a separate compilation unit, and only compile that unit with -mgeneral-regs-only." Disable support until the code can be properly refactored to support this properly on aarch64. Acked-by: Will Deacon <will@kernel.org> Reported-by: Ard Biesheuvel <ardb@kernel.org> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
37 lines
824 B
Makefile
37 lines
824 B
Makefile
# SPDX-License-Identifier: MIT
|
|
#
|
|
# Makefile for the 'dsc' sub-component of DAL.
|
|
|
|
ifdef CONFIG_X86
|
|
dsc_ccflags := -mhard-float -msse
|
|
endif
|
|
|
|
ifdef CONFIG_PPC64
|
|
dsc_ccflags := -mhard-float -maltivec
|
|
endif
|
|
|
|
ifdef CONFIG_CC_IS_GCC
|
|
ifeq ($(call cc-ifversion, -lt, 0701, y), y)
|
|
IS_OLD_GCC = 1
|
|
endif
|
|
endif
|
|
|
|
ifdef CONFIG_X86
|
|
ifdef IS_OLD_GCC
|
|
# Stack alignment mismatch, proceed with caution.
|
|
# GCC < 7.1 cannot compile code using `double` and -mpreferred-stack-boundary=3
|
|
# (8B stack alignment).
|
|
dsc_ccflags += -mpreferred-stack-boundary=4
|
|
else
|
|
dsc_ccflags += -msse2
|
|
endif
|
|
endif
|
|
|
|
CFLAGS_$(AMDDALPATH)/dc/dsc/rc_calc.o := $(dsc_ccflags)
|
|
CFLAGS_REMOVE_$(AMDDALPATH)/dc/dsc/rc_calc.o := $(dsc_rcflags)
|
|
|
|
DSC = dc_dsc.o rc_calc.o rc_calc_dpi.o
|
|
|
|
AMD_DAL_DSC = $(addprefix $(AMDDALPATH)/dc/dsc/,$(DSC))
|
|
|
|
AMD_DISPLAY_FILES += $(AMD_DAL_DSC)
|