Re: [PATCH] cxl: Perform NULL check for 'cxl_afu *' at various places in cxl

2018-03-08 Thread Andrew Donnellan
On 09/03/18 13:59, Vaibhav Jain wrote: Thanks for looking into this patch Andrew, Andrew Donnellan writes: On 08/03/18 21:05, Vaibhav Jain wrote: It is possible for a CXL card to have a valid PSL but no valid AFUs. When this happens we have a valid instance of

Re: [bug?] Access was denied by memory protection keys in execute-only address

2018-03-08 Thread Ram Pai
On Fri, Mar 09, 2018 at 11:43:00AM +0800, Li Wang wrote: >On Fri, Mar 9, 2018 at 12:45 AM, Ram Pai <[1]linux...@us.ibm.com> wrote: > > On Thu, Mar 08, 2018 at 11:19:12PM +1100, Michael Ellerman wrote: > > Li Wang <[2]liw...@redhat.com> writes: > > > Hi, > > > > > >

Re: [PATCH v2 00/38] cxlflash: OCXL transport support

2018-03-08 Thread Andrew Donnellan
On 07/03/18 05:01, Martin K. Petersen wrote: This patch series adds OCXL support to the cxlflash driver. With this support, new devices using the OCXL transport will be supported by the cxlflash driver along with the existing CXL devices. An effort is made to keep this transport specific

Re: [PATCH v2 10/38] cxlflash: Setup AFU PASID

2018-03-08 Thread Andrew Donnellan
On 27/02/18 09:21, Uma Krishnan wrote: Per the OCXL specification, the maximum PASID supported by the AFU is indicated by a field within the configuration space. Similar to acTags, implementations can choose to use any sub-range of PASID within their assigned range. For cxlflash, the entire

Re: [PATCH v2 09/38] cxlflash: Setup AFU acTag range

2018-03-08 Thread Andrew Donnellan
On 27/02/18 09:21, Uma Krishnan wrote: The OCXL specification supports distributing acTags amongst different AFUs and functions on the link. As cxlflash devices are expected to only support a single AFU and function, the entire range that was assigned to the function is also assigned to the AFU.

Re: [PATCH v2 08/38] cxlflash: Read host AFU configuration

2018-03-08 Thread Andrew Donnellan
On 27/02/18 09:21, Uma Krishnan wrote: The host AFU configuration is read on the initialization path to identify the features and configuration of the AFU. This data is cached for use in later configuration steps. Signed-off-by: Uma Krishnan Acked-by: Matthew R.

Re: [bug?] Access was denied by memory protection keys in execute-only address

2018-03-08 Thread Li Wang
On Fri, Mar 9, 2018 at 12:45 AM, Ram Pai wrote: > On Thu, Mar 08, 2018 at 11:19:12PM +1100, Michael Ellerman wrote: > > Li Wang writes: > > > Hi, > > > > > > ltp/mprotect04[1] crashed by SEGV_PKUERR on ppc64(LPAR on P730, Power 8 > > > 8247-22L) with

Re: [PATCH v2 07/38] cxlflash: Setup function acTag range

2018-03-08 Thread Andrew Donnellan
On 27/02/18 09:20, Uma Krishnan wrote: The OCXL specification supports distributing acTags amongst different AFUs and functions on the link. The platform-specific acTag range for the link is obtained using the OCXL provider services and then assigned to the host function based on implementation.

Re: [PATCH] cxl: Perform NULL check for 'cxl_afu *' at various places in cxl

2018-03-08 Thread Vaibhav Jain
Thanks for looking into this patch Andrew, Andrew Donnellan writes: > On 08/03/18 21:05, Vaibhav Jain wrote: >> It is possible for a CXL card to have a valid PSL but no valid >> AFUs. When this happens we have a valid instance of 'struct cxl' >> representing the

Re: [PATCH] cxl: Perform NULL check for 'cxl_afu *' at various places in cxl

2018-03-08 Thread Andrew Donnellan
On 08/03/18 21:05, Vaibhav Jain wrote: It is possible for a CXL card to have a valid PSL but no valid AFUs. When this happens we have a valid instance of 'struct cxl' representing the adapter but with its member 'struct cxl_afu *cxl[]' as empty. Unfortunately at many placed within cxl code

Re: [PATCH 2/2] ppc64le save_stack_trace_tsk_reliable (Was: HAVE_RELIABLE_STACKTRACE)

2018-03-08 Thread Balbir Singh
On Tue, 27 Feb 2018 17:09:24 +0100 Torsten Duwe wrote: > On Tue, Dec 12, 2017 at 01:12:37PM +0100, Miroslav Benes wrote: > > > > I think that this is not enough. You need to also implement > > save_stack_trace_tsk_reliable() for powerpc defined as __weak in > >

Re: mm, x86, powerpc: pkey semantics for key-0 ?

2018-03-08 Thread Dave Hansen
On 03/08/2018 10:25 AM, Ram Pai wrote: > Is there a reason why the default key; key-0, is not allowed to be > explicitly associated with pages using pkey_mprotect()? No, it's a bug if it is not permitted. I have a vague recollection of knowing about this and having a patch.

mm, x86, powerpc: pkey semantics for key-0 ?

