Re: [PATCH v2 2/4] vfio: spapr: Fix build error

2014-08-05 Thread Gavin Shan
On Wed, Aug 06, 2014 at 04:33:29PM +1000, Alexey Kardashevskiy wrote: >On 08/06/2014 01:54 PM, Gavin Shan wrote: >> On Tue, Aug 05, 2014 at 09:12:50PM -0600, Alex Williamson wrote: >>> On Wed, 2014-08-06 at 12:48 +1000, Alexey Kardashevskiy wrote: From: Gavin Shan The VFIO related c

Re: [PATCH v2 2/4] vfio: spapr: Fix build error

2014-08-05 Thread Alexey Kardashevskiy
On 08/06/2014 01:54 PM, Gavin Shan wrote: > On Tue, Aug 05, 2014 at 09:12:50PM -0600, Alex Williamson wrote: >> On Wed, 2014-08-06 at 12:48 +1000, Alexey Kardashevskiy wrote: >>> From: Gavin Shan >>> >>> The VFIO related components could be built as dynamic modules. >>> Unfortunately, CONFIG_EEH c

linux-next: build failure after merge of the powerpc tree

2014-08-05 Thread Stephen Rothwell
Hi all, After merging the powerpc tree, today's linux-next build (powerpc allyesconfig) failed like this: arch/powerpc/kernel/exceptions-64s.S: Assembler messages: arch/powerpc/kernel/exceptions-64s.S:865: Error: attempt to move .org backwards arch/powerpc/kernel/exceptions-64s.S:866: Error: atte

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

