Re: [PATCH] powerpc: fix typo 'CONFIG_PMAC'

2014-05-22 Thread Paul Bolle
Andreas, On Wed, 2014-05-21 at 18:08 +0200, Andreas Schwab wrote: Paul Bolle pebo...@tiscali.nl writes: Commit b0d278b7d3ae (powerpc/perf_event: Reduce latency of calling perf_event_do_pending) added a check for CONFIG_PMAC were a check for CONFIG_PPC_PMAC was clearly intended.

Re: [PATCH v5 3/4] drivers/vfio: EEH support for VFIO PCI device

2014-05-22 Thread Gavin Shan
On Thu, May 22, 2014 at 07:56:31AM +1000, Benjamin Herrenschmidt wrote: On Wed, 2014-05-21 at 15:07 +0200, Alexander Graf wrote: +#ifdef CONFIG_VFIO_PCI_EEH +int eeh_vfio_open(struct pci_dev *pdev) Why vfio? Also that config option will not be set if vfio is compiled as a module. +{

[PATCH v6 0/3] EEH Support for VFIO PCI device

2014-05-22 Thread Gavin Shan
The series of patches intends to support EEH for PCI devices, which are passed through to PowerKVM based guest via VFIO. The implementation is straightforward based on the issues or problems we have to resolve to support EEH for PowerKVM based guest. - Emulation for EEH RTAS requests. All EEH

[PATCH v6 1/3] powerpc/eeh: Flags for passed device and PE

2014-05-22 Thread Gavin Shan
The patch introduces new flags for EEH device and PE to indicate that the device or PE has been passed through to somebody else. In turn, we will deliver EEH errors to the device's owner for further handling, which will be done in subsequent patches. Signed-off-by: Gavin Shan

[PATCH v6 2/3] drivers/vfio: EEH support for VFIO PCI device

2014-05-22 Thread Gavin Shan
The patch adds new IOCTL commands for VFIO PCI device to support EEH functionality for PCI devices, which have been passed through from host to somebody else via VFIO. Signed-off-by: Gavin Shan gws...@linux.vnet.ibm.com --- Documentation/vfio.txt | 88 ++-

[PATCH v6 3/3] powerpc/eeh: Avoid event on passed PE

2014-05-22 Thread Gavin Shan
If we detects frozen state on PE that has been passed through to somebody else. we needn't handle it. Instead, we rely on the device's owner to detect and recover it. The patch avoid EEH event on the frozen passed PE so that the device's owner can have chance to handle that. Signed-off-by: Gavin

Re: [PATCH v4 09/11] powerpc/perf: add support for the hv 24x7 interface

2014-05-22 Thread Ian Munsie
Hi Cody, I just tried building this with gcc 4.5, which failed with the following warning (treated as an error): cc1: warnings being treated as errors arch/powerpc/perf/hv-24x7.c: In function 'single_24x7_request': arch/powerpc/perf/hv-24x7.c:346:1: error: the frame size of 8192 bytes is larger

powerpc: CONFIG_WSP_DD1_WORKAROUND_DD1_TCE_BUGS?

2014-05-22 Thread Paul Bolle
In v3.2 checks for CONFIG_WSP_DD1_WORKAROUND_DD1_TCE_BUGS and CONFIG_WSP_DD1_WORKAROUND_BAD_PCIE_CLASS were added to arch/powerpc/platforms/wsp/wsp_pci.c. The check for CONFIG_WSP_DD1_WORKAROUND_BAD_PCIE_CLASS was dropped again in v3.3. Neither of these macros have ever had a matching Kconfig

Re: [PATCH v6 2/3] drivers/vfio: EEH support for VFIO PCI device

2014-05-22 Thread Alexander Graf
On 22.05.14 10:23, Gavin Shan wrote: The patch adds new IOCTL commands for VFIO PCI device to support EEH functionality for PCI devices, which have been passed through from host to somebody else via VFIO. Signed-off-by: Gavin Shan gws...@linux.vnet.ibm.com This already looks a *lot* more

Re: [PATCH v6 3/3] powerpc/eeh: Avoid event on passed PE

2014-05-22 Thread Alexander Graf
On 22.05.14 10:23, Gavin Shan wrote: If we detects frozen state on PE that has been passed through to somebody else. we needn't handle it. Instead, we rely on the device's owner to detect and recover it. The patch avoid EEH event on the frozen passed PE so that the device's owner can have

Re: [PATCH 1/1] powerpc/perf: Adjust callchain based on DWARF debug

