Re: [PATCH v2 1/2] mm/cma: provide option to opt out from exposing pages on activation failure

2022-01-17 Thread Hari Bathini
On 13/01/22 2:00 pm, David Hildenbrand wrote: +{ + if (!cma) + return; Do we really need that check for NULL? Probably not. + + cma->reserve_pages_on_error = true; +} + /** * cma_init_reserved_mem() - create custom contiguous area from reserved memory

Re: [PATCH v2] powerpc: Add missing SPDX license identifiers

2022-01-17 Thread Greg Kroah-Hartman
On Mon, Jan 17, 2022 at 06:41:45AM +, Christophe Leroy wrote: > Several files are missing SPDX license identifiers. > > Following files are given the following SPDX identifier based on the comments > in the top of the file: > > boot/crtsavres.S:/* SPDX-License-Identifier: GPL-2.0+ */

Re: [PATCH v2] powerpc: Add missing SPDX license identifiers to DTS files

2022-01-17 Thread Greg Kroah-Hartman
On Mon, Jan 17, 2022 at 07:03:45AM +, Christophe Leroy wrote: > Several DTS files are missing SPDX license identifiers. Normally DTS files are not just GPLv2, are you sure this is intended? > > For files in fsl/ subdirectory, GPL v2 or later is used based > on the comments in the files.

Re: [PATCH v3] powerpc/papr_scm: Implement initial support for injecting smart errors

2022-01-17 Thread Aneesh Kumar K.V
Vaibhav Jain writes: > Presently PAPR doesn't support injecting smart errors on an > NVDIMM. This makes testing the NVDIMM health reporting functionality > difficult as simulating NVDIMM health related events need a hacked up > qemu version. > > To solve this problem this patch proposes

[PATCH v4] powerpc/mce: Avoid using irq_work_queue() in realmode

2022-01-17 Thread Ganesh Goudar
In realmode mce handler we use irq_work_queue() to defer the processing of mce events, irq_work_queue() can only be called when translation is enabled because it touches memory outside RMA, hence we enable translation before calling irq_work_queue and disable on return, though it is not safe to do

Re: [PATCH v3 1/2] powerpc/mce: Avoid using irq_work_queue() in realmode

2022-01-17 Thread Ganesh
On 11/24/21 18:33, Nicholas Piggin wrote: Excerpts from Ganesh Goudar's message of November 24, 2021 7:54 pm: In realmode mce handler we use irq_work_queue() to defer the processing of mce events, irq_work_queue() can only be called when translation is enabled because it touches memory outside

Re: [PATCH v3 2/2] pseries/mce: Refactor the pseries mce handling code

2022-01-17 Thread Ganesh
On 11/24/21 18:40, Nicholas Piggin wrote: Excerpts from Ganesh Goudar's message of November 24, 2021 7:55 pm: Now that we are no longer switching on the mmu in realmode mce handler, Revert the commit 4ff753feab02("powerpc/pseries: Avoid using addr_to_pfn in real mode") partially, which

[PATCH] powerpc/32s: Enable STRICT_MODULE_RWX for the 603 core

2022-01-17 Thread Christophe Leroy
The book3s/32 MMU doesn't support per page execution protection and doesn't support RO protection for kernel pages. However, on the 603 which implements software loaded TLBs, execution protection is honored by the TLB Miss handler which doesn't load Instruction TLB for non executable pages. And

[RFC PATCH 1/3] powerpc/64s: Fix system call emulation

2022-01-17 Thread Nicholas Piggin
Interrupt return code expects the returned-to irq state to be reconciled with the returned-to MSR[EE] state. That is, if local irqs are enabled then MSR[EE] must be set, and if MSR[EE] is not set then local irqs must be disabled. System call emulation (both sc and scv 0) does not get this right,

[PATCH v2 2/5] dt-bindings: tlv320aic31xx: Define PLL clock inputs

2022-01-17 Thread Ariel D'Alessandro
Add constants for the different PLL clock inputs in tlv320aic31xx. Signed-off-by: Ariel D'Alessandro --- include/dt-bindings/sound/tlv320aic31xx.h | 5 + 1 file changed, 5 insertions(+) diff --git a/include/dt-bindings/sound/tlv320aic31xx.h b/include/dt-bindings/sound/tlv320aic31xx.h

[PATCH v2 3/5] ASoC: bindings: fsl-asoc-card: Add mclk-id optional property

2022-01-17 Thread Ariel D'Alessandro
Support setting the sound card main clock input from the device-tree using the mclk-id property. Signed-off-by: Ariel D'Alessandro --- Documentation/devicetree/bindings/sound/fsl-asoc-card.txt | 1 + 1 file changed, 1 insertion(+) diff --git

[PATCH v2 4/5] ASoC: fsl-asoc-card: Add optional dt property for setting mclk-id

2022-01-17 Thread Ariel D'Alessandro
Sound cards may allow using different main clock inputs. In the generic fsl-asoc-card driver, these values are hardcoded for each specific card configuration. Let's make it more flexible, allowing setting mclk-id from the device-tree node. Otherwise, the default value for each card configuration

[PATCH v2 1/5] dt-bindings: sound: Rename tlv320aic31xx-micbias as tlv320aic31xx

2022-01-17 Thread Ariel D'Alessandro
Let's use a more generic name, so other definitions for tlv320aic31xx can be included. Signed-off-by: Ariel D'Alessandro Acked-by: Rob Herring --- .../devicetree/bindings/sound/tlv320aic31xx.txt | 2 +- arch/arm/boot/dts/am43x-epos-evm.dts | 2 +-

