[no subject]

2024-04-16 Thread mbland
linux-ker...@vger.kernel.org, linux-arm-ker...@lists.infradead.org, linux-ri...@lists.infradead.org, linuxppc-dev@lists.ozlabs.org, Mark Rutland , Greg Kroah-Hartman , Christoph Hellwig , Christophe Leroy , David Hildenbrand , Conor Dooley From: Maxwell Bland Date: Mon, 15 Apr 2024 15:16:08

[PATCH 3/5] mm: add vaddr param to pmd_populate_kernel

2024-04-16 Thread Maxwell Bland
This patch affords each architecture the ability to condition the population of page middle directory entries on the virtual address being allocated, matching existing PTE infrastructure, easing the necessity of performing a reverse page table walk in cases where the population context is not

Re: [PATCH 5/5] ptdump: add state parameter for non-leaf callback

2024-04-16 Thread Maxwell Bland
> On Tuesday, April 16, 2024 3:11 PM, Andrew Morton wrote: > On Mon, 15 Apr 2024 14:51:32 -0500 Maxwell Bland > wrote: > > > arch/arm64/mm/ptdump.c | 6 -- > > arch/powerpc/mm/ptdump/ptdump.c | 2 ++ > > arch/riscv/mm/ptdump.c | 6 -- > >

[PATCH] powerpc/pseries/iommu: LPAR panics when rebooted with a frozen PE

2024-04-16 Thread Gaurav Batra
At the time of LPAR reboot, partition firmware provides Open Firmware property ibm,dma-window for the PE. This property is provided on the PCI bus the PE is attached to. There are execptions where the partition firmware might not provide this property for the PE at the time of LPAR reboot. One of

Re: [PATCH 5/5] ptdump: add state parameter for non-leaf callback

2024-04-16 Thread Andrew Morton
On Mon, 15 Apr 2024 14:51:32 -0500 Maxwell Bland wrote: > ptdump can now note non-leaf descriptor entries, a useful addition for > debugging table descriptor permissions when working on related code > > Signed-off-by: Maxwell Bland > --- > arch/arm64/mm/ptdump.c | 6 -- >

Re: [RFC PATCH 0/8] Reimplement huge pages without hugepd on powerpc 8xx

2024-04-16 Thread Peter Xu
On Tue, Apr 16, 2024 at 10:58:33AM +, Christophe Leroy wrote: > > > Le 15/04/2024 à 21:12, Christophe Leroy a écrit : > > > > > > Le 12/04/2024 à 16:30, Peter Xu a écrit : > >> On Fri, Apr 12, 2024 at 02:08:03PM +, Christophe Leroy wrote: > >>> > >>> > >>> Le 11/04/2024 à 18:15, Peter

[PATCH 5/5 RESEND] ptdump: add state parameter for non-leaf callback

2024-04-16 Thread Maxwell Bland
ptdump can now note non-leaf descriptor entries, a useful addition for debugging table descriptor permissions when working on related code Signed-off-by: Maxwell Bland --- arch/arm64/mm/ptdump.c | 6 -- arch/powerpc/mm/ptdump/ptdump.c | 2 ++ arch/riscv/mm/ptdump.c | 6

[PATCH 0/5 RESEND] mm: code and data partitioning improvements

2024-04-16 Thread Maxwell Bland
Managing allocations to ensure code and data pages are not interleaved is not possible prior to this patch, as ASLR requires programming a dynamic _text offset while the vmalloc infrastructure maintains static VMALLOC_START and VMALLOC_END constants. In systems where code and data are interleaved

[PATCH] powerpc: drop port I/O helpers for CONFIG_HAS_IOPORT=n

2024-04-16 Thread Arnd Bergmann
From: Arnd Bergmann Calling inb()/outb() on powerpc when CONFIG_PCI is disabled causes a NULL pointer dereference, which is bad for a number of reasons. After my patch to turn on -Werror in linux-next, this caused a compiler-time warning with clang: In file included from

