Re: [Very RFC 40/46] powernv/npu: Don't drop refcount when looking up GPU pci_devs

2019-11-27 Thread Oliver O'Halloran
nk that's fair enough. By convention it's the callers responsibility to drop the ref when it calls a function that returns a refcounted object. Doing anything else creates a race condition since the object's count could drop to zero before the caller starts using it. Oliver

Re: [Very RFC 35/46] powernv/pci: Remove open-coded PE lookup in pnv_pci_release_device

2019-11-27 Thread Oliver O'Halloran
On Wed, Nov 27, 2019 at 4:24 PM Alexey Kardashevskiy wrote: > > > > On 20/11/2019 12:28, Oliver O'Halloran wrote: > > Signed-off-by: Oliver O'Halloran > > --- > > arch/powerpc/platforms/powernv/pci-ioda.c | 5 ++--- > > 1 file changed, 2 insertion

Re: [PATCH] powerpc/mm: Remove kvm radix prefetch workaround for Power9 DD2.2

2019-12-03 Thread Oliver O'Halloran
On Mon, Dec 2, 2019 at 2:08 PM Jordan Niethe wrote: > > Commit a25bd72badfa ("powerpc/mm/radix: Workaround prefetch issue with > KVM") introduced a number of workarounds as coming out of a guest with > the mmu enabled would make the cpu would start running in hypervisor > state with the PID value

Re: [PATCH 3/4] powerpc/eeh: Remove workaround from eeh_add_device_late()

2020-04-07 Thread Oliver O'Halloran
On Wed, Apr 8, 2020 at 4:22 PM Sam Bobroff wrote: > > On Fri, Apr 03, 2020 at 05:08:32PM +1100, Oliver O'Halloran wrote: > > On Mon, 2020-03-30 at 15:56 +1100, Sam Bobroff wrote: > > > When EEH device state was released asynchronously by the device > > > rele

[PATCH] powerpc/powernv: Add a print indicating when an IODA PE is released

2020-04-08 Thread Oliver O'Halloran
Quite useful to know in some cases. Signed-off-by: Oliver O'Halloran --- arch/powerpc/platforms/powernv/pci-ioda.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/arch/powerpc/platforms/powernv/pci-ioda.c b/arch/powerpc/platforms/powernv/pci-ioda.c index 3d81c01..82e5098 100644

[PATCH] powernv/pci: Print an error when device enable is blocked

2020-04-08 Thread Oliver O'Halloran
evice() already prints a messages when it succeeds. Signed-off-by: Oliver O'Halloran --- arch/powerpc/platforms/powernv/pci-ioda.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/arch/powerpc/platforms/powernv/pci-ioda.c b/arch/powerpc/platforms/powernv/pci-ioda.c ind

Re: [PATCH] powernv/pci: Print an error when device enable is blocked

2020-04-08 Thread Oliver O'Halloran
On Thu, Apr 9, 2020 at 4:13 PM Oliver O'Halloran wrote: > > If the platform decides to block enabling the device nothing is printed > currently. This can lead to some confusion since the dmesg output will > usually print an error with no context e.g. > > e1000e

[PATCH] powerpc/powernv/pci: Add an explaination for PNV_IODA_PE_BUS_ALL

2020-04-14 Thread Oliver O'Halloran
It's pretty obsecure and confused me for a long time so I figured it's worth documenting properly. Signed-off-by: Oliver O'Halloran --- arch/powerpc/platforms/powernv/pci.h | 18 ++ 1 file changed, 18 insertions(+) diff --git a/arch/powerpc/platforms/powern

Re: [PATCH kernel v2 0/7] powerpc/powenv/ioda: Allow huge DMA window at 4GB

2020-04-15 Thread Oliver O'Halloran
obably want the software infrastructure in place to take advantage of it. Maybe expand the command line parameters to allow it to be enabled on a per-PHB basis rather than globally. Oliver

Re: [PATCH kernel v2 0/7] powerpc/powenv/ioda: Allow huge DMA window at 4GB

