From: Samuel Holland <samuel.holland@sifive.com>
To: Huacai Chen <chenhuacai@kernel.org>
Cc: linux-arm-kernel@lists.infradead.org,
linuxppc-dev@lists.ozlabs.org, x86@kernel.org,
linux-riscv@lists.infradead.org, Christoph Hellwig <hch@lst.de>,
loongarch@lists.linux.dev, linux-kernel@vger.kernel.org,
amd-gfx@lists.freedesktop.org, linux-arch@vger.kernel.org,
WANG Xuerui <git@xen0n.name>
Subject: Re: [PATCH v2 07/14] LoongArch: Implement ARCH_HAS_KERNEL_FPU_SUPPORT
Date: Thu, 4 Jan 2024 09:58:28 -0600 [thread overview]
Message-ID: <84389bc3-f2e7-49c5-a820-de60ee00f8a7@sifive.com> (raw)
In-Reply-To: <CAAhV-H5TJPqRcgS6jywWDSNsCvd-PsVacgxgoiF-fJ00ZnS4uA@mail.gmail.com>
Hi Huacai,
On 2024-01-04 3:55 AM, Huacai Chen wrote:
> Hi, Samuel,
>
> On Thu, Dec 28, 2023 at 9:42 AM Samuel Holland
> <samuel.holland@sifive.com> wrote:
>>
>> 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.
>>
>> Acked-by: WANG Xuerui <git@xen0n.name>
>> Reviewed-by: Christoph Hellwig <hch@lst.de>
>> Signed-off-by: Samuel Holland <samuel.holland@sifive.com>
>> ---
>>
>> (no changes since v1)
>>
>> arch/loongarch/Kconfig | 1 +
>> arch/loongarch/Makefile | 5 ++++-
>> arch/loongarch/include/asm/fpu.h | 1 +
>> 3 files changed, 6 insertions(+), 1 deletion(-)
>>
>> diff --git a/arch/loongarch/Kconfig b/arch/loongarch/Kconfig
>> index ee123820a476..65d4475565b8 100644
>> --- a/arch/loongarch/Kconfig
>> +++ b/arch/loongarch/Kconfig
>> @@ -15,6 +15,7 @@ config LOONGARCH
>> select ARCH_HAS_CPU_FINALIZE_INIT
>> 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
>> diff --git a/arch/loongarch/Makefile b/arch/loongarch/Makefile
>> index 4ba8d67ddb09..1afe28feaba5 100644
>> --- a/arch/loongarch/Makefile
>> +++ b/arch/loongarch/Makefile
>> @@ -25,6 +25,9 @@ endif
>> 32bit-emul = elf32loongarch
>> 64bit-emul = elf64loongarch
>>
>> +CC_FLAGS_FPU := -mfpu=64
>> +CC_FLAGS_NO_FPU := -msoft-float
> We will add LoongArch32 support later, maybe it should be -mfpu=32 in
> that case, and do other archs have the case that only support FP32?
Do you mean that LoongArch32 does not support double-precision FP in hardware?
At least both of the consumers in this series use double-precision, so my first
thought is that LoongArch32 could not select ARCH_HAS_KERNEL_FPU_SUPPORT.
Regards,
Samuel
next prev parent reply other threads:[~2024-01-04 15:58 UTC|newest]
Thread overview: 27+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-12-28 1:41 [PATCH v2 00/14] Unified cross-architecture kernel-mode FPU API Samuel Holland
2023-12-28 1:41 ` [PATCH v2 01/14] arch: Add ARCH_HAS_KERNEL_FPU_SUPPORT Samuel Holland
2023-12-28 6:19 ` Christoph Hellwig
2023-12-28 1:41 ` [PATCH v2 02/14] ARM: Implement ARCH_HAS_KERNEL_FPU_SUPPORT Samuel Holland
2023-12-28 1:41 ` [PATCH v2 03/14] ARM: crypto: Use CC_FLAGS_FPU for NEON CFLAGS Samuel Holland
2023-12-28 1:41 ` [PATCH v2 04/14] arm64: Implement ARCH_HAS_KERNEL_FPU_SUPPORT Samuel Holland
2023-12-28 1:41 ` [PATCH v2 05/14] arm64: crypto: Use CC_FLAGS_FPU for NEON CFLAGS Samuel Holland
2023-12-28 6:19 ` Christoph Hellwig
2023-12-28 1:41 ` [PATCH v2 06/14] lib/raid6: " Samuel Holland
2023-12-28 1:41 ` [PATCH v2 07/14] LoongArch: Implement ARCH_HAS_KERNEL_FPU_SUPPORT Samuel Holland
2024-01-04 9:55 ` Huacai Chen
2024-01-04 15:58 ` Samuel Holland [this message]
2024-01-07 2:39 ` Huacai Chen
2024-01-08 9:37 ` Christoph Hellwig
2023-12-28 1:41 ` [PATCH v2 08/14] powerpc: " Samuel Holland
2023-12-28 3:19 ` Michael Ellerman
2023-12-28 1:41 ` [PATCH v2 09/14] x86: " Samuel Holland
2023-12-28 1:42 ` [PATCH v2 10/14] riscv: Add support for kernel-mode FPU Samuel Holland
2023-12-28 6:20 ` Christoph Hellwig
2024-01-10 14:51 ` Palmer Dabbelt
2023-12-28 1:42 ` [PATCH v2 11/14] drm/amd/display: Only use hard-float, not altivec on powerpc Samuel Holland
2023-12-28 1:42 ` [PATCH v2 12/14] drm/amd/display: Use ARCH_HAS_KERNEL_FPU_SUPPORT Samuel Holland
2023-12-28 6:20 ` Christoph Hellwig
2023-12-28 1:42 ` [PATCH v2 13/14] selftests/fpu: Move FP code to a separate translation unit Samuel Holland
2023-12-28 6:20 ` Christoph Hellwig
2023-12-28 1:42 ` [PATCH v2 14/14] selftests/fpu: Allow building on other architectures Samuel Holland
2024-01-03 14:27 ` [PATCH v2 00/14] Unified cross-architecture kernel-mode FPU API Alex Deucher
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=84389bc3-f2e7-49c5-a820-de60ee00f8a7@sifive.com \
--to=samuel.holland@sifive.com \
--cc=amd-gfx@lists.freedesktop.org \
--cc=chenhuacai@kernel.org \
--cc=git@xen0n.name \
--cc=hch@lst.de \
--cc=linux-arch@vger.kernel.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-riscv@lists.infradead.org \
--cc=linuxppc-dev@lists.ozlabs.org \
--cc=loongarch@lists.linux.dev \
--cc=x86@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®