[PATCH] powerpc/kvm/book3s64/vio: fix some RCU-list locks

2020-05-09 Thread Qian Cai
It is unsafe to traverse kvm->arch.spapr_tce_tables and stt->iommu_tables without the RCU read lock held. Also, add cond_resched_rcu() in places with the RCU read lock held that could take a while to finish. arch/powerpc/kvm/book3s_64_vio.c:76 RCU-list traversed in non-reader section!! other

[PATCH] powerpc/mm/book3s64/iommu: fix some RCU-list locks

2020-05-09 Thread Qian Cai
It is safe to traverse mm->context.iommu_group_mem_list with either mem_list_mutex or the RCU read lock held. Silence a few RCU-list false positive warnings and fix a few missing RCU read locks. arch/powerpc/mm/book3s64/iommu_api.c:330 RCU-list traversed in non-reader section!! other info

[PATCH] powerpc/powernv/pci: fix a RCU-list lock

2020-05-09 Thread Qian Cai
It is unsafe to traverse tbl->it_group_list without the RCU read lock. WARNING: suspicious RCU usage 5.7.0-rc4-next-20200508 #1 Not tainted - arch/powerpc/platforms/powernv/pci-ioda-tce.c:355 RCU-list traversed in non-reader section!! other info that might help

[Bug 207359] MegaRAID SAS 9361 controller hang/reset

2020-05-09 Thread bugzilla-daemon
https://bugzilla.kernel.org/show_bug.cgi?id=207359 --- Comment #3 from Cameron (c...@neo-zeon.de) --- Created attachment 289041 --> https://bugzilla.kernel.org/attachment.cgi?id=289041=edit 5.6.11 megaraid POWER hang Still happens with 5.6.11. There seems to be potentially a bit more output

Re: [PATCH] tty: hvc: Fix data abort due to race in hvc_open

2020-05-09 Thread rananta
On 2020-05-06 02:48, Greg KH wrote: On Mon, Apr 27, 2020 at 08:26:01PM -0700, Raghavendra Rao Ananta wrote: Potentially, hvc_open() can be called in parallel when two tasks calls open() on /dev/hvcX. In such a scenario, if the hp->ops->notifier_add() callback in the function fails, where it

Re: ioremap() called early from pnv_pci_init_ioda_phb()

2020-05-09 Thread Oliver O'Halloran
On Sun, May 10, 2020 at 1:51 AM Christophe Leroy wrote: > > > > Le 08/05/2020 à 19:41, Qian Cai a écrit : > > > > > >> On May 8, 2020, at 10:39 AM, Qian Cai wrote: > >> > >> Booting POWER9 PowerNV has this message, > >> > >> "ioremap() called early from pnv_pci_init_ioda_phb+0x420/0xdfc. Use >

[PATCH v2 7/9] powerpc/ps3: Add check for otheros image size

2020-05-09 Thread Geoff Levand
The ps3's otheros flash loader has a size limit of 16 MiB for the uncompressed image. If that limit will be reached output the flash image file as 'otheros-too-big.bld'. Signed-off-by: Geoff Levand --- arch/powerpc/boot/wrapper | 17 +++-- 1 file changed, 15 insertions(+), 2

[PATCH v2 0/9] powerpc + ps3 patches

2020-05-09 Thread Geoff Levand
Hi Michael, This is a combined V2 of the two patch sets I sent out on March 27th, 'PS3 patches for v5.7' and 'powerpc: Minor updates to improve build debugging'. I've dropped these two patches that were in my 'PS3 patches for v5.7' set: powerpc/ps3: Add lv1_panic powerpc/ps3: Add

[PATCH v2 1/9] powerpc/head_check: Automatic verbosity

2020-05-09 Thread Geoff Levand
To aid debugging build problems turn on shell tracing for the head_check script when the build is verbose. Signed-off-by: Geoff Levand --- arch/powerpc/tools/head_check.sh | 6 -- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/arch/powerpc/tools/head_check.sh

