Re: WARNING: CPU: 0 PID: 2777 at arch/powerpc/mm/hugetlbpage.c:354 h,ugetlb_free_pgd_range+0xc8/0x1e4

2017-12-22 Thread Christophe LEROY
Le 20/12/2017 à 13:17, Christophe LEROY a écrit : Trying to malloc() with libhugetlbfs, it runs indefinitly doing page faults in do_page_fault()/hugetlb_fault(). When interrupting the blocked app with CTRL+C, I get the following WARNING: Any idea of what can be wrong ? I'm on a 8xx with 512k

[PATCH] SB600 for the Nemo board has non-zero devices on non-root bus

2017-12-22 Thread Christian Zigotzky
Hi Bjorn, Sorry I'm bothering you again. Is this small out of tree init routine in the Nemo patch? I haven't get an answer from Darren yet and I didn't found the small out of tree init routine in the Nemo patch. Please find attached the Nemo patch. Maybe you can find this small out of tree ini

[PATCH] SB600 for the Nemo board has non-zero devices on non-root bus

2017-12-22 Thread Christian Zigotzky
I mean: I haven't gotten an answer from Darren yet. Sorry because of my English. I am still learning. -- Christian On 22 December 2017 at 10:57AM, Christian Zigotzky wrote: > Hi Bjorn, > > Sorry I'm bothering you again. Is this small out of tree init routine in the Nemo patch? I haven't get a

[GIT PULL] Please pull powerpc/linux.git powerpc-4.15-5 tag

2017-12-22 Thread Michael Ellerman
Hi Linus, Please pull some more powerpc fixes for 4.15. This is all fairly boring, except that there's two KVM fixes that you'd normally get via Paul's kvm-ppc tree. He's away so I picked them up. I was waiting to see if he would apply them, which is why they have only been in my tree since today

[PATCH 0/9] modernize early memory allocation limits and

2017-12-22 Thread Nicholas Piggin
This series improves (mostly relaxes) limits on early memory allocations for stacks, pacas, etc. on 64s. It also avoids allocating lppacas for bare metal, and it changes allocation of paca and lppaca from single big arrays to inividual allocations. The main goal of this is toward allocating these

[PATCH 1/9] powerpc/powernv: Remove real mode access limit for early allocations

2017-12-22 Thread Nicholas Piggin
This removes the RMA limit on powernv platform, which constrains early allocations such as PACAs and stacks. There are still other restrictions that must be followed, such as bolted SLB limits, but real mode addressing has no constraints. Signed-off-by: Nicholas Piggin --- arch/powerpc/mm/hash_u

[PATCH 2/9] powerpc/pseries: radix is not subject to RMA limit, remove it

2017-12-22 Thread Nicholas Piggin
The radix guest is not subject to the paravirtualized HPT VRMA limit, so remove that from ppc64_rma_size calculation for that platform. Signed-off-by: Nicholas Piggin --- arch/powerpc/mm/pgtable-radix.c | 11 --- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/arch/powerpc/

[PATCH 3/9] powerpc/64: rtas avoid accessing paca in 32-bit mode

2017-12-22 Thread Nicholas Piggin
Commit 177ba7c647f3 ("powerpc/mm/radix: Limit paca allocation in radix") limited the paca allocation address to 1G on pSeries because RTAS return accesses the paca in 32-bit mode: On return from RTAS we access the paca variables and we have 64 bit disabled. This requires us to limit paca i

[PATCH 4/9] powerpc/pseries: lift RTAS limit for radix

2017-12-22 Thread Nicholas Piggin
With the previous patch to switch to 64-bit mode after returning from RTAS and before doing any memory accesses, the RMA limit need not be clamped to 1GB to avoid RTAS bugs. Keep the 1GB limit for older firmware (although this is more of a kernel concern than RTAS), and remove it starting with POW

[PATCH 5/9] powerpc/pseries: lift RTAS limit for hash

