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

2023-12-11 Thread Christoph Hellwig
On Thu, Dec 07, 2023 at 10:49:53PM -0600, Samuel Holland wrote: > Actually tracking all possibly-FPU-tainted functions and their call sites is > probably possible, but a much larger task. I think objtool should be able to do that reasonably easily, it already does it for checking section where use

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

2023-12-11 Thread Christoph Hellwig
On Mon, Dec 11, 2023 at 10:12:27AM -0600, Samuel Holland wrote: > On 2023-12-11 10:07 AM, Christoph Hellwig wrote: > > Unfortunately, not all of the relevant options can be no-prefixed: Ok. That is another good argument for having the obj-fpu += syntax I proposed. You might need help from the k

[PATCH v3 01/35] lib/find: add atomic find_bit() primitives

2023-12-11 Thread Yury Norov
Add helpers around test_and_{set,clear}_bit() that allow to search for clear or set bits and flip them atomically. The target patterns may look like this: for (idx = 0; idx < nbits; idx++) if (test_and_clear_bit(idx, bitmap)) do_something(idx); Or

[PATCH v3 02/35] lib/find: add test for atomic find_bit() ops

2023-12-11 Thread Yury Norov
Add basic functionality test for new API. Signed-off-by: Yury Norov --- lib/test_bitmap.c | 61 +++ 1 file changed, 61 insertions(+) diff --git a/lib/test_bitmap.c b/lib/test_bitmap.c index 65f22c2578b0..277e1ca9fd28 100644 --- a/lib/test_bitmap.c +++

[PATCH v3 00/35] bitops: add atomic find_bit() operations

2023-12-11 Thread Yury Norov
Add helpers around test_and_{set,clear}_bit() that allow to search for clear or set bits and flip them atomically. The target patterns may look like this: for (idx = 0; idx < nbits; idx++) if (test_and_clear_bit(idx, bitmap)) do_something(idx); Or

[PATCH v3 18/35] powerpc: optimize arch code by using atomic find_bit() API

2023-12-11 Thread Yury Norov
Use find_and_{set,clear}_bit() where appropriate and simplify the logic. Signed-off-by: Yury Norov --- arch/powerpc/mm/book3s32/mmu_context.c | 10 ++--- arch/powerpc/platforms/pasemi/dma_lib.c| 45 +- arch/powerpc/platforms/powernv/pci-sriov.c | 12 ++ 3 files ch

Re: [PATCH v6 4/4] PCI: layerscape: Add suspend/resume for ls1043a

2023-12-11 Thread Frank Li
On Mon, Dec 04, 2023 at 11:08:29AM -0500, Frank Li wrote: > Add suspend/resume support for Layerscape LS1043a. > > In the suspend path, PME_Turn_Off message is sent to the endpoint to > transition the link to L2/L3_Ready state. In this SoC, there is no way to > check if the controller has received

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

2023-12-11 Thread Christoph Hellwig
Looks good: Reviewed-by: Christoph Hellwig

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

2023-12-11 Thread Christoph Hellwig
> obj-$(CONFIG_TEST_FPU) += test_fpu.o > -CFLAGS_test_fpu.o += $(FPU_CFLAGS) > +test_fpu-y := test_fpu_glue.o test_fpu_impl.o > +CFLAGS_test_fpu_impl.o += $(FPU_CFLAGS) Btw, I really wonder if having a modname-fpu += foo.o syntax in kbuild wouldn't be preferable to this. Of coure that requires

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 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 Christoph Hellwig
> +#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); > +void kernel_fpu_end(void); > + > +#endif I'll assum

Re: [RFC PATCH 08/12] x86: Implement ARCH_HAS_KERNEL_FPU_SUPPORT

2023-12-11 Thread Christoph Hellwig
Looks good: Reviewed-by: Christoph Hellwig

Re: [RFC PATCH 07/12] powerpc: Implement ARCH_HAS_KERNEL_FPU_SUPPORT

2023-12-11 Thread Christoph Hellwig
On Thu, Dec 07, 2023 at 09:54:37PM -0800, Samuel Holland wrote: > 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 CFLAG

Re: [RFC PATCH 06/12] LoongArch: Implement ARCH_HAS_KERNEL_FPU_SUPPORT

2023-12-11 Thread Christoph Hellwig
On Thu, Dec 07, 2023 at 09:54:36PM -0800, 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_available() and export > the CFLAGS adjustments. Looks good: Reviewed-by: Christoph Hellwig

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

2023-12-11 Thread Christoph Hellwig
> +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 compiler flags to remove? Don't gcc/clang options work so

Re: [RFC PATCH 04/12] arm64: Implement ARCH_HAS_KERNEL_FPU_SUPPORT

2023-12-11 Thread Christoph Hellwig
> + * linux/arch/arm64/include/asm/fpu.h Same comment as for arm here. Except for that: Reviewed-by: Christoph Hellwig

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

2023-12-11 Thread Christoph Hellwig
On Thu, Dec 07, 2023 at 09:54:33PM -0800, Samuel Holland wrote: > Now that CC_FLAGS_FPU is exported and can be used anywhere in the source > tree, use it instead of duplicating the flags here. Looks good: Reviewed-by: Christoph Hellwig

Re: [RFC PATCH 02/12] ARM: Implement ARCH_HAS_KERNEL_FPU_SUPPORT

