Re: [RFC][PATCH] powerpc/mm: convert tlbie to tlbiel when no batch is active

2017-04-17 Thread Aneesh Kumar K.V
Balbir Singh writes: > Do the checks that __flush_tlb_pending() does and check if > a local flush will do when batch->active is false inside of > hpte_need_flush(). I've checked the changes with tlbie tracing, > I see local flushes as applicable now and I've also run > some basic ltp testcases on

Re: [PATCH v6 03/11] powerpc/powernv: Detect supported IMC units and its events

2017-04-17 Thread Anju T Sudhakar
Hi Michael, On Thursday 13 April 2017 05:13 PM, Michael Ellerman wrote: Anju T Sudhakar writes: On Thursday 06 April 2017 02:07 PM, Stewart Smith wrote: Madhavan Srinivasan writes: --- a/arch/powerpc/platforms/powernv/opal-imc.c +++ b/arch/powerpc/platforms/powernv/opal-imc.c @@ -33,6 +33,

Re: [PATCH] powerpc/mm: some cleanup of do_page_fault()

2017-04-17 Thread Aneesh Kumar K.V
Christophe Leroy writes: > This patch is a bunch of small cleanups of the do_page_fault() > function: > 1/ Function store_updates_sp() checks whether the faulting > instruction is a store updating r1. Therefore we can limit its calls > to stores exceptions > 2/ Only the get_user() in store_update

Re: [PATCH 2/2] powerpc/book3s: mce: Use add_taint_no_warn() in machine_check_early().

2017-04-17 Thread Daniel Axtens
Hi Mahesh, > Fixes: 27ea2c420cad powerpc: Set the correct kernel taint on machine check > errors. I notice this Fixes a commit I introduced. Please could you cc me when you do this? I am likely to miss it otherwise, especially since I have now left IBM. Being cced allows me to provide an Ack or

Re: [PATCH 2/2] powerpc/book3s: mce: Use add_taint_no_warn() in machine_check_early().

2017-04-17 Thread Mahesh Jagannath Salgaonkar
On 04/17/2017 04:09 PM, Daniel Axtens wrote: > Hi Mahesh, > >> Fixes: 27ea2c420cad powerpc: Set the correct kernel taint on machine check >> errors. > > I notice this Fixes a commit I introduced. Please could you cc me when > you do this? I am likely to miss it otherwise, especially since I have

Re: [PATCH v10 4/4] PCI: Don't extend device's size when using default alignment for all devices

2017-04-17 Thread Yongji Xie
2017-04-15 6:54 GMT+08:00 Bjorn Helgaas : > On Mon, Apr 10, 2017 at 07:58:14PM +0800, Yongji Xie wrote: > > Currently we reassign the alignment by extending resources' size in > > pci_reassigndev_resource_alignment(). This could potentially break > > some drivers when the driver uses the size to l

[PATCH V2 0/5] powerpc/devtree: Add support for 'ibm, dynamic-memory-v2' property

2017-04-17 Thread Michael Bringmann
"ibm,dynamic-memory-v2": This property replaces the "ibm,dynamic-memory" node representation within the "ibm,dynamic-reconfiguration-memory" node provided by the BMC. This element format is intended to provide a more compact representation of memory, especially, for systems with massive amounts of

[PATCH V2 0/5] powerpc/devtree: Add support for 'ibm, dynamic-memory-v2' property

2017-04-17 Thread Michael Bringmann
"ibm,dynamic-memory-v2": This property replaces the "ibm,dynamic-memory" node representation within the "ibm,dynamic-reconfiguration-memory" node provided by the BMC. This element format is intended to provide a more compact representation of memory, especially, for systems with massive amounts of

[PATCH V2 0/5] powerpc/devtree: Add support for 'ibm, dynamic-memory-v2' property

2017-04-17 Thread Michael Bringmann
"ibm,dynamic-memory-v2": This property replaces the "ibm,dynamic-memory" node representation within the "ibm,dynamic-reconfiguration-memory" node provided by the BMC. This element format is intended to provide a more compact representation of memory, especially, for systems with massive amounts of

