Re: [RFC PATCH] ata: pata_macio: Use WARN instead of BUG

2024-08-19 Thread Michael Ellerman
Damien Le Moal writes: > On 8/19/24 19:19, Michael Ellerman wrote: >> The overflow/underflow conditions in pata_macio_qc_prep() should never >> happen. But if they do there's no need to kill the system entirely, a >> WARN and failing the IO request should be suff

Re: [PATCH] ata: pata_macio: Fix DMA table overflow

2024-08-19 Thread Michael Ellerman
Damien Le Moal writes: > On 8/19/24 19:17, Michael Ellerman wrote: >> Kolbjørn and Jonáš reported that their 32-bit PowerMacs were crashing >> in pata-macio since commit 09fe2bfa6b83 ("ata: pata_macio: Fix >> max_segment_size with PAGE_SIZE == 64K"). >> &

[PATCH] powerpc/pseries: Fix dtl_access_lock to be a rw_semaphore

2024-08-19 Thread Michael Ellerman
258 Fixes: 06220d78f24a ("powerpc/pseries: Introduce rwlock to gatekeep DTLB usage") Signed-off-by: Michael Ellerman --- arch/powerpc/include/asm/dtl.h| 3 ++- arch/powerpc/platforms/pseries/dtl.c | 8 arch/powerpc/platforms/pseries/lpar.c | 8 3 files changed,

[RFC PATCH] ata: pata_macio: Use WARN instead of BUG

2024-08-19 Thread Michael Ellerman
The overflow/underflow conditions in pata_macio_qc_prep() should never happen. But if they do there's no need to kill the system entirely, a WARN and failing the IO request should be sufficient and might allow the system to keep running. Signed-off-by: Michael Ellerman --- driver

[PATCH] ata: pata_macio: Fix DMA table overflow

2024-08-19 Thread Michael Ellerman
nel.org/all/3b6441b8-06e6-45da-9e55-f92f2c869...@ufal.mff.cuni.cz/ Tested-by: Kolbjørn Barmen Signed-off-by: Michael Ellerman --- drivers/ata/pata_macio.c | 23 +++ 1 file changed, 15 insertions(+), 8 deletions(-) diff --git a/drivers/ata/pata_macio.c b/drivers/ata/pata_m

[GIT PULL] Please pull powerpc/linux.git powerpc-6.11-2 tag

2024-08-17 Thread Michael Ellerman
-BEGIN PGP SIGNED MESSAGE- Hash: SHA256 Hi Linus, Please pull some powerpc fixes for 6.11: The following changes since commit de9c2c66ad8e787abec7c9d7eff4f8c3cdd28aed: Linux 6.11-rc2 (2024-08-04 13:50:53 -0700) are available in the git repository at: https://git.kernel.org/pub/scm

Re: Since 6.10 - kernel oops/panics on G4 macmini due to change in drivers/ata/pata_macio.c

2024-08-16 Thread Michael Ellerman
Niklas Cassel writes: > On Wed, Aug 14, 2024 at 10:20:55PM +1000, Michael Ellerman wrote: >> Niklas Cassel writes: >> > On Tue, Aug 13, 2024 at 10:32:36PM +1000, Michael Ellerman wrote: >> >> Niklas Cassel writes: >> >> > On Tue, Aug 13

Re: [PATCH v3 14/16] modules: Support extended MODVERSIONS info

2024-08-16 Thread Michael Ellerman
Matthew Maurer writes: > Adds a new format for MODVERSIONS which stores each field in a separate > ELF section. This initially adds support for variable length names, but > could later be used to add additional fields to MODVERSIONS in a > backwards compatible way if needed. Any new fields will be

Re: [PATCH v3] PCI: Fix crash during pci_dev hot-unplug on pseries KVM guest

2024-08-16 Thread Michael Ellerman
Amit Machhiwal writes: > On 2024/08/15 01:20 PM, Michael Ellerman wrote: >> Bjorn Helgaas writes: >> > On Sat, Aug 03, 2024 at 12:03:25AM +0530, Amit Machhiwal wrote: >> >> With CONFIG_PCI_DYNAMIC_OF_NODES [1], a hot-plug and hot-unplug sequence >> >>

Re: OVERFLOW_KUNIT_TEST fails with BUG: KASAN: stack-out-of-bounds in string_nocheck+0x168/0x1c8 (kernel 6.11-rc2, PowerMac G4 DP)

2024-08-16 Thread Michael Ellerman
Ivan Orlov writes: > On 8/15/24 00:26, Ivan Orlov wrote: >> >> As you can see, the device name is defined as a local variable, which >> means that it doesn't exist out of the 'overflow_allocation_test' >> function scope. This patch: >> >> diff --git a/lib/overflow_kunit.c b/lib/overflow_kunit.

Re: 'do_IRQ: stack overflow: 1072' at using bcachefs partition (ppc32, kernel 6.10.5)

2024-08-16 Thread Michael Ellerman
Erhard Furtner writes: > Greetings! > > Basically bcachefs works on ppc32 but I get stack overflows like this one > rather easy: > > [...] > do_IRQ: stack overflow: 1072 > CPU: 1 PID: 2114 Comm: bash Not tainted 6.10.5-gentoo-PMacG4 #1 > Hardware name: PowerMac3,6 7455 0x80010303 PowerMac > Call

Re: [PATCH] powerpc/ftrace: restore r2 to caller's stack on livepatch sibling call

2024-08-15 Thread Michael Ellerman
Ryan Sullivan writes: > Hello Michael, > > In the case of no sibling call within the livepatch then the store is > only "restoring" the r2 value that was already there as it is stored > and retrieved from the livepatch stack. But what guarantee do we have that it's the value that was already ther

Re: [PATCH v3] PCI: Fix crash during pci_dev hot-unplug on pseries KVM guest

