Re: [PATCH v2 4/4] powerpc: wii_defconfig: Enable OTP by default

2021-06-26 Thread Jonathan Neuschäfer
On Wed, May 19, 2021 at 11:50:44AM +0200, Emmanuel Gil Peyrot wrote: > This selects the nintendo-otp module when building for this platform, if > CONFIG_NVMEM is also selected. The 'if' is a bit confusing. CONFIG_NVRAM=y has indeed been in wii_defconfig since 2009. Thanks, Jonathan Neuschäfer

Re: [PATCH v2 3/4] powerpc: wii.dts: Expose the OTP on this platform

2021-06-26 Thread Jonathan Neuschäfer
On Wed, May 19, 2021 at 11:50:43AM +0200, Emmanuel Gil Peyrot wrote: > This can be used by the newly-added nintendo-otp nvmem module. > > Signed-off-by: Emmanuel Gil Peyrot > --- > arch/powerpc/boot/dts/wii.dts | 5 + > 1 file changed, 5 insertions(+) > > diff --git a/arch/powerpc/boot/dts/

Re: [PATCH v2 1/4] nvmem: nintendo-otp: Add new driver for the Wii and Wii U OTP

2021-06-26 Thread Jonathan Neuschäfer
Hi, On Wed, May 19, 2021 at 11:50:41AM +0200, Emmanuel Gil Peyrot wrote: > This OTP is read-only and contains various keys used by the console to > decrypt, encrypt or verify various pieces of storage. > > Its size depends on the console, it is 128 bytes on the Wii and > 1024 bytes on the Wii U

Re: [PATCH v2 2/4] dt-bindings: nintendo-otp: Document the Wii and Wii U OTP support

2021-06-26 Thread Jonathan Neuschäfer
Hello and sorry for the delay, On Wed, May 19, 2021 at 11:50:42AM +0200, Emmanuel Gil Peyrot wrote: > Both of these consoles use the exact same two registers, even at the > same address, but the Wii U has eight banks of 128 bytes memory while > the Wii only has one, hence the two compatible string

[powerpc:next] BUILD SUCCESS b064037ea4104120418ccbf39951a6d529a9d6d5

2021-06-26 Thread kernel test robot
randconfig-a015-20210622 x86_64 randconfig-a014-20210622 x86_64 randconfig-a013-20210622 x86_64 randconfig-a011-20210622 i386 randconfig-a011-20210626 i386 randconfig-a014-20210626 i386 randconfig-a013-20210626

[powerpc:merge] BUILD REGRESSION 0f7a719601eb957c10d417c62bd5f65080b5a409

2021-06-26 Thread kernel test robot
riable 'ea' is uninitialized when used here [-Werror,-Wuninitialized] Error/Warning ids grouped by kconfigs: clang_recent_errors `-- powerpc64-buildonly-randconfig-r006-20210626 `-- arch-powerpc-kernel-hw_breakpoint.c:error:variable-ea-is-uninitialized-when-used-here-Werror-Wuniniti

Re: [powerpc][next-20210625] Kernel warning(arch/powerpc/kernel/interrupt.c:518) during boot

2021-06-26 Thread Nicholas Piggin
Excerpts from Sachin Sant's message of June 26, 2021 11:52 pm: > Following kernel warning is seen while booting 5.13.0-rc7-next-20210625 > on POWER9 LPAR. > > [ 40.573592] [ cut here ] > [ 40.573604] WARNING: CPU: 6 PID: 4743 at > arch/powerpc/kernel/interrupt.c:518 in

Re: [RESEND-PATCH v2] powerpc/papr_scm: Add support for reporting dirty-shutdown-count

2021-06-26 Thread Dan Williams
On Thu, Jun 24, 2021 at 1:07 AM Vaibhav Jain wrote: > > Persistent memory devices like NVDIMMs can loose cached writes in case > something prevents flush on power-fail. Such situations are termed as > dirty shutdown and are exposed to applications as > last-shutdown-state (LSS) flag and a dirty-sh

[powerpc][next-20210625] Kernel warning(arch/powerpc/kernel/interrupt.c:518) during boot

2021-06-26 Thread Sachin Sant
Following kernel warning is seen while booting 5.13.0-rc7-next-20210625 on POWER9 LPAR. [ 40.573592] [ cut here ] [ 40.573604] WARNING: CPU: 6 PID: 4743 at arch/powerpc/kernel/interrupt.c:518 interrupt_exit_kernel_prepare+0x280/0x2a0 [ 40.573614] Modules linked in: d