2017-12-22 Thread Nicholas Piggin
With the previous patch to switch to 64-bit mode after returning from RTAS and before doing any memory accesses, the RMA limit need not be clamped to 1GB to avoid RTAS bugs. Keep the 1GB limit for older firmware (although this is more of a kernel concern than RTAS), and remove it starting with POW

[PATCH 6/9] powerpc/64s: Relax PACA address limitations

2017-12-22 Thread Nicholas Piggin
Book3S PACA memory allocation is restricted by the RMA limit and also must not take SLB faults when accessed in virtual mode. Currently a fixed 256MB limit is used for this, which is imprecise and sub-optimal. Update the paca allocation limits to use use the ppc64_rma_size for RMA limit, and share

[PATCH 7/9] powerpc/64s: do not allocate lppaca if we are not virtualized

2017-12-22 Thread Nicholas Piggin
The "lppaca" is a structure registered with the hypervisor. This is unnecessary when running on non-virtualised platforms. One field from the lppaca (pmcregs_in_use) is also used by the host, so move the host part out into the paca (lppaca field is still updated in guest mode). Signed-off-by: Nich

[PATCH 8/9] powerpc/64: Use array of paca pointers and allocate pacas individually

2017-12-22 Thread Nicholas Piggin
Change the paca array into an array of pointers to pacas. Allocate pacas individually. This allows flexibility in where the PACAs are allocated. Future work will allocate them node-local. Platforms that don't have address limits on PACAs would be able to defer PACA allocations until later in boot

[PATCH 9/9] powerpc/64s: Use array of lppaca pointers and allocate lppacas individually

2017-12-22 Thread Nicholas Piggin
Similary to the previous patch, allocate LPPACAs individually. We no longer allocate lppacas in an array, so this patch removes the 1kB static alignment for the structure, and enforce the PAPR alignment requirements at allocation time. We can not reduce the 1kB allocation size however, due to exis

Re: [PATCH] SB600 for the Nemo board has non-zero devices on non-root bus

2017-12-22 Thread Michael Ellerman
Christian Zigotzky writes: > Hi Bjorn, > > Sorry I'm bothering you again. Is this small out of tree init routine in > the Nemo patch? I haven't get an answer from Darren yet and I didn't > found the small out of tree init routine in the Nemo patch. Please find > attached the Nemo patch. Maybe

Re: [PATCH] KVM: PPC: Book3S: fix XIVE migration of pending interrupts

2017-12-22 Thread Michael Ellerman
Paul Mackerras writes: > On Fri, Dec 22, 2017 at 03:34:20PM +1100, Michael Ellerman wrote: >> Laurent Vivier writes: >> >> > On 12/12/2017 13:02, Cédric Le Goater wrote: >> >> When restoring a pending interrupt, we are setting the Q bit to force >> >> a retrigger in xive_finish_unmask(). But we

Re: [PATCH] KVM: PPC: Book3S: fix XIVE migration of pending interrupts

2017-12-22 Thread Michael Ellerman
Laurent Vivier writes: > On 22/12/2017 08:54, Paul Mackerras wrote: >> On Fri, Dec 22, 2017 at 03:34:20PM +1100, Michael Ellerman wrote: >>> Laurent Vivier writes: >>> On 12/12/2017 13:02, Cédric Le Goater wrote: > When restoring a pending interrupt, we are setting the Q bit to force >>

Re: KVM: PPC: Book3S: fix XIVE migration of pending interrupts

2017-12-22 Thread Michael Ellerman
On Tue, 2017-12-12 at 12:02:04 UTC, =?utf-8?q?C=C3=A9dric_Le_Goater?= wrote: > When restoring a pending interrupt, we are setting the Q bit to force > a retrigger in xive_finish_unmask(). But we also need to force an EOI > in this case to reach the same initial state : P=1, Q=0. > > This can be do

Re: KVM: PPC: Book3S HV: Fix pending_pri value in kvmppc_xive_get_icp()

2017-12-22 Thread Michael Ellerman
On Tue, 2017-12-12 at 17:23:56 UTC, Laurent Vivier wrote: > When we migrate a VM from a POWER8 host (XICS) to a POWER9 host > (XICS-on-XIVE), we have an error: > > qemu-kvm: Unable to restore KVM interrupt controller state \ > (0xff00) for CPU 0: Invalid argument > > This is because

