Re: [PATCH v5 1/2] powerpc/32: add stack protector support

2019-01-12 Thread Samuel Holland
Hello all, On 09/27/18 02:05, Christophe Leroy wrote: [..snip..] > diff --git a/arch/powerpc/Makefile b/arch/powerpc/Makefile > index 07d9dce7eda6..45b8eb4d8fe7 100644 > --- a/arch/powerpc/Makefile > +++ b/arch/powerpc/Makefile > @@ -112,6 +112,9 @@ KBUILD_LDFLAGS+= -m elf$(BITS)$(LDEMULATION)

Re: [PATCH 1/3] powerpc/book3s64/hash/4k: 4k supports only 16TB linear mapping

2019-10-05 Thread Samuel Holland
Hello, On 9/17/19 9:57 AM, Aneesh Kumar K.V wrote: > With commit: 0034d395f89d ("powerpc/mm/hash64: Map all the kernel regions in > the > same 0xc range"), we now split the 64TB address range into 4 contexts each of > 16TB. That implies we can do only 16TB linear mapping. Make sure we don't > add

Re: [PATCH v4 1/5] RISC-V: Add stubs for sbi_console_putchar/getchar()

2023-11-21 Thread Samuel Holland
Hi Anup, On 2023-11-17 9:38 PM, Anup Patel wrote: > The functions sbi_console_putchar() and sbi_console_getchar() are > not defined when CONFIG_RISCV_SBI_V01 is disabled so let us add > stub of these functions to avoid "#ifdef" on user side. > > Signed-off-by: Anup Patel > Reviewed-by: Andrew Jo

Re: [PATCH v4 3/5] tty/serial: Add RISC-V SBI debug console based earlycon

2023-11-21 Thread Samuel Holland
Hi Anup, On 2023-11-17 9:38 PM, Anup Patel wrote: > We extend the existing RISC-V SBI earlycon support to use the new > RISC-V SBI debug console extension. > > Signed-off-by: Anup Patel > Reviewed-by: Andrew Jones > --- > drivers/tty/serial/Kconfig | 2 +- > drivers/tty/serial/ea

Re: [PATCH v4 2/5] RISC-V: Add SBI debug console helper routines

2023-11-21 Thread Samuel Holland
Hi Anup, On 2023-11-17 9:38 PM, Anup Patel wrote: > Let us provide SBI debug console helper routines which can be > shared by serial/earlycon-riscv-sbi.c and hvc/hvc_riscv_sbi.c. > > Signed-off-by: Anup Patel > --- > arch/riscv/include/asm/sbi.h | 5 + > arch/riscv/kernel/sbi.c | 43 +

Re: [PATCH v4 5/5] RISC-V: Enable SBI based earlycon support

2023-11-21 Thread Samuel Holland
Hi Anup, On 2023-11-17 9:38 PM, Anup Patel wrote: > Let us enable SBI based earlycon support in defconfigs for both RV32 > and RV64 so that "earlycon=sbi" can be used again. > > Signed-off-by: Anup Patel > Reviewed-by: Andrew Jones > --- > arch/riscv/configs/defconfig | 1 + > arch/riscv/

[PATCH] powerpc: Save AMR/IAMR when switching tasks

2022-09-15 Thread Samuel Holland
ng and restoring the kernel-side AMR/IAMR values when switching tasks. Fixes: 890274c2dc4c ("powerpc/64s: Implement KUAP for Radix MMU") Signed-off-by: Samuel Holland --- I have no idea if this is the right change to make, and it could be optimized, but my system has been stable with this

Re: [PATCH] powerpc: Save AMR/IAMR when switching tasks

2022-09-17 Thread Samuel Holland
On 9/17/22 03:16, Christophe Leroy wrote: > Le 16/09/2022 à 07:05, Samuel Holland a écrit : >> With CONFIG_PREEMPT=y (involuntary preemption enabled), it is possible >> to switch away from a task inside copy_{from,to}_user. This left the CPU >> with userspace access enabled

Re: [PATCH] powerpc: Save AMR/IAMR when switching tasks

2022-09-20 Thread Samuel Holland
On 9/19/22 07:37, Michael Ellerman wrote: > Christophe Leroy writes: >> Le 16/09/2022 à 07:05, Samuel Holland a écrit : >>> With CONFIG_PREEMPT=y (involuntary preemption enabled), it is possible >>> to switch away from a task inside copy_{from,to}_user. This left the CP

Re: [PATCH] powerpc: Save AMR/IAMR when switching tasks

