[PATCH 5/7] powerpc/pci: Add pci_find_hose_for_domain()

2019-02-07 Thread Oliver O'Halloran
Add a helper to find the pci_controller structure based on the domain number / phb id. Signed-off-by: Oliver O'Halloran --- arch/powerpc/include/asm/pci-bridge.h | 2 ++ arch/powerpc/kernel/pci-common.c | 11 +++ 2 files changed, 13 insertions(+) diff --git a/arch/powerpc/include

[PATCH 4/7] powerpc/eeh_cache: Bump log level of eeh_addr_cache_print()

2019-02-07 Thread Oliver O'Halloran
-by: Oliver O'Halloran --- arch/powerpc/kernel/eeh_cache.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/powerpc/kernel/eeh_cache.c b/arch/powerpc/kernel/eeh_cache.c index dba421a577e7..7de278f88e3d 100644 --- a/arch/powerpc/kernel/eeh_cache.c +++ b/arch/powerpc/kernel

[PATCH 3/7] powerpc/eeh_cache: Add a way to dump the EEH address cache

2019-02-07 Thread Oliver O'Halloran
. Signed-off-by: Oliver O'Halloran --- arch/powerpc/include/asm/eeh.h | 3 +++ arch/powerpc/kernel/eeh.c | 2 +- arch/powerpc/kernel/eeh_cache.c | 34 + 3 files changed, 34 insertions(+), 5 deletions(-) diff --git a/arch/powerpc/include/asm/eeh.h b/arch/powerpc

[PATCH 2/7] powerpc/eeh_cache: Add pr_debug() prints for insert/remove

2019-02-07 Thread Oliver O'Halloran
() for the remove case too. Signed-off-by: Oliver O'Halloran --- arch/powerpc/kernel/eeh_cache.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/arch/powerpc/kernel/eeh_cache.c b/arch/powerpc/kernel/eeh_cache.c index 201943d54a6e..b2c320e0fcef 100644 --- a/arch/powerpc

[PATCH 1/7] powerpc/eeh: Use debugfs_create_u32 for eeh_max_freezes

2019-02-07 Thread Oliver O'Halloran
There's no need to the custom getter/setter functions so we should remove them in favour of using the generic one. While we're here, change the type of eeh_max_freeze to uint32_t and print the value in decimal rather than hex because printing it in hex makes no sense. Signed-off-by: Oliver

[PATCH] powerpc/powernv: Escalate reset when IODA reset fails

2019-01-31 Thread Oliver O'Halloran
reset if firmware reports an error when performing the IODA reset. Signed-off-by: Oliver O'Halloran --- arch/powerpc/platforms/powernv/pci-ioda.c | 7 +-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/arch/powerpc/platforms/powernv/pci-ioda.c b/arch/powerpc/platforms/powernv

[PATCH] powerpc/papr_scm: Use the correct bind address

2019-01-30 Thread Oliver O'Halloran
werpc/pseries: Add driver for PAPR SCM regions") Signed-off-by: Oliver O'Halloran --- arch/powerpc/platforms/pseries/papr_scm.c | 5 - 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/arch/powerpc/platforms/pseries/papr_scm.c b/arch/powerpc/platforms/pseries/papr_scm.c index 7d

[PATCH] powerpc/powernv: Force an freset if IODA reset fails

2019-01-17 Thread Oliver O'Halloran
firmware when doing the IODA reset. Signed-off-by: Oliver O'Halloran --- arch/powerpc/platforms/powernv/pci-ioda.c | 7 +-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/arch/powerpc/platforms/powernv/pci-ioda.c b/arch/powerpc/platforms/powernv/pci-ioda.c index 1d6406a..53982f8

[PATCH 7/7] powerpc/mm: Fallback to RAM if the altmap is unusable

2018-12-06 Thread Oliver O'Halloran
t allocate from the altmap. This fallback should only ever be used for the first vmemmap block so it should not cause excess memory consumption. Fixes: 7b73d978a5d0 ("mm: pass the vmem_altmap to vmemmap_populate") Signed-off-by: Oliver O'Halloran --- The Fixes here is a little dubious since

[PATCH 6/7] powerpc/papr_scm: Use ibm,unit-guid as the iset cookie

2018-12-06 Thread Oliver O'Halloran
. Fixes: b5beae5e224f ("powerpc/pseries: Add driver for PAPR SCM regions") Signed-off-by: Oliver O'Halloran --- arch/powerpc/platforms/pseries/papr_scm.c | 12 1 file changed, 12 insertions(+) diff --git a/arch/powerpc/platforms/pseries/papr_scm.c b/arch/powerpc/platfor

[PATCH 5/7] powerpc/papr_scm: Fix DIMM device registration race

2018-12-06 Thread Oliver O'Halloran
() function which synchronises with the async domain and verifies that the dimm was successfully registered with the bus. If either of these does not occur then we bail. Fixes: b5beae5e224f ("powerpc/pseries: Add driver for PAPR SCM regions") Signed-off-by: Oliver O'Halloran --- arch/powerpc

[PATCH 4/7] powerpc/papr_scm: Remove endian conversions

2018-12-06 Thread Oliver O'Halloran
in qemu and the returned values were byte swapped unnecessarily in both the hypervisor and in the driver so this was only noticed when bringing up the PowerVM implementation. Fixes: b5beae5e224f ("powerpc/pseries: Add driver for PAPR SCM regions") Signed-off-by: Oliver O'Halloran --- ar

