[PATCH v2 0/2] Add Freescale ASRC driver

2014-07-24 Thread Nicolin Chen
This series of patches add Freescale ASRC module driver support along with the extra request in imx-sdma structure required by SDMA Device to Device script. The previous version has been in the maillist for nearly six months without any comment and reply. So I decide to drop the SDMA part's change

[PATCH v2 1/2] ARM: imx: Add the secondary request into the structure for imx-sdma

2014-07-24 Thread Nicolin Chen
SDMA supports device to device (per_2_per) scripts to handle DMA transfering between two peripheral devices. The per_2_per script, however, needs two dma requests from two sides while the current structure only defined one request. So this patch just simply adds the secondary request so as to let

[PATCH v2 2/2] ASoC: fsl_asrc: Add ASRC ASoC CPU DAI and platform drivers

2014-07-24 Thread Nicolin Chen
The Asynchronous Sample Rate Converter (ASRC) converts the sampling rate of a signal associated with an input clock into a signal associated with a different output clock. The driver currently works as a Front End of DPCM with other Back Ends DAI links such as ESAI<->CS42888 and SSI<->WM8962 and SA

Re: [RFC][PATCH 0/2] Add ASRC Peripheral to Peripheral driver

2014-07-24 Thread Nicolin Chen
On Fri, Jun 13, 2014 at 06:07:03PM +0800, Nicolin Chen wrote: > This series of patches have a direct dependency between them. So we might > need to push them into one branch. And sorry for this :( > > Patch-1 adds device to device support in SDMA driver along with a secondary > request in struct i

[PATCH v3 03/18] KVM: PPC: Account TCE pages in locked_vm

2014-07-24 Thread Alexey Kardashevskiy
Signed-off-by: Alexey Kardashevskiy --- arch/powerpc/kvm/book3s_64_vio.c | 35 ++- 1 file changed, 34 insertions(+), 1 deletion(-) diff --git a/arch/powerpc/kvm/book3s_64_vio.c b/arch/powerpc/kvm/book3s_64_vio.c index 516f2ee..48b7ed4 100644 --- a/arch/powerpc/kvm

[PATCH v3 04/18] vfio: powerpc: Move locked_vm accounting to a helper

2014-07-24 Thread Alexey Kardashevskiy
Additional DMA windows support is coming and accounting will include them so let's move this code to a helper for reuse. Signed-off-by: Alexey Kardashevskiy --- drivers/vfio/vfio_iommu_spapr_tce.c | 54 - 1 file changed, 36 insertions(+), 18 deletions(-) diff

[PATCH v3 05/18] powerpc/powernv: Use it_page_shift for TCE invalidation

2014-07-24 Thread Alexey Kardashevskiy
This fixes IODA1/2 to use it_page_shift as it may be bigger than 4K. This changes the involved constant values to use "ull" modifier. Signed-off-by: Alexey Kardashevskiy Reviewed-by: Gavin Shan --- arch/powerpc/platforms/powernv/pci-ioda.c | 16 +--- 1 file changed, 9 insertions(+)

[PATCH v3 00/18] powernv: vfio: Add Dynamic DMA windows (DDW)

2014-07-24 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: v3: * applied multiple comments from Gavin regarding error

[PATCH v3 02/18] KVM: PPC: Use RCU when adding to arch.spapr_tce_tables

2014-07-24 Thread Alexey Kardashevskiy
Signed-off-by: Alexey Kardashevskiy Reviewed-by: Gavin Shan --- arch/powerpc/kvm/book3s_64_vio.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/powerpc/kvm/book3s_64_vio.c b/arch/powerpc/kvm/book3s_64_vio.c index 54cf9bc..516f2ee 100644 --- a/arch/powerpc/kvm/book3s_64_

[PATCH v3 09/18] powerpc/spapr: vfio: Implement spapr_tce_iommu_ops

2014-07-24 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 v3 06/18] powerpc/powernv: Use it_page_shift in TCE build

2014-07-24 Thread Alexey Kardashevskiy
This makes use of iommu_table::it_page_shift instead of TCE_SHIFT and TCE_RPN_SHIFT hardcoded values. Signed-off-by: Alexey Kardashevskiy Reviewed-by: Gavin Shan --- arch/powerpc/platforms/powernv/pci.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/arch/powerpc/platfo

[PATCH v3 08/18] powerpc/powernv: Make invalidate() a callback

