[PATCH 11/30] swim3: use blk_mq_alloc_disk

2021-06-01 Thread Christoph Hellwig
Use the blk_mq_alloc_disk API to simplify the gendisk and request_queue allocation. Signed-off-by: Christoph Hellwig --- drivers/block/swim3.c | 33 ++--- 1 file changed, 14 insertions(+), 19 deletions(-) diff --git a/drivers/block/swim3.c b/drivers/block/swim3.c ind

[PATCH 10/30] ps3disk: use blk_mq_alloc_disk

2021-06-01 Thread Christoph Hellwig
Use the blk_mq_alloc_disk API to simplify the gendisk and request_queue allocation. Signed-off-by: Christoph Hellwig --- drivers/block/ps3disk.c | 36 ++-- 1 file changed, 14 insertions(+), 22 deletions(-) diff --git a/drivers/block/ps3disk.c b/drivers/block/ps3d

[PATCH 09/30] mtd_blkdevs: use blk_mq_alloc_disk

2021-06-01 Thread Christoph Hellwig
Use the blk_mq_alloc_disk API to simplify the gendisk and request_queue allocation. Signed-off-by: Christoph Hellwig --- drivers/mtd/mtd_blkdevs.c | 48 ++- 1 file changed, 22 insertions(+), 26 deletions(-) diff --git a/drivers/mtd/mtd_blkdevs.c b/drivers/mtd

[PATCH 08/30] mspro: use blk_mq_alloc_disk

2021-06-01 Thread Christoph Hellwig
Use the blk_mq_alloc_disk API to simplify the gendisk and request_queue allocation. Signed-off-by: Christoph Hellwig --- drivers/memstick/core/mspro_block.c | 26 +++--- 1 file changed, 11 insertions(+), 15 deletions(-) diff --git a/drivers/memstick/core/mspro_block.c b/dri

[PATCH 07/30] ms_block: use blk_mq_alloc_disk

2021-06-01 Thread Christoph Hellwig
Use the blk_mq_alloc_disk API to simplify the gendisk and request_queue allocation. Signed-off-by: Christoph Hellwig --- drivers/memstick/core/ms_block.c | 25 ++--- 1 file changed, 10 insertions(+), 15 deletions(-) diff --git a/drivers/memstick/core/ms_block.c b/drivers/mem

[PATCH 06/30] pf: use blk_mq_alloc_disk

2021-06-01 Thread Christoph Hellwig
Use the blk_mq_alloc_disk API to simplify the gendisk and request_queue allocation. Signed-off-by: Christoph Hellwig --- drivers/block/paride/pf.c | 18 +++--- 1 file changed, 7 insertions(+), 11 deletions(-) diff --git a/drivers/block/paride/pf.c b/drivers/block/paride/pf.c index b

[PATCH 05/30] pcd: use blk_mq_alloc_disk

2021-06-01 Thread Christoph Hellwig
Use the blk_mq_alloc_disk API to simplify the gendisk and request_queue allocation. Signed-off-by: Christoph Hellwig --- drivers/block/paride/pcd.c | 19 --- 1 file changed, 8 insertions(+), 11 deletions(-) diff --git a/drivers/block/paride/pcd.c b/drivers/block/paride/pcd.c ind

[PATCH 03/30] blk-mq: add the blk_mq_alloc_disk APIs

2021-06-01 Thread Christoph Hellwig
Add a new API to allocate a gendisk including the request_queue for use with blk-mq based drivers. This is to avoid boilerplate code in drivers. Signed-off-by: Christoph Hellwig --- block/blk-mq.c | 19 +++ include/linux/blk-mq.h | 12 2 files changed, 31 in

[PATCH 04/30] virtio-blk: use blk_mq_alloc_disk

2021-06-01 Thread Christoph Hellwig
Use the blk_mq_alloc_disk API to simplify the gendisk and request_queue allocation. Signed-off-by: Christoph Hellwig --- drivers/block/virtio_blk.c | 26 +++--- 1 file changed, 7 insertions(+), 19 deletions(-) diff --git a/drivers/block/virtio_blk.c b/drivers/block/virtio_bl

[PATCH 02/30] blk-mq: improve the blk_mq_init_allocated_queue interface