[PATCH V2 1/5] powerpc/dynmemv2: Check arch.vec earlier during boot for memory features

2017-04-17 Thread Michael Bringmann
architecture.vec5 features: The boot-time memory management needs to know the form of the "ibm,dynamic-memory-v2" property early during scanning of the flattened device tree. This patch moves execution of the function pseries_probe_fw_features() early enough to be before the scanning of the memory

[PATCH V2 3/5] powerpc/memory: Parse new memory property to initialize structures.

2017-04-17 Thread Michael Bringmann
powerpc/memory: Add parallel routines to parse the new property "ibm,dynamic-memory-v2" property when it is present, and then to finish initialization of the relevant memory structures with the operating system. This code is shared between the boot-time initialization functions and the runtime fun

[PATCH V2 5/5] powerpc: Enable support for new 'ibm, dynamic-memory-v2' devtree property

2017-04-17 Thread Michael Bringmann
prom_init.c: Enable support for new DRC device tree properties "ibm,dynamic-memory-v2" in initial handshake between the Linux kernel and the front end processor. Signed-off-by: Michael Bringmann --- arch/powerpc/kernel/prom_init.c |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --

[PATCH V2 4/5] pseries/hotplug init: Convert new DRC memory property for hotplug runtime

2017-04-17 Thread Michael Bringmann
hotplug_init: Simplify the code needed for runtime memory hotplug and maintenance with a conversion routine that transforms the compressed property "ibm,dynamic-memory-v2" to the form of "ibm,dynamic-memory" within the "ibm,dynamic-reconfiguration-memory" node. Thus only a single set of routines s

[PATCH V2 2/5] powerpc/memory: Parse new memory property to register blocks.

2017-04-17 Thread Michael Bringmann
powerpc/memory: Add parallel routines to parse the new property "ibm,dynamic-memory-v2" property when it is present, and then to register the relevant memory blocks with the operating system. This property format is intended to provide a more compact representation of memory when communicating with

Re: [PATCH v4] cxl: Force context lock during EEH flow

2017-04-17 Thread Matthew R. Ochs
> On Apr 5, 2017, at 6:35 AM, Vaibhav Jain wrote: > > During an eeh event when the cxl card is fenced and card sysfs attr > perst_reloads_same_image is set following warning message is seen in the > kernel logs: > > [ 60.622727] Adapter context unlocked with 0 active contexts > [ 60.622762]

[PATCH V2 0/5] powerpc/devtree: Add support for 'ibm, dynamic-memory-v2' property

2017-04-17 Thread Michael Bringmann
"ibm,dynamic-memory-v2": This property replaces the "ibm,dynamic-memory" node representation within the "ibm,dynamic-reconfiguration-memory" node provided by the BMC. This element format is intended to provide a more compact representation of memory, especially, for systems with massive amounts of

[PATCH V2 1/5] powerpc/dynmemv2: Check arch.vec earlier during boot for memory features

2017-04-17 Thread Michael Bringmann
architecture.vec5 features: The boot-time memory management needs to know the form of the "ibm,dynamic-memory-v2" property early during scanning of the flattened device tree. This patch moves execution of the function pseries_probe_fw_features() early enough to be before the scanning of the memory

[PATCH V2 3/5] powerpc/memory: Parse new memory property to initialize structures.

2017-04-17 Thread Michael Bringmann
powerpc/memory: Add parallel routines to parse the new property "ibm,dynamic-memory-v2" property when it is present, and then to finish initialization of the relevant memory structures with the operating system. This code is shared between the boot-time initialization functions and the runtime fun

[PATCH V2 4/5] pseries/hotplug init: Convert new DRC memory property for hotplug runtime

2017-04-17 Thread Michael Bringmann
hotplug_init: Simplify the code needed for runtime memory hotplug and maintenance with a conversion routine that transforms the compressed property "ibm,dynamic-memory-v2" to the form of "ibm,dynamic-memory" within the "ibm,dynamic-reconfiguration-memory" node. Thus only a single set of routines s

[PATCH V2 5/5] powerpc: Enable support for new 'ibm, dynamic-memory-v2' devtree property

