Re: powerpc/process: Fix flush_all_to_thread for SPE

2018-10-30 Thread Michael Ellerman
On Thu, 2018-10-25 at 12:07:54 UTC, "DATACOM - Felipe.Rechia" wrote: > From: "Felipe Rechia" > Date: Wed, 24 Oct 2018 10:57:22 -0300 > Subject: [PATCH] powerpc/process: Fix flush_all_to_thread for SPE > > Fix a bug introduced by the creation of flush_all_to_thread() for > processors that have

Re: powerpc/pseries: add missing cpumask.h include file

2018-10-30 Thread Michael Ellerman
On Tue, 2018-10-23 at 01:32:12 UTC, Tyrel Datwyler wrote: > Build error is encountered when inlcuding if no explicit or > implicit include of cpumask.h exists in the including file. > > In file included from arch/powerpc/platforms/pseries/hotplug-pci.c:3:0: >

Re: selftests/powerpc: Fix ptrace tm failure

2018-10-30 Thread Michael Ellerman
On Mon, 2018-10-22 at 21:16:26 UTC, Breno Leitao wrote: > Test ptrace-tm-spd-gpr fails on current kernel (4.19) due to a segmentation > fault that happens on the child process prior to setting cptr[2] = 1. This > causes the parent process to wait forever at 'while (!pptr[2])' and the test > to >

Re: [v2] KVM: PPC: Use exported tb_to_ns() function in decrementer emulation

2018-10-30 Thread Michael Ellerman
On Sat, 2018-10-20 at 09:54:55 UTC, Paul Mackerras wrote: > This changes the KVM code that emulates the decrementer function to do > the conversion of decrementer values to time intervals in nanoseconds > by calling the tb_to_ns() function exported by the powerpc timer code, > in preference to

Re: [v6,08/20] powerpc/8xx: Use patch_site for perf counters setup

2018-10-30 Thread Michael Ellerman
On Fri, 2018-10-19 at 06:55:08 UTC, Christophe Leroy wrote: > The 8xx TLB miss routines are patched when (de)activating > perf counters. > > This patch uses the new patch_site functionality in order > to get a better code readability and avoid a label mess when > dumping the code with 'objdump

Re: [v6,07/20] powerpc/8xx: Use patch_site for memory setup patching

2018-10-30 Thread Michael Ellerman
On Fri, 2018-10-19 at 06:55:06 UTC, Christophe Leroy wrote: > The 8xx TLB miss routines are patched at startup at several places. > > This patch uses the new patch_site functionality in order > to get a better code readability and avoid a label mess when > dumping the code with 'objdump -d' > >

Re: [v6, 06/20] powerpc/code-patching: add a helper to get the address of a patch_site

2018-10-30 Thread Michael Ellerman
On Fri, 2018-10-19 at 06:55:04 UTC, Christophe Leroy wrote: > This patch adds a helper to get the address of a patch_site > > Signed-off-by: Christophe Leroy Applied to powerpc next, thanks. https://git.kernel.org/powerpc/c/082e2869fc022de4db9977e06558da cheers

Re: [v6, 01/20] Revert "powerpc/8xx: Use L1 entry APG to handle _PAGE_ACCESSED for CONFIG_SWAP"

2018-10-30 Thread Michael Ellerman
On Fri, 2018-10-19 at 06:54:54 UTC, Christophe Leroy wrote: > This reverts commit 4f94b2c7462d9720b2afa7e8e8d4c19446bb31ce. > > That commit was buggy, as it used rlwinm instead of rlwimi. > Instead of fixing that bug, we revert the previous commit in order to > reduce the dependency between L1

Re: powerpc/pseries: Export maximum memory value

2018-10-30 Thread Michael Ellerman
On Wed, 2018-10-10 at 10:22:59 UTC, Aravinda Prasad wrote: > This patch exports the maximum possible amount of memory > configured on the system via /proc/powerpc/lparcfg. > > Signed-off-by: Aravinda Prasad Applied to powerpc next, thanks.

Re: [PATCH 5/6] pci: layerscape: Add the EP mode support.