Re: WARNING: CPU: 0 PID: 2777 at arch/powerpc/mm/hugetlbpage.c:354 h,ugetlb_free_pgd_range+0xc8/0x1e4

2017-12-22 Thread Christophe LEROY
Le 22/12/2017 à 10:32, Christophe LEROY a écrit : Le 20/12/2017 à 13:17, Christophe LEROY a écrit : Trying to malloc() with libhugetlbfs, it runs indefinitly doing page faults in do_page_fault()/hugetlb_fault(). When interrupting the blocked app with CTRL+C, I get the following WARNING: A

Re: [PATCH] KVM: PPC: Book3S: fix XIVE migration of pending interrupts

2017-12-22 Thread Greg Kurz
On Fri, 22 Dec 2017 22:22:08 +1100 Michael Ellerman wrote: > Paul Mackerras writes: > > > On Fri, Dec 22, 2017 at 03:34:20PM +1100, Michael Ellerman wrote: > >> Laurent Vivier writes: > >> > >> > On 12/12/2017 13:02, Cédric Le Goater wrote: > >> >> When restoring a pending interrupt, we

Re: [PATCH v5] powerpc/mm: Only read faulting instruction when necessary in do_page_fault()

2017-12-22 Thread Christophe LEROY
Hi Michael, Did you have a chance to have a look ? Christophe Le 08/08/2017 à 09:08, Christophe Leroy a écrit : Commit a7a9dcd882a67 ("powerpc: Avoid taking a data miss on every userspace instruction miss") has shown that limiting the read of faulting instruction to likely cases improves perfo

Re: [PATCH] powerpc/mm: Simplify _PAGE_RO handling in page table dump

2017-12-22 Thread Christophe LEROY
Ping ? Le 09/05/2017 à 16:16, Christophe Leroy a écrit : Commit fd893fe56a130 ("powerpc/mm: Fix missing page attributes in page table dump") added support of _PAGE_RO attribute. This patch makes it more simple Signed-off-by: Christophe Leroy --- arch/powerpc/mm/dump_linuxpagetables.c | 7 +-

[PATCH] SB600 for the Nemo board has non-zero devices on non-root bus

2017-12-22 Thread Christian Zigotzky
Hi Michael, Thanks a lot for your reply! :-) I have found two interesting lines in the device tree: compatible   "pasemi,nemo" model    "pasemi,nemo" What do you think? Please find attached the output of `lsprop /proc/device-tree`. Thanks, Christian On 22.12.2017 12:19, Michael

[PATCH v5 1/2] powerpc/powernv: Enable tunneled operations

2017-12-22 Thread Philippe Bergheaud
P9 supports PCI tunneled operations (atomics and as_notify). This patch adds support for tunneled operations on powernv, with a new API, to be called by device drivers: pnv_pci_get_tunnel_ind() Tell driver the 16-bit ASN indication used by kernel. pnv_pci_set_tunnel_bar() Tell kernel the Tu

[PATCH v5 2/2] cxl: read PHB indications from the device tree

2017-12-22 Thread Philippe Bergheaud
Configure the P9 XSL_DSNCTL register with PHB indications found in the device tree, or else use legacy hard-coded values. Signed-off-by: Philippe Bergheaud --- Changelog: v2: New patch. Use the new device tree property "ibm,phb-indications". v3: No change. v4: No functional change. Drop co

Re: [RFC PATCH 3/8] powerpc/64s: put the per-cpu data_offset in r14

2017-12-22 Thread Nicholas Piggin
On Wed, 20 Dec 2017 18:53:24 +0100 Gabriel Paubert wrote: > On Thu, Dec 21, 2017 at 12:52:01AM +1000, Nicholas Piggin wrote: > > Shifted left by 16 bits, so the low 16 bits of r14 remain available. > > This allows per-cpu pointers to be dereferenced with a single extra > > shift whereas previousl

