Re: [PATCH RFC] powerpc: Panic on jump label code patching failure

2025-09-05 Thread IBM
Andrew Donnellan writes: > If patch_branch() or patch_instruction() fails while updating a jump > label, we presently fail silently, leading to unpredictable behaviour > later on. > > Change arch_jump_label_transform() to panic on a code patching failure, > matching the existing behaviour of arch

Re: [PATCH] powerpc/32: Remove PAGE_KERNEL_TEXT to fix startup failure

2025-09-05 Thread Christophe Leroy
Le 05/09/2025 à 08:57, Andrew Donnellan a écrit : On Thu, 2025-09-04 at 18:33 +0200, Christophe Leroy wrote: PAGE_KERNEL_TEXT is an old macro that is used to tell kernel whether kernel text has to be mapped read-only or read-write based on build time options. But nowadays, with functionnalit

[PATCH 5/7] powerpc/mm: support nested lazy_mmu sections

2025-09-05 Thread Kevin Brodsky
The lazy_mmu API now allows nested sections to be handled by arch code: enter() can return a flag if called inside another lazy_mmu section, so that the matching call to leave() leaves any optimisation enabled. This patch implements that new logic for powerpc: if there is an active batch, then ent

Re: [PATCH v4 03/16] dma-debug: refactor to use physical addresses for page mapping

2025-09-05 Thread Marek Szyprowski
On 19.08.2025 19:36, Leon Romanovsky wrote: > From: Leon Romanovsky > > Convert the DMA debug infrastructure from page-based to physical address-based > mapping as a preparation to rely on physical address for DMA mapping routines. > > The refactoring renames debug_dma_map_page() to debug_dma_map_

Re: [PATCH v5 2/6] ACPI: processor: thermal: Use scope-based cleanup helper

2025-09-05 Thread Rafael J. Wysocki
On Fri, Sep 5, 2025 at 3:24 PM Zihuan Zhang wrote: > > Replace the manual cpufreq_cpu_put() with __free(put_cpufreq_policy) > annotation for policy references. This reduces the risk of reference > counting mistakes and aligns the code with the latest kernel style. > > No functional change intended

Re: [PATCH v5 6/6] PM: EM: Use scope-based cleanup helper

2025-09-05 Thread Rafael J. Wysocki
On Fri, Sep 5, 2025 at 3:25 PM Zihuan Zhang wrote: > > Replace the manual cpufreq_cpu_put() with __free(put_cpufreq_policy) > annotation for policy references. This reduces the risk of reference > counting mistakes and aligns the code with the latest kernel style. > > No functional change intended

Re: [PATCH v5 4/6] PM / devfreq: Use scope-based cleanup helper

2025-09-05 Thread Rafael J. Wysocki
On Fri, Sep 5, 2025 at 3:25 PM Zihuan Zhang wrote: > > Replace the manual cpufreq_cpu_put() with __free(put_cpufreq_policy) > annotation for policy references. This reduces the risk of reference > counting mistakes and aligns the code with the latest kernel style. > > No functional change intended

Re: [PATCH 7/7] mm: update lazy_mmu documentation

2025-09-05 Thread Mike Rapoport
On Thu, Sep 04, 2025 at 01:57:36PM +0100, Kevin Brodsky wrote: > We now support nested lazy_mmu sections on all architectures > implementing the API. Update the API comment accordingly. > > Signed-off-by: Kevin Brodsky Acked-by: Mike Rapoport (Microsoft) > --- > include/linux/pgtable.h | 14 +

Re: [PATCH 4/7] x86/xen: support nested lazy_mmu sections (again)