[PATCH v2 9/9] hvc_console: Allow backends to set I/O buffer size

2020-05-09 Thread Geoff Levand
To allow HVC backends to set the I/O buffer sizes to values that are most efficient for the backend, change the macro definitions where the buffer sizes are set to be conditional on whether or not the macros are already defined. Also, rename the macros from N_OUTBUF to HVC_N_OUBUF and from

[PATCH v2 8/9] powerpc/ps3: Fix kexec shutdown hang

2020-05-09 Thread Geoff Levand
The ps3_mm_region_destroy() and ps3_mm_vas_destroy() routines are called very late in the shutdown via kexec's mmu_cleanup_all routine. By the time mmu_cleanup_all runs it is too late to use udbg_printf, and calling it will cause PS3 systems to hang. Remove all debugging statements from

[PATCH v2 2/9] powerpc/wrapper: Output linker map file

2020-05-09 Thread Geoff Levand
To aid debugging wrapper troubles, output a linker map file 'wrapper.map' when the build is verbose. Signed-off-by: Geoff Levand --- arch/powerpc/boot/wrapper | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/arch/powerpc/boot/wrapper b/arch/powerpc/boot/wrapper index

[PATCH v2 3/9] powerpc/head_check: Avoid broken pipe

2020-05-09 Thread Geoff Levand
Remove the '-m4' option to grep to allow grep to process all of nm's output. This avoids the nm warning: nm terminated with signal 13 [Broken pipe] Signed-off-by: Geoff Levand --- arch/powerpc/tools/head_check.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git

[PATCH v2 6/9] ps3disk: use the default segment boundary