Re: [PATCH 1/1] powerpc/pseries: Use the system workqueue as fallback to hotplug workqueue

2017-12-22 Thread joserz
On Fri, Dec 22, 2017 at 11:54:10AM +1100, David Gibson wrote: > On Thu, Dec 21, 2017 at 01:44:48PM -0200, Jose Ricardo Ziviani wrote: > > The hotplug engine uses its own workqueue to handle IRQ requests, the > > problem is that such workqueue is initialized not so early in the boot > > process. > >

Re: [RFC PATCH 4/8] powerpc/64s: put io_sync bit into r14

2017-12-22 Thread Thiago Jung Bauermann
Hello Nicholas, Just a small comment about syntax. I'm afraid I can't comment much about the substance of the patch. Nicholas Piggin writes: > diff --git a/arch/powerpc/include/asm/spinlock.h > b/arch/powerpc/include/asm/spinlock.h > index b9ebc3085fb7..182bb9304c79 100644 > --- a/arch/powerpc

Re: [PATCH] KVM: PPC: Book3S: fix XIVE migration of pending interrupts

2017-12-22 Thread Greg Kurz
On Fri, 22 Dec 2017 12:58:47 +0100 Greg Kurz wrote: > On Fri, 22 Dec 2017 22:22:08 +1100 > Michael Ellerman wrote: > > > Paul Mackerras writes: [...] > > > > > > Thanks for doing that. > > > > > > If you felt like merging Alexey's patch "KVM: PPC: Book3S PR: Fix WIMG > > > handling under pHyp"

[RFC PATCH for 4.16 03/11] powerpc: membarrier: Skip memory barrier in switch_mm() (v7)

2017-12-22 Thread Mathieu Desnoyers
Allow PowerPC to skip the full memory barrier in switch_mm(), and only issue the barrier when scheduling into a task belonging to a process that has registered to use expedited private. Threads targeting the same VM but which belong to different thread groups is a tricky case. It has a few consequ

Re: [RFC] macio airport how standard pccard?

2017-12-22 Thread Benjamin Herrenschmidt
On Fri, 2017-12-22 at 16:18 +0100, René Rebe wrote: > Hi all, > > I have a nice 1.2 GHz G4 Cube on my desk, and if I could somehow get USB 2 > into it, it would be way more useful as a “thin client” ;-) > > I was looking at the macio airport kernel glue, but could not immediately > figure out h

Re: [PATCH v3 0/3] create sysfs representation of ACPI HMAT

2017-12-22 Thread Ross Zwisler
On Thu, Dec 21, 2017 at 01:41:15AM +, Elliott, Robert (Persistent Memory) wrote: > > > > -Original Message- > > From: Linux-nvdimm [mailto:linux-nvdimm-boun...@lists.01.org] On Behalf Of > > Ross Zwisler > ... > > > > On Wed, Dec 20, 2017 at 10:19:37AM -0800, Matthew Wilcox wrote: >

Re: [PATCH v3 0/3] create sysfs representation of ACPI HMAT