2014-05-22 Thread Jiri Olsa
On Tue, May 20, 2014 at 06:26:44PM -0700, Sukadev Bhattiprolu wrote: SNIP + * + * The value in LR is only needed when it holds a return address. If the + * return address is on the stack, we should ignore the LR value. + * + * Further, when the return address is in the LR, if a new frame

Re: [PATCH 1/1] powerpc/perf: Adjust callchain based on DWARF debug

2014-05-22 Thread Jiri Olsa
On Tue, May 20, 2014 at 06:26:44PM -0700, Sukadev Bhattiprolu wrote: SNIP + * TODO: + * Rather than returning an index into the callchain and have the + * caller skip that entry, we could modify the callchain in-place + * by putting a PERF_CONTEXT_IGNORE marker in the affected entry.

Re: powerpc: CONFIG_WSP_DD1_WORKAROUND_DD1_TCE_BUGS?

2014-05-22 Thread Benjamin Herrenschmidt
On Thu, 2014-05-22 at 11:09 +0200, Paul Bolle wrote: In v3.2 checks for CONFIG_WSP_DD1_WORKAROUND_DD1_TCE_BUGS and CONFIG_WSP_DD1_WORKAROUND_BAD_PCIE_CLASS were added to arch/powerpc/platforms/wsp/wsp_pci.c. The check for CONFIG_WSP_DD1_WORKAROUND_BAD_PCIE_CLASS was dropped again in v3.3.

Re: [PATCH RESEND 0/9 net-next] net: of_phy_connect_fixed_link removal

2014-05-22 Thread David Miller
Please address Sergei's feedback, except the indentation one which as you stated is correct. ___ Linuxppc-dev mailing list Linuxppc-dev@lists.ozlabs.org https://lists.ozlabs.org/listinfo/linuxppc-dev

[PATCH net-next v2 0/9] net: of_phy_connect_fixed_link removal

2014-05-22 Thread Florian Fainelli
Hi all, This patch set removes of_phy_connect_fixed_link() from the tree now that we have a better solution for dealing with fixed PHY (emulated PHY) devices for drivers that require them. First two patches update the 'fixed-link' Device Tree binding and drivers to refere to it. Patches 3 to 7

[PATCH net-next v2 1/9] Documentation: devicetree: add old and deprecated 'fixed-link'

2014-05-22 Thread Florian Fainelli
Update the fixed-link Device Tree binding documentation to contain information about the old and deprecated 5-digit 'fixed-link' property. Signed-off-by: Florian Fainelli f.faine...@gmail.com --- Changes in v2: - fixed typos and spelling mistakes as spotted by Sergei

[PATCH net-next v2 2/9] Documentation: devicetree: net: refer to fixed-link.txt

2014-05-22 Thread Florian Fainelli
Update the Freescale TSEC PHY, Broadcom GENET SYSTEMPORT Device Tree binding documentation to refer to the fixed-link Device Tree binding in fixed-link.txt. Reviewed-by: Thomas Petazzoni thomas.petazz...@free-electrons.com Signed-off-by: Florian Fainelli f.faine...@gmail.com --- No changes in v2

[PATCH net-next v2 3/9] net: bcmgenet: use the new fixed PHY helpers

2014-05-22 Thread Florian Fainelli
of_phy_connect_fixed_link() is becoming obsolete, and also required platform code to register the fixed PHYs at the specified addresses for those to be usable. Get rid of it and use the new of_phy_is_fixed_link() plus of_phy_register_fixed_link() helpers to transition over the new scheme.

[PATCH net-next v2 4/9] net: systemport: use the new fixed PHY helpers

2014-05-22 Thread Florian Fainelli
of_phy_connect_fixed_link() is becoming obsolete, and also required platform code to register the fixed PHYs at the specified addresses for those to be usable. Get rid of it and use the new of_phy_is_fixed_link() plus of_phy_register_fixed_link() helpers to transition over the new scheme.

[PATCH net-next v2 5/9] fs_enet: use the new fixed PHY helpers

2014-05-22 Thread Florian Fainelli
of_phy_connect_fixed_link() is becoming obsolete, and also required platform code to register the fixed PHYs at the specified addresses for those to be usable. Get rid of it and use the new of_phy_is_fixed_link() plus of_phy_register_fixed_link() helpers to transition over the new scheme.

[PATCH net-next v2 6/9] gianfar: use the new fixed PHY helpers

2014-05-22 Thread Florian Fainelli
of_phy_connect_fixed_link() is becoming obsolete, and also required platform code to register the fixed PHYs at the specified addresses for those to be usable. Get rid of it and use the new of_phy_is_fixed_link() plus of_phy_register_fixed_link() helpers to transition over the new scheme.

