[RFC PATCH for 4.21 09/16] powerpc: Wire up cpu_opv system call

2018-11-01 Thread Mathieu Desnoyers
Signed-off-by: Mathieu Desnoyers CC: Benjamin Herrenschmidt CC: Paul Mackerras CC: Michael Ellerman CC: Boqun Feng CC: Peter Zijlstra CC: "Paul E. McKenney" CC: linuxppc-dev@lists.ozlabs.org --- arch/powerpc/include/asm/systbl.h | 1 + arch/powerpc/include/uapi/asm/unistd.h | 1 + 2 fi

Re: [PATCH 6/9] PCI: consolidate PCI config entry in drivers/pci

2018-11-01 Thread Russell King - ARM Linux
On Fri, Oct 19, 2018 at 09:58:46PM +0900, Masahiro Yamada wrote: > On Fri, Oct 19, 2018 at 9:23 PM Russell King - ARM Linux > wrote: > > > > index a68b34183107..b185794549be 100644 > > > --- a/arch/arm/mach-pxa/Kconfig > > > +++ b/arch/arm/mach-pxa/Kconfig > > > @@ -125,7 +125,7 @@ config MACH_AR

Re: [RFC PATCH v1 2/4] kvmppc: Add support for shared pages in HMM driver

2018-11-01 Thread Balbir Singh
On Mon, Oct 22, 2018 at 10:48:35AM +0530, Bharata B Rao wrote: > A secure guest will share some of its pages with hypervisor (Eg. virtio > bounce buffers etc). Support shared pages in HMM driver. > > Signed-off-by: Bharata B Rao > --- > arch/powerpc/kvm/book3s_hv_hmm.c | 69 +

Re: [RFC PATCH v1 3/4] kvmppc: H_SVM_INIT_START and H_SVM_INIT_DONE hcalls

2018-11-01 Thread Balbir Singh
On Mon, Oct 22, 2018 at 10:48:36AM +0530, Bharata B Rao wrote: > H_SVM_INIT_START: Initiate securing a VM > H_SVM_INIT_DONE: Conclude securing a VM > > During early guest init, these hcalls will be issued by UV. > As part of these hcalls, [un]register memslots with UV. > > Signed-off-by: Bharata

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

2018-11-01 Thread Michael Ellerman
Rob Herring writes: > 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

Re: PIE binaries are no longer mapped below 4 GiB on ppc64le

2018-11-01 Thread Florian Weimer
* Michael Ellerman: > Hi Florian, > > Florian Weimer writes: >> We tried to use Go to build PIE binaries, and while the Go toolchain is >> definitely not ready (it produces text relocations and problematic >> relocations in general), it exposed what could be an accidental >> userspace ABI change.

Re: [PATCH] ppc4xx: ocm: fix errnous "failed to create file" errors

2018-11-01 Thread Michael Ellerman
Hi Christian, Christian Lamparter writes: > Previously, the kernel would complain: > > | debugfs ppc4xx ocm: failed to create file > > But the "info" file was still created and working. This > is because debugfs_create_file() returns a pointer to a > struct *dentry on success or -ENODEV when debu

Re: selftests: powerpc: Fix warning for security subdir

2018-11-01 Thread Michael Ellerman
On Mon, 2018-10-22 at 12:09:26 UTC, Joel Stanley wrote: > typing 'make' inside tools/testing/selftests/powerpc gave a build > warning: > > BUILD_TARGET=tools/testing/selftests/powerpc/security; mkdir -p > $BUILD_TARGET; make OUTPUT=$BUILD_TARGET -k -C security all > make[1]: Entering directory 't

Re: selftests/powerpc: Relax L1d miss targets for rfi_flush test

2018-11-01 Thread Michael Ellerman
On Tue, 2018-10-23 at 08:04:56 UTC, "Naveen N. Rao" wrote: > When running the rfi_flush test, if the system is loaded, we see two > issues: > 1. The L1d misses when rfi_flush is disabled increase significantly due > to other workloads interfering with the cache. > 2. The L1d misses when rfi_flush i

Re: [1/5] selftests/powerpc/ptrace: Fix out-of-tree build

