[PATCH] drivers/macintosh/ams: remove unneeded result variable

2022-01-17 Thread cgel . zte
From: Minghao Chi Return value from i2c_add_driver() directly instead of taking this in another redundant variable. Reported-by: Zeal Robot Signed-off-by: Minghao Chi Signed-off-by: CGEL ZTE --- drivers/macintosh/ams/ams-i2c.c | 6 +- 1 file changed, 1 insertion(+), 5 deletions(-) diff

[PATCH v2 2/4] Partially revert "KVM: Pass kvm_init()'s opaque param to additional arch funcs"

2022-01-17 Thread Chao Gao
This partially reverts commit b99040853738 ("KVM: Pass kvm_init()'s opaque param to additional arch funcs") remove opaque from kvm_arch_check_processor_compat because no one uses this opaque now. Address conflicts for ARM (due to file movement) and manually handle RISC-V which comes after the commi

[PATCH v2 0/4] Improve KVM's interaction with CPU hotplug

2022-01-17 Thread Chao Gao
Changes from v1->v2: (all comments/suggestions on v1 are from Sean, thanks) - Merged v1's patch 2 into patch 1, and v1's patch 5 into patch 6. - Use static_call for check_processor_compatibility(). - Generate patch 2 with "git revert" and do manual changes based on that. - Loosen the WARN_ON()

[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 vCPU

[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 OpenPOW

[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 k

[PATCH 0/3] status: TTY status message request

2022-01-17 Thread Walt Drummond
This patchset adds TTY status message request feature to the n_tty line dicipline. This feature prints a brief message containing basic system and process group information to a user's TTY in response to a new control character in the line dicipline (default Ctrl-T) or the TIOCSTAT ioctl. The mes

[PATCH 2/3] vstatus: Add user space API definitions for VSTATUS, NOKERNINFO and TIOCSTAT

2022-01-17 Thread Walt Drummond
Add definitions for the VSTATUS control character, and the NOKERNINFO local control flag in the termios struct, and add an ioctl number for the ioctl TIOCSTAT. Also add a default VSTATUS character (Ctrl-T) default valuses in termios.c_cc. Do this for all architectures. Signed-off-by: Walt Drummo

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 fea

Re: [PATCH v2 3/3] x86: Support huge vmalloc mappings

2022-01-17 Thread Nicholas Piggin
Excerpts from Dave Hansen's message of December 29, 2021 2:14 am: > On 12/28/21 2:26 AM, Kefeng Wang wrote: There are some disadvantages about this feature[2], one of the main concerns is the possible memory fragmentation/waste in some scenarios, also archs must ensure that any arch

[PATCH AUTOSEL 5.16 026/217] bpf: Change value of MAX_TAIL_CALL_CNT from 32 to 33

2022-01-17 Thread Sasha Levin
From: Tiezhu Yang [ Upstream commit ebf7f6f0a6cdcc17a3da52b81e4b3a98c4005028 ] In the current code, the actual max tail call count is 33 which is greater than MAX_TAIL_CALL_CNT (defined as 32). The actual limit is not consistent with the meaning of MAX_TAIL_CALL_CNT and thus confusing at first g

Re: [5.16.0] build error on unrecognized opcode: ptesync

2022-01-17 Thread Mike
It booted at least. I'll try your suggestions as soon as I can, I'm progressing slower than ever, concentration is somewhat lapse still Thanks. Best regards Michael On Tue, Jan 11, 2022, 10:51 Christophe Leroy wrote: > > > Le 11/01/2022 à 10:32, Mike a écrit : > > I managed to fix it in the

[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 ‘setu

[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 (http://coccinell

[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 (http://coccin

[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 (http://coccinell

[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 (http://coccin

[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 ‘setu

[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 (http://coccinell

[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 (http://coccinell

[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 (http://coccin

[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 (http://coccin

[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 ‘setu

[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 (http://coccinell

[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 av

[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 (http://coccinell

[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 (http://coccin

[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 (http://coccin

[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 usin

[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 ‘setu

[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 av

[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 (http://coccinell

[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 (http://coccinell

[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 (http://coccin

[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 (http://coccin

[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 usin

[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 doe

[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 kernel/locking/lockdep.

[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 ‘setu

[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 av

[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 (http://coccinell

[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 (http://coccinell

[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 (http://coccin

[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 (http://coccin

[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: st

[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 usin

[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 mitigat

[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: https://lore.

[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 doe

[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 ret

[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 kernel/locking/lockdep.

[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 ‘setu

[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 av

[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 (http://coccinell

[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 (http://coccinell

[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 (http://coccin

[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 (http://coccin

[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 sigretur

[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: st

[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 usin

[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 mitigat

[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: https://lore.

[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 doe

[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 ret

[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 kernel/locking/lockdep.

[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 ‘setu

[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 Ro

[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 av

[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 (http://coccinell

[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 (http://coccinell

[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 (http://coccin

[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 (http://coccin

[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 sigretur

[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: st

[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 usin

[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 mitigat

[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: https://lore.

[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 doe

[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 ret

[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 kernel/locking/lockdep.

[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 ‘setu

[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 Ro

[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 av

[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 (http://coccin

[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 (http://coccinell

[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 (http://coccinell

[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 (http://coccin

[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 th

[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 a/arch/po

[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, i

[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, i

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 NVDI

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 cycl

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

[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 a/sound/soc/fsl/fsl-asoc-card.c

[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 i

[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 a/Documentation/devicetree/bindings/sound/fsl-asoc-ca

[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 sett

[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 +- include/dt-binding

[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 index

  1   2   >