[PATCH net-next v2 7/9] ucc_geth: use the new fixed PHY helpers

2014-05-22 Thread Florian Fainelli
of_phy_connect_fixed_link() is becoming obsolete, and also required platform code to register the fixed PHYs at the specified addresses for those to be usable. Get rid of it and use the new of_phy_is_fixed_link() plus of_phy_register_fixed_link() helpers to transition over the new scheme.

[PATCH net-next v2 8/9] of: mdio: remove of_phy_connect_fixed_link

2014-05-22 Thread Florian Fainelli
All in-tree drivers have been converted to use the new pair of functions: of_is_fixed_phy_link() plus of_phy_register_fixed_link(), we can now safely remove of_phy_connect_fixed_link. Signed-off-by: Florian Fainelli f.faine...@gmail.com --- No changes in v2 drivers/of/of_mdio.c| 38

[PATCH net-next v2 9/9] powerpc/fsl: fsl_soc: remove 'fixed-link' parsing code

2014-05-22 Thread Florian Fainelli
Parsing and registration of fixed PHY devices was needed with the use of of_phy_connect_fixed_link() because this function was using the designated PHY address identifier (first cell of the property) as the address to bind the PHY on the emulated bus. Since commit

Re: [PATCH] powerpc: fix typo 'CONFIG_PMAC'

2014-05-22 Thread Andreas Schwab
Paul Bolle pebo...@tiscali.nl writes: Do you want to know how to test this patch on a 32 bit powermac? Ie, see if it has any effect, and whether that effect improves things or make things worse. Yes. Andreas. -- Andreas Schwab, sch...@linux-m68k.org GPG Key fingerprint = 58CA 54C7 6D53

Re: [PATCH 1/1] powerpc/perf: Adjust callchain based on DWARF debug

2014-05-22 Thread Sukadev Bhattiprolu
Jiri Olsa [jo...@redhat.com] wrote: | | yep, that sounds more clear to me.. something like below? | | calling callchain_dup from within arch_adjust_callchain in case | you want to change it and returning != 0 in this case, so | we could free the new callchain Agree. | | but it might be to

Re: [PATCH RESEND net-next 4/9] net: systemport: use the new fixed PHY helpers

2014-05-22 Thread Sergei Shtylyov
Hello. On 05/22/2014 02:02 AM, Florian Fainelli wrote: of_phy_connect_fixed_link() is becoming obsolete, and also required platform code to register the fixed PHYs at the specified addresses for those to be usable. Get rid of it and use the new of_phy_is_fixed_link() plus

Re: [PATCH net-next v2 0/9] net: of_phy_connect_fixed_link removal

2014-05-22 Thread David Miller
From: Florian Fainelli f.faine...@gmail.com Date: Thu, 22 May 2014 09:47:42 -0700 This patch set removes of_phy_connect_fixed_link() from the tree now that we have a better solution for dealing with fixed PHY (emulated PHY) devices for drivers that require them. First two patches update the

Re: NUMA topology question wrt. d4edc5b6