2014-08-05 Thread Benjamin Herrenschmidt
On Wed, 2014-07-30 at 19:31 +1000, Alexey Kardashevskiy wrote: > > static int pnv_tce_build(struct iommu_table *tbl, long index, long npages, > -unsigned long uaddr, enum dma_data_direction > direction, > +unsigned long uaddr, unsigned long *old_t

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

2014-08-05 Thread Benjamin Herrenschmidt
On Wed, 2014-07-30 at 19:31 +1000, Alexey Kardashevskiy wrote: > > This adds a set_and_get() callback to iommu_table_ops which does the > same > thing as set() plus it returns replaced TCE(s) so the caller can > release > the pages afterwards. Call it xchg() instead of set_and_get(), it better re

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

2014-08-05 Thread Benjamin Herrenschmidt
On Wed, 2014-07-30 at 19:31 +1000, Alexey Kardashevskiy wrote: > + if (oldtce & (TCE_PCI_WRITE | TCE_PCI_READ)) > + put_page(pfn_to_page(__pa(oldtce) >> PAGE_SHIFT)); That probably needs set_page_dirty if TCE_PCI_WRITE is set Cheers, Ben.

[PATCH] powerpc: Add POWER8 features to CPU_FTRS_POSSIBLE/ALWAYS

2014-08-05 Thread Michael Ellerman
We have been a bit slack about updating the CPU_FTRS_POSSIBLE and CPU_FTRS_ALWAYS masks. When we added POWER8, and also POWER8E we forgot to update the ALWAYS mask. And when we added POWER8_DD1 we forgot to update both the POSSIBLE and ALWAYS masks. Luckily this hasn't caused any actual bugs AFAIC

Re: [PATCH 2/2] powerpc/nohash: Split __early_init_mmu() into boot and secondary

2014-08-05 Thread Benjamin Herrenschmidt
On Tue, 2014-08-05 at 19:48 -0500, Scott Wood wrote: > I'll do s/mmu_allcpus/this_mmu/ but early_init_mmu() needs to do things > both before and after early_init_mmu_common(). Do you want two new > functions (before and after) or is it OK to just rename > early_init_mmu_allcpus() and put a comment

Re: [PATCH v2 4/4] vfio_pci: spapr: Enable VFIO if EEH is not supported

2014-08-05 Thread Benjamin Herrenschmidt
On Tue, 2014-08-05 at 21:44 -0600, Alex Williamson wrote: > > ret = vfio_spapr_pci_eeh_open(vdev->pdev); > > - if (ret) { > > - vfio_pci_disable(vdev); > > - goto error; > > - } > > + if (ret) > > +

[PATCH] powerpc/ppc64: Print CPU/MMU/FW features at boot

2014-08-05 Thread Benjamin Herrenschmidt
Helps debug funky firmware issues Signed-off-by: Benjamin Herrenschmidt --- arch/powerpc/kernel/setup_64.c | 5 + 1 file changed, 5 insertions(+) diff --git a/arch/powerpc/kernel/setup_64.c b/arch/powerpc/kernel/setup_64.c index 93991ed..a06edf6 100644 --- a/arch/powerpc/kernel/setup_64.c +

Re: [PATCH v2 2/4] vfio: spapr: Fix build error

2014-08-05 Thread Gavin Shan
On Tue, Aug 05, 2014 at 09:12:50PM -0600, Alex Williamson wrote: >On Wed, 2014-08-06 at 12:48 +1000, Alexey Kardashevskiy wrote: >> From: Gavin Shan >> >> The VFIO related components could be built as dynamic modules. >> Unfortunately, CONFIG_EEH can't be configured to "m". The patch >> fixes the

Re: [PATCH v2 4/4] vfio_pci: spapr: Enable VFIO if EEH is not supported

2014-08-05 Thread Alex Williamson
On Wed, 2014-08-06 at 12:48 +1000, Alexey Kardashevskiy wrote: > The existing vfio_pci_open() fails if there is no EEH support for PCI. > This breaks POWER7's P5IOC2 PHB support which this patch brings back. > > It is a warning because this should not normally happen on supported > configurations

Re: [PATCH v2 2/4] vfio: spapr: Fix build error

2014-08-05 Thread Alex Williamson
On Wed, 2014-08-06 at 12:48 +1000, Alexey Kardashevskiy wrote: > From: Gavin Shan > > The VFIO related components could be built as dynamic modules. > Unfortunately, CONFIG_EEH can't be configured to "m". The patch > fixes the build errors when configuring VFIO related components > as dynamic mod

Re: [PATCH] ASoC: fsl_sai: Add asynchronous mode support

2014-08-05 Thread Nicolin Chen
Hi Varka, On Tue, Aug 05, 2014 at 04:44:29PM +0530, Varka Bhadram wrote: > On 08/05/2014 04:37 PM, Nicolin Chen wrote: > >Hi Varka, > > > >On Tue, Aug 05, 2014 at 04:29:50PM +0530, Varka Bhadram wrote: > >>>diff --git a/Documentation/devicetree/bindings/sound/fsl-sai.txt > >>>b/Documentation/devi

[PATCH v2 4/4] vfio_pci: spapr: Enable VFIO if EEH is not supported

2014-08-05 Thread Alexey Kardashevskiy
The existing vfio_pci_open() fails if there is no EEH support for PCI. This breaks POWER7's P5IOC2 PHB support which this patch brings back. It is a warning because this should not normally happen on supported configurations such as POWER8+IODA so we always want to see it in dmesg. It is _once() a

[PATCH v2 1/4] powerpc/eeh: Export eeh_iommu_group_to_pe()

2014-08-05 Thread Alexey Kardashevskiy
From: Gavin Shan The function is used by VFIO driver, which might be built as a dynamic module. Signed-off-by: Gavin Shan --- arch/powerpc/kernel/eeh.c | 1 + 1 file changed, 1 insertion(+) diff --git a/arch/powerpc/kernel/eeh.c b/arch/powerpc/kernel/eeh.c index 6043879..59a64f8 100644 --- a/

[PATCH v2 0/4] vfio: eeh: spapr: Compile and compatibility fixes

2014-08-05 Thread Alexey Kardashevskiy
Here is what I have in my stash which would be nice to have in 3.17. Alexey Kardashevskiy (2): vfio_spapr_eeh: Enable compile as a module vfio_pci: spapr: Enable VFIO if EEH is not supported Gavin Shan (2): powerpc/eeh: Export eeh_iommu_group_to_pe() vfio: spapr: Fix build error arch/po

[PATCH v2 2/4] vfio: spapr: Fix build error

2014-08-05 Thread Alexey Kardashevskiy
From: Gavin Shan The VFIO related components could be built as dynamic modules. Unfortunately, CONFIG_EEH can't be configured to "m". The patch fixes the build errors when configuring VFIO related components as dynamic modules as follows: CC [M] drivers/vfio/vfio_iommu_spapr_tce.o In file inc

[PATCH v2 3/4] vfio_spapr_eeh: Enable compile as a module

2014-08-05 Thread Alexey Kardashevskiy
This adds necessary declarations to the module, otherwise multiple dynamic linker errors happen: vfio_spapr_eeh: Unknown symbol eeh_pe_set_option (err 0) vfio_spapr_eeh: Unknown symbol eeh_pe_configure (err 0) vfio_spapr_eeh: Unknown symbol eeh_pe_reset (err 0) vfio_spapr_eeh: Unknown symbol eeh_p

Re: [PATCH] powerpc/powernv: Fix IOMMU group lost

2014-08-05 Thread Gavin Shan
On Wed, Aug 06, 2014 at 12:06:04PM +1000, Gavin Shan wrote: >On Wed, Aug 06, 2014 at 12:03:23AM +0800, Wei Yang wrote: >>I just give a shot with patch on PHB3 with hotplug case. From the functional >>point of view, it works. The iommu group is created and attached with device. >>While it still has

Re: [PATCH] powerpc/powernv: Fix IOMMU group lost

2014-08-05 Thread Gavin Shan
On Wed, Aug 06, 2014 at 12:03:23AM +0800, Wei Yang wrote: >I just give a shot with patch on PHB3 with hotplug case. From the functional >point of view, it works. The iommu group is created and attached with device. >While it still has the problem we had which commit 3f28c5a tried to solve. > >In th

Re: [PATCH] powerpc/powernv: Fix IOMMU group lost

2014-08-05 Thread Gavin Shan
On Tue, Aug 05, 2014 at 06:00:36PM +0800, Wei Yang wrote: >I didn't manage to test this one PHB3, since some network issue, I can't >access the machine in Austin. > >Will reply after I test this on PHB3. > Yep, thanks. By the way, I tested it on P7 box and looks good for partial/full hotplug cases

Re: [PATCH 2/2] powerpc/nohash: Split __early_init_mmu() into boot and secondary

2014-08-05 Thread Scott Wood
On Tue, 2014-08-05 at 14:36 +1000, Benjamin Herrenschmidt wrote: > On Fri, 2014-08-01 at 22:07 -0500, Scott Wood wrote: > > > > > -void __init early_init_mmu(void) > > -{ > > - __early_init_mmu(1); > > -} > > - > > void early_init_mmu_secondary(void) > > { > > - __early_init_mmu(0); > > +

[PATCH] powerpc/pseries/hvcserver: Fix endian issue in hvcs_get_partner_info

2014-08-05 Thread Thomas Falcon
A buffer returned by H_VTERM_PARTNER_INFO contains device information in big endian format, causing problems for little endian architectures. This patch ensures that they are in cpu endian. Signed-off-by: Thomas Falcon --- arch/powerpc/platforms/pseries/hvcserver.c | 4 ++-- 1 file changed, 2 in

Re: [PATCH] fsl-rio: add support for mapping inbound windows

2014-08-05 Thread Scott Wood
On Tue, 2014-08-05 at 15:52 +0200, Martijn de Gouw wrote: > Add support for mapping and unmapping of inbound rapidio windows. > > Signed-off-by: Martijn de Gouw Could you elaborate in the changelog on what this fixes or makes possible? E.g. did the driver previously not support inbound transact

Re: [PATCH 4/4] vfio_pci: spapr: Enable VFIO if EEH is not supported

2014-08-05 Thread Alex Williamson
On Tue, 2014-08-05 at 22:29 +1000, Alexey Kardashevskiy wrote: > The existing vfio_pci_open() fails if there is no EEH support for PCI. > This breaks POWER7's P5IOC2 PHB support which this patch brings back. > > Signed-off-by: Alexey Kardashevskiy > --- > drivers/vfio/pci/vfio_pci.c | 6 ++ >

Re: [PATCH] powerpc/powernv: Fix IOMMU group lost

2014-08-05 Thread Wei Yang
I just give a shot with patch on PHB3 with hotplug case. From the functional point of view, it works. The iommu group is created and attached with device. While it still has the problem we had which commit 3f28c5a tried to solve. In the test case, the pci bus is not removed. This means in pcibios_

Re: [PATCH] powerpc: non-GPL export for eeh_dev_check_failure

2014-08-05 Thread One Thousand Gnomes
On Tue, 05 Aug 2014 20:12:09 +0530 Vishal Mansur wrote: > EEH kernel services are inconsistently exported by the > kernel. eeh_check_failure is exported for any use, but > eeh_dev_check_failure is exported only for GPL use. > While eeh_check_failure is implemented for a specific > purpose to

[PATCH] powerpc: non-GPL export for eeh_dev_check_failure

2014-08-05 Thread Vishal Mansur
EEH kernel services are inconsistently exported by the kernel. eeh_check_failure is exported for any use, but eeh_dev_check_failure is exported only for GPL use. While eeh_check_failure is implemented for a specific purpose to be used by services such as readl, it is not suited for a purpose w

[PATCH] powerpc: non-GPL export for eeh_dev_check_failure

2014-08-05 Thread Vishal Mansur
EEH kernel services are inconsistently exported by the kernel. eeh_check_failure is exported for any use, but eeh_dev_check_failure is exported only for GPL use. While eeh_check_failure is implemented for a specific purpose to be used by services such as readl, it is not suited for a purpose w

Re: [PATCH 2/4] vfio: spapr: Fix build error

2014-08-05 Thread Alex Williamson
On Tue, 2014-08-05 at 22:29 +1000, Alexey Kardashevskiy wrote: > From: Gavin Shan > > The VFIO related components could be built as dynamic modules. > Unfortunately, CONFIG_EEH can't be configured to "m". The patch > fixes the build errors when configuring VFIO related components > as dynamic mod

[PATCH] fsl-rio: add support for mapping inbound windows

2014-08-05 Thread Martijn de Gouw
Add support for mapping and unmapping of inbound rapidio windows. Signed-off-by: Martijn de Gouw --- arch/powerpc/sysdev/fsl_rio.c | 104 + arch/powerpc/sysdev/fsl_rio.h | 13 ++ 2 files changed, 117 insertions(+) diff --git a/arch/powerpc/sysdev/f

Re: [PATCH] arch/powerpc/mm/numa.c: Fix break placement

2014-08-05 Thread Michael Ellerman
On Tue, 2014-08-05 at 19:16 +1000, Benjamin Herrenschmidt wrote: > On Mon, 2014-08-04 at 23:13 +0300, Andrey Utkin wrote: > > Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=81631 > > Reported-by: David Binderman > > Signed-off-by: Andrey Utkin > > Thanks, I wonder how that managed to rema

[PATCH 0/4] vfio: eeh: spapr: Compile and compatibility fixes

2014-08-05 Thread Alexey Kardashevskiy
Here is what I have in my stash. Alexey Kardashevskiy (2): vfio_spapr_eeh: Enable compile as a module vfio_pci: spapr: Enable VFIO if EEH is not supported Gavin Shan (2): powerpc/eeh: Export eeh_iommu_group_to_pe() vfio: spapr: Fix build error arch/powerpc/kernel/eeh.c | 1 + drive

[PATCH 1/4] powerpc/eeh: Export eeh_iommu_group_to_pe()

2014-08-05 Thread Alexey Kardashevskiy
From: Gavin Shan The function is used by VFIO driver, which might be built as a dynamic module. Signed-off-by: Gavin Shan --- arch/powerpc/kernel/eeh.c | 1 + 1 file changed, 1 insertion(+) diff --git a/arch/powerpc/kernel/eeh.c b/arch/powerpc/kernel/eeh.c index 6043879..59a64f8 100644 --- a/

[PATCH 4/4] vfio_pci: spapr: Enable VFIO if EEH is not supported

2014-08-05 Thread Alexey Kardashevskiy
The existing vfio_pci_open() fails if there is no EEH support for PCI. This breaks POWER7's P5IOC2 PHB support which this patch brings back. Signed-off-by: Alexey Kardashevskiy --- drivers/vfio/pci/vfio_pci.c | 6 ++ 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/drivers/vfio/

[PATCH 2/4] vfio: spapr: Fix build error

2014-08-05 Thread Alexey Kardashevskiy
From: Gavin Shan The VFIO related components could be built as dynamic modules. Unfortunately, CONFIG_EEH can't be configured to "m". The patch fixes the build errors when configuring VFIO related components as dynamic modules as follows: CC [M] drivers/vfio/vfio_iommu_spapr_tce.o In file inc

[PATCH 3/4] vfio_spapr_eeh: Enable compile as a module

2014-08-05 Thread Alexey Kardashevskiy
This adds necessary declarations to the module, otherwise multiple dynamic linker errors happen: vfio_spapr_eeh: Unknown symbol eeh_pe_set_option (err 0) vfio_spapr_eeh: Unknown symbol eeh_pe_configure (err 0) vfio_spapr_eeh: Unknown symbol eeh_pe_reset (err 0) vfio_spapr_eeh: Unknown symbol eeh_p

Re: [PATCH] ASoC: fsl_sai: Add asynchronous mode support

2014-08-05 Thread Varka Bhadram
On 08/05/2014 04:37 PM, Nicolin Chen wrote: Hi Varka, On Tue, Aug 05, 2014 at 04:29:50PM +0530, Varka Bhadram wrote: diff --git a/Documentation/devicetree/bindings/sound/fsl-sai.txt b/Documentation/devicetree/bindings/sound/fsl-sai.txt index 0f4e238..77864f4 100644 --- a/Documentation/devicetr

Re: [PATCH] ASoC: fsl_sai: Add asynchronous mode support

2014-08-05 Thread Nicolin Chen
Hi Varka, On Tue, Aug 05, 2014 at 04:29:50PM +0530, Varka Bhadram wrote: > >diff --git a/Documentation/devicetree/bindings/sound/fsl-sai.txt > >b/Documentation/devicetree/bindings/sound/fsl-sai.txt > >index 0f4e238..77864f4 100644 > >--- a/Documentation/devicetree/bindings/sound/fsl-sai.txt > >++

Re: [PATCH] ASoC: fsl_sai: Add asynchronous mode support

2014-08-05 Thread Varka Bhadram
On 08/05/2014 01:02 PM, Nicolin Chen wrote: From: Nicolin Chen SAI supports these operation modes: 1) asynchronous mode Both Tx and Rx are set to be asynchronous. 2) synchronous mode (Rx sync with Tx) Tx is set to be asynchronous, Rx is set to be synchronous. 3) synchronous mode (Tx syn

Re: [PATCH] powerpc/powernv: Fix IOMMU group lost

2014-08-05 Thread Wei Yang
I didn't manage to test this one PHB3, since some network issue, I can't access the machine in Austin. Will reply after I test this on PHB3. On Tue, Aug 05, 2014 at 06:27:38PM +1000, Gavin Shan wrote: >When we take full hotplug to recover from EEH errors, PCI buses >could be involved. For the cas

Re: [PATCH] arch/powerpc/mm/numa.c: Fix break placement

2014-08-05 Thread Benjamin Herrenschmidt
On Mon, 2014-08-04 at 23:13 +0300, Andrey Utkin wrote: > Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=81631 > Reported-by: David Binderman > Signed-off-by: Andrey Utkin Thanks, I wonder how that managed to remain unnoticed for so long ! Cheers, Ben. > --- > arch/powerpc/mm/numa.c | 2

[PATCH] ASoC: fsl_sai: Initialize with software reset

2014-08-05 Thread Nicolin Chen
This patch adds software reset code in dai_probe() so as to make a true init by clearing SAI's internal logic, including the bit clock generation, status flags, and FIFO pointers. Signed-off-by: Nicolin Chen --- sound/soc/fsl/fsl_sai.c | 9 +++-- sound/soc/fsl/fsl_sai.h | 1 + 2 files change

[PATCH] powerpc/powernv: Fix IOMMU group lost

2014-08-05 Thread Gavin Shan
When we take full hotplug to recover from EEH errors, PCI buses could be involved. For the case, the child devices of involved PCI buses can't be attached to IOMMU group properly, which is caused by commit 3f28c5a ("powerpc/powernv: Reduce multi-hit of iommu_add_device()"). When adding the PCI dev

Re: [PATCH 1/2 v3] bootmem/powerpc: Unify bootmem initialization

2014-08-05 Thread Emil Medve
Hello Anton, On 08/05/2014 02:25 AM, Anton Blanchard wrote: > Hi Emil, > >> Unify the low/highmem code path from do_init_bootmem() by using (the) >> lowmem related variables/parameters even when the low/highmem split >> is not needed (64-bit) or configured. In such cases the "lowmem" >> variable

[PATCH] ASoC: fsl_sai: Add asynchronous mode support

2014-08-05 Thread Nicolin Chen
From: Nicolin Chen SAI supports these operation modes: 1) asynchronous mode Both Tx and Rx are set to be asynchronous. 2) synchronous mode (Rx sync with Tx) Tx is set to be asynchronous, Rx is set to be synchronous. 3) synchronous mode (Tx sync with Rx) Rx is set to be asynchronous, Tx i

Re: Build regressions/improvements in v3.16

2014-08-05 Thread Geert Uytterhoeven
On Tue, Aug 5, 2014 at 9:16 AM, Geert Uytterhoeven wrote: > JFYI, when comparing v3.16[1] to v3.16-rc7[3], the summaries are: > - build errors: +3/-1 + error: tpm_ibmvtpm.c: undefined reference to `.__vio_register_driver': => .init.text+0x6950) + error: tpm_ibmvtpm.c: undefined reference

Re: [PATCH 1/2 v3] bootmem/powerpc: Unify bootmem initialization

2014-08-05 Thread Anton Blanchard
Hi Emil, > Unify the low/highmem code path from do_init_bootmem() by using (the) > lowmem related variables/parameters even when the low/highmem split > is not needed (64-bit) or configured. In such cases the "lowmem" > variables/parameters continue to observe the definition by referring > to memo