Re: [PATCH v1] powerpc/64s: Get LPID bit width from device tree

2021-11-09 Thread Nicholas Piggin
Excerpts from Fabiano Rosas's message of November 10, 2021 7:19 am: > Nicholas Piggin writes: > >> Allow the LPID bit width and partition table size to be set at runtime >> from the device tree. >> >> Move the PID bit width detection into the same place. >> >> KVM does not support using the

Re: [PASEMI] Nemo board doesn't recognize any ATA disks with the pci-v5.16 updates

2021-11-09 Thread Damien Le Moal
On 2021/11/10 7:40, Krzysztof Wilczyński wrote: > [+CC Adding Jens and Damien to get their opinion about the problem at hand] > > Hello Jens and Damien, > > Sorry to bother both of you, but we are having a problem that most > definitely requires someone with an extensive expertise in storage, >

[PATCH v1] powerpc/watchdog: help remote CPUs to flush NMI printk output

2021-11-09 Thread Nicholas Piggin
The printk layer at the moment does not seem to have a good way to force flush printk messages that are created in NMI context, except in the panic path. NMI-context printk messages normally get to the console with irq_work, but that won't help if the CPU is stuck with irqs disabled, as can be

[PATCH v3 4/4] powerpc/watchdog: read TB close to where it is used

2021-11-09 Thread Nicholas Piggin
When taking watchdog actions, printing messages, comparing and re-setting wd_smp_last_reset_tb, etc., read TB close to the point of use and under wd_smp_lock or printing lock (if applicable). This should keep timebase mostly monotonic with kernel log messages, and could prevent (in theory) a

[PATCH v3 3/4] powerpc/watchdog: Avoid holding wd_smp_lock over printk and smp_send_nmi_ipi

2021-11-09 Thread Nicholas Piggin
There is a deadlock with the console_owner lock and the wd_smp_lock: CPU x takes the console_owner lock CPU y takes a watchdog timer interrupt and takes __wd_smp_lock CPU x takes a soft-NMI interrupt, detects deadlock, spins on __wd_smp_lock CPU y detects deadlock, tries to print something and

[PATCH v3 2/4] powerpc/watchdog: tighten non-atomic read-modify-write access

2021-11-09 Thread Nicholas Piggin
Most updates to wd_smp_cpus_pending are under lock except the watchdog interrupt bit clear. This can race with non-atomic RMW updates to the mask under lock, which can happen in two instances: Firstly, if another CPU detects this one is stuck, removes it from the mask, mask becomes empty and is

[PATCH v3 1/4] powerpc/watchdog: Fix missed watchdog reset due to memory ordering race

2021-11-09 Thread Nicholas Piggin
It is possible for all CPUs to miss the pending cpumask becoming clear, and then nobody resetting it, which will cause the lockup detector to stop working. It will eventually expire, but watchdog_smp_panic will avoid doing anything if the pending mask is clear and it will never be reset. Order

[PATCH v3 0/4] powerpc: watchdog fixes

2021-11-09 Thread Nicholas Piggin
These are some watchdog fixes and improvements, in particular a deadlock between the wd_smp_lock and console lock when the watchdog fires, found by Laurent. Thanks, Nick Since v2: - Fix a false positive warning in patch 1 found by Laurent. - Move a comment change hunk to the correct patch. -

Re: [V3] powerpc/perf: Enable PMU counters post partition migration if PMU is active

2021-11-09 Thread Athira Rajeev
On 04-Nov-2021, at 11:25 AM, Michael Ellerman wrote:Nathan Lynch writes:Nicholas Piggin writes:Excerpts from Michael Ellerman's message of October 29, 2021 11:15 pm:Nicholas Piggin writes:Excerpts from Athira

[PATCH v7 5/5] powerpc/64s: Initialize and use a temporary mm for patching on Radix

2021-11-09 Thread Jordan Niethe
From: "Christopher M. Riedl" When code patching a STRICT_KERNEL_RWX kernel the page containing the address to be patched is temporarily mapped as writeable. Currently, a per-cpu vmalloc patch area is used for this purpose. While the patch area is per-cpu, the temporary page mapping is inserted

[PATCH v7 4/5] powerpc: Use WARN_ON and fix check in poking_init

2021-11-09 Thread Jordan Niethe
From: "Christopher M. Riedl" The latest kernel docs list BUG_ON() as 'deprecated' and that they should be replaced with WARN_ON() (or pr_warn()) when possible. The BUG_ON() in poking_init() warrants a WARN_ON() rather than a pr_warn() since the error condition is deemed "unreachable". Also take