2018-10-30 Thread Kishon Vijay Abraham I
Hi, On 31/10/18 8:03 AM, Xiaowei Bao wrote: > > > -Original Message- > From: Xiaowei Bao > Sent: 2018年10月26日 17:19 > To: 'Kishon Vijay Abraham I' ; bhelg...@google.com; > robh...@kernel.org; mark.rutl...@arm.com; shawn...@kernel.org; Leo Li > ; lorenzo.pieral...@arm.com;

Re: [PATCH 1/5] powerpc/64s: Guarded Userspace Access Prevention

2018-10-30 Thread Russell Currey
On Sun, 2018-10-28 at 18:57 +0100, LEROY Christophe wrote: > Russell Currey a écrit : > > > Guarded Userspace Access Prevention (GUAP) utilises a feature of > > the Radix MMU which disallows read and write access to userspace > > addresses. By utilising this, the kernel is prevented from > >

Re: [PATCH 0/5] Guarded Userspace Access Prevention on Radix

2018-10-30 Thread Russell Currey
On Fri, 2018-10-26 at 18:29 +0200, LEROY Christophe wrote: > Russell Currey a écrit : > > > Guarded Userspace Access Prevention is a security mechanism that > > prevents > > the kernel from being able to read and write userspace addresses > > outside of > > the allowed paths, most commonly

[PATCH] raid6/ppc: Fix build for clang

2018-10-30 Thread Joel Stanley
We cannot build these files with clang as it does not allow altivec instructions in assembly when -msoft-float is passed. Jinsong Ji wrote: > We currently disable Altivec/VSX support when enabling soft-float. So > any usage of vector builtins will break. > > Enable Altivec/VSX with soft-float

RE: [PATCH 5/6] pci: layerscape: Add the EP mode support.

2018-10-30 Thread Xiaowei Bao
-Original Message- From: Xiaowei Bao Sent: 2018年10月26日 17:19 To: 'Kishon Vijay Abraham I' ; bhelg...@google.com; robh...@kernel.org; mark.rutl...@arm.com; shawn...@kernel.org; Leo Li ; lorenzo.pieral...@arm.com; a...@arndb.de; gre...@linuxfoundation.org; M.h. Lian ; Mingkai Hu ; Roy

Re: [PATCH v2 2/2] kgdb: Fix kgdb_roundup_cpus() for arches who used smp_call_function()

2018-10-30 Thread kbuild test robot
Hi Douglas, Thank you for the patch! Perhaps something to improve: [auto build test WARNING on kgdb/kgdb-next] [also build test WARNING on v4.19 next-20181030] [if your patch is applied to the wrong git tree, please drop us a note to help improve the system] url: https://github.com/0day-ci

[PATCH] powerpc/xmon: Relax frame size for clang

2018-10-30 Thread Joel Stanley
When building with clang (8 trunk, 7.0 release) the frame size limit is hit: arch/powerpc/xmon/xmon.c:452:12: warning: stack frame size of 2576 bytes in function 'xmon_core' [-Wframe-larger-than=] Some investigation by Naveen indicates this is due to clang saving the addresses to printf format

Re: [PATCH 2/2] selftests/powerpc: Skip test instead of failing

2018-10-30 Thread Tyrel Datwyler
On 10/30/2018 08:16 AM, Michael Ellerman wrote: > Thiago Jung Bauermann writes: > >> Breno Leitao writes: >> >>> Hi Tyrel, >>> >>> On 10/23/2018 05:41 PM, Tyrel Datwyler wrote: > --- a/tools/testing/selftests/powerpc/ptrace/core-pkey.c > +++

Re: [PATCH 0/7] serial: Finish kgdb on qcom_geni; fix many lockdep splats w/ kgdb

2018-10-30 Thread Doug Anderson
Hi, On Tue, Oct 30, 2018 at 4:56 AM Daniel Thompson wrote: > > On Mon, Oct 29, 2018 at 11:07:00AM -0700, Douglas Anderson wrote: > > Looking back, this is pretty much two series squashed that could be > > treated indepdently. The first is a serial series and the second is a > > kgdb series. > >

Re: [PATCH 7/7] kgdb: Remove irq flags and local_irq_enable/disable from roundup

