[RFC PATCH v2] KVM: PPC: vfio kvm device: support spapr tce

2013-11-05 Thread Alexey Kardashevskiy
Signed-off-by: Alexey Kardashevskiy a...@ozlabs.ru --- Changes: v2: * it does not try to introduce a realmode search function. Instead, liobn-to-iommu-group lookup is done by VFIO KVM device in virtual mode and the result (iommu_group pointer) is cached in kvm_arch so the realmode handlers do not

[PATCH] powerpc: memcpy optimization for 64bit LE

2013-11-05 Thread Philippe Bergheaud
Unaligned stores take alignment exceptions on POWER7 running in little-endian. This is a dumb little-endian base memcpy that prevents unaligned stores. It is replaced by the VMX memcpy at boot. Signed-off-by: Philippe Bergheaud fe...@linux.vnet.ibm.com --- arch/powerpc/include/asm/string.h |

Re: [PATCH] net: mv643xx_eth: Add missing phy_addr_set in DT mode

2013-11-05 Thread Sebastian Hesselbarth
On 11/05/2013 01:27 AM, Jason Gunthorpe wrote: Commit cc9d4598 'net: mv643xx_eth: use of_phy_connect if phy_node present' made the call to phy_scan optional, if the DT has a link to the phy node. However phy_scan has the side effect of calling phy_addr_set, which writes the phy MDIO address to

Re: [PATCHv2 1/8] ALSA: Add SAI SoC Digital Audio Interface driver.

2013-11-05 Thread Timur Tabi
Li Xiubo wrote: But fsl-ssi.o and fsl-spdif.o is based PowrePC platform? Which we can see from the comments. fsl_ssi was originally PPC-only, but it now supports PPC and ARM. You can see that from the git history. If there are any comments that say PPC but are not PPC-specific, that

Re: [RFC] arch: Introduce new TSO memory barrier smp_tmb()

2013-11-05 Thread Will Deacon
On Mon, Nov 04, 2013 at 08:53:44PM +, Paul E. McKenney wrote: On Mon, Nov 04, 2013 at 08:11:27PM +0100, Peter Zijlstra wrote: Some comments below. I believe that opcodes need to be fixed for IA64. I am unsure of the ifdefs and opcodes for arm64, but the ARM folks should be able to tell

Re: [RFC] arch: Introduce new TSO memory barrier smp_tmb()

2013-11-05 Thread Paul E. McKenney
On Tue, Nov 05, 2013 at 02:05:48PM +, Will Deacon wrote: On Mon, Nov 04, 2013 at 08:53:44PM +, Paul E. McKenney wrote: On Mon, Nov 04, 2013 at 08:11:27PM +0100, Peter Zijlstra wrote: Some comments below. I believe that opcodes need to be fixed for IA64. I am unsure of the ifdefs

Re: [PATCH 4/7] IBM Akebono: Add support to the OHCI platform driver for Akebono

2013-11-05 Thread Alan Stern
On Tue, 5 Nov 2013, Alistair Popple wrote: The IBM Akebono board has a OHCI compliant USB host interface. This patch adds support for it to the OHCI platform driver. As we use device tree to pass platform specific data instead of platform data we remove the check for platform data and

Re: [PATCH 5/7] IBM Akebono: Add support to the EHCI platform driver for Akebono

2013-11-05 Thread Alan Stern
On Tue, 5 Nov 2013, Alistair Popple wrote: The IBM Akebono board has an EHCI compliant USB host interface. This patch adds support for it to the EHCI platform driver. Signed-off-by: Alistair Popple alist...@popple.id.au Cc: Alan Stern st...@rowland.harvard.edu Cc: linux-...@vger.kernel.org

Re: [PATCH 3/7] IBM Akebono: Add support for a new PHY to the IBM emac driver

