Re: [PATCH] powerpc/64s: Fix CPU_FTRS_ALWAYS vs DT CPU features

2018-04-12 Thread Nicholas Piggin
On Thu, 12 Apr 2018 23:47:51 +1000 Michael Ellerman wrote: > The cpu_has_feature() mechanism has an optimisation where at build > time we construct a mask of the CPU feature bits that will always be > true for the given .config, based on the platform/bitness/etc. that we > are building for. > >

Re: [PATCH 2/2] powernv/npu: Prevent overwriting of pnv_npu2_init_contex() callback parameters

2018-04-12 Thread Mark Hairgrove
On Wed, 11 Apr 2018, Alistair Popple wrote: > There is a single npu context per set of callback parameters. Callers > should be prevented from overwriting existing callback values so instead > return an error if different parameters are passed. > > Signed-off-by: Alistair Popple > --- > arch/

Re: [PATCH 1/2] powernv/npu: Add lock to prevent race in concurrent context init/destroy

2018-04-12 Thread Mark Hairgrove
On Wed, 11 Apr 2018, Alistair Popple wrote: > The pnv_npu2_init_context() and pnv_npu2_destroy_context() functions are > used to allocate/free contexts to allow address translation and shootdown > by the NPU on a particular GPU. Context initialisation is implicitly safe > as it is protected by t

Re: powerpc/mm/radix: Fix checkstops caused by invalid tlbiel

2018-04-12 Thread Michael Ellerman
On Thu, 2018-04-12 at 05:53:52 UTC, Michael Ellerman wrote: > In tlbiel_radix_set_isa300() we use the PPC_TLBIEL() macro to > construct tlbiel instructions. The instruction takes 5 fields, two of > which are registers, and the others are constants. But because it's > constructed with inline asm the

[PATCH] powerpc/sparse: fix plain integer as NULL pointer warning

2018-04-12 Thread Mathieu Malaterre
Trivial fix to remove the following sparse warnings: arch/powerpc/kernel/module_32.c:112:74: warning: Using plain integer as NULL pointer arch/powerpc/kernel/module_32.c:117:74: warning: Using plain integer as NULL pointer drivers/macintosh/via-pmu.c:1155:28: warning: Using plain integer a

[RFC PATCH for 4.18 14/23] powerpc: Wire up cpu_opv system call

2018-04-12 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/asm/unistd.h | 2 +- arc

[RFC PATCH for 4.18 07/23] powerpc: Add support for restartable sequences

2018-04-12 Thread Mathieu Desnoyers
From: Boqun Feng Call the rseq_handle_notify_resume() function on return to userspace if TIF_NOTIFY_RESUME thread flag is set. Perform fixup on the pre-signal when a signal is delivered on top of a restartable sequence critical section. Signed-off-by: Boqun Feng Signed-off-by: Mathieu Desnoyer

[RFC PATCH for 4.18 08/23] powerpc: Wire up restartable sequences system call

2018-04-12 Thread Mathieu Desnoyers
From: Boqun Feng Wire up the rseq system call on powerpc. This provides an ABI improving the speed of a user-space getcpu operation on powerpc by skipping the getcpu system call on the fast path, as well as improving the speed of user-space operations on per-cpu data compared to using load-reser

Re: sparc/ppc/arm compat siginfo ABI regressions: sending SIGFPE via kill() returns wrong values in si_pid and si_uid

2018-04-12 Thread Dmitry V. Levin
On Thu, Apr 12, 2018 at 09:50:26AM -0700, Linus Torvalds wrote: > Does this attached patch perhaps fix the ARM case? > > It just uses FPE_FLTUNK as the default si_code for SIGFPE, which seems > sane enough. And then gets rid of FPE_FIXME, which should resolve the > nasty case. > > Hmm? Entirely u

Re: sparc/ppc/arm compat siginfo ABI regressions: sending SIGFPE via kill() returns wrong values in si_pid and si_uid