2021-06-01 Thread Christoph Hellwig
Don't return the passed in request_queue but a normal error code, and drop the elevator_init argument in favor of just calling elevator_init_mq directly from dm-rq. Signed-off-by: Christoph Hellwig --- block/blk-mq.c | 36 ++-- block/blk.h |

simplify gendisk and request_queue allocation for blk-mq based drivers

2021-06-01 Thread Christoph Hellwig
Hi all, this series is the scond part of cleaning up lifetimes and allocation of the gendisk and request_queue structure. It adds a new interface to allocate the disk and queue together for blk based drivers, and uses that in all drivers that do not have any caveats in their gendisk and request_q

[PATCH 01/30] blk-mq: factor out a blk_mq_alloc_sq_tag_set helper

2021-06-01 Thread Christoph Hellwig
Factour out a helper to initialize a simple single hw queue tag_set from blk_mq_init_sq_queue. This will allow to phase out blk_mq_init_sq_queue in favor of a more symmetric and general API. Signed-off-by: Christoph Hellwig --- block/blk-mq.c | 32 ++-- inclu

[PATCH] powerpc/44x: Implement Kernel Userspace Exec Protection (KUEP)

2021-06-01 Thread Christophe Leroy
Powerpc 44x has two bits for exec protection in TLBs: one for user (UX) and one for superviser (SX). Clear SX on user pages in TLB miss handlers to provide KUEP. Signed-off-by: Christophe Leroy --- arch/powerpc/include/asm/nohash/32/mmu-44x.h | 1 + arch/powerpc/kernel/head_44x.S

[PATCH] KVM: PPC: Book3S HV: Fix TLB management on SMT8 POWER9 and POWER10 processors

2021-06-01 Thread Nicholas Piggin
From: Suraj Jitindar Singh The POWER9 vCPU TLB management code assumes all threads in a core share a TLB, and that TLBIEL execued by one thread will invalidate TLBs for all threads. This is not the case for SMT8 capable POWER9 and POWER10 (big core) processors, where the TLB is split between grou

[PATCH] powerpc: 52xx: add fallthrough in mpc52xx_wdt_ioctl()

2021-06-01 Thread trix
From: Tom Rix With gcc 10.3, there is this compiler error compiler.h:56:26: error: this statement may fall through [-Werror=implicit-fallthrough=] mpc52xx_gpt.c:586:2: note: here 586 | case WDIOC_GETTIMEOUT: | ^~~~ So add the fallthrough pseudo keyword. Signed-off-by: Tom Rix ---

[PATCH] powerpc/8xx: select CPM1 for MPC8XXFADS

2021-06-01 Thread trix
From: Tom Rix With MPC8XXFADS, there is this linker error ppc64-linux-ld: m8xx_setup.o: in function `cpm_cascade': m8xx_setup.c: undefined reference to `cpm_get_irq' cpm_get_irq() is conditionally complied by CPM1 So add a select, like the other plaforms Signed-off-by: Tom Rix --- arch/powerp

[PATCH 2/5] powerpc/ps3: Warn on PS3 device errors

2021-06-01 Thread Geoff Levand
To aid debugging PS3 boot problems change the log level of several PS3 device errors from pr_debug to pr_warn. Signed-off-by: Geoff Levand --- arch/powerpc/platforms/ps3/system-bus.c | 9 + drivers/ps3/ps3-vuart.c | 2 +- drivers/ps3/ps3av.c | 22 +++

[PATCH 1/5] powerpc/ps3: Add CONFIG_PS3_VERBOSE_RESULT option

2021-06-01 Thread Geoff Levand
To aid debugging, add a new PS3 kernel config option PS3_VERBOSE_RESULT that, when enabled, will print more verbose messages for the result of LV1 hypercalls. Signed-off-by: Geoff Levand --- arch/powerpc/include/asm/ps3.h | 2 +- arch/powerpc/platforms/ps3/Kconfig | 9 + 2 files chan

[PATCH 4/5] net/ps3_gelic: Add gelic_descr structures