2023-12-11 Thread Christoph Hellwig
> --- /dev/null > +++ b/arch/arm/include/asm/fpu.h > @@ -0,0 +1,17 @@ > +/* SPDX-License-Identifier: GPL-2.0-only */ > +/* > + * linux/arch/arm/include/asm/fpu.h Please don't add the file name to top of the file comments. It serves no purpose and easily gets out of date. Except for that: Review

Re: [RFC PATCH 01/12] arch: Add ARCH_HAS_KERNEL_FPU_SUPPORT

2023-12-11 Thread Christoph Hellwig
Looks good: Reviewed-by: Christoph Hellwig

[PATCH AUTOSEL 6.6 15/47] ASoC: fsl_xcvr: refine the requested phy clock frequency

2023-12-11 Thread Sasha Levin
From: Shengjiu Wang [ Upstream commit 347ecf29a68cc8958fbcbd26ef410d07fe9d82f4 ] As the input phy clock frequency will divided by 2 by default on i.MX8MP with the implementation of clk-imx8mp-audiomix driver, So the requested frequency need to be updated. The relation of phy clock is: sai_p

[PATCH AUTOSEL 6.6 12/47] ASoC: fsl_xcvr: Enable 2 * TX bit clock for spdif only case

2023-12-11 Thread Sasha Levin
From: Shengjiu Wang [ Upstream commit c33fd110424dfcb544cf55a1b312f43fe1918235 ] The bit 10 in TX_DPTH_CTRL register controls the TX clock rate. If this bit is set, TX datapath clock should be = 2* TX bit rate. If this bit is not set, TX datapath clock should be 10* TX bit rate. As the spdif on

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

2023-12-11 Thread Michael Ellerman
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 depend on that symbol instead > of the existing list of architectures. It can also take advantage of

Re: [PATCH 1/2] powerpc/locking: implement this_cpu_cmpxchg local API

2023-12-11 Thread Michael Ellerman
Hi Luming Yu, Luming Yu writes: > ppc appears to have already supported cmpxchg-local atomic semantics > that is defined by the kernel convention of the feature. > Add this_cpu_cmpxchg ppc local for the performance benefit of arch > sepcific implementation than asm-generic c verison of the lockin

Re: [PATCH v4 0/5] powerpc/smp: Topology and shared processor optimizations

2023-12-11 Thread Michael Ellerman
Srikar Dronamraju writes: > * Srikar Dronamraju [2023-11-09 11:19:28]: > > Hi Michael, > >> PowerVM systems configured in shared processors mode have some unique >> challenges. Some device-tree properties will be missing on a shared >> processor. Hence some sched domains may not make sense for sh

Re: [PATCH 1/1] powerpc/debug: implement HAVE_USER_RETURN_NOTIFIER

2023-12-11 Thread Michael Ellerman
Luming Yu writes: > The support for user return notifier infrastructure > is hooked into powerpc architecture. > --- > arch/powerpc/Kconfig| 1 + > arch/powerpc/include/asm/entry-common.h | 16 > arch/powerpc/include/asm/thread_info.h | 2 ++ > arch/powerp

[PATCH v14 6/6] powerpc: add crash memory hotplug support

2023-12-11 Thread Sourabh Jain
Extend the arch crash hotplug handler, as introduced by the patch title ("powerpc: add crash CPU hotplug support"), to also support memory add/remove events. Elfcorehdr describes the memory of the crash kernel to capture the kernel; hence, it needs to be updated if memory resources change due to m

[PATCH v14 5/6] powerpc: add crash CPU hotplug support

2023-12-11 Thread Sourabh Jain
Due to CPU/Memory hotplug or online/offline events the elfcorehdr (which describes the CPUs and memory of the crashed kernel) and FDT (Flattened Device Tree) of kdump image becomes outdated. Consequently, attempting dump collection with an outdated elfcorehdr or FDT can lead to failed or inaccurate

[PATCH v14 3/6] crash: add a new kexec flag for FDT update

2023-12-11 Thread Sourabh Jain
The commit a72bbec70da2 ("crash: hotplug support for kexec_load()") introduced a new kexec flag, `KEXEC_UPDATE_ELFCOREHDR`. Kexec tool uses this flag to indicate kernel that it is safe to modify the elfcorehdr of kdump image loaded using kexec_load system call. Similarly, add a new kexec flag, `KE

[PATCH v14 0/6] powerpc/crash: Kernel handling of CPU and memory hotplug

2023-12-11 Thread Sourabh Jain
Commit 247262756121 ("crash: add generic infrastructure for crash hotplug support") added a generic infrastructure that allows architectures to selectively update the kdump image component during CPU or memory add/remove events within the kernel itself. This patch series adds crash hotplug handler

[PATCH v14 4/6] powerpc/kexec: turn some static helper functions public

2023-12-11 Thread Sourabh Jain
Move the functions update_cpus_node and get_crash_memory_ranges from kexec/file_load_64.c to kexec/core_64.c to make these functions usable by other kexec components. get_crash_memory_ranges uses functions defined in ranges.c, so take ranges.c out of CONFIG_KEXEC_FILE. Later in the series, these

[PATCH v14 1/6] crash: forward memory_notify arg to arch crash hotplug handler

2023-12-11 Thread Sourabh Jain
In the event of memory hotplug or online/offline events, the crash memory hotplug notifier `crash_memhp_notifier()` receives a `memory_notify` object but doesn't forward that object to the generic and architecture-specific crash hotplug handler. The `memory_notify` object contains the starting PFN

[PATCH v14 2/6] crash: make CPU and Memory hotplug support reporting flexible

2023-12-11 Thread Sourabh Jain
Architectures' specific functions `arch_crash_hotplug_cpu_support()` and `arch_crash_hotplug_memory_support()` advertise the kernel's capability to update the kdump image on CPU and Memory hotplug events to userspace via the sysfs interface. These architecture-specific functions need to access vari