2020-04-15 Thread Oliver O'Halloran
On Thu, Apr 16, 2020 at 12:34 PM Oliver O'Halloran wrote: > > On Thu, Apr 16, 2020 at 11:27 AM Alexey Kardashevskiy wrote: > > > > Anyone? Is it totally useless or wrong approach? Thanks, > > I wouldn't say it's either, but I still hate it. > > The

[PATCH] powerpc/pseries: Make vio and ibmebus initcalls pseries specific

2020-04-16 Thread Oliver O'Halloran
depends on !CONFIG_LITTLE_ENDIAN. This patch squashes those by switching to using machine_*_initcall() so the bus type is only registered when the kernel is running on a pseries machine. Signed-off-by: Oliver O'Halloran --- arch/powerpc/platforms/pseries/ibmebus.c | 2 +- arch/powerpc/platform

Fix sysfs pci bus rescan on PowerNV (and other things)

2020-04-17 Thread Oliver O'Halloran
r than per-bus. A per-device context would also be necessary for allowing individual functions of a device to be passed through to guests rather than requiring all of them to be passed as a group. Oliver

[PATCH 1/4] powerpc/powernv/pci: Add helper to find ioda_pe from BDFN

2020-04-17 Thread Oliver O'Halloran
For each PHB we maintain a reverse-map that can be used to find the PE that a BDFN is currently mapped to. Add a helper for doing this lookup so we can check if a PE has been configured without looking at pdn->pe_number. Signed-off-by: Oliver O'Halloran --- arch/powerpc/platforms/pow

[PATCH 2/4] powerpc/powernv/pci: Re-work bus PE configuration

2020-04-17 Thread Oliver O'Halloran
e devices in that PE it will now be reconfigured when a new device is added since there's no dependecy on the bridge_setup() hook being called. Signed-off-by: Oliver O'Halloran --- arch/powerpc/platforms/powernv/pci-ioda.c | 81 --- 1 file changed, 30 inse

[PATCH 3/4] powerpc/powernv/pci: Reserve the root bus PE during init

2020-04-17 Thread Oliver O'Halloran
Doing it once during boot rather than doing it on the fly and drop the janky populated logic. Signed-off-by: Oliver O'Halloran --- arch/powerpc/platforms/powernv/pci-ioda.c | 26 +- arch/powerpc/platforms/powernv/pci.h | 1 - 2 files changed, 9 insertions(+

[PATCH 4/4] powerpc/powernv/pci: Sprinkle around some WARN_ON()s

2020-04-17 Thread Oliver O'Halloran
pnv_pci_ioda_configure_bus() should now only ever be called when a device is added to the bus so add a WARN_ON() to the empty bus check. Similarly, pnv_pci_ioda_setup_bus_PE() should only ever be called for an unconfigured PE, so add a WARN_ON() for that case too. Signed-off-by: Oliver O'Hal

Re: [PATCH kernel v2 0/7] powerpc/powenv/ioda: Allow huge DMA window at 4GB

2020-04-20 Thread Oliver O'Halloran
> So this is not happening soon. Oh ye of little faith. > For the time being, this patchset is good for: > 1. weird hardware which has limited DMA mask (this is why the patchset > was written in the first place) > 2. debug DMA by routing it via IOMMU (even when 4GB hack is not enabled). Sure, but it's still dependent on having firmware which supports the 4GB hack and I don't think that's in any offical firmware releases yet. Oliver

Re: [PATCH 1/2] powerpc: Add base support for ISA v3.1

2020-04-20 Thread Oliver O'Halloran
0 for consistency with the existing three digit definitions when I added the CPU_FTR macro. It doesn't really matter since these are all internal definitions, but I SAY THE BIKESHED SHOULD BE THREE DIGITS LONG. Oliver

Re: [PATCH kernel v2 0/7] powerpc/powenv/ioda: Allow huge DMA window at 4GB

2020-04-20 Thread Oliver O'Halloran
with a skiboot that supports the phb get/set option opal calls so the only systems that can actually take advantage of it are our lab systems. It might still be useful for future systems, but I'd rather something that doesn't depend on FW support. Oliver

[PATCH v2] powerpc/pseries: Make vio and ibmebus initcalls pseries specific