2024-08-14 Thread Michael Ellerman
Bjorn Helgaas writes: > On Sat, Aug 03, 2024 at 12:03:25AM +0530, Amit Machhiwal wrote: >> With CONFIG_PCI_DYNAMIC_OF_NODES [1], a hot-plug and hot-unplug sequence >> of a PCI device attached to a PCI-bridge causes following kernel Oops on >> a pseries KVM guest: > > What is unique about pseries h

Re: Since 6.10 - kernel oops/panics on G4 macmini due to change in drivers/ata/pata_macio.c

2024-08-14 Thread Michael Ellerman
Niklas Cassel writes: > On Tue, Aug 13, 2024 at 10:32:36PM +1000, Michael Ellerman wrote: >> Niklas Cassel writes: >> > On Tue, Aug 13, 2024 at 07:49:34AM +0200, Jonáš Vidra wrote: ... >> >> [ cut here ] >> >> kernel BUG at dri

Re: [PATCH v5 0/7] mm/mprotect: Fix dax puds

2024-08-13 Thread Michael Ellerman
Peter Xu writes: > [Based on mm-unstable, commit 98808d08fc0f, Aug 7th. NOTE: it is > intentional to not have rebased to latest mm-unstable, as this is to > replace the queued v4] > > v5 Changelog: > - Rename patch subject "mm/x86: arch_check_zapped_pud()", add "Implement" > [tglx] > - Mostly r

Re: [PATCH v2] KVM: PPC: Book3S HV: Refactor HFSCR emulation for KVM guests

2024-08-13 Thread Michael Ellerman
On Tue, 16 Jul 2024 17:22:04 +0530, Gautam Menghani wrote: > Refactor HFSCR emulation for KVM guests when they exit out with > H_FAC_UNAVAIL to use a switch case instead of checking all "cause" > values, since the "cause" values are mutually exclusive; and this is > better expressed with a switch c

Re: [PATCH v2 0/2] Skip offline cores when enabling SMT on PowerPC

2024-08-13 Thread Michael Ellerman
On Wed, 31 Jul 2024 08:31:11 +0530, Nysal Jan K.A. wrote: > After the addition of HOTPLUG_SMT support for PowerPC [1] there was a > regression reported [2] when enabling SMT. On a system with at least > one offline core, when enabling SMT, the expectation is that no CPUs > of offline cores are made

Re: Since 6.10 - kernel oops/panics on G4 macmini due to change in drivers/ata/pata_macio.c

2024-08-13 Thread Michael Ellerman
Niklas Cassel writes: > Hello Jonáš, Kolbjørn, > > thank you for the report. > > On Tue, Aug 13, 2024 at 07:49:34AM +0200, Jonáš Vidra wrote: >> On Tue 13. Aug 2024 0:32:37 CEST, Kolbjørn Barmen wrote: >> > Ever since 6.10, my macmini G4 behaved unstable when dealing with lots of >> > I/O activity

Re: [PATCH v2] selftest/powerpc/benchmark: remove requirement libc-dev

2024-08-13 Thread Michael Ellerman
and the same is > proposed as a fix here. > > Suggested-by: Michael Ellerman > Signed-off-by: Madhavan Srinivasan > --- > Chnagelog v1: > - Add comment for clobber register and proper list of > clobber registers as suggested by Michael Ellerman and > Christophe Leroy > >

Re: [PATCH] powerpc/476: Drop explicit initialization of struct i2c_device_id::driver_data to 0

2024-08-12 Thread Michael Ellerman
On Sun, 04 Aug 2024 13:20:31 +0200, Uwe Kleine-König wrote: > This driver doesn't use the driver_data member of struct i2c_device_id, > so don't explicitly initialize this member. > > This prepares putting driver_data in an anonymous union which requires > either no initialization or named designa

Re: [PATCH 0/2] arch: powerpc: Use backlight power constants

2024-08-12 Thread Michael Ellerman
On Wed, 31 Jul 2024 15:06:13 +0200, Thomas Zimmermann wrote: > Commit a1cacb8a8e70 ("backlight: Add BACKLIGHT_POWER_ constants for > power states") introduced dedicated constants for backlight power states. > Convert PowerPC code to the new constants. > > The new constants replace the fbdev consta

Re: [PATCH -next v2] powerpc: Remove useless config comment in asm/percpu.h

2024-08-12 Thread Michael Ellerman
On Wed, 07 Aug 2024 10:56:04 +0800, Jinjie Ruan wrote: > commit 0db880fc865f ("powerpc: Avoid nmi_enter/nmi_exit in real mode > interrupt.") has a config comment typo, and the #if/#else/#endif section > is small and doesn't nest additional #ifdefs so the comment is useless > and should be removed c

Re: [PATCH] powerpc: Use of_property_present()

2024-08-12 Thread Michael Ellerman
On Wed, 31 Jul 2024 13:12:47 -0600, Rob Herring (Arm) wrote: > Use of_property_present() to test for property presence rather than > of_get_property(). This is part of a larger effort to remove callers > of of_get_property() and similar functions. of_get_property() leaks > the DT property data poin

Re: [PATCH] soc/fsl/qbman: remove unused struct 'cgr_comp'

2024-08-12 Thread Michael Ellerman
On Wed, 29 May 2024 00:11:23 +0100, li...@treblig.org wrote: > 'cgr_comp' has been unused since > commit 96f413f47677 ("soc/fsl/qbman: fix issue in > qman_delete_cgr_safe()"). > > Remove it. > > > [...] Applied to powerpc/fixes. [1/1] soc/fsl/qbman: remove unused struct 'cgr_comp' https:

Re: [PATCH] powerpc/mm: Fix size of allocated PGDIR

2024-08-12 Thread Michael Ellerman
On Thu, 08 Aug 2024 11:32:47 +0200, Christophe Leroy wrote: > Commit 6b0e82791bd0 ("powerpc/e500: switch to 64 bits PGD on 85xx > (32 bits)") increased the size of PGD entries but failed to increase > the PGD directory. > > Use the size of pgd_t instead of the size of pointers to calculate > the a