2014-07-24 Thread Alexey Kardashevskiy
This implements pnv_pci_ioda(1|2)_tce_invalidate as a pnv_ioda_pe callback. This adds a pnv_iommu_table wrapper around iommu_table and stores a pointer to PE there. PNV's ppc_md.tce_build() call uses this to find PE and do the invalidation. This will be used later for Dynamic DMA windows too. Thi

[PATCH v3 07/18] powerpc/powernv: Add a page size parameter to pnv_pci_setup_iommu_table()

2014-07-24 Thread Alexey Kardashevskiy
Since a TCE page size can be other than 4K, make it configurable for P5IOC2 and IODA PHBs. Signed-off-by: Alexey Kardashevskiy Reviewed-by: Gavin Shan --- arch/powerpc/platforms/powernv/pci-ioda.c | 5 +++-- arch/powerpc/platforms/powernv/pci-p5ioc2.c | 3 ++- arch/powerpc/platforms/powernv/p

[PATCH v3 12/18] powerpc/iommu: Fix missing permission bits in iommu_put_tce_user_mode()

2014-07-24 Thread Alexey Kardashevskiy
This adds missing permission bits to the translated TCE. Signed-off-by: Alexey Kardashevskiy --- arch/powerpc/kernel/iommu.c | 1 + 1 file changed, 1 insertion(+) diff --git a/arch/powerpc/kernel/iommu.c b/arch/powerpc/kernel/iommu.c index 0cda2e8..5af2319 100644 --- a/arch/powerpc/kernel/iommu

[PATCH v3 10/18] powerpc/powernv: Convert/move set_bypass() callback to take_ownership()

2014-07-24 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 v3 13/18] powerpc/iommu: Extend ppc_md.tce_build(_rm) to return old TCE values

2014-07-24 Thread Alexey Kardashevskiy
The tce_build/tce_build_rm callbacks are used to implement H_PUT_TCE/etc hypercalls. The PAPR spec does not allow to fail if the TCE is not empty. However we cannot just overwrite the existing TCE value with the new one as we still have to do page counting. This adds an optional @old_tces return p

[PATCH v3 14/18] powerpc/powernv: Return non-zero TCE from pnv_tce_build

2014-07-24 Thread Alexey Kardashevskiy
This returns old TCE values to the caller if requested. The caller is expectded to call put_page() for them. Signed-off-by: Alexey Kardashevskiy Reviewed-by: Gavin Shan --- arch/powerpc/platforms/powernv/pci.c | 11 --- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/arch/

[PATCH v3 11/18] powerpc/iommu: Fix IOMMU ownership control functions

2014-07-24 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 v3 16/18] powerpc/powernv: Implement Dynamic DMA windows (DDW) for IODA

2014-07-24 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 v3 15/18] powerpc/iommu: Implement put_page() if TCE had non-zero value

2014-07-24 Thread Alexey Kardashevskiy
Guests might put new TCEs without clearing them first and the PAPR spec allows that. This adds put_page() for TCEs which we just replaced. Signed-off-by: Alexey Kardashevskiy --- arch/powerpc/kernel/iommu.c | 10 +- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/arch/powe

[PATCH v3 17/18] vfio: Use it_page_size

2014-07-24 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 v3 18/18] vfio: powerpc: Enable Dynamic DMA windows

2014-07-24 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 v3 01/18] powerpc/iommu: Fix comments with it_page_shift

2014-07-24 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

RE: [PATCH 1/6 v2] KVM: PPC: Book3E: Use common defines for SPE/FP/AltiVec int numbers

2014-07-24 Thread mihai.cara...@freescale.com
> -Original Message- > From: kvm-ppc-ow...@vger.kernel.org [mailto:kvm-ppc- > ow...@vger.kernel.org] On Behalf Of mihai.cara...@freescale.com > Sent: Monday, July 21, 2014 4:23 PM > To: Alexander Graf; Wood Scott-B07421 > Cc: kvm-...@vger.kernel.org; k...@vger.kernel.org; linuxppc- > d...@l

Re: [PATCH v6 0/5] Read guest last instruction from kvmppc_get_last_inst()

2014-07-24 Thread Alexander Graf
On 23.07.14 18:06, Mihai Caraman wrote: Read guest last instruction from kvmppc_get_last_inst() allowing the function to fail in order to emulate again. On bookehv architecture search for the physical address and kmap it, instead of using Load External PID (lwepx) instruction. This fixes an infi

[PATCH] powerpc: fix wrong defintion in boot/io.h

2014-07-24 Thread Lucas Tanure
Fix wrong __IO_H definition in boot/io.h Reported-by: Fernando Silveira Signed-off-by: Lucas Tanure --- arch/powerpc/boot/io.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/powerpc/boot/io.h b/arch/powerpc/boot/io.h index 7c09f48..394da55 100644 --- a/arch/powerpc/boo