2018-11-01 Thread Michael Ellerman
On Mon, 2018-10-29 at 11:23:49 UTC, Michael Ellerman wrote: > From: Joel Stanley > > We should use TEST_GEN_PROGS, not TEST_PROGS. That tells the selftests > makefile (lib.mk) that those tests are generated (built), and so it > adds the $(OUTPUT) prefix for us, making the out-of-tree build work >

Re: powerpc/xmon: Relax frame size for clang

2018-11-01 Thread Michael Ellerman
On Wed, 2018-10-31 at 01:09:34 UTC, Joel Stanley wrote: > 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

Re: selftests/powerpc: Fix compilation issue due to asm label

2018-11-01 Thread Michael Ellerman
On Wed, 2018-10-31 at 17:18:13 UTC, "Naveen N. Rao" wrote: > We are using 'dscr_insn' as a label in inline asm to identify if a > SIGILL was generated by the mtspr instruction at that point. However, > with inline assembly, the compiler is still free to duplicate the asm > statement for optimizatio

Re: [RFC PATCH] lib: Introduce generic __cmpxchg_u64() and use it where needed

2018-11-01 Thread Mark Rutland
[adding the atomic maintainers] On Thu, Nov 01, 2018 at 12:17:31AM +, Trond Myklebust wrote: > On Wed, 2018-10-31 at 23:32 +, Paul Burton wrote: > > (Copying SunRPC & net maintainers.) > > > > Hi Guenter, > > > > On Wed, Oct 31, 2018 at 03:02:53PM -0700, Guenter Roeck wrote: > > > The al

Re: [RFC PATCH] lib: Introduce generic __cmpxchg_u64() and use it where needed

2018-11-01 Thread Peter Zijlstra
On Thu, Nov 01, 2018 at 01:18:46PM +, Mark Rutland wrote: > > My one question (and the reason why I went with cmpxchg() in the first > > place) would be about the overflow behaviour for atomic_fetch_inc() and > > friends. I believe those functions should be OK on x86, so that when we > > overfl

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

2018-11-01 Thread Segher Boessenkool
On Thu, Nov 01, 2018 at 09:52:57PM +1100, Michael Ellerman wrote: > Rob Herring writes: > > Yes, I was aware at least older powerpc DTs don't use 'cpu' for node names. > > Actually newer ones too, see below :) Good, because that is required by the Open Firmware standard (the PowerPC binding, to

Re: [RFC PATCH] lib: Introduce generic __cmpxchg_u64() and use it where needed

2018-11-01 Thread Trond Myklebust
On Thu, 2018-11-01 at 15:59 +0100, Peter Zijlstra wrote: > On Thu, Nov 01, 2018 at 01:18:46PM +, Mark Rutland wrote: > > > My one question (and the reason why I went with cmpxchg() in the > > > first > > > place) would be about the overflow behaviour for > > > atomic_fetch_inc() and > > > frien

Re: [RFC PATCH] lib: Introduce generic __cmpxchg_u64() and use it where needed

2018-11-01 Thread Guenter Roeck
On Thu, Nov 01, 2018 at 06:30:08AM +, Trond Myklebust wrote: [ ... ] > > > > For my part I agree that this would be a much better solution. The > > argument > > that it is not always absolutely guaranteed that atomics don't wrap > > doesn't > > really hold for me because it looks like they all

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

2018-11-01 Thread Rob Herring
On Thu, Nov 1, 2018 at 10:12 AM Segher Boessenkool wrote: > > On Thu, Nov 01, 2018 at 09:52:57PM +1100, Michael Ellerman wrote: > > Rob Herring writes: > > > Yes, I was aware at least older powerpc DTs don't use 'cpu' for node > > > names. > > > > Actually newer ones too, see below :) > > Good,

Re: [RFC PATCH] lib: Introduce generic __cmpxchg_u64() and use it where needed

2018-11-01 Thread Peter Zijlstra
On Thu, Nov 01, 2018 at 03:22:15PM +, Trond Myklebust wrote: > On Thu, 2018-11-01 at 15:59 +0100, Peter Zijlstra wrote: > > On Thu, Nov 01, 2018 at 01:18:46PM +, Mark Rutland wrote: > > > > My one question (and the reason why I went with cmpxchg() in the > > > > first place) would be about

Re: [RFC PATCH] lib: Introduce generic __cmpxchg_u64() and use it where needed

