Re: [PATCH V7 00/17] Enable SRIOV on POWER8

2014-07-30 Thread Benjamin Herrenschmidt
On Thu, 2014-07-24 at 14:22 +0800, Wei Yang wrote: > This patch set enables the SRIOV on POWER8. Hi Bjorn ! There are 4 patches in there to the generic code, but so far not much review from your side of the fence :-) How do you want to proceed ? Cheers, Ben. > The gerneral idea is put each VF

Re: [PATCH v2 5/7] powerpc/corenet: Add MDIO bus muxing support to the board device tree(s)

2014-07-30 Thread Emil Medve
Hello Scott, On 07/31/2014 12:28 AM, Scott Wood wrote: > On Wed, 2014-07-30 at 23:35 -0500, Emil Medve wrote: >> Hello Scott, >> >> >> On 07/30/2014 09:30 PM, Scott Wood wrote: >>> On Wed, 2014-07-30 at 16:52 -0500, Emil Medve wrote: + mdio0: mdio fc000 { +

Re: [PATCH v2 5/7] powerpc/corenet: Add MDIO bus muxing support to the board device tree(s)

2014-07-30 Thread Scott Wood
On Wed, 2014-07-30 at 23:35 -0500, Emil Medve wrote: > Hello Scott, > > > On 07/30/2014 09:30 PM, Scott Wood wrote: > > On Wed, 2014-07-30 at 16:52 -0500, Emil Medve wrote: > >> + mdio0: mdio fc000 { > >> + }; > > > > Why is the empty nod

Re: [2/2] powerpc/fsl-booke: Add initial T1042RDB_PI board support

2014-07-30 Thread Scott Wood
On Wed, 2014-07-30 at 23:37 -0500, Jain Priyanka-B32167 wrote: > > -Original Message- > From: Wood Scott-B07421 > Sent: Thursday, July 31, 2014 1:43 AM > To: Jain Priyanka-B32167 > Cc: devicet...@vger.kernel.org; linuxppc-dev@lists.ozlabs.org; Aggrwal > Poonam-B10812; Kushwaha Prabhakar-

Re: [PATCH v2 5/7] powerpc/corenet: Add MDIO bus muxing support to the board device tree(s)

2014-07-30 Thread Emil Medve
Hello Scott, On 07/30/2014 09:30 PM, Scott Wood wrote: > On Wed, 2014-07-30 at 16:52 -0500, Emil Medve wrote: >> Hello Scott, >> >> >> On 07/29/2014 02:58 PM, Scott Wood wrote: >>> On Mon, 2014-07-28 at 06:51 +, Emil Medve wrote: Hello Scott, Scott Wood freescale.com> wri

RE: [2/2] powerpc/fsl-booke: Add initial T1042RDB_PI board support

2014-07-30 Thread Priyanka Jain
-Original Message- From: Wood Scott-B07421 Sent: Thursday, July 31, 2014 1:43 AM To: Jain Priyanka-B32167 Cc: devicet...@vger.kernel.org; linuxppc-dev@lists.ozlabs.org; Aggrwal Poonam-B10812; Kushwaha Prabhakar-B32579 Subject: Re: [2/2] powerpc/fsl-booke: Add initial T1042RDB_PI board s

[PATCH] ASoC: fsl_asrc: Fix sparse warnings in FSL_ASRC_FORMATS due to typo

2014-07-30 Thread Nicolin Chen
reproduce: make C=1 CF=-D__CHECK_ENDIAN__ sparse warnings: (new ones prefixed by >>) >> sound/soc/fsl/fsl_asrc.c:563:28: sparse: restricted snd_pcm_format_t >> degrades to integer >> sound/soc/fsl/fsl_asrc.c:570:28: sparse: restricted snd_pcm_format_t >> degrades to integer vim +563 sound/soc/

Re: [PATCH v2 5/7] powerpc/corenet: Add MDIO bus muxing support to the board device tree(s)

2014-07-30 Thread Scott Wood
On Wed, 2014-07-30 at 16:52 -0500, Emil Medve wrote: > Hello Scott, > > > On 07/29/2014 02:58 PM, Scott Wood wrote: > > On Mon, 2014-07-28 at 06:51 +, Emil Medve wrote: > >> Hello Scott, > >> > >> > >> Scott Wood freescale.com> writes: > >>> On Wed, 2014-07-16 at 15:17 -0500, Shruti Kanetkar

Re: [PATCH v2 5/7] powerpc/corenet: Add MDIO bus muxing support to the board device tree(s)

2014-07-30 Thread Emil Medve
Hello Scott, On 07/29/2014 02:58 PM, Scott Wood wrote: > On Mon, 2014-07-28 at 06:51 +, Emil Medve wrote: >> Hello Scott, >> >> >> Scott Wood freescale.com> writes: >>> On Wed, 2014-07-16 at 15:17 -0500, Shruti Kanetkar wrote: + mdio fd000 { +

Re: [2/2] powerpc/fsl-booke: Add initial T1042RDB_PI board support

2014-07-30 Thread Scott Wood
On Wed, Jul 09, 2014 at 09:54:11AM +0530, Priyanka Jain wrote: > diff --git a/arch/powerpc/boot/dts/t104xrdb.dtsi > b/arch/powerpc/boot/dts/t104xrdb.dtsi > index 9aaefa5..e7e765f 100644 > --- a/arch/powerpc/boot/dts/t104xrdb.dtsi > +++ b/arch/powerpc/boot/dts/t104xrdb.dtsi > @@ -57,7 +57,8 @@ >

Re: [PATCH 4/4] ASoC: fsl_ssi: Add stream names for DPCM usage

2014-07-30 Thread Timur Tabi
Nicolin Chen wrote: DPCM needs extra dapm routes in the machine driver to route audio between Front-End and Back-End. In order to differ the stream names in the route map from CODECs, we here add specific stream names to SSI driver so that we can implement ASRC via DPCM to it. Signed-off-by: Nic

[PATCH 3.12 71/94] locking/mutex: Disable optimistic spinning on some architectures

2014-07-30 Thread Jiri Slaby
From: Peter Zijlstra 3.12-stable review patch. If anyone has any objections, please let me know. === commit 4badad352a6bb202ec68afa7a574c0bb961e5ebc upstream. The optimistic spin code assumes regular stores and cmpxchg() play nice; this is found to not be true for at least: parisc

[PATCH RFC] ASoC: fsl: Add Freescale Generic ASoC Sound Card with ASRC support

2014-07-30 Thread Nicolin Chen
The Freescale Generic ASoC Sound Card is a general ASoC DAI Link driver that can be used, ideally, for all Freescale CPU DAI drivers and external CODECs. The idea of this generic sound card is a bit like ASoC Simple Card. However, for Freescale SoCs (especially those released in recent years), mos

Re: [PATCH v4 16/16] vfio: powerpc/spapr: Enable Dynamic DMA windows

2014-07-30 Thread Alexey Kardashevskiy
On 07/30/2014 07:31 PM, Alexey Kardashevskiy wrote: > This defines and implements VFIO IOMMU API required to support > Dynamic DMA windows defined in the SPAPR specification. The ioctl handlers > implement host-size part of corresponding RTAS calls: > - VFIO_IOMMU_SPAPR_TCE_QUERY - ibm,query-pe-dma

[PATCH v4 01/16] rcu: Define notrace version of list_for_each_entry_rcu and list_entry_rcu

2014-07-30 Thread Alexey Kardashevskiy
This defines list_for_each_entry_rcu_notrace which uses new list_entry_rcu_notrace which uses rcu_dereference_raw_notrace instead of rcu_dereference_raw whici allows us using list_for_each_entry_rcu_notrace when MMU is off (real mode). Signed-off-by: Alexey Kardashevskiy --- include/linux/rculis

[PATCH v4 07/16] powerpc/spapr: vfio: Implement spapr_tce_iommu_ops

2014-07-30 Thread Alexey Kardashevskiy
Modern IBM POWERPC systems support multiple IOMMU tables per PE so we need a more reliable way (compared to container_of()) to get a PE pointer from the iommu_table struct pointer used in IOMMU functions. At the moment IOMMU group data points to an iommu_table struct. This introduces a spapr_tce_i

[PATCH v4 16/16] vfio: powerpc/spapr: Enable Dynamic DMA windows

2014-07-30 Thread Alexey Kardashevskiy
This defines and implements VFIO IOMMU API required to support Dynamic DMA windows defined in the SPAPR specification. The ioctl handlers implement host-size part of corresponding RTAS calls: - VFIO_IOMMU_SPAPR_TCE_QUERY - ibm,query-pe-dma-window; - VFIO_IOMMU_SPAPR_TCE_CREATE - ibm,create-pe-dma-w

[PATCH v4 13/16] powerpc/powernv: Implement Dynamic DMA windows (DDW) for IODA

2014-07-30 Thread Alexey Kardashevskiy
SPAPR defines an interface to create additional DMA windows dynamically. "Dynamically" means that the window is not allocated at the guest start and the guest can request it later. In practice, existing linux guests check for the capability and if it is there, they create+map one big DMA window as

[PATCH v4 15/16] vfio: powerpc/spapr: Use it_page_size

2014-07-30 Thread Alexey Kardashevskiy
This makes use of the it_page_size from the iommu_table struct as page size can differ. This replaces missing IOMMU_PAGE_SHIFT macro in commented debug code as recently introduced IOMMU_PAGE_XXX macros do not include IOMMU_PAGE_SHIFT. Signed-off-by: Alexey Kardashevskiy --- drivers/vfio/vfio_io

[PATCH v4 14/16] vfio: powerpc/spapr: Reuse locked_vm accounting helpers

2014-07-30 Thread Alexey Kardashevskiy
There are helpers to account locked pages in locked_vm counter, this reuses these helpers in VFIO-SPAPR-IOMMU driver. While we are here, update the comment explaining why RLIMIT_MEMLOCK might be required to be bigger than entire guest RAM. Signed-off-by: Alexey Kardashevskiy --- Changes: v4: * a

[PATCH v4 10/16] powerpc: Move tce_xxx callbacks from ppc_md to iommu_table

2014-07-30 Thread Alexey Kardashevskiy
This adds a iommu_table_ops struct and puts pointer to it into the iommu_table struct. This moves tce_build/tce_free/tce_get/tce_flush callbacks from ppc_md to the new struct where they really belong to. This adds an extra @ops parameter to iommu_init_table() to make sure that we do not leave any

[PATCH v4 11/16] powerpc/powernv: Release replaced TCE

2014-07-30 Thread Alexey Kardashevskiy
At the moment writing new TCE value to the IOMMU table fails with EBUSY if there is a valid entry already. However PAPR specification allows the guest to write new TCE value without clearing it first. This adds a set_and_get() callback to iommu_table_ops which does the same thing as set() plus it

[PATCH v4 12/16] powerpc/pseries/lpar: Enable VFIO

2014-07-30 Thread Alexey Kardashevskiy
The previous patch introduced iommu_table_ops::set_and_get() callback which effectively disabled VFIO on pseries. This implements set_and_get() for pseries/lpar so VFIO can work under pHyp again. Since set_and_get() callback must return old TCE, it has to do H_GET_TCE for every TCE being replaced,

[PATCH v4 09/16] powerpc/iommu: Fix IOMMU ownership control functions

2014-07-30 Thread Alexey Kardashevskiy
This adds missing locks in iommu_take_ownership()/ iommu_release_ownership(). This marks all pages busy in iommu_table::it_map in order to catch errors if there is an attempt to use this table while ownership over it is taken. This only clears TCE content if there is no page marked busy in it_map

[PATCH v4 06/16] powerpc/powernv: Make invalidate() a callback

2014-07-30 Thread Alexey Kardashevskiy
At the moment pnv_pci_ioda_tce_invalidate() gets the PE pointer via container_of(tbl). Since we are going to have to add Dynamic DMA windows and that means having 2 IOMMU tables per PE, this is not going to work. This implements pnv_pci_ioda(1|2)_tce_invalidate as a pnv_ioda_pe callback. This add

[PATCH v4 08/16] powerpc/powernv: Convert/move set_bypass() callback to take_ownership()

2014-07-30 Thread Alexey Kardashevskiy
At the moment the iommu_table struct has a set_bypass() which enables/ disables DMA bypass on IODA2 PHB. This is exposed to POWERPC IOMMU code which calls this callback when external IOMMU users such as VFIO are about to get over a PHB. Since the set_bypass() is not really an iommu_table function

[PATCH v4 05/16] powerpc/iommu: Fix comments with it_page_shift

2014-07-30 Thread Alexey Kardashevskiy
There is a couple of commented debug prints which still use IOMMU_PAGE_SHIFT() which is not defined for POWERPC anymore, replace them with it_page_shift. Signed-off-by: Alexey Kardashevskiy Reviewed-by: Gavin Shan --- arch/powerpc/kernel/iommu.c | 4 ++-- 1 file changed, 2 insertions(+), 2 dele

[PATCH v4 04/16] KVM: PPC: Account TCE-containing pages in locked_vm

2014-07-30 Thread Alexey Kardashevskiy
At the moment pages used for TCE tables (not pages addressed by TCEs) are not counter in locked_vm counter so a malicious userspace tool can call ioctl(KVM_CREATE_SPAPR_TCE) as many times as RLIMIT_NOFILE and lock a lot of memory. This adds counting for pages used for TCE tables. This counts the

[PATCH v4 03/16] mm: Add helpers for locked_vm

2014-07-30 Thread Alexey Kardashevskiy
This adds 2 helpers to change the locked_vm counter: - try_increase_locked_vm - may fail if new locked_vm value will be greater than the RLIMIT_MEMLOCK limit; - decrease_locked_vm. These will be used by drivers capable of locking memory by userspace request. For example, VFIO can use it to check i

[PATCH v4 02/16] KVM: PPC: Use RCU for arch.spapr_tce_tables

2014-07-30 Thread Alexey Kardashevskiy
At the moment spapr_tce_tables is not protected against races. This makes use of RCU-variants of list helpers. As some bits are executed in real mode, this makes use of just introduced list_for_each_entry_rcu_notrace(). This converts release_spapr_tce_table() to a RCU scheduled handler. Signed-of

[PATCH v4 00/16] powernv: vfio: Add Dynamic DMA windows (DDW)

2014-07-30 Thread Alexey Kardashevskiy
This prepares existing upstream kernel for DDW (Dynamic DMA windows) and adds actual DDW support for VFIO. This patchset does not contain any in-kernel acceleration stuff. This patchset does not enable DDW for emulated devices. Changes: v4: * addressed Ben's comments * big rework with moving tc

scheduler crash on Power

2014-07-30 Thread Sukadev Bhattiprolu
I am getting this crash on a Powerpc system using 3.16.0-rc7 kernel plus some patches related to perf (24x7 counters) that Cody Schafer posted here: https://lkml.org/lkml/2014/5/27/768 I don't get the crash on an unpatched kernel though. I have been staring at the perf event patches, bu