[PATCH v7 3/5] powerpc: Rework and improve STRICT_KERNEL_RWX patching

2021-11-09 Thread Jordan Niethe
From: "Christopher M. Riedl" Rework code-patching with STRICT_KERNEL_RWX to prepare for a later patch which uses a temporary mm for patching under the Book3s64 Radix MMU. Make improvements by adding a WARN_ON when the patchsite doesn't match after patching and return the error from

[PATCH v7 2/5] powerpc/64s: Introduce temporary mm for Radix MMU

2021-11-09 Thread Jordan Niethe
From: "Christopher M. Riedl" x86 supports the notion of a temporary mm which restricts access to temporary PTEs to a single CPU. A temporary mm is useful for situations where a CPU needs to perform sensitive operations (such as patching a STRICT_KERNEL_RWX kernel) requiring temporary mappings

[PATCH v7 0/5] Use per-CPU temporary mappings for patching on Radix MMU

2021-11-09 Thread Jordan Niethe
This is a revision of Chris' series to introduces a per cpu temporary mm to be used for patching with strict rwx on radix mmus. The previous version of the series is here: https://lore.kernel.org/linuxppc-dev/20210911022904.30962-1-...@bluescreens.de/ v7: - introduce helper functions for

[PATCH v7 1/5] powerpc: Allow clearing and restoring registers independent of saved breakpoint state

2021-11-09 Thread Jordan Niethe
For the coming temporary mm used for instruction patching, the breakpoint registers need to be cleared to prevent them from accidentally being triggered. As soon as the patching is done, the breakpoints will be restored. The breakpoint state is stored in the per cpu variable current_brk[]. Add a

[PATCH] ASoC: imx-hdmi: add put_device() after of_find_device_by_node()

2021-11-09 Thread cgel . zte
From: Ye Guojin This was found by coccicheck: ./sound/soc/fsl/imx-hdmi.c,209,1-7,ERROR missing put_device; call of_find_device_by_node on line 119, but without a corresponding object release within this function. Reported-by: Zeal Robot Signed-off-by: Ye Guojin --- sound/soc/fsl/imx-hdmi.c

[PATCH] powerpc: Fix sigset_t copy

2021-11-09 Thread Finn Thain
From: Christophe Leroy The conversion from __copy_from_user() to __get_user() introduced a regression in __get_user_sigset() in v5.13. The bug was subsequently copied and pasted in unsafe_get_user_sigset(). The regression was reported by users of the Xorg packages distributed in Debian/powerpc

Re: [PASEMI] Nemo board doesn't recognize any ATA disks with the pci-v5.16 updates

2021-11-09 Thread Krzysztof Wilczyński
[+CC Adding Robert for visibility] Hi Arnd, Thank you looking at this! Much appreciated. > > > You could attach the kernel config there, too, since it didn't make it > > > to the mailing list (vger may discard them -- see > > > http://vger.kernel.org/majordomo-info.html). > > > > Bjorn and I

Re: [PASEMI] Nemo board doesn't recognize any ATA disks with the pci-v5.16 updates

2021-11-09 Thread Arnd Bergmann
On Tue, Nov 9, 2021 at 11:40 PM Krzysztof Wilczyński wrote: > > > > You could attach the kernel config there, too, since it didn't make it > > to the mailing list (vger may discard them -- see > > http://vger.kernel.org/majordomo-info.html). > > Bjorn and I looked at which commits that went with

Re: [PASEMI] Nemo board doesn't recognize any ATA disks with the pci-v5.16 updates

2021-11-09 Thread Krzysztof Wilczyński
[+CC Adding Jens and Damien to get their opinion about the problem at hand] Hello Jens and Damien, Sorry to bother both of you, but we are having a problem that most definitely requires someone with an extensive expertise in storage, as per the quoted message from Christian below: > > > The

[PATCH AUTOSEL 4.4 12/12] powerpc/dcr: Use cmplwi instead of 3-argument cmpli

2021-11-09 Thread Sasha Levin
From: Michael Ellerman [ Upstream commit fef071be57dc43679a32d5b0e6ee176d6f12e9f2 ] In dcr-low.S we use cmpli with three arguments, instead of four arguments as defined in the ISA: cmpli cr0,r3,1024 This appears to be a PPC440-ism, looking at the "PPC440x5 CPU Core User’s Manual" it

[PATCH AUTOSEL 4.4 10/12] powerpc/5200: dts: fix memory node unit name