2020-04-21 Thread Oliver O'Halloran
depends on !CONFIG_LITTLE_ENDIAN. This patch squashes those by switching to using machine_*_initcall() so the bus type is only registered when the kernel is running on a pseries machine. Reviewed-by: Tyrel Datwyler Signed-off-by: Oliver O'Halloran -- v2: Added explicit include for machdep.h to fix b

Re: [PATCH] KVM: PPC: Book3S HV: read ibm,secure-memory nodes

2020-04-21 Thread Oliver O'Halloran
g/project/skiboot/patch/20200227204023.22125-2-gr...@linux.ibm.com/ ...which is also marked RFC. Cool. Oliver

Re: [PATCH kernel v2 0/7] powerpc/powenv/ioda: Allow huge DMA window at 4GB

2020-04-22 Thread Oliver O'Halloran
ls so the only systems that can actually > > take advantage of it are our lab systems. It might still be useful for > > future systems, but I'd rather something that doesn't depend on FW > > support. > > Pensando folks use it ;) the what folks Oliver

Re: ioremap() called early from pnv_pci_init_ioda_phb()

2020-05-09 Thread Oliver O'Halloran
ich depend on the PHBs being setup and delay those too though. Oliver

Re: ioremap() called early from pnv_pci_init_ioda_phb()

2020-05-09 Thread Oliver O'Halloran
On Sun, May 10, 2020 at 1:51 AM Christophe Leroy wrote: > > > > Le 08/05/2020 à 19:41, Qian Cai a écrit : > > > > > >> On May 8, 2020, at 10:39 AM, Qian Cai wrote: > >> > >> Booting POWER9 PowerNV has this message, > >> > >> "ioremap() called early from pnv_pci_init_ioda_phb+0x420/0xdfc. Use > >

Re: powerpc/pci: [PATCH 1/1]: PCIE PHB reset

2020-05-11 Thread Oliver O'Halloran
On Fri, May 8, 2020 at 12:36 AM wrote: > > From: Wen Xiong > > Several device drivers hit EEH(Extended Error handling) when triggering > kdump on Pseries PowerVM. This patch implemented a reset of the PHBs > in pci general code. PHB reset stop all PCI transactions from previous > kernel. We have

[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 change

PAPR SCM support

2018-10-09 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 1/2] powerpc/pseries: PAPR persistent memory support

2018-10-09 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

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

2018-10-09 Thread Oliver O'Halloran
s physical 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 ---

