Re: [PATCH 00/31] powerpc/mm: Update page table format for book3s 64

2015-09-21 Thread Scott Wood
On Tue, 2015-09-22 at 12:18 +0530, Aneesh Kumar K.V wrote: > Scott Wood writes: > > > On Mon, 2015-09-21 at 12:10 +0530, Aneesh Kumar K.V wrote: > > > Hi All, > > > > > > This patch series attempt to update book3s 64 linux page table format to > > > make it more flexible. Our current pte format

Re: [PATCH 00/31] powerpc/mm: Update page table format for book3s 64

2015-09-21 Thread Aneesh Kumar K.V
Scott Wood writes: > On Mon, 2015-09-21 at 12:10 +0530, Aneesh Kumar K.V wrote: >> Hi All, >> >> This patch series attempt to update book3s 64 linux page table format to >> make it more flexible. Our current pte format is very restrictive and we >> overload multiple pte bits. This is due to the

Re: [PATCH 10/31] powerpc/mm: Don't use pmd_val, pud_val and pgd_val as lvalue

2015-09-21 Thread Aneesh Kumar K.V
Scott Wood writes: > On Mon, Sep 21, 2015 at 12:10:37PM +0530, Aneesh Kumar K.V wrote: >> /* PUD level exusts only on 4k pages */ >> #ifndef CONFIG_PPC_64K_PAGES >> typedef struct { unsigned long pud; } pud_t; >> -#define pud_val(x) ((x).pud) >> #define __pud(x)((pud_t) { (x) }) >> +stat

Re: [PATCH 09/31] powerpc/mm: Don't use pte_val as lvalue