2018-04-12 Thread Linus Torvalds
On Thu, Apr 12, 2018 at 10:20 AM, Russell King - ARM Linux wrote: > > This file was created to contain FPE_FIXME, by the "signal/arm: Document > conflicts with SI_USER and SIGFPE" commit so if we're removing it, it > would be better to remove the whole file. Fair enough. I'm not going to commit t

Re: sparc/ppc/arm compat siginfo ABI regressions: sending SIGFPE via kill() returns wrong values in si_pid and si_uid

2018-04-12 Thread Russell King - ARM Linux
On Thu, Apr 12, 2018 at 09:50:26AM -0700, Linus Torvalds wrote: > Does this attached patch perhaps fix the ARM case? > > It just uses FPE_FLTUNK as the default si_code for SIGFPE, which seems > sane enough. And then gets rid of FPE_FIXME, which should resolve the > nasty case. > > Hmm? Entirely u

Re: sparc/ppc/arm compat siginfo ABI regressions: sending SIGFPE via kill() returns wrong values in si_pid and si_uid

2018-04-12 Thread Linus Torvalds
Does this attached patch perhaps fix the ARM case? It just uses FPE_FLTUNK as the default si_code for SIGFPE, which seems sane enough. And then gets rid of FPE_FIXME, which should resolve the nasty case. Hmm? Entirely untested, and I didn't really look at the test-case in question since I can't r

Applied "ASoC: fsl_ssi: Fix mode setting when changing channel number" to the asoc tree