2021-11-09 Thread Sasha Levin
From: Anatolij Gustschin [ Upstream commit aed2886a5e9ffc8269a4220bff1e9e030d3d2eb1 ] Fixes build warnings: Warning (unit_address_vs_reg): /memory: node has a reg or ranges property, but no unit name Signed-off-by: Anatolij Gustschin Reviewed-by: Rob Herring Signed-off-by: Michael Ellerman

[PATCH AUTOSEL 4.9 13/13] powerpc/dcr: Use cmplwi instead of 3-argument cmpli

2021-11-09 Thread Sasha Levin
From: Michael Ellerman [ Upstream commit fef071be57dc43679a32d5b0e6ee176d6f12e9f2 ] In dcr-low.S we use cmpli with three arguments, instead of four arguments as defined in the ISA: cmpli cr0,r3,1024 This appears to be a PPC440-ism, looking at the "PPC440x5 CPU Core User’s Manual" it

[PATCH AUTOSEL 4.9 11/13] powerpc/5200: dts: fix memory node unit name

2021-11-09 Thread Sasha Levin
From: Anatolij Gustschin [ Upstream commit aed2886a5e9ffc8269a4220bff1e9e030d3d2eb1 ] Fixes build warnings: Warning (unit_address_vs_reg): /memory: node has a reg or ranges property, but no unit name Signed-off-by: Anatolij Gustschin Reviewed-by: Rob Herring Signed-off-by: Michael Ellerman

[PATCH AUTOSEL 4.14 14/14] powerpc/dcr: Use cmplwi instead of 3-argument cmpli

2021-11-09 Thread Sasha Levin
From: Michael Ellerman [ Upstream commit fef071be57dc43679a32d5b0e6ee176d6f12e9f2 ] In dcr-low.S we use cmpli with three arguments, instead of four arguments as defined in the ISA: cmpli cr0,r3,1024 This appears to be a PPC440-ism, looking at the "PPC440x5 CPU Core User’s Manual" it

[PATCH AUTOSEL 4.14 12/14] powerpc/5200: dts: fix memory node unit name

2021-11-09 Thread Sasha Levin
From: Anatolij Gustschin [ Upstream commit aed2886a5e9ffc8269a4220bff1e9e030d3d2eb1 ] Fixes build warnings: Warning (unit_address_vs_reg): /memory: node has a reg or ranges property, but no unit name Signed-off-by: Anatolij Gustschin Reviewed-by: Rob Herring Signed-off-by: Michael Ellerman

[PATCH AUTOSEL 4.19 21/21] powerpc/dcr: Use cmplwi instead of 3-argument cmpli

2021-11-09 Thread Sasha Levin
From: Michael Ellerman [ Upstream commit fef071be57dc43679a32d5b0e6ee176d6f12e9f2 ] In dcr-low.S we use cmpli with three arguments, instead of four arguments as defined in the ISA: cmpli cr0,r3,1024 This appears to be a PPC440-ism, looking at the "PPC440x5 CPU Core User’s Manual" it

[PATCH AUTOSEL 4.19 19/21] powerpc/5200: dts: fix memory node unit name

2021-11-09 Thread Sasha Levin
From: Anatolij Gustschin [ Upstream commit aed2886a5e9ffc8269a4220bff1e9e030d3d2eb1 ] Fixes build warnings: Warning (unit_address_vs_reg): /memory: node has a reg or ranges property, but no unit name Signed-off-by: Anatolij Gustschin Reviewed-by: Rob Herring Signed-off-by: Michael Ellerman

[PATCH AUTOSEL 5.4 30/30] powerpc/dcr: Use cmplwi instead of 3-argument cmpli

2021-11-09 Thread Sasha Levin
From: Michael Ellerman [ Upstream commit fef071be57dc43679a32d5b0e6ee176d6f12e9f2 ] In dcr-low.S we use cmpli with three arguments, instead of four arguments as defined in the ISA: cmpli cr0,r3,1024 This appears to be a PPC440-ism, looking at the "PPC440x5 CPU Core User’s Manual" it

[PATCH AUTOSEL 5.4 28/30] powerpc/5200: dts: fix memory node unit name

2021-11-09 Thread Sasha Levin
From: Anatolij Gustschin [ Upstream commit aed2886a5e9ffc8269a4220bff1e9e030d3d2eb1 ] Fixes build warnings: Warning (unit_address_vs_reg): /memory: node has a reg or ranges property, but no unit name Signed-off-by: Anatolij Gustschin Reviewed-by: Rob Herring Signed-off-by: Michael Ellerman