Re: [PATCH] powerpc/mm: Fix boot warning with hugepages and CONFIG_DEBUG_VIRTUAL

2024-08-12 Thread Michael Ellerman
On Thu, 08 Aug 2024 09:05:08 +0200, Christophe Leroy wrote: > Booting with CONFIG_DEBUG_VIRTUAL leads to following warning when > passing hugepage reservation on command line: > > Kernel command line: hugepagesz=1g hugepages=1 hugepagesz=64m hugepages=1 > hugepagesz=256m hugepages=1 noreboot >

[PATCH v2 4/4] powerpc/vdso: Refactor error handling

2024-08-12 Thread Michael Ellerman
a_name(). So rework the code to only set the VDSO pointer once the mappings have been installed correctly, and remove the stale comment. Depends-on: c1bab64360e6 ("powerpc/vdso: Move to _install_special_mapping() and remove arch_vma_name()") Signed-off-by: Michael Ellerman --- a

[PATCH v2 3/4] mm: Remove arch_unmap()

2024-08-12 Thread Michael Ellerman
Now that powerpc no longer uses arch_unmap() to handle VDSO unmapping, there are no meaningful implementions left. Drop support for it entirely, and update comments which refer to it. Suggested-by: Linus Torvalds Signed-off-by: Michael Ellerman Acked-by: David Hildenbrand Reviewed-by: Thomas

[PATCH v2 2/4] powerpc/mm: Handle VDSO unmapping via close() rather than arch_unmap()

2024-08-12 Thread Michael Ellerman
Add a close() callback to the VDSO special mapping to handle unmapping of the VDSO. That will make it possible to remove the arch_unmap() hook entirely in a subsequent patch. Suggested-by: Linus Torvalds Signed-off-by: Michael Ellerman Reviewed-by: David Hildenbrand --- arch/powerpc/include

[PATCH v2 1/4] mm: Add optional close() to struct vm_special_mapping

2024-08-12 Thread Michael Ellerman
k32q4lbx2hadqqc@kzyy2igem256 Suggested-by: Linus Torvalds Signed-off-by: Michael Ellerman Reviewed-by: David Hildenbrand --- include/linux/mm_types.h | 3 +++ mm/mmap.c| 6 ++ 2 files changed, 9 insertions(+) v2: - Add some blank lines as requested. - Expand special_mapping_close()

Re: [PATCH 1/4] mm: Add optional close() to struct vm_special_mapping

2024-08-12 Thread Michael Ellerman
David Hildenbrand writes: > On 07.08.24 14:41, Michael Ellerman wrote: >> Add an optional close() callback to struct vm_special_mapping. It will >> be used, by powerpc at least, to handle unmapping of the VDSO. >> >> Suggested-by: Linus Torvalds >>

Re: [PATCH 1/4] mm: Add optional close() to struct vm_special_mapping

2024-08-12 Thread Michael Ellerman
"Liam R. Howlett" writes: > * Michael Ellerman [240807 08:41]: >> Add an optional close() callback to struct vm_special_mapping. It will >> be used, by powerpc at least, to handle unmapping of the VDSO. >> >> Suggested-by: Linus Torvalds >> Signed-o

[PATCH] powerpc/modules: start/end_opd are only needed for ABI v1

2024-08-11 Thread Michael Ellerman
The start_opd/end_opd members of struct mod_arch_specific are only needed for kernels built using ELF ABI v1. Guard them with an ifdef to save a little bit of space on ELF ABI v2 kernels. Signed-off-by: Michael Ellerman --- arch/powerpc/include/asm/module.h | 2 ++ 1 file changed, 2 insertions

Re: List change - munging for From addresses

2024-08-11 Thread Michael Ellerman
Stephen Rothwell writes: > Hi , > > On Mon, 12 Aug 2024 15:54:27 +1000 Stephen Rothwell > wrote: >> >> On Mon, 5 Aug 2024 10:54:17 -0400 Konstantin Ryabitsev >> wrote: >> > >> So, I am going to try "mean and lean" (since I am the owner/moderator >> anyway). Shortly (i.e. in the next hour or

Re: [PATCH] selftest/powerpc/benchmark: remove requirement libc-dev

2024-08-11 Thread Michael Ellerman
nchmark. >> >>CC exec_target >> /usr/bin/ld: cannot find -lc: No such file or directory >> collect2: error: ld returned 1 exit status >> >> exec_target.c is using "syscall" library function which >> could be replaced with a inline assembly and the

[PATCH 4/4] powerpc/vdso: Refactor error handling

2024-08-07 Thread Michael Ellerman
a_name(). So rework the code to only set the VDSO pointer once the mappings have been installed correctly, and remove the stale comment. Depends-on: c1bab64360e6 ("powerpc/vdso: Move to _install_special_mapping() and remove arch_vma_name()") Signed-off-by: Michael Ellerman --- a

[PATCH 3/4] mm: Remove arch_unmap()

2024-08-07 Thread Michael Ellerman
Now that powerpc no longer uses arch_unmap() to handle VDSO unmapping, there are no meaningful implementions left. Drop support for it entirely, and update comments which refer to it. Suggested-by: Linus Torvalds Signed-off-by: Michael Ellerman --- arch/powerpc/include/asm/mmu_context.h | 5

[PATCH 2/4] powerpc/mm: Handle VDSO unmapping via close() rather than arch_unmap()

2024-08-07 Thread Michael Ellerman
Add a close() callback to the VDSO special mapping to handle unmapping of the VDSO. That will make it possible to remove the arch_unmap() hook entirely in a subsequent patch. Suggested-by: Linus Torvalds Signed-off-by: Michael Ellerman --- arch/powerpc/include/asm/mmu_context.h | 4 arch

[PATCH 1/4] mm: Add optional close() to struct vm_special_mapping

2024-08-07 Thread Michael Ellerman
Add an optional close() callback to struct vm_special_mapping. It will be used, by powerpc at least, to handle unmapping of the VDSO. Suggested-by: Linus Torvalds Signed-off-by: Michael Ellerman --- include/linux/mm_types.h | 2 ++ mm/mmap.c| 3 +++ 2 files changed, 5

Re: [PATCH v5.10] powerpc: Avoid nmi_enter/nmi_exit in real mode interrupt.

2024-08-05 Thread Michael Ellerman
8364] > machine_check_early_common+0x134/0x1f8 > > Fix this by avoiding use of nmi_enter()/nmi_exit() in real mode if percpu > first chunk is not embedded. > > CVE-2024-42126 > Cc: sta...@vger.kernel.org > Reviewed-by: Christophe Leroy > Tested-by: Shiris