Re: [PATCH v2 1/2] ARM: imx: Add the secondary request into the structure for imx-sdma

2014-07-24 Thread Shawn Guo
On Thu, Jul 24, 2014 at 04:35:28PM +0800, Nicolin Chen wrote: > SDMA supports device to device (per_2_per) scripts to handle DMA transfering > between two peripheral devices. The per_2_per script, however, needs two dma > requests from two sides while the current structure only defined one request.

Re: [PATCH 1/4] powerpc: implement vmemmap_list_free()

2014-07-24 Thread Nathan Fontenot
On 06/11/2014 03:23 AM, Li Zhong wrote: > This patch implements vmemmap_list_free() for vmemmap_free(). > > The freed entries will be removed from vmemmap_list, and form a freed list, > with next as the header. The next position in the last allocated page is kept > at the list tail. > > When allo

Re: [PATCH 2/4] powerpc: implement vmemmap_remove_mapping() for BOOK3S

2014-07-24 Thread Nathan Fontenot
On 06/11/2014 03:23 AM, Li Zhong wrote: > This is to be called in vmemmap_free(), leave the implementation on BOOK3E > empty as before. > > Signed-off-by: Li Zhong > Cc: Nathan Fontenot Acked-by: Nathan Fontenot > --- > arch/powerpc/mm/hash_utils_64.c |2 +- > arch/powerpc/mm/init_64.c

Re: [PATCH 3/4] powerpc: implement vmemmap_free()

2014-07-24 Thread Nathan Fontenot
On 06/11/2014 03:23 AM, Li Zhong wrote: > vmemmap_free() does the opposite of vmemap_populate(). > This patch also puts vmemmap_free() and vmemmap_list_free() into > CONFIG_MEMMORY_HOTPLUG. > > Signed-off-by: Li Zhong > Cc: Nathan Fontenot Acked-by: Nathan Fontenot > --- > arch/powerpc/mm/i

Re: [PATCH 4/4] powerpc: start loop at section start of start in vmemmap_populated()

2014-07-24 Thread Nathan Fontenot
On 06/11/2014 03:23 AM, Li Zhong wrote: > vmemmap_populated() checks whether the [start, start + page_size) has valid > pfn numbers, to know whether a vmemmap mapping has been created that includes > this range. > > Some range before end might not be checked by this loop: > sec11start..start

Re: [PATCH v2 2/2] ASoC: fsl_asrc: Add ASRC ASoC CPU DAI and platform drivers

2014-07-24 Thread Tobias Klauser
On 2014-07-24 at 10:35:29 +0200, Nicolin Chen wrote: > The Asynchronous Sample Rate Converter (ASRC) converts the sampling rate of a > signal associated with an input clock into a signal associated with a > different > output clock. The driver currently works as a Front End of DPCM with other >

(request for -mm inclusion) Re: [PATCH v3] arm64, ia64, ppc, s390, sh, tile, um, x86, mm: Remove default gate area

2014-07-24 Thread Andy Lutomirski
Hi akpm- One more try before I spam the world with a new thread. Is this patch okay for -mm? So far, it's accumulated: Acked-by: Nathan Lynch Acked-by: H. Peter Anvin Acked-by: Benjamin Herrenschmidt [in principle] Acked-by: Richard Weinberger [for um] Acked-by: Will Deacon [for arm64] Fo

[PATCH v4] arm64, ia64, ppc, s390, sh, tile, um, x86, mm: Remove default gate area

2014-07-24 Thread Andy Lutomirski
The core mm code will provide a default gate area based on FIXADDR_USER_START and FIXADDR_USER_END if !defined(__HAVE_ARCH_GATE_AREA) && defined(AT_SYSINFO_EHDR). This default is only useful for ia64. arm64, ppc, s390, sh, tile, 64-bit UML, and x86_32 have their own code just to disable it. arm,

Kernel crash caused by cpufreq

2014-07-24 Thread Gavin Shan
I'm tracing one LSI interrupt issue on P8 box, and eventually into the following kernel crash. Not sure if there is one fix against this? :-) Starting Linux PPC64 #401 SMP Fri Jul 25 10:52:28 EST 2014 - ppc64_pft_size= 0x0 physic

Re: [PATCH v2 2/2] ASoC: fsl_asrc: Add ASRC ASoC CPU DAI and platform drivers