2014-05-22 Thread Srivatsa S. Bhat
[ Adding a few more CC's ] On 05/22/2014 01:34 AM, Nishanth Aravamudan wrote: Hi Srivatsa, After d4edc5b6 (powerpc: Fix the setup of CPU-to-Node mappings during CPU online), cpu_to_node() looks like: static inline int cpu_to_node(int cpu) { int nid; nid =

[PATCH 1/2] powerpc/e6500: hw tablewalk: clear TID in kernel indirect entries

2014-05-22 Thread Scott Wood
Previously TID was being cleared before the tlbsx, but not after. This can lead to a multiway hit between a TLB entry with TID=0 (previously inserted when PID=0) and a TLB entry with TID!=0 that matches PID. This can theoretically result in undefined behavior, though we probably get lucky due to

[PATCH 2/2] powerpc/e6500: hw tablewalk: fix recursive tlb lock on cpu 0

2014-05-22 Thread Scott Wood
Commit 82d86de25b9c99db546e17c6f7ebf9a691da557e TLB lock recursive introduced a bug whereby cpu 0 uses the same value for lock held as is used to indicate that the lock is free. This means that cpu 1 can acquire the lock whenever it wants, regardless of whether cpu 0 has it locked, which in turn

Re: [PATCH] powerpc: Don't corrupt user registers on 32-bit

2014-05-22 Thread shiva7
Paul Mackerras wrote Commit de79f7b9f6 (powerpc: Put FP/VSX and VR state into structures) modified load_up_fpu() and load_up_altivec() in such a way that they now use r7 and r8. Unfortunately, the callers of these functions on 32-bit machines then return to userspace via

[PATCH] arch: powerpc: kernel: fadump.c: Cleaning up inconsistent NULL checks

2014-05-22 Thread Rickard Strandqvist
Cleaning up inconsistent NULL checks. There is otherwise a risk of a possible null pointer dereference. Was largely found by using a static code analysis program called cppcheck. Signed-off-by: Rickard Strandqvist rickard_strandqv...@spectrumdigital.se --- arch/powerpc/kernel/fadump.c |8

Re: [PATCH v4 09/11] powerpc/perf: add support for the hv 24x7 interface

2014-05-22 Thread Cody P Schafer
On 05/22/2014 01:19 AM, Ian Munsie wrote: Hi Cody, I just tried building this with gcc 4.5, which failed with the following warning (treated as an error): cc1: warnings being treated as errors arch/powerpc/perf/hv-24x7.c: In function 'single_24x7_request': arch/powerpc/perf/hv-24x7.c:346:1:

[PATCH] powerpc/perf/hv-24x7: use kmem_cache instead of aligned stack allocations

2014-05-22 Thread Cody P Schafer
Ian pointed out the use of __aligned(4096) caused rather large stack consumption in single_24x7_request(), so use the kmem_cache hv_page_cache (which we've already got set up for other allocations) insead of allocating locally. Reported-by: Ian Munsie imun...@au1.ibm.com Signed-off-by: Cody P

Re: [PATCH] powerpc/perf/hv-24x7: use kmem_cache instead of aligned stack allocations

2014-05-22 Thread Stephen Rothwell
Hi Cody, On Thu, 22 May 2014 15:29:08 -0700 Cody P Schafer c...@linux.vnet.ibm.com wrote: - *res = be64_to_cpu(result_buffer.result); + *res = be64_to_cpu(result_buffer-result); + kfree(result_buffer); + kfree(request_buffer); + return ret; Why not just fall through

Re: [PATCH] powerpc/perf/hv-24x7: use kmem_cache instead of aligned stack allocations

2014-05-22 Thread Cody P Schafer
On 05/22/2014 03:38 PM, Stephen Rothwell wrote: Hi Cody, On Thu, 22 May 2014 15:29:08 -0700 Cody P Schafer c...@linux.vnet.ibm.com wrote: - *res = be64_to_cpu(result_buffer.result); + *res = be64_to_cpu(result_buffer-result); + kfree(result_buffer); +

[PATCH v2] powerpc/perf/hv-24x7: use kmem_cache instead of aligned stack allocations

2014-05-22 Thread Cody P Schafer
Ian pointed out the use of __aligned(4096) caused rather large stack consumption in single_24x7_request(), so use the kmem_cache hv_page_cache (which we've already got set up for other allocations) insead of allocating locally. Reported-by: Ian Munsie imun...@au1.ibm.com Signed-off-by: Cody P

Re: [2/2] powerpc/corenet64_smp_defconfig: enable RTC support

2014-05-22 Thread Scott Wood
On Wed, May 21, 2014 at 06:05:51PM +0800, Shengzhou Liu wrote: Enable RTC support for DS1307, DS1374, DS3232, which is needed on some corenet boards. Signed-off-by: Shengzhou Liu shengzhou@freescale.com --- arch/powerpc/configs/corenet64_smp_defconfig | 5 + 1 file changed, 5

Re: powerpc: remove checks for CONFIG_BOOK3E_MMU_TLB_STATS

2014-05-22 Thread Scott Wood
On Tue, May 20, 2014 at 07:55:50PM +0200, Paul Bolle wrote: Three checks for CONFIG_BOOK3E_MMU_TLB_STATS were added in v2.6.32. But the related Kconfig symbol was never added. These checks have always evaluated to false. Remove them. Signed-off-by: Paul Bolle pebo...@tiscali.nl ---

[PATCH 1/1][v3] powerpc/perf: Adjust callchain based on DWARF debug info

2014-05-22 Thread Sukadev Bhattiprolu
powerpc/perf: Adjust callchain based on DWARF debug info When saving the callchain on Power, the kernel conservatively saves excess entries in the callchain. A few of these entries are needed in some cases but not others. We should use the DWARF debug information to determine when the entries are

Re: [PATCH v2] powerpc/perf/hv-24x7: use kmem_cache instead of aligned stack allocations

2014-05-22 Thread Stephen Rothwell
Hi Cody, On Thu, 22 May 2014 15:44:25 -0700 Cody P Schafer c...@linux.vnet.ibm.com wrote: if (ret) { if (success_expected) pr_err_ratelimited(hcall failed: %d %#x %#x %d = 0x%lx (%ld) detail=0x%x failing ix=%x\n,

Re: [PATCH v2] powerpc/perf/hv-24x7: use kmem_cache instead of aligned stack allocations

2014-05-22 Thread Cody P Schafer
On 05/22/2014 04:49 PM, Stephen Rothwell wrote: Hi Cody, On Thu, 22 May 2014 15:44:25 -0700 Cody P Schafer c...@linux.vnet.ibm.com wrote: if (ret) { if (success_expected) pr_err_ratelimited(hcall failed: %d %#x %#x %d = 0x%lx (%ld) detail=0x%x

Re: [PATCH v6 3/3] powerpc/eeh: Avoid event on passed PE

2014-05-22 Thread Gavin Shan
On Thu, May 22, 2014 at 11:55:57AM +0200, Alexander Graf wrote: On 22.05.14 10:23, Gavin Shan wrote: If we detects frozen state on PE that has been passed through to somebody else. we needn't handle it. Instead, we rely on the device's owner to detect and recover it. The patch avoid EEH event on

Re: [PATCH v6 2/3] drivers/vfio: EEH support for VFIO PCI device

2014-05-22 Thread Gavin Shan
On Thu, May 22, 2014 at 11:55:29AM +0200, Alexander Graf wrote: On 22.05.14 10:23, Gavin Shan wrote: The patch adds new IOCTL commands for VFIO PCI device to support EEH functionality for PCI devices, which have been passed through from host to somebody else via VFIO. Signed-off-by: Gavin Shan

Re: [PATCH v2] powerpc/perf/hv-24x7: use kmem_cache instead of aligned stack allocations

2014-05-22 Thread Stephen Rothwell
Hi Cody, On Thu, 22 May 2014 16:54:07 -0700 Cody P Schafer c...@linux.vnet.ibm.com wrote: I've got a slight preference toward keeping it as is, which lets all of the non-error path code stay outside of if/else blocks (and the error handling is kept ever so slightly more consistent). No

Re: [PATCH v6 2/3] drivers/vfio: EEH support for VFIO PCI device

2014-05-22 Thread Gavin Shan
On Fri, May 23, 2014 at 10:17:30AM +1000, Gavin Shan wrote: On Thu, May 22, 2014 at 11:55:29AM +0200, Alexander Graf wrote: On 22.05.14 10:23, Gavin Shan wrote: .../... diff --git a/include/uapi/linux/vfio.h b/include/uapi/linux/vfio.h index cb9023d..ef55682 100644 ---

Re: [PATCH v6 2/3] drivers/vfio: EEH support for VFIO PCI device

2014-05-22 Thread Alex Williamson
On Thu, 2014-05-22 at 18:23 +1000, Gavin Shan wrote: The patch adds new IOCTL commands for VFIO PCI device to support EEH functionality for PCI devices, which have been passed through from host to somebody else via VFIO. Signed-off-by: Gavin Shan gws...@linux.vnet.ibm.com ---

Re: [PATCH v6 2/3] drivers/vfio: EEH support for VFIO PCI device

2014-05-22 Thread Alex Williamson
On Fri, 2014-05-23 at 10:37 +1000, Gavin Shan wrote: On Fri, May 23, 2014 at 10:17:30AM +1000, Gavin Shan wrote: On Thu, May 22, 2014 at 11:55:29AM +0200, Alexander Graf wrote: On 22.05.14 10:23, Gavin Shan wrote: .../... diff --git a/include/uapi/linux/vfio.h b/include/uapi/linux/vfio.h

Re: [PATCH v6 2/3] drivers/vfio: EEH support for VFIO PCI device

2014-05-22 Thread Gavin Shan
On Thu, May 22, 2014 at 09:10:53PM -0600, Alex Williamson wrote: On Thu, 2014-05-22 at 18:23 +1000, Gavin Shan wrote: The patch adds new IOCTL commands for VFIO PCI device to support EEH functionality for PCI devices, which have been passed through from host to somebody else via VFIO.

Re: [PATCH v6 2/3] drivers/vfio: EEH support for VFIO PCI device

2014-05-22 Thread Benjamin Herrenschmidt
On Fri, 2014-05-23 at 14:37 +1000, Gavin Shan wrote: There's no notification, the user needs to observe the return value an poll? Should we be enabling an eventfd to notify the user of the state change? Yes. The user needs to monitor the return value. we should have one notification,