Re: [PATCH] kexec/crash: no crash update when kexec in progress

2024-07-31 Thread Michael Ellerman
image, resulting in the above error > messages. > > To fix this, let's return from `crash_handle_hotplug_event()` if kexec > is in progress. > > The same applies to the `crash_check_hotplug_support()` function. > Return 0 if kexec is in progress. > > Cc: Hari Bathini

Re: [PATCH] powerpc/ftrace: restore r2 to caller's stack on livepatch sibling call

2024-07-29 Thread Michael Ellerman
Hi Ryan, Thanks for the patch. Ryan Sullivan writes: > Currently, on PowerPC machines, sibling calls in livepatched functions > cause the stack to be corrupted and are thus not supported by tools > such as kpatch. Below is an example stack frame showing one such > currupted stacks: ... > diff --

Re: [PATCH v2] PCI: Fix crash during pci_dev hot-unplug on pseries KVM guest

2024-07-26 Thread Michael Ellerman
Amit Machhiwal writes: > Hi Bjorn, > > On 2024/07/25 03:55 PM, Bjorn Helgaas wrote: >> On Thu, Jul 25, 2024 at 11:15:39PM +0530, Amit Machhiwal wrote: >> > ... >> > The crash in question is a critical issue that we would want to have >> > a fix for soon. And while this is still being figured out,

[PATCH 1/2] MAINTAINERS: Mark powerpc Cell as orphaned

2024-07-26 Thread Michael Ellerman
Arnd is no longer actively maintaining Cell, mark it as orphan. Also drop the dead developerworks link. Signed-off-by: Michael Ellerman --- CREDITS | 3 +++ MAINTAINERS | 4 +--- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/CREDITS b/CREDITS index 053e5a5003eb

[PATCH 2/2] MAINTAINERS: Mark powerpc spufs as orphaned

2024-07-26 Thread Michael Ellerman
Jeremy is no longer actively maintaining spufs, mark it as orphan. Also drop the dead developerworks link. Signed-off-by: Michael Ellerman Acked-by: Jeremy Kerr --- CREDITS | 3 +++ MAINTAINERS | 4 +--- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/CREDITS b/CREDITS

Re: [PATCH v2 17/16] xz: Remove XZ_EXTERN and extern from functions

2024-07-24 Thread Michael Ellerman
_id_attributes in Documentation/conf.py but omitting > XZ_EXTERN seemed cleaner. > > Link: https://lore.kernel.org/lkml/20240723205437.3c0664b0@kaneli/ > Cc: Michael Ellerman > Cc: Jonathan Corbet > Cc: linuxppc-dev@lists.ozlabs.org > Cc: linux-...@vger.kernel.org > Signed-off-

Re: [PATCH v2] cpufreq: powerpc: add missing MODULE_DESCRIPTION() macros

2024-07-22 Thread Michael Ellerman
ptions enabled in the kernel > configuration. > > Signed-off-by: Jeff Johnson > --- > Changes in v2: > - Per Michael Ellerman updated maple-cpufreq.c and powernv-cpufreq.c > descriptions > - Did not carry forward Viresh Kumar's Acked-by due to this change > - Link

Re: [PATCH] soc/fsl/qbman: remove unused struct 'cgr_comp'

2024-07-22 Thread Michael Ellerman
"Dr. David Alan Gilbert" writes: > * Sean Anderson (sean.ander...@linux.dev) wrote: >> On 5/28/24 19:11, li...@treblig.org wrote: >> > From: "Dr. David Alan Gilbert" >> > >> > 'cgr_comp' has been unused since >> > commit 96f413f47677 ("soc/fsl/qbman: fix issue in >> > qman_delete_cgr_safe()"). >

Re: [PATCH] cpufreq: powerpc: add missing MODULE_DESCRIPTION() macros

2024-07-22 Thread Michael Ellerman
Jeff Johnson writes: > With ARCH=powerpc, make allmodconfig && make W=1 C=1 reports: > WARNING: modpost: missing MODULE_DESCRIPTION() in > drivers/cpufreq/ppc-cbe-cpufreq.o > WARNING: modpost: missing MODULE_DESCRIPTION() in > drivers/cpufreq/powernv-cpufreq.o > > Add the missing invocation of t

[GIT PULL] Please pull powerpc/linux.git powerpc-6.11-1 tag

2024-07-19 Thread Michael Ellerman
lug driver crash on Powernv powerpc/pci: Hotplug driver bridge support Michael Ellerman (8): powerpc: Remove 40x from Kconfig and defconfig powerpc/4xx: Remove CONFIG_BOOKE_OR_40x powerpc: Replace CONFIG_4xx with CONFIG_44x selftests/sigaltstack: Fix ppc64 GCC build

Re: [PATCH v4] cxl: Fix possible null pointer dereference in read_handle()

2024-07-18 Thread Michael Ellerman
ential issue. > > Found by static analysis. > > Cc: sta...@vger.kernel.org > Fixes: 14baf4d9c739 ("cxl: Add guest-specific code") > Signed-off-by: Ma Ke > --- Acked-by: Michael Ellerman (powerpc) In practice I don't this bug is triggerable, because the device tree tha