2018-10-30 Thread Doug Anderson
Hi, On Tue, Oct 30, 2018 at 4:46 AM Daniel Thompson wrote: > > On Mon, Oct 29, 2018 at 11:07:07AM -0700, Douglas Anderson wrote: > > The function kgdb_roundup_cpus() was passed a parameter that was > > documented as: > > > > > the flags that will be used when restoring the interrupts. There is >

Re: [PATCH 6/7] smp: Don't yell about IRQs disabled in kgdb_roundup_cpus()

2018-10-30 Thread Doug Anderson
Daniel, On Tue, Oct 30, 2018 at 2:42 AM Daniel Thompson wrote: > > On Mon, Oct 29, 2018 at 11:07:06AM -0700, Douglas Anderson wrote: > > In kgdb_roundup_cpus() we've got code that looks like: > > local_irq_enable(); > > smp_call_function(kgdb_call_nmi_hook, NULL, 0); > >

[PATCH v2 2/2] kgdb: Fix kgdb_roundup_cpus() for arches who used smp_call_function()

2018-10-30 Thread Douglas Anderson
When I had lockdep turned on and dropped into kgdb I got a nice splat on my system. Specifically it hit: DEBUG_LOCKS_WARN_ON(current->hardirq_context) Specifically it looked like this: sysrq: SysRq : DEBUG [ cut here ] DEBUG_LOCKS_WARN_ON(current->hardirq_context)

[PATCH v2 1/2] kgdb: Remove irq flags from roundup

2018-10-30 Thread Douglas Anderson
The function kgdb_roundup_cpus() was passed a parameter that was documented as: > the flags that will be used when restoring the interrupts. There is > local_irq_save() call before kgdb_roundup_cpus(). Nobody used those flags. Anyone who wanted to temporarily turn on interrupts just did

[PATCH v2 0/2] kgdb: Fix kgdb_roundup_cpus()

2018-10-30 Thread Douglas Anderson
This series was originally part of the series ("serial: Finish kgdb on qcom_geni; fix many lockdep splats w/ kgdb") but it made sense to split it up. It's believed that dropping into kgdb should be more robust once these patches are applied. Changes in v2: - Removing irq flags separated from

Re: [PATCH v2 1/2] kbuild: replace cc-name test with CONFIG_CC_IS_CLANG

2018-10-30 Thread Joel Stanley
On Tue, 30 Oct 2018 at 23:58, Masahiro Yamada wrote: > > Evaluating cc-name invokes the compiler every time even when you are > not compiling anything, like 'make help'. This is not efficient. > > The compiler type has been already detected in the Kconfig stage. > Use CONFIG_CC_IS_CLANG, instead.

Re: [PATCH] hwmon: (ibmpowernv) Remove bogus __init annotations

2018-10-30 Thread Guenter Roeck
On Sun, Oct 28, 2018 at 06:16:51PM +0100, Geert Uytterhoeven wrote: > If gcc decides not to inline make_sensor_label(): > > WARNING: vmlinux.o(.text+0x4df549c): Section mismatch in reference from > the function .create_device_attrs() to the function > .init.text:.make_sensor_label() >

Re: [PATCH v2 1/2] kbuild: replace cc-name test with CONFIG_CC_IS_CLANG

2018-10-30 Thread Paul Burton
Hi Masahiro, On Tue, Oct 30, 2018 at 10:26:33PM +0900, Masahiro Yamada wrote: > Evaluating cc-name invokes the compiler every time even when you are > not compiling anything, like 'make help'. This is not efficient. > > The compiler type has been already detected in the Kconfig stage. > Use

Re: [PATCH 6/7] smp: Don't yell about IRQs disabled in kgdb_roundup_cpus()

2018-10-30 Thread Peter Zijlstra
On Mon, Oct 29, 2018 at 11:07:06AM -0700, Douglas Anderson wrote: > In kgdb_roundup_cpus() we've got code that looks like: > local_irq_enable(); > smp_call_function(kgdb_call_nmi_hook, NULL, 0); > local_irq_disable(); > Let's add kgdb to the list of reasons not to warn in >

[PATCH] arch: fix without checked-return value with lseek

2018-10-30 Thread Bo YU
lseek should have returned value but we miss it maybe. This is detected by Coverity scan: CID: 1440481 Signed-off-by: Bo YU --- arch/powerpc/boot/addnote.c | 6 +- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/arch/powerpc/boot/addnote.c b/arch/powerpc/boot/addnote.c index