2013-11-05 Thread Ben Hutchings
On Tue, 2013-11-05 at 16:31 +1100, Alistair Popple wrote: [...] --- a/drivers/net/ethernet/ibm/emac/Kconfig +++ b/drivers/net/ethernet/ibm/emac/Kconfig @@ -55,6 +55,10 @@ config IBM_EMAC_RGMII bool default n +config IBM_EMAC_RGMII_WOL + bool + default n + [...] So

Re: [RFC] arch: Introduce new TSO memory barrier smp_tmb()

2013-11-05 Thread Peter Zijlstra
On Tue, Nov 05, 2013 at 02:05:48PM +, Will Deacon wrote: + +#define smp_store_release(p, v) \ +do { \ + smp_mb();

Re: [PATCH 5/7] IBM Akebono: Add support to the EHCI platform driver for Akebono

2013-11-05 Thread Benjamin Herrenschmidt
On Tue, 2013-11-05 at 10:04 -0500, Alan Stern wrote: On Tue, 5 Nov 2013, Alistair Popple wrote: The IBM Akebono board has an EHCI compliant USB host interface. This patch adds support for it to the EHCI platform driver. Signed-off-by: Alistair Popple alist...@popple.id.au Cc: Alan

Re: [PATCH 3/7] IBM Akebono: Add support for a new PHY to the IBM emac driver

2013-11-05 Thread Benjamin Herrenschmidt
On Tue, 2013-11-05 at 18:16 +, Ben Hutchings wrote: On Tue, 2013-11-05 at 16:31 +1100, Alistair Popple wrote: [...] --- a/drivers/net/ethernet/ibm/emac/Kconfig +++ b/drivers/net/ethernet/ibm/emac/Kconfig @@ -55,6 +55,10 @@ config IBM_EMAC_RGMII bool default n +config

Re: [RFC PATCH v2] KVM: PPC: vfio kvm device: support spapr tce

2013-11-05 Thread Alex Williamson
On Tue, 2013-11-05 at 19:05 +1100, Alexey Kardashevskiy wrote: Signed-off-by: Alexey Kardashevskiy a...@ozlabs.ru --- Changes: v2: * it does not try to introduce a realmode search function. Instead, liobn-to-iommu-group lookup is done by VFIO KVM device in virtual mode and the result

Re: [PATCH] net: mv643xx_eth: Add missing phy_addr_set in DT mode

2013-11-05 Thread Sebastian Hesselbarth
On 11/05/2013 11:12 PM, Arnaud Ebalard wrote: Hi Jason, Jason Gunthorpe jguntho...@obsidianresearch.com writes: Commit cc9d4598 'net: mv643xx_eth: use of_phy_connect if phy_node present' made the call to phy_scan optional, if the DT has a link to the phy node. However phy_scan has the side

Re: [PATCH] net: mv643xx_eth: Add missing phy_addr_set in DT mode

2013-11-05 Thread Arnaud Ebalard
Hi Jason, Jason Gunthorpe jguntho...@obsidianresearch.com writes: Commit cc9d4598 'net: mv643xx_eth: use of_phy_connect if phy_node present' made the call to phy_scan optional, if the DT has a link to the phy node. However phy_scan has the side effect of calling phy_addr_set, which writes

Re: [PATCH 3/7] IBM Akebono: Add support for a new PHY to the IBM emac driver