2017-04-17 Thread Michael Bringmann
prom_init.c: Enable support for new DRC device tree properties "ibm,dynamic-memory-v2" in initial handshake between the Linux kernel and the front end processor. Signed-off-by: Michael Bringmann --- arch/powerpc/kernel/prom_init.c |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --

[PATCH V2 2/5] powerpc/memory: Parse new memory property to register blocks.

2017-04-17 Thread Michael Bringmann
powerpc/memory: Add parallel routines to parse the new property "ibm,dynamic-memory-v2" property when it is present, and then to register the relevant memory blocks with the operating system. This property format is intended to provide a more compact representation of memory when communicating with

Re: [PATCH v2 1/2] fadump: reduce memory consumption for capture kernel

2017-04-17 Thread Hari Bathini
On Friday 14 April 2017 01:28 AM, Michal Suchánek wrote: On Thu, 13 Apr 2017 01:59:13 +0530 Hari Bathini wrote: On Friday 07 April 2017 07:16 PM, Michael Ellerman wrote: Hari Bathini writes: On Friday 07 April 2017 07:24 AM, Michael Ellerman wrote: My preference would be that the fadump

Re: [PATCH v10 3/4] powerpc/powernv: Override pcibios_default_alignment() to force PCI devices to be page aligned

2017-04-17 Thread Bjorn Helgaas
On Sat, Apr 15, 2017 at 5:06 PM, Benjamin Herrenschmidt wrote: > On Sat, 2017-04-15 at 11:36 -0500, Bjorn Helgaas wrote: >> > I agree in principle. I'm surprised that PowerPC is the only one >> > interested here though, what about other platforms who want to use >> > KVM and PCI pass-through and u

Re: [PATCH v4] cxl: Force context lock during EEH flow