2022-10-25 Thread Samuel Holland
On 9/21/22 00:17, Christophe Leroy wrote: > Le 21/09/2022 à 05:33, Samuel Holland a écrit : >> On 9/19/22 07:37, Michael Ellerman wrote: >>> Christophe Leroy writes: >>>> Le 16/09/2022 à 07:05, Samuel Holland a écrit : >>>>> With CONFIG_PREEMPT=y (in

Re: [PATCH v4 1/5] RISC-V: Add stubs for sbi_console_putchar/getchar()

2023-11-23 Thread Samuel Holland
Hi Anup, On 2023-11-23 4:38 AM, Anup Patel wrote: > On Wed, Nov 22, 2023 at 4:06 AM Samuel Holland > wrote: >> On 2023-11-17 9:38 PM, Anup Patel wrote: >>> The functions sbi_console_putchar() and sbi_console_getchar() are >>> not defined when CONFIG_RISCV_SBI

Re: [PATCH 3/3] drm/amd/display: Support DRM_AMD_DC_FP on RISC-V

2023-12-07 Thread Samuel Holland
Hi Christoph, On 2023-11-22 2:40 AM, Christoph Hellwig wrote: >> -select DRM_AMD_DC_FP if (X86 || LOONGARCH || (PPC64 && ALTIVEC) || >> (ARM64 && KERNEL_MODE_NEON && !CC_IS_CLANG)) >> +select DRM_AMD_DC_FP if ARM64 && KERNEL_MODE_NEON && !CC_IS_CLANG >> +select DRM_AMD_DC_FP if PPC64

[RFC PATCH 01/12] arch: Add ARCH_HAS_KERNEL_FPU_SUPPORT

2023-12-07 Thread Samuel Holland
-point C code. Suggested-by: Christoph Hellwig Signed-off-by: Samuel Holland --- Makefile | 4 arch/Kconfig | 9 + 2 files changed, 13 insertions(+) diff --git a/Makefile b/Makefile index 511b5616aa41..e65c186cf2c9 100644 --- a/Makefile +++ b/Makefile @@ -969,6 +969,10

[RFC PATCH 00/12] Unified cross-architecture kernel-mode FPU API

2023-12-07 Thread Samuel Holland
SiFive's HiFive Unmatched. Those GPUs need CONFIG_DRM_AMD_DC_FP to initialize, which requires kernel-mode FPU support. [1]: https://lore.kernel.org/linux-riscv/20231122030621.3759313-1-samuel.holl...@sifive.com/ Samuel Holland (12): arch: Add ARCH_HAS_KERNEL_FPU_SUPPORT ARM: Impl

[RFC PATCH 02/12] ARM: Implement ARCH_HAS_KERNEL_FPU_SUPPORT

2023-12-07 Thread Samuel Holland
ARM provides an equivalent to the common kernel-mode FPU API, but in a different header and using different function names. Add a wrapper header, and export CFLAGS adjustments as found in lib/raid6/Makefile. Signed-off-by: Samuel Holland --- arch/arm/Kconfig | 1 + arch/arm/Makefile

[RFC PATCH 03/12] ARM: crypto: Use CC_FLAGS_FPU for NEON CFLAGS

2023-12-07 Thread Samuel Holland
Now that CC_FLAGS_FPU is exported and can be used anywhere in the source tree, use it instead of duplicating the flags here. Signed-off-by: Samuel Holland --- arch/arm/lib/Makefile | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/arch/arm/lib/Makefile b/arch/arm/lib

[RFC PATCH 04/12] arm64: Implement ARCH_HAS_KERNEL_FPU_SUPPORT

2023-12-07 Thread Samuel Holland
arm64 provides an equivalent to the common kernel-mode FPU API, but in a different header and using different function names. Add a wrapper header, and export CFLAGS adjustments as found in lib/raid6/Makefile. Signed-off-by: Samuel Holland --- arch/arm64/Kconfig | 1 + arch/arm64

[RFC PATCH 06/12] LoongArch: Implement ARCH_HAS_KERNEL_FPU_SUPPORT

2023-12-07 Thread Samuel Holland
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. Signed-off-by: Samuel Holland --- arch/loongarch/Kconfig | 1 + arch/loongarch/Makefile | 5 - arch

[RFC PATCH 05/12] lib/raid6: Use CC_FLAGS_FPU for NEON CFLAGS

2023-12-07 Thread Samuel Holland
Now that CC_FLAGS_FPU is exported and can be used anywhere in the source tree, use it instead of duplicating the flags here. Signed-off-by: Samuel Holland --- lib/raid6/Makefile | 31 --- 1 file changed, 8 insertions(+), 23 deletions(-) diff --git a/lib/raid6

[RFC PATCH 07/12] powerpc: Implement ARCH_HAS_KERNEL_FPU_SUPPORT

2023-12-07 Thread Samuel Holland
PowerPC provides an equivalent to the common kernel-mode FPU API, but in a different header and using different function names. The PowerPC API also requires a non-preemptible context. Add a wrapper header, and export the CFLAGS adjustments. Signed-off-by: Samuel Holland --- arch/powerpc

[RFC PATCH 08/12] x86: Implement ARCH_HAS_KERNEL_FPU_SUPPORT

2023-12-07 Thread Samuel Holland
x86 already provides kernel_fpu_begin() and kernel_fpu_end(), but in a different header. Add a wrapper header, and export the CFLAGS adjustments as found in lib/Makefile. Signed-off-by: Samuel Holland --- arch/x86/Kconfig | 1 + arch/x86/Makefile | 20

[RFC PATCH 09/12] riscv: Add support for kernel-mode FPU

2023-12-07 Thread Samuel Holland
translation unit, so it is not possible for compiler-generated floating-point code to appear outside kernel_fpu_{begin,end}(). Signed-off-by: Samuel Holland --- arch/riscv/Kconfig | 1 + arch/riscv/Makefile | 3 +++ arch/riscv/include/asm/fpu.h| 26

[RFC PATCH 11/12] selftests/fpu: Move FP code to a separate translation unit

2023-12-07 Thread Samuel Holland
This ensures no compiler-generated floating-point code can appear outside kernel_fpu_{begin,end}() sections, and some architectures enforce this separation. Signed-off-by: Samuel Holland --- lib/Makefile| 3 ++- lib/{test_fpu.c => test_fpu_glue.c} |

[RFC PATCH 10/12] drm/amd/display: Use ARCH_HAS_KERNEL_FPU_SUPPORT

2023-12-07 Thread Samuel Holland
Now that all previously-supported architectures select ARCH_HAS_KERNEL_FPU_SUPPORT, this code can depend on that symbol instead of the existing list of architectures. It can also take advantage of the common kernel-mode FPU API and method of adjusting CFLAGS. Signed-off-by: Samuel Holland

[RFC PATCH 12/12] selftests/fpu: Allow building on other architectures

2023-12-07 Thread Samuel Holland
Now that ARCH_HAS_KERNEL_FPU_SUPPORT provides a common way to compile and run floating-point code, this test is no longer x86-specific. Signed-off-by: Samuel Holland --- lib/Kconfig.debug | 2 +- lib/Makefile| 25 ++--- lib/test_fpu_glue.c | 5 - 3 files

Re: [RFC PATCH 05/12] lib/raid6: Use CC_FLAGS_FPU for NEON CFLAGS

2023-12-11 Thread Samuel Holland
On 2023-12-11 10:07 AM, Christoph Hellwig wrote: >> +CFLAGS_REMOVE_neon1.o += $(CC_FLAGS_NO_FPU) >> +CFLAGS_REMOVE_neon2.o += $(CC_FLAGS_NO_FPU) >> +CFLAGS_REMOVE_neon4.o += $(CC_FLAGS_NO_FPU) >> +CFLAGS_REMOVE_neon8.o += $(CC_FLAGS_NO_FPU) > > Btw, do we even really need the extra variables for c

Re: [RFC PATCH 09/12] riscv: Add support for kernel-mode FPU

2023-12-11 Thread Samuel Holland
On 2023-12-11 10:11 AM, Christoph Hellwig wrote: >> +#ifdef __riscv_f >> + >> +#define kernel_fpu_begin() \ >> +static_assert(false, "floating-point code must use a separate >> translation unit") >> +#define kernel_fpu_end() kernel_fpu_begin() >> + >> +#else >> + >> +void kernel_fpu_begin(void

Re: [RFC PATCH 10/12] drm/amd/display: Use ARCH_HAS_KERNEL_FPU_SUPPORT

2023-12-13 Thread Samuel Holland
On 2023-12-11 6:23 AM, Michael Ellerman wrote: > Hi Samuel, > > Thanks for trying to clean all this up. > > One problem below. > > Samuel Holland writes: >> Now that all previously-supported architectures select >> ARCH_HAS_KERNEL_FPU_SUPPORT, this code can de

[PATCH v2 00/14] Unified cross-architecture kernel-mode FPU API

2023-12-27 Thread Samuel Holland
arate patch - Use linux/fpu.h instead of asm/fpu.h in consumers - Declare test_fpu() in a header Michael Ellerman (1): drm/amd/display: Only use hard-float, not altivec on powerpc Samuel Holland (13): arch: Add ARCH_HAS_KERNEL_FPU_SUPPORT ARM: Implement ARCH_HAS_KERNEL_FPU_SUPPORT ARM: crypto

[PATCH v2 01/14] arch: Add ARCH_HAS_KERNEL_FPU_SUPPORT

2023-12-27 Thread Samuel Holland
-point C code. Suggested-by: Christoph Hellwig Signed-off-by: Samuel Holland --- Changes in v2: - Add documentation explaining the built-time and runtime APIs - Add a linux/fpu.h header for generic isolation enforcement Documentation/core-api/floating-point.rst | 78

[PATCH v2 02/14] ARM: Implement ARCH_HAS_KERNEL_FPU_SUPPORT

2023-12-27 Thread Samuel Holland
ARM provides an equivalent to the common kernel-mode FPU API, but in a different header and using different function names. Add a wrapper header, and export CFLAGS adjustments as found in lib/raid6/Makefile. Reviewed-by: Christoph Hellwig Signed-off-by: Samuel Holland --- Changes in v2

[PATCH v2 04/14] arm64: Implement ARCH_HAS_KERNEL_FPU_SUPPORT

2023-12-27 Thread Samuel Holland
arm64 provides an equivalent to the common kernel-mode FPU API, but in a different header and using different function names. Add a wrapper header, and export CFLAGS adjustments as found in lib/raid6/Makefile. Reviewed-by: Christoph Hellwig Signed-off-by: Samuel Holland --- Changes in v2

[PATCH v2 05/14] arm64: crypto: Use CC_FLAGS_FPU for NEON CFLAGS

2023-12-27 Thread Samuel Holland
Now that CC_FLAGS_FPU is exported and can be used anywhere in the source tree, use it instead of duplicating the flags here. Signed-off-by: Samuel Holland --- Changes in v2: - New patch for v2 arch/arm64/lib/Makefile | 6 ++ 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a

[PATCH v2 03/14] ARM: crypto: Use CC_FLAGS_FPU for NEON CFLAGS

2023-12-27 Thread Samuel Holland
Now that CC_FLAGS_FPU is exported and can be used anywhere in the source tree, use it instead of duplicating the flags here. Reviewed-by: Christoph Hellwig Signed-off-by: Samuel Holland --- (no changes since v1) arch/arm/lib/Makefile | 3 +-- 1 file changed, 1 insertion(+), 2 deletions

[PATCH v2 06/14] lib/raid6: Use CC_FLAGS_FPU for NEON CFLAGS

2023-12-27 Thread Samuel Holland
Now that CC_FLAGS_FPU is exported and can be used anywhere in the source tree, use it instead of duplicating the flags here. Reviewed-by: Christoph Hellwig Signed-off-by: Samuel Holland --- (no changes since v1) lib/raid6/Makefile | 31 --- 1 file changed, 8

[PATCH v2 07/14] LoongArch: Implement ARCH_HAS_KERNEL_FPU_SUPPORT

2023-12-27 Thread Samuel Holland
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 Reviewed-by: Christoph Hellwig Signed-off-by: Samuel Holland --- (no changes since v1) arch/loongarch

[PATCH v2 08/14] powerpc: Implement ARCH_HAS_KERNEL_FPU_SUPPORT

2023-12-27 Thread Samuel Holland
PowerPC provides an equivalent to the common kernel-mode FPU API, but in a different header and using different function names. The PowerPC API also requires a non-preemptible context. Add a wrapper header, and export the CFLAGS adjustments. Reviewed-by: Christoph Hellwig Signed-off-by: Samuel

[PATCH v2 09/14] x86: Implement ARCH_HAS_KERNEL_FPU_SUPPORT

2023-12-27 Thread Samuel Holland
x86 already provides kernel_fpu_begin() and kernel_fpu_end(), but in a different header. Add a wrapper header, and export the CFLAGS adjustments as found in lib/Makefile. Reviewed-by: Christoph Hellwig Signed-off-by: Samuel Holland --- (no changes since v1) arch/x86/Kconfig | 1

[PATCH v2 10/14] riscv: Add support for kernel-mode FPU

2023-12-27 Thread Samuel Holland
This is motivated by the amdgpu DRM driver, which needs floating-point code to support recent hardware. That code is not performance-critical, so only provide a minimal non-preemptible implementation for now. Signed-off-by: Samuel Holland --- Changes in v2: - Remove RISC-V architecture

[PATCH v2 11/14] drm/amd/display: Only use hard-float, not altivec on powerpc

2023-12-27 Thread Samuel Holland
: Samuel Holland --- Changes in v2: - New patch for v2 drivers/gpu/drm/amd/display/amdgpu_dm/dc_fpu.c | 12 ++-- drivers/gpu/drm/amd/display/dc/dml/Makefile| 2 +- drivers/gpu/drm/amd/display/dc/dml2/Makefile | 2 +- 3 files changed, 4 insertions(+), 12 deletions(-) diff --git a

[PATCH v2 12/14] drm/amd/display: Use ARCH_HAS_KERNEL_FPU_SUPPORT

2023-12-27 Thread Samuel Holland
Now that all previously-supported architectures select ARCH_HAS_KERNEL_FPU_SUPPORT, this code can depend on that symbol instead of the existing list of architectures. It can also take advantage of the common kernel-mode FPU API and method of adjusting CFLAGS. Signed-off-by: Samuel Holland

[PATCH v2 13/14] selftests/fpu: Move FP code to a separate translation unit

2023-12-27 Thread Samuel Holland
This ensures no compiler-generated floating-point code can appear outside kernel_fpu_{begin,end}() sections, and some architectures enforce this separation. Signed-off-by: Samuel Holland --- Changes in v2: - Declare test_fpu() in a header lib/Makefile| 3 ++- lib

[PATCH v2 14/14] selftests/fpu: Allow building on other architectures

2023-12-27 Thread Samuel Holland
Now that ARCH_HAS_KERNEL_FPU_SUPPORT provides a common way to compile and run floating-point code, this test is no longer x86-specific. Reviewed-by: Christoph Hellwig Signed-off-by: Samuel Holland --- (no changes since v1) lib/Kconfig.debug | 2 +- lib/Makefile| 25

Re: [PATCH v2 07/14] LoongArch: Implement ARCH_HAS_KERNEL_FPU_SUPPORT

2024-01-04 Thread Samuel Holland
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 > wrote: >> >> LoongArch already provides kernel_fpu_begin() and kernel_fpu_end() in >> asm/fpu.h, so it only needs to add kernel_fpu_availa

Re: [PATCH 1/4] arch: consolidate existing CONFIG_PAGE_SIZE_*KB definitions

2024-02-26 Thread Samuel Holland
On 2024-02-26 10:14 AM, Arnd Bergmann wrote: > From: Arnd Bergmann > > These four architectures define the same Kconfig symbols for configuring > the page size. Move the logic into a common place where it can be shared > with all other architectures. > > Signed-off-by: Arnd Bergmann > --- > ar

[PATCH v3 02/14] ARM: Implement ARCH_HAS_KERNEL_FPU_SUPPORT

2024-03-27 Thread Samuel Holland
ARM provides an equivalent to the common kernel-mode FPU API, but in a different header and using different function names. Add a wrapper header, and export CFLAGS adjustments as found in lib/raid6/Makefile. Reviewed-by: Christoph Hellwig Signed-off-by: Samuel Holland --- (no changes since v2

[PATCH v3 00/14] Unified cross-architecture kernel-mode FPU API

2024-03-27 Thread Samuel Holland
m/amd/display: Only use hard-float, not altivec on powerpc Samuel Holland (13): arch: Add ARCH_HAS_KERNEL_FPU_SUPPORT ARM: Implement ARCH_HAS_KERNEL_FPU_SUPPORT ARM: crypto: Use CC_FLAGS_FPU for NEON CFLAGS arm64: Implement ARCH_HAS_KERNEL_FPU_SUPPORT arm64: crypto: Use CC_FLAGS_FPU for

[PATCH v3 01/14] arch: Add ARCH_HAS_KERNEL_FPU_SUPPORT

2024-03-27 Thread Samuel Holland
-point C code. Suggested-by: Christoph Hellwig Reviewed-by: Christoph Hellwig Signed-off-by: Samuel Holland --- (no changes since v2) Changes in v2: - Add documentation explaining the built-time and runtime APIs - Add a linux/fpu.h header for generic isolation enforcement Documentation/core-api

[PATCH v3 03/14] ARM: crypto: Use CC_FLAGS_FPU for NEON CFLAGS

2024-03-27 Thread Samuel Holland
Now that CC_FLAGS_FPU is exported and can be used anywhere in the source tree, use it instead of duplicating the flags here. Reviewed-by: Christoph Hellwig Signed-off-by: Samuel Holland --- (no changes since v1) arch/arm/lib/Makefile | 3 +-- 1 file changed, 1 insertion(+), 2 deletions

[PATCH v3 04/14] arm64: Implement ARCH_HAS_KERNEL_FPU_SUPPORT

2024-03-27 Thread Samuel Holland
arm64 provides an equivalent to the common kernel-mode FPU API, but in a different header and using different function names. Add a wrapper header, and export CFLAGS adjustments as found in lib/raid6/Makefile. Reviewed-by: Christoph Hellwig Signed-off-by: Samuel Holland --- (no changes since

[PATCH v3 05/14] arm64: crypto: Use CC_FLAGS_FPU for NEON CFLAGS

2024-03-27 Thread Samuel Holland
Now that CC_FLAGS_FPU is exported and can be used anywhere in the source tree, use it instead of duplicating the flags here. Reviewed-by: Christoph Hellwig Signed-off-by: Samuel Holland --- (no changes since v2) Changes in v2: - New patch for v2 arch/arm64/lib/Makefile | 6 ++ 1 file

[PATCH v3 06/14] lib/raid6: Use CC_FLAGS_FPU for NEON CFLAGS

2024-03-27 Thread Samuel Holland
Now that CC_FLAGS_FPU is exported and can be used anywhere in the source tree, use it instead of duplicating the flags here. Reviewed-by: Christoph Hellwig Signed-off-by: Samuel Holland --- (no changes since v1) lib/raid6/Makefile | 31 --- 1 file changed, 8

[PATCH v3 07/14] LoongArch: Implement ARCH_HAS_KERNEL_FPU_SUPPORT

2024-03-27 Thread Samuel Holland
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 Reviewed-by: Christoph Hellwig Signed-off-by: Samuel Holland --- Changes in v3: - Rebase on v6.9-rc1 arch

[PATCH v3 08/14] powerpc: Implement ARCH_HAS_KERNEL_FPU_SUPPORT

2024-03-27 Thread Samuel Holland
: Christoph Hellwig Signed-off-by: Samuel Holland --- (no changes since v1) arch/powerpc/Kconfig | 1 + arch/powerpc/Makefile | 5 - arch/powerpc/include/asm/fpu.h | 28 3 files changed, 33 insertions(+), 1 deletion(-) create mode 100644 arch

[PATCH v3 09/14] x86: Implement ARCH_HAS_KERNEL_FPU_SUPPORT

2024-03-27 Thread Samuel Holland
x86 already provides kernel_fpu_begin() and kernel_fpu_end(), but in a different header. Add a wrapper header, and export the CFLAGS adjustments as found in lib/Makefile. Reviewed-by: Christoph Hellwig Signed-off-by: Samuel Holland --- (no changes since v1) arch/x86/Kconfig | 1

[PATCH v3 10/14] riscv: Add support for kernel-mode FPU

2024-03-27 Thread Samuel Holland
convert between doubles and 64-bit integers. Acked-by: Palmer Dabbelt Reviewed-by: Palmer Dabbelt Reviewed-by: Christoph Hellwig Signed-off-by: Samuel Holland --- Changes in v3: - Rebase on v6.9-rc1 - Limit ARCH_HAS_KERNEL_FPU_SUPPORT to 64BIT Changes in v2: - Remove RISC-V architecture

[PATCH v3 11/14] drm/amd/display: Only use hard-float, not altivec on powerpc

2024-03-27 Thread Samuel Holland
Deucher Signed-off-by: Samuel Holland --- (no changes since v2) Changes in v2: - New patch for v2 drivers/gpu/drm/amd/display/amdgpu_dm/dc_fpu.c | 12 ++-- drivers/gpu/drm/amd/display/dc/dml/Makefile| 2 +- drivers/gpu/drm/amd/display/dc/dml2/Makefile | 2 +- 3 files changed, 4

[PATCH v3 12/14] drm/amd/display: Use ARCH_HAS_KERNEL_FPU_SUPPORT

2024-03-27 Thread Samuel Holland
: Christoph Hellwig Signed-off-by: Samuel Holland --- (no changes since v2) Changes in v2: - Split altivec removal to a separate patch - Use linux/fpu.h instead of asm/fpu.h in consumers drivers/gpu/drm/amd/display/Kconfig | 2 +- .../gpu/drm/amd/display/amdgpu_dm/dc_fpu.c| 27

[PATCH v3 13/14] selftests/fpu: Move FP code to a separate translation unit

2024-03-27 Thread Samuel Holland
This ensures no compiler-generated floating-point code can appear outside kernel_fpu_{begin,end}() sections, and some architectures enforce this separation. Reviewed-by: Christoph Hellwig Signed-off-by: Samuel Holland --- (no changes since v2) Changes in v2: - Declare test_fpu() in a header

[PATCH v3 14/14] selftests/fpu: Allow building on other architectures

2024-03-27 Thread Samuel Holland
Now that ARCH_HAS_KERNEL_FPU_SUPPORT provides a common way to compile and run floating-point code, this test is no longer x86-specific. Reviewed-by: Christoph Hellwig Signed-off-by: Samuel Holland --- (no changes since v1) lib/Kconfig.debug | 2 +- lib/Makefile| 25

Re: [PATCH v3 12/14] drm/amd/display: Use ARCH_HAS_KERNEL_FPU_SUPPORT

2024-03-27 Thread Samuel Holland
On 2024-03-27 4:25 PM, Andrew Morton wrote: > On Wed, 27 Mar 2024 13:00:43 -0700 Samuel Holland > wrote: > >> Now that all previously-supported architectures select >> ARCH_HAS_KERNEL_FPU_SUPPORT, this code can depend on that symbol instead >> of the existing list of

[PATCH v4 01/15] arch: Add ARCH_HAS_KERNEL_FPU_SUPPORT

2024-03-29 Thread Samuel Holland
-point C code. Suggested-by: Christoph Hellwig Reviewed-by: Christoph Hellwig Signed-off-by: Samuel Holland --- (no changes since v2) Changes in v2: - Add documentation explaining the built-time and runtime APIs - Add a linux/fpu.h header for generic isolation enforcement Documentation/core-api

[PATCH v4 02/15] ARM: Implement ARCH_HAS_KERNEL_FPU_SUPPORT

2024-03-29 Thread Samuel Holland
ARM provides an equivalent to the common kernel-mode FPU API, but in a different header and using different function names. Add a wrapper header, and export CFLAGS adjustments as found in lib/raid6/Makefile. Reviewed-by: Christoph Hellwig Signed-off-by: Samuel Holland --- (no changes since v2

[PATCH v4 00/15] Unified cross-architecture kernel-mode FPU API

2024-03-29 Thread Samuel Holland
ec on powerpc Samuel Holland (14): arch: Add ARCH_HAS_KERNEL_FPU_SUPPORT ARM: Implement ARCH_HAS_KERNEL_FPU_SUPPORT ARM: crypto: Use CC_FLAGS_FPU for NEON CFLAGS arm64: Implement ARCH_HAS_KERNEL_FPU_SUPPORT arm64: crypto: Use CC_FLAGS_FPU for NEON CFLAGS lib/raid6: Use CC_FLAGS_FPU for

[PATCH v4 03/15] ARM: crypto: Use CC_FLAGS_FPU for NEON CFLAGS

2024-03-29 Thread Samuel Holland
Now that CC_FLAGS_FPU is exported and can be used anywhere in the source tree, use it instead of duplicating the flags here. Reviewed-by: Christoph Hellwig Signed-off-by: Samuel Holland --- (no changes since v1) arch/arm/lib/Makefile | 3 +-- 1 file changed, 1 insertion(+), 2 deletions

[PATCH v4 04/15] arm64: Implement ARCH_HAS_KERNEL_FPU_SUPPORT

2024-03-29 Thread Samuel Holland
arm64 provides an equivalent to the common kernel-mode FPU API, but in a different header and using different function names. Add a wrapper header, and export CFLAGS adjustments as found in lib/raid6/Makefile. Reviewed-by: Christoph Hellwig Signed-off-by: Samuel Holland --- (no changes since

[PATCH v4 05/15] arm64: crypto: Use CC_FLAGS_FPU for NEON CFLAGS

2024-03-29 Thread Samuel Holland
Now that CC_FLAGS_FPU is exported and can be used anywhere in the source tree, use it instead of duplicating the flags here. Reviewed-by: Christoph Hellwig Signed-off-by: Samuel Holland --- (no changes since v2) Changes in v2: - New patch for v2 arch/arm64/lib/Makefile | 6 ++ 1 file

[PATCH v4 06/15] lib/raid6: Use CC_FLAGS_FPU for NEON CFLAGS

2024-03-29 Thread Samuel Holland
Now that CC_FLAGS_FPU is exported and can be used anywhere in the source tree, use it instead of duplicating the flags here. Reviewed-by: Christoph Hellwig Signed-off-by: Samuel Holland --- Changes in v4: - Add missed CFLAGS changes for recov_neon_inner.c (fixes arm build failures) lib

[PATCH v4 07/15] LoongArch: Implement ARCH_HAS_KERNEL_FPU_SUPPORT

2024-03-29 Thread Samuel Holland
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 Reviewed-by: Christoph Hellwig Signed-off-by: Samuel Holland --- (no changes since v3) Changes in v3

[PATCH v4 08/15] powerpc: Implement ARCH_HAS_KERNEL_FPU_SUPPORT

2024-03-29 Thread Samuel Holland
: Christoph Hellwig Signed-off-by: Samuel Holland --- (no changes since v1) arch/powerpc/Kconfig | 1 + arch/powerpc/Makefile | 5 - arch/powerpc/include/asm/fpu.h | 28 3 files changed, 33 insertions(+), 1 deletion(-) create mode 100644 arch

[PATCH v4 09/15] x86/fpu: Fix asm/fpu/types.h include guard

2024-03-29 Thread Samuel Holland
The include guard should match the filename, or it will conflict with the newly-added asm/fpu.h. Signed-off-by: Samuel Holland --- Changes in v4: - New patch for v4 arch/x86/include/asm/fpu/types.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/arch/x86/include/asm

[PATCH v4 10/15] x86: Implement ARCH_HAS_KERNEL_FPU_SUPPORT

2024-03-29 Thread Samuel Holland
x86 already provides kernel_fpu_begin() and kernel_fpu_end(), but in a different header. Add a wrapper header, and export the CFLAGS adjustments as found in lib/Makefile. Reviewed-by: Christoph Hellwig Signed-off-by: Samuel Holland --- (no changes since v1) arch/x86/Kconfig | 1

[PATCH v4 11/15] riscv: Add support for kernel-mode FPU

2024-03-29 Thread Samuel Holland
convert between doubles and 64-bit integers. Acked-by: Palmer Dabbelt Reviewed-by: Palmer Dabbelt Reviewed-by: Christoph Hellwig Signed-off-by: Samuel Holland --- (no changes since v3) Changes in v3: - Limit riscv ARCH_HAS_KERNEL_FPU_SUPPORT to 64BIT Changes in v2: - Remove RISC-V

[PATCH v4 12/15] drm/amd/display: Only use hard-float, not altivec on powerpc

2024-03-29 Thread Samuel Holland
Deucher Signed-off-by: Samuel Holland --- (no changes since v2) Changes in v2: - New patch for v2 drivers/gpu/drm/amd/display/amdgpu_dm/dc_fpu.c | 12 ++-- drivers/gpu/drm/amd/display/dc/dml/Makefile| 2 +- drivers/gpu/drm/amd/display/dc/dml2/Makefile | 2 +- 3 files changed, 4

[PATCH v4 13/15] drm/amd/display: Use ARCH_HAS_KERNEL_FPU_SUPPORT

2024-03-29 Thread Samuel Holland
: Christoph Hellwig Signed-off-by: Samuel Holland --- (no changes since v2) Changes in v2: - Split altivec removal to a separate patch - Use linux/fpu.h instead of asm/fpu.h in consumers drivers/gpu/drm/amd/display/Kconfig | 2 +- .../gpu/drm/amd/display/amdgpu_dm/dc_fpu.c| 27

[PATCH v4 14/15] selftests/fpu: Move FP code to a separate translation unit

2024-03-29 Thread Samuel Holland
This ensures no compiler-generated floating-point code can appear outside kernel_fpu_{begin,end}() sections, and some architectures enforce this separation. Reviewed-by: Christoph Hellwig Signed-off-by: Samuel Holland --- (no changes since v2) Changes in v2: - Declare test_fpu() in a header

[PATCH v4 15/15] selftests/fpu: Allow building on other architectures

2024-03-29 Thread Samuel Holland
Now that ARCH_HAS_KERNEL_FPU_SUPPORT provides a common way to compile and run floating-point code, this test is no longer x86-specific. Reviewed-by: Christoph Hellwig Signed-off-by: Samuel Holland --- (no changes since v1) lib/Kconfig.debug | 2 +- lib/Makefile| 25

Re: [PATCH v4 10/15] x86: Implement ARCH_HAS_KERNEL_FPU_SUPPORT

2024-03-29 Thread Samuel Holland
On 2024-03-29 12:28 PM, Dave Hansen wrote: > On 3/29/24 00:18, Samuel Holland wrote: >> +# >> +# CFLAGS for compiling floating point code inside the kernel. >> +# >> +CC_FLAGS_FPU := -msse -msse2 >> +ifdef CONFIG_CC_IS_GCC >> +# Stack alignment mismatch

Re: [PATCH v4 13/15] drm/amd/display: Use ARCH_HAS_KERNEL_FPU_SUPPORT

2024-04-10 Thread Samuel Holland
Hi Thiago, On 2024-04-10 5:21 PM, Thiago Jung Bauermann wrote: > Samuel Holland writes: > >> Now that all previously-supported architectures select >> ARCH_HAS_KERNEL_FPU_SUPPORT, this code can depend on that symbol instead >> of the existing list of architectures. It ca

Re: [PATCH v4 13/15] drm/amd/display: Use ARCH_HAS_KERNEL_FPU_SUPPORT

2024-04-10 Thread Samuel Holland
Hi Thiago, On 2024-04-10 8:02 PM, Thiago Jung Bauermann wrote: > Samuel Holland writes: >> On 2024-04-10 5:21 PM, Thiago Jung Bauermann wrote: >>> >>> Unfortunately this patch causes build failures on arm with allyesconfig >>> and allmodconfig. Tested wit

[PATCH] powerpc: Select HAVE_FUTEX_CMPXCHG

2020-09-18 Thread Samuel Holland
ntime feature detection, we can select HAVE_FUTEX_CMPXCHG to skip futex_detect_cmpxchg() and enable the use of robust futexes. Signed-off-by: Samuel Holland --- arch/powerpc/Kconfig | 1 + 1 file changed, 1 insertion(+) diff --git a/arch/powerpc/Kconfig b/arch/powerpc/Kconfig index ad62063

[PATCH] powerpc: Limit ARCH_HAS_KERNEL_FPU_SUPPORT to PPC64

2024-05-29 Thread Samuel Holland
NEL_FPU_SUPPORT") Reported-by: kernel test robot Closes: https://lore.kernel.org/oe-kbuild-all/202405250851.z4dayswg-...@intel.com/ Reported-by: Guenter Roeck Closes: https://lore.kernel.org/lkml/eeffaec3-df63-4e55-ab7a-064a65c00...@roeck-us.net/ Signed-off-by: Samuel Holland --- arch/power

Re: [PATCH 13/17] mm: move numa_distance and related code from x86 to numa_memblks

2024-07-18 Thread Samuel Holland
On 2024-07-16 6:13 AM, Mike Rapoport wrote: > From: "Mike Rapoport (Microsoft)" > > Move code dealing with numa_distance array from arch/x86 to > mm/numa_memblks.c > > This code will be later reused by arch_numa. > > No functional changes. > > Signed-off-by: Mike Rapoport (Microsoft) > --- >

Re: [PATCH v2 2/5] riscv: kvm: drop 32-bit host support

2025-02-02 Thread Samuel Holland
Hi Arnd, On 2024-12-21 3:42 PM, Arnd Bergmann wrote: > From: Arnd Bergmann > > KVM support on RISC-V includes both 32-bit and 64-bit host mode, but in > practice, all RISC-V SoCs that may use this are 64-bit: > > As of linux-6.13, there is no mainline Linux support for any specific > 32-bit SoC