2018-04-12 Thread Mark Brown
The patch ASoC: fsl_ssi: Fix mode setting when changing channel number has been applied to the asoc tree at https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound.git All being well this means that it will be integrated into the linux-next tree (usually sometime in the next 24 hou

Applied "ASoC: fsl_esai: Fix divisor calculation failure at lower ratio" to the asoc tree

2018-04-12 Thread Mark Brown
The patch ASoC: fsl_esai: Fix divisor calculation failure at lower ratio has been applied to the asoc tree at https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound.git All being well this means that it will be integrated into the linux-next tree (usually sometime in the next 24 h

[PATCH v2 00/13] y2038: convert IPC syscalls

2018-04-12 Thread Arnd Bergmann
This is an update of a series I posted a long time ago [1], updating the IPC subsystem to pass down 64-bit time stamps to user space. In particular, for sys_msgctl, sys_semctl and sys_shmctl, I do not introduce a completely new set of replacement system calls, but instead extend the existing ones

[PATCH] powerpc/64s: Fix CPU_FTRS_ALWAYS vs DT CPU features

2018-04-12 Thread Michael Ellerman
The cpu_has_feature() mechanism has an optimisation where at build time we construct a mask of the CPU feature bits that will always be true for the given .config, based on the platform/bitness/etc. that we are building for. That is incompatible with DT CPU features, where the set of CPU features

Re: [PATCH v9 21/24] perf tools: Add support for the SPF perf event

2018-04-12 Thread Laurent Dufour
On 10/04/2018 08:47, David Rientjes wrote: > On Mon, 26 Mar 2018, Andi Kleen wrote: > >>> Aside: should there be a new spec_flt field for struct task_struct that >>> complements maj_flt and min_flt and be exported through /proc/pid/stat? >> >> No. task_struct is already too bloated. If you need p

Re: sparc/ppc/arm compat siginfo ABI regressions: sending SIGFPE via kill() returns wrong values in si_pid and si_uid

2018-04-12 Thread Russell King - ARM Linux
On Thu, Apr 12, 2018 at 03:49:28PM +0300, Dmitry V. Levin wrote: > The "KERNEL BUG" diagnostics I was talking about was added to strace yesterday > as a part of workaround commit, see > https://github.com/strace/strace/commit/34c7794cc16e2511eda7b1d5767c655a83b17309 > Before that change the test ju

Re: sparc/ppc/arm compat siginfo ABI regressions: sending SIGFPE via kill() returns wrong values in si_pid and si_uid

2018-04-12 Thread Dmitry V. Levin
On Thu, Apr 12, 2018 at 01:19:49PM +0100, Russell King - ARM Linux wrote: > On Thu, Apr 12, 2018 at 02:03:14PM +0300, Dmitry V. Levin wrote: > > On Thu, Apr 12, 2018 at 10:58:11AM +0100, Russell King - ARM Linux wrote: > > > On Thu, Apr 12, 2018 at 04:34:35AM +0300, Dmitry V. Levin wrote: > > > > A

Re: sparc/ppc/arm compat siginfo ABI regressions: sending SIGFPE via kill() returns wrong values in si_pid and si_uid

2018-04-12 Thread Russell King - ARM Linux
On Thu, Apr 12, 2018 at 02:03:14PM +0300, Dmitry V. Levin wrote: > On Thu, Apr 12, 2018 at 10:58:11AM +0100, Russell King - ARM Linux wrote: > > On Thu, Apr 12, 2018 at 04:34:35AM +0300, Dmitry V. Levin wrote: > > > A similar commit v4.16-rc1~159^2~37 > > > ("signal/arm: Document conflicts with SI_

[PATCH v4] mm: remove odd HAVE_PTE_SPECIAL

2018-04-12 Thread Laurent Dufour
Remove the additional define HAVE_PTE_SPECIAL and rely directly on CONFIG_ARCH_HAS_PTE_SPECIAL. There is no functional change introduced by this patch Signed-off-by: Laurent Dufour --- mm/memory.c | 15 ++- 1 file changed, 6 insertions(+), 9 deletions(-) diff --git a/mm/memory.c b/

[PATCH] cxl: Set the PBCQ Tunnel BAR register when enabling capi mode

2018-04-12 Thread Philippe Bergheaud
Skiboot used to set the default Tunnel BAR register value when capi mode was enabled. This approach was ok for the cxl driver, but prevented other drivers from choosing different values. Skiboot versions > 5.11 will not set the default value any longer. This patch modifies the cxl driver to set/re

Re: sparc/ppc/arm compat siginfo ABI regressions: sending SIGFPE via kill() returns wrong values in si_pid and si_uid

2018-04-12 Thread Dmitry V. Levin
On Thu, Apr 12, 2018 at 10:58:11AM +0100, Russell King - ARM Linux wrote: > On Thu, Apr 12, 2018 at 04:34:35AM +0300, Dmitry V. Levin wrote: > > A similar commit v4.16-rc1~159^2~37 > > ("signal/arm: Document conflicts with SI_USER and SIGFPE") must have > > introduced a similar ABI regression to co

Re: sparc/ppc/arm compat siginfo ABI regressions: sending SIGFPE via kill() returns wrong values in si_pid and si_uid

2018-04-12 Thread Russell King - ARM Linux
On Thu, Apr 12, 2018 at 04:34:35AM +0300, Dmitry V. Levin wrote: > A similar commit v4.16-rc1~159^2~37 > ("signal/arm: Document conflicts with SI_USER and SIGFPE") must have > introduced a similar ABI regression to compat arm. So, could you explain how can this change cause a regression? +#define

Re: [GIT PULL] asm-generic fixes for v4.17-rc1

2018-04-12 Thread Arnd Bergmann
On Thu, Apr 12, 2018 at 1:16 AM, Linus Torvalds wrote: > On Wed, Apr 11, 2018 at 8:40 AM, Arnd Bergmann wrote: >> >> are available in the git repository at: >> >> >> git+ssh://gitol...@ra.kernel.org/pub/scm/linux/kernel/git/arnd/asm-generic.git >> tags/asm-generic > > Yeah, no they aren't avai

[PATCH RFC 1/1] KVM: PPC: Book3S HV: pack VCORE IDs to access full VCPU ID space

2018-04-12 Thread Sam Bobroff
It is not currently possible to create the full number of possible VCPUs (KVM_MAX_VCPUS) on Power9 with KVM-HV when the guest uses less threads per core than it's core stride (or "VSMT mode"). This is because the VCORE ID and XIVE offsets to grow beyond KVM_MAX_VCPUS even though the VCPU ID is less