Re: [PATCH v4] cxl: Fix possible null pointer dereference in read_handle()

2024-07-18 Thread Michael Ellerman
Ma Ke writes: >> Michael Ellerman wrote: >> > In read_handle(), of_get_address() may return NULL if getting address and >> > size of the node failed. When of_read_number() uses prop to handle >> > conversions between different byte orders, it could lead to a n

Re: linux-next: duplicate patch in the powerpc tree

2024-07-17 Thread Michael Ellerman
Stephen Rothwell writes: > Hi all, > > The following commit is also in the bpf tree as a different commit > (but the same patch): > > 358492fc426f ("MAINTAINERS: Update email address of Naveen") > > This is commit > > afcc8e1ef7bb ("MAINTAINERS: Update email address of Naveen") > > in the bpf

Re: [PATCH 1/2] MAINTAINERS: Update email address of Naveen

2024-07-16 Thread Michael Ellerman
Masami Hiramatsu (Google) writes: > Hi Naveen, > > On Sun, 14 Jul 2024 14:04:23 +0530 > Naveen N Rao wrote: > >> I have switched to using my @kernel.org id for my contributions. Update >> MAINTAINERS and mailmap to reflect the same. >> > > Looks good to me. > > Reviewed-by: Masami Hiramatsu (Go

Re: [PATCH] arch/powerpc/kvm: Avoid extra checks when emulating HFSCR bits

2024-07-15 Thread Michael Ellerman
Gautam Menghani writes: > When a KVM guest tries to use a feature disabled by HFSCR, it exits to > the host for emulation support, and the code checks for all bits which > are emulated. Avoid checking all the bits by using a switch case. The patch looks fine, but I don't know what you mean by "av

Re: [PATCH v4] cxl: Fix possible null pointer dereference in read_handle()

2024-07-14 Thread Michael Ellerman
Ma Ke writes: > In read_handle(), of_get_address() may return NULL if getting address and > size of the node failed. When of_read_number() uses prop to handle > conversions between different byte orders, it could lead to a null pointer > dereference. Add NULL check to fix potential issue. > > Foun

Re: [PATCH] macintosh/therm_windtunnel: fix module unload.

2024-07-12 Thread Michael Ellerman
On Wed, 10 Jul 2024 23:54:17 -0400, Nick Bowler wrote: > The of_device_unregister call in therm_windtunnel's module_exit procedure > does not fully reverse the effects of of_platform_device_create in the > module_init prodedure. Once you unload this module, it is impossible > to load it ever again

Re: [PATCH 1/3] powerpc: Drop clang workaround for builtin constant checks

2024-07-12 Thread Michael Ellerman
On Thu, 09 May 2024 22:12:46 +1000, Michael Ellerman wrote: > The CPU/MMU feature code has build-time checks that the feature value is > a builtin constant. > > Back when the code was added clang wasn't able to compile the > checks, so an ifdef was added to avoid the che

Re: [PATCH] powerpc: Remove 40x leftovers

2024-07-12 Thread Michael Ellerman
On Thu, 11 Jul 2024 12:49:01 +0200, Christophe Leroy wrote: > Applied to powerpc/next. [1/1] powerpc: Remove 40x leftovers https://git.kernel.org/powerpc/c/3efe19a9b1549d4a35ec5790ad49f0a0234c cheers

Re: [PATCH] Documentation/powerpc: Mention 40x is removed

2024-07-12 Thread Michael Ellerman
On Thu, 11 Jul 2024 12:50:21 +0200, Christophe Leroy wrote: > Commit 732b32daef80 ("powerpc: Remove core support for 40x") removed 40x. > > Update documentation accordingly. > > Applied to powerpc/next. [1/1] Documentation/powerpc: Mention 40x is removed https://git.kernel.org/powerpc/c/

Re: [PATCH 0/5] powerpc64/bpf: jit support for cpuv4 instructions

2024-07-12 Thread Michael Ellerman
On Fri, 17 May 2024 09:56:45 +0200, Artem Savkov wrote: > Add support for recently added cpuv4 instructions fixing test_bpf module > failures. This is mostly based on 8ecf3c1dab1c6 (powerpc/bpf/32: Fix > failing test_bpf tests, 2024-03-05) > > Artem Savkov (5): > powerpc64/bpf: jit support for 3

Re: [PATCH v2 07/10] soc: fsl: cpm1: qmc: Introduce functions to get a channel from a phandle list

2024-07-12 Thread Michael Ellerman
LEROY Christophe writes: > Le 04/07/2024 à 05:01, Michael Ellerman a écrit : >> Mark Brown writes: >>> On Mon, Jul 01, 2024 at 01:30:34PM +0200, Herve Codina wrote: >>>> qmc_chan_get_byphandle() and the resource managed version retrieve a >>>> channel f

Re: [PATCH v2] printk: Add a short description string to kmsg_dump()

2024-07-12 Thread Michael Ellerman
ard >declaration of oops_to_nvram() > > Signed-off-by: Jocelyn Falempe > --- > arch/powerpc/kernel/nvram_64.c | 8 > arch/powerpc/platforms/powernv/opal-kmsg.c | 4 ++-- Acked-by: Michael Ellerman (powerpc) cheers

Re: [PATCH v2] printk: Add a short description string to kmsg_dump()

2024-07-12 Thread Michael Ellerman
Jocelyn Falempe writes: > On 02/07/2024 14:26, Jocelyn Falempe wrote: >> kmsg_dump doesn't forward the panic reason string to the kmsg_dumper >> callback. >> This patch adds a new struct kmsg_dump_detail, that will hold the >> reason and description, and pass it to the dump() callback. >> >> To a

Re: [PATCH v3 16/16] mm/mmap: Move may_expand_vm() check in mmap_region()

2024-07-10 Thread Michael Ellerman
Lorenzo Stoakes writes: > On Mon, Jul 08, 2024 at 04:43:15PM GMT, Liam R. Howlett wrote: >> ... >> The functionality here has changed >> --- from --- >> may_expand_vm() check >> can_modify_mm() check >> arch_unmap() >> vms_gather_munmap_vmas() >> ... >> >> --- to --- >> can_modify_mm() check >> ar

Re: [PATCH] Documentation/powerpc: Remove retired CPUs from list of supported CPUs

2024-07-10 Thread Michael Ellerman
Christophe Leroy writes: > 601, power4, 401, 403, 405, e200 and IBM-A2 support was removed by > by following commits: > - Commit 8b14e1dff067 ("powerpc: Remove support for PowerPC 601") > - Commit 471d7ff8b51b ("powerpc/64s: Remove POWER4 support") > - Commit 1b5c0967ab8a ("powerpc/40x: Remove sup

Re: [PATCH] powerpc/pseries: Fix scv instruction crash with kexec

2024-07-09 Thread Michael Ellerman
Michal Suchánek writes: > Hello, > > On Tue, Jun 25, 2024 at 11:40:47PM +1000, Nicholas Piggin wrote: >> kexec on pseries disables AIL (reloc_on_exc), required for scv >> instruction support, before other CPUs have been shut down. This means >> they can execute scv instructions after AIL is disabl

Re: WARNING&Oops in v6.6.37 on ppc64lea - Trying to vfree() bad address (00000000453be747)

2024-07-09 Thread Michael Ellerman
Michael Ellerman writes: > Greg Kroah-Hartman writes: >> On Tue, Jul 09, 2024 at 03:02:13PM +0530, Naveen N Rao wrote: >>> Greg Kroah-Hartman wrote: >>> > On Mon, Jul 08, 2024 at 11:16:48PM -0400, matoro wrote: >>> > > On 2024-07-05 16:34, Vitaly Ch

Re: [PowerPC] [PASEMI] Issue with the identification of ATA drives after the of/irq updates 2024-05-29

2024-07-09 Thread Michael Ellerman
Damien Stewart writes: > Hello. > >> How does it fail? I've repeatedly asked for dmesg outputs >> for working and non-working configurations. > > I am the alleged tester. Attached are two dmesg logs. First one fails. > Second passes with 2nd IRQ patch. Also attached is device tree blob if > I've f

Re: WARNING&Oops in v6.6.37 on ppc64lea - Trying to vfree() bad address (00000000453be747)

2024-07-09 Thread Michael Ellerman
Greg Kroah-Hartman writes: > On Tue, Jul 09, 2024 at 03:02:13PM +0530, Naveen N Rao wrote: >> Greg Kroah-Hartman wrote: >> > On Mon, Jul 08, 2024 at 11:16:48PM -0400, matoro wrote: >> > > On 2024-07-05 16:34, Vitaly Chikunov wrote: >> > > > Hi, >> > > > > There is new WARNING and Oops on ppc64le i

Re: [PATCH v4 0/2] PCI hotplug driver fixes

2024-07-08 Thread Michael Ellerman
On Mon, 01 Jul 2024 13:15:05 +0530, Krishna Kumar wrote: > The fix of Powerpc hotplug driver (drivers/pci/hotplug/pnv_php.c) > addresses below two issues. > > 1. Kernel Crash during hot unplug of bridge/switch slot. > > 2. Bridge Support Enablement - Previously, when we do a hot-unplug > operatio

[GIT PULL] Please pull powerpc/linux.git powerpc-6.10-4 tag

2024-07-06 Thread Michael Ellerman
(1): powerpc/pseries: Whitelist dtl slub object for copying to userspace Ganesh Goudar (1): powerpc/eeh: avoid possible crash when edev->pdev changes Jinglin Wen (1): powerpc/64s: Fix unnecessary copy to 0 when kernel is booted at address 0 Michael Ellerman (1): selfte

Re: [PATCH] KVM: PPC: add missing MODULE_DESCRIPTION() macros

2024-07-06 Thread Michael Ellerman
On Sat, 15 Jun 2024 08:18:59 -0700, Jeff Johnson wrote: > With ARCH=powerpc, make allmodconfig && make W=1 C=1 reports: > WARNING: modpost: missing MODULE_DESCRIPTION() in > arch/powerpc/kvm/test-guest-state-buffer.o > WARNING: modpost: missing MODULE_DESCRIPTION() in arch/powerpc/kvm/kvm-pr.o > W

Re: [PATCH] macintosh: Drop explicit initialization of struct i2c_device_id::driver_data to 0

2024-07-06 Thread Michael Ellerman
On Mon, 24 Jun 2024 15:24:33 +0200, Uwe Kleine-König wrote: > These drivers don't use the driver_data member of struct i2c_device_id, > so don't explicitly initialize this member. > > This prepares putting driver_data in an anonymous union which requires > either no initialization or named designa

Re: [PATCH v4 0/6] powerpc: pSeries: vfio: iommu: Re-enable support for SPAPR TCE VFIO

2024-07-06 Thread Michael Ellerman
On Mon, 24 Jun 2024 12:38:07 +, Shivaprasad G Bhat wrote: > The patches reimplement the iommu table_group_ops for pSeries > for VFIO SPAPR TCE sub-driver thereby bringing consistency with > PowerNV implementation and getting rid of limitations/bugs which > were emanating from these differences

Re: [PATCH] powerpc/pseries/iommu: Define spapr_tce_table_group_ops only with CONFIG_IOMMU_API

2024-07-06 Thread Michael Ellerman
On Thu, 04 Jul 2024 10:22:37 +, Shivaprasad G Bhat wrote: > The patch fixes the below warning, > arch/powerpc/platforms/pseries/iommu.c:1824:37: warning: > 'spapr_tce_table_group_ops' defined but not used [-Wunused-variable] > > The other error reported by the test robot no longer exists on t

Re: [PATCH] powerpc: kexec: Use of_property_read_reg()

2024-07-06 Thread Michael Ellerman
On Tue, 02 Jul 2024 15:03:44 -0600, Rob Herring (Arm) wrote: > Replace open-coded parsing of "reg" property with > of_property_read_reg(). > > Applied to powerpc/next. [1/1] powerpc: kexec: Use of_property_read_reg() https://git.kernel.org/powerpc/c/cf08b628cd146a3cb597999f4d4dc590068bf01

Re: [PATCH] powerpc: add missing MODULE_DESCRIPTION() macros

2024-07-06 Thread Michael Ellerman
On Sat, 15 Jun 2024 10:06:18 -0700, Jeff Johnson wrote: > With ARCH=powerpc, make allmodconfig && make W=1 C=1 reports: > WARNING: modpost: missing MODULE_DESCRIPTION() in > arch/powerpc/kernel/rtas_flash.o > WARNING: modpost: missing MODULE_DESCRIPTION() in > arch/powerpc/sysdev/rtc_cmos_setup.o

Re: [PATCH] macintosh/mac_hid: add MODULE_DESCRIPTION()

2024-07-06 Thread Michael Ellerman
On Thu, 09 May 2024 18:23:37 -0700, Jeff Johnson wrote: > Fix the make W=1 warning: > WARNING: modpost: missing MODULE_DESCRIPTION() in drivers/macintosh/mac_hid.o > > Applied to powerpc/next. [1/1] macintosh/mac_hid: add MODULE_DESCRIPTION() https://git.kernel.org/powerpc/c/50b5fed94e21c

Re: [PATCH] powerpc/rtas: Prevent Spectre v1 gadget construction in sys_rtas()

2024-07-06 Thread Michael Ellerman
On Thu, 30 May 2024 19:44:12 -0500, Nathan Lynch wrote: > Smatch warns: > > arch/powerpc/kernel/rtas.c:1932 __do_sys_rtas() warn: potential > spectre issue 'args.args' [r] (local cap) > > The 'nargs' and 'nret' locals come directly from a user-supplied > buffer and are used as indexes into a

Re: [PATCH] powerpc/prom: Add CPU info to hardware description string later

2024-07-06 Thread Michael Ellerman
On Mon, 03 Jun 2024 07:36:55 -0500, Nathan Lynch wrote: > cur_cpu_spec->cpu_name is appended to ppc_hw_desc before cur_cpu_spec > has taken on its final value. This is illustrated on pseries by > comparing the CPU name as reported at boot ("POWER8E (raw)") to the > contents of /proc/cpuinfo ("POWER

Re: [PATCH v3 1/7] powerpc/40x: Remove 40x platforms.

2024-07-06 Thread Michael Ellerman
On Fri, 28 Jun 2024 22:11:55 +1000, Michael Ellerman wrote: > 40x platforms have been orphaned for many years. > > Remove them. > > Applied to powerpc/next. [1/7] powerpc/40x: Remove 40x platforms. https://git.kernel.org/powerpc/c/47d13a269bbddd794e4ae393894103eed3dd84b

Re: [PATCH] selftests/sigaltstack: Fix ppc64 GCC build

2024-07-06 Thread Michael Ellerman
On Mon, 20 May 2024 16:26:47 +1000, Michael Ellerman wrote: > Building the sigaltstack test with GCC on 64-bit powerpc errors with: > > gcc -Wall sas.c -o /home/michael/linux/.build/kselftest/sigaltstack/sas > In file included from sas.c:23: > current_stack_pointe

Re: [PATCH v3 0/3] memory: fsl_ifc: Make FSL_IFC config visible and selectable

2024-07-06 Thread Michael Ellerman
On Thu, 30 May 2024 16:46:35 +0200, Esben Haabendal wrote: > While use of fsl_ifc driver with NAND flash is fine, as the fsl_ifc_nand > driver selects FSL_IFC automatically, we need the CONFIG_FSL_IFC option to > be selectable for platforms using fsl_ifc with NOR flash. > > Fixes: ea0c0ad6b6eb ("m

Re: [PATCH v3] radix/kfence: map __kfence_pool at page granularity

2024-07-06 Thread Michael Ellerman
On Mon, 01 Jul 2024 18:30:21 +0530, Hari Bathini wrote: > When KFENCE is enabled, total system memory is mapped at page level > granularity. But in radix MMU mode, ~3GB additional memory is needed > to map 100GB of system memory at page level granularity when compared > to using 2MB direct mapping.

Re: [PATCH] selftests/powerpc: Fix build with USERCFLAGS set

2024-07-06 Thread Michael Ellerman
On Sat, 06 Jul 2024 22:08:33 +1000, Michael Ellerman wrote: > Currently building the powerpc selftests with USERCFLAGS set to anything > causes the build to break: > > $ make -C tools/testing/selftests/powerpc V=1 USERCFLAGS=-Wno-error > ... > gcc -Wno-erro

Re: [PATCH] powerpc/pseries: Fix scv instruction crash with kexec

2024-07-06 Thread Michael Ellerman
On Tue, 25 Jun 2024 23:40:47 +1000, Nicholas Piggin wrote: > kexec on pseries disables AIL (reloc_on_exc), required for scv > instruction support, before other CPUs have been shut down. This means > they can execute scv instructions after AIL is disabled, which causes an > interrupt at an unexpecte

[PATCH] selftests/powerpc: Fix build with USERCFLAGS set

2024-07-06 Thread Michael Ellerman
me/michael/linux/tools/testing/selftests/powerpc/include -Wno-error cache_shape.c ... Fixes: 5553a79387e9 ("selftests/powerpc: Add flags.mk to support pmu buildable") Signed-off-by: Michael Ellerman --- tools/testing/selftests/powerpc/flags.mk | 5 + 1 file changed, 1 insert

Re: [PowerPC] [PASEMI] Issue with the identification of ATA drives after the of/irq updates 2024-05-29

2024-07-04 Thread Michael Ellerman
Christian Zigotzky writes: > On 04.07.24 20:27, Christian Zigotzky wrote: >> On 04.07.24 13:53, Michael Ellerman wrote: >>> Christian Zigotzky writes: ... >>> >>> Instead of that patch, can you try the one below. AFAICS the device tree >>> fixups don

Re: pdm360ng and touchscreen set up

2024-07-04 Thread Michael Ellerman
Dmitry Torokhov writes: > Hi Anatolij, Michael, > > I hope you can shed some light for me: why does pdm360ng have very > elaborate set up for the "pendown" GPIO of the touchscreen? Can we > simply fix the DTS in arch/powerpc/boot/dts/pdm360ng.dts and specify > correct pendown GPIO there, as well a

Re: [PATCH] powerpc: add missing MODULE_DESCRIPTION() macros

2024-07-04 Thread Michael Ellerman
Jeff Johnson writes: > On 6/15/2024 10:06 AM, Jeff Johnson wrote: >> With ARCH=powerpc, make allmodconfig && make W=1 C=1 reports: >> WARNING: modpost: missing MODULE_DESCRIPTION() in >> arch/powerpc/kernel/rtas_flash.o >> WARNING: modpost: missing MODULE_DESCRIPTION() in >> arch/powerpc/sysdev/

Re: [PATCH] macintosh/mac_hid: add MODULE_DESCRIPTION()

2024-07-04 Thread Michael Ellerman
Jeff Johnson writes: > Fix the make W=1 warning: > WARNING: modpost: missing MODULE_DESCRIPTION() in drivers/macintosh/mac_hid.o > > Signed-off-by: Jeff Johnson > --- > drivers/macintosh/mac_hid.c | 1 + > 1 file changed, 1 insertion(+) > > diff --git a/drivers/macintosh/mac_hid.c b/drivers/maci

Re: [PowerPC] [PASEMI] Issue with the identification of ATA drives after the of/irq updates 2024-05-29

2024-07-04 Thread Michael Ellerman
Christian Zigotzky writes: > On 02.07.24 18:54, Marc Zyngier wrote: >> On Sun, 30 Jun 2024 11:21:55 +0100, >> Christian Zigotzky wrote: >>> Hello, >>> >>> There is an issue with the identification of ATA drives with our >>> P.A. Semi Nemo boards [1] after the >>> commit "of/irq: Factor out parsin

Re: [PATCH v2 07/10] soc: fsl: cpm1: qmc: Introduce functions to get a channel from a phandle list

2024-07-03 Thread Michael Ellerman
Mark Brown writes: > On Mon, Jul 01, 2024 at 01:30:34PM +0200, Herve Codina wrote: >> qmc_chan_get_byphandle() and the resource managed version retrieve a >> channel from a simple phandle. >> >> Extend the API and introduce qmc_chan_get_byphandles_index() and the >> resource managed version in or

Re: linux-next: manual merge of the powerpc tree with the mm tree

2024-07-03 Thread Michael Ellerman
Stephen Rothwell writes: > Hi all, > > Today's linux-next merge of the powerpc tree got a conflict in: > > arch/powerpc/mm/nohash/Makefile > ... > diff --cc arch/powerpc/mm/nohash/Makefile > index 90e846f0c46c,86d0fe434824.. > --- a/arch/powerpc/mm/nohash/Makefile > +++ b/arch/powerp

Re: [PATCH] tpm: atmel: Drop PPC64 specific MMIO setup

2024-07-03 Thread Michael Ellerman
cleanup a few years back. I strongly doubt any others still exist, I couldn't find any on ebay :) > Rather than try to modernize and fix this code, just remove it. Acked-by: Michael Ellerman (powerpc) cheers > diff --git a/drivers/char/tpm/Kconfig b/drivers/char/tpm/Kconfig > index

Re: [PATCH 19/20] powerpc/xive: convert to of_property_for_each_u32_new()

2024-07-03 Thread Michael Ellerman
> --- > arch/powerpc/sysdev/xive/spapr.c | 3 +-- > 1 file changed, 1 insertion(+), 2 deletions(-) Acked-by: Michael Ellerman (powerpc) cheers

Re: [PowerPC] [PASEMI] Issue with the identification of ATA drives after the of/irq updates 2024-05-29

2024-07-03 Thread Michael Ellerman
Rob Herring writes: > On Tue, Jul 2, 2024 at 10:54 AM Marc Zyngier wrote: >> >> On Sun, 30 Jun 2024 11:21:55 +0100, >> Christian Zigotzky wrote: >> > >> > Hello, >> > >> > There is an issue with the identification of ATA drives with our >> > P.A. Semi Nemo boards [1] after the >> > commit "of/ir

Re: [PATCH v6 21/23] powerpc/64s: Use contiguous PMD/PUD instead of HUGEPD

2024-07-02 Thread Michael Ellerman
f course it is, but just to be sure). On mainline using a hugepd page hits the first warning in try_grab_folio() (via gup_hugepd()) and hangs the process. I haven't seen that reported (it goes back to v6.5), so my impression is hugepd on hash-4k is essentially unused these days. This series is an improvement on that, so let's get it into mm-unstable for some wider testing. Acked-by: Michael Ellerman (powerpc) cheers

Re: [PATCH v3 2/3] powerpc/configs: Update defconfig with now user-visible CONFIG_FSL_IFC

2024-07-02 Thread Michael Ellerman
Krzysztof Kozlowski writes: > On 30/05/2024 16:46, Esben Haabendal wrote: >> With CONFIG_FSL_IFC now being user-visible, and thus changed from a select >> to depends in CONFIG_MTD_NAND_FSL_IFC, the dependencies needs to be >> selected in defconfigs. >> >> Signed-off-by: Esben Haabendal > > Anyon

<    1   2   3   4   5   6   7   8   9   10   >