[PATCH 3/7] powerpc/papr_scm: Update DT properties

2018-12-06 Thread Oliver O'Halloran
and ibm,number-of-blocks that convey the same information. No firmware / hypervisor that emitted the ibm,unit-size property ever appeared in the wild. Fixes: b5beae5e224f ("powerpc/pseries: Add driver for PAPR SCM regions") Signed-off-by: Oliver O'Halloran --- arch/powerpc/platforms/pseries/

[PATCH 2/7] powerpc/papr_scm: Fix resource end address

2018-12-06 Thread Oliver O'Halloran
resulting in the entire hot-plug failing. Fixes: b5beae5e224f ("powerpc/pseries: Add driver for PAPR SCM regions") Signed-off-by: Oliver O'Halloran --- arch/powerpc/platforms/pseries/papr_scm.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/powerpc/platforms/pseries/

[PATCH 1/7] powerpc/papr_scm: Use depend instead of select

2018-12-06 Thread Oliver O'Halloran
Making PAPR_SCM select LIBNVDIMM results in circular dependencies in Kconfig when another symbol depends on it. Fix this by replacing the select with a depends. Fixes: b5beae5e224f ("powerpc/pseries: Add driver for PAPR SCM regions") Reported-by: Alastair D'Silva Signed-off-by: Oliver

papr SCM driver fixes

2018-12-06 Thread Oliver O'Halloran
Various bug fixes for the papr_scm driver that were found while bringing up the PowerVM implementation of the interface. There's a few minor bugs there were a result of bugs in the original QEMU implementation, a few due to the memory layouts being different and one due to a change to the DT

[PATCH] powerpc/powernv: Remove PCI_MSI ifdef checks

2018-11-13 Thread Oliver O'Halloran
CONFIG_PCI_MSI was made mandatory by commit a311e738b6d8 ("powerpc/powernv: Make PCI non-optional") so the #ifdef checks around CONFIG_PCI_MSI here can be removed entirely. Signed-off-by: Oliver O'Halloran --- arch/powerpc/platforms/powernv/pci-ioda.c | 13 - arch/powerpc

Re: [PATCH v2] PCI/MSI: Don't touch MSI bits when the PCI device is disconnected

2018-11-11 Thread Oliver O'Halloran
On Thu, 2018-11-08 at 23:06 +, alex_gagn...@dellteam.com wrote: > On 11/08/2018 04:51 PM, Greg KH wrote: > > On Thu, Nov 08, 2018 at 10:49:08PM +, alex_gagn...@dellteam.com wrote: > > > In the case that we're trying to fix, this code executing is a result of > > > the device being gone, so

Re: [PATCH v2] PCI/MSI: Don't touch MSI bits when the PCI device is disconnected

