[PATCH v2 1/1] pseries: Make CPU hotplug path endian safe

2014-09-15 Thread bharata . rao
From: Bharata B Rao - ibm,rtas-configure-connector should treat the RTAS data as big endian. - Treat ibm,ppc-interrupt-server#s as big-endian when setting smp_processor_id during hotplug. Signed-off-by: Bharata B Rao Signed-off-by: Thomas Falcon --- Changes in v2: - Don't convert drc_index

[PATCH] powerpc/eeh: Fix kernel crash when passing through VF

2014-09-15 Thread Wei Yang
When doing vfio passthrough a VF, the kernel will crash with following message: [ 442.656459] Unable to handle kernel paging request for data at address 0x0060 [ 442.656593] Faulting instruction address: 0xc0038b88 [ 442.656706] Oops: Kernel access of bad area, sig: 11 [#1] [ 442.

Re: [PATCH v2 1/3] PCI/MSI/PPC: Remove arch_msi_check_device()

2014-09-15 Thread Alexander Gordeev
On Mon, Sep 15, 2014 at 12:42:50PM +1000, Michael Ellerman wrote: > On Sun, 2014-09-07 at 20:57 +0200, Alexander Gordeev wrote: > > Moving MSI checks from arch_msi_check_device() function to > > arch_setup_msi_irqs() function makes code more compact and > > allows removing unnecessary hook arch_msi

Re: [PATCH] powerpc/iommu/ddw: Fix endianness

2014-09-15 Thread Alexey Kardashevskiy
On 09/09/2014 09:22 PM, Alexey Kardashevskiy wrote: > rtas_call() accepts and returns values in CPU endianness. > > of_read_number() accepts big-endian values but create.addr_hi/lo returned > by rtas_call() are in CPU endiannes. > > The dynamic_dma_window_prop struct defines all members as BE so

Re: [PATCH] cpuidle/powernv: Enter fastsleep on checking if deep idle states are allowed

2014-09-15 Thread Preeti U Murthy
On 09/15/2014 12:29 PM, Michael Ellerman wrote: > On Fri, 2014-09-12 at 16:31 +0530, Preeti U Murthy wrote: >> Today the procfs interface /proc/sys/kernel/powersave-nap is used to control >> entry into deep idle states beyond snooze. Check for the value of this >> parameter before entering fastslee

Re: [PATCH] powerpc/iommu/ddw: Fix endianness

2014-09-15 Thread Michael Ellerman
On Mon, 2014-09-15 at 18:41 +1000, Alexey Kardashevskiy wrote: > On 09/09/2014 09:22 PM, Alexey Kardashevskiy wrote: > > rtas_call() accepts and returns values in CPU endianness. Sounds right. > > of_read_number() accepts big-endian values but create.addr_hi/lo returned > > by rtas_call() are in

Data Cache Push Parity Error

2014-09-15 Thread Jay_Chen
Hi all, I am using P2020 with Linux kernel 3.8.13. Sometimes my system encounters machine check exception and it shows “Caused by (from MCSR=2000): Data Cache Push Parity Error”. Could anyone show me some hints to dig into this issue? Any comment is welcome. Thanks in advance.

Re: [PATCH V3] ASoC: fsl_ssi: refine ipg clock usage in this module

2014-09-15 Thread Markus Pargmann
On Fri, Sep 12, 2014 at 06:35:15PM +0800, Shengjiu Wang wrote: > Check if ipg clock is in clock-names property, then we can move the > ipg clock enable and disable operation to startup and shutdown, that > is only enable ipg clock when ssi is working and keep clock is disabled > when ssi is in idle

Re: [PATCH V3] ASoC: fsl_ssi: refine ipg clock usage in this module

2014-09-15 Thread Shengjiu Wang
On Mon, Sep 15, 2014 at 12:05:41PM +0200, Markus Pargmann wrote: > On Fri, Sep 12, 2014 at 06:35:15PM +0800, Shengjiu Wang wrote: > > Check if ipg clock is in clock-names property, then we can move the > > ipg clock enable and disable operation to startup and shutdown, that > > is only enable ipg c

Re: [PATCH] powerpc/iommu/ddw: Fix endianness

2014-09-15 Thread Alexey Kardashevskiy
On 09/15/2014 07:18 PM, Michael Ellerman wrote: > On Mon, 2014-09-15 at 18:41 +1000, Alexey Kardashevskiy wrote: >> On 09/09/2014 09:22 PM, Alexey Kardashevskiy wrote: >>> rtas_call() accepts and returns values in CPU endianness. > > Sounds right. > >>> of_read_number() accepts big-endian values

Re: [PATCH V3] ASoC: fsl_ssi: refine ipg clock usage in this module

2014-09-15 Thread Markus Pargmann
On Mon, Sep 15, 2014 at 06:22:27PM +0800, Shengjiu Wang wrote: > On Mon, Sep 15, 2014 at 12:05:41PM +0200, Markus Pargmann wrote: > > On Fri, Sep 12, 2014 at 06:35:15PM +0800, Shengjiu Wang wrote: > > > Check if ipg clock is in clock-names property, then we can move the > > > ipg clock enable and d

Re: [PATCH V3] ASoC: fsl_ssi: refine ipg clock usage in this module

2014-09-15 Thread Shengjiu Wang
On Mon, Sep 15, 2014 at 12:32:13PM +0200, Markus Pargmann wrote: > On Mon, Sep 15, 2014 at 06:22:27PM +0800, Shengjiu Wang wrote: > > On Mon, Sep 15, 2014 at 12:05:41PM +0200, Markus Pargmann wrote: > > > On Fri, Sep 12, 2014 at 06:35:15PM +0800, Shengjiu Wang wrote: > > > > Check if ipg clock is i

Re: [PATCH] drivers: char: hw_random: printk replacement

2014-09-15 Thread Sudip Mukherjee
On Mon, Sep 15, 2014 at 07:41:23PM +0800, Herbert Xu wrote: > On Thu, Aug 28, 2014 at 08:32:58PM +0530, Sudip Mukherjee wrote: > > as pr_* macros are more preffered over printk, so printk replaced with > > corresponding pr_* macros > > > > Signed-off-by: Sudip Mukherjee > > Your patch doesn't e

Re: [PATCH] drivers: char: hw_random: printk replacement

2014-09-15 Thread Herbert Xu
On Thu, Aug 28, 2014 at 08:32:58PM +0530, Sudip Mukherjee wrote: > as pr_* macros are more preffered over printk, so printk replaced with > corresponding pr_* macros > > Signed-off-by: Sudip Mukherjee Your patch doesn't even build: CC [M] drivers/char/hw_random/intel-rng.o CC [M] drivers

Re: [PATCH] cpuidle/powernv: Enter fastsleep on checking if deep idle states are allowed

2014-09-15 Thread Benjamin Herrenschmidt
On Mon, 2014-09-15 at 14:22 +0530, Preeti U Murthy wrote: > > We were talking about getting rid of powersave_nap altogether, but I > think we > > decided we couldn't, I forget. > > Isn't this a helpful knob to disable cpuidle at runtime? Currently we > check the value of powersave_nap before enter

Re: [PATCH 1/4] powerpc/powernv: Add OPAL check token call

2014-09-15 Thread Benjamin Herrenschmidt
On Mon, 2014-09-15 at 13:10 +1000, Michael Ellerman wrote: > > +enum OpalCheckTokenStatus { > > + OPAL_TOKEN_ABSENT = 0, > > + OPAL_TOKEN_PRESENT = 1 > > +}; > > I don't see this used anywhere? > > And NoCamelCase ! > > Yes I know there's lots in that file, but I didn't merge that :)

Re: [PATCH V3] ASoC: fsl_ssi: refine ipg clock usage in this module

2014-09-15 Thread Markus Pargmann
On Mon, Sep 15, 2014 at 06:37:15PM +0800, Shengjiu Wang wrote: > On Mon, Sep 15, 2014 at 12:32:13PM +0200, Markus Pargmann wrote: > > On Mon, Sep 15, 2014 at 06:22:27PM +0800, Shengjiu Wang wrote: > > > On Mon, Sep 15, 2014 at 12:05:41PM +0200, Markus Pargmann wrote: > > > > On Fri, Sep 12, 2014 at

Re: [PATCH v1 03/21] MSI: Remove the redundant irq_set_chip_data()

2014-09-15 Thread Lucas Stach
Am Freitag, den 05.09.2014, 18:09 +0800 schrieb Yijing Wang: > Currently, pcie-designware, pcie-rcar, pci-tegra drivers > use irq chip_data to save the msi_chip pointer. They > already call irq_set_chip_data() in their own MSI irq map > functions. So irq_set_chip_data() in arch_setup_msi_irq() > is

Re: [PATCH v1 05/21] PCI/MSI: Introduce weak arch_find_msi_chip() to find MSI chip

2014-09-15 Thread Lucas Stach
Am Freitag, den 05.09.2014, 18:09 +0800 schrieb Yijing Wang: > Introduce weak arch_find_msi_chip() to find the match msi_chip. > Currently, MSI chip associates pci bus to msi_chip. Because in > ARM platform, there may be more than one MSI controller in system. > Associate pci bus to msi_chip help p

Re: [PATCH v1 06/21] PCI/MSI: Refactor struct msi_chip to make it become more common

2014-09-15 Thread Lucas Stach
Am Freitag, den 05.09.2014, 18:09 +0800 schrieb Yijing Wang: > Now there are a lot of __weak arch functions in MSI code. > These functions make MSI driver complex. Thierry Reding Introduced > a new MSI chip framework to configure MSI/MSI-X irq in ARM. Use > the new MSI chip framework to refactor al

Re: [PATCH v1 21/21] PCI/MSI: Clean up unused MSI arch functions

2014-09-15 Thread Lucas Stach
Am Freitag, den 05.09.2014, 18:10 +0800 schrieb Yijing Wang: > Now we use struct msi_chip in all platforms to configure > MSI/MSI-X. We can clean up the unused arch functions. > > Signed-off-by: Yijing Wang Reviewed-by: Lucas Stach > --- > drivers/iommu/irq_remapping.c |2 +- > drivers/pc

[PATCH v2] drivers: char: hw_random: printk replacement

2014-09-15 Thread Sudip Mukherjee
as pr_* macros are more preffered over printk, so printk replaced with corresponding pr_* macros Signed-off-by: Sudip Mukherjee --- The replacement was done by a bash script to avoid copy paste error. The script is as follows : OLD="printk(KERN_ERR \?" OLD1="printk(KERN_NOTICE \?" OLD2="print

[PATCH 0/5] pseries: Move memory hotplug to the kernel

2014-09-15 Thread Nathan Fontenot
In order to better support device hotplug (cpu, memory, and pci) in the PowerVM and PowerKVM environments, the handling of device hotplug could be updated so that the act of hotplugging a device occurs entirely in the kernel. This patch set begins to address this by moving memory hotplug to the ker

[PATCH 1/5] pseries: Define rtas hotplug event sections

2014-09-15 Thread Nathan Fontenot
In order to handle device hotplug in the kernel on pseries the hotplug notification will be communicated to the kernel in the form of a rtas hotplug event. This patch adds the definition of rtas hotplug event sections. Signed-off-by: Nathan Fontenot --- arch/powerpc/include/asm/rtas.h | 26 +++

[PATCH 2/5] pseries: Export drc_[acquire|release]_drc() routines

2014-09-15 Thread Nathan Fontenot
Export the routines to acquire and release a drc index. Signed-off-by: Nathan Fontenot --- arch/powerpc/platforms/pseries/pseries.h |2 ++ 1 file changed, 2 insertions(+) diff --git a/arch/powerpc/platforms/pseries/pseries.h b/arch/powerpc/platforms/pseries/pseries.h index 361add6..b94516b

[PATCH 3/5] pseries: Create device hotplug entry point

2014-09-15 Thread Nathan Fontenot
For pseries system the kernel will be notified of hotplug requests in the form of rtas hotplug events. This patch creates a common routine that can handle these requests in both the PowerVM anbd PowerKVM environments, handle_dlpar_errorlog(). This also creates the initial memory hotplug request han

[PATCH 4/5] pseries: Implement memory hotplug add in the kernel

2014-09-15 Thread Nathan Fontenot
This patch adds the ability to do memory hotplug adding in the kernel. Currently the hotplug add/remove of memory is handled by the drmgr command. The drmgr command performs the add/remove by performing some work in user-space and making requests to the kernel to handle other pieces. By moving al

[PATCH 5/5] pseries: Implement memory hotplug remove in the kernel

2014-09-15 Thread Nathan Fontenot
This patch adds the ability to do memory hotplug remove in the kernel. Currently the hotplug add/remove of memory is handled by the drmgr command. The drmgr command performs the add/remove by performing some work in user-space and making requests to the kernel to handle other pieces. By moving all

Re: [RFC PATCH] powerpc/numa: add ability to disable and debug topology updates

2014-09-15 Thread Nishanth Aravamudan
Hi Michael, On 15.09.2014 [15:05:36 +1000], Michael Ellerman wrote: > On Tue, 2014-09-09 at 13:09 -0700, Nishanth Aravamudan wrote: > > We have hit a few customer issues with the topology update code (VPHN > > and PRRN). It would be nice to be able to debug the notifications coming > > from the hy

[PATCH 0/2] powerpc/pseries: RTAS mobility fixes

2014-09-15 Thread Cyril Bur
This patchset addresses endian issues and bugs in device tree update for ibm,update-nodes and ibm,update-properties RTAS calls. A subseqent patchset will deal with issues in device tree node addition (ibm,configure-connector RTAS call) as well as more robust handling of deleting critical device tr

[PATCH 1/2] powerpc/pseries: fix endian bugs in mobility RTAS calls

2014-09-15 Thread Cyril Bur
These calls use a buffer shared memory buffer to comunicate device tree updates. PAPR specifies that RTAS buffers are to be written in big endian. Signed-off-by: Cyril Bur --- arch/powerpc/platforms/pseries/mobility.c | 50 --- 1 file changed, 26 insertions(+), 24 de

[PATCH 2/2] powerpc/pseries: fix bugs in RTAS mobility code

2014-09-15 Thread Cyril Bur
Running this code on a little endian machine has exposed some very unlikely corner cases. Most of these oversights will lead to a buffer overflow. Reworked some of the error pathes. It seems more sane to stop trying to parse a buffer on errors. Attempting to continue opens up the possibility of ov

[PATCH 1/2] powerpc: Add POWER8 CPU selection

2014-09-15 Thread Anton Blanchard
This allows the user to build a kernel targeted at POWER8 (ie gcc -mcpu=power8). Signed-off-by: Anton Blanchard --- Index: b/arch/powerpc/Makefile === --- a/arch/powerpc/Makefile +++ b/arch/powerpc/Makefile @@ -135,6 +135,7 @@ CFLAG

[PATCH 2/2] powerpc: Use CONFIG_ARCH_HAS_FAST_MULTIPLIER

2014-09-15 Thread Anton Blanchard
I ran some tests to compare hash_64 using shifts and multiplies. The results: POWER6: ~2x slower POWER7: ~2x faster POWER8: ~2x faster Now we have a proper config option, select CONFIG_ARCH_HAS_FAST_MULTIPLIER on POWER7 and POWER8. Signed-off-by: Anton Blanchard --- Index: b/arch/powerpc/platf

Re: [PATCH v1 03/21] MSI: Remove the redundant irq_set_chip_data()

2014-09-15 Thread Yijing Wang
On 2014/9/15 22:00, Lucas Stach wrote: > Am Freitag, den 05.09.2014, 18:09 +0800 schrieb Yijing Wang: >> Currently, pcie-designware, pcie-rcar, pci-tegra drivers >> use irq chip_data to save the msi_chip pointer. They >> already call irq_set_chip_data() in their own MSI irq map >> functions. So irq

Re: [PATCH v1 05/21] PCI/MSI: Introduce weak arch_find_msi_chip() to find MSI chip

2014-09-15 Thread Yijing Wang
On 2014/9/15 22:42, Lucas Stach wrote: > Am Freitag, den 05.09.2014, 18:09 +0800 schrieb Yijing Wang: >> Introduce weak arch_find_msi_chip() to find the match msi_chip. >> Currently, MSI chip associates pci bus to msi_chip. Because in >> ARM platform, there may be more than one MSI controller in sy

Re: [PATCH v1 06/21] PCI/MSI: Refactor struct msi_chip to make it become more common

2014-09-15 Thread Yijing Wang
On 2014/9/15 22:44, Lucas Stach wrote: > Am Freitag, den 05.09.2014, 18:09 +0800 schrieb Yijing Wang: >> Now there are a lot of __weak arch functions in MSI code. >> These functions make MSI driver complex. Thierry Reding Introduced >> a new MSI chip framework to configure MSI/MSI-X irq in ARM. Use

Re: [PATCH v1 21/21] PCI/MSI: Clean up unused MSI arch functions

2014-09-15 Thread Yijing Wang
On 2014/9/15 22:47, Lucas Stach wrote: > Am Freitag, den 05.09.2014, 18:10 +0800 schrieb Yijing Wang: >> Now we use struct msi_chip in all platforms to configure >> MSI/MSI-X. We can clean up the unused arch functions. >> >> Signed-off-by: Yijing Wang > > Reviewed-by: Lucas Stach Thanks! > >>

[PATCH V4] ASoC: fsl_ssi: refine ipg clock usage in this module

2014-09-15 Thread Shengjiu Wang
Check if ipg clock is in clock-names property, then we can move the ipg clock enable and disable operation to startup and shutdown, that is only enable ipg clock when ssi is working and keep clock is disabled when ssi is in idle. But when the checking is failed, remain the clock control as before.

Re: [PATCH] powerpc/eeh: Fix kernel crash when passing through VF

2014-09-15 Thread Michael Ellerman
On Mon, 2014-09-15 at 16:08 +0800, Wei Yang wrote: > This patch introduces a marco to convert eeh_dev to eeh_pe. By doing so, it > will prevent converting with NULL pointer. > > Signed-off-by: Wei Yang > Acked-by: Gavin Shan > > V2 -> V3: >1. rebased on 3.17-rc4 >2. introduce a marco >

Re: [PATCH] powerpc: Fix build failure

2014-09-15 Thread Alistair Popple
Thanks for fixing these! Acked-by: Alistair Popple On Thu, 21 Aug 2014 09:04:31 Pranith Kumar wrote: > Fix the following build failure > > drivers/built-in.o: In function `nhi_init': > nhi.c:(.init.text+0x63390): undefined reference to `ehci_init_driver' > > by adding a dependency on USB_EHCI_

Re: [PATCH] powerpc: Fix build failure when CONFIG_USB=y

2014-09-15 Thread Alistair Popple
Thanks for fixing these! Acked-by: Alistair Popple On Thu, 21 Aug 2014 09:16:04 Pranith Kumar wrote: > We are enabling USB unconditionally which results in following build failure > > drivers/built-in.o: In function `tb_drom_read': > (.text+0x1b62b70): undefined reference to `usb_speed_string'

Re: Data Cache Push Parity Error

2014-09-15 Thread Scott Wood
On Mon, 2014-09-15 at 08:15 +, jay_c...@alphanetworks.com wrote: > Hi all, > > > > I am using P2020 with Linux kernel 3.8.13. > > Sometimes my system encounters machine check exception and it shows > “Caused by (from MCSR=2000): Data Cache Push Parity Error”. > > Could anyone show me

Re: [PATCH v1 15/21] Powerpc/MSI: Use MSI chip framework to configure MSI/MSI-X irq

2014-09-15 Thread Michael Ellerman
On Fri, 2014-09-05 at 18:10 +0800, Yijing Wang wrote: > Use MSI chip framework instead of arch MSI functions to configure > MSI/MSI-X irq. So we can manage MSI/MSI-X irq in a unified framework. > > Signed-off-by: Yijing Wang This looks fine and seems to boot OK. Acked-by: Michael Ellerman (pow

Re: [PATCH v1 15/21] Powerpc/MSI: Use MSI chip framework to configure MSI/MSI-X irq

2014-09-15 Thread Yijing Wang
On 2014/9/16 13:28, Michael Ellerman wrote: > On Fri, 2014-09-05 at 18:10 +0800, Yijing Wang wrote: >> Use MSI chip framework instead of arch MSI functions to configure >> MSI/MSI-X irq. So we can manage MSI/MSI-X irq in a unified framework. >> >> Signed-off-by: Yijing Wang > > This looks fine an

Re: [PATCH] powerpc/eeh: Fix kernel crash when passing through VF

2014-09-15 Thread Wei Yang
On Tue, Sep 16, 2014 at 02:03:56PM +1000, Michael Ellerman wrote: >On Mon, 2014-09-15 at 16:08 +0800, Wei Yang wrote: >> This patch introduces a marco to convert eeh_dev to eeh_pe. By doing so, it >> will prevent converting with NULL pointer. >> >> Signed-off-by: Wei Yang >> Acked-by: Gavin Shan

Re: [PATCH v2 5/5] MSI: Use __read_msi_msg() instead of read_msi_msg()

2014-09-15 Thread Michael Ellerman
On Fri, 2014-08-22 at 16:08 +0800, Yijing Wang wrote: > Read_msi_msg() only be called in rtas_setup_msi_irqs(), > use __read_msi_msg() instead of read_msi_msg for > simplification. And rename __read_msi_msg() to > read_msi_msg(). > > Signed-off-by: Yijing Wang > CC: Benjamin Herrenschmidt > CC:

Re: [PATCH v2 5/5] MSI: Use __read_msi_msg() instead of read_msi_msg()

2014-09-15 Thread Yijing Wang
On 2014/9/16 14:34, Michael Ellerman wrote: > On Fri, 2014-08-22 at 16:08 +0800, Yijing Wang wrote: >> Read_msi_msg() only be called in rtas_setup_msi_irqs(), >> use __read_msi_msg() instead of read_msi_msg for >> simplification. And rename __read_msi_msg() to >> read_msi_msg(). >> >> Signed-off-by