2018-03-08 Thread Ram Pai
Dave, Is there a reason why the default key; key-0, is not allowed to be explicitly associated with pages using pkey_mprotect()? I see valid usecases where an application may initially want to associate an address-range with some key and latter choose to revert to its initial state, by

Re: [bug?] Access was denied by memory protection keys in execute-only address

2018-03-08 Thread Ram Pai
On Thu, Mar 08, 2018 at 11:19:12PM +1100, Michael Ellerman wrote: > Li Wang writes: > > Hi, > > > > ltp/mprotect04[1] crashed by SEGV_PKUERR on ppc64(LPAR on P730, Power 8 > > 8247-22L) with kernel-v4.16.0-rc4. > > > > 1000-1002 r-xp fd:00 167223

Re: [PATCH v2] On ppc64le we HAVE_RELIABLE_STACKTRACE

2018-03-08 Thread Josh Poimboeuf
On Mon, Mar 05, 2018 at 05:49:28PM +0100, Torsten Duwe wrote: > The "Power Architecture 64-Bit ELF V2 ABI" says in section 2.3.2.3: > > [...] There are several rules that must be adhered to in order to ensure > reliable and consistent call chain backtracing: > > * Before a function calls any

RE: [PATCH 1/6] Docs: dt: add fsl-mc iommu-parent device-tree binding

2018-03-08 Thread Nipun Gupta
Hi Rob, > -Original Message- > From: Rob Herring [mailto:r...@kernel.org] > Sent: Thursday, March 08, 2018 4:10 > To: Nipun Gupta > Cc: will.dea...@arm.com; robin.mur...@arm.com; mark.rutl...@arm.com; > catalin.mari...@arm.com; devicet...@vger.kernel.org;

Re: [bug?] Access was denied by memory protection keys in execute-only address

2018-03-08 Thread Michael Ellerman
Li Wang writes: > Hi, > > ltp/mprotect04[1] crashed by SEGV_PKUERR on ppc64(LPAR on P730, Power 8 > 8247-22L) with kernel-v4.16.0-rc4. > > 1000-1002 r-xp fd:00 167223 mprotect04 > 1002-1003 r--p 0001 fd:00 167223 mprotect04 >

Re: [PATCH 21/21] powerpc: Add missing prototypes in setup_32.c

2018-03-08 Thread Michael Ellerman
Mathieu Malaterre writes: > This commit add the prototypes for the following function: > > - early_init > - machine_init I'd rather these were in asm-prototypes.h, it's the header for functions called from asm. I made that change. > - ppc_setup_l2cr > - ppc_setup_l3cr > -

Re: Linux 4.16: Reported regressions as of Monday, 2018-02-26 (Was: Linux 4.16-rc3)

2018-03-08 Thread Pavel Machek
Hi! > On Nokia N900:/dev/input/event6 aka AV Jack support disappeared > Status: quite new > Reported: 2018-02-24 > https://marc.info/?l=linux-omap=151950886524308=2 > Cause: 14e3e295b2b9 > Linux-Regression-ID: 4b650f This one is now solved in the mainline.

Re: [PATCH 17/21] powerpc: Add missing prototype for sys_debug_setcontext

2018-03-08 Thread Michael Ellerman
Mathieu Malaterre writes: > On Sun, Mar 4, 2018 at 11:54 AM, Michael Ellerman wrote: >> Mathieu Malaterre writes: >> >>> In commit 81e7009ea46c ("powerpc: merge ppc signal.c and ppc64 signal32.c") >>> the function sys_debug_setcontext

[PATCH] cxl: Perform NULL check for 'cxl_afu *' at various places in cxl

2018-03-08 Thread Vaibhav Jain
It is possible for a CXL card to have a valid PSL but no valid AFUs. When this happens we have a valid instance of 'struct cxl' representing the adapter but with its member 'struct cxl_afu *cxl[]' as empty. Unfortunately at many placed within cxl code (especially during an EEH) the elements of

Re: [PATCH] powerpc/powernv/mce: Don't silently restart the machine

2018-03-08 Thread Balbir Singh
On Thu, Mar 8, 2018 at 12:20 PM, Stewart Smith wrote: > Balbir Singh writes: >> On MCE the current code will restart the machine with >> ppc_md.restart(). This case was extremely unlikely since >> prior to that a skiboot call is made and that

Re: [PATCH v3] powerpc/npu-dma.c: Fix deadlock in mmio_invalidate

2018-03-08 Thread Alistair Popple
On Thursday, 8 March 2018 7:22:52 PM AEDT Michael Ellerman wrote: > Alistair Popple writes: > > > Michael, > > > > This won't apply cleanly on top of Balbir's MMIO ATSD Flushing patch > > (https://patchwork.ozlabs.org/patch/848343/). I will resend a v4 which > > applies >

Re: [PATCH v3] powerpc/npu-dma.c: Fix deadlock in mmio_invalidate

2018-03-08 Thread Michael Ellerman
Alistair Popple writes: > Michael, > > This won't apply cleanly on top of Balbir's MMIO ATSD Flushing patch > (https://patchwork.ozlabs.org/patch/848343/). I will resend a v4 which applies > cleanly on top of that as the rebase/merge is non-trivial. I have this (v3)