2017-12-22 Thread Dan Williams
On Thu, Dec 21, 2017 at 12:31 PM, Brice Goglin wrote: > Le 20/12/2017 à 23:41, Ross Zwisler a écrit : [..] > Hello > > I can confirm that HPC runtimes are going to use these patches (at least > all runtimes that use hwloc for topology discovery, but that's the vast > majority of HPC anyway). > > W

Re: [PATCH v3 0/3] create sysfs representation of ACPI HMAT

2017-12-22 Thread Ross Zwisler
On Fri, Dec 22, 2017 at 02:53:42PM -0800, Dan Williams wrote: > On Thu, Dec 21, 2017 at 12:31 PM, Brice Goglin wrote: > > Le 20/12/2017 à 23:41, Ross Zwisler a écrit : > [..] > > Hello > > > > I can confirm that HPC runtimes are going to use these patches (at least > > all runtimes that use hwloc

Re: [PATCH v3 0/3] create sysfs representation of ACPI HMAT

2017-12-22 Thread Dan Williams
On Fri, Dec 22, 2017 at 3:22 PM, Ross Zwisler wrote: > On Fri, Dec 22, 2017 at 02:53:42PM -0800, Dan Williams wrote: >> On Thu, Dec 21, 2017 at 12:31 PM, Brice Goglin >> wrote: >> > Le 20/12/2017 à 23:41, Ross Zwisler a écrit : >> [..] >> > Hello >> > >> > I can confirm that HPC runtimes are goi

[RFC] macio airport how standard pccard?

2017-12-22 Thread René Rebe
Hi all, I have a nice 1.2 GHz G4 Cube on my desk, and if I could somehow get USB 2 into it, it would be way more useful as a “thin client” ;-) I was looking at the macio airport kernel glue, but could not immediately figure out how much standard pcmcia/cardbus that is. Is there any chance I cou

Re: [PATCH] powerpc: Add aacraid and nvme to powernv_defconfig

2017-12-22 Thread Alexey Kardashevskiy
On 20/12/17 13:14, Benjamin Herrenschmidt wrote: > On Wed, 2017-12-20 at 12:59 +1100, Alexey Kardashevskiy wrote: >> On 20/12/17 12:51, Benjamin Herrenschmidt wrote: >>> These adapters can be found in a number of our systems, so let's >>> enable the corresponding drivers by default. >>> >>> Signed-

Re: [PATCH v3 0/3] create sysfs representation of ACPI HMAT

2017-12-22 Thread Rafael J. Wysocki
On Sat, Dec 23, 2017 at 12:57 AM, Dan Williams wrote: > On Fri, Dec 22, 2017 at 3:22 PM, Ross Zwisler > wrote: >> On Fri, Dec 22, 2017 at 02:53:42PM -0800, Dan Williams wrote: >>> On Thu, Dec 21, 2017 at 12:31 PM, Brice Goglin >>> wrote: >>> > Le 20/12/2017 à 23:41, Ross Zwisler a écrit : >>> [

Re: [PATCH 04/17] mm: pass the vmem_altmap to arch_add_memory and __add_pages

2017-12-22 Thread Dan Williams
On Fri, Dec 15, 2017 at 6:09 AM, Christoph Hellwig wrote: > We can just pass this on instead of having to do a radix tree lookup > without proper locking 2 levels into the callchain. > > Signed-off-by: Christoph Hellwig [..] > diff --git a/kernel/memremap.c b/kernel/memremap.c > index 403ab9cdb94

Re: [PATCH 04/17] mm: pass the vmem_altmap to arch_add_memory and __add_pages

2017-12-22 Thread Dan Williams
On Fri, Dec 15, 2017 at 6:09 AM, Christoph Hellwig wrote: > We can just pass this on instead of having to do a radix tree lookup > without proper locking 2 levels into the callchain. > > Signed-off-by: Christoph Hellwig [..] > diff --git a/arch/x86/mm/init_64.c b/arch/x86/mm/init_64.c > index 8ac

Re: [PATCH] On ppc64le we HAVE_RELIABLE_STACKTRACE

2017-12-22 Thread Josh Poimboeuf
On Thu, Dec 21, 2017 at 11:10:46PM +1100, Michael Ellerman wrote: > Josh Poimboeuf writes: > > > On Tue, Dec 19, 2017 at 12:28:33PM +0100, Torsten Duwe wrote: > >> On Mon, Dec 18, 2017 at 12:56:22PM -0600, Josh Poimboeuf wrote: > >> > On Mon, Dec 18, 2017 at 03:33:34PM +1000, Nicholas Piggin wrot

Re: [PATCH] powerpc: Add aacraid and nvme to powernv_defconfig

2017-12-22 Thread Benjamin Herrenschmidt
On Sat, 2017-12-23 at 11:40 +1100, Alexey Kardashevskiy wrote: > On 20/12/17 13:14, Benjamin Herrenschmidt wrote: > > On Wed, 2017-12-20 at 12:59 +1100, Alexey Kardashevskiy wrote: > > > On 20/12/17 12:51, Benjamin Herrenschmidt wrote: > > > > These adapters can be found in a number of our systems,