Re: [PATCH v2 0/3] powerpc: Cleanup and convert to MSI parent domain

2025-09-06 Thread Madhavan Srinivasan
On 9/3/25 7:37 PM, Thomas Gleixner wrote: > On Mon, Aug 11 2025 at 11:28, Nam Cao wrote: > >> The initial implementation of PCI/MSI interrupt domains in the hierarchical >> interrupt domain model used a shortcut by providing a global PCI/MSI >> domain. >> >> This works because the PCI/MSI[X] ha

Re: [PATCH v4 7/9] powerpc/pseries: Enable HVPIPE event message interrupt

2025-09-06 Thread Haren Myneni
On Sat, 2025-09-06 at 15:46 +0530, Madhavan Srinivasan wrote: > > > On 8/30/25 11:33 AM, Haren Myneni wrote: > > The hypervisor signals the OS via a Hypervisor Pipe Event external > > interrupt when data is available to be received from the pipe. > > Then the OS  should call RTAS check-exception

Re: [PATCH 0/2] powerpc: Fix integer underflow & leak

2025-09-06 Thread Madhavan Srinivasan
On Mon, 04 Aug 2025 12:07:26 +0200, Nam Cao wrote: > This series fixes integer overflow & leak problem. I noticed this problem > when Gautam reported a kernel bug with another patch series of mine: > https://lore.kernel.org/linuxppc-dev/ah9na8zqri0jp...@li-c6426e4c-27cf-11b2-a85c-95d65bc0de0e.ibm.c

Re: [PATCH v2] powerpc/qspinlock: Add spinlock contention tracepoint

2025-09-06 Thread Madhavan Srinivasan
On Thu, 31 Jul 2025 11:48:53 +0530, Nysal Jan K.A. wrote: > Add a lock contention tracepoint in the queued spinlock slowpath. > Also add the __lockfunc annotation so that in_lock_functions() > works as expected. > > Applied to powerpc/next. [1/1] powerpc/qspinlock: Add spinlock contention trace

Re: [PATCH] powerpc/xmon: replace sizeof calculations with ARRAY_SIZE macro

2025-09-06 Thread Madhavan Srinivasan
On Sat, 19 Jul 2025 23:43:10 +0100, Ruben Wauters wrote: > The calculations for operand/opcode/macro numbers are done in an > identical manner to the already existing ARRAY_SIZE macro in > linux/array_size.h > > This patch replaces the sizeof calculations with the macro to make the > code cleaner

Re: [PATCH v3 0/2] powerpc: Replace __ASSEMBLY__ with __ASSEMBLER__ in header files

2025-09-06 Thread Madhavan Srinivasan
On Fri, 01 Aug 2025 10:20:05 +0200, Thomas Huth wrote: > The kernel Makefiles define the __ASSEMBLY__ macro to provide > a way to use headers in both, assembly and C source code. This is bad > since macros starting with two underscores are names that are reserved > by the C language. > Additionally

Re: [PATCH v2] kbuild: Add missing $(objtree) prefix to powerpc crtsavres.o artifact

2025-09-06 Thread Madhavan Srinivasan
On Tue, 18 Feb 2025 15:26:39 -0500, Kienan Stewart wrote: > In the upstream commit 214c0eea43b2ea66bcd6467ea57e47ce8874191b > ("kbuild: add $(objtree)/ prefix to some in-kernel build artifacts") > artifacts required for building out-of-tree kernel modules had > $(objtree) prepended to them to prepa

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