Re: [PATCH 0/7] serial: Finish kgdb on qcom_geni; fix many lockdep splats w/ kgdb

2018-10-30 Thread Andy Shevchenko
On Mon, Oct 29, 2018 at 11:07:00AM -0700, Douglas Anderson wrote: > I started out this series trying to make sysrq work over the serial > console on qcom_geni_serial, then fell into a rat's nest. > > To solve the deadlock I faced when enabling sysrq I tried to borrow > code from '8250_port.c'

Re: [PATCH 0/7] serial: Finish kgdb on qcom_geni; fix many lockdep splats w/ kgdb

2018-10-30 Thread Russell King - ARM Linux
On Tue, Oct 30, 2018 at 11:56:28AM +, Daniel Thompson wrote: > On Mon, Oct 29, 2018 at 11:07:00AM -0700, Douglas Anderson wrote: > > Looking back, this is pretty much two series squashed that could be > > treated indepdently. The first is a serial series and the second is a > > kgdb series. >

Re: [PATCH 2/2] selftests/powerpc: Skip test instead of failing

2018-10-30 Thread Michael Ellerman
Thiago Jung Bauermann writes: > Breno Leitao writes: > >> Hi Tyrel, >> >> On 10/23/2018 05:41 PM, Tyrel Datwyler wrote: --- a/tools/testing/selftests/powerpc/ptrace/core-pkey.c +++ b/tools/testing/selftests/powerpc/ptrace/core-pkey.c @@ -352,17 +352,11 @@ static int

Re: NXP P50XX/e5500: SMP doesn't work anymore with the latest Git kernel

2018-10-30 Thread Christian Zigotzky
On 30 October 2018 at 08:27AM, Christian Zigotzky wrote: On 30 October 2018 at 02:59AM, Benjamin Herrenschmidt wrote: On Tue, 2018-10-30 at 02:42 +0100, Christian Zigotzky wrote: OF patch for the latest Git kernel: http://www.xenosoft.de/of_v2.patch This just seems to revert a whole bunch of

Re: [PATCH 1/2] kbuild: replace cc-name test with CONFIG_CC_IS_CLANG

2018-10-30 Thread Michael Ellerman
Masahiro Yamada writes: > On Tue, Oct 30, 2018 at 9:36 PM Michael Ellerman wrote: >> >> Masahiro Yamada writes: >> > diff --git a/arch/powerpc/Makefile b/arch/powerpc/Makefile >> > index 17be664..338e827 100644 >> > --- a/arch/powerpc/Makefile >> > +++ b/arch/powerpc/Makefile >> > @@ -96,7

Re: [PATCH] powerpc/npu-dma: Remove NPU DMA ops

2018-10-30 Thread Michael Ellerman
Christoph Hellwig writes: > On Wed, Oct 31, 2018 at 12:09:29AM +1100, Benjamin Herrenschmidt wrote: >> On Tue, 2018-10-30 at 13:58 +0100, Christoph Hellwig wrote: >> > Please take my patch instead. We have a kernel polcity to not keep >> > dead code around, and everyone including Linus and the

Re: [PATCH 01/21] of: Add cpu node iterator for_each_of_cpu_node()

2018-10-30 Thread Rob Herring
On Tue, Oct 30, 2018 at 9:20 AM Michael Ellerman wrote: > > Michael Ellerman writes: > > Hi Rob, > > > > Sorry I missed this when you posted it. > > > > Rob Herring writes: > >> Iterating thru cpu nodes is a common pattern. Create a common iterator > >> which can find child nodes either by node

Re: [PATCH 01/21] of: Add cpu node iterator for_each_of_cpu_node()

2018-10-30 Thread Michael Ellerman
Michael Ellerman writes: > Hi Rob, > > Sorry I missed this when you posted it. > > Rob Herring writes: >> Iterating thru cpu nodes is a common pattern. Create a common iterator >> which can find child nodes either by node name or device_type == cpu. >> Using the former will allow for eventually

Re: [PATCH 01/21] of: Add cpu node iterator for_each_of_cpu_node()