2025-09-05 Thread Alexander Gordeev
On Thu, Sep 04, 2025 at 01:57:33PM +0100, Kevin Brodsky wrote: ... > -static void xen_enter_lazy_mmu(void) > +static lazy_mmu_state_t xen_enter_lazy_mmu(void) > { > + if (this_cpu_read(xen_lazy_mode) == XEN_LAZY_MMU) > + return LAZY_MMU_NESTED; > + > enter_lazy(XEN_LAZY_MMU);

Re: [PATCH v4 00/16] dma-mapping: migrate to physical address-based API

2025-09-05 Thread Jason Gunthorpe
On Fri, Sep 05, 2025 at 06:20:51PM +0200, Marek Szyprowski wrote: > I've checked the most advertised use case in > https://git.kernel.org/pub/scm/linux/kernel/git/leon/linux-rdma.git/log/?h=dmabuf-vfio > and I still don't see the reason why it cannot be based > on dma_map_resource() API? I'm awa

Re: [PATCH v4 08/10] thermal: imx: Use scope-based cleanup helper

2025-09-05 Thread Jonathan Cameron
On Wed, 3 Sep 2025 21:17:31 +0800 Zihuan Zhang wrote: > Replace the manual cpufreq_cpu_put() with __free(put_cpufreq_policy) > annotation for policy references. This reduces the risk of reference > counting mistakes and aligns the code with the latest kernel style. > > No functional change inte

Re: [PATCH v3 3/7] x86: Stop calling page_address() in free_pages()

2025-09-05 Thread Vishal Moola (Oracle)
On Thu, Sep 04, 2025 at 02:54:24PM +0300, Mike Rapoport wrote: > On Thu, Sep 04, 2025 at 02:51:14PM +0300, Mike Rapoport wrote: > > On Wed, Sep 03, 2025 at 11:59:17AM -0700, Vishal Moola (Oracle) wrote: > > > free_pages() should be used when we only have a virtual address. We > > > should call __fr

Re: [PATCH v5 0/6] cpufreq: use __free() for all cpufreq_cpu_get() references

2025-09-05 Thread Borislav Petkov
On Fri, Sep 05, 2025 at 09:24:07PM +0800, Zihuan Zhang wrote: > This patchset converts all remaining cpufreq users to rely on the > __free(put_cpufreq_policy) annotation for policy references, instead of > calling cpufreq_cpu_put() manually. Sep 01 Zihuan Zhang ( :8.6K|) [PATCH v3 00/12] cpufreq:

Re: [PATCH v5 07/16] dma-mapping: convert dma_direct_*map_page to be phys_addr_t based

2025-09-05 Thread Marek Szyprowski
On 02.09.2025 16:48, Leon Romanovsky wrote: > From: Leon Romanovsky > > Convert the DMA direct mapping functions to accept physical addresses > directly instead of page+offset parameters. The functions were already > operating on physical addresses internally, so this change eliminates > the redun

Re: [PATCH v5 07/16] dma-mapping: convert dma_direct_*map_page to be phys_addr_t based

2025-09-05 Thread Leon Romanovsky
On Fri, Sep 05, 2025 at 06:21:44PM +0200, Marek Szyprowski wrote: > On 02.09.2025 16:48, Leon Romanovsky wrote: > > From: Leon Romanovsky > > > > Convert the DMA direct mapping functions to accept physical addresses > > directly instead of page+offset parameters. The functions were already > > ope

Re: [PATCH v4 00/16] dma-mapping: migrate to physical address-based API

2025-09-05 Thread Marek Szyprowski
On 29.08.2025 15:16, Jason Gunthorpe wrote: > On Tue, Aug 19, 2025 at 08:36:44PM +0300, Leon Romanovsky wrote: > >> This series does the core code and modern flows. A followup series >> will give the same treatment to the legacy dma_ops implementation. > I took a quick check over this to see that i

Re: [PATCH v4 08/10] thermal: imx: Use scope-based cleanup helper

2025-09-05 Thread Zihuan Zhang
在 2025/9/5 18:05, Jonathan Cameron 写道: This radically changes the lifetime of the reference to policy. If that is valid, then I'd expect a lot more description of why! Thanks for your comment. Initially I thought policy was only used within this function, so I moved it here. After your fee

Re: [PATCH 5/7] powerpc/mm: support nested lazy_mmu sections

2025-09-05 Thread Alexander Gordeev
On Thu, Sep 04, 2025 at 01:57:34PM +0100, Kevin Brodsky wrote: ... > static inline lazy_mmu_state_t arch_enter_lazy_mmu_mode(void) > { > struct ppc64_tlb_batch *batch; > + int lazy_mmu_nested; > > if (radix_enabled()) > return LAZY_MMU_DEFAULT; > @@ -39,9 +40,14 @@

[PATCH v5 5/6] drm/i915: Use scope-based cleanup helper

2025-09-05 Thread Zihuan Zhang
Replace the manual cpufreq_cpu_put() with __free(put_cpufreq_policy) annotation for policy references. This reduces the risk of reference counting mistakes and aligns the code with the latest kernel style. No functional change intended. Signed-off-by: Zihuan Zhang Reviewed-by: Jonathan Cameron

Re: [PATCH 2/7] mm: introduce local state for lazy_mmu sections

2025-09-05 Thread Kevin Brodsky
On 05/09/2025 13:37, Lorenzo Stoakes wrote: > On Fri, Sep 05, 2025 at 12:21:40PM +0100, Lorenzo Stoakes wrote: >> You should really base on mm-new. >> >> You need to account for everything that is potentially going to go >> upstream. mm-stable is generally not actually populated all too well until

Re: [PATCH] tty: remove redundant condition checks

2025-09-05 Thread Christophe Leroy
Le 05/09/2025 à 11:13, Xichao Zhao a écrit : Remove redundant condition checks and replace else if with else. Signed-off-by: Xichao Zhao Reviewed-by: Christophe Leroy --- drivers/tty/hvc/hvc_console.c | 2 +- drivers/tty/serial/msm_serial.c | 2 +- 2 files changed, 2 insertions(+)

Re: [PATCH] powerpc/32: Remove PAGE_KERNEL_TEXT to fix startup failure

2025-09-05 Thread Erhard Furtner
On 9/4/25 18:33, Christophe Leroy wrote: PAGE_KERNEL_TEXT is an old macro that is used to tell kernel whether kernel text has to be mapped read-only or read-write based on build time options. But nowadays, with functionnalities like jump_labels, static links, etc ... more only less all kernels n

[PATCH v5 6/6] PM: EM: Use scope-based cleanup helper

2025-09-05 Thread Zihuan Zhang
Replace the manual cpufreq_cpu_put() with __free(put_cpufreq_policy) annotation for policy references. This reduces the risk of reference counting mistakes and aligns the code with the latest kernel style. No functional change intended. Signed-off-by: Zihuan Zhang --- kernel/power/energy_model.

[PATCH v5 4/6] PM / devfreq: Use scope-based cleanup helper

2025-09-05 Thread Zihuan Zhang
Replace the manual cpufreq_cpu_put() with __free(put_cpufreq_policy) annotation for policy references. This reduces the risk of reference counting mistakes and aligns the code with the latest kernel style. No functional change intended. Signed-off-by: Zihuan Zhang --- drivers/devfreq/governor_p

[PATCH v5 2/6] ACPI: processor: thermal: Use scope-based cleanup helper

2025-09-05 Thread Zihuan Zhang
Replace the manual cpufreq_cpu_put() with __free(put_cpufreq_policy) annotation for policy references. This reduces the risk of reference counting mistakes and aligns the code with the latest kernel style. No functional change intended. Signed-off-by: Zihuan Zhang --- drivers/acpi/processor_the

Re: [PATCH v4 03/10] cpufreq: intel_pstate: Use scope-based cleanup helper

2025-09-05 Thread Rafael J. Wysocki
On Wed, Sep 3, 2025 at 3:18 PM Zihuan Zhang wrote: > > Replace the manual cpufreq_cpu_put() with __free(put_cpufreq_policy) > annotation for policy references. This reduces the risk of reference > counting mistakes and aligns the code with the latest kernel style. > > No functional change intended

Re: [PATCH 0/7] Nesting support for lazy MMU mode

2025-09-05 Thread Kevin Brodsky
On 05/09/2025 11:46, Alexander Gordeev wrote: > On Thu, Sep 04, 2025 at 01:57:29PM +0100, Kevin Brodsky wrote: > > Hi Kevin, > >> When the lazy MMU mode was introduced eons ago, it wasn't made clear >> whether such a sequence was legal: >> >> arch_enter_lazy_mmu_mode() >> ... >>

Re: [PATCH 2/7] mm: introduce local state for lazy_mmu sections

2025-09-05 Thread Lorenzo Stoakes
On Fri, Sep 05, 2025 at 12:14:39AM +0200, Kevin Brodsky wrote: > On 04/09/2025 19:28, Lorenzo Stoakes wrote: > > Hi Kevin, > > > > This is causing a build failure: > > > > In file included from ./include/linux/mm.h:31, > > from mm/userfaultfd.c:8: > > mm/userfaultfd.c: In function

Re: [PATCH 2/7] mm: introduce local state for lazy_mmu sections

2025-09-05 Thread Lorenzo Stoakes
On Fri, Sep 05, 2025 at 12:21:40PM +0100, Lorenzo Stoakes wrote: > You should really base on mm-new. > > You need to account for everything that is potentially going to go > upstream. mm-stable is generally not actually populated all too well until > shortly before merge window anyway. Just to not

Re: [PATCH v4 06/10] drm/i915: Use scope-based cleanup helper

2025-09-05 Thread Jonathan Cameron
On Wed, 3 Sep 2025 21:17:29 +0800 Zihuan Zhang wrote: > Replace the manual cpufreq_cpu_put() with __free(put_cpufreq_policy) > annotation for policy references. This reduces the risk of reference > counting mistakes and aligns the code with the latest kernel style. > > No functional change inte

Re: [PATCH 2/7] mm: introduce local state for lazy_mmu sections

2025-09-05 Thread Mike Rapoport
On Thu, Sep 04, 2025 at 01:57:31PM +0100, Kevin Brodsky wrote: > arch_{enter,leave}_lazy_mmu_mode() currently have a stateless API > (taking and returning no value). This is proving problematic in > situations where leave() needs to restore some context back to its > original state (before enter()

Re: [PATCH 1/7] mm: remove arch_flush_lazy_mmu_mode()

2025-09-05 Thread Mike Rapoport
On Thu, Sep 04, 2025 at 01:57:30PM +0100, Kevin Brodsky wrote: > This function has only ever been used in arch/x86, so there is no > need for other architectures to implement it. Remove it from > linux/pgtable.h and all architectures besides x86. > > The arm64 implementation is not empty but it is

Re: [PATCH v4 05/10] PM / devfreq: Use scope-based cleanup helper

2025-09-05 Thread Jonathan Cameron
On Wed, 3 Sep 2025 21:17:28 +0800 Zihuan Zhang wrote: > Replace the manual cpufreq_cpu_put() with __free(put_cpufreq_policy) > annotation for policy references. This reduces the risk of reference > counting mistakes and aligns the code with the latest kernel style. > > No functional change inte

Re: [PATCH 0/7] Nesting support for lazy MMU mode

2025-09-05 Thread Alexander Gordeev
On Thu, Sep 04, 2025 at 01:57:29PM +0100, Kevin Brodsky wrote: Hi Kevin, > When the lazy MMU mode was introduced eons ago, it wasn't made clear > whether such a sequence was legal: > > arch_enter_lazy_mmu_mode() > ... > arch_enter_lazy_mmu_mode() > ... >

Re: [PATCH v4 01/10] arm64: topology: Use scope-based cleanup helper

2025-09-05 Thread Jonathan Cameron
On Wed, 3 Sep 2025 21:17:24 +0800 Zihuan Zhang wrote: > Replace the manual cpufreq_cpu_put() with __free(put_cpufreq_policy) > annotation for policy references. This reduces the risk of reference > counting mistakes and aligns the code with the latest kernel style. > > No functional change inte

Re: [PATCH v4 02/10] ACPI: processor: thermal: Use scope-based cleanup helper

2025-09-05 Thread Jonathan Cameron
On Wed, 3 Sep 2025 15:23:31 +0200 "Rafael J. Wysocki" wrote: > On Wed, Sep 3, 2025 at 3:18 PM Zihuan Zhang wrote: > > > > Replace the manual cpufreq_cpu_put() with __free(put_cpufreq_policy) > > annotation for policy references. This reduces the risk of reference > > counting mistakes and aligns

[PATCH] tty: remove redundant condition checks

2025-09-05 Thread Xichao Zhao
Remove redundant condition checks and replace else if with else. Signed-off-by: Xichao Zhao --- drivers/tty/hvc/hvc_console.c | 2 +- drivers/tty/serial/msm_serial.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/tty/hvc/hvc_console.c b/drivers/tty/hvc/hvc_conso

Re: [PATCH v4 09/10] thermal/drivers/ti-soc-thermal: Use scope-based cleanup helper

2025-09-05 Thread Zihuan Zhang
在 2025/9/5 14:57, Andreas Kemnade 写道: Am Wed, 3 Sep 2025 21:17:32 +0800 schrieb Zihuan Zhang : Replace the manual cpufreq_cpu_put() with __free(put_cpufreq_policy) annotation for policy references. This reduces the risk of reference counting mistakes and aligns the code with the latest kerne

Re: [PATCH v4 07/10] powercap: dtpm_cpu: Use scope-based cleanup helper

2025-09-05 Thread Zihuan Zhang
在 2025/9/4 21:17, Rafael J. Wysocki 写道: On Thu, Sep 4, 2025 at 12:38 PM Zihuan Zhang wrote: 在 2025/9/3 21:45, Rafael J. Wysocki 写道: On Wed, Sep 3, 2025 at 3:18 PM Zihuan Zhang wrote: Replace the manual cpufreq_cpu_put() with __free(put_cpufreq_policy) annotation for policy references. Thi

Re: [PATCH v4 09/10] thermal/drivers/ti-soc-thermal: Use scope-based cleanup helper

2025-09-05 Thread Krzysztof Kozlowski
On 05/09/2025 08:57, Andreas Kemnade wrote: > Am Wed, 3 Sep 2025 21:17:32 +0800 > schrieb Zihuan Zhang : > >> Replace the manual cpufreq_cpu_put() with __free(put_cpufreq_policy) >> annotation for policy references. This reduces the risk of reference >> counting mistakes and aligns the code with

Re: [PATCH] powerpc/32: Remove PAGE_KERNEL_TEXT to fix startup failure

2025-09-05 Thread Andrew Donnellan
On Thu, 2025-09-04 at 18:33 +0200, Christophe Leroy wrote: > PAGE_KERNEL_TEXT is an old macro that is used to tell kernel whether > kernel text has to be mapped read-only or read-write based on build > time options. > > But nowadays, with functionnalities like jump_labels, static links, > etc ...

[PATCH v2 net-next 2/3] ptp: netc: add the periodic output signal loopback support

2025-09-05 Thread Wei Fang
The NETC Timer supports looping back the output pulse signal of Fiper-n into Trigger-n input, so that users can leverage this feature to validate some other features without external hardware support. For example, users can use it to test external trigger stamp (EXTTS). And users can combine EXTTS