2025-09-06 Thread Christophe Leroy
Le 06/09/2025 à 05:52, Ritesh Harjani a écrit : [Vous ne recevez pas souvent de courriers de rite...@linux.ibm.com. Découvrez pourquoi ceci est important à https://aka.ms/LearnAboutSenderIdentification ] Andrew Donnellan writes: If patch_branch() or patch_instruction() fails while updatin

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

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 @@

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

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

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 ...

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

2025-09-04 Thread Christophe Leroy
Le 05/09/2025 à 08:11, Andrew Donnellan a écrit : 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

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

2025-09-04 Thread Christophe Leroy
Le 05/09/2025 à 05:55, Ritesh Harjani a écrit : Christophe Leroy writes: 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

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

2025-09-04 Thread Kevin Brodsky
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 ‘move_present_ptes’: > ./include/linux/pgtable.h:247:41: error: statement with

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

2025-09-04 Thread Yeoreum Yun
Hi Kevin, [...] > Signed-off-by: Kevin Brodsky > --- > arch/arm64/include/asm/pgtable.h | 10 +++--- > .../include/asm/book3s/64/tlbflush-hash.h | 9 ++--- > arch/powerpc/mm/book3s64/hash_tlb.c | 10 ++ > arch/powerpc/mm/book3s64/subpage_prot.c |

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

2025-09-04 Thread Vladimir Oltean
On Wed, Sep 03, 2025 at 04:37:48PM +0800, Wei Fang wrote: > 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

Re: [PATCH] PCI/AER: Print TLP Log for errors introduced since PCIe r1.1

2025-09-04 Thread Lukas Wunner
On Mon, Sep 01, 2025 at 09:44:52AM +0200, Lukas Wunner wrote: > +++ b/include/uapi/linux/pci_regs.h > @@ -776,6 +776,13 @@ > #define PCI_ERR_UNC_MCBTLP 0x0080 /* MC blocked TLP */ > #define PCI_ERR_UNC_ATOMEG 0x0100 /* Atomic egress blocked */ > #define PCI_ERR_UNC_TLPPRE

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

2025-09-04 Thread Krzysztof Kozlowski
On 04/09/2025 12:37, Zihuan Zhang wrote: >> * Lastly, given that the benefit of cleanup helpers is removal of >> * "goto", and that the "goto" statement can jump between scopes, the >> * expectation is that usage of "goto" and cleanup helpers is never >> * mixed in the same function. I.e. f

Re: Kernel v6.17-rc4 with STATIC_CALL_SELFTEST=y enabled fails to boot at early stage (PowerMac G4 DP)

2025-09-04 Thread Christophe Leroy
Le 04/09/2025 à 10:40, Madhavan Srinivasan a écrit : On 9/4/25 1:01 PM, Christophe Leroy wrote: Hi Erhard, Le 04/09/2025 à 00:44, Erhard Furtner a écrit : Greetings! In a conversation with Andrew about his page table check code for PowerPC he found out there seems to be a general proble

Re: [PATCH bpf-next v2 1/5] powerpc64/bpf: Implement PROBE_MEM32 pseudo instructions

2025-09-04 Thread Hari Bathini
On 29/08/25 10:21 pm, Saket Kumar Bhaskar wrote: Add support for [LDX | STX | ST], PROBE_MEM32, [B | H | W | DW] instructions. They are similar to PROBE_MEM instructions with the following differences: - PROBE_MEM32 supports store. - PROBE_MEM32 relies on the verifier to clear upper 32-bit of

Re: [PATCH net-next 0/3] ptp: add pulse signal loopback support for debugging

2025-09-04 Thread Jakub Kicinski
On Thu, 4 Sep 2025 06:05:02 -0700 Richard Cochran wrote: > On Thu, Sep 04, 2025 at 01:55:43AM +, Wei Fang wrote: > > Vladimir helped explain its purpose in the thread, do you still think > > it is pointless? > > Vladimir gave practical examples for the use case, so no objection > from my sid

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

2025-09-04 Thread Lorenzo Stoakes
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 ‘move_present_ptes’: ./include/linux/pgtable.h:247:41: error: statement with no effect [-Werror=unused-value] 247 | #define arch_ent

Re: Kernel v6.17-rc4 with STATIC_CALL_SELFTEST=y enabled fails to boot at early stage (PowerMac G4 DP)

2025-09-04 Thread Christophe Leroy
Hi Erhard, Le 04/09/2025 à 00:44, Erhard Furtner a écrit : Greetings! In a conversation with Andrew about his page table check code for PowerPC he found out there seems to be a general problem of the code patching code on ppc: > I note that STATIC_CALL_SELFTEST seems to fail, which could b

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

2025-09-04 Thread Zihuan Zhang
在 2025/9/3 21:43, Krzysztof Kozlowski 写道: On 03/09/2025 15:41, Rafael J. Wysocki wrote: em_cpufreq_update_efficiencies(struct device *dev, struct em_perf_state *table) { struct em_perf_domain *pd = dev->em_pd; - struct cpufreq_policy *policy; + struct cpufreq_policy *policy

Re: [patch V2 06/37] rseq: Simplify the event notification

2025-09-04 Thread Mathieu Desnoyers
On 2025-09-02 09:39, Thomas Gleixner wrote: On Mon, Aug 25 2025 at 13:36, Mathieu Desnoyers wrote: On 2025-08-23 12:39, Thomas Gleixner wrote: Since commit 0190e4198e47 ("rseq: Deprecate RSEQ_CS_FLAG_NO_RESTART_ON_* flags") the bits in task::rseq_event_mask are meaningless and just extra work i

Re: [PATCH net-next 1/3] ptp: add debugfs interfaces to loop back the periodic output signal

2025-09-04 Thread Vladimir Oltean
On Wed, Sep 03, 2025 at 04:37:47PM +0800, Wei Fang wrote: > + buf[len] = '\0'; > + cnt = sscanf(buf, "%u %d", &index, &enable); > + if (cnt != 2) > + return -EINVAL; > + > + if (index >= ops->n_per_lp) > + return -EINVAL; > + > + err = ops->perout_loopbac

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

2025-09-04 Thread Mike Rapoport
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 __free_pages() directly on our page instead. > > Signed-off-by: Vishal Moola (Oracle) > Acked-by: Dave Hansen > --- > arch/x86/mm/init_64.c

Re: [PATCH bpf-next v2 5/5] selftests/bpf: Fix arena_spin_lock selftest failure

2025-09-04 Thread Hari Bathini
On 29/08/25 10:21 pm, Saket Kumar Bhaskar wrote: For systems having CONFIG_NR_CPUS set to > 1024 in kernel config the selftest fails as arena_spin_lock_irqsave() returns EOPNOTSUPP. The selftest is skipped incase bpf program returns EOPNOTSUPP, with a descriptive message logged. Signed-off-b

Re: [PATCH bpf-next v2 5/5] selftests/bpf: Fix arena_spin_lock selftest failure

2025-09-04 Thread Saket Kumar Bhaskar
On Thu, Sep 04, 2025 at 01:55:40PM +0530, Saket Kumar Bhaskar wrote: > On Thu, Sep 04, 2025 at 01:39:31PM +0530, Hari Bathini wrote: > > > > > > On 29/08/25 10:21 pm, Saket Kumar Bhaskar wrote: > > > For systems having CONFIG_NR_CPUS set to > 1024 in kernel config > > > the selftest fails as aren

Re: [PATCH v6 0/4] PCI: Add support for resetting the Root Ports in a platform specific way

2025-09-04 Thread Niklas Cassel
Hello Mani, On Fri, Aug 29, 2025 at 09:44:08PM +0530, Manivannan Sadhasivam wrote: > On Fri, Aug 15, 2025 at 11:07:42AM GMT, Niklas Cassel wrote: (snip) > > > > > ## On EP side: > > > > > # echo 0 > > > > > > /sys/kernel/config/pci_ep/controllers/a4000.pcie-ep/start && \ > > > > > sleep 0

Re: [PATCH 02/14] powerpc/vpa_dtl: Add interface to expose vpa dtl counters via perf

2025-09-04 Thread Athira Rajeev
lock(&dtl_global_lock); >> + >> + /* >> + * To ensure there are no other conflicting dtl users >> + * (example: /proc/powerpc/vcpudispatch_stats or debugfs dtl), >> + * below code try to take the dtl_access_lock. >> + * The dtl_access_lock is a rwlock def

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

2025-09-04 Thread Kevin Brodsky
> Might be you can call the arch_leave_lazy_mmu_mode() with LAZY_MMU_DEFAULT > in here since I think kasan_populate_vmalloc_pte() wouldn't be called > nestly. In fact in that case it doesn't matter if the section is nested or not. We're already assuming that lazy_mmu is en

Re: [PATCH] PCI/AER: Print TLP Log for errors introduced since PCIe r1.1

2025-09-04 Thread Bjorn Helgaas
On Thu, Sep 04, 2025 at 08:16:29AM +0200, Lukas Wunner wrote: > On Mon, Sep 01, 2025 at 09:44:52AM +0200, Lukas Wunner wrote: > > +++ b/include/uapi/linux/pci_regs.h > > @@ -776,6 +776,13 @@ > > #define PCI_ERR_UNC_MCBTLP0x0080 /* MC blocked TLP */ > > #define PCI_ERR_UNC_ATOME

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

2025-09-04 Thread 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. This reduces the risk of refere

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

2025-09-04 Thread Zihuan Zhang
在 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. This reduces the risk of reference counting mistakes and aligns the code with the latest kernel sty

Re: Kernel v6.17-rc4 with STATIC_CALL_SELFTEST=y enabled fails to boot at early stage (PowerMac G4 DP)

2025-09-04 Thread Andrew Donnellan
On Thu, 2025-09-04 at 14:33 +0530, Madhavan Srinivasan wrote: > > > I am using qemu with -M mac99 and it boots > > > > > > Hardware name: PowerMac3,1 7400 0xc0209 PowerMac > > > printk: legacy bootconsole [udbg0] enabled > > > - > > > phys_mem_si

Re: Kernel v6.17-rc4 with STATIC_CALL_SELFTEST=y enabled fails to boot at early stage (PowerMac G4 DP)

2025-09-04 Thread Christophe Leroy
Hi Again, Le 04/09/2025 à 09:31, Christophe Leroy a écrit : Hi Erhard, Le 04/09/2025 à 00:44, Erhard Furtner a écrit : Greetings! In a conversation with Andrew about his page table check code for PowerPC he found out there seems to be a general problem of the code patching code on ppc:  >

Re: [PATCH 5.4 only v2] powerpc: boot: Remove leading zero in label in udelay()

2025-09-04 Thread Christophe Leroy
Le 03/09/2025 à 23:11, Nathan Chancellor a écrit : When building powerpc configurations in linux-5.4.y with binutils 2.43 or newer, there is an assembler error in arch/powerpc/boot/util.S: arch/powerpc/boot/util.S: Assembler messages: arch/powerpc/boot/util.S:44: Error: junk at end of l

Re: Kernel v6.17-rc4 with STATIC_CALL_SELFTEST=y enabled fails to boot at early stage (PowerMac G4 DP)

2025-09-04 Thread Madhavan Srinivasan
On 9/4/25 1:01 PM, Christophe Leroy wrote: > Hi Erhard, > > Le 04/09/2025 à 00:44, Erhard Furtner a écrit : >> Greetings! >> >> In a conversation with Andrew about his page table check code for PowerPC he >> found out there seems to be a general problem of the code patching code on >> ppc: >>

Re: [PATCH 1/6] crypto: curve25519 - Remove kpp support

2025-09-04 Thread Geert Uytterhoeven
On Mon, 1 Sept 2025 at 22:29, Eric Biggers wrote: > Currently, Curve25519 has both a library API and a crypto_kpp API. > However, the crypto_kpp API to Curve25519 has no users outside > crypto/testmgr.c. I.e., no non-test code ever passes "curve25519" to > crypto_alloc_kpp(). And the crypto/test

Re: [PATCH v3 5/7] powerpc: Stop calling page_address() in free_pages()

2025-09-04 Thread Christophe Leroy
Le 03/09/2025 à 20:59, Vishal Moola (Oracle) a écrit : free_pages() should be used when we only have a virtual address. We should call __free_pages() directly on our page instead. Signed-off-by: Vishal Moola (Oracle) Reviewed-by: Ritesh Harjani (IBM) Reviewed-by: Christophe Leroy ---

Re: [PATCH] powerpc64/modules: fix ool-ftrace-stub vs. livepatch relocation corruption

2025-09-03 Thread Joe Lawrence
cdata); i++) > - if (WARN_ON(i >= total_stubs)) > - return -1; > - > - if (WARN_ON(i + num_stubs > total_stubs)) > + if (WARN_ON(me->arch.stub_count + num_stubs > total_stubs)) > return -1; > > - stub +