2018-11-01 Thread Eric Dumazet
On 11/01/2018 09:32 AM, Peter Zijlstra wrote: >> Anyhow, if the atomic maintainers are willing to stand up and state for >> the record that the atomic counters are guaranteed to wrap modulo 2^n >> just like unsigned integers, then I'm happy to take Paul's patch. > > I myself am certainly relyi

Re: [RFC PATCH] lib: Introduce generic __cmpxchg_u64() and use it where needed

2018-11-01 Thread Peter Zijlstra
On Thu, Nov 01, 2018 at 09:59:38AM -0700, Eric Dumazet wrote: > On 11/01/2018 09:32 AM, Peter Zijlstra wrote: > > >> Anyhow, if the atomic maintainers are willing to stand up and state for > >> the record that the atomic counters are guaranteed to wrap modulo 2^n > >> just like unsigned integers,

Re: [RFC PATCH] lib: Introduce generic __cmpxchg_u64() and use it where needed

2018-11-01 Thread Peter Zijlstra
On Thu, Nov 01, 2018 at 10:01:46AM -0700, Paul E. McKenney wrote: > On Thu, Nov 01, 2018 at 05:32:12PM +0100, Peter Zijlstra wrote: > > On Thu, Nov 01, 2018 at 03:22:15PM +, Trond Myklebust wrote: > > > On Thu, 2018-11-01 at 15:59 +0100, Peter Zijlstra wrote: > > > > On Thu, Nov 01, 2018 at 01:

Re: [RFC PATCH] lib: Introduce generic __cmpxchg_u64() and use it where needed

2018-11-01 Thread Peter Zijlstra
On Thu, Nov 01, 2018 at 06:14:32PM +0100, Peter Zijlstra wrote: > > This reminds me of this so silly patch :/ > > > > https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=adb03115f4590baa280ddc440a8eff08a6be0cb7 You'd probably want to write it like so; +- some orderin

Re: [RFC PATCH] lib: Introduce generic __cmpxchg_u64() and use it where needed

2018-11-01 Thread Paul Burton
Hi Trond, On Thu, Nov 01, 2018 at 12:17:31AM +, Trond Myklebust wrote: > On Wed, 2018-10-31 at 23:32 +, Paul Burton wrote: > > In this particular case I have no idea why > > net/sunrpc/auth_gss/gss_krb5_seal.c is using cmpxchg64() at all. It's > > essentially reinventing atomic64_fetch_inc

Re: [PATCH 13/36] dt-bindings: arm: Convert PMU binding to json-schema

2018-11-01 Thread Rob Herring
On Tue, Oct 9, 2018 at 6:57 AM Will Deacon wrote: > > Hi Rob, > > On Fri, Oct 05, 2018 at 11:58:25AM -0500, Rob Herring wrote: > > Convert ARM PMU binding to DT schema format using json-schema. > > > > Cc: Will Deacon > > Cc: Mark Rutland > > Cc: linux-arm-ker...@lists.infradead.org > > Cc: devi

Re: [RFC PATCH] lib: Introduce generic __cmpxchg_u64() and use it where needed