Re: [PATCH] i2c: mpc: Removal of of_node_put with __free for auto cleanup

2024-04-16 Thread Andi Shyti
On Tue, Apr 16, 2024 at 04:07:48PM +0200, Andi Shyti wrote: > On Tue, Apr 16, 2024 at 03:59:13AM +, Chris Packham wrote: > > On 16/04/24 08:54, Andi Shyti wrote: > > >> /* Enable I2C interrupts for mpc5121 */ > > >> -node_ctrl = of_find_compatible_node(NULL, NULL, > > >> -

Re: [PATCH] i2c: mpc: Removal of of_node_put with __free for auto cleanup

2024-04-16 Thread Andi Shyti
Hi Chris, On Tue, Apr 16, 2024 at 03:59:13AM +, Chris Packham wrote: > On 16/04/24 08:54, Andi Shyti wrote: > >>/* Enable I2C interrupts for mpc5121 */ > >> - node_ctrl = of_find_compatible_node(NULL, NULL, > >> - "fsl,mpc5121-i2c-ctrl"); > >> +

Re: [0/2] powerpc/powernv/vas: Adjustments for map_paste_region()?

2024-04-16 Thread Markus Elfring
> Looking at that function, I however see a missing region release when > ioremap_cache() fails. Under which circumstances will the exception handling be completed also for the implementation of the function “map_paste_region”?

Re: [0/2] powerpc/powernv/vas: Adjustments for two function implementations

2024-04-16 Thread Markus Elfring
So Coccinelle should be fixed if it reports an error for that. >>> >>> Redundant function calls can occasionally be avoided accordingly, >>> can't they? >> >> Sure they can, but is that worth it here ? > > Coccinelle does what the developer of the semantic patch tells it to do. > It doesn't

Re: [0/2] powerpc/powernv/vas: Adjustments for two function implementations

2024-04-16 Thread Julia Lawall
On Tue, 16 Apr 2024, Christophe Leroy wrote: > > > Le 16/04/2024 à 14:14, Markus Elfring a écrit : > >> This is explicit in Kernel documentation: > >> > >> /** > >>* kfree - free previously allocated memory > >>* @object: pointer returned by kmalloc() or kmem_cache_alloc() > >>* >

Re: powerpc: io-defs.h:43:1: error: performing pointer arithmetic on a null pointer has undefined behavior [-Werror,-Wnull-pointer-arithmetic]

2024-04-16 Thread Arnd Bergmann
iled due to following warnings / errors on the >> >> Linux next-20240416 tag. >> >> >> >> Powerpc: >> >> - tqm8xx_defconfig + clang-17 - Failed >> >> - allnoconfig + clang-17 - Failed >> >> - tinyconfig + clang-17 - Failed &

Re: powerpc: io-defs.h:43:1: error: performing pointer arithmetic on a null pointer has undefined behavior [-Werror,-Wnull-pointer-arithmetic]

2024-04-16 Thread Dan Carpenter
On Tue, Apr 16, 2024 at 01:55:57PM +0200, Arnd Bergmann wrote: > On Tue, Apr 16, 2024, at 13:01, Arnd Bergmann wrote: > > On Tue, Apr 16, 2024, at 11:32, Naresh Kamboju wrote: > >> The Powerpc clang builds failed due to following warnings / errors on the > >&

Re: [0/2] powerpc/powernv/vas: Adjustments for two function implementations

2024-04-16 Thread Markus Elfring
> This is explicit in Kernel documentation: > > /** > * kfree - free previously allocated memory > * @object: pointer returned by kmalloc() or kmem_cache_alloc() > * > * If @object is NULL, no operation is performed. > */ > > That's exactly the same behaviour as free() in libc. > > So

Re: [0/2] powerpc/powernv/vas: Adjustments for two function implementations

2024-04-16 Thread Christophe Leroy
Le 16/04/2024 à 14:14, Markus Elfring a écrit : >> This is explicit in Kernel documentation: >> >> /** >>* kfree - free previously allocated memory >>* @object: pointer returned by kmalloc() or kmem_cache_alloc() >>* >>* If @object is NULL, no operation is performed. >>*/ >>

Re: [0/2] powerpc/powernv/vas: Adjustments for two function implementations

2024-04-16 Thread Markus Elfring
>>> One function call less in vas_window_alloc() after error detection >> >> https://patchwork.ozlabs.org/project/linuxppc-dev/patch/1f1c21cf-c34c-418c-b00c-8e6474f12...@web.de/ > > It introduced a new goto and label to avoid a kfree(NULL) call, but > kfree() explicitly accepts NULL and handles

Re: powerpc: io-defs.h:43:1: error: performing pointer arithmetic on a null pointer has undefined behavior [-Werror,-Wnull-pointer-arithmetic]

2024-04-16 Thread Arnd Bergmann
On Tue, Apr 16, 2024, at 13:01, Arnd Bergmann wrote: > On Tue, Apr 16, 2024, at 11:32, Naresh Kamboju wrote: >> The Powerpc clang builds failed due to following warnings / errors on the >> Linux next-20240416 tag. >> >> Powerpc: >> - tqm8xx_defconfig + clang-17 -

Re: [0/2] powerpc/powernv/vas: Adjustments for two function implementations

2024-04-16 Thread Christophe Leroy
Le 16/04/2024 à 13:11, Michael Ellerman a écrit : > Markus Elfring writes: >>> A few update suggestions were taken into account >>> from static source code analysis. >>> >>> Markus Elfring (2): >> >> I would appreciate a bit more information about the reasons >> why this patch series was

Re: [0/2] powerpc/powernv/vas: Adjustments for two function implementations

2024-04-16 Thread Michael Ellerman
Markus Elfring writes: >> A few update suggestions were taken into account >> from static source code analysis. >> >> Markus Elfring (2): > > I would appreciate a bit more information about the reasons > why this patch series was rejected. > > >> One function call less in vas_window_alloc()

RE: powerpc: io-defs.h:43:1: error: performing pointer arithmetic on a null pointer has undefined behavior [-Werror,-Wnull-pointer-arithmetic]

2024-04-16 Thread David Laight
From: Segher Boessenkool > Sent: 16 April 2024 11:38 > > On Tue, Apr 16, 2024 at 03:02:52PM +0530, Naresh Kamboju wrote: > > In file included from arch/powerpc/include/asm/io.h:672: > > arch/powerpc/include/asm/io-defs.h:43:1: error: performing pointer > > arithmetic on a null pointer has

Re: [PATCH 1/3] x86/cpu: Actually turn off mitigations by default for SPECULATION_MITIGATIONS=n

2024-04-16 Thread Michael Ellerman
Sean Christopherson writes: > On Mon, Apr 15, 2024, Geert Uytterhoeven wrote: >> On Sat, Apr 13, 2024 at 11:38 AM Michael Ellerman >> wrote: >> > Michael Ellerman writes: >> > > Stephen Rothwell writes: >> > ... >> > >> On Tue, 9 Apr 2024 10:51:05 -0700 Sean Christopherson >> > >> wrote:

Re: powerpc: io-defs.h:43:1: error: performing pointer arithmetic on a null pointer has undefined behavior [-Werror,-Wnull-pointer-arithmetic]

2024-04-16 Thread Arnd Bergmann
On Tue, Apr 16, 2024, at 11:32, Naresh Kamboju wrote: > The Powerpc clang builds failed due to following warnings / errors on the > Linux next-20240416 tag. > > Powerpc: > - tqm8xx_defconfig + clang-17 - Failed > - allnoconfig + clang-17 - Failed > - tinyconfig + clang-17

Re: [RFC PATCH 0/8] Reimplement huge pages without hugepd on powerpc 8xx

2024-04-16 Thread Christophe Leroy
Le 15/04/2024 à 21:12, Christophe Leroy a écrit : > > > Le 12/04/2024 à 16:30, Peter Xu a écrit : >> On Fri, Apr 12, 2024 at 02:08:03PM +, Christophe Leroy wrote: >>> >>> >>> Le 11/04/2024 à 18:15, Peter Xu a écrit : On Mon, Mar 25, 2024 at 01:38:40PM -0300, Jason Gunthorpe wrote:

Re: powerpc: io-defs.h:43:1: error: performing pointer arithmetic on a null pointer has undefined behavior [-Werror,-Wnull-pointer-arithmetic]

2024-04-16 Thread Segher Boessenkool
On Tue, Apr 16, 2024 at 03:02:52PM +0530, Naresh Kamboju wrote: > In file included from arch/powerpc/include/asm/io.h:672: > arch/powerpc/include/asm/io-defs.h:43:1: error: performing pointer > arithmetic on a null pointer has undefined behavior > [-Werror,-Wnull-pointer-arithmetic] It is not UB,

Re: [PATCH 0/2] ASoC: fsl-asoc-card: add wm8904 codec support

2024-04-16 Thread Mark Brown
On Mon, 15 Apr 2024 15:17:34 +0800, Shengjiu Wang wrote: > add wm8904 codec support in fsl-asoc-card. > > Shengjiu Wang (2): > ASoC: fsl-asoc-card: add wm8904 codec support > ASoC: dt-bindings: fsl-asoc-card: Add compatbile string for wm8904 > codec > > [...] Applied to

Re: [kvm-unit-tests PATCH v8 06/35] gitlab-ci: Run migration selftest on s390x and powerpc

2024-04-16 Thread Thomas Huth
On 16/04/2024 09.55, Thomas Huth wrote: On 16/04/2024 09.18, Thomas Huth wrote: On 11/04/2024 21.22, Thomas Huth wrote: On 08/04/2024 18.06, Nico Boehr wrote: Quoting Nicholas Piggin (2024-04-05 10:35:07) The migration harness is complicated and easy to break so CI will be helpful.

Re: [kvm-unit-tests PATCH v8 11/35] powerpc/sprs: Specify SPRs with data rather than code

2024-04-16 Thread Thomas Huth
On 05/04/2024 10.35, Nicholas Piggin wrote: A significant rework that builds an array of 'struct spr', where each element describes an SPR. This makes various metadata about the SPR like name and access type easier to carry and use. Hypervisor privileged registers are described despite not

Re: [RFC PATCH 3/7] module: prepare to handle ROX allocations for text

2024-04-16 Thread Nadav Amit
> On 11 Apr 2024, at 19:05, Mike Rapoport wrote: > > @@ -2440,7 +2479,24 @@ static int post_relocation(struct module *mod, const > struct load_info *info) > add_kallsyms(mod, info); > > /* Arch-specific module finalizing. */ > - return module_finalize(info->hdr,

powerpc: io-defs.h:43:1: error: performing pointer arithmetic on a null pointer has undefined behavior [-Werror,-Wnull-pointer-arithmetic]

2024-04-16 Thread Naresh Kamboju
The Powerpc clang builds failed due to following warnings / errors on the Linux next-20240416 tag. Powerpc: - tqm8xx_defconfig + clang-17 - Failed - allnoconfig + clang-17 - Failed - tinyconfig + clang-17 - Failed Reported-by: Linux Kernel Functional Testing Build log: In file

[PATCH v9 0/3] powerpc: make fadump resilient with memory add/remove events

2024-04-16 Thread Sourabh Jain
Problem: Due to changes in memory resources caused by either memory hotplug or online/offline events, the elfcorehdr, which describes the cpus and memory of the crashed kernel to the kernel that collects the dump (known as second/fadump kernel), becomes outdated. Consequently, attempting

[PATCH v9 3/3] Documentation/powerpc: update fadump implementation details

2024-04-16 Thread Sourabh Jain
The patch titled ("powerpc: make fadump resilient with memory add/remove events") has made significant changes to the implementation of fadump, particularly on elfcorehdr creation and fadump crash info header structure. Therefore, updating the fadump implementation documentation to reflect those

[PATCH v9 1/3] powerpc: make fadump resilient with memory add/remove events

2024-04-16 Thread Sourabh Jain
Due to changes in memory resources caused by either memory hotplug or online/offline events, the elfcorehdr, which describes the CPUs and memory of the crashed kernel to the kernel that collects the dump (known as second/fadump kernel), becomes outdated. Consequently, attempting dump collection

[PATCH v9 2/3] powerpc/fadump: add hotplug_ready sysfs interface

2024-04-16 Thread Sourabh Jain
The elfcorehdr describes the CPUs and memory of the crashed kernel to the kernel that captures the dump, known as the second or fadump kernel. The elfcorehdr needs to be updated if the system's memory changes due to memory hotplug or online/offline events. Currently, memory hotplug events are

Re: [kvm-unit-tests PATCH v8 06/35] gitlab-ci: Run migration selftest on s390x and powerpc

2024-04-16 Thread Thomas Huth
On 16/04/2024 09.18, Thomas Huth wrote: On 11/04/2024 21.22, Thomas Huth wrote: On 08/04/2024 18.06, Nico Boehr wrote: Quoting Nicholas Piggin (2024-04-05 10:35:07) The migration harness is complicated and easy to break so CI will be helpful. Signed-off-by: Nicholas Piggin ---  

Re: [RFC PATCH 6/7] execmem: add support for cache of large ROX pages

2024-04-16 Thread Peter Zijlstra
On Mon, Apr 15, 2024 at 08:00:26PM +0300, Mike Rapoport wrote: > On Mon, Apr 15, 2024 at 12:47:50PM +0200, Peter Zijlstra wrote: > > On Thu, Apr 11, 2024 at 07:05:25PM +0300, Mike Rapoport wrote: > > > > > To populate the cache, a writable large page is allocated from vmalloc > > > with > > >

Re: [kvm-unit-tests PATCH v8 10/35] powerpc: interrupt stack backtracing

2024-04-16 Thread Thomas Huth
On 05/04/2024 10.35, Nicholas Piggin wrote: Add support for backtracing across interrupt stacks, and add interrupt frame backtrace for unhandled interrupts. This requires a back-chain created from initial interrupt stack frame to the r1 value of the interrupted context. A label is added at the

Re: [PATCH v4 05/15] mm: introduce execmem_alloc() and execmem_free()

2024-04-16 Thread Mike Rapoport
On Mon, Apr 15, 2024 at 06:36:39PM +0100, Mark Rutland wrote: > On Mon, Apr 15, 2024 at 09:52:41AM +0200, Peter Zijlstra wrote: > > On Thu, Apr 11, 2024 at 07:00:41PM +0300, Mike Rapoport wrote: > > > +/** > > > + * enum execmem_type - types of executable memory ranges > > > + * > > > + * There

Re: [kvm-unit-tests PATCH v8 06/35] gitlab-ci: Run migration selftest on s390x and powerpc

2024-04-16 Thread Thomas Huth
On 11/04/2024 21.22, Thomas Huth wrote: On 08/04/2024 18.06, Nico Boehr wrote: Quoting Nicholas Piggin (2024-04-05 10:35:07) The migration harness is complicated and easy to break so CI will be helpful. Signed-off-by: Nicholas Piggin ---   .gitlab-ci.yml  | 32

Re: [kvm-unit-tests PATCH v8 09/35] powerpc: Fix stack backtrace termination

2024-04-16 Thread Thomas Huth
On 05/04/2024 10.35, Nicholas Piggin wrote: The backtrace handler terminates when it sees a NULL caller address, but the powerpc stack setup does not keep such a NULL caller frame at the start of the stack. This happens to work on pseries because the memory at 0 is mapped and it contains 0 at