RE: [PATCH net-next 0/3] ptp: add pulse signal loopback support for debugging

2025-09-03 Thread Wei Fang
> On Wed, Sep 03, 2025 at 04:37:46PM +0800, Wei Fang wrote: > > Some PTP devices support looping back the periodic pulse signal for > > debugging, > > What kinds of debugs can be resolved by this loopback feature? > > It seems pointless to me... Vladimir helped explain its purpose in the thread

Re: [PATCH v6 1/2] kasan: introduce ARCH_DEFER_KASAN and unify static key across modes

2025-09-03 Thread IBM
Sabyrzhan Tasbolatov writes: > Introduce CONFIG_ARCH_DEFER_KASAN to identify architectures [1] that need > to defer KASAN initialization until shadow memory is properly set up, > and unify the static key infrastructure across all KASAN modes. > > [1] PowerPC, UML, LoongArch selects ARCH_DEFER_KAS

Re: [PATCH 5.4 only] powerpc: boot: Remove unnecessary zero in label in udelay()

2025-09-03 Thread Segher Boessenkool
Hi! On Wed, Sep 03, 2025 at 02:14:42PM -0700, Nathan Chancellor wrote: > On Wed, Sep 03, 2025 at 01:15:38AM -0500, Segher Boessenkool wrote: > > On Tue, Sep 02, 2025 at 04:52:34PM -0700, Nathan Chancellor wrote: > > > When building powerpc configurations in linux-5.4.y with binutils 2.43 > > > or