2015-09-21 Thread Scott Wood
On Tue, 2015-09-22 at 12:14 +0530, Aneesh Kumar K.V wrote: > Scott Wood writes: > > > On Mon, Sep 21, 2015 at 12:10:36PM +0530, Aneesh Kumar K.V wrote: > > > +static inline pte_t pte_mkwrite(pte_t pte) > > > +{ > > > + pte_basic_t ptev; > > > + > > > + ptev = pte_val(pte) & ~_PAGE_RO; > > > + pte

Re: [PATCH 09/31] powerpc/mm: Don't use pte_val as lvalue

2015-09-21 Thread Aneesh Kumar K.V
Scott Wood writes: > On Mon, Sep 21, 2015 at 12:10:36PM +0530, Aneesh Kumar K.V wrote: >> +static inline pte_t pte_mkwrite(pte_t pte) >> +{ >> +pte_basic_t ptev; >> + >> +ptev = pte_val(pte) & ~_PAGE_RO; >> +ptev |= _PAGE_RW; >> +return __pte(pte); >> +} > > s/__pte(pte)/__pte(pte

Re: [PATCH 03/31] powerpc/mm: make a separate copy for book3s

2015-09-21 Thread Aneesh Kumar K.V
Scott Wood writes: > On Mon, 2015-09-21 at 12:10 +0530, Aneesh Kumar K.V wrote: >> In this patch we do: >> cp pgtable-ppc32.h book3s/32/pgtable.h >> cp pgtable-ppc64.h book3s/64/pgtable.h >> >> This enable us to do further changes to hash specific config. >> We will change the page table format

Re: [PATCH V2 2/2] powerpc:numa Do not allocate bootmem memory for non existing nodes

2015-09-21 Thread Michael Ellerman
On Tue, 2015-09-15 at 07:38 +0530, Raghavendra K T wrote: > > ... nothing Sure this patch looks obvious, but please give me a changelog that proves you've thought about it thoroughly. For example is it OK to use for_each_node() at this point in boot? Is there any historical reason why we did it w

Re: [PATCH] powerpc: fsl_pci: cast the regs->nip to void * when passing it to probe_kernel_address()

2015-09-21 Thread Michael Ellerman
On Mon, 2015-09-21 at 21:16 -0500, Scott Wood wrote: > On Mon, 2015-09-21 at 17:22 +0800, Kevin Hao wrote: > > With the reimplementation of probe_kernel_address() in commit > > ecc83243e1d4 ("uaccess: reimplement probe_kernel_address() using > > probe_kernel_read()"), the explication of the cast fo

Re: [PATCH] powerpc/eeh: Avoid to handle EEH on a passed Child PE

2015-09-21 Thread Wei Yang
On Mon, Sep 21, 2015 at 09:49:45PM +1000, Gavin Shan wrote: >On Mon, Sep 21, 2015 at 05:29:48PM +0800, Wei Yang wrote: >>Current EEH infrastructure would avoid to handle EEH when a PE is passed to >>guest, while if this PE is a Child PE of the one hit EEH, host would handle >>this. By doing so, thi

RE: [PATCH v10 4/5] QE/CPM: move muram management functions to qe_common

2015-09-21 Thread Zhao Qiang
> -Original Message- > From: Wood Scott-B07421 > Sent: Tuesday, September 22, 2015 11:25 AM > To: Zhao Qiang-B45475 > Cc: linux-ker...@vger.kernel.org; linuxppc-dev@lists.ozlabs.org; > lau...@codeaurora.org; Xie Xiaobo-R63061; b...@kernel.crashing.org; Li > Yang-Leo-R58472; pau...@samba.or

Re: [PATCH v10 4/5] QE/CPM: move muram management functions to qe_common

2015-09-21 Thread Scott Wood
On Mon, 2015-09-21 at 22:22 -0500, Zhao Qiang-B45475 wrote: > On Tue, Sep 22, 2015 at 11:08AM +0800, Wood Scott-B07421 wrote: > > > -Original Message- > > From: Wood Scott-B07421 > > Sent: Tuesday, September 22, 2015 11:08 AM > > To: Zhao Qiang-B45475 > > Cc: linux-ker...@vger.kernel.org;

Re: [PATCH v10 4/5] QE/CPM: move muram management functions to qe_common

2015-09-21 Thread Scott Wood
On Mon, 2015-09-21 at 22:06 -0500, Zhao Qiang-B45475 wrote: > On Tue, Sep 22, 2015 at 10:26AM +0800, Wood Scott-B07421 wrote: > > > -Original Message- > > From: Wood Scott-B07421 > > Sent: Tuesday, September 22, 2015 10:26 AM > > To: Zhao Qiang-B45475 > > Cc: linux-ker...@vger.kernel.org;

RE: [PATCH v10 4/5] QE/CPM: move muram management functions to qe_common

2015-09-21 Thread Zhao Qiang
On Tue, Sep 22, 2015 at 11:08AM +0800, Wood Scott-B07421 wrote: > -Original Message- > From: Wood Scott-B07421 > Sent: Tuesday, September 22, 2015 11:08 AM > To: Zhao Qiang-B45475 > Cc: linux-ker...@vger.kernel.org; linuxppc-dev@lists.ozlabs.org; > lau...@codeaurora.org; Xie Xiaobo-R63061;

[PATCH] scripts/tags.sh: Teach tags about some powerpc macros

2015-09-21 Thread Michael Ellerman
The IO accessors on powerpc are generated using macro fu, ie. out_be32() etc. Also there are some debugger related symbols that are macro generated. Teach scripts/tags.sh about both. Signed-off-by: Michael Ellerman --- scripts/tags.sh | 2 ++ 1 file changed, 2 insertions(+) diff --git a/scripts

RE: [PATCH v10 4/5] QE/CPM: move muram management functions to qe_common

2015-09-21 Thread Zhao Qiang
On Tue, Sep 22, 2015 at 10:26AM +0800, Wood Scott-B07421 wrote: > -Original Message- > From: Wood Scott-B07421 > Sent: Tuesday, September 22, 2015 10:26 AM > To: Zhao Qiang-B45475 > Cc: linux-ker...@vger.kernel.org; linuxppc-dev@lists.ozlabs.org; > lau...@codeaurora.org; Xie Xiaobo-R63061;

Re: [PATCH v10 4/5] QE/CPM: move muram management functions to qe_common

2015-09-21 Thread Scott Wood
On Mon, 2015-09-21 at 21:23 -0500, Zhao Qiang-B45475 wrote: > On Tue, Sep 22, 2015 at 06:54AM +0800, Wood Scott-B07421 wrote: > > -Original Message- > > From: Wood Scott-B07421 > > Sent: Tuesday, September 22, 2015 6:54 AM > > To: Zhao Qiang-B45475 > > Cc: linux-ker...@vger.kernel.org; linu

Re: [PATCH] powerpc: fsl_pci: cast the regs->nip to void * when passing it to probe_kernel_address()

2015-09-21 Thread Kevin Hao
On Mon, Sep 21, 2015 at 09:16:59PM -0500, Scott Wood wrote: > On Mon, 2015-09-21 at 17:22 +0800, Kevin Hao wrote: > > With the reimplementation of probe_kernel_address() in commit > > ecc83243e1d4 ("uaccess: reimplement probe_kernel_address() using > > probe_kernel_read()"), the explication of the

Re: [PATCH 10/31] powerpc/mm: Don't use pmd_val, pud_val and pgd_val as lvalue

2015-09-21 Thread Scott Wood
On Mon, Sep 21, 2015 at 12:10:37PM +0530, Aneesh Kumar K.V wrote: > /* PUD level exusts only on 4k pages */ > #ifndef CONFIG_PPC_64K_PAGES > typedef struct { unsigned long pud; } pud_t; > -#define pud_val(x) ((x).pud) > #define __pud(x) ((pud_t) { (x) }) > +static inline unsigned long pud

RE: [PATCH v10 4/5] QE/CPM: move muram management functions to qe_common

2015-09-21 Thread Zhao Qiang
On Tue, Sep 22, 2015 at 06:54AM +0800, Wood Scott-B07421 wrote: > -Original Message- > From: Wood Scott-B07421 > Sent: Tuesday, September 22, 2015 6:54 AM > To: Zhao Qiang-B45475 > Cc: linux-ker...@vger.kernel.org; linuxppc-dev@lists.ozlabs.org; > lau...@codeaurora.org; Xie Xiaobo-R63061; b

Re: [PATCH 09/31] powerpc/mm: Don't use pte_val as lvalue

2015-09-21 Thread Scott Wood
On Mon, Sep 21, 2015 at 12:10:36PM +0530, Aneesh Kumar K.V wrote: > +static inline pte_t pte_mkwrite(pte_t pte) > +{ > + pte_basic_t ptev; > + > + ptev = pte_val(pte) & ~_PAGE_RO; > + ptev |= _PAGE_RW; > + return __pte(pte); > +} s/__pte(pte)/__pte(ptev)/ ...to fix an endless hand

Re: [PATCH] powerpc: fsl_pci: cast the regs->nip to void * when passing it to probe_kernel_address()

2015-09-21 Thread Scott Wood
On Mon, 2015-09-21 at 17:22 +0800, Kevin Hao wrote: > With the reimplementation of probe_kernel_address() in commit > ecc83243e1d4 ("uaccess: reimplement probe_kernel_address() using > probe_kernel_read()"), the explication of the cast for the addr > parameter has been dropped. So we have to explic

Re: [PATCH] powerpc: fsl_pci: cast the regs->nip to void * when passing it to probe_kernel_address()

2015-09-21 Thread Kevin Hao
On Tue, Sep 22, 2015 at 12:08:17PM +1000, Michael Ellerman wrote: > On Mon, 2015-09-21 at 17:22 +0800, Kevin Hao wrote: > > With the reimplementation of probe_kernel_address() in commit > > ecc83243e1d4 ("uaccess: reimplement probe_kernel_address() using > > probe_kernel_read()"), the explication o

Re: [PATCH] powerpc: fsl_pci: cast the regs->nip to void * when passing it to probe_kernel_address()

2015-09-21 Thread Michael Ellerman
On Mon, 2015-09-21 at 17:22 +0800, Kevin Hao wrote: > With the reimplementation of probe_kernel_address() in commit > ecc83243e1d4 ("uaccess: reimplement probe_kernel_address() using > probe_kernel_read()"), the explication of the cast for the addr > parameter has been dropped. So we have to explic

Re: [RFC v2 3/7] powerpc: atomic: Implement atomic{,64}_{add,sub}_return_* variants

2015-09-21 Thread Boqun Feng
On Tue, Sep 22, 2015 at 07:26:56AM +0800, Boqun Feng wrote: > On Mon, Sep 21, 2015 at 11:24:27PM +0100, Will Deacon wrote: > > Hi Boqun, > > > > On Sun, Sep 20, 2015 at 09:23:03AM +0100, Boqun Feng wrote: > > > On Sat, Sep 19, 2015 at 11:33:10PM +0800, Boqun Feng wrote: > > > > On Fri, Sep 18, 201

Re: [RFC v2 3/7] powerpc: atomic: Implement atomic{,64}_{add,sub}_return_* variants

2015-09-21 Thread Boqun Feng
On Mon, Sep 21, 2015 at 11:24:27PM +0100, Will Deacon wrote: > Hi Boqun, > > On Sun, Sep 20, 2015 at 09:23:03AM +0100, Boqun Feng wrote: > > On Sat, Sep 19, 2015 at 11:33:10PM +0800, Boqun Feng wrote: > > > On Fri, Sep 18, 2015 at 05:59:02PM +0100, Will Deacon wrote: > > > > On Wed, Sep 16, 2015 a

Re: [PATCH v2 14/30] cxlflash: Fix to avoid stall while waiting on TMF

2015-09-21 Thread Matthew R. Ochs
> On Sep 21, 2015, at 1:24 PM, Brian King wrote: > On 09/16/2015 04:30 PM, Matthew R. Ochs wrote: >> Borrowing the TMF waitq's spinlock causes a stall condition when >> waiting for the TMF to complete. To remedy, introduce our own spin >> lock to serialize TMF and use the appropriate wait services

Re: [PATCH v2 29/30] cxlflash: Fix to avoid state change collision

2015-09-21 Thread Matthew R. Ochs
> On Sep 21, 2015, at 7:44 AM, Tomas Henzl wrote: > On 16.9.2015 23:32, Matthew R. Ochs wrote: >> The adapter state machine is susceptible to missing and/or >> corrupting state updates at runtime. This can lead to a variety >> of unintended issues and is due to the lack of a serialization >> mecha

Re: [PATCH v10 5/5] QE: Move QE from arch/powerpc to drivers/soc

2015-09-21 Thread Scott Wood
On Fri, Sep 18, 2015 at 03:15:21PM +0800, Zhao Qiang wrote: > diff --git a/drivers/soc/fsl/qe/Kconfig b/drivers/soc/fsl/qe/Kconfig > new file mode 100644 > index 000..3012571 > --- /dev/null > +++ b/drivers/soc/fsl/qe/Kconfig > @@ -0,0 +1,33 @@ > +# > +# QE Communication options > +# > + > +con

Re: [PATCH v10 4/5] QE/CPM: move muram management functions to qe_common

2015-09-21 Thread Scott Wood
On Fri, Sep 18, 2015 at 03:15:20PM +0800, Zhao Qiang wrote: > QE and CPM have the same muram, they use the same management > functions. Now QE support both ARM and PowerPC, it is necessary > to move QE to "driver/soc", so move the muram management functions > from cpm_common to qe_common for prepar

Re: [PATCH v10 3/5] CPM/QE: use genalloc to manage CPM/QE muram

2015-09-21 Thread Scott Wood
On Fri, Sep 18, 2015 at 03:15:19PM +0800, Zhao Qiang wrote: > Use genalloc to manage CPM/QE muram instead of rheap. > > Signed-off-by: Zhao Qiang > --- > Changes for v9: > - splitted from patch 3/5, modify cpm muram management functions. > Changes for v10: > - modify cpm muram first,

Re: [PATCH v2 21/30] cxlflash: Fix to prevent workq from accessing freed memory

2015-09-21 Thread Matthew R. Ochs
> On Sep 21, 2015, at 7:25 AM, Tomas Henzl wrote: > On 16.9.2015 23:31, Matthew R. Ochs wrote: >> The workq can process work in parallel with a remove event, leading >> to a condition where the workq handler can access freed memory. >> >> To remedy, the workq should be terminated prior to freeing

Re: [PATCH v2 11/30] cxlflash: Make functions static

2015-09-21 Thread Matthew R. Ochs
> On Sep 21, 2015, at 7:18 AM, Tomas Henzl wrote: > On 16.9.2015 23:28, Matthew R. Ochs wrote: >> >> + >> +write_rrin: >> +nretry = 0; >> +writeq_be(rrin, &afu->host_map->ioarrin); >> +do { >> +rrin = readq_be(&afu->host_map->ioarrin); >> +if (rrin != 0x1) >> +

Re: [PATCH v2 04/30] cxlflash: Fix potential oops following LUN removal

2015-09-21 Thread Matthew R. Ochs
> On Sep 21, 2015, at 7:11 AM, Tomas Henzl wrote: > On 16.9.2015 23:27, Matthew R. Ochs wrote: >> When a LUN is removed, the sdev that is associated with the LUN >> remains intact until its reference count drops to 0. In order >> to prevent an sdev from being removed while a context is still >> as

Re: [RFC v2 3/7] powerpc: atomic: Implement atomic{,64}_{add,sub}_return_* variants

2015-09-21 Thread Will Deacon
Hi Boqun, On Sun, Sep 20, 2015 at 09:23:03AM +0100, Boqun Feng wrote: > On Sat, Sep 19, 2015 at 11:33:10PM +0800, Boqun Feng wrote: > > On Fri, Sep 18, 2015 at 05:59:02PM +0100, Will Deacon wrote: > > > On Wed, Sep 16, 2015 at 04:49:31PM +0100, Boqun Feng wrote: > > > > On powerpc, we don't need a

Re: [PATCH v2 03/30] cxlflash: Fix read capacity timeout

2015-09-21 Thread Matthew R. Ochs
> On Sep 21, 2015, at 6:36 AM, Tomas Henzl wrote: > On 16.9.2015 23:26, Matthew R. Ochs wrote: >> From: Manoj Kumar >> >> The timeout value for read capacity is too small. Certain devices >> may take longer to respond and thus the command may prematurely >> timeout. Additionally the literal used

Re: [PATCH 1/7] phy: fix of_mdio_find_bus() device refcount leak

2015-09-21 Thread David Miller
From: Russell King - ARM Linux Date: Mon, 21 Sep 2015 20:32:07 +0100 > In the case of the mdio mux code, I'm dropping the reference when > either (a) we've encountered an error during initialisation and > we're cleaning up, or (b) when the mdio mux code is being torn down > after the mdiomux bus

Re: [PATCH v2 18/30] cxlflash: Remove dual port online dependency

2015-09-21 Thread Brian King
On 09/16/2015 04:30 PM, Matthew R. Ochs wrote: > At present, both ports must be online for the device to > configure properly. Remove this dependency and the unnecessary > internal LUN override logic as well. Additionally, as a refactoring > measure, change the return code variable name to match th

Re: [PATCH 03/31] powerpc/mm: make a separate copy for book3s

2015-09-21 Thread Scott Wood
On Mon, 2015-09-21 at 12:10 +0530, Aneesh Kumar K.V wrote: > In this patch we do: > cp pgtable-ppc32.h book3s/32/pgtable.h > cp pgtable-ppc64.h book3s/64/pgtable.h > > This enable us to do further changes to hash specific config. > We will change the page table format for 64bit hash in later patch

Re: [PATCH v2 09/30] cxlflash: Fix to stop interrupt processing on remove

2015-09-21 Thread Matthew R. Ochs
> On Sep 21, 2015, at 6:33 AM, Tomas Henzl wrote: > On 19.9.2015 01:26, Matthew R. Ochs wrote: >>> On Sep 18, 2015, at 6:59 AM, Tomas Henzl wrote: >>> On 17.9.2015 19:16, Matthew R. Ochs wrote: > On Sep 17, 2015, at 7:38 AM, Tomas Henzl wrote: > > On 16.9.2015 18:53, Matthew R. Ochs

Re: [PATCH 00/31] powerpc/mm: Update page table format for book3s 64

2015-09-21 Thread Scott Wood
On Mon, 2015-09-21 at 12:10 +0530, Aneesh Kumar K.V wrote: > Hi All, > > This patch series attempt to update book3s 64 linux page table format to > make it more flexible. Our current pte format is very restrictive and we > overload multiple pte bits. This is due to the non-availability of free bit

Re: [PATCH v2 17/30] cxlflash: Fix async interrupt bypass logic

2015-09-21 Thread Brian King
Reviewed-by: Brian King -- Brian King Power Linux I/O IBM Linux Technology Center ___ Linuxppc-dev mailing list Linuxppc-dev@lists.ozlabs.org https://lists.ozlabs.org/listinfo/linuxppc-dev

Re: [PATCH v2 16/30] cxlflash: Fix host link up event handling

2015-09-21 Thread Brian King
Reviewed-by: Brian King -- Brian King Power Linux I/O IBM Linux Technology Center ___ Linuxppc-dev mailing list Linuxppc-dev@lists.ozlabs.org https://lists.ozlabs.org/listinfo/linuxppc-dev

Re: [Skiboot] Skiboot recovery of MCEs during MMIO read of SCOMs: 55672ecfa21f

2015-09-21 Thread Benjamin Herrenschmidt
On Mon, 2015-09-21 at 15:01 -0500, Patrick Williams wrote: > On Mon, Sep 21, 2015 at 01:02:48PM +1000, Daniel Axtens wrote: > > Hi, > > > > This relates to 55672ecfa21f ("powerpc/book3s: Recover from MC in > > sapphire on SCOM read via MMIO."). > > > > According to that patch, some SCOM reads via

Re: [Skiboot] Skiboot recovery of MCEs during MMIO read of SCOMs: 55672ecfa21f

2015-09-21 Thread Patrick Williams
On Mon, Sep 21, 2015 at 01:02:48PM +1000, Daniel Axtens wrote: > Hi, > > This relates to 55672ecfa21f ("powerpc/book3s: Recover from MC in > sapphire on SCOM read via MMIO."). > > According to that patch, some SCOM reads via MMIO could lead to a > Machine Check Error in skiboot. That patch provid

[PATCH 4/4] sound/core/seq: make prioq_match return bool

2015-09-21 Thread Yaowei Bai
This patch makes prioq_match return bool due to this particular function only using either one or zero as its return value. No functional change. Signed-off-by: Yaowei Bai --- sound/core/seq/seq_prioq.c | 12 ++-- 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/sound/core/

[PATCH 3/4] sound/fabrics/layout: make aoa_fabric_layout_init return directly

2015-09-21 Thread Yaowei Bai
Catching the return value of soundbus_register_driver in aoa_fabric_layout_init is not necessary, let's return it directly. No functional change. Signed-off-by: Yaowei Bai --- sound/aoa/fabrics/layout.c | 7 +-- 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/sound/aoa/fabrics/

[PATCH 2/4] sound/i2sbus/core: make format more appropriate

2015-09-21 Thread Yaowei Bai
Make 'return' stay in a singe line. No functional change. Signed-off-by: Yaowei Bai --- sound/aoa/soundbus/i2sbus/core.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/sound/aoa/soundbus/i2sbus/core.c b/sound/aoa/soundbus/i2sbus/core.c index 1cbf210..6f216c0 100644 --- a/

[PATCH 1/4] sound/onyx: remove redundant case entry

2015-09-21 Thread Yaowei Bai
Case ti->tag == 0 can be included in the last return, remove it. No functional change. Signed-off-by: Yaowei Bai --- sound/aoa/codecs/onyx.c | 1 - 1 file changed, 1 deletion(-) diff --git a/sound/aoa/codecs/onyx.c b/sound/aoa/codecs/onyx.c index a04edff..a407e1f 100644 --- a/sound/aoa/codecs/

Re: [BUG] Revert 0b05e2d671c4 'powerpc/32: cacheable_memcpy becomes memcpy'

2015-09-21 Thread Scott Wood
On Mon, 2015-09-21 at 17:10 +1000, Michael Ellerman wrote: > On Fri, 2015-09-18 at 16:45 +0200, Thomas Gleixner wrote: > > On Fri, 18 Sep 2015, Segher Boessenkool wrote: > > > > > On Fri, Sep 18, 2015 at 08:01:57PM +1000, Michael Ellerman wrote: > > > > Weird. > > > > > > > > Can you try: > > > >

Re: [PATCH 2/4] powerpc/device-tree: bindings for DSP cores/clusters for Freescale SOCs

2015-09-21 Thread Scott Wood
On Mon, 2015-09-21 at 03:36 -0500, Aggrwal Poonam-B10812 wrote: > > > -Original Message- > > From: Wood Scott-B07421 > > Sent: Sunday, September 20, 2015 5:45 AM > > To: Aggrwal Poonam-B10812 > > Cc: linuxppc-dev@lists.ozlabs.org; linux-ker...@vger.kernel.org; > > devicetree- > > disc...

Re: [PATCH 1/7] phy: fix of_mdio_find_bus() device refcount leak

2015-09-21 Thread Russell King - ARM Linux
On Mon, Sep 21, 2015 at 12:01:59PM -0700, David Miller wrote: > From: Russell King > Date: Fri, 18 Sep 2015 10:54:55 +0100 > > > Update the comment, and arrange for the only user of this function > > to drop this refcount when disposing of a reference to it. > > mdio_mux is not the only user of

Re: [PATCH 1/7] phy: fix of_mdio_find_bus() device refcount leak

2015-09-21 Thread David Miller
From: Russell King Date: Fri, 18 Sep 2015 10:54:55 +0100 > Update the comment, and arrange for the only user of this function > to drop this refcount when disposing of a reference to it. mdio_mux is not the only user of of_mdio_find_bus(), DSA uses it as well. So if anything this commit message

Re: [PATCH v16 00/16] perf, tools: Add support for PMU events in JSON format

2015-09-21 Thread Jiri Olsa
On Thu, Sep 10, 2015 at 11:06:55AM -0700, Sukadev Bhattiprolu wrote: > Sukadev Bhattiprolu [suka...@linux.vnet.ibm.com] wrote: > | Arnaldo, Ingo, > | > | I added Andi's patch https://lkml.org/lkml/2015/8/28/521 to 'json-v16' > branch. > | and created a new branch, 'json-files-7' with updated to I

Re: [PATCH v2 15/30] cxlflash: Fix location of setting resid

2015-09-21 Thread Brian King
On 09/16/2015 04:30 PM, Matthew R. Ochs wrote: > @@ -158,8 +160,7 @@ static void process_cmd_err(struct afu_cmd *cmd, struct > scsi_cmnd *scp) > /* If the SISL_RC_FLAGS_OVERRUN flag was set, >* then we will handle this error else where.

Re: [PATCH v2 14/30] cxlflash: Fix to avoid stall while waiting on TMF

2015-09-21 Thread Brian King
On 09/16/2015 04:30 PM, Matthew R. Ochs wrote: > Borrowing the TMF waitq's spinlock causes a stall condition when > waiting for the TMF to complete. To remedy, introduce our own spin > lock to serialize TMF and use the appropriate wait services. Can you clarify what stall condition you were seeing

Re: [PATCH 0/2] VFIO: Accept IOMMU group (PE) ID

2015-09-21 Thread Alex Williamson
On Mon, 2015-09-21 at 22:11 +1000, Gavin Shan wrote: > On Mon, Sep 21, 2015 at 11:42:28AM +1000, David Gibson wrote: > >On Sat, Sep 19, 2015 at 04:22:47PM +1000, David Gibson wrote: > >> On Fri, Sep 18, 2015 at 09:47:32AM -0600, Alex Williamson wrote: > >> > On Fri, 2015-09-18 at 16:24 +1000, Gavin

[PATCH 04/17] powerpc: mpic: use IRQCHIP_SKIP_SET_WAKE instead of redundant mpic_irq_set_wake

2015-09-21 Thread Sudeep Holla
mpic_irq_set_wake return -ENXIO for non FSL MPIC and sets IRQF_NO_SUSPEND flag for FSL ones. enable_irq_wake already returns -ENXIO if irq_set_wak is not implemented. Also there's no need to set the IRQF_NO_SUSPEND flag as it doesn't guarantee wakeup for that interrupt. This patch removes the redu

Re: [PATCH 4/4] sound/core/seq: make prioq_match return bool

2015-09-21 Thread Johannes Berg
> -static inline int prioq_match(struct snd_seq_event_cell *cell, > +static inline bool prioq_match(struct snd_seq_event_cell *cell, > int client, int timestamp) I think you should fix up the indentation now. johannes ___ Li

Re: [PATCH v2 29/30] cxlflash: Fix to avoid state change collision

2015-09-21 Thread Tomas Henzl
On 16.9.2015 23:32, Matthew R. Ochs wrote: > The adapter state machine is susceptible to missing and/or > corrupting state updates at runtime. This can lead to a variety > of unintended issues and is due to the lack of a serialization > mechanism to protect the adapter state. > > Use an adapter-wid

Re: [PATCH v2 21/30] cxlflash: Fix to prevent workq from accessing freed memory

2015-09-21 Thread Tomas Henzl
On 16.9.2015 23:31, Matthew R. Ochs wrote: > The workq can process work in parallel with a remove event, leading > to a condition where the workq handler can access freed memory. > > To remedy, the workq should be terminated prior to freeing memory. Move > the termination call earlier in remove and

Re: [PATCH v2 11/30] cxlflash: Make functions static

2015-09-21 Thread Tomas Henzl
On 16.9.2015 23:28, Matthew R. Ochs wrote: > Found during code inspection, that the following functions are not > being used outside of the file where they are defined. Make them static. > > int cxlflash_send_cmd(struct afu *, struct afu_cmd *); > void cxlflash_wait_resp(struct afu *, struct afu_cm

Re: [PATCH 0/2] VFIO: Accept IOMMU group (PE) ID

2015-09-21 Thread Gavin Shan
On Mon, Sep 21, 2015 at 11:42:28AM +1000, David Gibson wrote: >On Sat, Sep 19, 2015 at 04:22:47PM +1000, David Gibson wrote: >> On Fri, Sep 18, 2015 at 09:47:32AM -0600, Alex Williamson wrote: >> > On Fri, 2015-09-18 at 16:24 +1000, Gavin Shan wrote: >> > > This allows to accept IOMMU group (PE) ID

Re: [PATCH v2 04/30] cxlflash: Fix potential oops following LUN removal

2015-09-21 Thread Tomas Henzl
On 16.9.2015 23:27, Matthew R. Ochs wrote: > When a LUN is removed, the sdev that is associated with the LUN > remains intact until its reference count drops to 0. In order > to prevent an sdev from being removed while a context is still > associated with it, obtain an additional reference per-cont

Re: [PATCH 18/31] powerpc/mm: Increase the pte frag size.

2015-09-21 Thread Aneesh Kumar K.V
Benjamin Herrenschmidt writes: > On Mon, 2015-09-21 at 14:15 +0530, Aneesh Kumar K.V wrote: >> Benjamin Herrenschmidt writes: >> >> > On Mon, 2015-09-21 at 12:10 +0530, Aneesh Kumar K.V wrote: >> > > /* >> > > - * We use a 2K PTE page fragment and another 2K for storing >> > > - * real_pte_t ha

Re: [PATCH] powerpc/eeh: Avoid to handle EEH on a passed Child PE

2015-09-21 Thread Gavin Shan
On Mon, Sep 21, 2015 at 05:29:48PM +0800, Wei Yang wrote: >Current EEH infrastructure would avoid to handle EEH when a PE is passed to >guest, while if this PE is a Child PE of the one hit EEH, host would handle >this. By doing so, this would leads to guest hang. The correct way is >avoid to handle

Re: [PATCH v2 03/30] cxlflash: Fix read capacity timeout

2015-09-21 Thread Tomas Henzl
On 16.9.2015 23:26, Matthew R. Ochs wrote: > From: Manoj Kumar > > The timeout value for read capacity is too small. Certain devices > may take longer to respond and thus the command may prematurely > timeout. Additionally the literal used for the timeout is stale. > > Update the timeout to 30 sec

Re: [PATCH v2 09/30] cxlflash: Fix to stop interrupt processing on remove

2015-09-21 Thread Tomas Henzl
On 19.9.2015 01:26, Matthew R. Ochs wrote: >> On Sep 18, 2015, at 6:59 AM, Tomas Henzl wrote: >> On 17.9.2015 19:16, Matthew R. Ochs wrote: On Sep 17, 2015, at 7:38 AM, Tomas Henzl wrote: On 16.9.2015 18:53, Matthew R. Ochs wrote: > Interrupt processing can run in parallel to a

Re: [PATCH 18/31] powerpc/mm: Increase the pte frag size.

2015-09-21 Thread Benjamin Herrenschmidt
On Mon, 2015-09-21 at 14:15 +0530, Aneesh Kumar K.V wrote: > Benjamin Herrenschmidt writes: > > > On Mon, 2015-09-21 at 12:10 +0530, Aneesh Kumar K.V wrote: > > > /* > > > - * We use a 2K PTE page fragment and another 2K for storing > > > - * real_pte_t hash index > > > + * We use a 2K PTE page f

Re: [PATCH 19/31] powerpc/mm: Convert 4k hash insert to C

2015-09-21 Thread Aneesh Kumar K.V
Benjamin Herrenschmidt writes: > On Mon, 2015-09-21 at 12:10 +0530, Aneesh Kumar K.V wrote: >> Signed-off-by: Aneesh Kumar K.V >> --- >> arch/powerpc/mm/Makefile| 3 + >> arch/powerpc/mm/hash64_64k.c| 204 + >> arch/powerpc/mm/hash_low_64.S | 380

Re: [PATCH] powerpc: Kconfig.cputype: Disallow TUNE_CELL on LE systems

2015-09-21 Thread Thomas Huth
On 21/09/15 09:18, Michael Ellerman wrote: > On Fri, 2015-09-18 at 16:17 +0200, Thomas Huth wrote: >> It looks somewhat weird that you can enable TUNE_CELL on little >> endian systems, so let's disable this option with CPU_LITTLE_ENDIAN. >> >> Signed-off-by: Thomas Huth >> --- >> I first thought

RE: [PATCH v2 12/30] cxlflash: Refine host/device attributes

2015-09-21 Thread David Laight
From: Brian King > Sent: 18 September 2015 22:35 ... > > + for (i = 0; i < CXLFLASH_NUM_VLUNS; i++, buf += 22) > > Rather than this bug prone hard coded 22, how about never incrementing buf > and do something > similar to this: > > > + bytes += scnprintf(buf, PAGE_SIZE, "%03d: %016ll

Re: Time to remove platforms/cell?

2015-09-21 Thread Michael Ellerman
On Thu, 2015-09-17 at 12:28 +0200, Marc Dietrich wrote: > Am Donnerstag, 17. September 2015, 19:45:38 schrieb Michael Ellerman: > > On Thu, 2015-09-17 at 10:43 +0200, Marc Dietrich wrote: > > > Am Donnerstag, 17. September 2015, 15:28:47 schrieb Michael Ellerman: > > > > [...] > > > > Having said a

Re: Time to remove platforms/cell?

2015-09-21 Thread Michael Ellerman
On Thu, 2015-09-17 at 13:15 +0200, Arnd Bergmann wrote: > On Thursday 17 September 2015 12:28:13 Marc Dietrich wrote: > > Am Donnerstag, 17. September 2015, 19:45:38 schrieb Michael Ellerman: > > > On Thu, 2015-09-17 at 10:43 +0200, Marc Dietrich wrote: > > > > Am Donnerstag, 17. September 2015, 15

[PATCH] powerpc/eeh: Avoid to handle EEH on a passed Child PE

2015-09-21 Thread Wei Yang
Current EEH infrastructure would avoid to handle EEH when a PE is passed to guest, while if this PE is a Child PE of the one hit EEH, host would handle this. By doing so, this would leads to guest hang. The correct way is avoid to handle it on host and let guest to recover. This patch avoids to ha

[PATCH] powerpc: fsl_pci: cast the regs->nip to void * when passing it to probe_kernel_address()

2015-09-21 Thread Kevin Hao
With the reimplementation of probe_kernel_address() in commit ecc83243e1d4 ("uaccess: reimplement probe_kernel_address() using probe_kernel_read()"), the explication of the cast for the addr parameter has been dropped. So we have to explicitly cast the regs->nip to void * when passing it to probe_k

Re: [PATCH 18/31] powerpc/mm: Increase the pte frag size.

2015-09-21 Thread Aneesh Kumar K.V
Benjamin Herrenschmidt writes: > On Mon, 2015-09-21 at 12:10 +0530, Aneesh Kumar K.V wrote: >> /* >> - * We use a 2K PTE page fragment and another 2K for storing >> - * real_pte_t hash index >> + * We use a 2K PTE page fragment and another 4K for storing >> + * real_pte_t hash index. Rounding the

RE: [PATCH 2/4] powerpc/device-tree: bindings for DSP cores/clusters for Freescale SOCs

2015-09-21 Thread Aggrwal Poonam
> -Original Message- > From: Wood Scott-B07421 > Sent: Sunday, September 20, 2015 5:45 AM > To: Aggrwal Poonam-B10812 > Cc: linuxppc-dev@lists.ozlabs.org; linux-ker...@vger.kernel.org; devicetree- > disc...@lists.ozlabs.org > Subject: Re: [PATCH 2/4] powerpc/device-tree: bindings for DSP

Re: [PATCH 19/31] powerpc/mm: Convert 4k hash insert to C

2015-09-21 Thread Benjamin Herrenschmidt
On Mon, 2015-09-21 at 12:10 +0530, Aneesh Kumar K.V wrote: > Signed-off-by: Aneesh Kumar K.V > --- > arch/powerpc/mm/Makefile| 3 + > arch/powerpc/mm/hash64_64k.c| 204 + > arch/powerpc/mm/hash_low_64.S | 380 -- > -- > arch/

Re: [PATCH 18/31] powerpc/mm: Increase the pte frag size.

2015-09-21 Thread Benjamin Herrenschmidt
On Mon, 2015-09-21 at 12:10 +0530, Aneesh Kumar K.V wrote: > /* > - * We use a 2K PTE page fragment and another 2K for storing > - * real_pte_t hash index > + * We use a 2K PTE page fragment and another 4K for storing > + * real_pte_t hash index. Rounding the entire thing to 8K > */ Isn't this a

Re: [PATCH] powerpc: Kconfig.cputype: Disallow TUNE_CELL on LE systems

2015-09-21 Thread Michael Ellerman
On Fri, 2015-09-18 at 16:17 +0200, Thomas Huth wrote: > It looks somewhat weird that you can enable TUNE_CELL on little > endian systems, so let's disable this option with CPU_LITTLE_ENDIAN. > > Signed-off-by: Thomas Huth > --- > I first thought that it might be better to make this option depend

Re: [BUG] Revert 0b05e2d671c4 'powerpc/32: cacheable_memcpy becomes memcpy'

2015-09-21 Thread Michael Ellerman
On Fri, 2015-09-18 at 16:45 +0200, Thomas Gleixner wrote: > On Fri, 18 Sep 2015, Segher Boessenkool wrote: > > > On Fri, Sep 18, 2015 at 08:01:57PM +1000, Michael Ellerman wrote: > > > Weird. > > > > > > Can you try: > > > > > > d690740f22f6 ("powerpc/powernv: Enable LEDS support") > > > > >

[PATCH 31/31] powerpc/mm: Add a _PAGE_PTE bit

2015-09-21 Thread Aneesh Kumar K.V
For a pte entry we will have _PAGE_PTE set. Our pte page address have a minimum alignment requirement of HUGEPD_SHIFT_MASK + 1. We use the lower 7 bits to indicate hugepd. ie. For pmd and pgd we can find: 1) _PAGE_PTE set pte -> indicate PTE 2) bits [2..6] non zero -> indicate hugepd. They also

[PATCH 30/31] powerpc/mm: Move THP headers around

2015-09-21 Thread Aneesh Kumar K.V
We support THP only with book3s_64 and 64K page size. Move THP details to hash64-64k.h to clarify the same. Signed-off-by: Aneesh Kumar K.V --- arch/powerpc/include/asm/book3s/64/hash-64k.h | 126 + arch/powerpc/include/asm/book3s/64/hash.h | 223 ++- arch/pow

[PATCH 29/31] powerpc/mm: Move hugetlb related headers

2015-09-21 Thread Aneesh Kumar K.V
W.r.t hugetlb, we support two format for pmd. With book3s_64 and 64K linux page size, we can have pte at the pmd level. Hence we don't need to support hugepd there. For everything else hugepd is supported and pmd_huge is (0). Signed-off-by: Aneesh Kumar K.V --- arch/powerpc/include/asm/book3s/64

[PATCH 28/31] powerpc/mm: Move WIMG update to helper.

2015-09-21 Thread Aneesh Kumar K.V
Only difference here is, we apply the WIMG mapping early, so rflags passed to updatepp will also be changed. Signed-off-by: Aneesh Kumar K.V --- arch/powerpc/mm/hash64_4k.c | 5 - arch/powerpc/mm/hash64_64k.c | 14 +- arch/powerpc/mm/hash_utils_64.c | 13 ++

[PATCH 27/31] powerpc/mm: Add helper for converting pte bit to hpte bits

2015-09-21 Thread Aneesh Kumar K.V
Instead of open coding it in multiple code paths, export the helper and add more documentation. Also make sure we don't make assumption regarding pte bit position Signed-off-by: Aneesh Kumar K.V --- arch/powerpc/include/asm/book3s/64/hash.h | 1 + arch/powerpc/mm/hash64_4k.c | 13

[PATCH 26/31] powerpc/mm: Remove the dependency on pte bit position in asm code

2015-09-21 Thread Aneesh Kumar K.V
We should not expect pte bit position in asm code. Simply by moving part of that to C Signed-off-by: Aneesh Kumar K.V --- arch/powerpc/kernel/exceptions-64s.S | 16 +++- arch/powerpc/mm/hash_utils_64.c | 29 + 2 files changed, 32 insertions(+), 13 del

[PATCH 25/31] powerpc/mm: Convert 4k insert from asm to C

2015-09-21 Thread Aneesh Kumar K.V
This is similar to 64K insert. May be we want to consolidate Signed-off-by: Aneesh Kumar K.V --- arch/powerpc/mm/Makefile| 6 +- arch/powerpc/mm/hash64_4k.c | 139 + arch/powerpc/mm/hash_low_64.S | 331 arch/powerpc/mm/hash

[PATCH 24/31] powerpc/mm: Convert __hash_page_64K to C

2015-09-21 Thread Aneesh Kumar K.V
Convert from asm to C Signed-off-by: Aneesh Kumar K.V --- arch/powerpc/include/asm/book3s/64/hash-64k.h | 3 +- arch/powerpc/include/asm/book3s/64/hash.h | 1 + arch/powerpc/mm/hash64_64k.c | 134 +++- arch/powerpc/mm/hash_low_64.S | 290 +

[PATCH 23/31] powerpc/mm: Increase the width of #define

2015-09-21 Thread Aneesh Kumar K.V
No real change, only style changes Signed-off-by: Aneesh Kumar K.V --- arch/powerpc/include/asm/book3s/64/hash.h | 26 +- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/arch/powerpc/include/asm/book3s/64/hash.h b/arch/powerpc/include/asm/book3s/64/hash.h

[PATCH 21/31] powerpc/mm: make pte page hash index slot 8 bits

2015-09-21 Thread Aneesh Kumar K.V
Currently we use 4 bits for each slot and pack all the 16 slot information related to a 64K linux page in a 64bit value. To do this we use 16 bits of pte_t. Move the hash slot valid bit out of pte_t and place them in the second half of pte page. We also use 8 bit per each slot. Signed-off-by: Anee

[PATCH 22/31] powerpc/mm: Don't track subpage valid bit in pte_t

2015-09-21 Thread Aneesh Kumar K.V
This free up 11 bits in pte_t. In the later patch we also change the pte_t format so that we can start supporting migration pte at pmd level. Signed-off-by: Aneesh Kumar K.V --- arch/powerpc/include/asm/book3s/64/hash-4k.h | 10 + arch/powerpc/include/asm/book3s/64/hash-64k.h | 29 ++---

[PATCH 20/31] powerpc/mm: update __real_pte to take address as argument

2015-09-21 Thread Aneesh Kumar K.V
We will use this in the later patch to compute the right hash index Signed-off-by: Aneesh Kumar K.V --- arch/powerpc/include/asm/book3s/64/hash-64k.h | 2 +- arch/powerpc/include/asm/book3s/64/pgtable.h | 4 ++-- arch/powerpc/include/asm/booke/64/pgtable.h | 4 ++-- arch/powerpc/mm/hash64_64k

[PATCH 18/31] powerpc/mm: Increase the pte frag size.

2015-09-21 Thread Aneesh Kumar K.V
We will use the increased size to store more information of 4K pte when using 64K page size. The idea is to free up bits in pte_t. Signed-off-by: Aneesh Kumar K.V --- arch/powerpc/include/asm/pgalloc-64.h | 12 ++-- 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/arch/power

[PATCH 19/31] powerpc/mm: Convert 4k hash insert to C

2015-09-21 Thread Aneesh Kumar K.V
Signed-off-by: Aneesh Kumar K.V --- arch/powerpc/mm/Makefile| 3 + arch/powerpc/mm/hash64_64k.c| 204 + arch/powerpc/mm/hash_low_64.S | 380 arch/powerpc/mm/hash_utils_64.c | 4 +- 4 files changed, 210 insertions(+), 3

[PATCH 17/31] powerpc/booke: Move booke headers (part 5)

2015-09-21 Thread Aneesh Kumar K.V
Signed-off-by: Aneesh Kumar K.V --- arch/powerpc/include/asm/booke/32/pte-40x.h | 6 +++--- arch/powerpc/include/asm/booke/32/pte-44x.h | 6 +++--- arch/powerpc/include/asm/booke/32/pte-8xx.h | 6 +++--- arch/powerpc/include/asm/booke/32/pte-fsl-booke.h | 6 +++--- arch/powerpc/

[PATCH 16/31] powerpc/booke: Move booke headers (part 4)

2015-09-21 Thread Aneesh Kumar K.V
Signed-off-by: Aneesh Kumar K.V --- arch/powerpc/include/asm/booke/32/pgtable.h | 16 arch/powerpc/include/asm/{ => booke/32}/pte-40x.h | 0 arch/powerpc/include/asm/{ => booke/32}/pte-44x.h | 0 arch/powerpc/include/asm/{ => booke/32}/pte-8xx.h |

[PATCH 15/31] powerpc/booke: Move booke headers (part 3)

2015-09-21 Thread Aneesh Kumar K.V
Signed-off-by: Aneesh Kumar K.V --- .../include/asm/{pgtable-ppc64-4k.h => booke/64/pgtable-4k.h} | 0 .../asm/{pgtable-ppc64-64k.h => booke/64/pgtable-64k.h}| 0 arch/powerpc/include/asm/booke/64/pgtable.h| 10 +- 3 files changed, 5 insertions(+), 5 deletio