[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/includ

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

2018-10-10 Thread Oliver O'Halloran
s physical 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 ---

[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/po

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

2018-10-14 Thread Oliver O'Halloran
s physical 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-

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

2018-11-11 Thread Oliver O'Halloran
crash, > do check pdev->error_state before carrying out the device access. > > * Always be prepared that a device access may fail due to surprise > removal, do not blindly trust mmio or config space reads or > assume success of writes. Completely agree. We really need better documentation of what drivers should be doing. Oliver

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

[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/po

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 bindin

[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: Ol

[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/pse

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

2018-12-06 Thread Oliver O'Halloran
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/pse

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

2018-12-06 Thread Oliver O'Halloran
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 --

[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/po

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

2018-12-06 Thread Oliver O'Halloran
rpose. 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/power

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

2018-12-06 Thread Oliver O'Halloran
f we cannot 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 littl

Re: [PATCH v2 3/6] powerpc/eeh: Improve debug messages around device addition

2019-06-19 Thread Oliver O'Halloran
s. Unaware devices are destroyed and rescanned and the edev->pdev pointer is cleared by pcibios_device_release() In most of these cases it should be safe to use the pci_*() functions rather than making a new one up for printing pdns. In the cases where we might not have a PCI dev i'd make a new set of prints that take an EEH dev rather than a pci_dn since i'd like pci_dn to die sooner rather than later. Oliver

Re: [PATCH 4/4] powerpc/powernv: remove the unused vas_win_paste_addr and vas_win_id functions

2019-06-20 Thread Oliver O'Halloran
On Thu, May 23, 2019 at 5:56 PM Christoph Hellwig wrote: > > These two function have never been used since they were added to the > kernel. > > Signed-off-by: Christoph Hellwig > --- > arch/powerpc/include/asm/vas.h | 10 -- > arch/powerpc/platforms/powernv/vas-window.c | 19

Re: [PATCH 2/4] powerpc/powernv: remove the unused tunneling exports

2019-06-20 Thread Oliver O'Halloran
On Thu, May 23, 2019 at 5:51 PM Christoph Hellwig wrote: > > These have been unused ever since they've been added to the kernel. > > Signed-off-by: Christoph Hellwig > --- > arch/powerpc/include/asm/pnv-pci.h| 4 -- > arch/powerpc/platforms/powernv/pci-ioda.c | 4 +- > arch/powerpc/pla

Re: [PATCH 1/2] powerpc/papr_scm: Update drc_pmem_unbind() to use H_SCM_UNBIND_ALL

2019-06-24 Thread Oliver O'Halloran
On Tue, Jun 25, 2019 at 1:03 AM Vaibhav Jain wrote: > > The new hcall named H_SCM_UNBIND_ALL has been introduce that can > unbind all the memory drc memory-blocks assigned to an lpar. This is > more efficient than using H_SCM_UNBIND_MEM as currently we don't > support partial unbind of drc memory-

Re: [PATCH 2/2] powerpc/papr_scm: Force a scm-unbind if initial scm-bind fails

2019-06-24 Thread Oliver O'Halloran
On Tue, Jun 25, 2019 at 12:59 AM Vaibhav Jain wrote: > > In some cases initial bind of scm memory for an lpar can fail if > previously it wasn't released using a scm-unbind hcall. This situation > can arise due to panic of the previous kernel or forced lpar reset. In > such cases the H_SCM_BIND_ME

Re: [PATCH v2 1/3] powerpc/pseries: Update SCM hcall op-codes in hvcall.h

2019-06-25 Thread Oliver O'Halloran
On Tue, Jun 25, 2019 at 10:27 PM Vaibhav Jain wrote: > > Update the hvcalls.h to include op-codes for new hcalls introduce to > manage SCM memory. Also update existing hcall definitions to reflect > current papr specification for SCM. > > Signed-off-by: Vaibhav Jain > --- > Change-log: > > v2: >

Re: [PATCH v2 3/3] powerpc/papr_scm: Force a scm-unbind if initial scm-bind fails

2019-06-25 Thread Oliver O'Halloran
d then we follow the existing error path. We also > update drc_pmem_bind() to handle the H_OVERLAP error returned by phyp > and indicate it as a EBUSY error back to the caller. > > Suggested-by: "Oliver O'Halloran" > Signed-off-by: Vaibhav Jain > --- &g

Re: [PATCH v2 2/3] powerpc/papr_scm: Update drc_pmem_unbind() to use H_SCM_UNBIND_ALL

2019-06-25 Thread Oliver O'Halloran
' return value. > > * Ensure appropriate error code is returned back from the function > in case of an error. > > Signed-off-by: Vaibhav Jain > --- > Change-log: > > v2: > * Added a dev_dbg when unbind operation succeeds [Oliver] > * Changed type of variable &

Re: [PATCH v3 1/3] powerpc/pseries: Update SCM hcall op-codes in hvcall.h

2019-06-26 Thread Oliver O'Halloran
Single logical change per patch and all that. Reviewed-by: Oliver O'Halloran

Re: [PATCH v3 3/3] powerpc/papr_scm: Force a scm-unbind if initial scm-bind fails

2019-06-26 Thread Oliver O'Halloran
On Thu, Jun 27, 2019 at 2:58 AM Aneesh Kumar K.V wrote: > > Vaibhav Jain writes: > > *snip* > > + /* If phyp says drc memory still bound then force unbound and retry */ > > + if (rc == -EBUSY) { > > + dev_warn(&pdev->dev, "Retrying bind after unbinding\n"); > > + d

Re: [PATCH v3 3/3] powerpc/papr_scm: Force a scm-unbind if initial scm-bind fails

2019-06-26 Thread Oliver O'Halloran
On Thu, Jun 27, 2019 at 12:58 PM Aneesh Kumar K.V wrote: > > "Oliver O'Halloran" writes: > > >> > + rc = drc_pmem_bind(p); > >> > + } > >> > + > >> > if (rc) > >> > goto err;

Re: [PATCH v3 1/3] powerpc/pseries: Update SCM hcall op-codes in hvcall.h

2019-06-27 Thread Oliver O'Halloran
hypervisor. > Where are these hypervisor calls documented? In an internal spec from one the phyp guys. I have been complaining about it not being open (or merged into PAPR at the very least), but it doesn't look like there's been any movement there. Oliver

Re: [PATCH] powerpc/mm/nvdimm: Add an informative message if we fail to allocate altmap block

2019-06-30 Thread Oliver O'Halloran
he reserved pages at the start of the altmap. Maybe this should be a pr_debug() so it's only printed along with the "vmemmap_populate ..." message above? Also, isn't kernel style to keep printf()s, even long ones, on one line? Oliver

Re: [PATCH v2] powerpc/mm/nvdimm: Add an informative message if we fail to allocate altmap block

2019-07-02 Thread Oliver O'Halloran
if (!p) > p = vmemmap_alloc_block_buf(page_size, node); > if (!p) > -- > 2.21.0 > I'll let mpe decide if he cares about the split line thing :) Reviewed-by: Oliver O'Halloran

Re: [PATCH v3 01/16] powerpc/fadump: move internal fadump code to a new file

2019-07-02 Thread Oliver O'Halloran
On Wed, 2019-06-26 at 02:15 +0530, Hari Bathini wrote: > Refactoring fadump code means internal fadump code is referenced from > different places. For ease, move internal code to a new file. Can you elaborate a bit? I don't really get what the difference between fadump and fadump-internal code is

Re: [PATCH v3 03/16] pseries/fadump: move out platform specific support from generic code

2019-07-02 Thread Oliver O'Halloran
On Wed, 2019-06-26 at 02:16 +0530, Hari Bathini wrote: > Introduce callbacks for platform specific operations like register, > unregister, invalidate & such, and move pseries specific code into > platform code. Please don't move around large blocks of code *and* change the code in a single patch.

Re: [PATCH 4/4] powerpc/64: reuse PPC32 static inline flush_dcache_range()

2019-07-08 Thread Oliver O'Halloran
when they hit a sync, but that might change in the future. If it's a problem we could add a cpu-feature section around the isync to no-op it in the common case. However, when I had a look with perf it always showed that the sync was the hotspot so I don't think it'll help much. Oliver

Re: [RFC PATCH] powerpc/powernv: Add ultravisor message log interface

2019-07-08 Thread Oliver O'Halloran
> /* Initialise OPAL message log interface */ > opal_msglog_init(); > + opal_uv_msglog_init(); Gate this behind a FW_FEATURE_ULTRAVISOR (or whatever it is) check. The opal_uv_msglog_init() prints errors at pr_warn() which is going to be spurious for non-uv systems. > /* Create "opal" kobject under /sys/firmware */ > rc = opal_sysfs_init(); > @@ -964,6 +965,7 @@ static int __init opal_init(void) > opal_sys_param_init(); > /* Setup message log sysfs interface. */ > opal_msglog_sysfs_init(); > + opal_uv_msglog_sysfs_init(); Also gate this. Basicly, fold this all into the existing memcons code and ifdef the UV specific bits. They're just not different enough to justify doing otherwise. Oliver

Re: [PATCH 4/4] powerpc/64: reuse PPC32 static inline flush_dcache_range()

2019-07-08 Thread Oliver O'Halloran
On Tue, Jul 9, 2019 at 12:52 PM Aneesh Kumar K.V wrote: > > On 7/9/19 7:50 AM, Oliver O'Halloran wrote: > > On Tue, Jul 9, 2019 at 12:22 AM Aneesh Kumar K.V > > wrote: > >> > >> Christophe Leroy writes: > >> > >>> *snip* >

[PATCH] powerpc/eeh: Handle hugepages in ioremap space

2019-07-10 Thread Oliver O'Halloran
ause it's too busy printing WARN_ON()s. There's no real reason to assume huge pages can't be present and we're prefectly capable of handling them, so do that. Cc: Nicholas Piggin Fixes: 4a7b06c157a2 ("powerpc/eeh: Handle hugepages in ioremap space") Reported-by: Sa

Re: [PATCH 2/4] powerpc/32: activate ARCH_HAS_PMEM_API and ARCH_HAS_UACCESS_FLUSHCACHE

2019-07-15 Thread Oliver O'Halloran
On Mon, Jul 15, 2019 at 4:49 PM Michael Ellerman wrote: > > Christophe Leroy writes: > > PPC32 also have flush_dcache_range() so it can also support > > ARCH_HAS_PMEM_API and ARCH_HAS_UACCESS_FLUSHCACHE without changes. > > > > Signed-off-by: Christophe Leroy > > --- > > arch/powerpc/Kconfig |

Misc EEH fixes

2019-07-15 Thread Oliver O'Halloran
Fixes of no particular importance. I just wanted to cut down the pile of patches I've got hanging around.

[PATCH 1/5] powerpc/eeh_cache: Don't use pci_dn when inserting new ranges

2019-07-15 Thread Oliver O'Halloran
At the point where we start inserting ranges into the EEH address cache the binding between pci_dev and eeh_dev has already been set up. Instead of consulting the pci_dn tree we can retrieve the eeh_dev directly using pci_dev_to_eeh_dev(). Signed-off-by: Oliver O'Halloran --- arch/po

[PATCH 2/5] powerpc/eeh_sysfs: Fix incorrect comment

2019-07-15 Thread Oliver O'Halloran
The EEH_ATTR_SHOW() helper is used to display fields from struct eeh_dev not struct pci_dn. Signed-off-by: Oliver O'Halloran --- arch/powerpc/kernel/eeh_sysfs.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/powerpc/kernel/eeh_sysfs.c b/arch/powerpc/kernel/eeh_sy

[PATCH 3/5] powerpc/eeh_sysfs: ifdef pseries sr-iov sysfs properties

2019-07-15 Thread Oliver O'Halloran
uires some handshaking between the guest, hypervisor and userspace when a VF is EEH frozen which is why these properties exist. This is all dead code on non-pseries platforms so wrap it in an #ifdef CONFIG_PPC_PSERIES to make the dependency clearer. Signed-off-by: Oliver O'Halloran --- arch

[PATCH 4/5] powerpc/eeh_sysfs: Remove double pci_dn lookup.

2019-07-15 Thread Oliver O'Halloran
In eeh_notify_resume_show() the pci_dn for the device is looked up once in the declaration block and then once after checking for a NULL eeh_dev. Remove the second lookup since it's pointless. Signed-off-by: Oliver O'Halloran --- arch/powerpc/kernel/eeh_sysfs.c | 1 - 1 file changed,

[PATCH 5/5] powerpc/eeh_sysfs: Make clearing EEH_DEV_SYSFS saner

2019-07-15 Thread Oliver O'Halloran
s setup for the device for the device in the first place so hitting this warning indicates a programming error. Signed-off-by: Oliver O'Halloran --- arch/powerpc/kernel/eeh.c | 30 +- arch/powerpc/kernel/eeh_sysfs.c | 15 --- 2 files changed,

Re: [EXTERNAL] Re: [PATCH v2 3/6] powerpc/eeh: Improve debug messages around device addition

2019-07-16 Thread Oliver O'Halloran
On Tue, 2019-07-16 at 16:48 +1000, Sam Bobroff wrote: > On Thu, Jun 20, 2019 at 01:45:24PM +1000, Oliver O'Halloran wrote: > > On Thu, Jun 20, 2019 at 12:40 PM Alexey Kardashevskiy > > wrote: > > > On 19/06/2019 14:27, Sam Bobroff wrote: > > > > On Tue,

Re: [PATCH v2] powerpc/nvdimm: Pick the nearby online node if the device node is not online

2019-07-17 Thread Oliver O'Halloran
On Tue, Jul 16, 2019 at 7:08 PM Aneesh Kumar K.V wrote: > > This is similar to what ACPI does. Nvdimm layer doesn't bring the SCM device > numa node online. Hence we need to make sure we always use an online node > as ndr_desc.numa_node. Otherwise this result in kernel crashes. The target > node i

Re: [PATCH] powerpc/dma: Fix invalid DMA mmap behavior

2019-07-17 Thread Oliver O'Halloran
On Thu, Jul 18, 2019 at 1:16 PM Shawn Anastasio wrote: > > On 7/17/19 9:59 PM, Alexey Kardashevskiy wrote: > > > > On 18/07/2019 09:54, Shawn Anastasio wrote: > >> The refactor of powerpc DMA functions in commit cc17d780 > >> ("powerpc/dma: remove dma_nommu_mmap_coherent") incorrectly > >> cha

Re: [PATCH 2/2] powerpc: expose secure variables via sysfs

2019-07-22 Thread Oliver O'Halloran
On Thu, 2019-06-13 at 16:50 -0400, Nayna Jain wrote: > As part of PowerNV secure boot support, OS verification keys are stored > and controlled by OPAL as secure variables. These need to be exposed to > the userspace so that sysadmins can perform key management tasks. > > This patch adds the suppo

Re: [PATCH v5 4/4] powerpc/papr_scm: Force a scm-unbind if initial scm-bind fails

2019-07-24 Thread Oliver O'Halloran
On Wed, Jul 24, 2019 at 7:17 PM Laurent Dufour wrote: > > Le 23/07/2019 à 18:13, Vaibhav Jain a écrit : > > *snip* > > @@ -404,6 +409,14 @@ static int papr_scm_probe(struct platform_device *pdev) > > > > /* request the hypervisor to bind this region to somewhere in memory > > */ > > r

Re: [PATCH v5 4/4] powerpc/papr_scm: Force a scm-unbind if initial scm-bind fails

2019-07-24 Thread Oliver O'Halloran
On Wed, Jul 24, 2019 at 7:27 PM Laurent Dufour wrote: > > Le 24/07/2019 à 11:24, Oliver O'Halloran a écrit : > > On Wed, Jul 24, 2019 at 7:17 PM Laurent Dufour > > wrote: > >> > >> Le 23/07/2019 à 18:13, Vaibhav Jain a écrit : > >>> *snip*

Re: [PATCH v3 9/9] powerpc/eeh: Convert log messages to eeh_edev_* macros

2019-07-24 Thread Oliver O'Halloran
On Wed, Jul 24, 2019 at 7:24 PM kbuild test robot wrote: > > Hi Sam, > > I love your patch! Yet something to improve: > > [auto build test ERROR on linus/master] > [also build test ERROR on v5.3-rc1 next-20190724] > [if your patch is applied to the wrong git tree, please drop us a note to > help

Re: [PATCH 2/2] powerpc: expose secure variables via sysfs

2019-07-24 Thread Oliver O'Halloran
On Wed, Jul 24, 2019 at 12:35 AM Nayna wrote: > > On 07/05/2019 02:05 AM, Michael Ellerman wrote: > > Hi Nayna, > > Hi Michael, Oliver, > > > Nayna Jain writes: > >> As part of PowerNV secure boot support, OS verification keys are stored > >> and

Re: [PATCH v4 7/9] powerpc/eeh: Add bdfn field to eeh_dev

2019-08-08 Thread Oliver O'Halloran
On Thu, Aug 8, 2019 at 5:05 PM Jordan Niethe wrote: > > On Wed, 2019-08-07 at 13:44 +1000, Sam Bobroff wrote: > > From: Oliver O'Halloran > > > > Preparation for removing pci_dn from the powernv EEH code. The only > > thing we really use pci_dn for is to get th

Re: [PATCH 3/3] papr/scm: Add bad memory ranges to nvdimm bad ranges

2019-08-15 Thread Oliver O'Halloran
On Wed, Aug 14, 2019 at 6:25 PM Santosh Sivaraj wrote: > > Subscribe to the MCE notification and add the physical address which > generated a memory error to nvdimm bad range. > > Signed-off-by: Santosh Sivaraj > --- > arch/powerpc/platforms/pseries/papr_scm.c | 65 +++ > 1 f

[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..53

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

2019-01-30 Thread Oliver O'Halloran
ot;powerpc/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.

[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/po

Re: [PATCH net-next v5 12/12] sock: Add SO_RCVTIMEO_NEW and SO_SNDTIMEO_NEW

2019-02-02 Thread Oliver Hartkopp
the naming of these new introduced constants should be replaced with *32 and *64 names. The documentation and the other comments still fit perfectly then. Regards, Oliver

[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-

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

2019-02-07 Thread Oliver O'Halloran
a pr_debug() 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 ---

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

2019-02-07 Thread Oliver O'Halloran
l log. 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/ar

[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/k

[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/in

[PATCH 6/7] powerpc/eeh: Allow disabling recovery

2019-02-07 Thread Oliver O'Halloran
: Oliver O'Halloran --- arch/powerpc/include/asm/eeh.h | 1 + arch/powerpc/kernel/eeh.c | 11 +++ arch/powerpc/kernel/eeh_event.c | 9 + 3 files changed, 21 insertions(+) diff --git a/arch/powerpc/include/asm/eeh.h b/arch/powerpc/include/asm/eeh.h index fc21b6e

[PATCH 7/7] powerpc/eeh: Add eeh_force_recover to debugfs

2019-02-07 Thread Oliver O'Halloran
x27; > /sys/kernel/debug/powerpc/eeh_force_recover To force a scan broken PHBs: echo 'null' > /sys/kernel/debug/powerpc/eeh_force_recover Signed-off-by: Oliver O'Halloran --- arch/powerpc/include/asm/eeh_event.h | 1 + arch/powerpc/kernel/eeh.c| 60 ++

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

2019-02-14 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 u32 and print the value in decimal rather than hex because printing it in hex makes no sense. Signed-off-by: Oliver

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

2019-02-14 Thread Oliver O'Halloran
a pr_debug() 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 ---

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

2019-02-14 Thread Oliver O'Halloran
l log. Signed-off-by: Oliver O'Halloran --- v2: Added missing #endif Replaced while loop with a for --- arch/powerpc/include/asm/eeh.h | 3 +++ arch/powerpc/kernel/eeh.c | 1 + arch/powerpc/kernel/eeh_cache.c | 30 ++ 3 files changed, 30 insertions(+), 4

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

2019-02-14 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 5c5697cced41..9c68f0837385 100644 --- a/arch/powerpc/kernel/eeh_cache.c +++ b/arch/powerpc/k

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

2019-02-14 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 --- v2: Renamed pci_find_hose_for_domain() to pci_find_controller_for_domain() --- arch/powerpc/include/asm/pci-bridge.h | 2 ++ arch/powerpc/kernel/pci-com

[PATCH v2 6/7] powerpc/eeh: Allow disabling recovery

2019-02-14 Thread Oliver O'Halloran
: Oliver O'Halloran --- arch/powerpc/include/asm/eeh.h | 1 + arch/powerpc/kernel/eeh.c | 10 ++ arch/powerpc/kernel/eeh_event.c | 9 + 3 files changed, 20 insertions(+) diff --git a/arch/powerpc/include/asm/eeh.h b/arch/powerpc/include/asm/eeh.h index 478f199

[PATCH v2 7/7] powerpc/eeh: Add eeh_force_recover to debugfs

2019-02-14 Thread Oliver O'Halloran
x27; > /sys/kernel/debug/powerpc/eeh_force_recover To force a scan for broken PHBs: echo 'hwcheck' > /sys/kernel/debug/powerpc/eeh_force_recover Signed-off-by: Oliver O'Halloran --- v2: Rename from pci_find_hose_for_domain() to pci_find_controller_for_domain() Use the more des

Re: [PATCH 04/14] powerpc/vas: Setup IRQ mapping and register port for each window

2019-12-17 Thread Oliver O'Halloran
On Wed, Nov 27, 2019 at 12:07 PM Haren Myneni wrote: > > *snip* > > @@ -36,7 +62,18 @@ static int init_vas_instance(struct platform_device *pdev) > return -ENODEV; > } > > - if (pdev->num_resources != 4) { > + rc = of_property_read_u64(dn, "ibm,vas-port", &port)

<    1   2   3   4   5   6   7   8   9   >