Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

lib/raid6: use CC_FLAGS_FPU for NEON CFLAGS

Now that CC_FLAGS_FPU is exported and can be used anywhere in the source
tree, use it instead of duplicating the flags here.

Link: https://lkml.kernel.org/r/20240329072441.591471-7-samuel.holland@sifive.com
Signed-off-by: Samuel Holland <samuel.holland@sifive.com>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Acked-by: Christian König <christian.koenig@amd.com>
Cc: Alex Deucher <alexander.deucher@amd.com>
Cc: Borislav Petkov (AMD) <bp@alien8.de>
Cc: Catalin Marinas <catalin.marinas@arm.com>
Cc: Dave Hansen <dave.hansen@linux.intel.com>
Cc: Huacai Chen <chenhuacai@kernel.org>
Cc: Ingo Molnar <mingo@redhat.com>
Cc: Jonathan Corbet <corbet@lwn.net>
Cc: Masahiro Yamada <masahiroy@kernel.org>
Cc: Michael Ellerman <mpe@ellerman.id.au>
Cc: Nathan Chancellor <nathan@kernel.org>
Cc: Nicolas Schier <nicolas@fjasle.eu>
Cc: Palmer Dabbelt <palmer@rivosinc.com>
Cc: Russell King <linux@armlinux.org.uk>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: WANG Xuerui <git@xen0n.name>
Cc: Will Deacon <will@kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>

authored by

Samuel Holland and committed by
Andrew Morton
4be07393 71770895

+10 -23
+10 -23
lib/raid6/Makefile
··· 33 33 endif 34 34 endif 35 35 36 - # The GCC option -ffreestanding is required in order to compile code containing 37 - # ARM/NEON intrinsics in a non C99-compliant environment (such as the kernel) 38 - ifeq ($(CONFIG_KERNEL_MODE_NEON),y) 39 - NEON_FLAGS := -ffreestanding 40 - # Enable <arm_neon.h> 41 - NEON_FLAGS += -isystem $(shell $(CC) -print-file-name=include) 42 - ifeq ($(ARCH),arm) 43 - NEON_FLAGS += -march=armv7-a -mfloat-abi=softfp -mfpu=neon 44 - endif 45 - CFLAGS_recov_neon_inner.o += $(NEON_FLAGS) 46 - ifeq ($(ARCH),arm64) 47 - CFLAGS_REMOVE_recov_neon_inner.o += -mgeneral-regs-only 48 - CFLAGS_REMOVE_neon1.o += -mgeneral-regs-only 49 - CFLAGS_REMOVE_neon2.o += -mgeneral-regs-only 50 - CFLAGS_REMOVE_neon4.o += -mgeneral-regs-only 51 - CFLAGS_REMOVE_neon8.o += -mgeneral-regs-only 52 - endif 53 - endif 54 - 55 36 quiet_cmd_unroll = UNROLL $@ 56 37 cmd_unroll = $(AWK) -v N=$* -f $(src)/unroll.awk < $< > $@ 57 38 ··· 56 75 $(obj)/vpermxor%.c: $(src)/vpermxor.uc $(src)/unroll.awk FORCE 57 76 $(call if_changed,unroll) 58 77 59 - CFLAGS_neon1.o += $(NEON_FLAGS) 60 - CFLAGS_neon2.o += $(NEON_FLAGS) 61 - CFLAGS_neon4.o += $(NEON_FLAGS) 62 - CFLAGS_neon8.o += $(NEON_FLAGS) 78 + CFLAGS_neon1.o += $(CC_FLAGS_FPU) 79 + CFLAGS_neon2.o += $(CC_FLAGS_FPU) 80 + CFLAGS_neon4.o += $(CC_FLAGS_FPU) 81 + CFLAGS_neon8.o += $(CC_FLAGS_FPU) 82 + CFLAGS_recov_neon_inner.o += $(CC_FLAGS_FPU) 83 + CFLAGS_REMOVE_neon1.o += $(CC_FLAGS_NO_FPU) 84 + CFLAGS_REMOVE_neon2.o += $(CC_FLAGS_NO_FPU) 85 + CFLAGS_REMOVE_neon4.o += $(CC_FLAGS_NO_FPU) 86 + CFLAGS_REMOVE_neon8.o += $(CC_FLAGS_NO_FPU) 87 + CFLAGS_REMOVE_recov_neon_inner.o += $(CC_FLAGS_NO_FPU) 63 88 targets += neon1.c neon2.c neon4.c neon8.c 64 89 $(obj)/neon%.c: $(src)/neon.uc $(src)/unroll.awk FORCE 65 90 $(call if_changed,unroll)