2021-06-01 Thread Geoff Levand
Create two new structures, struct gelic_hw_regs and struct gelic_chain_link, and replace the corresponding members of struct gelic_descr with the new structures. struct gelic_hw_regs holds the register variables used by the gelic hardware device. struct gelic_chain_link holds variables used to ma

[PATCH 3/5] powerpc/ps3: Add dma_mask to ps3_dma_region

2021-06-01 Thread Geoff Levand
Commit f959dcd6ddfd29235030e8026471ac1b022ad2b0 (dma-direct: Fix potential NULL pointer dereference) added a null check on the dma_mask pointer of the kernel's device structure. Add a dma_mask variable to the ps3_dma_region structure and set the device structure's dma_mask pointer to point to this

[PATCH 0/5] DMA fixes for PS3 device drivers

2021-06-01 Thread Geoff Levand
Hi, This is a set of patches that fix various DMA related problems in the PS3 device drivers, and add better error checking and improved message logging. The gelic network driver had a number of problems and most of the changes are in it's sources. Please consider. -Geoff The following changes

[PATCH 5/5] net/ps3_gelic: Cleanups, improve logging

2021-06-01 Thread Geoff Levand
General source cleanups and improved logging messages. Signed-off-by: Geoff Levand --- drivers/net/ethernet/toshiba/ps3_gelic_net.c | 395 ++- 1 file changed, 216 insertions(+), 179 deletions(-) diff --git a/drivers/net/ethernet/toshiba/ps3_gelic_net.c b/drivers/net/ethernet/to

Re: [PATCH] powerpc/barrier: Avoid collision with clang's __lwsync macro

2021-06-01 Thread Nick Desaulniers
On Fri, May 28, 2021 at 11:29 AM Nathan Chancellor wrote: > > A change in clang 13 results in the __lwsync macro being defined as > __builtin_ppc_lwsync, which emits 'lwsync' or 'msync' depending on what > the target supports. Indeed, $ clang --target=powerpc64le-linux-gnu -mcpu=e500 -m32 for exa

Re: [PATCH v2] lockdown,selinux: avoid bogus SELinux lockdown permission checks

2021-06-01 Thread Paul Moore
On Mon, May 31, 2021 at 4:24 AM Daniel Borkmann wrote: > On 5/29/21 8:48 PM, Paul Moore wrote: > [...] > > Daniel's patch side steps that worry by just doing the lockdown > > permission check when the BPF program is loaded, but that isn't a > > great solution if the policy changes afterward. I wa

Re: [PATCH] ASoC: fsl-asoc-card: Set .owner attribute when registering card.

2021-06-01 Thread Mark Brown
On Thu, 27 May 2021 18:34:09 +0200, Nicolas Cavallari wrote: > Otherwise, when compiled as module, a WARN_ON is triggered: > > WARNING: CPU: 0 PID: 5 at sound/core/init.c:208 snd_card_new+0x310/0x39c [snd] > [...] > CPU: 0 PID: 5 Comm: kworker/0:0 Not tainted 5.10.39 #1 > Hardware name: Freescale

Re: [PATCH] Documentation PCI: Fix typo in pci-error-recovery.rst

2021-06-01 Thread Bjorn Helgaas
On Mon, May 31, 2021 at 04:12:15PM +0800, Wesley Sheng wrote: > Replace "It" with "If", since it is a conditional statement. > > Signed-off-by: Wesley Sheng Applied to pci/error for v5.14 with Krzysztof's reviewed-by and subject "Documentation: PCI: Fix typo in pci-error-recovery.rst" to match p

Re: [RFC PATCH 1/6] trace/stack: Move code to save the stack trace into a separate function

2021-06-01 Thread Steven Rostedt
On Fri, 21 May 2021 12:18:36 +0530 "Naveen N. Rao" wrote: > In preparation to add support for stack tracer to powerpc, move code to > save stack trace and to calculate the frame sizes into a separate weak > function. Also provide access to some of the data structures used by the > stack trace cod

Re: [PATCH] powerpc: make show_stack's stack walking KASAN-safe

2021-06-01 Thread Daniel Axtens
"Naveen N. Rao" writes: > Daniel Axtens wrote: >> Make our stack-walking code KASAN-safe by using READ_ONCE_NOCHECK - >> generic code, arm64, s390 and x86 all do this for similar sorts of >> reasons: when unwinding a stack, we might touch memory that KASAN has >> marked as being out-of-bounds. In

