[PATCH v4 3/5] powerpc: wii.dts: Reduce the size of the control area

2021-08-01 Thread Emmanuel Gil Peyrot
This is wrong, but needed in order to avoid overlapping ranges with the OTP area added in the next commit. A refactor of this part of the device tree is needed: according to Wiibrew[1], this area starts at 0x0d80 and spans 0x400 bytes (that is, 0x100 32-bit registers), encompassing PIC and GPI

[PATCH v4 2/5] dt-bindings: nintendo-otp: Document the Wii and Wii U OTP support

2021-08-01 Thread Emmanuel Gil Peyrot
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 strings. Signed-off-by: Emmanuel Gil Peyrot --- .../bindings/nvmem/nintendo-otp.yaml | 44 +++

[PATCH v4 0/5] nvmem: nintendo-otp: Add new driver for the Wii and Wii U OTP

2021-08-01 Thread Emmanuel Gil Peyrot
The OTP is a read-only memory area which contains various keys and signatures used 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 (split into eight 128 bytes banks). It can be used directly by writin

[PATCH v4 1/5] nvmem: nintendo-otp: Add new driver for the Wii and Wii U OTP

2021-08-01 Thread Emmanuel Gil Peyrot
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 (split into eight 128 bytes banks). It can be used directly by writing into one regi

[PATCH v4 4/5] powerpc: wii.dts: Expose the OTP on this platform

2021-08-01 Thread Emmanuel Gil Peyrot
This can be used by the newly-added nintendo-otp nvmem module. Signed-off-by: Emmanuel Gil Peyrot --- arch/powerpc/boot/dts/wii.dts | 9 +++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/arch/powerpc/boot/dts/wii.dts b/arch/powerpc/boot/dts/wii.dts index c5fb54f8cc02..e9c94

[PATCH v4 5/5] powerpc: wii_defconfig: Enable OTP by default

2021-08-01 Thread Emmanuel Gil Peyrot
This selects the nintendo-otp module when building for this platform. Signed-off-by: Emmanuel Gil Peyrot --- arch/powerpc/configs/wii_defconfig | 1 + 1 file changed, 1 insertion(+) diff --git a/arch/powerpc/configs/wii_defconfig b/arch/powerpc/configs/wii_defconfig index 379c171f3ddd..a0c45bf

Re: [PATCH 1/2] tty: hvc: pass DMA capable memory to put_chars()

2021-08-01 Thread Arnd Bergmann
On Sun, Aug 1, 2021 at 7:16 AM Xianting Tian wrote: > Considering lock competition of hp->outbuf and the complicated logic in > hvc_console_print(), I didn’t use hp->outbuf, just allocate additional > memory(length N_OUTBUF) and append it to hp->outbuf. > For the issue in hvc_poll_put_char(), I u

Re: [PATCH v3 31/41] powerpc/32: Dismantle EXC_XFER_STD/LITE/TEMPLATE

2021-08-01 Thread Stan Johnson
On 7/31/21 7:21 PM, Finn Thain wrote: > On Sat, 31 Jul 2021, Christophe Leroy wrote: > >>> >>> Stan Johnson contacted me about a regression in mainline that he >>> observed on his G3 Powerbooks. Using 'git bisect' we determined that >>> this patch was the cause of the regression, i.e. commit 4c0

Re: [PATCH 1/2] tty: hvc: pass DMA capable memory to put_chars()

2021-08-01 Thread kernel test robot
submitting patch, we suggest to use '--base' as documented in https://git-scm.com/docs/git-format-patch] url: https://github.com/0day-ci/linux/commits/Xianting-Tian/tty-hvc-pass-DMA-capable-memory-to-put_chars/20210801-131800 base: https://git.kernel.org/pub/scm/linux/kernel/git/greg

Re: [PATCH] powerpc/pseries: Fix regression while building external modules

2021-08-01 Thread Michael Ellerman
On Thu, 29 Jul 2021 11:34:49 +0530, Srikar Dronamraju wrote: > With Commit c9f3401313a5 ("powerpc: Always enable queued spinlocks for > 64s, disable for others") CONFIG_PPC_QUEUED_SPINLOCKS is always > enabled on ppc64le, external modules that use spinlock APIs are > failing. > > ERROR: modpost: G

Re: [PATCH] powerpc/vdso: Don't use r30 to avoid breaking Go lang

2021-08-01 Thread Michael Ellerman
On Thu, 29 Jul 2021 23:12:44 +1000, Michael Ellerman wrote: > The Go runtime uses r30 for some special value called 'g'. It assumes > that value will remain unchanged even when calling VDSO functions. > Although r30 is non-volatile across function calls, the callee is free > to use it, as long as t

[GIT PULL] Please pull powerpc/linux.git powerpc-5.14-4 tag

2021-08-01 Thread Michael Ellerman
-BEGIN PGP SIGNED MESSAGE- Hash: SHA256 Hi Linus, Please pull some more powerpc fixes for 5.14: The following changes since commit d9c57d3ed52a92536f5fa59dc5ccdd58b4875076: KVM: PPC: Book3S HV Nested: Sanitise H_ENTER_NESTED TM state (2021-07-23 16:19:38 +1000) are available in the