2014-07-24 Thread Nicolin Chen
Hi Tobias, On Thu, Jul 24, 2014 at 05:20:45PM +0200, Tobias Klauser wrote: > On 2014-07-24 at 10:35:29 +0200, Nicolin Chen wrote: > > The Asynchronous Sample Rate Converter (ASRC) converts the sampling rate of > > a > > signal associated with an input clock into a signal associated with a > > d

RE: [PATCH v2 1/7] dt: Introduce the FMan 10 Gb/s MDIO binding

2014-07-24 Thread Shaohui Xie
Hello, Scott, Shruti, There are two types MDIO controllers, each MAC has a corresponding MDIO controller to access internal PHYs inside Serdes, another is dedicated MDIO controller to access external PHYs (PHYs on board or riser card, etc). Current MDIO driver does not distinguish the two contr

[PATCH v3 0/2] Add Freescale ASRC driver

2014-07-24 Thread Nicolin Chen
This series of patches add Freescale ASRC module driver support along with the extra request in imx-sdma structure required by SDMA Device to Device script. The previous version has been in the maillist for nearly six months without any comment and reply. So I decide to drop the SDMA part's change

[PATCH v3 1/2] ARM: imx: Add the secondary request into the structure for imx-sdma

2014-07-24 Thread Nicolin Chen
SDMA supports device to device (per_2_per) scripts to handle DMA transfering between two peripheral devices. The per_2_per script, however, needs two dma requests from two sides while the current structure only defined one request. So this patch just simply adds the secondary request so as to let

[PATCH v3 2/2] ASoC: fsl_asrc: Add ASRC ASoC CPU DAI and platform drivers

2014-07-24 Thread Nicolin Chen
The Asynchronous Sample Rate Converter (ASRC) converts the sampling rate of a signal associated with an input clock into a signal associated with a different output clock. The driver currently works as a Front End of DPCM with other Back Ends DAI links such as ESAI<->CS42888 and SSI<->WM8962 and SA

Re: [PATCH v3 2/2] ASoC: fsl_asrc: Add ASRC ASoC CPU DAI and platform drivers

2014-07-24 Thread Varka Bhadram
On 07/25/2014 09:33 AM, Nicolin Chen wrote: The Asynchronous Sample Rate Converter (ASRC) converts the sampling rate of a signal associated with an input clock into a signal associated with a different output clock. The driver currently works as a Front End of DPCM with other Back Ends DAI links

Re: [PATCH v3 2/2] ASoC: fsl_asrc: Add ASRC ASoC CPU DAI and platform drivers

2014-07-24 Thread Nicolin Chen
Hi Varka, On Fri, Jul 25, 2014 at 09:54:43AM +0530, Varka Bhadram wrote: > On 07/25/2014 09:33 AM, Nicolin Chen wrote: > >The Asynchronous Sample Rate Converter (ASRC) converts the sampling rate of a > >signal associated with an input clock into a signal associated with a > >different > >output c

Re: [PATCH v3 2/2] ASoC: fsl_asrc: Add ASRC ASoC CPU DAI and platform drivers

2014-07-24 Thread Nicolin Chen
Hi Varka, Regarding a point you suggested. On Fri, Jul 25, 2014 at 09:54:43AM +0530, Varka Bhadram wrote: > On 07/25/2014 09:33 AM, Nicolin Chen wrote: > (...) > > >+ > >+static const struct platform_device_id fsl_asrc_devtype[] = { > >+{ > >+.name = "imx35-asrc", > >+

Re: [PATCH v3 2/2] ASoC: fsl_asrc: Add ASRC ASoC CPU DAI and platform drivers

2014-07-24 Thread Varka Bhadram
Hi Nicolin, On 07/25/2014 11:24 AM, Nicolin Chen wrote: Hi Varka, Regarding a point you suggested. On Fri, Jul 25, 2014 at 09:54:43AM +0530, Varka Bhadram wrote: On 07/25/2014 09:33 AM, Nicolin Chen wrote: (...) + +static const struct platform_device_id fsl_asrc_devtype[] = { + {

Re: [PATCH v3 2/2] ASoC: fsl_asrc: Add ASRC ASoC CPU DAI and platform drivers

2014-07-24 Thread Nicolin Chen
On Fri, Jul 25, 2014 at 11:47:42AM +0530, Varka Bhadram wrote: > Hi Nicolin, > > On 07/25/2014 11:24 AM, Nicolin Chen wrote: > >Hi Varka, > > > >Regarding a point you suggested. > > > >On Fri, Jul 25, 2014 at 09:54:43AM +0530, Varka Bhadram wrote: > >>On 07/25/2014 09:33 AM, Nicolin Chen wrote