Re: [PATCH 5/6] powerpc/mm: Optimize detection of thread local mm's

2017-08-25 Thread Benjamin Herrenschmidt
On Fri, 2017-08-25 at 06:53 +0200, Frederic Barrat wrote: > > Le 24/08/2017 à 20:47, Benjamin Herrenschmidt a écrit : > > On Thu, 2017-08-24 at 18:40 +0200, Frederic Barrat wrote: > > > > > > The decrementing part is giving me troubles, and I think it makes sense: > > > if I decrement the counter

Re: [PATCH 5/6] powerpc/mm: Optimize detection of thread local mm's

2017-08-25 Thread Frederic Barrat
Le 25/08/2017 à 09:44, Benjamin Herrenschmidt a écrit : On Fri, 2017-08-25 at 06:53 +0200, Frederic Barrat wrote: Le 24/08/2017 à 20:47, Benjamin Herrenschmidt a écrit : On Thu, 2017-08-24 at 18:40 +0200, Frederic Barrat wrote: The decrementing part is giving me troubles, and I think it ma

Re: [PATCH v2 14/20] mm: Provide speculative fault infrastructure

2017-08-25 Thread Laurent Dufour
On 20/08/2017 14:11, Sergey Senozhatsky wrote: > On (08/18/17 00:05), Laurent Dufour wrote: > [..] >> +/* >> + * MPOL_INTERLEAVE implies additional check in mpol_misplaced() which >> + * are not compatible with the speculative page fault processing. >> + */ >> +pol = __get_vma_p

Re: [PATCH v2 18/20] perf tools: Add support for the SPF perf event

2017-08-25 Thread Laurent Dufour
On 21/08/2017 10:48, Anshuman Khandual wrote: > On 08/18/2017 03:35 AM, Laurent Dufour wrote: >> Add support for the new speculative faults event. >> >> Signed-off-by: Laurent Dufour >> --- >> tools/include/uapi/linux/perf_event.h | 1 + >> tools/perf/util/evsel.c | 1 + >> tools/pe

Re: [PATCH v7 05/12] powerpc/vas: Define helpers to init window context

2017-08-25 Thread Michael Ellerman
Sukadev Bhattiprolu writes: > diff --git a/arch/powerpc/platforms/powernv/vas-window.c > b/arch/powerpc/platforms/powernv/vas-window.c > index a3a705a..3a50d6a 100644 > --- a/arch/powerpc/platforms/powernv/vas-window.c > +++ b/arch/powerpc/platforms/powernv/vas-window.c > @@ -11,6 +11,7 @@ > #in

Re: [PATCH v7 06/12] powerpc/vas: Define helpers to alloc/free windows

2017-08-25 Thread Michael Ellerman
Sukadev Bhattiprolu writes: > diff --git a/arch/powerpc/platforms/powernv/vas-window.c > b/arch/powerpc/platforms/powernv/vas-window.c > index 3a50d6a..9c12919 100644 > --- a/arch/powerpc/platforms/powernv/vas-window.c > +++ b/arch/powerpc/platforms/powernv/vas-window.c > @@ -490,6 +490,76 @@ int

Re: [PATCH v7 07/12] powerpc/vas: Define vas_win_paste_addr()

2017-08-25 Thread Michael Ellerman
Sukadev Bhattiprolu writes: > Define an interface that the NX drivers can use to find the physical > paste address of a send window. This interface is expected to be used > with the mmap() operation of the NX driver's device. i.e the user space > process can use driver's mmap() operation to map t

Re: [PATCH v7 08/12] powerpc/vas: Define vas_win_id()

2017-08-25 Thread Michael Ellerman
Sukadev Bhattiprolu writes: > Define an interface to return a system-wide unique id for a given VAS > window. > > The vas_win_id() will be used in a follow-on patch to generate an unique > handle for a user space receive window. Applications can use this handle > to pair send and receive windows

Re: [PATCH v2 00/20] Speculative page faults

2017-08-25 Thread Laurent Dufour
On 21/08/2017 08:28, Anshuman Khandual wrote: > On 08/18/2017 03:34 AM, Laurent Dufour wrote: >> This is a port on kernel 4.13 of the work done by Peter Zijlstra to >> handle page fault without holding the mm semaphore [1]. >> >> The idea is to try to handle user space page faults without holding t

Re: [PATCH v7 01/12] powerpc/vas: Define macros, register fields and structures

