Re: [PATCH v2 1/2] powerpc: Add preempt lazy support

2024-12-08 Thread Luming Yu
On Mon, Dec 02, 2024 at 12:58:59AM +0530, Shrikanth Hegde wrote: > > > On 11/26/24 16:23, Christophe Leroy wrote: > > > > > > Le 16/11/2024 à 20:23, Shrikanth Hegde a écrit : > > > Define preempt lazy bit for Powerpc. Use bit 9 which is free and within > > > 16 bit range of NEED_RESCHED, so com

Re: [PATCH treewide 10/11] ARM: dts: nxp: imx: Switch to {hp,mic}-det-gpios

2024-12-08 Thread Shawn Guo
On Fri, Sep 27, 2024 at 02:42:25PM +0200, Geert Uytterhoeven wrote: > Replace the deprecated "hp-det-gpio" and "mic-det-gpio" properties by > "hp-det-gpios" resp. "mic-det-gpios" in Freescale Generic ASoC Sound > Card device nodes. > > Signed-off-by: Geert Uytterhoeven Applied, thanks!

[PATCH v13 0/5]arm64: add ARCH_HAS_COPY_MC support

2024-12-08 Thread Tong Tiangen
Problem = With the increase of memory capacity and density, the probability of memory error also increases. The increasing size and density of server RAM in data centers and clouds have shown increased uncorrectable memory errors. Currently, more and more scenarios that can tolerate memory

[PATCH v13 4/5] arm64: support copy_mc_[user]_highpage()

2024-12-08 Thread Tong Tiangen
Currently, many scenarios that can tolerate memory errors when copying page have been supported in the kernel[1~5], all of which are implemented by copy_mc_[user]_highpage(). arm64 should also support this mechanism. Due to mte, arm64 needs to have its own copy_mc_[user]_highpage() architecture im

[PATCH v13 1/5] uaccess: add generic fallback version of copy_mc_to_user()

2024-12-08 Thread Tong Tiangen
x86/powerpc has it's implementation of copy_mc_to_user(), we add generic fallback in include/linux/uaccess.h prepare for other architechures to enable CONFIG_ARCH_HAS_COPY_MC. Signed-off-by: Tong Tiangen Acked-by: Michael Ellerman Reviewed-by: Mauro Carvalho Chehab Reviewed-by: Jonathan Cameron

[PATCH v13 3/5] mm/hwpoison: return -EFAULT when copy fail in copy_mc_[user]_highpage()

2024-12-08 Thread Tong Tiangen
Currently, copy_mc_[user]_highpage() returns zero on success, or in case of failures, the number of bytes that weren't copied. While tracking the number of not copied works fine for x86 and PPC, There are some difficulties in doing the same thing on ARM64 because there is no available caller-saved

[PATCH v13 5/5] arm64: introduce copy_mc_to_kernel() implementation

2024-12-08 Thread Tong Tiangen
The copy_mc_to_kernel() helper is memory copy implementation that handles source exceptions. It can be used in memory copy scenarios that tolerate hardware memory errors(e.g: pmem_read/dax_copy_to_iter). Currently, only x86 and ppc support this helper, Add this for ARM64 as well, if ARCH_HAS_COPY_

[PATCH v13 2/5] arm64: add support for ARCH_HAS_COPY_MC

2024-12-08 Thread Tong Tiangen
For the arm64 kernel, when it processes hardware memory errors for synchronize notifications(do_sea()), if the errors is consumed within the kernel, the current processing is panic. However, it is not optimal. Take copy_from/to_user for example, If ld* triggers a memory error, even in kernel mode,

Re: [PATCH] futex: improve user space accesses

2024-12-08 Thread Linus Torvalds
On Sun, 8 Dec 2024 at 14:54, Andreas Schwab wrote: > > This breaks userspace on ppc32. As soon as /init in the initrd is > started the kernel hangs (without any messages). Funky, funky. Most of the diff is the code movement (and some small x86-specific stuff), so for ppc, the only part that shou

Re: [PATCH] futex: improve user space accesses

2024-12-08 Thread Andreas Schwab
On Nov 22 2024, Linus Torvalds wrote: > Josh Poimboeuf reports that he got a "will-it-scale.per_process_ops 1.9% > improvement" report for his patch that changed __get_user() to use > pointer masking instead of the explicit speculation barrier. However, > that patch doesn't actually work in the g