2018-11-01 Thread Paul E. McKenney
On Thu, Nov 01, 2018 at 05:32:12PM +0100, Peter Zijlstra wrote: > On Thu, Nov 01, 2018 at 03:22:15PM +, Trond Myklebust wrote: > > On Thu, 2018-11-01 at 15:59 +0100, Peter Zijlstra wrote: > > > On Thu, Nov 01, 2018 at 01:18:46PM +, Mark Rutland wrote: > > > > > > My one question (and the r

Re: [RFC PATCH] lib: Introduce generic __cmpxchg_u64() and use it where needed

2018-11-01 Thread Paul E. McKenney
On Thu, Nov 01, 2018 at 06:18:46PM +0100, Peter Zijlstra wrote: > On Thu, Nov 01, 2018 at 10:01:46AM -0700, Paul E. McKenney wrote: > > On Thu, Nov 01, 2018 at 05:32:12PM +0100, Peter Zijlstra wrote: > > > On Thu, Nov 01, 2018 at 03:22:15PM +, Trond Myklebust wrote: > > > > On Thu, 2018-11-01 a

Re: [RFC PATCH] lib: Introduce generic __cmpxchg_u64() and use it where needed

2018-11-01 Thread Paul E. McKenney
On Thu, Nov 01, 2018 at 06:14:32PM +0100, Peter Zijlstra wrote: > On Thu, Nov 01, 2018 at 09:59:38AM -0700, Eric Dumazet wrote: > > On 11/01/2018 09:32 AM, Peter Zijlstra wrote: > > > > >> Anyhow, if the atomic maintainers are willing to stand up and state for > > >> the record that the atomic cou

Re: [RFC PATCH] lib: Introduce generic __cmpxchg_u64() and use it where needed

2018-11-01 Thread Paul E. McKenney
On Thu, Nov 01, 2018 at 06:27:39PM +0100, Peter Zijlstra wrote: > On Thu, Nov 01, 2018 at 06:14:32PM +0100, Peter Zijlstra wrote: > > > This reminds me of this so silly patch :/ > > > > > > https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=adb03115f4590baa280ddc440a

Re: [RFC PATCH] lib: Introduce generic __cmpxchg_u64() and use it where needed

2018-11-01 Thread Peter Zijlstra
On Thu, Nov 01, 2018 at 01:29:10PM -0700, Paul E. McKenney wrote: > On Thu, Nov 01, 2018 at 06:27:39PM +0100, Peter Zijlstra wrote: > > On Thu, Nov 01, 2018 at 06:14:32PM +0100, Peter Zijlstra wrote: > > > > This reminds me of this so silly patch :/ > > > > > > > > https://git.kernel.org/pub/s

Re: [RFC PATCH] lib: Introduce generic __cmpxchg_u64() and use it where needed

2018-11-01 Thread Peter Zijlstra
On Thu, Nov 01, 2018 at 06:46:50PM +0100, Dmitry Vyukov wrote: > If there is a warning that we don't want to see at all, then we can > disable it. It supposed to be a useful tool, rather than a thing in > itself that lives own life. We already I think removed 1 particularly > noisy warning and made

[PATCH] powerpc/mm: remove unused function prototype

2018-11-01 Thread Breno Leitao
Commit f384796c40dc ("powerpc/mm: Add support for handling > 512TB address in SLB miss") removed function slb_miss_bad_addr(struct pt_regs *regs), but kept its declaration in the prototype file. This patch simply removes the function definition. Signed-off-by: Breno Leitao --- arch/powerpc/inclu

Re: [RFC PATCH] lib: Introduce generic __cmpxchg_u64() and use it where needed

2018-11-01 Thread Paul E. McKenney
On Thu, Nov 01, 2018 at 10:38:34PM +0100, Peter Zijlstra wrote: > On Thu, Nov 01, 2018 at 01:29:10PM -0700, Paul E. McKenney wrote: > > On Thu, Nov 01, 2018 at 06:27:39PM +0100, Peter Zijlstra wrote: > > > On Thu, Nov 01, 2018 at 06:14:32PM +0100, Peter Zijlstra wrote: > > > > > This reminds me of

[PATCH v2] raid6/ppc: Fix build for clang

2018-11-01 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 ma

[PATCH] powerpc/math-emu: Fix building with clang

2018-11-01 Thread Joel Stanley
make CC=clang-8 ARCH=powerpc CROSS_COMPILE=powerpc-linux-gnu- ppc44x_defconfig make CC=clang-8 ARCH=powerpc CROSS_COMPILE=powerpc-linux-gnu- ... arch/powerpc/math-emu/fnmsub.c:46:2: error: invalid use of a cast in a inline asm context requiring an l-value: remove the cast or build wit

[PATCH] powerpc/32: Avoid unsupported flags with clang

2018-11-01 Thread Joel Stanley
When building for ppc32 with clang these flags are unsupported: -ffixed-r2 and -mmultiple llvm's lib/Target/PowerPC/PPCRegisterInfo.cpp marks r2 as reserved on when building for SVR4ABI and !ppc64: // The SVR4 ABI reserves r2 and r13 if (Subtarget.isSVR4ABI()) { // We only reserve r2 i

Re: [PATCH] powerpc/32: Avoid unsupported flags with clang

2018-11-01 Thread Joel Stanley
On Fri, 2 Nov 2018 at 15:09, Joel Stanley wrote: > > When building for ppc32 with clang these flags are unsupported: > > -ffixed-r2 and -mmultiple > > llvm's lib/Target/PowerPC/PPCRegisterInfo.cpp marks r2 as reserved on > when building for SVR4ABI and !ppc64: > > // The SVR4 ABI reserves r2 a