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

2015-09-18 Thread David Gibson
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 from the parameter from userland > > when handling EEH operation so that the operation only affects the target > > IOMMU group (PE).

Re: [RESEND PATCH 1/1] ASoC: fsl_ssi: Fix checking of dai format for AC97 mode

2015-09-18 Thread undefined
Adam Thomson wrote: Current code incorrectly treats dai format for AC97 as bit mask whereas it's actually an integer value. This causes DAI formats other than AC97 (e.g. DSP_B) to trigger AC97 related code, which is incorrect and breaks functionality. This patch fixes the code to correctly compar

[PATCH v2] ASoC: fsl-asoc-card: add AC'97 support

2015-09-18 Thread Maciej S. Szmigiero
Add AC'97 support to fsl-asoc-card using generic ASoC AC'97 CODEC. The SSI controller will silently enable any TX AC'97 slots that have their bits set in SLOTREQ received from CODEC and then will redirect some of playback samples there. That's why it is important to make sure that any of CODEC pl

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

2015-09-18 Thread Matthew R. Ochs
> On Sep 18, 2015, at 4:34 PM, Brian King wrote: > On 09/16/2015 04:29 PM, Matthew R. Ochs wrote: >> >> +ssize_t bytes = 0; >> +__be64 __iomem *fc_port; >> + >> +if (port >= NUM_FC_PORTS) >> +return 0; >> + >> +fc_port = &afu->afu_map->global.fc_port[port][0]; >> + >>

Re: [PATCH v2 08/30] cxlflash: Fix to avoid CXL services during EEH