2017-08-25 Thread Michael Ellerman
Sukadev Bhattiprolu writes: > diff --git a/arch/powerpc/platforms/powernv/vas.h > b/arch/powerpc/platforms/powernv/vas.h > new file mode 100644 > index 000..c66aaf0 > --- /dev/null > +++ b/arch/powerpc/platforms/powernv/vas.h > @@ -0,0 +1,385 @@ ... > + > +/* > + * In-kernel state a VAS wind

Re: [PATCH v7 10/12] powerpc/vas: Define vas_win_close() interface

2017-08-25 Thread Michael Ellerman
Hi Suka, More comments :) Sukadev Bhattiprolu writes: > diff --git a/arch/powerpc/platforms/powernv/vas-window.c > b/arch/powerpc/platforms/powernv/vas-window.c > index 2dd4b63..24288dd 100644 > --- a/arch/powerpc/platforms/powernv/vas-window.c > +++ b/arch/powerpc/platforms/powernv/vas-window

[PATCH] powerpc/44x: mask and shift to zero bug

2017-08-25 Thread Dan Carpenter
My static checker complains that 0x1800 >> 13 is zero. Looking at the context, it seems like a copy and paste bug from the line below and probably 0x3 << 13 or 0x6000 was intended. Fixes: 2af59f7d5c3e ("[POWERPC] 4xx: Add 405GPr and 405EP support in boot wrapper") Signed-off-by: Dan Carp

Re: [PATCH v7 12/12] powerpc/vas: Define copy/paste interfaces

2017-08-25 Thread Michael Ellerman
Hi Suka, A few more things ... Sukadev Bhattiprolu writes: > diff --git a/arch/powerpc/platforms/powernv/copy-paste.h > b/arch/powerpc/platforms/powernv/copy-paste.h > new file mode 100644 > index 000..7783bb8 > --- /dev/null > +++ b/arch/powerpc/platforms/powernv/copy-paste.h > @@ -0,0 +1

[GIT PULL] Please pull powerpc/linux.git powerpc-4.13-8 tag

2017-08-25 Thread Michael Ellerman
Hi Linus, Please pull one more powerpc fix for 4.13: The following changes since commit 5a69aec945d27e78abac9fd032533d3aaebf7c1e: powerpc: Fix VSX enabling/flushing to also test MSR_FP and MSR_VEC (2017-08-16 19:35:54 +1000) are available in the git repository at: git://git.kernel.org/pub

[bug report] powerpc/mm/cxl: Add the fault handling cpu to mm cpumask

2017-08-25 Thread Dan Carpenter
Hello Aneesh Kumar K.V, This is a semi-automatic email about new static checker warnings. The patch 0f4bc0932e51: "powerpc/mm/cxl: Add the fault handling cpu to mm cpumask" from Jul 27, 2017, leads to the following Smatch complaint: drivers/misc/cxl/fault.c:161 cxl_handle_mm_fault() warn

Re: [RFC Part1 PATCH v3 14/17] x86/boot: Add early boot support when running with SEV active

2017-08-25 Thread Borislav Petkov
Btw, I don't see our SEV-specific chicken bit which disables SEV only. Do we need it? If so, maybe something like mem_encrypt=sme_only or so. Or is the mem_encrypt=off chicken bit enough? What about the use case where you want SME but no encrypted guests? A bunch of hmmm. -- Regards/Gruss,

Re: [PATCH 2/2] of: Restrict DMA configuration

2017-08-25 Thread Christoph Hellwig
On Tue, Aug 15, 2017 at 09:19:50AM -0500, Rob Herring wrote: > > For the immediate issue at hand, I guess the alternative plan of attack > > would be to stick a flag in struct bus_type for the bus drivers > > themselves to opt into generic DMA configuration. That at least keeps > > everything withi

Re: [PATCH v2 1/1] futex: remove duplicated code and fix UB

2017-08-25 Thread Thomas Gleixner
On Thu, 24 Aug 2017, Will Deacon wrote: > On Thu, Aug 24, 2017 at 09:31:05AM +0200, Jiri Slaby wrote: > > +static int futex_atomic_op_inuser(unsigned int encoded_op, u32 __user > > *uaddr) > > +{ > > + unsigned int op = (encoded_op & 0x7000) >> 28; > > + unsigned int cmp =(

[PATCH 0/3] cxlflash: Miscellaneous fixes

2017-08-25 Thread Uma Krishnan
This patch series contains miscellaneous fixes. The first two address issues that were identified by smatch and the last patch fixes a regression introduced by Commit 565180723294 ("scsi: cxlflash: SISlite updates to support 4 ports"). This series is intended for 4.14 and is bisectable. Matthew R

[PATCH 1/3] cxlflash: Remove unnecessary existence check

2017-08-25 Thread Uma Krishnan
From: "Matthew R. Ochs" The AFU termination sequence has been refactored over time such that the main tear down routine, term_afu(), can no longer can be invoked with a NULL AFU pointer. Remove the unnecessary existence check from term_afu(). Signed-off-by: Matthew R. Ochs Signed-off-by: Uma Kr

[PATCH 2/3] cxlflash: Avoid double mutex unlock

2017-08-25 Thread Uma Krishnan
From: "Matthew R. Ochs" The AFU recovery routine uses an interruptible mutex to control the flow of in-flight recoveries. Upon receiving an interruptible signal the code branches to a common exit path which wrongly assumes the mutex is held. Add a local variable to track when the mutex should be

[PATCH 3/3] cxlflash: Fix vlun resize failure in the shrink path

2017-08-25 Thread Uma Krishnan
The ioctl DK_CAPI_VLUN_RESIZE can fail if the allocated vlun size is reduced from almost maximum capacity and then increased again. The shrink_lxt() routine is currently using the SISL_ASTATUS_MASK to mask the higher 48 bits of the lxt entry. This is unnecessary and incorrect as it uses a mask des

Re: [PATCH 0/3] cxlflash: Miscellaneous fixes

2017-08-25 Thread Martin K. Petersen
Uma, > This patch series contains miscellaneous fixes. The first two address > issues that were identified by smatch and the last patch fixes a > regression introduced by Commit 565180723294 ("scsi: cxlflash: SISlite > updates to support 4 ports"). Applied to 4.14/scsi-queue. Thanks! -- Martin