[PATCH AUTOSEL 5.10 50/50] powerpc/8xx: Fix Oops with STRICT_KERNEL_RWX without DEBUG_RODATA_TEST

2021-11-09 Thread Sasha Levin
From: Christophe Leroy [ Upstream commit c12ab8dbc492b992e1ea717db933cee568780c47 ] Until now, all tests involving CONFIG_STRICT_KERNEL_RWX were done with DEBUG_RODATA_TEST to check the result. But now that CONFIG_STRICT_KERNEL_RWX is selected by default, it came without

[PATCH AUTOSEL 5.10 49/50] powerpc/dcr: Use cmplwi instead of 3-argument cmpli

2021-11-09 Thread Sasha Levin
From: Michael Ellerman [ Upstream commit fef071be57dc43679a32d5b0e6ee176d6f12e9f2 ] In dcr-low.S we use cmpli with three arguments, instead of four arguments as defined in the ISA: cmpli cr0,r3,1024 This appears to be a PPC440-ism, looking at the "PPC440x5 CPU Core User’s Manual" it

[PATCH AUTOSEL 5.10 45/50] powerpc/5200: dts: fix memory node unit name

2021-11-09 Thread Sasha Levin
From: Anatolij Gustschin [ Upstream commit aed2886a5e9ffc8269a4220bff1e9e030d3d2eb1 ] Fixes build warnings: Warning (unit_address_vs_reg): /memory: node has a reg or ranges property, but no unit name Signed-off-by: Anatolij Gustschin Reviewed-by: Rob Herring Signed-off-by: Michael Ellerman

[PATCH AUTOSEL 5.14 74/75] powerpc/8xx: Fix Oops with STRICT_KERNEL_RWX without DEBUG_RODATA_TEST

2021-11-09 Thread Sasha Levin
From: Christophe Leroy [ Upstream commit c12ab8dbc492b992e1ea717db933cee568780c47 ] Until now, all tests involving CONFIG_STRICT_KERNEL_RWX were done with DEBUG_RODATA_TEST to check the result. But now that CONFIG_STRICT_KERNEL_RWX is selected by default, it came without

[PATCH AUTOSEL 5.14 73/75] powerpc/dcr: Use cmplwi instead of 3-argument cmpli

2021-11-09 Thread Sasha Levin
From: Michael Ellerman [ Upstream commit fef071be57dc43679a32d5b0e6ee176d6f12e9f2 ] In dcr-low.S we use cmpli with three arguments, instead of four arguments as defined in the ISA: cmpli cr0,r3,1024 This appears to be a PPC440-ism, looking at the "PPC440x5 CPU Core User’s Manual" it

[PATCH AUTOSEL 5.14 67/75] powerpc/5200: dts: fix memory node unit name

2021-11-09 Thread Sasha Levin
From: Anatolij Gustschin [ Upstream commit aed2886a5e9ffc8269a4220bff1e9e030d3d2eb1 ] Fixes build warnings: Warning (unit_address_vs_reg): /memory: node has a reg or ranges property, but no unit name Signed-off-by: Anatolij Gustschin Reviewed-by: Rob Herring Signed-off-by: Michael Ellerman

[PATCH AUTOSEL 5.15 81/82] powerpc/8xx: Fix Oops with STRICT_KERNEL_RWX without DEBUG_RODATA_TEST

2021-11-09 Thread Sasha Levin
From: Christophe Leroy [ Upstream commit c12ab8dbc492b992e1ea717db933cee568780c47 ] Until now, all tests involving CONFIG_STRICT_KERNEL_RWX were done with DEBUG_RODATA_TEST to check the result. But now that CONFIG_STRICT_KERNEL_RWX is selected by default, it came without

[PATCH AUTOSEL 5.15 80/82] powerpc/dcr: Use cmplwi instead of 3-argument cmpli

2021-11-09 Thread Sasha Levin
From: Michael Ellerman [ Upstream commit fef071be57dc43679a32d5b0e6ee176d6f12e9f2 ] In dcr-low.S we use cmpli with three arguments, instead of four arguments as defined in the ISA: cmpli cr0,r3,1024 This appears to be a PPC440-ism, looking at the "PPC440x5 CPU Core User’s Manual" it

[PATCH AUTOSEL 5.15 72/82] powerpc/5200: dts: fix memory node unit name

2021-11-09 Thread Sasha Levin
From: Anatolij Gustschin [ Upstream commit aed2886a5e9ffc8269a4220bff1e9e030d3d2eb1 ] Fixes build warnings: Warning (unit_address_vs_reg): /memory: node has a reg or ranges property, but no unit name Signed-off-by: Anatolij Gustschin Reviewed-by: Rob Herring Signed-off-by: Michael Ellerman

