[PATCH 2/2] powerpc/powernv: Rework EEH initialization on powernv

2017-09-06 Thread Benjamin Herrenschmidt
Remove the post_init callback which is only used by powernv, we can just call it explicitly from the powernv code. This partially kills the ability to "disable" eeh at runtime via debugfs as this was calling that same callback again, but this is both unused and broken in several ways. If we want t

[PATCH 1/2] powerpc/eeh: Create PHB PEs after EEH is initialized

2017-09-06 Thread Benjamin Herrenschmidt
Otherwise we end up not yet having computed the right diag data size on powernv where EEH initialization is delayed, thus causing memory corruption later on when calling OPAL. Signed-off-by: Benjamin Herrenschmidt --- arch/powerpc/kernel/eeh.c | 4 arch/powerpc/kernel/eeh_dev.c | 18 --

Re: [PATCH] powerpc/powernv: Increase memory block size to 1GB on radix

2017-09-06 Thread Anton Blanchard
Hi, > There is a similar issue being worked on w.r.t pseries. > > https://lkml.kernel.org/r/1502357028-27465-1-git-send-email-bhar...@linux.vnet.ibm.com > > The question is should we map these regions ? ie, we need to tell the > kernel memory region that we would like to hot unplug later so tha

Re: [PATCH] powerpc/powernv: Increase memory block size to 1GB on radix

2017-09-06 Thread Aneesh Kumar K.V
On 09/07/2017 10:35 AM, Anton Blanchard wrote: From: Anton Blanchard Memory hot unplug on PowerNV radix hosts is broken. Our memory block size is 256MB but since we map the linear region with very large pages, each pte we tear down maps 1GB. A hot unplug of one 256MB memory block results in

[PATCH] powerpc/powernv: Increase memory block size to 1GB on radix

2017-09-06 Thread Anton Blanchard
From: Anton Blanchard Memory hot unplug on PowerNV radix hosts is broken. Our memory block size is 256MB but since we map the linear region with very large pages, each pte we tear down maps 1GB. A hot unplug of one 256MB memory block results in 768MB of memory getting unintentionally unmapped. A

Re: [rfc 2/3] powerpc/mce: Extract physical_address for UE errors

2017-09-06 Thread Balbir Singh
On Thu, Sep 7, 2017 at 8:56 AM, Benjamin Herrenschmidt wrote: > On Tue, 2017-09-05 at 14:15 +1000, Balbir Singh wrote: >> void save_mce_event(struct pt_regs *regs, long handled, >> struct mce_error_info *mce_err, >> - uint64_t nip, uint64_t addr) >> +

Re: [rfc 2/3] powerpc/mce: Extract physical_address for UE errors