2017-04-17 Thread Uma Krishnan
On 4/5/2017 6:35 AM, Vaibhav Jain wrote: During an eeh event when the cxl card is fenced and card sysfs attr perst_reloads_same_image is set following warning message is seen in the kernel logs: [ 60.622727] Adapter context unlocked with 0 active contexts [ 60.622762] [ cut her

[PATCH 0/7] HugeTLB migration support for PPC64

2017-04-17 Thread Aneesh Kumar K.V
This patch series add support for hugetlb page migration. Aneesh Kumar K.V (6): mm/hugetlb/migration: Use set_huge_pte_at instead of set_pte_at mm/follow_page_mask: Split follow_page_mask to smaller functions. mm/hugetlb: export hugetlb_entry_migration helper mm/follow_page_mask: Add suppo

[PATCH 1/7] mm/hugetlb/migration: Use set_huge_pte_at instead of set_pte_at

2017-04-17 Thread Aneesh Kumar K.V
The right interface to use to set a hugetlb pte entry is set_huge_pte_at. Use that instead of set_pte_at. Signed-off-by: Aneesh Kumar K.V --- mm/migrate.c | 21 +++-- 1 file changed, 11 insertions(+), 10 deletions(-) diff --git a/mm/migrate.c b/mm/migrate.c index 9a0897a14d37..4

[PATCH 3/7] mm/hugetlb: export hugetlb_entry_migration helper

2017-04-17 Thread Aneesh Kumar K.V
We will be using this later from the ppc64 code. Change the return type to bool. Signed-off-by: Aneesh Kumar K.V --- include/linux/hugetlb.h | 1 + mm/hugetlb.c| 8 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/include/linux/hugetlb.h b/include/linux/hugetlb

[PATCH 2/7] mm/follow_page_mask: Split follow_page_mask to smaller functions.

2017-04-17 Thread Aneesh Kumar K.V
Makes code reading easy. No functional changes in this patch. In a followup patch, we will be updating the follow_page_mask to handle hugetlb hugepd format so that archs like ppc64 can switch to the generic version. This split helps in doing that nicely. Signed-off-by: Aneesh Kumar K.V --- mm/gu

[PATCH 5/7] mm/follow_page_mask: Add support for hugepage directory entry

2017-04-17 Thread Aneesh Kumar K.V
Architectures like ppc64 supports hugepage size that is not mapped to any of of the page table levels. Instead they add an alternate page table entry format called hugepage directory (hugepd). hugepd indicates that the page table entry maps to a set of hugetlb pages. Add support for this in generi

[PATCH 4/7] mm/follow_page_mask: Add support for hugetlb pgd entries.

2017-04-17 Thread Aneesh Kumar K.V
From: Anshuman Khandual ppc64 supports pgd hugetlb entries. Add code to handle hugetlb pgd entries to follow_page_mask so that ppc64 can switch to it to handle hugetlbe entries. Signed-off-by: Anshuman Khandual Signed-off-by: Aneesh Kumar K.V --- include/linux/hugetlb.h | 4 mm/gup.c

[PATCH 7/7] powerpc/hugetlb: Enable hugetlb migration for ppc64

2017-04-17 Thread Aneesh Kumar K.V
Signed-off-by: Aneesh Kumar K.V --- arch/powerpc/platforms/Kconfig.cputype | 5 + 1 file changed, 5 insertions(+) diff --git a/arch/powerpc/platforms/Kconfig.cputype b/arch/powerpc/platforms/Kconfig.cputype index f4ba4bf0d762..9fb075745c7f 100644 --- a/arch/powerpc/platforms/Kconfig.cputype

[PATCH 6/7] powerpc/hugetlb: Add follow_huge_pd implementation for ppc64.

2017-04-17 Thread Aneesh Kumar K.V
Signed-off-by: Aneesh Kumar K.V --- arch/powerpc/mm/hugetlbpage.c | 43 +++ 1 file changed, 43 insertions(+) diff --git a/arch/powerpc/mm/hugetlbpage.c b/arch/powerpc/mm/hugetlbpage.c index 80f6d2ed551a..5c829a83a4cc 100644 --- a/arch/powerpc/mm/hugetlbpag

[PATCH] powerpc/mm/hugetlb: Add support for 1G huge pages

2017-04-17 Thread Aneesh Kumar K.V
POWER9 supports hugepages of size 2M and 1G in radix MMU mode. This patch enables the usage of 1G page size for hugetlbfs. This also update the helper such we can do 1G page allocation at runtime. Since we can do this only when radix translation mode is enabled, we can't use the generic gigantic_p

Re: [PATCH 5/7] mm/follow_page_mask: Add support for hugepage directory entry

2017-04-17 Thread kbuild test robot
Hi Aneesh, [auto build test ERROR on linus/master] [also build test ERROR on v4.11-rc7 next-20170413] [if your patch is applied to the wrong git tree, please drop us a note to help improve the system] url: https://github.com/0day-ci/linux/commits/Aneesh-Kumar-K-V/HugeTLB-migration-support-fo

Re: [PATCH 5/7] mm/follow_page_mask: Add support for hugepage directory entry

2017-04-17 Thread kbuild test robot
Hi Aneesh, [auto build test ERROR on linus/master] [also build test ERROR on v4.11-rc7 next-20170413] [if your patch is applied to the wrong git tree, please drop us a note to help improve the system] url: https://github.com/0day-ci/linux/commits/Aneesh-Kumar-K-V/HugeTLB-migration-support-fo

Re: [PATCH V2 4/5] pseries/hotplug init: Convert new DRC memory property for hotplug runtime

2017-04-17 Thread Tyrel Datwyler
On 04/17/2017 08:04 AM, Michael Bringmann wrote: > hotplug_init: Simplify the code needed for runtime memory hotplug and > maintenance with a conversion routine that transforms the compressed > property "ibm,dynamic-memory-v2" to the form of "ibm,dynamic-memory" > within the "ibm,dynamic-reconfigur

Re: [PATCH] scsi: ibmvfc: don't check for failure from mempool_alloc()

2017-04-17 Thread Tyrel Datwyler
On 04/09/2017 07:15 PM, NeilBrown wrote: > > mempool_alloc() cannot fail when passed GFP_NOIO or any > other gfp setting that is permitted to sleep. > So remove this pointless code. > > Signed-off-by: NeilBrown Acked-by: Tyrel Datwyler > --- > drivers/scsi/ibmvscsi/ibmvfc.c | 6 -- > 1 f

[PATCH V3 0/5] powerpc/devtree: Add support for 'ibm, dynamic-memory-v2' property

2017-04-17 Thread Michael Bringmann
"ibm,dynamic-memory-v2": This property replaces the "ibm,dynamic-memory" node representation within the "ibm,dynamic-reconfiguration-memory" node provided by the BMC. This element format is intended to provide a more compact representation of memory, especially, for systems with massive amounts of

[PATCH V3 1/5] powerpc/dynmemv2: Check arch.vec earlier during boot for memory features

2017-04-17 Thread Michael Bringmann
architecture.vec5 features: The boot-time memory management needs to know the form of the "ibm,dynamic-memory-v2" property early during scanning of the flattened device tree. This patch moves execution of the function pseries_probe_fw_features() early enough to be before the scanning of the memory

[PATCH V3 0/5] powerpc/devtree: Add support for 'ibm, dynamic-memory-v2' property

2017-04-17 Thread Michael Bringmann
"ibm,dynamic-memory-v2": This property replaces the "ibm,dynamic-memory" node representation within the "ibm,dynamic-reconfiguration-memory" node provided by the BMC. This element format is intended to provide a more compact representation of memory, especially, for systems with massive amounts of

[PATCH V3 1/5] powerpc/dynmemv2: Check arch.vec earlier during boot for memory features

2017-04-17 Thread Michael Bringmann
architecture.vec5 features: The boot-time memory management needs to know the form of the "ibm,dynamic-memory-v2" property early during scanning of the flattened device tree. This patch moves execution of the function pseries_probe_fw_features() early enough to be before the scanning of the memory

[PATCH V3 2/5] powerpc/memory: Parse new memory property to register blocks.

2017-04-17 Thread Michael Bringmann
powerpc/memory: Add parallel routines to parse the new property "ibm,dynamic-memory-v2" property when it is present, and then to register the relevant memory blocks with the operating system. This property format is intended to provide a more compact representation of memory when communicating with

[PATCH V3 3/5] powerpc/memory: Parse new memory property to initialize structures.

2017-04-17 Thread Michael Bringmann
powerpc/memory: Add parallel routines to parse the new property "ibm,dynamic-memory-v2" property when it is present, and then to finish initialization of the relevant memory structures with the operating system. This code is shared between the boot-time initialization functions and the runtime fun

[PATCH V3 4/5] pseries/hotplug init: Convert new DRC memory property for hotplug runtime

2017-04-17 Thread Michael Bringmann
hotplug_init: Simplify the code needed for runtime memory hotplug and maintenance with a conversion routine that transforms the compressed property "ibm,dynamic-memory-v2" to the form of "ibm,dynamic-memory" within the "ibm,dynamic-reconfiguration-memory" node. Thus only a single set of routines s

[PATCH V3 5/5] powerpc: Enable support for new 'ibm, dynamic-memory-v2' devtree property

2017-04-17 Thread Michael Bringmann
prom_init.c: Enable support for new DRC device tree properties "ibm,dynamic-memory-v2" in initial handshake between the Linux kernel and the front end processor. Signed-off-by: Michael Bringmann --- arch/powerpc/kernel/prom_init.c |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --

Re: [PATCH v10 4/4] PCI: Don't extend device's size when using default alignment for all devices

2017-04-17 Thread Bjorn Helgaas
On Mon, Apr 17, 2017 at 1:27 AM, Yongji Xie wrote: > 2017-04-15 6:54 GMT+08:00 Bjorn Helgaas : >> >> On Mon, Apr 10, 2017 at 07:58:14PM +0800, Yongji Xie wrote: >> > Currently we reassign the alignment by extending resources' size in >> > pci_reassigndev_resource_alignment(). This could potentiall

[PATCH] soc/fsl/qbman: Disable IRQs for deferred QBMan work

2017-04-17 Thread Roy Pledge
Work for Congestion State Notifications (CSCN) and Message Ring (MR) handling is handled via the workqueue mechanism. This requires the driver to disable those IRQs before scheduling the work and re-enabling it once the work is completed so that the interrupt doesn't continually fire. Signed-off-b

[PATCH v11 0/7] PCI: Introduce a way to enforce all MMIO BARs not to share PAGE_SIZE

2017-04-17 Thread Bjorn Helgaas
This is another iteration on Yongji's series to force MMIO BARs not to share pages, which allows direct passthrough instead of QEMU emulation. The only things I really changed were to add some comments and factor out the code that requests resize. I also pulled in the IOV patch, which touches the

[PATCH v11 1/7] PCI: Ignore requested alignment for IOV BARs

2017-04-17 Thread Bjorn Helgaas
From: Yongji Xie We would call pci_reassigndev_resource_alignment() before pci_init_capabilities(). So the requested alignment would never work for IOV BARs. Furthermore, it's meaningless to request additional alignment for IOV BARs, the IOV BAR alignment is only determined by the VF BAR size.

[PATCH v11 2/7] PCI: A fix for caculating bridge window's size and alignment

2017-04-17 Thread Bjorn Helgaas
From: Yongji Xie In case that one device's alignment is greater than its size, we may get an incorrect size and alignment for its bus's memory window in pbus_size_mem(). This patch fixes this case. Signed-off-by: Yongji Xie Signed-off-by: Bjorn Helgaas --- drivers/pci/setup-bus.c |4 ++--

[PATCH v11 3/7] PCI: Add pcibios_default_alignment() for arch-specific alignment control

2017-04-17 Thread Bjorn Helgaas
From: Yongji Xie When VFIO passes through a PCI device to a guest, it does not allow the guest to mmap BARs that are smaller than PAGE_SIZE unless it can reserve the rest of the page (see vfio_pci_probe_mmaps()). This is because a page might contain several small BARs for unrelated devices and a

[PATCH v11 4/7] powerpc/powernv: Override pcibios_default_alignment() to force PCI devices to be page aligned

2017-04-17 Thread Bjorn Helgaas
From: Yongji Xie This overrides pcibios_default_alignment() to set default alignment to PAGE_SIZE for all PCI devices on PowerNV platform. Thus sub-page BARs would not share a page and could be mapped into guest when VFIO passthrough them. Signed-off-by: Yongji Xie Signed-off-by: Bjorn Helgaas

[PATCH v11 5/7] PCI: Factor pci_reassigndev_resource_alignment()

2017-04-17 Thread Bjorn Helgaas
Pull the BAR size adjustment out into a new function, pci_request_resource_alignment(), and add a comment about how and why we increase the resource size and alignment. Signed-off-by: Bjorn Helgaas --- drivers/pci/pci.c | 67 - 1 file changed

[PATCH v11 6/7] PCI: Don't reassign resources that are already aligned

2017-04-17 Thread Bjorn Helgaas
The "pci=resource_alignment=" kernel argument designates devices for which we want alignment greater than is required by the PCI specs. Previously we set IORESOURCE_UNSET for every MEM resource of those devices, even if the resource was *already* sufficiently aligned. If a resource is already suf

[PATCH v11 7/7] PCI: Don't resize resources when realigning all devices in system

2017-04-17 Thread Bjorn Helgaas
From: Yongji Xie The "pci=resource_alignment" argument aligns BARs of designated devices by artificially increasing their size. Increasing the size increases the alignment and prevents other resources from being assigned in the same alignment region, e.g., in the same page, but it can break driv

Re: [PATCH v11 2/7] PCI: A fix for caculating bridge window's size and alignment

2017-04-17 Thread Yinghai Lu
On Mon, Apr 17, 2017 at 2:36 PM, Bjorn Helgaas wrote: > From: Yongji Xie > > In case that one device's alignment is greater than its size, > we may get an incorrect size and alignment for its bus's memory > window in pbus_size_mem(). This patch fixes this case. In which case, that device alignme

[PATCH v2 tip/core/rcu 02/39] rcu: Make arch select smp_mb__after_unlock_lock() strength

2017-04-17 Thread Paul E. McKenney
The definition of smp_mb__after_unlock_lock() is currently smp_mb() for CONFIG_PPC and a no-op otherwise. It would be better to instead provide an architecture-selectable Kconfig option, and select the strength of smp_mb__after_unlock_lock() based on that option. This commit therefore creates ARC

Re: [PATCH v2 tip/core/rcu 02/39] rcu: Make arch select smp_mb__after_unlock_lock() strength

2017-04-17 Thread Josh Triplett
On Mon, Apr 17, 2017 at 04:44:49PM -0700, Paul E. McKenney wrote: > The definition of smp_mb__after_unlock_lock() is currently smp_mb() > for CONFIG_PPC and a no-op otherwise. It would be better to instead > provide an architecture-selectable Kconfig option, and select the > strength of smp_mb__af

[PATCH 1/2] powerpc/pseries: fix of_node_put() underflow during dlpar remove

2017-04-17 Thread Tyrel Datwyler
Historically device_node references were tracked using a kref embedded as a struct field. Commit 75b57ecf9 refactored device_nodes to be kobjects such that the device tree could by more simply exposed to userspace using sysfs. Commit 0829f6d1f6 followed up these changes to better control the kobjec

[PATCH 2/2] powerpc/sysfs: fix reference leak of cpu device_nodes present at boot

2017-04-17 Thread Tyrel Datwyler
For cpus present at boot each logical cpu acquires a reference to the associated device node of the core. This happens in register_cpu() which is called by topology_init(). The result of this is that we end up with a reference held by each thread of the core. However, these references are never fre

[PATCH] of: introduce event tracepoints for dynamic device_node lifecyle

2017-04-17 Thread Tyrel Datwyler
This patch introduces event tracepoints for tracking a device_nodes reference cycle as well as reconfig notifications generated in response to node/property manipulations. With the recent upstreaming of the refcount API several device_node underflows and leaks have come to my attention in the pser

Re: [PATCH] of: introduce event tracepoints for dynamic device_node lifecyle

2017-04-17 Thread Tyrel Datwyler
FYI, this patch was meant to be sent as an RFC. Looks like the RFC tag got lost in my last spin. On 04/17/2017 05:32 PM, Tyrel Datwyler wrote: > This patch introduces event tracepoints for tracking a device_nodes > reference cycle as well as reconfig notifications generated in response > to node/p

Re: [PATCH v11 2/7] PCI: A fix for caculating bridge window's size and alignment

2017-04-17 Thread Yongji Xie
Hi Yinghai, On 18 April 2017 at 05:45, Yinghai Lu wrote: > On Mon, Apr 17, 2017 at 2:36 PM, Bjorn Helgaas wrote: >> From: Yongji Xie >> >> In case that one device's alignment is greater than its size, >> we may get an incorrect size and alignment for its bus's memory >> window in pbus_size_mem(

Re: [PATCH] selftests/powerpc/mm: Add a test for virtual address mapping

2017-04-17 Thread Anshuman Khandual
On 04/17/2017 10:56 AM, Aneesh Kumar K.V wrote: > Anshuman Khandual writes: > >> This verifies virtual address mapping below and above the >> 128TB range and makes sure that address returned are within >> the expected range depending upon the hint passed from the >> user space. >> >> Signed-off-b

Re: [PATCH 5/7] mm/follow_page_mask: Add support for hugepage directory entry

2017-04-17 Thread Aneesh Kumar K.V
kbuild test robot writes: > Hi Aneesh, > > [auto build test ERROR on linus/master] > [also build test ERROR on v4.11-rc7 next-20170413] > [if your patch is applied to the wrong git tree, please drop us a note to > help improve the system] > > url: > https://github.com/0day-ci/linux/commits/A

Re: [PATCH kernel] KVM: PPC: Align the table size to system page size

2017-04-17 Thread David Gibson
On Thu, Apr 13, 2017 at 05:04:20PM +1000, Alexey Kardashevskiy wrote: > At the moment the userspace can request a table smaller than a page size > and this value will be stored as kvmppc_spapr_tce_table::size. > However the actual allocated size will still be aligned to the system > page size as al

Re: [PATCH] selftests/powerpc/mm: Add a test for virtual address mapping

2017-04-17 Thread Michael Ellerman
Anshuman Khandual writes: > On 04/15/2017 01:48 AM, Michal Suchanek wrote: >> Hello, >> >> On Wed, 12 Apr 2017 15:11:12 +0530 >> Anshuman Khandual wrote: >> >>> This verifies virtual address mapping below and above the >>> 128TB range and makes sure that address returned are within >>> the exp

[PATCH] powerpc/64: Fix HMI exception on LE with CONFIG_RELOCATABLE=y

2017-04-17 Thread Michael Ellerman
Prior to commit 2337d207288f ("powerpc/64: CONFIG_RELOCATABLE support for hmi interrupts"), the branch from hmi_exception_early() to hmi_exception_realmode() was just a bl hmi_exception_realmode, which the linker would turn into a bl to the local entry point of hmi_exception_realmode. This was brok

Re: [PATCH v11 4/7] powerpc/powernv: Override pcibios_default_alignment() to force PCI devices to be page aligned

2017-04-17 Thread Michael Ellerman
Bjorn Helgaas writes: > From: Yongji Xie > > This overrides pcibios_default_alignment() to set default alignment > to PAGE_SIZE for all PCI devices on PowerNV platform. Thus sub-page > BARs would not share a page and could be mapped into guest when VFIO > passthrough them. > > Signed-off-by: Yon

Re: [PATCH] powerpc/mm: some cleanup of do_page_fault()

2017-04-17 Thread Michael Ellerman
Christophe Leroy writes: > This patch is a bunch of small cleanups of the do_page_fault() > function: > 1/ Function store_updates_sp() checks whether the faulting > instruction is a store updating r1. Therefore we can limit its calls > to stores exceptions > 2/ Only the get_user() in store_update

[PATCH] powerpc/mm: Rename table dump file name

2017-04-17 Thread Christophe Leroy
Page table dump debugfs file is named 'kernel_page_tables' on all other architectures implementing it, while is is named 'kernel_pagetables' on powerpc. This patch renames it. Signed-off-by: Christophe Leroy --- arch/powerpc/mm/dump_linuxpagetables.c | 2 +- 1 file changed, 1 insertion(+), 1 del

[PATCH v2] powerpc/mm: Fix page table dump build on PPC32

2017-04-17 Thread Christophe Leroy
On PPC32 (ex: mpc885_ads_defconfig), page table dump compilation fails as follows. This is because the memory layout is slightly different on PPC32. This patch adapts it. CC arch/powerpc/mm/dump_linuxpagetables.o arch/powerpc/mm/dump_linuxpagetables.c: In function 'walk_pagetables': arch/po

Re: [PATCH v2] cxl: Enable PCI device IDs for future IBM CXL adapters

2017-04-17 Thread Michael Ellerman
"Matthew R. Ochs" writes: >> On Mar 24, 2017, at 11:03 AM, Matthew R. Ochs >> wrote: >> >> Add support for future IBM Coherent Accelerator (CXL) devices >> with an IDs of 0x0623 and 0x0628. >> >> Signed-off-by: Matthew R. Ochs >> Signed-off-by: Uma Krishnan >> Acked-by: Frederic Barrat > >

Re: [PATCH] powerpc/32: Fix protection of kernel RAM after freeing unused memory

2017-04-17 Thread Michael Ellerman
Christophe Leroy writes: > diff --git a/arch/powerpc/mm/mem.c b/arch/powerpc/mm/mem.c > index 9ee536ec0739..e95931c4e6cf 100644 > --- a/arch/powerpc/mm/mem.c > +++ b/arch/powerpc/mm/mem.c > @@ -401,6 +401,9 @@ void free_initmem(void) > { > ppc_md.progress = ppc_printk_progress; > fre

Re: [PATCH 1/2] powerpc: string: implement optimized memset variants

2017-04-17 Thread Michael Ellerman
Michael Ellerman writes: > "Naveen N. Rao" writes: >> (generic) is with Matt's arch-independent patches applied. Profiling >> indicates that most of the overhead is actually with the lzo >> decompression... >> >> Also, with a simple module to memset64() a 1GB vmalloc'ed buffer, here >> are th