Re: [PATCH 5.4 only] powerpc: boot: Remove unnecessary zero in label in udelay()

2025-09-03 Thread Nathan Chancellor
On Wed, Sep 03, 2025 at 01:15:38AM -0500, Segher Boessenkool wrote: > Hi! > > On Tue, Sep 02, 2025 at 04:52:34PM -0700, Nathan Chancellor wrote: > > When building powerpc configurations in linux-5.4.y with binutils 2.43 > > or newer, there is an assembler error in arch/powerpc/boot/util.S: > > >

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

2025-09-03 Thread David Hildenbrand
On 03.09.25 20:59, Vishal Moola (Oracle) wrote: free_pages() should be used when we only have a virtual address. We should call __free_pages() directly on our page instead. Signed-off-by: Vishal Moola (Oracle) --- Acked-by: David Hildenbrand -- Cheers David / dhildenb

Re: [PATCH net-next 0/3] ptp: add pulse signal loopback support for debugging

2025-09-03 Thread Vladimir Oltean
On Wed, Sep 03, 2025 at 06:41:30AM -0700, Richard Cochran wrote: > On Wed, Sep 03, 2025 at 04:37:46PM +0800, Wei Fang wrote: > > Some PTP devices support looping back the periodic pulse signal for > > debugging, > > What kinds of debugs can be resolved by this loopback feature? The commit message