Re: [RFC PATCH 2/6] powerpc/trace: Add support for stack tracer

2021-06-01 Thread Naveen N. Rao
Naveen N. Rao wrote: + +unsigned long ftrace_get_traced_func_if_no_stackframe(unsigned long ip, unsigned long *stack) +{ + if (!is_ftrace_entry(ip)) + return 0; + + if (IS_ENABLED(CONFIG_PPC32)) + return stack[11]; /* see MCOUNT_SAVE_FRAME */ + + if

Re: simplify gendisk and request_queue allocation for bio based drivers

2021-06-01 Thread Jens Axboe
On 5/20/21 11:50 PM, Christoph Hellwig wrote: > Hi all, > > this series is the first part of cleaning up lifetimes and allocation of > the gendisk and request_queue structure. It adds a new interface to > allocate the disk and queue together for bio based drivers, and a helper > for cleanup/free

Re: [PATCH] powerpc: make show_stack's stack walking KASAN-safe

2021-06-01 Thread Naveen N. Rao
Daniel Axtens wrote: Make our stack-walking code KASAN-safe by using READ_ONCE_NOCHECK - generic code, arm64, s390 and x86 all do this for similar sorts of reasons: when unwinding a stack, we might touch memory that KASAN has marked as being out-of-bounds. In ppc64 KASAN development, I hit this s

[PATCH -next] powerpc/spufs: disp: Remove set but not used variable 'dummy'

2021-06-01 Thread Baokun Li
Fixes gcc '-Wunused-but-set-variable' warning: arch/powerpc/platforms/cell/spufs/switch.c: In function 'check_ppu_mb_stat': arch/powerpc/platforms/cell/spufs/switch.c:1660:6: warning: variable ‘dummy’ set but not used [-Wunused-but-set-variable] arch/powerpc/platforms/cell/spufs/switch.c: In func

[PATCH -next] powerpc/spider-pci: Remove set but not used variable 'val'

2021-06-01 Thread Baokun Li
Fixes gcc '-Wunused-but-set-variable' warning: arch/powerpc/platforms/cell/spider-pci.c: In function 'spiderpci_io_flush': arch/powerpc/platforms/cell/spider-pci.c:28:6: warning: variable ‘val’ set but not used [-Wunused-but-set-variable] It never used since introduction. Signed-off-by: Baokun L

Re: [PATCH -next] powerpc/spufs: disp: Remove set but not used variable 'dummy'

2021-06-01 Thread Arnd Bergmann
On Tue, Jun 1, 2021 at 10:43 AM Baokun Li wrote: > > Fixes gcc '-Wunused-but-set-variable' warning: > > arch/powerpc/platforms/cell/spufs/switch.c: In function 'check_ppu_mb_stat': > arch/powerpc/platforms/cell/spufs/switch.c:1660:6: warning: > variable ‘dummy’ set but not used [-Wunused-but-set-v

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

2021-06-01 Thread Naveen N. Rao
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 should be prefixed with 'c#'. As an example, 'c#t' will run 't' comm

Re: [PATCH] Revert "powerpc: Switch to relative jump labels"

2021-06-01 Thread Michael Ellerman
Roman Bolshakov writes: > On Sat, May 29, 2021 at 09:39:49AM +1000, Michael Ellerman wrote: >> Roman Bolshakov writes: >> > This reverts commit b0b3b2c78ec075cec4721986a95abbbac8c3da4f. >> > >> > Otherwise, direct kernel boot with initramfs no longer works in QEMU. >> > It's broken in some bizarr

Re: [PATCH] powerpc: make show_stack's stack walking KASAN-safe

2021-06-01 Thread Christophe Leroy
Le 28/05/2021 à 09:48, Daniel Axtens a écrit : Make our stack-walking code KASAN-safe by using READ_ONCE_NOCHECK - generic code, arm64, s390 and x86 all do this for similar sorts of reasons: when unwinding a stack, we might touch memory that KASAN has marked as being out-of-bounds. In ppc64 KA