Re: (subset) [PATCH 0/5] powerpc/kprobes: fixes and cleanups

2021-06-26 Thread Michael Ellerman
On Wed, 19 May 2021 16:17:16 +0530, Naveen N. Rao wrote: > Various fixes and some code refactoring for kprobes on powerpc. The > first patch fixes an invalid access if probing the first instruction in > a kernel module. The rest are small cleanups. More details in the > individual patches. > > - N

Re: [PATCH] powerpc/stacktrace: Fix spurious "stale" traces in raise_backtrace_ipi()

2021-06-26 Thread Michael Ellerman
On Sat, 26 Jun 2021 00:04:08 +1000, Michael Ellerman wrote: > In raise_backtrace_ipi() we iterate through the cpumask of CPUs, sending > each an IPI asking them to do a backtrace, but we don't wait for the > backtrace to happen. > > We then iterate through the CPU mask again, and if any CPU hasn't

Re: [PATCH] powerpc/pseries/vas: Include irqdomain.h

2021-06-26 Thread Michael Ellerman
On Fri, 25 Jun 2021 14:53:37 +1000, Michael Ellerman wrote: > There are patches in flight to break the dependency between asm/irq.h > and linux/irqdomain.h, which would break compilation of vas.c because it > needs the declaration of irq_create_mapping() etc. > > So add an explicit include of irqd

Re: [PATCH] powerpc/perf: Fix crash with 'perf_instruction_pointer' when pmu is not set

2021-06-26 Thread Michael Ellerman
On Thu, 17 Jun 2021 13:55:06 -0400, Athira Rajeev wrote: > On systems without any specific PMU driver support registered, running > perf record causes Oops. > > The relevant portion from call trace: > > BUG: Kernel NULL pointer dereference on read at 0x0040 > Faulting instruction address: 0xc

Re: [PATCH] powerpc/sysfs: Replace sizeof(arr)/sizeof(arr[0]) with ARRAY_SIZE

2021-06-26 Thread Michael Ellerman
On Thu, 24 Jun 2021 14:36:32 +0800, Jason Wang wrote: > The ARRAY_SIZE macro is more compact and more formal in linux source. Applied to powerpc/next. [1/1] powerpc/sysfs: Replace sizeof(arr)/sizeof(arr[0]) with ARRAY_SIZE https://git.kernel.org/powerpc/c/590e1e4254458455477e4e857cd00733280

Re: [RESEND-PATCH v2] powerpc/papr_scm: Add support for reporting dirty-shutdown-count

2021-06-26 Thread Michael Ellerman
On Thu, 24 Jun 2021 13:36:21 +0530, Vaibhav Jain wrote: > Persistent memory devices like NVDIMMs can loose cached writes in case > something prevents flush on power-fail. Such situations are termed as > dirty shutdown and are exposed to applications as > last-shutdown-state (LSS) flag and a dirty-s

Re: [PATCH v3] powerpc/papr_scm: Make 'perf_stats' invisible if perf-stats unavailable

2021-06-26 Thread Michael Ellerman
On Thu, 13 May 2021 14:53:49 +0530, Vaibhav Jain wrote: > In case performance stats for an nvdimm are not available, reading the > 'perf_stats' sysfs file returns an -ENOENT error. A better approach is > to make the 'perf_stats' file entirely invisible to indicate that > performance stats for an nv

Re: [PATCH] powerpc/pmu: Make the generic compat PMU use the architected events

2021-06-26 Thread Michael Ellerman
On Tue, 4 May 2021 17:43:43 +1000, Paul Mackerras wrote: > This changes generic-compat-pmu.c so that it only uses architected > events defined in Power ISA v3.0B, rather than event encodings which, > while common to all the IBM Power Systems implementations, are > nevertheless implementation-specif

Re: [PATCH] powerpc/64s: Fix copy-paste data exposure into newly created tasks

2021-06-26 Thread Michael Ellerman
On Tue, 22 Jun 2021 15:30:36 +1000, Nicholas Piggin wrote: > copy-paste contains implicit "copy buffer" state that can contain > arbitrary user data (if the user process executes a copy instruction). > This could be snooped by another process if a context switch hits while > the state is live. So c

Re: [PATCH] powerpc/xmon: Add support for running a command on all cpus in xmon

2021-06-26 Thread Michael Ellerman
On Tue, 1 Jun 2021 13:18:01 +0530, Naveen N. Rao wrote: > It is sometimes desirable to run a command on all cpus in xmon. A > typical scenario is to obtain the backtrace from all cpus in xmon if > there is a soft lockup. Add rudimentary support for the same. The > command to be run on all cpus shou