[PATCH v2 0/5] fsl-asoc-card: Add optional dt property for setting mclk-id

2022-01-17 Thread Ariel D'Alessandro
This is a follow up of patchset: [RFC patch 0/5] Support BCLK input clock in tlv320aic31xx Sound cards may allow using different main clock inputs. In the generic fsl-asoc-card driver, these values are hardcoded for each specific card configuration. Let's make it more flexible, allowing

[PATCH] powerpc/64s: Mask SRR0 before checking against the masked NIP

2022-01-17 Thread Nicholas Piggin
Commit 314f6c23dd8d ("powerpc/64s: Mask NIP before checking against SRR0") masked off the low 2 bits of the NIP value in the interrupt stack frame in case they are non-zero and mis-compare against a SRR0 register value of a CPU which always reads back 0 from the 2 low bits which are reserved.

Re: [PATCH v3] powerpc/papr_scm: Implement initial support for injecting smart errors

2022-01-17 Thread Vaibhav Jain
Thanks for reviewing this patch Aneesh. My responses to your comments below: "Aneesh Kumar K.V" writes: > Vaibhav Jain writes: > >> Presently PAPR doesn't support injecting smart errors on an >> NVDIMM. This makes testing the NVDIMM health reporting functionality >> difficult as simulating

[RFC PATCH 1/3] powerpc/64s: Fix system call emulation

2022-01-17 Thread Nicholas Piggin
Interrupt return code expects the returned-to irq state to be reconciled with the returned-to MSR[EE] state. That is, if local irqs are enabled then MSR[EE] must be set, and if MSR[EE] is not set then local irqs must be disabled. System call emulation (both sc and scv 0) does not get this right,

[RFC PATCH 2/3] powerpc/64s: Emulate scv syscalls if facility unavailable and PR KVM is possible

2022-01-17 Thread Nicholas Piggin
The SCV facility will be disabled at runtime in the host by PR KVM by the next change, emulate it in the facility unavailable handler. Signed-off-by: Nicholas Piggin --- arch/powerpc/kernel/traps.c | 45 + 1 file changed, 45 insertions(+) diff --git

[RFC PATCH 3/3] KVM: PPC: Book3S PR: Disable SCV when running AIL is disabled