2018-10-30 Thread Michael Ellerman
Hi Rob, Sorry I missed this when you posted it. Rob Herring writes: > Iterating thru cpu nodes is a common pattern. Create a common iterator > which can find child nodes either by node name or device_type == cpu. > Using the former will allow for eventually dropping device_type > properties

[PATCH] powerpc/powernv: remove dead npu-dma code

2018-10-30 Thread Christoph Hellwig
This code has never been unused in the kernel since it was merged, and there has been no attempt that I could find to even submit users for it. Besides the general policy of not keep 1000+ lines of dead code, it helps cleaning up the DMA code and making powerpc user common infrastructure. This

[PATCH v2 1/2] kbuild: replace cc-name test with CONFIG_CC_IS_CLANG

2018-10-30 Thread Masahiro Yamada
Evaluating cc-name invokes the compiler every time even when you are not compiling anything, like 'make help'. This is not efficient. The compiler type has been already detected in the Kconfig stage. Use CONFIG_CC_IS_CLANG, instead. Signed-off-by: Masahiro Yamada Acked-by: Michael Ellerman

Re: [PATCH] powerpc/npu-dma: Remove NPU DMA ops

2018-10-30 Thread Christoph Hellwig
On Wed, Oct 31, 2018 at 12:09:29AM +1100, Benjamin Herrenschmidt wrote: > On Tue, 2018-10-30 at 13:58 +0100, Christoph Hellwig wrote: > > Please take my patch instead. We have a kernel polcity to not keep > > dead code around, and everyone including Linus and the attending IBMers > > confirmed

Re: [PATCH] powerpc/npu-dma: Remove NPU DMA ops

2018-10-30 Thread Benjamin Herrenschmidt
On Tue, 2018-10-30 at 13:58 +0100, Christoph Hellwig wrote: > Please take my patch instead. We have a kernel polcity to not keep > dead code around, and everyone including Linus and the attending IBMers > confirmed this. Let's call a cat a cat ... ;-) It's not *dead* code. It's code that is

Re: [PATCH] powerpc/npu-dma: Remove NPU DMA ops

2018-10-30 Thread Christoph Hellwig
Please take my patch instead. We have a kernel polcity to not keep dead code around, and everyone including Linus and the attending IBMers confirmed this. On Tue, Oct 30, 2018 at 10:02:03PM +1100, Alistair Popple wrote: > The NPU IOMMU is setup to mirror the parent PCIe device IOMMU > setup.

Re: [PATCH 1/2] kbuild: replace cc-name test with CONFIG_CC_IS_CLANG

2018-10-30 Thread Masahiro Yamada
On Tue, Oct 30, 2018 at 9:36 PM Michael Ellerman wrote: > > Masahiro Yamada writes: > > diff --git a/arch/powerpc/Makefile b/arch/powerpc/Makefile > > index 17be664..338e827 100644 > > --- a/arch/powerpc/Makefile > > +++ b/arch/powerpc/Makefile > > @@ -96,7 +96,7 @@

Re: [PATCH 1/2] kbuild: replace cc-name test with CONFIG_CC_IS_CLANG

2018-10-30 Thread Michael Ellerman
Masahiro Yamada writes: > diff --git a/arch/powerpc/Makefile b/arch/powerpc/Makefile > index 17be664..338e827 100644 > --- a/arch/powerpc/Makefile > +++ b/arch/powerpc/Makefile > @@ -96,7 +96,7 @@ aflags-$(CONFIG_CPU_BIG_ENDIAN) += $(call > cc-option,-mabi=elfv1) >

Re: [PATCH 0/7] serial: Finish kgdb on qcom_geni; fix many lockdep splats w/ kgdb

2018-10-30 Thread Daniel Thompson
On Mon, Oct 29, 2018 at 11:07:00AM -0700, Douglas Anderson wrote: > Looking back, this is pretty much two series squashed that could be > treated indepdently. The first is a serial series and the second is a > kgdb series. Indeed. I couldn't work out the link between the first 5 patches and the

Re: [PATCH 7/7] kgdb: Remove irq flags and local_irq_enable/disable from roundup