Re: [GIT PULL] Please pull powerpc/linux.git powerpc-5.14-4 tag

2021-08-01 Thread pr-tracker-bot
The pull request you sent on Sun, 01 Aug 2021 23:16:16 +1000: > https://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux.git > tags/powerpc-5.14-4 has been merged into torvalds/linux.git: https://git.kernel.org/torvalds/c/c82357a7b32c0690b8581f72f197b1ce6118543c Thank you! -- Deet-doot-d

[PATCH 3/3] isystem: delete global -isystem compile option

2021-08-01 Thread Alexey Dobriyan
In theory, it enables "leakage" of userspace headers into kernel which may present licensing problem. In practice, only stdarg.h was used, stdbool.h is trivial and SIMD intrinsics are contained to a few architectures and aren't global problem. In general, kernel is very self contained code and -i

Re: [PATCH 3/3] isystem: delete global -isystem compile option

2021-08-01 Thread Segher Boessenkool
On Sun, Aug 01, 2021 at 11:13:36PM +0300, Alexey Dobriyan wrote: > In theory, it enables "leakage" of userspace headers into kernel which > may present licensing problem. > -NOSTDINC_FLAGS += -nostdinc -isystem $(shell $(CC) -print-file-name=include) > +NOSTDINC_FLAGS += -nostdinc This is removin

Re: [PATCH v3 31/41] powerpc/32: Dismantle EXC_XFER_STD/LITE/TEMPLATE

2021-08-01 Thread Finn Thain
On Sun, 1 Aug 2021, Stan Johnson wrote: > > > >> Could you try without CONFIG_VMAP_STACK > >> > > > > Stan, would you please test the following build: > > > > $ git checkout v5.13 > > $ cp ../dot-config-powermac-5.13 .config > > $ scripts/config -d CONFIG_VMAP_STACK > > $ make ARCH=powerpc CROS

Re: [PATCH] powerpc/svm: Don't issue ultracalls if !mem_encrypt_active()

2021-08-01 Thread Nicholas Piggin
Excerpts from Will Deacon's message of July 30, 2021 9:42 pm: > Commit ad6c00283163 ("swiotlb: Free tbl memory in swiotlb_exit()") > introduced a set_memory_encrypted() call to swiotlb_exit() so that the > buffer pages are returned to an encrypted state prior to being freed. > > Sachin reports tha

Re: [PATCH v2] arch: vdso: remove if-conditionals of $(c-gettimeofday-y)

2021-08-01 Thread Michael Ellerman
Masahiro Yamada writes: > arm, arm64, csky, mips, powerpc always select GENERIC_GETTIMEOFDAY, > hence $(gettimeofday-y) never becomes empty. > > riscv conditionally selects GENERIC_GETTIMEOFDAY when MMU=y && 64BIT=y, > but arch/riscv/kernel/vdso/vgettimeofday.o is built only under that > condition

Re: [PATCH kernel] powerpc/powernv: Check if powernv_rng is initialized

2021-08-01 Thread Michael Ellerman
Alexey Kardashevskiy writes: > The powernv-rng driver has 2 users - the bare metal powernv platform and > the KVM's H_RANDOM hcall. The hcall handler works fine when it is L0 KVM > but fails in L1 KVM as there is no support for the HW registers in L1 VMs > and such support is not advertised either

Re: Possible regression by ab037dd87a2f (powerpc/vdso: Switch VDSO to generic C implementation.)

2021-08-01 Thread Michael Ellerman
Andreas Schwab writes: > On Jul 29 2021, Michael Ellerman wrote: > >> I haven't been able to reproduce the crash by following the instructions >> in your bug report, I have go1.13.8, I guess the crash is only in newer >> versions? > > Yes, only go1.14 and later are affected. > > https://build.open

RE: Possible regression by ab037dd87a2f (powerpc/vdso: Switch VDSO to generic C implementation.)

2021-08-01 Thread Michael Ellerman
"Paul Murphy" writes: > > (My apologies for however IBM's email client munges this) > >> I heard it is going to be in Go 1.16.7, but I do not know much about Go. >> Maybe the folks in Cc can chime in. > > > We have backports primed and ready for the next point release. They > are waiting on

Re: [PATCH] powerpc/xive: Do not skip CPU-less nodes when creating the IPIs

2021-08-01 Thread Michael Ellerman
Cédric Le Goater writes: > On PowerVM, CPU-less nodes can be populated with hot-plugged CPUs at > runtime. Today, the IPI is not created for such nodes, and hot-plugged > CPUs use a bogus IPI, which leads to soft lockups. > > We could create the node IPI on demand but it is a bit complex because >

Re: [PATCH 3/3] isystem: delete global -isystem compile option

2021-08-01 Thread Alexey Dobriyan
On Sun, Aug 01, 2021 at 04:32:47PM -0500, Segher Boessenkool wrote: > On Sun, Aug 01, 2021 at 11:13:36PM +0300, Alexey Dobriyan wrote: > > In theory, it enables "leakage" of userspace headers into kernel which > > may present licensing problem. > > > -NOSTDINC_FLAGS += -nostdinc -isystem $(shell $