Re: [PATCH v1] powerpc/64s: Get LPID bit width from device tree

2021-11-09 Thread Fabiano Rosas
Nicholas Piggin writes: > Allow the LPID bit width and partition table size to be set at runtime > from the device tree. > > Move the PID bit width detection into the same place. > > KVM does not support using the extra bits yet, this is mainly required > to get the PTCR register values correct.

[PATCH] powerpc: clean vdso32 and vdso64 directories

2021-11-09 Thread Masahiro Yamada
Since commit bce74491c300 ("powerpc/vdso: fix unnecessary rebuilds of vgettimeofday.o"), "make ARCH=powerpc clean" does not clean up the arch/powerpc/kernel/{vdso32,vdso64} directories. Use the subdir- trick to let "make clean" descend into them. Fixes: bce74491c300 ("powerpc/vdso: fix

Re: [PASEMI] Nemo board doesn't recognize any ATA disks with the pci-v5.16 updates

2021-11-09 Thread Bjorn Helgaas
On Tue, Nov 09, 2021 at 04:10:14PM +0100, Christian Zigotzky wrote: > On 09 November 2021 at 03:45 pm, Christian Zigotzky wrote: > > Hello, > > > > The Nemo board [1] doesn't recognize any ATA disks with the pci-v5.16 > updates [2]. > > > > Error messages: > > > > ata4.00: gc timeout cmd 0xec > >

Re: [PATCH v2] powerpc/64s: introduce CONFIG_MAXSMP to test very large SMP

2021-11-09 Thread Christophe Leroy
Le 09/11/2021 à 07:51, Nicholas Piggin a écrit : Similarly to x86, add MAXSMP that should help flush out problems with vary large SMP and other values associated with very big systems. Signed-off-by: Nicholas Piggin --- Since v1: - Reduce MAXSMP NR_CPUS to 8192 if COMPILE_TEST, to reduce

Re: [FSL P50x0] Cyrus+ board doesn't boot with the PowerPC updates 5.16-1

2021-11-09 Thread Christophe Leroy
Le 08/11/2021 à 15:48, Christian Zigotzky a écrit : Hi Christophe, The Cyrus+ board with FSL P50x0 SoC [1] doesn't boot with the PowerPC updates 5.16-1 [2]. I was able to revert the new PowerPC updates 5.16-1 [2]. After a new compiling, the kernel boots without any problems on the Cyrus+

Re: [PASEMI] Nemo board doesn't recognize any ATA disks with the pci-v5.16 updates

2021-11-09 Thread Christian Zigotzky
On 09 November 2021 at 03:45 pm, Christian Zigotzky wrote: > Hello, > > The Nemo board [1] doesn't recognize any ATA disks with the pci-v5.16 updates [2]. > > Error messages: > > ata4.00: gc timeout cmd 0xec > ata4.00: failed to IDENTIFY (I/O error, error_mask=0x4) > ata1.00: gc timeout cmd

Re: powerpc: mcu_mpc8349emitx.c:189:13: error: unused variable 'ret' [-Werror=unused-variable]

2021-11-09 Thread Stephen Rothwell
Hi Naresh, On Tue, 9 Nov 2021 18:37:48 +0530 Naresh Kamboju wrote: > > [Please ignore this email if it is already reported ] > > Regression found on powerpc gcc-8/9/10 and gcc-11 built with ppc6xx_defconfig > Following build warnings / errors reported on linux next 20211109

powerpc: mcu_mpc8349emitx.c:189:13: error: unused variable 'ret' [-Werror=unused-variable]

2021-11-09 Thread Naresh Kamboju
[Please ignore this email if it is already reported ] Regression found on powerpc gcc-8/9/10 and gcc-11 built with ppc6xx_defconfig Following build warnings / errors reported on linux next 20211109. metadata: git_describe: next-20211109 git_repo: https://gitlab.com/Linaro/lkft/mirrors

Re: [PATCH] powerpc/pseries: use slab context cpumask allocation in CPU hotplug init

2021-11-09 Thread Laurent Dufour
Le 05/11/2021 à 14:29, Nicholas Piggin a écrit : Slab is up at this point, using the bootmem allocator triggers a warning. Switch to using the regular cpumask allocator. Signed-off-by: Nicholas Piggin --- This only matters when CONFIG_CPUMASK_OFFNODE=y, which has not been possible before on