[PATCH] powerpc/powernv: Fix refcount leak bug in idle.c

2022-06-19 Thread Liang He
In pnv_parse_cpuidle_dt(), of_find_node_by_path() will return a node pointer with refcount incremented. We should use of_node_put() in fail path or when it is not used anymore. Signed-off-by: Liang He --- arch/powerpc/platforms/powernv/idle.c | 1 + 1 file changed, 1 insertion(+) diff --git a/a

[PATCH] powerpc: Remove _PAGE_SAO stub for book3e/64

2022-06-19 Thread Christophe Leroy
Since commit 634093c59a12 ("powerpc/mm: enable ARCH_HAS_VM_GET_PAGE_PROT"), _PAGE_SAO is used only in arch/powerpc/mm/book3s64/pgtable.c The _PAGE_SAO stub defined as 0 for book3e/64 can be removed. Signed-off-by: Christophe Leroy --- arch/powerpc/include/asm/nohash/64/pgtable.h | 2 -- 1 file

Re: [PATCH v2 4/4] watchdog/pseries-wdt: initial support for H_WATCHDOG-based watchdog timers

2022-06-19 Thread Alexey Kardashevskiy
On 6/3/22 03:53, Scott Cheloha wrote: PAPR v2.12 defines a new hypercall, H_WATCHDOG. The hypercall permits guest control of one or more virtual watchdog timers. The timers have millisecond granularity. The guest is terminated when a timer expires. This patch adds a watchdog driver for the

Re: [PATCH] cpufreq: pmac32-cpufreq: Fix refcount leak bug

2022-06-19 Thread Viresh Kumar
On 18-06-22, 10:25, Liang He wrote: > In pmac_cpufreq_init_MacRISC3(), we need to add corresponding > of_node_put() for the three node pointers whose refcount have > been incremented by of_find_node_by_name(). > > Signed-off-by: Liang He > --- > drivers/cpufreq/pmac32-cpufreq.c | 4 > 1 fil

[PATCH v4 27/34] powerpc: Convert to printbuf

2022-06-19 Thread Kent Overstreet
This converts from seq_buf to printbuf. We're using printbuf in external buffer mode, so it's a direct conversion, aside from some trivial refactoring in cpu_show_meltdown() to make the code more consistent. Signed-off-by: Kent Overstreet Cc: linuxppc-dev@lists.ozlabs.org --- arch/powerpc/kernel

[PATCH] selftests/powerpc: Skip energy_scale_info test on older firmware

2022-06-19 Thread Michael Ellerman
Older machines don't have the firmware feature that enables the code this test is testing. Skip the test if the sysfs directory doesn't exist. Also use the FAIL_IF() macro to provide more verbose error reporting if an error is encountered. Fixes: 57201d657eb7 ("selftest/powerpc: Add PAPR sysfs att

Re: [PATCH v3 2/3] powerpc/powernv: wire up rng during setup_arch

2022-06-19 Thread Jason A. Donenfeld
Hi Michael, On Sun, Jun 19, 2022 at 1:49 PM Michael Ellerman wrote: > This crashes on power8 because it's too early to call kzalloc() in > rng_create(), and it's also too early to setup the percpu variables in > there. > > I'll rework it and post a v4. Oh, darn. Sorry about that. Thanks for rewo

Re: [PATCH v3 0/3] powerpc: wire up rng during setup_arch

2022-06-19 Thread Michael Ellerman
On Sat, 11 Jun 2022 17:10:12 +0200, Jason A. Donenfeld wrote: > The platform's RNG must be available before random_init() in order to be > useful for initial seeding, which in turn means that it needs to be > called from setup_arch(), rather than from an init call. This series > wires that up prope

Re: [PATCH] powerpc: Enable execve syscall exit tracepoint

2022-06-19 Thread Michael Ellerman
On Thu, 9 Jun 2022 16:03:28 +0530, Naveen N. Rao wrote: > On execve[at], we are zero'ing out most of the thread register state > including gpr[0], which contains the syscall number. Due to this, we > fail to trigger the syscall exit tracepoint properly. Fix this by > retaining gpr[0] in the thread

Re: [PATCH] powerpc/rtas: Allow ibm,platform-dump RTAS call with null buffer address

2022-06-19 Thread Michael Ellerman
On Tue, 14 Jun 2022 23:49:52 +1000, Andrew Donnellan wrote: > Add a special case to block_rtas_call() to allow the ibm,platform-dump RTAS > call through the RTAS filter if the buffer address is 0. > > According to PAPR, ibm,platform-dump is called with a null buffer address > to notify the platfor

Re: [PATCH v3 2/3] powerpc/powernv: wire up rng during setup_arch

2022-06-19 Thread Michael Ellerman
"Jason A. Donenfeld" writes: > The platform's RNG must be available before random_init() in order to be > useful for initial seeding, which in turn means that it needs to be > called from setup_arch(), rather than from an init call. Fortunately, > each platform already has a setup_arch function po

[PATCH] powerpc: pseries: Fix refcount bug in ibmebus

2022-06-19 Thread Liang He
In ibmebus_match_path(), we should use of_node_put() to keep refcount balance. Signed-off-by: Liang He --- arch/powerpc/platforms/pseries/ibmebus.c | 6 +- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/arch/powerpc/platforms/pseries/ibmebus.c b/arch/powerpc/platforms/pseries/

[PATCH] powerpc/cell: Fix refcount leak bugs

2022-06-19 Thread Liang He
We should use of_node_put() for of_find_node_by_path() and of_find_node_by_phandle() to keep refcount balance. Signed-off-by: Liang He --- arch/powerpc/platforms/cell/setup.c | 2 ++ arch/powerpc/platforms/cell/spu_manage.c | 2 ++ arch/powerpc/platforms/cell/spufs/inode.c | 1 + 3 files

[PATCH] powerpc: kernel: Fix refcount bug in legacy_serial.c

2022-06-19 Thread Liang He
In find_legacy_serial_ports(), of_find_node_by_path() will return a node pointer with refcount incremented. We should use of_node_put() when it is not used anymore. Signed-off-by: Liang He --- arch/powerpc/kernel/legacy_serial.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/arch/powerpc/