2020-05-09 Thread Geoff Levand
From: Emmanuel Nicolet Hi, since commit dcebd755926b ("block: use bio_for_each_bvec() to compute multi-page bvec count"), the kernel will bug_on on the PS3 because bio_split() is called with sectors == 0: kernel BUG at block/bio.c:1853! Oops: Exception in kernel mode, sig: 5 [#1] BE

[PATCH v2 5/9] net/ps3_gelic_net: Remove duplicate error message

2020-05-09 Thread Geoff Levand
From: Markus Elfring Remove an extra message for a memory allocation failure in function gelic_descr_prepare_rx(). Signed-off-by: Markus Elfring Signed-off-by: Geoff Levand --- drivers/net/ethernet/toshiba/ps3_gelic_net.c | 2 -- 1 file changed, 2 deletions(-) diff --git

[PATCH v2 4/9] drivers/ps3: Remove duplicate error messages

2020-05-09 Thread Geoff Levand
From: Markus Elfring Remove duplicate memory allocation failure error messages. Signed-off-by: Markus Elfring Signed-off-by: Geoff Levand --- drivers/ps3/ps3-lpm.c | 2 -- drivers/ps3/ps3-vuart.c | 1 - 2 files changed, 3 deletions(-) diff --git a/drivers/ps3/ps3-lpm.c

Re: [PATCH v8 8/8] powerpc/vdso: Provide __kernel_clock_gettime64() on vdso32

2020-05-09 Thread Christophe Leroy
Le 09/05/2020 à 17:54, Christophe Leroy a écrit : Le 28/04/2020 à 18:05, Arnd Bergmann a écrit : On Tue, Apr 28, 2020 at 3:16 PM Christophe Leroy wrote: Provides __kernel_clock_gettime64() on vdso32. This is the 64 bits version of __kernel_clock_gettime() which is y2038 compliant.

[PATCH fixes] powerpc/40x: Make more space for system call exception

2020-05-09 Thread Christophe Leroy
When CONFIG_VIRT_CPU_ACCOUNTING is selected, system call exception handler doesn't fit below 0xd00 and build fails. As exception 0xd00 doesn't exist and is never generated by 40x, comment it out in order to get more space for system call exception. Reported-by: kbuild test robot Fixes:

[PATCH vdsotest] Add support for clock_gettime64() on powerpc32

2020-05-09 Thread Christophe Leroy
libc test is commented out because at the time being very few libc if any supports clock_gettime64() syscall number is hardcoded when it doesn't exists in unistd.h Signed-off-by: Christophe Leroy --- Based on master from https://github.com/nathanlynch/vdsotest.git src/clock-boottime.c

[PATCH vdsotest] Add support for clock_gettime64() on powerpc32

2020-05-09 Thread Christophe Leroy
libc test is commented out because at the time being very few libc if any supports clock_gettime64() syscall number is hardcoded when it doesn't exists in unistd.h Signed-off-by: Christophe Leroy --- Based on master from https://github.com/nathanlynch/vdsotest.git src/clock-boottime.c

Re: [PATCH v8 8/8] powerpc/vdso: Provide __kernel_clock_gettime64() on vdso32

2020-05-09 Thread Christophe Leroy
Le 28/04/2020 à 18:05, Arnd Bergmann a écrit : On Tue, Apr 28, 2020 at 3:16 PM Christophe Leroy wrote: Provides __kernel_clock_gettime64() on vdso32. This is the 64 bits version of __kernel_clock_gettime() which is y2038 compliant. Signed-off-by: Christophe Leroy Looks good to me

Re: ioremap() called early from pnv_pci_init_ioda_phb()

2020-05-09 Thread Christophe Leroy
Le 08/05/2020 à 19:41, Qian Cai a écrit : On May 8, 2020, at 10:39 AM, Qian Cai wrote: Booting POWER9 PowerNV has this message, "ioremap() called early from pnv_pci_init_ioda_phb+0x420/0xdfc. Use early_ioremap() instead” but use the patch below will result in leaks because it will

Re: ioremap() called early from pnv_pci_init_ioda_phb()

2020-05-09 Thread Qian Cai
> On May 9, 2020, at 4:38 AM, Nicholas Piggin wrote: > > Your patch to use early_ioremap is faulting? I wonder why? Yes, I don’t know the reasons either. I suppose not many places in other parts of the kernel which keep using those addresses from early_ioremap() after system booted.

Re: remove a few uses of ->queuedata

2020-05-09 Thread Dan Williams
On Sat, May 9, 2020 at 1:24 AM Christoph Hellwig wrote: > > On Fri, May 08, 2020 at 11:04:45AM -0700, Dan Williams wrote: > > On Fri, May 8, 2020 at 9:16 AM Christoph Hellwig wrote: > > > > > > Hi all, > > > > > > various bio based drivers use queue->queuedata despite already having > > > set up

Re: [PATCH 1/4] dma-mapping: move the remaining DMA API calls out of line

2020-05-09 Thread Alexey Kardashevskiy
On 09/05/2020 18:19, Christoph Hellwig wrote: > On Tue, May 05, 2020 at 02:18:37PM +1000, Alexey Kardashevskiy wrote: >> >> >> On 17/04/2020 17:58, Christoph Hellwig wrote: >>> On Wed, Apr 15, 2020 at 09:21:37PM +1000, Alexey Kardashevskiy wrote: And the fact they were exported leaves

Re: [PATCH v3] powerpc/64s/pgtable: fix an undefined behaviour

2020-05-09 Thread Qian Cai
> On Mar 6, 2020, at 1:56 AM, Christophe Leroy wrote: > > > > Le 06/03/2020 à 05:48, Qian Cai a écrit : >> Booting a power9 server with hash MMU could trigger an undefined >> behaviour because pud_offset(p4d, 0) will do, >> 0 >> (PAGE_SHIFT:16 + PTE_INDEX_SIZE:8 + H_PMD_INDEX_SIZE:10) >>

Re: [PATCH -next] soc: fsl: dpio: remove set but not used variable 'addr_cena'

2020-05-09 Thread Yuehaibing
Pls ignore this duplicate. On 2020/5/8 22:10, YueHaibing wrote: > drivers/soc/fsl/dpio//qbman-portal.c:650:11: warning: variable 'addr_cena' > set but not used [-Wunused-but-set-variable] > uint64_t addr_cena; >^ > > It is never used, so remove it. > > Signed-off-by:

Re: [PATCH 01/15] nfblock: use gendisk private_data

2020-05-09 Thread Geert Uytterhoeven
Hi Christoph, On Fri, May 8, 2020 at 6:16 PM Christoph Hellwig wrote: > Signed-off-by: Christoph Hellwig Thanks for your patch! > --- a/arch/m68k/emu/nfblock.c > +++ b/arch/m68k/emu/nfblock.c > @@ -61,7 +61,7 @@ struct nfhd_device { > > static blk_qc_t nfhd_make_request(struct request_queue

[PATCH fixes] powerpc/vdso32: Fallback on getres syscall when clock is unknown

2020-05-09 Thread Christophe Leroy
There are other clocks than the standard ones, for instance per process clocks. Therefore, being above the last standard clock doesn't mean it is a bad clock. So, fallback to syscall instead of returning -EINVAL inconditionaly. Fixes: e33ffc956b08 ("powerpc/vdso32: implement clock_getres

Re: [PATCH RFC 2/4] powerpc: Add Microwatt platform

2020-05-09 Thread Nicholas Piggin
Excerpts from Alistair Popple's message of May 9, 2020 6:36 pm: > On Saturday, 9 May 2020 5:58:57 PM AEST Nicholas Piggin wrote: >> Excerpts from Paul Mackerras's message of May 9, 2020 3:02 pm: >> > Microwatt is a FPGA-based implementation of the Power ISA. It >> > currently only implements

Re: [PATCH RFC 2/4] powerpc: Add Microwatt platform

2020-05-09 Thread benh
We should do that here too. Time to replace our silly UART !On 9 May 2020 6:36 pm, Alistair Popple wrote:On Saturday, 9 May 2020 5:58:57 PM AEST Nicholas Piggin wrote: > Excerpts from Paul Mackerras's message of May 9, 2020 3:02 pm: > > Microwatt is a FPGA-based implementation of the Power ISA. 

Re: ioremap() called early from pnv_pci_init_ioda_phb()

2020-05-09 Thread Nicholas Piggin
Excerpts from Oliver O'Halloran's message of May 9, 2020 6:11 pm: > On Sat, May 9, 2020 at 12:41 AM Qian Cai wrote: >> >> Booting POWER9 PowerNV has this message, >> >> "ioremap() called early from pnv_pci_init_ioda_phb+0x420/0xdfc. Use >> early_ioremap() instead” >> >> but use the patch below

[PATCH 09/15, fіxed] lightnvm: stop using ->queuedata

2020-05-09 Thread Christoph Hellwig
Signed-off-by: Christoph Hellwig --- fixed the compilation in the print_ppa arguments drivers/lightnvm/core.c | 1 - drivers/lightnvm/pblk-init.c | 2 +- drivers/lightnvm/pblk.h | 2 +- 3 files changed, 2 insertions(+), 3 deletions(-) diff --git a/drivers/lightnvm/core.c

Re: ioremap() called early from pnv_pci_init_ioda_phb()

2020-05-09 Thread Nicholas Piggin
Excerpts from Qian Cai's message of May 9, 2020 3:41 am: > > >> On May 8, 2020, at 10:39 AM, Qian Cai wrote: >> >> Booting POWER9 PowerNV has this message, >> >> "ioremap() called early from pnv_pci_init_ioda_phb+0x420/0xdfc. Use >> early_ioremap() instead” >> >> but use the patch below

Re: [PATCH RFC 2/4] powerpc: Add Microwatt platform

2020-05-09 Thread Alistair Popple
On Saturday, 9 May 2020 5:58:57 PM AEST Nicholas Piggin wrote: > Excerpts from Paul Mackerras's message of May 9, 2020 3:02 pm: > > Microwatt is a FPGA-based implementation of the Power ISA. It > > currently only implements little-endian 64-bit mode, and does > > not (yet) support SMP. > > > >

Re: remove a few uses of ->queuedata

2020-05-09 Thread Christoph Hellwig
On Sat, May 09, 2020 at 06:13:21AM +0800, Ming Lei wrote: > On Fri, May 08, 2020 at 06:15:02PM +0200, Christoph Hellwig wrote: > > Hi all, > > > > various bio based drivers use queue->queuedata despite already having > > set up disk->private_data, which can be used just as easily. This > >

Re: remove a few uses of ->queuedata

2020-05-09 Thread Christoph Hellwig
On Fri, May 08, 2020 at 11:04:45AM -0700, Dan Williams wrote: > On Fri, May 8, 2020 at 9:16 AM Christoph Hellwig wrote: > > > > Hi all, > > > > various bio based drivers use queue->queuedata despite already having > > set up disk->private_data, which can be used just as easily. This > > series

Re: [PATCH 1/4] dma-mapping: move the remaining DMA API calls out of line

2020-05-09 Thread Christoph Hellwig
On Tue, May 05, 2020 at 02:18:37PM +1000, Alexey Kardashevskiy wrote: > > > On 17/04/2020 17:58, Christoph Hellwig wrote: > > On Wed, Apr 15, 2020 at 09:21:37PM +1000, Alexey Kardashevskiy wrote: > >> And the fact they were exported leaves possibility that there is a > >> driver somewhere

Re: ioremap() called early from pnv_pci_init_ioda_phb()

2020-05-09 Thread Oliver O'Halloran
On Sat, May 9, 2020 at 12:41 AM Qian Cai wrote: > > Booting POWER9 PowerNV has this message, > > "ioremap() called early from pnv_pci_init_ioda_phb+0x420/0xdfc. Use > early_ioremap() instead” > > but use the patch below will result in leaks because it will never call > early_iounmap()

Re: [PATCH RFC 4/4] powerpc/radix: Add support for microwatt's PRTBL SPR

2020-05-09 Thread Nicholas Piggin
Excerpts from Paul Mackerras's message of May 9, 2020 3:04 pm: > Microwatt currently doesn't implement hypervisor mode and therefore > doesn't implement the partition table. It does implement the process > table and radix page table walks. > > This adds code to write the base address of the

Re: [PATCH RFC 2/4] powerpc: Add Microwatt platform

2020-05-09 Thread Nicholas Piggin
Excerpts from Paul Mackerras's message of May 9, 2020 3:02 pm: > Microwatt is a FPGA-based implementation of the Power ISA. It > currently only implements little-endian 64-bit mode, and does > not (yet) support SMP. > > This adds a new machine type to support FPGA-based SoCs with a > Microwatt

Re: [PATCH RFC 1/4] powerpc/radix: Fix compilation for radix with CONFIG_SMP=n

2020-05-09 Thread Nicholas Piggin
Excerpts from Paul Mackerras's message of May 9, 2020 3:02 pm: > This fixes the compile errors we currently get with CONFIG_SMP=n and > CONFIG_PPC_RADIX_MMU=y. Did I already fix this, or does it keep getting broken?! :( Anyway fine by me if it's required. Thanks, Nick

Re: [PATCH v4 11/16] powerpc/64s: machine check interrupt update NMI accounting

2020-05-09 Thread Nicholas Piggin
Excerpts from kbuild test robot's message of May 9, 2020 1:13 pm: > Hi Nicholas, > > I love your patch! Yet something to improve: ... > 1419#if defined(CONFIG_4xx) || defined(CONFIG_BOOKE) > 1420pr_cont("DEAR: "REG" ESR: "REG" ", regs->dar, > regs->dsisr); >

Re: [PATCH v4 04/16] powerpc/64s/exceptions: machine check reconcile irq state

2020-05-09 Thread Nicholas Piggin
Excerpts from Michael Ellerman's message of May 8, 2020 11:39 pm: > Nicholas Piggin writes: > >> pseries fwnmi machine check code pops the soft-irq checks in rtas_call >> (after the previous patch to remove rtas_token from this call path). > ^ > I changed this to "next"