2015-09-18 Thread Matthew R. Ochs
> On Sep 18, 2015, at 8:37 AM, Brian King wrote: > On 09/16/2015 04:27 PM, Matthew R. Ochs wrote: >> >> /** >> + * drain_ioctls() - wait until all currently executing ioctls have completed >> + * @cfg:Internal structure associated with the host. >> + * >> + * Obtain write access to read/write

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

2015-09-18 Thread Matthew R. Ochs
> 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 remove operation. This can lead to a condi

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

2015-09-18 Thread Matthew R. Ochs
> On Sep 17, 2015, at 8:26 PM, Brian King wrote: > > On 09/16/2015 04:27 PM, Matthew R. Ochs wrote: >> >> lun_access = kzalloc(sizeof(*lun_access), GFP_KERNEL); >> if (unlikely(!lun_access)) { >> dev_err(dev, "%s: Unable to allocate lun_access!\n", __func__); >> +

Re: [PATCH v2 13/30] cxlflash: Fix to avoid spamming the kernel log

2015-09-18 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 12/30] cxlflash: Refine host/device attributes

2015-09-18 Thread Brian King
On 09/16/2015 04:29 PM, Matthew R. Ochs wrote: > Implement the following suggestions and add two new attributes > to allow for debugging the port LUN table. > > - use scnprintf() instead of snprintf() > - use DEVICE_ATTR_RO and DEVICE_ATTR_RW > > Signed-off-by: Matthew R. Ochs > Signed-off-by:

[PATCH 2/2] powerpc: axonram: Fix module autoload for OF platform driver

2015-09-18 Thread Luis de Bethencourt
This platform driver has a OF device ID table but the OF module alias information is not created so module autoloading won't work. Signed-off-by: Luis de Bethencourt --- arch/powerpc/sysdev/axonram.c | 1 + 1 file changed, 1 insertion(+) diff --git a/arch/powerpc/sysdev/axonram.c b/arch/powerpc

[PATCH 1/2] powerpc: platforms: mpc52xx_lpbfifo: Fix module autoload for OF platform driver

2015-09-18 Thread Luis de Bethencourt
This platform driver has a OF device ID table but the OF module alias information is not created so module autoloading won't work. Signed-off-by: Luis de Bethencourt --- arch/powerpc/platforms/52xx/mpc52xx_lpbfifo.c | 1 + 1 file changed, 1 insertion(+) diff --git a/arch/powerpc/platforms/52xx/

[PATCH 0/2] powerpc: Fix module autoload for OF platform drivers

2015-09-18 Thread Luis de Bethencourt
Hi, These patches add the missing MODULE_DEVICE_TABLE() for OF to export the information so modules have the correct aliases built-in and autoloading works correctly. A longer explanation by Javier Canillas can be found here: https://lkml.org/lkml/2015/7/30/519 Thanks, Luis Luis de Bethencourt

Re: suspicious RCU usage with kvm_pr

2015-09-18 Thread Denis Kirjanov
On 9/18/15, Thomas Huth wrote: > On 16/09/15 12:59, Denis Kirjanov wrote: >> On 9/16/15, Thomas Huth wrote: >>> On 16/09/15 10:51, Denis Kirjanov wrote: Hi, I see the following trace on qemu startup (ps700 blade): v4.2-11169-g64d1def [ 143.369638]

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

2015-09-18 Thread Will Deacon
On Wed, Sep 16, 2015 at 04:49:31PM +0100, Boqun Feng wrote: > On powerpc, we don't need a general memory barrier to achieve acquire and > release semantics, so __atomic_op_{acquire,release} can be implemented > using "lwsync" and "isync". I'm assuming isync+ctrl isn't transitive, so we need to get

Re: [PATCH 0/7] Phy and mdiobus fixes

2015-09-18 Thread Sören Brinkmann
Hi Russell, On Fri, 2015-09-18 at 10:56AM +0100, Russell King - ARM Linux wrote: > Sorry guys, some of you will get the patches twice, as Sören's name > in the header caused vger to reject all the patches. That is the first time I hear about an issue like that. I've been receiving patches fine th

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

2015-09-18 Thread Alex Williamson
On Fri, 2015-09-18 at 16:24 +1000, Gavin Shan wrote: > This allows to accept IOMMU group (PE) ID from the parameter from userland > when handling EEH operation so that the operation only affects the target > IOMMU group (PE). If the IOMMU group (PE) ID in the parameter from userland > is invalid, a

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

2015-09-18 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 10/30] cxlflash: Correct naming of limbo state and waitq

2015-09-18 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 0/7] Phy and mdiobus fixes

2015-09-18 Thread Russell King - ARM Linux
On Fri, Sep 18, 2015 at 08:01:28AM -0700, Sören Brinkmann wrote: > Hi Russell, > > On Fri, 2015-09-18 at 10:56AM +0100, Russell King - ARM Linux wrote: > > Sorry guys, some of you will get the patches twice, as Sören's name > > in the header caused vger to reject all the patches. > > That is the

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

2015-09-18 Thread Thomas Gleixner
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") > > > > That is the commit before my merge of Scott's tree, which had all the > > F

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

2015-09-18 Thread Segher Boessenkool
On Fri, Sep 18, 2015 at 08:01:57PM +1000, Michael Ellerman wrote: > Weird. > > Can you try: > > d690740f22f6 ("powerpc/powernv: Enable LEDS support") > > That is the commit before my merge of Scott's tree, which had all the > Freescale > & 32-bit stuff. > > If that works, it would isolate it

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

2015-09-18 Thread Thomas Huth
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 on PPC_CELL instead ... but I guess it's a bad idea to depend a

Re: [PATCH 1/2] char: hw_random: Fix module autoload for OF platform drivers

2015-09-18 Thread Herbert Xu
On Tue, Sep 15, 2015 at 06:41:33PM +0200, Luis de Bethencourt wrote: > This platform drivers have a OF device ID table but the OF module > alias information is not created so module autoloading won't work. > > Signed-off-by: Luis de Bethencourt Patch applied. Thanks. -- Email: Herbert Xu Home

Re: [PATCH v2 08/30] cxlflash: Fix to avoid CXL services during EEH

2015-09-18 Thread Brian King
On 09/16/2015 04:27 PM, Matthew R. Ochs wrote: > --- a/drivers/scsi/cxlflash/main.c > +++ b/drivers/scsi/cxlflash/main.c > @@ -2311,6 +2311,7 @@ static int cxlflash_probe(struct pci_dev *pdev, > cfg->lr_port = -1; > mutex_init(&cfg->ctx_tbl_list_mutex); > mutex_init(&cfg->ctx_reco

Re: suspicious RCU usage with kvm_pr

2015-09-18 Thread Thomas Huth
On 16/09/15 12:59, Denis Kirjanov wrote: > On 9/16/15, Thomas Huth wrote: >> On 16/09/15 10:51, Denis Kirjanov wrote: >>> Hi, >>> >>> I see the following trace on qemu startup (ps700 blade): >>> >>> v4.2-11169-g64d1def >>> >>> >>> [ 143.369638] === >>> [ 143.369640] [

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

2015-09-18 Thread Tomas Henzl
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 remove operation. This >>> can lead to a condition where the interrupt handler is processing with >>> mem

[GIT PULL] Please pull powerpc/linux.git powerpc-4.3-2 tag

2015-09-18 Thread Michael Ellerman
Hi Linus, Please pull powerpc fixes for 4.3: The following changes since commit 7d9071a095023cd1db8fa18fa0d648dc1a5210e0: Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs (2015-09-05 20:34:28 -0700) are available in the git repository at: git://git.kerne

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

2015-09-18 Thread Michael Ellerman
On Thu, 2015-09-17 at 12:13 +0200, Thomas Gleixner wrote: > On Wed, 16 Sep 2015, Steven Rostedt wrote: > > On Wed, 16 Sep 2015 22:01:06 +0200 (CEST) > > Thomas Gleixner wrote: > > > So now I have to chase down that one: > > > > > > [0.230210] ftrace: allocating 16560 entries in 49 pages > > >

Re: [PATCH 0/7] Phy and mdiobus fixes

2015-09-18 Thread Russell King - ARM Linux
Sorry guys, some of you will get the patches twice, as Sören's name in the header caused vger to reject all the patches. -- FTTC broadband for 0.8mile line: currently at 9.6Mbps down 400kbps up according to speedtest.net. ___ Linuxppc-dev mailing list L

Re: [PATCH] powerpc: Kconfig: remove BE-only platforms from LE kernel build

2015-09-18 Thread Boqun Feng
On Fri, Sep 18, 2015 at 07:49:56PM +1000, Michael Ellerman wrote: > On Fri, 2015-09-18 at 08:22 +0800, Boqun Feng wrote: > > Ping ;-) > > Hi Boqun, > Hello, > We keep track of patches in patchwork: > > http://patchwork.ozlabs.org/project/linuxppc-dev/list/?submitter=67102 > Good to know ;-

[PATCH 7/7] phy: add phy_device_remove()

2015-09-18 Thread Russell King
Add a phy_device_remove() function to complement phy_device_register(), which undoes the effects of phy_device_register() by removing the phy device from visibility, but not freeing it. This allows these details to be moved out of the mdio bus code into the phy code where this action belongs. Sig

[PATCH 6/7] phy: fixed-phy: properly validate phy in fixed_phy_update_state()

2015-09-18 Thread Russell King
Validate that the phy_device passed into fixed_phy_update_state() is a fixed-phy device before walking the list of phys for a fixed phy at the same address. Signed-off-by: Russell King --- drivers/net/phy/fixed_phy.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net

[PATCH 5/7] net: fix phy refcounting in a bunch of drivers

2015-09-18 Thread Russell King
of_phy_find_device() increments the phy struct device refcount, which we need to properly balance. Add code to network drivers using this function to ensure that the struct device refcount is correctly balanced. Signed-off-by: Russell King --- drivers/net/ethernet/apm/xgene/xgene_enet_hw.c|

[PATCH 4/7] of_mdio: fix MDIO phy device refcounting

2015-09-18 Thread Russell King
bus_find_device() is defined as: * This is similar to the bus_for_each_dev() function above, but it * returns a reference to a device that is 'found' for later use, as * determined by the @match callback. and it does indeed return a reference-counted pointer to the device: while ((dev

[PATCH 3/7] phy: add proper phy struct device refcounting

2015-09-18 Thread Russell King
Take a refcount on the phy struct device when the phy device is attached to a network device, and drop it after it's detached. This ensures that a refcount is held on the phy device while the device is being used by a network device, thereby preventing the phy_device from being unexpectedly kfree(

[PATCH 2/7] phy: fix mdiobus module safety

2015-09-18 Thread Russell King
Re-implement the mdiobus module refcounting to ensure that we actually ensure that the mdiobus module code does not go away while we might call into it. The old scheme using bus->dev.driver was buggy, because bus->dev is a class device which never has a struct device_driver associated with it, and

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

2015-09-18 Thread Russell King
of_mdio_find_bus() leaks a struct device refcount, caused by using class_find_device() and not realising that the device reference has its refcount incremented: * Note, you will need to drop the reference with put_device() after use. ... while ((dev = class_dev_iter_next(&iter))) {

Re: [PATCH] powerpc: Kconfig: remove BE-only platforms from LE kernel build

2015-09-18 Thread Michael Ellerman
On Fri, 2015-09-18 at 08:22 +0800, Boqun Feng wrote: > Ping ;-) Hi Boqun, We keep track of patches in patchwork: http://patchwork.ozlabs.org/project/linuxppc-dev/list/?submitter=67102 So your patch won't be forgotten. I tend to start taking patches for next after rc2, which should come out o

[PATCH 7/7] phy: add phy_device_remove()

2015-09-18 Thread Russell King
Add a phy_device_remove() function to complement phy_device_register(), which undoes the effects of phy_device_register() by removing the phy device from visibility, but not freeing it. This allows these details to be moved out of the mdio bus code into the phy code where this action belongs. Sig

[PATCH 6/7] phy: fixed-phy: properly validate phy in fixed_phy_update_state()

2015-09-18 Thread Russell King
Validate that the phy_device passed into fixed_phy_update_state() is a fixed-phy device before walking the list of phys for a fixed phy at the same address. Signed-off-by: Russell King --- drivers/net/phy/fixed_phy.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net

[PATCH 5/7] net: fix phy refcounting in a bunch of drivers

2015-09-18 Thread Russell King
of_phy_find_device() increments the phy struct device refcount, which we need to properly balance. Add code to network drivers using this function to ensure that the struct device refcount is correctly balanced. Signed-off-by: Russell King --- drivers/net/ethernet/apm/xgene/xgene_enet_hw.c|

[PATCH 4/7] of_mdio: fix MDIO phy device refcounting

2015-09-18 Thread Russell King
bus_find_device() is defined as: * This is similar to the bus_for_each_dev() function above, but it * returns a reference to a device that is 'found' for later use, as * determined by the @match callback. and it does indeed return a reference-counted pointer to the device: while ((dev

[PATCH 3/7] phy: add proper phy struct device refcounting

2015-09-18 Thread Russell King
Take a refcount on the phy struct device when the phy device is attached to a network device, and drop it after it's detached. This ensures that a refcount is held on the phy device while the device is being used by a network device, thereby preventing the phy_device from being unexpectedly kfree(

[PATCH 2/7] phy: fix mdiobus module safety

2015-09-18 Thread Russell King
Re-implement the mdiobus module refcounting to ensure that we actually ensure that the mdiobus module code does not go away while we might call into it. The old scheme using bus->dev.driver was buggy, because bus->dev is a class device which never has a struct device_driver associated with it, and

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

2015-09-18 Thread Russell King
of_mdio_find_bus() leaks a struct device refcount, caused by using class_find_device() and not realising that the device reference has its refcount incremented: * Note, you will need to drop the reference with put_device() after use. ... while ((dev = class_dev_iter_next(&iter))) {

[PATCH 0/7] Phy and mdiobus fixes

2015-09-18 Thread Russell King - ARM Linux
Hi, While looking at the phy code, I identified a number of weaknesses where refcounting on device structures was being leaked, where modules could be removed while in-use, and where the fixed-phy could end up having unintended consequences caused by incorrect calls to fixed_phy_update_state(). T

Re: [RFC v4 17/25] powerpc, fbdev: Use arch_nvram_ops methods instead of nvram_read_byte() and nvram_write_byte()

2015-09-18 Thread Finn Thain
Hi Ben, On Thu, 16 Jul 2015, I wrote: > On Wed, 15 Jul 2015, I wrote: > > > On Tue, 14 Jul 2015, Benjamin Herrenschmidt wrote: > > > > > Maybe we should have a dedicated accessor for "mac_xpram" ... > > > ... > > The arch_nvram_ops methods don't deal with structures like partitions ... Inst

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

2015-09-18 Thread Zhao Qiang
ls1 has qe and ls1 has arm cpu. move qe from arch/powerpc to drivers/soc/fsl to adapt to powerpc and arm Signed-off-by: Zhao Qiang --- Changes for v2: - move code to driver/soc Changes for v3: - change drivers/soc/qe to drivers/soc/fsl-qe Changes for v4: - move drivers/soc

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

2015-09-18 Thread Zhao Qiang
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 preparing to move QE code to "driver/soc" Signed-off-by: Zhao Qiang ---

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

2015-09-18 Thread Zhao Qiang
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, then move to qe_common - modify commit. arch/powerpc/platforms

[PATCH v10 2/5] genalloc:support allocating specific region

2015-09-18 Thread Zhao Qiang
Add new algo for genalloc, it reserve a specific region of memory matching the size requirement (no alignment constraint) Signed-off-by: Zhao Qiang --- Changes for v9: - reserve a specific region, if the return region - is not during the specific region, return fail. Changes for v

[PATCH v10 1/5] genalloc:support memory-allocation with bytes-alignment to genalloc

2015-09-18 Thread Zhao Qiang
Bytes alignment is required to manage some special RAM, so add gen_pool_first_fit_align to genalloc, meanwhile add gen_pool_alloc_data to pass data to gen_pool_first_fit_align(modify gen_pool_alloc as a wrapper) Signed-off-by: Zhao Qiang --- Changes for v6: - patches set v6 include a new