2017-09-06 Thread Benjamin Herrenschmidt
On Tue, 2017-09-05 at 14:15 +1000, Balbir Singh wrote: > void save_mce_event(struct pt_regs *regs, long handled, > struct mce_error_info *mce_err, > - uint64_t nip, uint64_t addr) > + uint64_t nip, uint64_t addr, uint64_t phys_addr) > { >

Re: Machine Check in P2010(e500v2)

2017-09-06 Thread Joakim Tjernlund
On Wed, 2017-09-06 at 21:13 +, Leo Li wrote: > > -Original Message- > > From: Joakim Tjernlund [mailto:joakim.tjernl...@infinera.com] > > Sent: Wednesday, September 06, 2017 3:54 PM > > To: linuxppc-dev@lists.ozlabs.org; Leo Li ; York Sun > > > > Subject: Re: Machine Check in P2010(e50

Re: [PATCH V13 4/4] powerpc/vphn: Fix numa update end-loop bug

2017-09-06 Thread Michael Bringmann
On 09/06/2017 09:45 AM, Nathan Fontenot wrote: > On 09/01/2017 10:48 AM, Michael Bringmann wrote: >> powerpc/vphn: On Power systems with shared configurations of CPUs >> and memory, there are some issues with the association of additional >> CPUs and memory to nodes when hot-adding resources. Th

Re: [PATCH] sound: soc: fsl: Do not set DAI sysclk when it is equal to system freq

2017-09-06 Thread Łukasz Majewski
On 09/06/2017 09:47 PM, Nicolin Chen wrote: On Wed, Sep 06, 2017 at 08:35:50PM +0200, Łukasz Majewski wrote: clocks = <&clks IMX6QDL_CLK_SSI2_IPG>, <&clks IMX6QDL_CLK_SSI2>; clock-names = "ipg", "baud"; dailink_master: cpu {

RE: Machine Check in P2010(e500v2)

2017-09-06 Thread Leo Li
> -Original Message- > From: Joakim Tjernlund [mailto:joakim.tjernl...@infinera.com] > Sent: Wednesday, September 06, 2017 3:54 PM > To: linuxppc-dev@lists.ozlabs.org; Leo Li ; York Sun > > Subject: Re: Machine Check in P2010(e500v2) > > On Wed, 2017-09-06 at 20:28 +, Leo Li wrote:

Re: Machine Check in P2010(e500v2)

2017-09-06 Thread Joakim Tjernlund
On Wed, 2017-09-06 at 20:28 +, Leo Li wrote: > > -Original Message- > > From: Joakim Tjernlund [mailto:joakim.tjernl...@infinera.com] > > Sent: Wednesday, September 06, 2017 3:17 PM > > To: linuxppc-dev@lists.ozlabs.org; Leo Li ; York Sun > > > > Subject: Re: Machine Check in P2010(e50

[RFC PATCH v3 1/1] powerpc: Add support for setting SPRN_TIDR

2017-09-06 Thread Sukadev Bhattiprolu
We need the SPRN_TIDR to be set for use with fast thread-wakeup (core- to-core wakeup) and also with CAPI. Each thread in a process needs to have a unique id within the process. But as explained below, for now, we assign globally unique thread ids to all threads in the system. Signed-off-by: Suk

RE: Machine Check in P2010(e500v2)

2017-09-06 Thread Leo Li
> -Original Message- > From: Joakim Tjernlund [mailto:joakim.tjernl...@infinera.com] > Sent: Wednesday, September 06, 2017 3:17 PM > To: linuxppc-dev@lists.ozlabs.org; Leo Li ; York Sun > > Subject: Re: Machine Check in P2010(e500v2) > > On Wed, 2017-09-06 at 19:31 +, Leo Li wrote:

Re: Machine Check in P2010(e500v2)

2017-09-06 Thread Joakim Tjernlund
On Wed, 2017-09-06 at 19:31 +, Leo Li wrote: > > -Original Message- > > From: York Sun > > Sent: Wednesday, September 06, 2017 10:38 AM > > To: Joakim Tjernlund ; linuxppc- > > d...@lists.ozlabs.org; Leo Li > > Subject: Re: Machine Check in P2010(e500v2) > > > > Scott is no longer wit

Re: [PATCH] sound: soc: fsl: Do not set DAI sysclk when it is equal to system freq

2017-09-06 Thread Nicolin Chen
On Wed, Sep 06, 2017 at 08:35:50PM +0200, Łukasz Majewski wrote: > clocks = <&clks IMX6QDL_CLK_SSI2_IPG>, ><&clks IMX6QDL_CLK_SSI2>; > clock-names = "ipg", "baud"; > >>dailink_master: cpu { > >>sound-dai = <&ssi2>; > >>

RE: Machine Check in P2010(e500v2)

2017-09-06 Thread Leo Li
> -Original Message- > From: York Sun > Sent: Wednesday, September 06, 2017 10:38 AM > To: Joakim Tjernlund ; linuxppc- > d...@lists.ozlabs.org; Leo Li > Subject: Re: Machine Check in P2010(e500v2) > > Scott is no longer with Freescale/NXP. Adding Leo. > > On 09/05/2017 01:40 AM, Joaki

RE: [PATCH] fsl_pci: Correct fsl_pci_mcheck_exception

2017-09-06 Thread Leo Li
> -Original Message- > From: York Sun > Sent: Wednesday, September 06, 2017 10:34 AM > To: Leo Li > Cc: Joakim Tjernlund ; linuxppc-dev linuxppc- > dev > Subject: Re: [PATCH] fsl_pci: Correct fsl_pci_mcheck_exception > > On 09/05/2017 04:59 AM, Joakim Tjernlund wrote: > > get_user() ha

Re: [PATCH] sound: soc: fsl: Do not set DAI sysclk when it is equal to system freq

2017-09-06 Thread Łukasz Majewski
Hi Nicolin, On Wed, Sep 06, 2017 at 11:22:48AM +0200, Łukasz Majewski wrote: Here is the routine that I understood from the code: 1) asoc_simple_card_parse_clk_cpu(dev, cpu, dai_link, cpu_dai); => asoc_simple_card_parse_clk(dev, cpu,// cpu node in sound{} [1]

Re: [PATCH] sound: soc: fsl: Do not set DAI sysclk when it is equal to system freq

2017-09-06 Thread Nicolin Chen
On Wed, Sep 06, 2017 at 11:22:48AM +0200, Łukasz Majewski wrote: > >Here is the routine that I understood from the code: > >1) asoc_simple_card_parse_clk_cpu(dev, cpu, dai_link, cpu_dai); > >=> asoc_simple_card_parse_clk(dev, cpu,// cpu node in sound{} [1] > >

Re: Machine Check in P2010(e500v2)

2017-09-06 Thread York Sun
Scott is no longer with Freescale/NXP. Adding Leo. On 09/05/2017 01:40 AM, Joakim Tjernlund wrote: > So after some debugging I found this bug: > @@ -996,7 +998,7 @@ int fsl_pci_mcheck_exception(struct pt_regs *regs) > if (is_in_pci_mem_space(addr)) { > if (user_mode(regs)

Re: [PATCH] fsl_pci: Correct fsl_pci_mcheck_exception

2017-09-06 Thread York Sun
On 09/05/2017 04:59 AM, Joakim Tjernlund wrote: > get_user() had it args reversed causing NIP to be NULL:ed instead > of fixing up the PCI access. > > Note: This still hangs my P1020 Freescale CPU hard, but at least > I get a NIP now. > > Signed-off-by: Joakim Tjernlund > --- > arch/powerpc/sy

UIO memmap of PCi devices not working?

2017-09-06 Thread Joakim Tjernlund
Having problems to mmap PCI UIO devices and stumbeled over this page: http://billfarrow.blogspot.se/2010/09/userspace-access-to-pci-memory.html it claims some adjustments are needed for UIO mmap over PCI to work. These are #if 0 ATM and trying to enable them fails build. Can this be fixed to at l

Re: [PATCH V13 4/4] powerpc/vphn: Fix numa update end-loop bug

2017-09-06 Thread Nathan Fontenot
On 09/01/2017 10:48 AM, Michael Bringmann wrote: > powerpc/vphn: On Power systems with shared configurations of CPUs > and memory, there are some issues with the association of additional > CPUs and memory to nodes when hot-adding resources. This patch > fixes an end-of-updates processing problem

Re: [PATCH V13 3/4] powerpc/hotplug: Improve responsiveness of hotplug change

2017-09-06 Thread Nathan Fontenot
On 09/01/2017 10:48 AM, Michael Bringmann wrote: > powerpc/hotplug: On Power systems with shared configurations of CPUs > and memory, there are some issues with the association of additional > CPUs and memory to nodes when hot-adding resources. During hotplug > CPU operations, this patch resets th

Re: [PATCH V13 2/4] powerpc/vphn: Improve recognition of PRRN/VPHN

2017-09-06 Thread Nathan Fontenot
On 09/01/2017 10:48 AM, Michael Bringmann wrote: > powerpc/vphn: On Power systems with shared configurations of CPUs > and memory, there are some issues with the association of additional > CPUs and memory to nodes when hot-adding resources. This patch > updates the initialization checks to inde

Re: [PATCH V13 1/4] powerpc/vphn: Update CPU topology when VPHN enabled

2017-09-06 Thread Nathan Fontenot
On 09/01/2017 10:48 AM, Michael Bringmann wrote: > powerpc/vphn: On Power systems with shared configurations of CPUs > and memory, there are some issues with the association of additional > CPUs and memory to nodes when hot-adding resources. This patch > corrects the currently broken capability to

Re: [PATCH] powerpc/powernv: Turn on SCSI_AACRAID in powernv_defconfig

2017-09-06 Thread Brian King
On 09/03/2017 06:19 PM, Stewart Smith wrote: > Michael Ellerman writes: >>> 2. On a bare metal machine, if you set ipr.fast_reboot=1 on the skiboot >>>kernel, then we should also avoid resetting the ipr adapter, so ipr >>>init on the kernel being kexec booted from skiboot should be extreme

Re: RCU lockup issues when CONFIG_SOFTLOCKUP_DETECTOR=n - any one else seeing this?

2017-09-06 Thread Paul E. McKenney
On Tue, Aug 22, 2017 at 08:26:37AM -0700, Paul E. McKenney wrote: > On Tue, Aug 22, 2017 at 02:21:32PM +0530, Abdul Haleem wrote: > > On Tue, 2017-08-22 at 08:49 +0100, Jonathan Cameron wrote: [ . . . ] > > No more RCU stalls on PowerPC, system is clean when idle or with some > > test runs. > >

Re: [PATCH] powerpc/powernv: Clear LPCR[PECE1] via stop-api only for deep state offline

2017-09-06 Thread pavrampu
On 2017-08-31 17:17, Gautham R. Shenoy wrote: From: "Gautham R. Shenoy" commit 24be85a23d1f ("powerpc/powernv: Clear PECE1 in LPCR via stop-api only on Hotplug") clears the PECE1 bit of the LPCR via stop-api during CPU-Hotplug to prevent wakeup due to a decrementer on an offlined CPU which is i

Re: powerpc/xive: Fix section __init warning

2017-09-06 Thread Michael Ellerman
On Mon, 2017-09-04 at 06:37:55 UTC, =?utf-8?q?C=C3=A9dric_Le_Goater?= wrote: > xive_spapr_init() is called from a __init routine and calls __init > routines. > > Signed-off-by: Cédric Le Goater Applied to powerpc next, thanks. https://git.kernel.org/powerpc/c/265601f034df3566f22da11240977a ch

Re: powerpc: Fix kernel crash in emulation of vector loads and stores

2017-09-06 Thread Michael Ellerman
On Mon, 2017-09-04 at 03:59:00 UTC, Paul Mackerras wrote: > Commit 350779a29f11 ("powerpc: Handle most loads and stores in > instruction emulation code", 2017-08-30) changed the register usage > in get_vr and put_vr with the aim of leaving the register number in > r3 untouched on return. Unfortuna

Re: powerpc/sstep: Avoid used uninitialized error

2017-09-06 Thread Michael Ellerman
On Fri, 2017-09-01 at 22:03:44 UTC, Michael Ellerman wrote: > Older compilers think val may be used uninitialized: > > arch/powerpc/lib/sstep.c: In function 'emulate_loadstore': > arch/powerpc/lib/sstep.c:2758:23: error: 'val' may be used uninitialized in > this function > > We know better,

Re: [v3, 1/8] powerpc/xive: introduce a common routine xive_queue_page_alloc()

2017-09-06 Thread Michael Ellerman
On Wed, 2017-08-30 at 19:46:10 UTC, =?utf-8?q?C=C3=A9dric_Le_Goater?= wrote: > This routine will be used in the spapr backend. Also introduce a short > xive_alloc_order() helper. > > Signed-off-by: Cédric Le Goater > Reviewed-by: David Gibson > Acked-by: Benjamin Herrenschmidt Series applied

[GIT PULL] Please pull powerpc/linux.git powerpc-4.14-1 tag

2017-09-06 Thread Michael Ellerman
Hi Linus, Please pull powerpc updates for 4.14. Slightly late pull request due to me travelling and only having spotty 3G 'net access. Hopefully everything is in order. No merge conflicts or anything that I'm aware of. The "since commit" below is a bit confused because I merged my fixes branch, t

Re: Machine Check in P2010(e500v2)

2017-09-06 Thread Joakim Tjernlund
On Wed, 2017-09-06 at 10:05 +, Laurentiu Tudor wrote: > Hi Jocke, > > On 09/01/2017 02:32 PM, Joakim Tjernlund wrote: > > I am trying to debug a Machine Check for a P2010 (e500v2) CPU: > > > > [ 28.111816] Caused by (from MCSR=10008): Bus - Read Data Bus Error > > [ 28.117998] Oops: Machi

Re: Machine Check in P2010(e500v2)

2017-09-06 Thread Laurentiu Tudor
Hi Jocke, On 09/01/2017 02:32 PM, Joakim Tjernlund wrote: > I am trying to debug a Machine Check for a P2010 (e500v2) CPU: > > [ 28.111816] Caused by (from MCSR=10008): Bus - Read Data Bus Error > [ 28.117998] Oops: Machine check, sig: 7 [#1] > [ 28.122263] P1010 RDB > [ 28.124529] Modules

Re: mpic IRQ_TYPE_BOTH handling

2017-09-06 Thread Laurentiu Tudor
On 08/31/2017 01:52 AM, Michael Ellerman wrote: > Hi Gregory, > > Gregory Fong writes: >> Hi all, >> >> In arch/powerpc/sysdev/mpic.c , it looks like IRQ_TYPE_EDGE_BOTH is >> handled the same way as IRQ_TYPE_EDGE_FALLING: >> >> static unsigned int mpic_type_to_vecpri(struct mpic *mpic, unsigned

Re: [PATCH] sound: soc: fsl: Do not set DAI sysclk when it is equal to system freq

2017-09-06 Thread Łukasz Majewski
Hi Nicolin, On Tue, Sep 05, 2017 at 11:13:40PM +0200, Łukasz Majewski wrote: They key point here is the asoc_simple_card_parse_clk() function from simple-card-utils.c Please look how the clock is assigned; It first checks for cpu clock, then for "system-clock-frequency" DTS node and _finally_

Re: [PATCH] sound: soc: fsl: Do not set DAI sysclk when it is equal to system freq

2017-09-06 Thread Łukasz Majewski
Hi Fabio, On Tue, Sep 5, 2017 at 6:13 PM, Łukasz Majewski wrote: &i2c1 { clock-frequency = <40>; pinctrl-names = "default"; pinctrl-0 = <&pinctrl_i2c1>; status = "okay"; codec: tfa9879@6C { #sound-dai-cells = <0>;