Re: [PATCH] powerpc/configs: Enable STACK_TRACER and FTRACE_SYSCALLS in some of the configs

2021-06-26 Thread Michael Ellerman
On Mon, 24 May 2021 17:32:27 +0530, Naveen N. Rao wrote: > Both these config options are generally enabled in distro kernels. > Enable the same in a few powerpc64 configs to get better coverage and > testing. Applied to powerpc/next. [1/1] powerpc/configs: Enable STACK_TRACER and FTRACE_SYSCALLS

Re: [PATCH] powerpc/bpf: Use bctrl for making function calls

2021-06-26 Thread Michael Ellerman
On Wed, 9 Jun 2021 14:30:24 +0530, Naveen N. Rao wrote: > blrl corrupts the link stack. Instead use bctrl when making function > calls from BPF programs. Applied to powerpc/next. [1/1] powerpc/bpf: Use bctrl for making function calls https://git.kernel.org/powerpc/c/20ccb004bad659c186f90910

Re: (subset) [PATCH 0/5] powerpc/kprobes: fixes and cleanups

2021-06-26 Thread Michael Ellerman
On Wed, 19 May 2021 16:17:16 +0530, Naveen N. Rao wrote: > Various fixes and some code refactoring for kprobes on powerpc. The > first patch fixes an invalid access if probing the first instruction in > a kernel module. The rest are small cleanups. More details in the > individual patches. > > - N

Re: [PATCH] powerpc/rtas-rtc: remove unused constant

2021-06-26 Thread Michael Ellerman
On Mon, 3 May 2021 12:58:11 -0500, Nathan Lynch wrote: > RTAS_CLOCK_BUSY is unused, remove it. Applied to powerpc/next. [1/1] powerpc/rtas-rtc: remove unused constant https://git.kernel.org/powerpc/c/4bfa5ddff924c2d5b2427f752515ca594dade19f cheers

Re: [PATCH] powerpc/pseries/dlpar: use rtas_get_sensor()

2021-06-26 Thread Michael Ellerman
On Mon, 3 May 2021 21:53:29 -0500, Nathan Lynch wrote: > Instead of making bare calls to get-sensor-state, use > rtas_get_sensor(), which correctly handles busy and extended delay > statuses. Applied to powerpc/next. [1/1] powerpc/pseries/dlpar: use rtas_get_sensor() https://git.kernel.org/

Re: [PATCH] powerpc: Fix is_kvm_guest() / kvm_para_available()

2021-06-26 Thread Michael Ellerman
On Wed, 23 Jun 2021 23:05:14 +1000, Michael Ellerman wrote: > Commit a21d1becaa3f ("powerpc: Reintroduce is_kvm_guest() as a fast-path > check") added is_kvm_guest() and changed kvm_para_available() to use it. > > is_kvm_guest() checks a static key, kvm_guest, and that static key is > set in check

Re: [PATCH] powerpc/64s: Make prom_init require RELOCATABLE

2021-06-26 Thread Michael Ellerman
On Wed, 23 Jun 2021 23:04:54 +1000, Michael Ellerman wrote: > When we boot from open firmware (OF) using PPC_OF_BOOT_TRAMPOLINE, aka. > prom_init, we run parts of the kernel at an address other than the link > address. That happens because OF loads the kernel above zero (OF is at > zero) and we run

Re: [PATCH] powerpc/papr_scm: trivial: fix typo in a comment

2021-06-26 Thread Michael Ellerman
On Sun, 18 Apr 2021 13:10:03 +0530, Kajol Jain wrote: > There is a spelling mistake "byes" -> "bytes" in a comment of > function drc_pmem_query_stats(). Fix that typo. Applied to powerpc/next. [1/1] powerpc/papr_scm: trivial: fix typo in a comment https://git.kernel.org/powerpc/c/d2827e5e2e

Re: [PATCH] selftests/powerpc: Use req_max_processed_len from sysfs NX capabilities

2021-06-26 Thread Michael Ellerman
On Tue, 22 Jun 2021 22:17:46 -0700, Haren Myneni wrote: > On PowerVM, the hypervisor defines the maximum buffer length for > each NX request and the kernel exported this value via sysfs. > > This patch reads this value if the sysfs entry is available and > is used to limit the request length. App

Re: [PATCH v2] powerpc/kprobes: Fix Oops by passing ppc_inst as a pointer to emulate_step() on ppc32