2013-11-05 Thread Florian Fainelli
[snip] +/* RGMII bridge supports only GMII/TBI and RGMII/RTBI PHYs */ +static inline int rgmii_valid_mode(int phy_mode) +{ + return phy_mode == PHY_MODE_GMII || + phy_mode == PHY_MODE_MII || + phy_mode == PHY_MODE_RGMII || + phy_mode ==

Re: [PATCH] net: mv643xx_eth: Add missing phy_addr_set in DT mode

2013-11-05 Thread Jason Cooper
On Tue, Nov 05, 2013 at 11:12:00PM +0100, Arnaud Ebalard wrote: Hi Jason, Jason Gunthorpe jguntho...@obsidianresearch.com writes: Commit cc9d4598 'net: mv643xx_eth: use of_phy_connect if phy_node present' made the call to phy_scan optional, if the DT has a link to the phy node.

Re: [PATCH 3/7] IBM Akebono: Add support for a new PHY to the IBM emac driver

2013-11-05 Thread Ben Hutchings
On Wed, 2013-11-06 at 06:54 +1100, Benjamin Herrenschmidt wrote: On Tue, 2013-11-05 at 18:16 +, Ben Hutchings wrote: On Tue, 2013-11-05 at 16:31 +1100, Alistair Popple wrote: [...] --- a/drivers/net/ethernet/ibm/emac/Kconfig +++ b/drivers/net/ethernet/ibm/emac/Kconfig @@ -55,6

Re: [PATCH] net: mv643xx_eth: Add missing phy_addr_set in DT mode

2013-11-05 Thread Arnaud Ebalard
Hi, Sebastian Hesselbarth sebastian.hesselba...@gmail.com writes: On 11/05/2013 11:12 PM, Arnaud Ebalard wrote: Hi Jason, Jason Gunthorpe jguntho...@obsidianresearch.com writes: Commit cc9d4598 'net: mv643xx_eth: use of_phy_connect if phy_node present' made the call to phy_scan optional,

Re: [PATCH 3/7] IBM Akebono: Add support for a new PHY to the IBM emac driver

2013-11-05 Thread Alistair Popple
On Tue, 5 Nov 2013 10:47:22 Florian Fainelli wrote: [snip] +/* RGMII bridge supports only GMII/TBI and RGMII/RTBI PHYs */ +static inline int rgmii_valid_mode(int phy_mode) +{ + return phy_mode == PHY_MODE_GMII || + phy_mode == PHY_MODE_MII || +

Re: [PATCH 3/7] IBM Akebono: Add support for a new PHY to the IBM emac driver

2013-11-05 Thread Florian Fainelli
2013/11/5 Alistair Popple alist...@popple.id.au: On Tue, 5 Nov 2013 10:47:22 Florian Fainelli wrote: [snip] +/* RGMII bridge supports only GMII/TBI and RGMII/RTBI PHYs */ +static inline int rgmii_valid_mode(int phy_mode) +{ + return phy_mode == PHY_MODE_GMII || +

Re: [PATCH 3/7] IBM Akebono: Add support for a new PHY to the IBM emac driver

2013-11-05 Thread Alistair Popple
On Tue, 5 Nov 2013 23:11:50 Ben Hutchings wrote: On Wed, 2013-11-06 at 06:54 +1100, Benjamin Herrenschmidt wrote: [snip] It's an SoC bit so there's little point making it generally selectable by the user. I think a better way to do this is: config IBM_EMAC_RGMII_WOL bool IBM

Re: [PATCH 3/7] IBM Akebono: Add support for a new PHY to the IBM emac driver

2013-11-05 Thread Alistair Popple
On Tue, 5 Nov 2013 16:16:08 Florian Fainelli wrote: [snip] 2013/11/5 Alistair Popple alist...@popple.id.au: Any reasons why you are duplicating what is available in drivers/of/of_net.c ::of_get_phy_mode()? Unless I'm missing something of_get_phy_mode() is going the other way.

Re: [PATCH 3/7] IBM Akebono: Add support for a new PHY to the IBM emac driver

2013-11-05 Thread Benjamin Herrenschmidt
On Wed, 2013-11-06 at 12:38 +1100, Alistair Popple wrote: Right, rgmii_mode_name() just has informative purposes and should be removed, I would suggest using standard device tree bindings property (phy-mode) anyway such that you could use of_get_phy_mode() and use phy_interface_t types.

Re: [PATCH 3/7] IBM Akebono: Add support for a new PHY to the IBM emac driver

2013-11-05 Thread Florian Fainelli
2013/11/5 Benjamin Herrenschmidt b...@kernel.crashing.org: On Wed, 2013-11-06 at 12:38 +1100, Alistair Popple wrote: Right, rgmii_mode_name() just has informative purposes and should be removed, I would suggest using standard device tree bindings property (phy-mode) anyway such that you

RE: [PATCH V5 1/2] powerpc/85xx: Add QE common init function

2013-11-05 Thread Xiaobo Xie
Hi Scott, -Original Message- From: Wood Scott-B07421 Sent: Saturday, September 28, 2013 1:01 AM To: Xie Xiaobo-R63061 Cc: linuxppc-dev@lists.ozlabs.org Subject: Re: [PATCH V5 1/2] powerpc/85xx: Add QE common init function On Thu, 2013-09-26 at 17:37 +0800, Xie Xiaobo wrote:

RE: [PATCH V4 3/3] powerpc/85xx: Add TWR-P1025 board support

2013-11-05 Thread Xiaobo Xie
Hi Scott, -Original Message- From: Wood Scott-B07421 Sent: Friday, September 27, 2013 5:27 AM To: Xie Xiaobo-R63061 Cc: Wood Scott-B07421; linuxppc-dev@lists.ozlabs.org; Johnston Michael- R49610 Subject: Re: [PATCH V4 3/3] powerpc/85xx: Add TWR-P1025 board support + /*

[PATCH] powerpc/boot: Properly handle the base of boot wrapper

2013-11-05 Thread Benjamin Herrenschmidt
The wrapper script needs an explicit rule for the of boot wrapper (generic wrapper, similar to pseries). Before 0c9fa29149d3726e14262aeb0c8461a948cc9d56 it was hanlded implicitly by the statement: platformo=$object/$platform.o But now that epapr.o needs to be added, that doesn't work and an

RE: [PATCHv2 1/8] ALSA: Add SAI SoC Digital Audio Interface driver.

2013-11-05 Thread Li Xiubo
But fsl-ssi.o and fsl-spdif.o is based PowrePC platform? Which we can see from the comments. fsl_ssi was originally PPC-only, but it now supports PPC and ARM. You can see that from the git history. If there are any comments that say PPC but are not PPC-specific, that should be fixed.

Re: [PATCHv2 1/8] ALSA: Add SAI SoC Digital Audio Interface driver.

2013-11-05 Thread Timur Tabi
Li Xiubo wrote: If there are any comments that say PPC but are not PPC-specific, that should be fixed. Yes, find it. The comments is in sound/soc/fsl/Makefile : +++ # Freescale PowerPC SSI/DMA Platform Support --- But fsl-spdif.o is also under it. And this is also support ARM

Re: [PATCH 5/7] IBM Akebono: Add support to the EHCI platform driver for Akebono

2013-11-05 Thread Alistair Popple
On Wed, 6 Nov 2013 06:52:13 Benjamin Herrenschmidt wrote: [snip] Why ? Do we need to add an entry for every platform in there ? Besides, it probably should be the SoC name not the platform here Why not simply a generic compatible usb-ehci ? It's a standard programming interface,

RE: [PATCHv2 1/8] ALSA: Add SAI SoC Digital Audio Interface driver.

2013-11-05 Thread Li Xiubo
If there are any comments that say PPC but are not PPC-specific, that should be fixed. Yes, find it. The comments is in sound/soc/fsl/Makefile : +++ # Freescale PowerPC SSI/DMA Platform Support --- But fsl-spdif.o is also under it. And this is also support ARM

Re: [PATCH 5/7] IBM Akebono: Add support to the EHCI platform driver for Akebono

2013-11-05 Thread Benjamin Herrenschmidt
On Wed, 2013-11-06 at 14:50 +1100, Alistair Popple wrote: Actually a grep of usb-ehci turns up the ehci-ppc-of driver which I somehow missed. This driver works and uses .compatible = usb-ehci so I can use that instead if that is preferable? However it is basically the same as the

Re: [PATCH 1/3] powerpc/kvm: simplify the entering logic for secondary thread

2013-11-05 Thread Paul Mackerras
On Tue, Nov 05, 2013 at 03:42:42PM +0800, Liu Ping Fan wrote: After the primary vcpu changes vcore_state to VCORE_RUNNING, there is very little chance to schedule to secondary vcpu. So if we change the Why do you say there is very little chance to run the secondary vcpu? code sequence around

Re: [PATCH 2/3] powerpc/kvm: fix rare but potential deadlock scene

2013-11-05 Thread Paul Mackerras
On Tue, Nov 05, 2013 at 03:42:43PM +0800, Liu Ping Fan wrote: Since kvmppc_hv_find_lock_hpte() is called from both virtmode and realmode, so it can trigger the deadlock. Good catch, we should have preemption disabled while ever we have a HPTE locked. @@ -474,8 +474,10 @@ static int

Re: [PATCH 3/3] powerpc/kvm: remove redundant assignment

2013-11-05 Thread Paul Mackerras
On Tue, Nov 05, 2013 at 03:42:44PM +0800, Liu Ping Fan wrote: Signed-off-by: Liu Ping Fan pingf...@linux.vnet.ibm.com --- arch/powerpc/kvm/book3s_64_mmu_hv.c | 1 - 1 file changed, 1 deletion(-) diff --git a/arch/powerpc/kvm/book3s_64_mmu_hv.c b/arch/powerpc/kvm/book3s_64_mmu_hv.c index

RE: [PATCH v5 4/4] powerpc/85xx: add sysfs for pw20 state and altivec idle

2013-11-05 Thread Bharat Bhushan
-Original Message- From: Wang Dongsheng-B40534 Sent: Tuesday, November 05, 2013 8:40 AM To: Wood Scott-B07421 Cc: Bhushan Bharat-R65777; linuxppc-dev@lists.ozlabs.org Subject: RE: [PATCH v5 4/4] powerpc/85xx: add sysfs for pw20 state and altivec idle -Original

Re: [PATCH 2/3] powerpc/kvm: fix rare but potential deadlock scene

2013-11-05 Thread Liu ping fan
On Wed, Nov 6, 2013 at 1:04 PM, Paul Mackerras pau...@samba.org wrote: On Tue, Nov 05, 2013 at 03:42:43PM +0800, Liu Ping Fan wrote: Since kvmppc_hv_find_lock_hpte() is called from both virtmode and realmode, so it can trigger the deadlock. Good catch, we should have preemption disabled while

Re: [PATCH] powerpc: memcpy optimization for 64bit LE

2013-11-05 Thread Michael Neuling
Philippe Bergheaud fe...@linux.vnet.ibm.com wrote: Unaligned stores take alignment exceptions on POWER7 running in little-endian. This is a dumb little-endian base memcpy that prevents unaligned stores. It is replaced by the VMX memcpy at boot. Is this any faster than the generic version?

Re: [PATCH 1/3] powerpc/kvm: simplify the entering logic for secondary thread

2013-11-05 Thread Liu ping fan
On Wed, Nov 6, 2013 at 1:01 PM, Paul Mackerras pau...@samba.org wrote: On Tue, Nov 05, 2013 at 03:42:42PM +0800, Liu Ping Fan wrote: After the primary vcpu changes vcore_state to VCORE_RUNNING, there is very little chance to schedule to secondary vcpu. So if we change the Why do you say there

[RFC PATCH] ehci-platform: Merge ppc-of EHCI driver into the ehci-platform driver

2013-11-05 Thread Alistair Popple
Currently the ppc-of driver uses the compatibility string usb-ehci. This means platforms that use device-tree and implement an EHCI compatible interface have to either use the ppc-of driver or add a compatible line to the ehci-platform driver. It would be more appropriate for the platform driver

RE: [PATCH v5 4/4] powerpc/85xx: add sysfs for pw20 state and altivec idle

2013-11-05 Thread Dongsheng Wang
-Original Message- From: Bhushan Bharat-R65777 Sent: Wednesday, November 06, 2013 1:25 PM To: Wang Dongsheng-B40534; Wood Scott-B07421 Cc: linuxppc-dev@lists.ozlabs.org Subject: RE: [PATCH v5 4/4] powerpc/85xx: add sysfs for pw20 state and altivec idle -Original