From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 77D9453AC for ; Sat, 30 Mar 2024 03:30:56 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1711769456; cv=none; b=ZGyyezkHZeWF67Qlrv8xmDONEi4qkyF435bEgrSKTFBBjd4eKfvj34Bxxkw5w22vshhpryAfYQe0Q4UZZ1cznDdMkzFPo0dSsGX8dkNoDUxVj3ddN4uugBeNXWnBvEJCdAV3L1T9kvMXoumiZN+0OFB2rCy9Ve1eWvg/GpUjIBA= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1711769456; c=relaxed/simple; bh=RG7gwtm+zSdzXesaubvnMclHqC/GWLF3ii/cFoi71to=; h=Date:To:From:Subject:Message-Id; b=iv+38leL5A2ufEKStpjx2m+Inqg9Yvwq+tuIhjHOqDWlsr2mT9iW0d0yLU9fIsb5OVFst4POpg7k7+3WAMTwG1JY25WhRfhTkMmv8K5+iduwuPYgYmTWR8Hc8cJ3NX1p7FEvN22MQI2NoBWlCB2lyYl7exIQnPM2PaMEIF0EJ+I= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linux-foundation.org header.i=@linux-foundation.org header.b=izDQr3E9; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linux-foundation.org header.i=@linux-foundation.org header.b="izDQr3E9" Received: by smtp.kernel.org (Postfix) with ESMTPSA id EB150C433C7; Sat, 30 Mar 2024 03:30:55 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linux-foundation.org; s=korg; t=1711769456; bh=RG7gwtm+zSdzXesaubvnMclHqC/GWLF3ii/cFoi71to=; h=Date:To:From:Subject:From; b=izDQr3E98SO4oTSAECNk/t+IBIOXEaxwCMOBwonr2c4Sj8gQ3KV+E2n/X02Z8w8a3 4NTGSgD0FdfpUVDFgnyh7HQVBSbdUwbZbeDe0ZXCXmB/VB0L0f+guYNdtszGfLRfL1 cnSaJqkfLR64MmJrdqlU9aTp95XGG0/uJhTdAIFU= Date: Fri, 29 Mar 2024 20:30:55 -0700 To: mm-commits@vger.kernel.org,will@kernel.org,tglx@linutronix.de,palmer@rivosinc.com,nicolas@fjasle.eu,nathan@kernel.org,mpe@ellerman.id.au,mingo@redhat.com,masahiroy@kernel.org,linux@armlinux.org.uk,hch@lst.de,git@xen0n.name,dave.hansen@linux.intel.com,corbet@lwn.net,chenhuacai@kernel.org,catalin.marinas@arm.com,bp@alien8.de,alexander.deucher@amd.com,samuel.holland@sifive.com,akpm@linux-foundation.org From: Andrew Morton Subject: + loongarch-implement-arch_has_kernel_fpu_support.patch added to mm-nonmm-unstable branch Message-Id: <20240330033055.EB150C433C7@smtp.kernel.org> Precedence: bulk X-Mailing-List: mm-commits@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: The patch titled Subject: LoongArch: implement ARCH_HAS_KERNEL_FPU_SUPPORT has been added to the -mm mm-nonmm-unstable branch. Its filename is loongarch-implement-arch_has_kernel_fpu_support.patch This patch will shortly appear at https://git.kernel.org/pub/scm/linux/kernel/git/akpm/25-new.git/tree/patches/loongarch-implement-arch_has_kernel_fpu_support.patch This patch will later appear in the mm-nonmm-unstable branch at git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm Before you just go and hit "reply", please: a) Consider who else should be cc'ed b) Prefer to cc a suitable mailing list as well c) Ideally: find the original patch on the mailing list and do a reply-to-all to that, adding suitable additional cc's *** Remember to use Documentation/process/submit-checklist.rst when testing your code *** The -mm tree is included into linux-next via the mm-everything branch at git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm and is updated there every 2-3 working days ------------------------------------------------------ From: Samuel Holland Subject: LoongArch: implement ARCH_HAS_KERNEL_FPU_SUPPORT Date: Fri, 29 Mar 2024 00:18:22 -0700 LoongArch already provides kernel_fpu_begin() and kernel_fpu_end() in asm/fpu.h, so it only needs to add kernel_fpu_available() and export the CFLAGS adjustments. Link: https://lkml.kernel.org/r/20240329072441.591471-8-samuel.holland@sifive.com Signed-off-by: Samuel Holland Acked-by: WANG Xuerui Reviewed-by: Christoph Hellwig Cc: Alex Deucher Cc: Borislav Petkov (AMD) Cc: Catalin Marinas Cc: Dave Hansen Cc: Huacai Chen Cc: Ingo Molnar Cc: Jonathan Corbet Cc: Masahiro Yamada Cc: Michael Ellerman Cc: Nathan Chancellor Cc: Nicolas Schier Cc: Palmer Dabbelt Cc: Russell King Cc: Thomas Gleixner Cc: Will Deacon Signed-off-by: Andrew Morton --- arch/loongarch/Kconfig | 1 + arch/loongarch/Makefile | 5 ++++- arch/loongarch/include/asm/fpu.h | 1 + 3 files changed, 6 insertions(+), 1 deletion(-) --- a/arch/loongarch/include/asm/fpu.h~loongarch-implement-arch_has_kernel_fpu_support +++ a/arch/loongarch/include/asm/fpu.h @@ -21,6 +21,7 @@ struct sigcontext; +#define kernel_fpu_available() cpu_has_fpu extern void kernel_fpu_begin(void); extern void kernel_fpu_end(void); --- a/arch/loongarch/Kconfig~loongarch-implement-arch_has_kernel_fpu_support +++ a/arch/loongarch/Kconfig @@ -18,6 +18,7 @@ config LOONGARCH select ARCH_HAS_CURRENT_STACK_POINTER select ARCH_HAS_FORTIFY_SOURCE select ARCH_HAS_KCOV + select ARCH_HAS_KERNEL_FPU_SUPPORT if CPU_HAS_FPU select ARCH_HAS_NMI_SAFE_THIS_CPU_OPS select ARCH_HAS_NON_OVERLAPPING_ADDRESS_SPACE select ARCH_HAS_PTE_SPECIAL --- a/arch/loongarch/Makefile~loongarch-implement-arch_has_kernel_fpu_support +++ a/arch/loongarch/Makefile @@ -26,6 +26,9 @@ endif 32bit-emul = elf32loongarch 64bit-emul = elf64loongarch +CC_FLAGS_FPU := -mfpu=64 +CC_FLAGS_NO_FPU := -msoft-float + ifdef CONFIG_UNWINDER_ORC orc_hash_h := arch/$(SRCARCH)/include/generated/asm/orc_hash.h orc_hash_sh := $(srctree)/scripts/orc_hash.sh @@ -59,7 +62,7 @@ ld-emul = $(64bit-emul) cflags-y += -mabi=lp64s endif -cflags-y += -pipe -msoft-float +cflags-y += -pipe $(CC_FLAGS_NO_FPU) LDFLAGS_vmlinux += -static -n -nostdlib # When the assembler supports explicit relocation hint, we must use it. _ Patches currently in -mm which might be from samuel.holland@sifive.com are x86-fpu-fix-asm-fpu-typesh-include-guard.patch arch-add-arch_has_kernel_fpu_support.patch arm-implement-arch_has_kernel_fpu_support.patch arm-crypto-use-cc_flags_fpu-for-neon-cflags.patch arm64-implement-arch_has_kernel_fpu_support.patch arm64-crypto-use-cc_flags_fpu-for-neon-cflags.patch lib-raid6-use-cc_flags_fpu-for-neon-cflags.patch loongarch-implement-arch_has_kernel_fpu_support.patch powerpc-implement-arch_has_kernel_fpu_support.patch x86-implement-arch_has_kernel_fpu_support.patch riscv-add-support-for-kernel-mode-fpu.patch drm-amd-display-use-arch_has_kernel_fpu_support.patch selftests-fpu-move-fp-code-to-a-separate-translation-unit.patch selftests-fpu-allow-building-on-other-architectures.patch