Re: [PATCH v2 0/3] powerpc: Cleanup and convert to MSI parent domain

2025-09-03 Thread Thomas Gleixner
On Mon, Aug 11 2025 at 11:28, Nam Cao wrote: > The initial implementation of PCI/MSI interrupt domains in the hierarchical > interrupt domain model used a shortcut by providing a global PCI/MSI > domain. > > This works because the PCI/MSI[X] hardware is standardized and uniform, but > it violates

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

2025-09-03 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 v4 10/10] PM: EM: Use scope-based cleanup helper

2025-09-03 Thread Krzysztof Kozlowski
On 03/09/2025 15:41, Rafael J. Wysocki wrote: >>> em_cpufreq_update_efficiencies(struct device *dev, struct em_perf_state >>> *table) >>> { >>> struct em_perf_domain *pd = dev->em_pd; >>> - struct cpufreq_policy *policy; >>> + struct cpufreq_policy *policy __free(put_cpufreq_policy

Re: [PATCH net-next 0/3] ptp: add pulse signal loopback support for debugging

2025-09-03 Thread Richard Cochran
On Wed, Sep 03, 2025 at 04:37:46PM +0800, Wei Fang wrote: > Some PTP devices support looping back the periodic pulse signal for > debugging, What kinds of debugs can be resolved by this loopback feature? It seems pointless to me... Thanks, Richard

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

2025-09-03 Thread Rafael J. Wysocki
On Wed, Sep 3, 2025 at 3:22 PM Krzysztof Kozlowski wrote: > > On 03/09/2025 15:17, 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 th

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

2025-09-03 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 v4 10/10] PM: EM: Use scope-based cleanup helper

2025-09-03 Thread Krzysztof Kozlowski
On 03/09/2025 15:17, 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. > > Signe

Re: [PATCH v6 1/2] kasan: introduce ARCH_DEFER_KASAN and unify static key across modes

2025-09-03 Thread Andrey Konovalov
On Sun, Aug 10, 2025 at 2:58 PM Sabyrzhan Tasbolatov wrote: > > Introduce CONFIG_ARCH_DEFER_KASAN to identify architectures [1] that need > to defer KASAN initialization until shadow memory is properly set up, > and unify the static key infrastructure across all KASAN modes. > > [1] PowerPC, UML,

Re: [PATCH v6 1/2] kasan: introduce ARCH_DEFER_KASAN and unify static key across modes

2025-09-03 Thread Andrey Konovalov
On Wed, Sep 3, 2025 at 3:00 PM Andrey Konovalov wrote: > > > +void __kasan_save_free_info(struct kmem_cache *cache, void *object); > > +static inline void kasan_save_free_info(struct kmem_cache *cache, void > > *object) > > +{ > > + if (kasan_enabled()) > > + __kasan_save_free

Re: [PATCH v3 09/12] powercap: dtpm_cpu: Use scope-based cleanup helper

2025-09-03 Thread Rafael J. Wysocki
On Mon, Sep 1, 2025 at 10:58 AM 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 intende

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

2025-09-03 Thread Rafael J. Wysocki
On Mon, Sep 1, 2025 at 10:58 AM 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 intende

Re: [PATCH v3 03/12] cpufreq: intel_pstate: Use scope-based cleanup helper

2025-09-03 Thread Rafael J. Wysocki
On Wed, Sep 3, 2025 at 2:51 AM Zihuan Zhang wrote: > > > 在 2025/9/2 19:47, Rafael J. Wysocki 写道: > > On Tue, Sep 2, 2025 at 12:33 PM Zihuan Zhang wrote: > >> > >> 在 2025/9/1 23:17, Rafael J. Wysocki 写道: > >>> On Mon, Sep 1, 2025 at 10:58 AM Zihuan Zhang > >>> wrote: > Replace the manual cp

Re: [PATCH] powerpc/32: Restore clearing of MSR[RI] in interrupt_exit_kernel_prepare()

2025-09-03 Thread Christophe Leroy
Le 01/09/2025 à 12:37, Christophe Leroy a écrit : Commit 13799748b957 ("powerpc/64: use interrupt restart table to speed up return from interrupt") removed the inconditional clearing of MSR[RI] when returning from interrupt into kernel. But powerpc/32 doesn't implement interrupt restart table

Re: [PATCH v7 2/8] powerpc/smp: Rename cpu_corgroup_* to cpu_corgrp_*

2025-09-03 Thread K Prateek Nayak
Hello Christophe, On 8/26/2025 10:32 AM, Christophe Leroy wrote: > > > Le 26/08/2025 à 06:13, K Prateek Nayak a écrit : >> Rename cpu_corgroup_{map,mask} to cpu_corgrp_{map,mask} to free up the >> cpu_corgroup_* namespace. cpu_corgroup_mask() will be added back in the >> subsequent commit for CO

Re: [PATCH v7 0/8] sched/fair: Get rid of sched_domains_curr_level hack for tl->cpumask()

2025-09-03 Thread Shrikanth Hegde
On 9/1/25 2:28 PM, Peter Zijlstra wrote: On Fri, Aug 29, 2025 at 02:23:06PM +0530, Shrikanth Hegde wrote: I was looking at: https://git.kernel.org/pub/scm/linux/kernel/git/peterz/queue.git/log/?h=sched/core Current code doesn't allow one to enable/disable SCHED_MC on ppc since it is set a

Re: [PATCH] powerpc/pasemi: Add a null pointer check to the pas_setup_mce_regs

2025-09-03 Thread Christophe Leroy
Le 17/01/2024 à 10:17, Kunwu Chan a écrit : kasprintf() returns a pointer to dynamically allocated memory which can be NULL upon failure. Ensure the allocation was successful by checking the pointer validity. Signed-off-by: Kunwu Chan Reviewed-by: Christophe Leroy --- arch/powerpc/pla

Re: [PATCH v7 4/8] powerpc/smp: Introduce CONFIG_SCHED_MC to guard MC scheduling bits

2025-09-03 Thread K Prateek Nayak
On 8/26/2025 2:57 PM, Shrikanth Hegde wrote: >> diff --git a/arch/powerpc/include/asm/smp.h b/arch/powerpc/include/asm/smp.h >> index 86de4d0dd0aa..9a320d96e891 100644 >> --- a/arch/powerpc/include/asm/smp.h >> +++ b/arch/powerpc/include/asm/smp.h >> @@ -148,7 +148,9 @@ static inline const struc

Re: [PATCH v2 3/4] arch: copy_thread: pass clone_flags as u64

2025-09-03 Thread Andreas Larsson
On 2025-09-02 09:15, John Paul Adrian Glaubitz wrote: >> Thanks for this and for the whole series! Needed foundation for a >> sparc32 clone3 implementation as well. > > Can you implement clone3 for sparc64 as well? (heavily pairing down the to list) We'll take a look at that as well. Cheers, An

Re: [PATCH v2 3/4] arch: copy_thread: pass clone_flags as u64

2025-09-03 Thread Geert Uytterhoeven
On Mon, 1 Sept 2025 at 15:10, Simon Schuster via B4 Relay wrote: > From: Simon Schuster > > With the introduction of clone3 in commit 7f192e3cd316 ("fork: add > clone3") the effective bit width of clone_flags on all architectures was > increased from 32-bit to 64-bit, with a new type of u64 for t

Re: [PATCH] powerpc/pasemi: Fix PCI device reference leak on error path

2025-09-03 Thread Markus Elfring
> Fix iob_pdev reference leak in pasemi_dma_init() when dma_pdev > allocation fails. Ensure pci_dev_put(iob_pdev) is called on > both success and error paths. How do you think about to increase the application of scope-based resource management? … > +++ b/arch/powerpc/platforms/pasemi/dma_lib.c

  1   2   3   4   5   6   7   8   9   10   >