2018-11-11 Thread Oliver O'Halloran
On Fri, 2018-11-09 at 08:11 +0100, Lukas Wunner wrote: > On Thu, Nov 08, 2018 at 02:09:17PM -0600, Bjorn Helgaas wrote: > > + /* > > +* If an MMIO read from the device returns ~0 data, that data may > > +* be valid, or it may indicate a bus error. If config space is > > +* readable,

[PATCH v3 2/2] powerpc/pseries: Add driver for PAPR SCM regions

2018-10-14 Thread Oliver O'Halloran
address space, and b) There is currently no mechanism for relating a bare of_pmem region to the backing DIMM (or not-a-DIMM for our case). Both of these are easily handled by rolling the functionality into a seperate driver so here we are... Acked-by: Dan Williams Signed-off-by: Oliver

[PATCH v3 1/2] powerpc/pseries: PAPR persistent memory support

2018-10-14 Thread Oliver O'Halloran
This patch implements support for discovering storage class memory devices at boot and for handling hotplug of new regions via RTAS hotplug events. Signed-off-by: Oliver O'Halloran --- v2: Added missing pmem.c v3: no changes --- arch/powerpc/include/asm/firmware.h | 3 +- arch/powerpc

[PATCH v2 2/2] powerpc/pseries: Add driver for PAPR SCM regions

2018-10-10 Thread Oliver O'Halloran
address space, and b) There is currently no mechanism for relating a bare of_pmem region to the backing DIMM (or not-a-DIMM for our case). Both of these are easily handled by rolling the functionality into a seperate driver so here we are... Signed-off-by: Oliver O'Halloran --- The alternative

[PATCH v2 1/2] powerpc/pseries: PAPR persistent memory support

2018-10-10 Thread Oliver O'Halloran
This patch implements support for discovering storage class memory devices at boot and for handling hotplug of new regions via RTAS hotplug events. Signed-off-by: Oliver O'Halloran --- v2: Added missing pmem.c file --- arch/powerpc/include/asm/firmware.h | 3 +- arch/powerpc/include/asm

[PATCH 2/2] powerpc/pseries: Add driver for PAPR SCM regions

2018-10-10 Thread Oliver O'Halloran
address space, and b) There is currently no mechanism for relating a bare of_pmem region to the backing DIMM (or not-a-DIMM for our case). Both of these are easily handled by rolling the functionality into a seperate driver so here we are... Signed-off-by: Oliver O'Halloran --- The alternative

[PATCH 1/2] powerpc/pseries: PAPR persistent memory support

2018-10-10 Thread Oliver O'Halloran
This patch implements support for discovering storage class memory devices at boot and for handling hotplug of new regions via RTAS hotplug events. Signed-off-by: Oliver O'Halloran --- arch/powerpc/include/asm/firmware.h | 3 ++- arch/powerpc/include/asm/hvcall.h | 10

PAPR SCM support

2018-10-10 Thread Oliver O'Halloran
This series adds support for the para-virtualised storage class memory interface defined by the Power Architecture Platform Reference. Patch 1 implements the pseries device discovery (via DT) and hotplug support (via RTAS hotplug interrupt). Patch 2 implements a driver that binds to the platform

[PATCH] powerpc/rtasd: Improve unknown error logging

2018-10-09 Thread Oliver O'Halloran
Currently when we get an unknown RTAS event it prints the type as "Unknown" and no other useful information. Add the raw type code to the log message so that we have something to work off. Signed-off-by: Oliver O'Halloran --- arch/powerpc/kernel/rtasd.c | 6 -- 1 file changed, 4

[PATCH] drivers/of: Introduce ARCH_HAS_OWN_OF_NUMA

2018-04-09 Thread Oliver O'Halloran
it's own, or the generic OF_NUMA, then always use the inline fallback in of.h so we don't need to futz around with exports. Cc: devicet...@vger.kernel.org Cc: sparcli...@vger.kernel.org Cc: linuxppc-dev@lists.ozlabs.org Fixes: 298535c00a2c ("of, numa: Add NUMA of binding implementation.") Sig

[PATCH v3 4/4] powerpc/powernv: Create platform devs for nvdimm buses

2018-04-05 Thread Oliver O'Halloran
Scan the devicetree for an nvdimm-bus compatible and create a platform device for them. Signed-off-by: Oliver O'Halloran <ooh...@gmail.com> --- arch/powerpc/platforms/powernv/opal.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/arch/powerpc/platforms/powernv/opal.c b/arch/p

[PATCH v3 3/4] doc/devicetree: Persistent memory region bindings

2018-04-05 Thread Oliver O'Halloran
Add device-tree binding documentation for the nvdimm region driver. Cc: devicet...@vger.kernel.org Signed-off-by: Oliver O'Halloran <ooh...@gmail.com> --- v2: Changed name from nvdimm-region to pmem-region. Cleaned up the example binding and fixed the overlapping regions. Added s

[PATCH v3 2/4] libnvdimm: Add device-tree based driver

2018-04-05 Thread Oliver O'Halloran
This patch adds peliminary device-tree bindings for persistent memory regions. The driver registers a libnvdimm bus for each pmem-region node and each address range under the node is converted to a region within that bus. Signed-off-by: Oliver O'Halloran <ooh...@gmail.com> --- v2: Made ea

[PATCH v3 1/4] libnvdimm: Add of_node to region and bus descriptors

2018-04-05 Thread Oliver O'Halloran
We want to be able to cross reference the region and bus devices with the device tree node that they were spawned from. libNVDIMM handles creating the actual devices for these internally, so we need to pass in a pointer to the relevant node in the descriptor. Signed-off-by: Oliver O'Halloran <

[RESEND v2 4/4] powerpc/powernv: Create platform devs for nvdimm buses

2018-04-03 Thread Oliver O'Halloran
Scan the devicetree for an nvdimm-bus compatible and create a platform device for them. Signed-off-by: Oliver O'Halloran <ooh...@gmail.com> --- arch/powerpc/platforms/powernv/opal.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/arch/powerpc/platforms/powernv/opal.c b/arch/p

[RESEND v2 3/4] doc/devicetree: Persistent memory region bindings

2018-04-03 Thread Oliver O'Halloran
Add device-tree binding documentation for the nvdimm region driver. Cc: devicet...@vger.kernel.org Signed-off-by: Oliver O'Halloran <ooh...@gmail.com> --- v2: Changed name from nvdimm-region to pmem-region. Cleaned up the example binding and fixed the overlapping regions. Added s

[RESEND v2 2/4] libnvdimm: Add device-tree based driver

2018-04-03 Thread Oliver O'Halloran
This patch adds peliminary device-tree bindings for persistent memory regions. The driver registers a libnvdimm bus for each pmem-region node and each address range under the node is converted to a region within that bus. Signed-off-by: Oliver O'Halloran <ooh...@gmail.com> --- v2: Made ea

[RESEND v2 1/4] libnvdimm: Add of_node to region and bus descriptors

2018-04-03 Thread Oliver O'Halloran
We want to be able to cross reference the region and bus devices with the device tree node that they were spawned from. libNVDIMM handles creating the actual devices for these internally, so we need to pass in a pointer to the relevant node in the descriptor. Signed-off-by: Oliver O'Halloran <

[PATCH 4/4] powerpc/powernv: Create platform devs for nvdimm buses

2018-04-03 Thread Oliver O'Halloran
Scan the devicetree for an nvdimm-bus compatible and create a platform device for them. Signed-off-by: Oliver O'Halloran <ooh...@gmail.com> --- arch/powerpc/platforms/powernv/opal.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/arch/powerpc/platforms/powernv/opal.c b/arch/p

[PATCH 2/4] libnvdimm: Add device-tree based driver

2018-04-03 Thread Oliver O'Halloran
This patch adds peliminary device-tree bindings for persistent memory regions. The driver registers a libnvdimm bus for each pmem-region node and each address range under the node is converted to a region within that bus. Signed-off-by: Oliver O'Halloran <ooh...@gmail.com> --- v2: Made ea

[PATCH 3/4] doc/devicetree: Persistent memory region bindings

2018-04-03 Thread Oliver O'Halloran
Add device-tree binding documentation for the nvdimm region driver. Cc: devicet...@vger.kernel.org Signed-off-by: Oliver O'Halloran <ooh...@gmail.com> --- v2: Changed name from nvdimm-region to pmem-region. Cleaned up the example binding and fixed the overlapping regions. Added s

[PATCH 1/4] libnvdimm: Add of_node to region and bus descriptors

2018-04-03 Thread Oliver O'Halloran
We want to be able to cross reference the region and bus devices with the device tree node that they were spawned from. libNVDIMM handles creating the actual devices for these internally, so we need to pass in a pointer to the relevant node in the descriptor. Signed-off-by: Oliver O'Halloran <

[PATCH 6/6] doc/devicetree: NVDIMM region documentation

2018-03-23 Thread Oliver O'Halloran
Add device-tree binding documentation for the nvdimm region driver. Cc: devicet...@vger.kernel.org Signed-off-by: Oliver O'Halloran <ooh...@gmail.com> --- .../devicetree/bindings/nvdimm/nvdimm-region.txt | 45 ++ 1 file changed, 45 insertions(+) create mode

[PATCH 5/6] powerpc/powernv: Create platform devs for nvdimm buses

2018-03-23 Thread Oliver O'Halloran
Scan the devicetree for an nvdimm-bus compatible and create a platform device for them. Signed-off-by: Oliver O'Halloran <ooh...@gmail.com> --- arch/powerpc/platforms/powernv/opal.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/arch/powerpc/platforms/powernv/opal.c b/arch/p

[PATCH 4/6] libnvdimm/of: Symlink platform and region devices

2018-03-23 Thread Oliver O'Halloran
Add a way direct link between the region and the platform device that creates the region. Signed-off-by: Oliver O'Halloran <ooh...@gmail.com> --- drivers/nvdimm/of_nvdimm.c | 11 +++ drivers/nvdimm/region_devs.c | 13 + include/linux/libnvdimm.h| 1 + 3 files c

[PATCH 3/6] libnvdimm: Add device-tree based driver

2018-03-23 Thread Oliver O'Halloran
This patch adds peliminary device-tree bindings for the NVDIMM driver. Currently this only supports one bus (created at probe time) which all regions are added to with individual regions being created by a platform device driver. Signed-off-by: Oliver O'Halloran <ooh...@gmail.com> --- I s

[PATCH 2/6] libnvdimm: Add nd_region_destroy()

2018-03-23 Thread Oliver O'Halloran
Currently there's no way to remove a region from and nvdimm_bus without tearing down the whole bus. This patch adds an API for removing a single region from the bus so that we can implement a sensible unbind operation for the of_nd_region platform driver. Signed-off-by: Oliver O'Halloran <

[PATCH 1/6] libnvdimm: Add of_node to region and bus descriptors

2018-03-23 Thread Oliver O'Halloran
We want to be able to cross reference the region and bus devices with the device tree node that they were spawned from. libNVDIMM handles creating the actual devices for these internally, so we need to pass in a pointer to the relevant node in the descriptor. Signed-off-by: Oliver O'Halloran <

[PATCH 5/5] powerpc/zImage: Also check for stdout-path

2018-03-18 Thread Oliver O'Halloran
The /chosen/linux,stdout-path is "deprecated" in favour of /chosen/stdout-path so we should be checking for both. Signed-off-by: Oliver O'Halloran <ooh...@gmail.com> --- arch/powerpc/boot/serial.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/arch/powerpc

[PATCH 2/5] powerpc/zImage: Don't build zlib object files

2018-03-18 Thread Oliver O'Halloran
The required source files are directly #include`ed into decompress.c when using gzip compression. Building the separate .o files for the zlib sources isn't required and can cause linker errors due to the symbols being defined in decompress.o and the zlib .o files. Signed-off-by: Oliver O'Halloran

[PATCH 4/5] powerpc/zImage: Rework serial driver probing

2018-03-18 Thread Oliver O'Halloran
onditional compilation is the only way to eliminate unnecessary code. Signed-off-by: Oliver O'Halloran <ooh...@gmail.com> --- arch/powerpc/boot/cpm-serial.c | 1 + arch/powerpc/boot/mpc52xx-psc.c | 1 + arch/powerpc/boot/mpsc.c| 1 + arch/powerpc/boot/ns16550.c | 2

[PATCH 3/5] powerpc/zImage: Check compatible at driver init

2018-03-18 Thread Oliver O'Halloran
Have each driver's init function check the compatible string of the node given by the stdout path. This gives the drivers a more traditional probe-also-inits structure. Signed-off-by: Oliver O'Halloran <ooh...@gmail.com> --- arch/powerpc/boot/cpm-serial.c | 2 ++ arch/powerpc/boot/mpc52xx

[PATCH 1/5] powerpc/zImage: Remove #ifdef in opal.c

2018-03-18 Thread Oliver O'Halloran
This file is only ever compiled if CONFIG_PPC64_BOOT_WRAPPER is set so this check is unnecessary. Signed-off-by: Oliver O'Halloran <ooh...@gmail.com> --- arch/powerpc/boot/opal.c | 8 1 file changed, 8 deletions(-) diff --git a/arch/powerpc/boot/opal.c b/arch/powerpc/boot/opal.c

[PATCH 3/3] powerpc/powernv: Create platform devs for nvdimm buses

2017-11-15 Thread Oliver O'Halloran
Scan the devicetree for an nvdimm-bus compatible and create a platform device for them. Signed-off-by: Oliver O'Halloran <ooh...@gmail.com> --- arch/powerpc/platforms/powernv/opal.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/arch/powerpc/platforms/powernv/opal.c b/arch/p

[PATCH 2/3] libnvdimm: Add a device-tree interface

2017-11-15 Thread Oliver O'Halloran
A fairly bare-bones set of device-tree bindings so libnvdimm can be used on powerpc and other device-tree based platforms. Cc: devicet...@vger.kernel.org Signed-off-by: Oliver O'Halloran <ooh...@gmail.com> --- .../devicetree/bindings/nvdimm/nvdimm-bus.txt | 69 +++ MAINT

[PATCH 1/3] libnvdimm: Add of_node to region and bus descriptors

2017-11-15 Thread Oliver O'Halloran
We want to be able to cross reference the region and bus devices with the device tree node that they were spawned from. libNVDIMM handles creating the actual devices for these internally, so we need to pass in a pointer to the relevant node in the descriptor. Signed-off-by: Oliver O'Halloran <

[PATCH 2/2] powerpc/lib: Implement UACCESS_FLUSHCACHE API

2017-10-19 Thread Oliver O'Halloran
caches. Signed-off-by: Oliver O'Halloran <ooh...@gmail.com> --- arch/powerpc/Kconfig | 1 + arch/powerpc/include/asm/string.h | 2 ++ arch/powerpc/include/asm/uaccess.h | 5 + arch/powerpc/lib/pmem.c| 33 + 4 files chang

[PATCH 1/2] powerpc/lib: Implement PMEM API

2017-10-19 Thread Oliver O'Halloran
herency" rather than to memory. As a result implementing the API requires a full cache flush rather than just a cache write back. This will probably change in the not-too-distant future. Signed-off-by: Oliver O'Halloran <ooh...@gmail.com> --- arch/powerpc/Kconfig | 1 + arch/powerpc/

[PATCH v2] powerpc/mm: Check for _PAGE_PTE in *_devmap()

2017-07-27 Thread Oliver O'Halloran
for everything except leaf (PTE) entries. Signed-off-by: Oliver O'Halloran <ooh...@gmail.com> --- "i'll just tweak the mbox before i sent it, what's the worst that can happen" *completely breaks KVM* "..." --- arch/powerpc/include/asm/book3s/64/pgtable.h | 4 +++- 1 file c

[PATCH] powerpc/mm: Check for _PAGE_PTE in *_devmap()

2017-07-27 Thread Oliver O'Halloran
for everything except leaf (PTE) entries. Signed-off-by: Oliver O'Halloran <ooh...@gmail.com> --- arch/powerpc/include/asm/book3s/64/pgtable.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/powerpc/include/asm/book3s/64/pgtable.h b/arch/powerpc/include/asm/book3s/64/pgt

[PATCH] powerpc/asm: Mark cr0 as clobbered in mftb()

2017-07-06 Thread Oliver O'Halloran
The workaround for the CELL timebase bug does not correctly mark cr0 as being clobbered. This can result in GCC making some poor^W completely broken optimisations. Signed-off-by: Oliver O'Halloran <ooh...@gmail.com> --- arch/powerpc/include/asm/reg.h | 2 +- 1 file changed, 1 insertion

[PATCH] powerpc/hugetlbfs: Export HPAGE_SHIFT

2017-06-30 Thread Oliver O'Halloran
Export it so it can be referenced inside a module. Signed-off-by: Oliver O'Halloran <ooh...@gmail.com> --- arch/powerpc/mm/hugetlbpage.c | 1 + 1 file changed, 1 insertion(+) diff --git a/arch/powerpc/mm/hugetlbpage.c b/arch/powerpc/mm/hugetlbpage.c index ceeab69cf7fc..96293560f294

[PATCH 4/4] powerpc/smp: Add Power9 scheduler topology

2017-06-29 Thread Oliver O'Halloran
be preferentially migrated to the paired core so it remains cache-hot. Signed-off-by: Oliver O'Halloran <ooh...@gmail.com> --- arch/powerpc/kernel/smp.c | 52 ++- 1 file changed, 51 insertions(+), 1 deletion(-) diff --git a/arch/powerpc/kernel/smp.c b/arch/p

[PATCH 3/4] powerpc/smp: Add cpu_l2_cache_map

2017-06-29 Thread Oliver O'Halloran
We want to add an extra level to the CPU scheduler topology to account for cores which share a cache. To do this we need to build a cpumask for each CPU that indicates which CPUs share this cache to use as an input to the scheduler. Signed-off-by: Oliver O'Halloran <ooh...@gmail.com> ---

[PATCH 2/4] powerpc/smp: Rework CPU topology construction

2017-06-29 Thread Oliver O'Halloran
requires higher levels of the toplogy (e.g package level groupings) to be supersets of the lower levels (e.g. threas in a core). This patch reworks the cpumask construction to be simpler and easier to extend with extra topology levels. Signed-off-by: Oliver O'Halloran <ooh...@gmail.com> ---

[PATCH 1/4] powerpc/smp: Use cpu_to_chip_id() to find core siblings

2017-06-29 Thread Oliver O'Halloran
the existing search in favor of that. It's worth mentioning that the semantics of the search are different in cpu_to_chip_id(). When there is no ibm,chipid in the CPUs node it will also search /cpus and / for the property, but this should not effect the output topology. Signed-off-by: Oliver O'Halloran <

power9 shared caches support

2017-06-29 Thread Oliver O'Halloran
This is a pretty substantial rework of the last patch that should address most of the comment mpe had, namely: 1. Removed the random cpu_feature(ARCH_300) check. The new series always builds the cache mask and the new scheduler topology is used if we detect a mismatch of the thread and 2. In

[PATCH v4 6/6] powerpc/mm: Enable ZONE_DEVICE on powerpc

2017-06-27 Thread Oliver O'Halloran
Flip the switch. Running around and screaming "IT'S ALIVE" is optional, but recommended. Signed-off-by: Oliver O'Halloran <ooh...@gmail.com> --- v3: Only select when building for 64bit Book3-S --- arch/powerpc/Kconfig | 1 + 1 file changed, 1 insertion(+) diff --git a/arch/p

[PATCH v4 5/6] powerpc/mm: Wire up hpte_removebolted for powernv

2017-06-27 Thread Oliver O'Halloran
gt; Reviewed-by: Rashmica Gupta <rashmic...@gmail.com> Signed-off-by: Anton Blanchard <an...@samba.org> Signed-off-by: Oliver O'Halloran <ooh...@gmail.com> --- v1 -> v2: Fixed the commit author Added VM_WARN_ON() if we attempt to remove an unbolted hpte --- arch

[PATCH v4 4/6] powerpc/mm: Add devmap support for ppc64

2017-06-27 Thread Oliver O'Halloran
ed-off-by: Oliver O'Halloran <ooh...@gmail.com> --- v1 -> v2: Properly differentiate THP and PMD Devmap entries. The mm core assumes that pmd_trans_huge() and pmd_devmap() are mutually exclusive and v1 had pmd_trans_huge() being true on a devmap pmd. v2 -> v3: Remove settin

[PATCH v4 3/6] powerpc/vmemmap: Add altmap support

2017-06-27 Thread Oliver O'Halloran
pressure on main system memory by allowing the mm/ metadata to be stored on the device itself rather in main memory. Reviewed-by: Balbir Singh <bsinghar...@gmail.com> Signed-off-by: Oliver O'Halloran <ooh...@gmail.com> --- arch/powerpc/mm/init_64.c | 15 +-- arch/powe

[PATCH v4 2/6] powerpc/vmemmap: Reshuffle vmemmap_free()

2017-06-27 Thread Oliver O'Halloran
Removes an indentation level and shuffles some code around to make the following patch cleaner. No functional changes. Reviewed-by: Balbir Singh <bsinghar...@gmail.com> Signed-off-by: Oliver O'Halloran <ooh...@gmail.com> --- v1 -> v2: Remove broken initialiser --- arch/powerpc/mm

[PATCH v4 1/6] mm, x86: Add ARCH_HAS_ZONE_DEVICE to Kconfig

2017-06-27 Thread Oliver O'Halloran
;bsinghar...@gmail.com> Signed-off-by: Oliver O'Halloran <ooh...@gmail.com> --- Andew, the rest of the series should be going in via the ppc tree, but since there's nothing ppc specific about this patch do you want to take it via mm? -- v2: Added missing hunk. --- arch/x86/Kconfig | 1 + mm

[RFC 4/4] powerpc/powernv: Create platform devs for nvdimm buses

2017-06-27 Thread Oliver O'Halloran
Scan the devicetree for nonvolatile-memory buses and instantiate a platform device for them. Signed-off-by: Oliver O'Halloran <ooh...@gmail.com> --- arch/powerpc/platforms/powernv/opal.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/arch/powerpc/platforms/powernv/opal.c b/arch/p

[RFC 3/4] powerpc: Add pmem API support

2017-06-27 Thread Oliver O'Halloran
-off-by: Oliver O'Halloran <ooh...@gmail.com> --- This should go on to of the ZONE_DEVICE patches. If you want a full tree there's one here that's based on next-20170626 with Dan's libnvdimm-pending branch merged in: https://github.com/oohal/linux/tree/ppc-nvdimm-4.13 --- arch/powerpc/K

[RFC 2/4] libnvdimm: Add a device-tree interface

2017-06-27 Thread Oliver O'Halloran
A fairly bare-bones set of device-tree bindings so libnvdimm can be used on powerpc and other, less cool, device-tree based platforms. Cc: devicet...@vger.kernel.org Signed-off-by: Oliver O'Halloran <ooh...@gmail.com> --- The current bindings are essentially this: nonvolatile-

[RFC 1/4] libnvdimm: add to_{nvdimm,nd_region}_dev()

2017-06-27 Thread Oliver O'Halloran
imm driver to set the of_node pointer. Signed-off-by: Oliver O'Halloran <ooh...@gmail.com> --- drivers/nvdimm/dimm_devs.c | 6 ++ drivers/nvdimm/region_devs.c | 6 ++ include/linux/libnvdimm.h| 2 ++ 3 files changed, 14 insertions(+) diff --git a/drivers/nvdimm/dimm_devs.c

[PATCH v3 6/6] powerpc/mm: Enable ZONE_DEVICE on powerpc

2017-06-23 Thread Oliver O'Halloran
Flip the switch. Running around and screaming "IT'S ALIVE" is optional, but recommended. Signed-off-by: Oliver O'Halloran <ooh...@gmail.com> --- v3: Only select when building for 64bit Book3-S --- arch/powerpc/Kconfig | 1 + 1 file changed, 1 insertion(+) diff --git a/arch/p

[PATCH v3 5/6] powerpc/mm: Wire up hpte_removebolted for powernv

2017-06-23 Thread Oliver O'Halloran
gt; Reviewed-by: Rashmica Gupta <rashmic...@gmail.com> Signed-off-by: Anton Blanchard <an...@samba.org> Signed-off-by: Oliver O'Halloran <ooh...@gmail.com> --- v1 -> v2: Fixed the commit author Added VM_WARN_ON() if we attempt to remove an unbolted hpte --- arch

[PATCH v3 4/6] powerpc/mm: Add devmap support for ppc64

2017-06-23 Thread Oliver O'Halloran
ed-off-by: Oliver O'Halloran <ooh...@gmail.com> --- v1 -> v2: Properly differentiate THP and PMD Devmap entries. The mm core assumes that pmd_trans_huge() and pmd_devmap() are mutually exclusive and v1 had pmd_trans_huge() being true on a devmap pmd. v2 -> v3: Remove settin

[PATCH v3 3/6] powerpc/vmemmap: Add altmap support

2017-06-23 Thread Oliver O'Halloran
pressure on main system memory by allowing the mm/ metadata to be stored on the device itself rather in main memory. Reviewed-by: Balbir Singh <bsinghar...@gmail.com> Signed-off-by: Oliver O'Halloran <ooh...@gmail.com> --- arch/powerpc/mm/init_64.c | 15 +-- arch/powe

[PATCH v3 2/6] powerpc/vmemmap: Reshuffle vmemmap_free()

2017-06-23 Thread Oliver O'Halloran
Removes an indentation level and shuffles some code around to make the following patch cleaner. No functional changes. Signed-off-by: Oliver O'Halloran <ooh...@gmail.com> --- v1 -> v2: Remove broken initialiser --- arch/powerpc/mm/init_64.c | 48 -

[PATCH v3 1/6] mm, x86: Add ARCH_HAS_ZONE_DEVICE to Kconfig

2017-06-23 Thread Oliver O'Halloran
;bsinghar...@gmail.com> Signed-off-by: Oliver O'Halloran <ooh...@gmail.com> --- v2: Added missing hunk. v3: No changes --- arch/x86/Kconfig | 1 + mm/Kconfig | 6 +- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/arch/x86/Kconfig b/arch/x86/Kconfig index 0efb4c9497bc..3

Re: [PATCH 4/6] powerpc/mm: Add devmap support for ppc64

2017-05-23 Thread Oliver O'Halloran
On Tue, May 23, 2017 at 8:40 PM, Balbir Singh <bsinghar...@gmail.com> wrote: > On Tue, May 23, 2017 at 2:05 PM, Oliver O'Halloran <ooh...@gmail.com> wrote: >> Add support for the devmap bit on PTEs and PMDs for PPC64 Book3S. This >> is used to differentiate device bac

Re: [PATCH 4/6] powerpc/mm: Add devmap support for ppc64

2017-05-23 Thread Oliver O'Halloran
On Tue, May 23, 2017 at 2:23 PM, Aneesh Kumar K.V <aneesh.ku...@linux.vnet.ibm.com> wrote: > Oliver O'Halloran <ooh...@gmail.com> writes: > >> Add support for the devmap bit on PTEs and PMDs for PPC64 Book3S. This >> is used to differentiate device backed memory

[PATCH 6/6] powerpc/mm: Enable ZONE_DEVICE on powerpc

2017-05-22 Thread Oliver O'Halloran
Flip the switch. Running around and screaming "IT'S ALIVE" is optional, but recommended. Signed-off-by: Oliver O'Halloran <ooh...@gmail.com> --- arch/powerpc/Kconfig | 1 + 1 file changed, 1 insertion(+) diff --git a/arch/powerpc/Kconfig b/arch/powerpc/Kconfig index f7c8f9972f

[PATCH 5/6] mm, x86: Add ARCH_HAS_ZONE_DEVICE

2017-05-22 Thread Oliver O'Halloran
Currently ZONE_DEVICE depends on X86_64. This is fine for now, but it will get unwieldly as new platforms get ZONE_DEVICE support. Moving it to an arch selected Kconfig option to save us some trouble in the future. Cc: x...@kernel.org Signed-off-by: Oliver O'Halloran <ooh...@gmail.com> ---

[PATCH 4/6] powerpc/mm: Add devmap support for ppc64

2017-05-22 Thread Oliver O'Halloran
ed-off-by: Oliver O'Halloran <ooh...@gmail.com> --- v1 -> v2: Properly differentiate THP and PMD Devmap entries. The mm core assumes that pmd_trans_huge() and pmd_devmap() are mutually exclusive and v1 had pmd_trans_huge() being true on a devmap pmd. Aneesh, this has been fleshed out substantiall

[PATCH 3/6] powerpc/vmemmap: Add altmap support

2017-05-22 Thread Oliver O'Halloran
pressure on main system memory by allowing the mm/ metadata to be stored on the device itself rather in main memory. Signed-off-by: Oliver O'Halloran <ooh...@gmail.com> --- arch/powerpc/mm/init_64.c | 15 +-- arch/powerpc/mm/mem.c | 16 +--- 2 files chang

[PATCH 2/6] powerpc/vmemmap: Reshuffle vmemmap_free()

2017-05-22 Thread Oliver O'Halloran
Removes an indentation level and shuffles some code around to make the following patch cleaner. No functional changes. Signed-off-by: Oliver O'Halloran <ooh...@gmail.com> --- v1 -> v2: Remove broken initialiser --- arch/powerpc/mm/init_64.c | 48 -

[PATCH 1/6] powerpc/mm: Wire up hpte_removebolted for powernv

2017-05-22 Thread Oliver O'Halloran
; Signed-off-by: Anton Blanchard <an...@samba.org> Signed-off-by: Oliver O'Halloran <ooh...@gmail.com> --- v1 -> v2: Fixed the commit author Added VM_WARN_ON() if we attempt to remove an unbolted hpte --- arch/powerpc/mm/hash_native_64.c | 33 ++

Re: [PATCH] KVM: PPC: hypervisor large decrementer support

2017-05-21 Thread Oliver O'Halloran
lly this patch corrects > several uses of decrementer values that assume a 32 bit register width. > > Signed-off-by: Oliver O'Halloran <ooh...@gmail.com> > Cc: Paul Mackerras <pau...@samba.org> > Cc: Michael Neuling <mi...@neuling.org> > --- > arch/powerpc/include

[PATCH] KVM: PPC: hypervisor large decrementer support

2017-05-21 Thread Oliver O'Halloran
the decrementer registers. These macros will return the current decrementer value as a 64 bit quantity regardless of the Host CPU or guest decrementer operating mode. Additionally this patch corrects several uses of decrementer values that assume a 32 bit register width. Signed-off-by: Oliver O'Halloran <

Re: [PATCH] Freescale mpc8315 interrupt chip

2017-05-11 Thread Oliver O'Halloran
On Thu, May 11, 2017 at 10:34 PM, Juergen Schindele wrote: > Next try to submit two patches for Freescale mpc8315. > > first one > --- > powerpc/ipic: Configure "EDGE" capabilities for IRQ0 too

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

2017-04-18 Thread Oliver O'Halloran
On Wed, Apr 19, 2017 at 2:46 AM, Rob Herring wrote: > On Mon, Apr 17, 2017 at 7:32 PM, Tyrel Datwyler > wrote: >> This patch introduces event tracepoints for tracking a device_nodes >> reference cycle as well as reconfig notifications generated in

Re: [PATCH 8/9] powerpc/mm: Wire up hpte_removebolted for powernv

2017-04-12 Thread Oliver O'Halloran
On Wed, Apr 12, 2017 at 11:53 AM, Balbir Singh <bsinghar...@gmail.com> wrote: > On Wed, 2017-04-12 at 03:42 +1000, Oliver O'Halloran wrote: >> From: Rashmica Gupta <rashmic...@gmail.com> >> >> Adds support for removing bolted (i.e kernel linear mapping) mappi

Re: [PATCH 1/2] powerpc/mm: fix up pgtable dump flags

2017-04-12 Thread Oliver O'Halloran
On Wed, Apr 12, 2017 at 4:52 PM, Michael Ellerman <m...@ellerman.id.au> wrote: > Rashmica Gupta <rashmic...@gmail.com> writes: > >> On 31/03/17 12:37, Oliver O'Halloran wrote: >>> On Book3s we have two PTE flags used to mark cache-inhibited mappings: >>&g

Re: ZONE_DEVICE and pmem API support for powerpc

2017-04-12 Thread Oliver O'Halloran
On Wed, Apr 12, 2017 at 4:22 AM, Dan Williams <dan.j.willi...@intel.com> wrote: > On Tue, Apr 11, 2017 at 10:42 AM, Oliver O'Halloran <ooh...@gmail.com> wrote: >> Hi all, >> >> This series adds support for ZONE_DEVICE and the pmem api on powerpc. Namely, >> s

[PATCH 9/9] powerpc: Add pmem API support

2017-04-11 Thread Oliver O'Halloran
Initial powerpc support for the arch-specific bit of the persistent memory API. Nothing fancy here. Signed-off-by: Oliver O'Halloran <ooh...@gmail.com> --- arch/powerpc/Kconfig| 1 + arch/powerpc/include/asm/pmem.h | 109 arch/powerpc/

[PATCH 8/9] powerpc/mm: Wire up hpte_removebolted for powernv

2017-04-11 Thread Oliver O'Halloran
t; Cc: Anton Blanchard <an...@samba.org> Signed-off-by: Oliver O'Halloran <ooh...@gmail.com> --- Could the original author of this add their S-o-b? I pulled it out of Rashmica's memtrace patch, but I remember someone saying Anton wrote it originally. --- arch/powerpc/

[PATCH 7/9] powerpc/mm: Wire up ioremap_cache

2017-04-11 Thread Oliver O'Halloran
The default implementation of ioremap_cache() is aliased to ioremap(). On powerpc ioremap() creates cache-inhibited mappings by default which is almost certainly not what you wanted. Signed-off-by: Oliver O'Halloran <ooh...@gmail.com> --- arch/powerpc/include/asm/io.h | 2 ++ 1 file chan

[PATCH 6/9] powerpc, mm: Enable ZONE_DEVICE on powerpc

2017-04-11 Thread Oliver O'Halloran
Flip the switch. Running around and screaming "IT'S ALIVE" is optional, but recommended. Signed-off-by: Oliver O'Halloran <ooh...@gmail.com> --- mm/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mm/Kconfig b/mm/Kconfig index 43d000e44424..d696af58f97f

<    1   2   3   4   5   6   7   >