2022-01-17 Thread Nicholas Piggin
PR KVM does not support running with AIL enabled, and SCV does is not supported with AIL disabled. When PR KVM disables AIL on a system that has SCV enabled, the guest can crash the host if it executes scv, or the host can crash itself if another CPU executes scv while AIL is disabled (e.g., in

[PATCH v2 5/5] ASoC: fsl-asoc-card: Remove BCLK default value for tlv320aic31xx card

2022-01-17 Thread Ariel D'Alessandro
Now that fsl-asoc-card support setting mclk-id through the device-tree mclk-id property, let's remove the default BCLK configuration for this card. Signed-off-by: Ariel D'Alessandro --- sound/soc/fsl/fsl-asoc-card.c | 1 - 1 file changed, 1 deletion(-) diff --git

Re: [PATCH net 1/4] net/fsl: xgmac_mdio: Add workaround for erratum A-009885

2022-01-17 Thread Andrew Lunn
On Mon, Jan 17, 2022 at 08:24:22AM +0100, Tobias Waldekranz wrote: > On Sun, Jan 16, 2022 at 23:02, Andrew Lunn wrote: > > On Sun, Jan 16, 2022 at 10:15:26PM +0100, Tobias Waldekranz wrote: > >> Once an MDIO read transaction is initiated, we must read back the data > >> register within 16 MDC

[PATCH AUTOSEL 5.16 06/52] powerpc/btext: add missing of_node_put

2022-01-17 Thread Sasha Levin
From: Julia Lawall [ Upstream commit a1d2b210ffa52d60acabbf7b6af3ef7e1e69cda0 ] for_each_node_by_type performs an of_node_get on each iteration, so a break out of the loop requires an of_node_put. A simplified version of the semantic patch that fixes this problem is as follows

[PATCH AUTOSEL 5.16 05/52] powerpc/cell: add missing of_node_put

2022-01-17 Thread Sasha Levin
From: Julia Lawall [ Upstream commit a841fd009e51c8c0a8f07c942e9ab6bb48da8858 ] for_each_node_by_name performs an of_node_get on each iteration, so a break out of the loop requires an of_node_put. A simplified version of the semantic patch that fixes this problem is as follows

[PATCH AUTOSEL 5.16 10/52] powerpc/smp: Move setup_profiling_timer() under CONFIG_PROFILING

2022-01-17 Thread Sasha Levin
From: Michael Ellerman [ Upstream commit a4ac0d249a5db80e79d573db9e4ad29354b643a8 ] setup_profiling_timer() is only needed when CONFIG_PROFILING is enabled. Fixes the following W=1 warning when CONFIG_PROFILING=n: linux/arch/powerpc/kernel/smp.c:1638:5: error: no previous prototype for

[PATCH AUTOSEL 5.16 08/52] ASoC: imx-hdmi: add put_device() after of_find_device_by_node()

2022-01-17 Thread Sasha Levin
From: Ye Guojin [ Upstream commit f670b274f7f6f4b2722d7f08d0fddf606a727e92 ] 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

[PATCH AUTOSEL 5.16 29/52] powerpc: handle kdump appropriately with crash_kexec_post_notifiers option

2022-01-17 Thread Sasha Levin
From: Hari Bathini [ Upstream commit 219572d2fc4135b5ce65c735d881787d48b10e71 ] Kdump can be triggered after panic_notifers since commit f06e5153f4ae2 ("kernel/panic.c: add "crash_kexec_post_notifiers" option for kdump after panic_notifers") introduced crash_kexec_post_notifiers option. But

[PATCH AUTOSEL 5.16 30/52] powerpc/fadump: Fix inaccurate CPU state info in vmcore generated with panic

2022-01-17 Thread Sasha Levin
From: Hari Bathini [ Upstream commit 06e629c25daa519be620a8c17359ae8fc7a2e903 ] In panic path, fadump is triggered via a panic notifier function. Before calling panic notifier functions, smp_send_stop() gets called, which stops all CPUs except the panic'ing CPU. Commit 8389b37dffdc ("powerpc:

[PATCH AUTOSEL 5.15 04/44] powerpc/cell: add missing of_node_put

2022-01-17 Thread Sasha Levin
From: Julia Lawall [ Upstream commit a841fd009e51c8c0a8f07c942e9ab6bb48da8858 ] for_each_node_by_name performs an of_node_get on each iteration, so a break out of the loop requires an of_node_put. A simplified version of the semantic patch that fixes this problem is as follows

[PATCH AUTOSEL 5.15 14/44] KVM: PPC: Book3S: Suppress failed alloc warning in H_COPY_TOFROM_GUEST

2022-01-17 Thread Sasha Levin
From: Alexey Kardashevskiy [ Upstream commit 792020907b11c6f9246c21977cab3bad985ae4b6 ] H_COPY_TOFROM_GUEST is an hcall for an upper level VM to access its nested VMs memory. The userspace can trigger WARN_ON_ONCE(!(gfp & __GFP_NOWARN)) in __alloc_pages() by constructing a tiny VM which only

[PATCH AUTOSEL 5.15 12/44] powerpc/powermac: Add missing lockdep_register_key()

2022-01-17 Thread Sasha Levin
From: Christophe Leroy [ Upstream commit df1f679d19edb9eeb67cc2f96b29375f21991945 ] KeyWest i2c @0xf8001003 irq 42 /uni-n@f800/i2c@f8001000 BUG: key c2d00cbc has not been registered! [ cut here ] DEBUG_LOCKS_WARN_ON(1) WARNING: CPU: 0 PID: 1 at

[PATCH AUTOSEL 5.15 09/44] powerpc/smp: Move setup_profiling_timer() under CONFIG_PROFILING

2022-01-17 Thread Sasha Levin
From: Michael Ellerman [ Upstream commit a4ac0d249a5db80e79d573db9e4ad29354b643a8 ] setup_profiling_timer() is only needed when CONFIG_PROFILING is enabled. Fixes the following W=1 warning when CONFIG_PROFILING=n: linux/arch/powerpc/kernel/smp.c:1638:5: error: no previous prototype for

[PATCH AUTOSEL 5.15 13/44] KVM: PPC: Book3S: Suppress warnings when allocating too big memory slots

2022-01-17 Thread Sasha Levin
From: Alexey Kardashevskiy [ Upstream commit 511d25d6b789fffcb20a3eb71899cf974a31bd9d ] The userspace can trigger "vmalloc size %lu allocation failure: exceeds total pages" via the KVM_SET_USER_MEMORY_REGION ioctl. This silences the warning by checking the limit before calling vzalloc() and

[PATCH AUTOSEL 5.10 07/34] powerpc/watchdog: Fix missed watchdog reset due to memory ordering race

2022-01-17 Thread Sasha Levin
From: Nicholas Piggin [ Upstream commit 5dad4ba68a2483fc80d70b9dc90bbe16e1f27263 ] 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

[PATCH AUTOSEL 5.10 06/34] powerpc/btext: add missing of_node_put

2022-01-17 Thread Sasha Levin
From: Julia Lawall [ Upstream commit a1d2b210ffa52d60acabbf7b6af3ef7e1e69cda0 ] for_each_node_by_type performs an of_node_get on each iteration, so a break out of the loop requires an of_node_put. A simplified version of the semantic patch that fixes this problem is as follows

[PATCH AUTOSEL 5.4 04/21] powerpc/cell: add missing of_node_put

2022-01-17 Thread Sasha Levin
From: Julia Lawall [ Upstream commit a841fd009e51c8c0a8f07c942e9ab6bb48da8858 ] for_each_node_by_name performs an of_node_get on each iteration, so a break out of the loop requires an of_node_put. A simplified version of the semantic patch that fixes this problem is as follows

[PATCH AUTOSEL 5.4 03/21] powerpc/powernv: add missing of_node_put

2022-01-17 Thread Sasha Levin
From: Julia Lawall [ Upstream commit 7d405a939ca960162eb30c1475759cb2fdf38f8c ] for_each_compatible_node performs an of_node_get on each iteration, so a break out of the loop requires an of_node_put. A simplified version of the semantic patch that fixes this problem is as follows

[PATCH AUTOSEL 5.4 06/21] powerpc/watchdog: Fix missed watchdog reset due to memory ordering race

2022-01-17 Thread Sasha Levin
From: Nicholas Piggin [ Upstream commit 5dad4ba68a2483fc80d70b9dc90bbe16e1f27263 ] 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

[PATCH AUTOSEL 5.4 08/21] powerpc/smp: Move setup_profiling_timer() under CONFIG_PROFILING

2022-01-17 Thread Sasha Levin
From: Michael Ellerman [ Upstream commit a4ac0d249a5db80e79d573db9e4ad29354b643a8 ] setup_profiling_timer() is only needed when CONFIG_PROFILING is enabled. Fixes the following W=1 warning when CONFIG_PROFILING=n: linux/arch/powerpc/kernel/smp.c:1638:5: error: no previous prototype for

[PATCH AUTOSEL 4.19 06/17] powerpc/watchdog: Fix missed watchdog reset due to memory ordering race

2022-01-17 Thread Sasha Levin
From: Nicholas Piggin [ Upstream commit 5dad4ba68a2483fc80d70b9dc90bbe16e1f27263 ] 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

[PATCH AUTOSEL 4.19 05/17] powerpc/btext: add missing of_node_put

2022-01-17 Thread Sasha Levin
From: Julia Lawall [ Upstream commit a1d2b210ffa52d60acabbf7b6af3ef7e1e69cda0 ] for_each_node_by_type performs an of_node_get on each iteration, so a break out of the loop requires an of_node_put. A simplified version of the semantic patch that fixes this problem is as follows

[PATCH AUTOSEL 4.14 08/16] powerpc/smp: Move setup_profiling_timer() under CONFIG_PROFILING

2022-01-17 Thread Sasha Levin
From: Michael Ellerman [ Upstream commit a4ac0d249a5db80e79d573db9e4ad29354b643a8 ] setup_profiling_timer() is only needed when CONFIG_PROFILING is enabled. Fixes the following W=1 warning when CONFIG_PROFILING=n: linux/arch/powerpc/kernel/smp.c:1638:5: error: no previous prototype for

[PATCH AUTOSEL 4.9 02/13] powerpc/powernv: add missing of_node_put

2022-01-17 Thread Sasha Levin
From: Julia Lawall [ Upstream commit 7d405a939ca960162eb30c1475759cb2fdf38f8c ] for_each_compatible_node performs an of_node_get on each iteration, so a break out of the loop requires an of_node_put. A simplified version of the semantic patch that fixes this problem is as follows

[PATCH AUTOSEL 4.9 06/13] powerpc/smp: Move setup_profiling_timer() under CONFIG_PROFILING

2022-01-17 Thread Sasha Levin
From: Michael Ellerman [ Upstream commit a4ac0d249a5db80e79d573db9e4ad29354b643a8 ] setup_profiling_timer() is only needed when CONFIG_PROFILING is enabled. Fixes the following W=1 warning when CONFIG_PROFILING=n: linux/arch/powerpc/kernel/smp.c:1638:5: error: no previous prototype for

[PATCH AUTOSEL 4.4 01/12] powerpc/6xx: add missing of_node_put

2022-01-17 Thread Sasha Levin
From: Julia Lawall [ Upstream commit f6e82647ff71d427d4148964b71f239fba9d7937 ] for_each_compatible_node performs an of_node_get on each iteration, so a break out of the loop requires an of_node_put. A simplified version of the semantic patch that fixes this problem is as follows

[PATCH AUTOSEL 4.9 04/13] powerpc/btext: add missing of_node_put

2022-01-17 Thread Sasha Levin
From: Julia Lawall [ Upstream commit a1d2b210ffa52d60acabbf7b6af3ef7e1e69cda0 ] for_each_node_by_type performs an of_node_get on each iteration, so a break out of the loop requires an of_node_put. A simplified version of the semantic patch that fixes this problem is as follows

[PATCH AUTOSEL 5.16 27/52] powerpc/40x: Map 32Mbytes of memory at startup

2022-01-17 Thread Sasha Levin
From: Christophe Leroy [ Upstream commit 06e7cbc29e97b4713b4ea6def04ae8501a7d1a59 ] As reported by Carlo, 16Mbytes is not enough with modern kernels that tend to be a bit big, so map another 16M page at boot. Signed-off-by: Christophe Leroy Signed-off-by: Michael Ellerman Link:

[PATCH AUTOSEL 5.16 14/52] KVM: PPC: Book3S: Suppress warnings when allocating too big memory slots

2022-01-17 Thread Sasha Levin
From: Alexey Kardashevskiy [ Upstream commit 511d25d6b789fffcb20a3eb71899cf974a31bd9d ] The userspace can trigger "vmalloc size %lu allocation failure: exceeds total pages" via the KVM_SET_USER_MEMORY_REGION ioctl. This silences the warning by checking the limit before calling vzalloc() and

[PATCH AUTOSEL 5.16 15/52] KVM: PPC: Book3S: Suppress failed alloc warning in H_COPY_TOFROM_GUEST

2022-01-17 Thread Sasha Levin
From: Alexey Kardashevskiy [ Upstream commit 792020907b11c6f9246c21977cab3bad985ae4b6 ] H_COPY_TOFROM_GUEST is an hcall for an upper level VM to access its nested VMs memory. The userspace can trigger WARN_ON_ONCE(!(gfp & __GFP_NOWARN)) in __alloc_pages() by constructing a tiny VM which only

[PATCH AUTOSEL 5.15 02/44] powerpc/6xx: add missing of_node_put

2022-01-17 Thread Sasha Levin
From: Julia Lawall [ Upstream commit f6e82647ff71d427d4148964b71f239fba9d7937 ] for_each_compatible_node performs an of_node_get on each iteration, so a break out of the loop requires an of_node_put. A simplified version of the semantic patch that fixes this problem is as follows

[PATCH AUTOSEL 5.16 39/52] selftests/powerpc: Add a test of sigreturning to the kernel

2022-01-17 Thread Sasha Levin
From: Michael Ellerman [ Upstream commit a8968521cfdc3e339fe69473d6632e0aa8d7202a ] We have a general signal fuzzer, sigfuz, which can modify the MSR & NIP before sigreturn. But the chance of it hitting a kernel address and also clearing MSR_PR is fairly slim. So add a specific test of

[PATCH AUTOSEL 5.15 03/44] powerpc/powernv: add missing of_node_put

2022-01-17 Thread Sasha Levin
From: Julia Lawall [ Upstream commit 7d405a939ca960162eb30c1475759cb2fdf38f8c ] for_each_compatible_node performs an of_node_get on each iteration, so a break out of the loop requires an of_node_put. A simplified version of the semantic patch that fixes this problem is as follows

[PATCH AUTOSEL 5.15 24/44] powerpc/40x: Map 32Mbytes of memory at startup

2022-01-17 Thread Sasha Levin
From: Christophe Leroy [ Upstream commit 06e7cbc29e97b4713b4ea6def04ae8501a7d1a59 ] As reported by Carlo, 16Mbytes is not enough with modern kernels that tend to be a bit big, so map another 16M page at boot. Signed-off-by: Christophe Leroy Signed-off-by: Michael Ellerman Link:

[PATCH AUTOSEL 5.15 25/44] selftests/powerpc/spectre_v2: Return skip code when miss_percent is high

2022-01-17 Thread Sasha Levin
From: Thadeu Lima de Souza Cascardo [ Upstream commit 3c42e9542050d49610077e083c7c3f5fd5e26820 ] A mis-match between reported and actual mitigation is not restricted to the Vulnerable case. The guest might also report the mitigation as "Software count cache flush" and the host will still

[PATCH AUTOSEL 5.15 33/44] selftests/powerpc: Add a test of sigreturning to the kernel

2022-01-17 Thread Sasha Levin
From: Michael Ellerman [ Upstream commit a8968521cfdc3e339fe69473d6632e0aa8d7202a ] We have a general signal fuzzer, sigfuz, which can modify the MSR & NIP before sigreturn. But the chance of it hitting a kernel address and also clearing MSR_PR is fairly slim. So add a specific test of

[PATCH AUTOSEL 5.10 03/34] powerpc/6xx: add missing of_node_put

2022-01-17 Thread Sasha Levin
From: Julia Lawall [ Upstream commit f6e82647ff71d427d4148964b71f239fba9d7937 ] for_each_compatible_node performs an of_node_get on each iteration, so a break out of the loop requires an of_node_put. A simplified version of the semantic patch that fixes this problem is as follows

[PATCH AUTOSEL 5.10 13/34] KVM: PPC: Book3S: Suppress warnings when allocating too big memory slots

2022-01-17 Thread Sasha Levin
From: Alexey Kardashevskiy [ Upstream commit 511d25d6b789fffcb20a3eb71899cf974a31bd9d ] The userspace can trigger "vmalloc size %lu allocation failure: exceeds total pages" via the KVM_SET_USER_MEMORY_REGION ioctl. This silences the warning by checking the limit before calling vzalloc() and

[PATCH AUTOSEL 5.10 14/34] KVM: PPC: Book3S: Suppress failed alloc warning in H_COPY_TOFROM_GUEST

2022-01-17 Thread Sasha Levin
From: Alexey Kardashevskiy [ Upstream commit 792020907b11c6f9246c21977cab3bad985ae4b6 ] H_COPY_TOFROM_GUEST is an hcall for an upper level VM to access its nested VMs memory. The userspace can trigger WARN_ON_ONCE(!(gfp & __GFP_NOWARN)) in __alloc_pages() by constructing a tiny VM which only

[PATCH AUTOSEL 5.4 02/21] powerpc/6xx: add missing of_node_put

2022-01-17 Thread Sasha Levin
From: Julia Lawall [ Upstream commit f6e82647ff71d427d4148964b71f239fba9d7937 ] for_each_compatible_node performs an of_node_get on each iteration, so a break out of the loop requires an of_node_put. A simplified version of the semantic patch that fixes this problem is as follows

[PATCH AUTOSEL 5.4 11/21] powerpc/powermac: Add missing lockdep_register_key()

2022-01-17 Thread Sasha Levin
From: Christophe Leroy [ Upstream commit df1f679d19edb9eeb67cc2f96b29375f21991945 ] KeyWest i2c @0xf8001003 irq 42 /uni-n@f800/i2c@f8001000 BUG: key c2d00cbc has not been registered! [ cut here ] DEBUG_LOCKS_WARN_ON(1) WARNING: CPU: 0 PID: 1 at

[PATCH AUTOSEL 5.4 12/21] KVM: PPC: Book3S: Suppress failed alloc warning in H_COPY_TOFROM_GUEST

2022-01-17 Thread Sasha Levin
From: Alexey Kardashevskiy [ Upstream commit 792020907b11c6f9246c21977cab3bad985ae4b6 ] H_COPY_TOFROM_GUEST is an hcall for an upper level VM to access its nested VMs memory. The userspace can trigger WARN_ON_ONCE(!(gfp & __GFP_NOWARN)) in __alloc_pages() by constructing a tiny VM which only

[PATCH AUTOSEL 4.19 08/17] powerpc/smp: Move setup_profiling_timer() under CONFIG_PROFILING

2022-01-17 Thread Sasha Levin
From: Michael Ellerman [ Upstream commit a4ac0d249a5db80e79d573db9e4ad29354b643a8 ] setup_profiling_timer() is only needed when CONFIG_PROFILING is enabled. Fixes the following W=1 warning when CONFIG_PROFILING=n: linux/arch/powerpc/kernel/smp.c:1638:5: error: no previous prototype for

[PATCH AUTOSEL 4.19 12/17] powerpc: handle kdump appropriately with crash_kexec_post_notifiers option

2022-01-17 Thread Sasha Levin
From: Hari Bathini [ Upstream commit 219572d2fc4135b5ce65c735d881787d48b10e71 ] Kdump can be triggered after panic_notifers since commit f06e5153f4ae2 ("kernel/panic.c: add "crash_kexec_post_notifiers" option for kdump after panic_notifers") introduced crash_kexec_post_notifiers option. But

[PATCH AUTOSEL 4.14 06/16] powerpc/watchdog: Fix missed watchdog reset due to memory ordering race

2022-01-17 Thread Sasha Levin
From: Nicholas Piggin [ Upstream commit 5dad4ba68a2483fc80d70b9dc90bbe16e1f27263 ] 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

[PATCH AUTOSEL 4.14 05/16] powerpc/btext: add missing of_node_put

2022-01-17 Thread Sasha Levin
From: Julia Lawall [ Upstream commit a1d2b210ffa52d60acabbf7b6af3ef7e1e69cda0 ] for_each_node_by_type performs an of_node_get on each iteration, so a break out of the loop requires an of_node_put. A simplified version of the semantic patch that fixes this problem is as follows

[PATCH AUTOSEL 4.4 03/12] powerpc/cell: add missing of_node_put

2022-01-17 Thread Sasha Levin
From: Julia Lawall [ Upstream commit a841fd009e51c8c0a8f07c942e9ab6bb48da8858 ] for_each_node_by_name performs an of_node_get on each iteration, so a break out of the loop requires an of_node_put. A simplified version of the semantic patch that fixes this problem is as follows

[PATCH AUTOSEL 5.16 07/52] powerpc/watchdog: Fix missed watchdog reset due to memory ordering race

2022-01-17 Thread Sasha Levin
From: Nicholas Piggin [ Upstream commit 5dad4ba68a2483fc80d70b9dc90bbe16e1f27263 ] 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

[PATCH AUTOSEL 5.16 04/52] powerpc/powernv: add missing of_node_put

2022-01-17 Thread Sasha Levin
From: Julia Lawall [ Upstream commit 7d405a939ca960162eb30c1475759cb2fdf38f8c ] for_each_compatible_node performs an of_node_get on each iteration, so a break out of the loop requires an of_node_put. A simplified version of the semantic patch that fixes this problem is as follows

[PATCH AUTOSEL 5.15 07/44] ASoC: imx-hdmi: add put_device() after of_find_device_by_node()

2022-01-17 Thread Sasha Levin
From: Ye Guojin [ Upstream commit f670b274f7f6f4b2722d7f08d0fddf606a727e92 ] 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

[PATCH AUTOSEL 5.10 09/34] powerpc/smp: Move setup_profiling_timer() under CONFIG_PROFILING

2022-01-17 Thread Sasha Levin
From: Michael Ellerman [ Upstream commit a4ac0d249a5db80e79d573db9e4ad29354b643a8 ] setup_profiling_timer() is only needed when CONFIG_PROFILING is enabled. Fixes the following W=1 warning when CONFIG_PROFILING=n: linux/arch/powerpc/kernel/smp.c:1638:5: error: no previous prototype for

[PATCH AUTOSEL 5.10 12/34] powerpc/powermac: Add missing lockdep_register_key()

2022-01-17 Thread Sasha Levin
From: Christophe Leroy [ Upstream commit df1f679d19edb9eeb67cc2f96b29375f21991945 ] KeyWest i2c @0xf8001003 irq 42 /uni-n@f800/i2c@f8001000 BUG: key c2d00cbc has not been registered! [ cut here ] DEBUG_LOCKS_WARN_ON(1) WARNING: CPU: 0 PID: 1 at

[PATCH AUTOSEL 5.10 24/34] powerpc/fadump: Fix inaccurate CPU state info in vmcore generated with panic

2022-01-17 Thread Sasha Levin
From: Hari Bathini [ Upstream commit 06e629c25daa519be620a8c17359ae8fc7a2e903 ] In panic path, fadump is triggered via a panic notifier function. Before calling panic notifier functions, smp_send_stop() gets called, which stops all CPUs except the panic'ing CPU. Commit 8389b37dffdc ("powerpc:

[PATCH AUTOSEL 5.10 23/34] powerpc: handle kdump appropriately with crash_kexec_post_notifiers option

2022-01-17 Thread Sasha Levin
From: Hari Bathini [ Upstream commit 219572d2fc4135b5ce65c735d881787d48b10e71 ] Kdump can be triggered after panic_notifers since commit f06e5153f4ae2 ("kernel/panic.c: add "crash_kexec_post_notifiers" option for kdump after panic_notifers") introduced crash_kexec_post_notifiers option. But

[PATCH AUTOSEL 4.19 02/17] powerpc/6xx: add missing of_node_put

2022-01-17 Thread Sasha Levin
From: Julia Lawall [ Upstream commit f6e82647ff71d427d4148964b71f239fba9d7937 ] for_each_compatible_node performs an of_node_get on each iteration, so a break out of the loop requires an of_node_put. A simplified version of the semantic patch that fixes this problem is as follows

[PATCH AUTOSEL 5.4 16/21] powerpc: handle kdump appropriately with crash_kexec_post_notifiers option

2022-01-17 Thread Sasha Levin
From: Hari Bathini [ Upstream commit 219572d2fc4135b5ce65c735d881787d48b10e71 ] Kdump can be triggered after panic_notifers since commit f06e5153f4ae2 ("kernel/panic.c: add "crash_kexec_post_notifiers" option for kdump after panic_notifers") introduced crash_kexec_post_notifiers option. But

[PATCH AUTOSEL 4.14 04/16] powerpc/cell: add missing of_node_put

2022-01-17 Thread Sasha Levin
From: Julia Lawall [ Upstream commit a841fd009e51c8c0a8f07c942e9ab6bb48da8858 ] for_each_node_by_name performs an of_node_get on each iteration, so a break out of the loop requires an of_node_put. A simplified version of the semantic patch that fixes this problem is as follows

[PATCH AUTOSEL 4.14 03/16] powerpc/powernv: add missing of_node_put

2022-01-17 Thread Sasha Levin
From: Julia Lawall [ Upstream commit 7d405a939ca960162eb30c1475759cb2fdf38f8c ] for_each_compatible_node performs an of_node_get on each iteration, so a break out of the loop requires an of_node_put. A simplified version of the semantic patch that fixes this problem is as follows

[PATCH AUTOSEL 4.4 06/12] powerpc/smp: Move setup_profiling_timer() under CONFIG_PROFILING

2022-01-17 Thread Sasha Levin
From: Michael Ellerman [ Upstream commit a4ac0d249a5db80e79d573db9e4ad29354b643a8 ] setup_profiling_timer() is only needed when CONFIG_PROFILING is enabled. Fixes the following W=1 warning when CONFIG_PROFILING=n: linux/arch/powerpc/kernel/smp.c:1638:5: error: no previous prototype for

[PATCH AUTOSEL 5.16 03/52] powerpc/6xx: add missing of_node_put

2022-01-17 Thread Sasha Levin
From: Julia Lawall [ Upstream commit f6e82647ff71d427d4148964b71f239fba9d7937 ] for_each_compatible_node performs an of_node_get on each iteration, so a break out of the loop requires an of_node_put. A simplified version of the semantic patch that fixes this problem is as follows

[PATCH AUTOSEL 5.16 13/52] powerpc/powermac: Add missing lockdep_register_key()

2022-01-17 Thread Sasha Levin
From: Christophe Leroy [ Upstream commit df1f679d19edb9eeb67cc2f96b29375f21991945 ] KeyWest i2c @0xf8001003 irq 42 /uni-n@f800/i2c@f8001000 BUG: key c2d00cbc has not been registered! [ cut here ] DEBUG_LOCKS_WARN_ON(1) WARNING: CPU: 0 PID: 1 at

[PATCH AUTOSEL 5.16 28/52] selftests/powerpc/spectre_v2: Return skip code when miss_percent is high

2022-01-17 Thread Sasha Levin
From: Thadeu Lima de Souza Cascardo [ Upstream commit 3c42e9542050d49610077e083c7c3f5fd5e26820 ] A mis-match between reported and actual mitigation is not restricted to the Vulnerable case. The guest might also report the mitigation as "Software count cache flush" and the host will still

[PATCH AUTOSEL 5.15 05/44] powerpc/btext: add missing of_node_put

2022-01-17 Thread Sasha Levin
From: Julia Lawall [ Upstream commit a1d2b210ffa52d60acabbf7b6af3ef7e1e69cda0 ] for_each_node_by_type performs an of_node_get on each iteration, so a break out of the loop requires an of_node_put. A simplified version of the semantic patch that fixes this problem is as follows

[PATCH AUTOSEL 5.15 06/44] powerpc/watchdog: Fix missed watchdog reset due to memory ordering race

2022-01-17 Thread Sasha Levin
From: Nicholas Piggin [ Upstream commit 5dad4ba68a2483fc80d70b9dc90bbe16e1f27263 ] 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

[PATCH AUTOSEL 5.15 26/44] powerpc: handle kdump appropriately with crash_kexec_post_notifiers option

2022-01-17 Thread Sasha Levin
From: Hari Bathini [ Upstream commit 219572d2fc4135b5ce65c735d881787d48b10e71 ] Kdump can be triggered after panic_notifers since commit f06e5153f4ae2 ("kernel/panic.c: add "crash_kexec_post_notifiers" option for kdump after panic_notifers") introduced crash_kexec_post_notifiers option. But

[PATCH AUTOSEL 5.15 27/44] powerpc/fadump: Fix inaccurate CPU state info in vmcore generated with panic

2022-01-17 Thread Sasha Levin
From: Hari Bathini [ Upstream commit 06e629c25daa519be620a8c17359ae8fc7a2e903 ] In panic path, fadump is triggered via a panic notifier function. Before calling panic notifier functions, smp_send_stop() gets called, which stops all CPUs except the panic'ing CPU. Commit 8389b37dffdc ("powerpc:

[PATCH AUTOSEL 5.10 04/34] powerpc/powernv: add missing of_node_put

2022-01-17 Thread Sasha Levin
From: Julia Lawall [ Upstream commit 7d405a939ca960162eb30c1475759cb2fdf38f8c ] for_each_compatible_node performs an of_node_get on each iteration, so a break out of the loop requires an of_node_put. A simplified version of the semantic patch that fixes this problem is as follows

[PATCH AUTOSEL 5.10 05/34] powerpc/cell: add missing of_node_put

2022-01-17 Thread Sasha Levin
From: Julia Lawall [ Upstream commit a841fd009e51c8c0a8f07c942e9ab6bb48da8858 ] for_each_node_by_name performs an of_node_get on each iteration, so a break out of the loop requires an of_node_put. A simplified version of the semantic patch that fixes this problem is as follows

[PATCH AUTOSEL 5.10 21/34] powerpc/40x: Map 32Mbytes of memory at startup

2022-01-17 Thread Sasha Levin
From: Christophe Leroy [ Upstream commit 06e7cbc29e97b4713b4ea6def04ae8501a7d1a59 ] As reported by Carlo, 16Mbytes is not enough with modern kernels that tend to be a bit big, so map another 16M page at boot. Signed-off-by: Christophe Leroy Signed-off-by: Michael Ellerman Link:

[PATCH AUTOSEL 5.10 22/34] selftests/powerpc/spectre_v2: Return skip code when miss_percent is high

2022-01-17 Thread Sasha Levin
From: Thadeu Lima de Souza Cascardo [ Upstream commit 3c42e9542050d49610077e083c7c3f5fd5e26820 ] A mis-match between reported and actual mitigation is not restricted to the Vulnerable case. The guest might also report the mitigation as "Software count cache flush" and the host will still

[PATCH AUTOSEL 5.4 05/21] powerpc/btext: add missing of_node_put

2022-01-17 Thread Sasha Levin
From: Julia Lawall [ Upstream commit a1d2b210ffa52d60acabbf7b6af3ef7e1e69cda0 ] for_each_node_by_type performs an of_node_get on each iteration, so a break out of the loop requires an of_node_put. A simplified version of the semantic patch that fixes this problem is as follows

[PATCH AUTOSEL 4.19 03/17] powerpc/powernv: add missing of_node_put

2022-01-17 Thread Sasha Levin
From: Julia Lawall [ Upstream commit 7d405a939ca960162eb30c1475759cb2fdf38f8c ] for_each_compatible_node performs an of_node_get on each iteration, so a break out of the loop requires an of_node_put. A simplified version of the semantic patch that fixes this problem is as follows

[PATCH AUTOSEL 4.19 04/17] powerpc/cell: add missing of_node_put

2022-01-17 Thread Sasha Levin
From: Julia Lawall [ Upstream commit a841fd009e51c8c0a8f07c942e9ab6bb48da8858 ] for_each_node_by_name performs an of_node_get on each iteration, so a break out of the loop requires an of_node_put. A simplified version of the semantic patch that fixes this problem is as follows

[PATCH AUTOSEL 4.14 02/16] powerpc/6xx: add missing of_node_put

2022-01-17 Thread Sasha Levin
From: Julia Lawall [ Upstream commit f6e82647ff71d427d4148964b71f239fba9d7937 ] for_each_compatible_node performs an of_node_get on each iteration, so a break out of the loop requires an of_node_put. A simplified version of the semantic patch that fixes this problem is as follows

[PATCH AUTOSEL 4.9 03/13] powerpc/cell: add missing of_node_put

2022-01-17 Thread Sasha Levin
From: Julia Lawall [ Upstream commit a841fd009e51c8c0a8f07c942e9ab6bb48da8858 ] for_each_node_by_name performs an of_node_get on each iteration, so a break out of the loop requires an of_node_put. A simplified version of the semantic patch that fixes this problem is as follows

[PATCH AUTOSEL 4.9 01/13] powerpc/6xx: add missing of_node_put

2022-01-17 Thread Sasha Levin
From: Julia Lawall [ Upstream commit f6e82647ff71d427d4148964b71f239fba9d7937 ] for_each_compatible_node performs an of_node_get on each iteration, so a break out of the loop requires an of_node_put. A simplified version of the semantic patch that fixes this problem is as follows

[PATCH AUTOSEL 4.4 04/12] powerpc/btext: add missing of_node_put

2022-01-17 Thread Sasha Levin
From: Julia Lawall [ Upstream commit a1d2b210ffa52d60acabbf7b6af3ef7e1e69cda0 ] for_each_node_by_type performs an of_node_get on each iteration, so a break out of the loop requires an of_node_put. A simplified version of the semantic patch that fixes this problem is as follows

[PATCH AUTOSEL 4.4 02/12] powerpc/powernv: add missing of_node_put

2022-01-17 Thread Sasha Levin
From: Julia Lawall [ Upstream commit 7d405a939ca960162eb30c1475759cb2fdf38f8c ] for_each_compatible_node performs an of_node_get on each iteration, so a break out of the loop requires an of_node_put. A simplified version of the semantic patch that fixes this problem is as follows

[RFC PATCH 1/2] powerpc/64: remove system call instruction emulation

2022-01-17 Thread Nicholas Piggin
emulate_step instruction emulation including sc instruction emulation initially appeared in xmon. It then emulation code was then moved into sstep.c where kprobes could use it too, and later hw_breakpoint and uprobes started to use it. Until uprobes, the only instruction emulation users were for

[RFC PATCH 0/2] 2nd attempt at PR KVM + SCV and syscall

2022-01-17 Thread Nicholas Piggin
The more I looked into system call emulation, the harder it seems to get. Second proposal is remove it entirely because it's already broken, and just boot-time restrict SCV support if we run with PR possible, in hash mode, on pseries. Unfortunately that catches Power9 PowerVM, but at least

Re: [PATCH v2 1/3] mm: vmalloc: Let user to control huge vmalloc default behavior

2022-01-17 Thread Nicholas Piggin
Excerpts from Kefeng Wang's message of December 28, 2021 12:59 am: > Introduce HUGE_VMALLOC_DEFAULT_ENABLED and make it default y, this > let user to choose whether or not enable huge vmalloc mappings by > default. > > Meanwhile, add new hugevmalloc=on/off parameter to enable or disable > this

[RFC PATCH 2/2] KVM: PPC: Book3S PR: Disable SCV when running AIL is disabled

2022-01-17 Thread Nicholas Piggin
PR KVM does not support running with AIL enabled, and SCV does is not supported with AIL disabled. Fix this by ensuring the SCV facility is disabled with FSCR while a CPU can be running with AIL=0. PowerNV host supports disabling AIL on a per-CPU basis, so SCV just needs to be disabled when a

  1   2   >