2018-10-30 Thread Daniel Thompson
On Mon, Oct 29, 2018 at 11:07:07AM -0700, Douglas Anderson wrote: > The function kgdb_roundup_cpus() was passed a parameter that was > documented as: > > > the flags that will be used when restoring the interrupts. There is > > local_irq_save() call before kgdb_roundup_cpus(). > > Nobody used

[PATCH] powerpc/npu-dma: Remove NPU DMA ops

2018-10-30 Thread Alistair Popple
The NPU IOMMU is setup to mirror the parent PCIe device IOMMU setup. Therefore it does not make sense to call dma operations such as dma_map_page, etc. directly on these devices. The existing dma-ops simply print a warning if they are ever called, however this is unnecessary and the warnings are

Re: [RFC PATCH] seccomp: Add protection keys into seccomp_data

2018-10-30 Thread Michael Sammler
On 10/29/2018 11:33 PM, Dave Hansen wrote: But, that's really an implementation detail. The effect on the ABI and how this might constrain future pkeys use is my bigger worry. I'd also want to make sure that your specific use-case is compatible with all the oddities of pkeys, like the 'clone'

Re: [PATCH 6/7] smp: Don't yell about IRQs disabled in kgdb_roundup_cpus()

2018-10-30 Thread Daniel Thompson
On Mon, Oct 29, 2018 at 11:07:06AM -0700, Douglas Anderson wrote: > In kgdb_roundup_cpus() we've got code that looks like: > local_irq_enable(); > smp_call_function(kgdb_call_nmi_hook, NULL, 0); > local_irq_disable(); > > In certain cases when we drop into kgdb (like with sysrq-g on a

Re: NXP P50XX/e5500: SMP doesn't work anymore with the latest Git kernel

2018-10-30 Thread Christian Zigotzky
On 30 October 2018 at 02:59AM, Benjamin Herrenschmidt wrote: On Tue, 2018-10-30 at 02:42 +0100, Christian Zigotzky wrote: OF patch for the latest Git kernel: http://www.xenosoft.de/of_v2.patch This just seems to revert a whole bunch of stuff, not really the right way to go. Why is

Re: [mainline][bisected 55469b][ppc] build error at drivers/net/ethernet/mellanox/mlx4/en_rx.c

2018-10-30 Thread Eric Dumazet
On Mon, Oct 29, 2018 at 11:43 PM Abdul Haleem wrote: > > Greeting's > > mainline build fails on my powerpc with commit 55469b : drivers: net: > remove inclusion when not needed > > Machine type: PowerPC power 8 bare-metal > kernel : 4.19.0 > gcc : 4.8.5 > config attached > Thanks for the

[mainline][bisected 55469b][ppc] build error at drivers/net/ethernet/mellanox/mlx4/en_rx.c

2018-10-30 Thread Abdul Haleem
Greeting's mainline build fails on my powerpc with commit 55469b : drivers: net: remove inclusion when not needed Machine type: PowerPC power 8 bare-metal kernel : 4.19.0 gcc : 4.8.5 config attached build errors: drivers/net/ethernet/mellanox/mlx4/en_rx.c:582:18: warning: ‘struct iphdr’

Re: [RFC PATCH v1 1/4] kvmppc: HMM backend driver to manage pages of secure guest

2018-10-30 Thread Paul Mackerras
On Mon, Oct 29, 2018 at 11:31:55PM -0700, Ram Pai wrote: > On Tue, Oct 30, 2018 at 04:03:00PM +1100, Paul Mackerras wrote: > > On Mon, Oct 22, 2018 at 10:48:34AM +0530, Bharata B Rao wrote: > > > HMM driver for KVM PPC to manage page transitions of > > > secure guest via H_SVM_PAGE_IN and

Re: [RFC PATCH v1 1/4] kvmppc: HMM backend driver to manage pages of secure guest

2018-10-30 Thread Ram Pai
On Tue, Oct 30, 2018 at 04:03:00PM +1100, Paul Mackerras wrote: > On Mon, Oct 22, 2018 at 10:48:34AM +0530, Bharata B Rao wrote: > > HMM driver for KVM PPC to manage page transitions of > > secure guest via H_SVM_PAGE_IN and H_SVM_PAGE_OUT hcalls. > > > > H_SVM_PAGE_IN: Move the content of a