2021-06-26 Thread Michael Ellerman
On Wed, 23 Jun 2021 05:23:30 + (UTC), Christophe Leroy wrote: > Trying to use a kprobe on ppc32 results in the below splat: > BUG: Unable to handle kernel data access on read at 0x7c0802a6 > Faulting instruction address: 0xc002e9f0 > Oops: Kernel access of bad area, sig: 11 [#1] >

Re: [PATCH v2 0/4] Convert powerpc to GENERIC_PTDUMP

2021-06-26 Thread Michael Ellerman
On Mon, 19 Apr 2021 10:47:24 + (UTC), Christophe Leroy wrote: > This series converts powerpc to generic PTDUMP. > > For that, we first need to add missing hugepd support > to pagewalk and ptdump. > > v2: > - Reworked the pagewalk modification to add locking and check ops->pte_entry > - Modifi

Re: [PATCH] powerpc: Remove klimit

2021-06-26 Thread Michael Ellerman
On Fri, 4 Jun 2021 09:57:36 + (UTC), Christophe Leroy wrote: > klimit is a global variable initialised at build time with the > value of _end. > > This variable is never modified, so _end symbol can be used directly. > > Remove klimit. Applied to powerpc/next. [1/1] powerpc: Remove klimit

Re: [PATCH] powerpc/interrupt: Use names in check_return_regs_valid()

2021-06-26 Thread Michael Ellerman
On Fri, 25 Jun 2021 14:49:09 + (UTC), Christophe Leroy wrote: > trap->regs == 0x3000 is trap_is_scv() > > trap 0x500 is INTERRUPT_EXTERNAL Applied to powerpc/next. [1/1] powerpc/interrupt: Use names in check_return_regs_valid() https://git.kernel.org/powerpc/c/b064037ea4104120418ccbf39

Re: [PATCH] powerpc/interrupt: Also use exit_must_hard_disable() on PPC32

2021-06-26 Thread Michael Ellerman
On Fri, 25 Jun 2021 14:31:46 + (UTC), Christophe Leroy wrote: > Reduce #ifdefs a bit by making exit_must_hard_disable() return > true on PPC32. Applied to powerpc/next. [1/1] powerpc/interrupt: Also use exit_must_hard_disable() on PPC32 https://git.kernel.org/powerpc/c/767e6e7130b288d85

Re: [PATCH 1/4] powerpc/32: Interchange r10 and r12 in SYSCALL_ENTRY on non booke

2021-06-26 Thread Michael Ellerman
On Fri, 4 Jun 2021 14:54:12 + (UTC), Christophe Leroy wrote: > To better match booke version of SYSCALL_ENTRY macro, interchange > r10 and r12 in the non booke version. Applied to powerpc/next. [1/4] powerpc/32: Interchange r10 and r12 in SYSCALL_ENTRY on non booke https://git.kernel.or

Re: [PATCH 1/2] powerpc/ptrace: Move set_return_regs_changed() before regs_set_return_{msr/ip}

2021-06-26 Thread Michael Ellerman
On Fri, 25 Jun 2021 11:13:16 + (UTC), Christophe Leroy wrote: > regs_set_return_msr() and regs_set_return_ip() have a copy > of the code of set_return_regs_changed(). > > Move up set_return_regs_changed() so it can be reused by > regs_set_return_{msr/ip} Applied to powerpc/next. [1/2] powerp

Re: [PATCH] powerpc: mark local variables around longjmp as volatile

2021-06-26 Thread Michael Ellerman
On Thu, 29 Apr 2021 10:06:38 +0200, Arnd Bergmann wrote: > gcc-11 points out that modifying local variables next to a > longjmp/setjmp may cause undefined behavior: > > arch/powerpc/kexec/crash.c: In function 'crash_kexec_prepare_cpus.constprop': > arch/powerpc/kexec/crash.c:108:22: error: variabl

[PATCH 8/9] powerpc/mm: Use is_kernel_text() and is_kernel_inittext() helper

2021-06-26 Thread Kefeng Wang
Use is_kernel_text() and is_kernel_inittext() helper to simplify code, also drop etext, _stext, _sinittext, _einittext declaration which already declared in section.h. Cc: Michael Ellerman Cc: Benjamin Herrenschmidt Cc: Paul Mackerras Cc: linuxppc-dev@lists.ozlabs.org Signed-off-by: Kefeng Wang

[PATCH 0/9] sections: Unify kernel sections range check and use

2021-06-26 Thread Kefeng Wang
There are three head files(kallsyms.h, kernel.h and sections.h) which include the kernel sections range check, let's make some cleanup and unify them. 1. cleanup arch specific text/data check and fix address boundary check in kallsyms.h 2. make all the basic kernel range check function into secti