Re: [PATCH 25/42] drivers/scsi/ibmvscsi: Convert snprintf to sysfs_emit

2024-01-16 Thread Tyrel Datwyler
/scsi/ibmvscsi/ibmvfc.c:3513:8-16: WARNING: please use sysfs_emit >> ./drivers/scsi/ibmvscsi/ibmvfc.c:3522:8-16: WARNING: please use sysfs_emit >> ./drivers/scsi/ibmvscsi/ibmvfc.c:3530:8-16: WARNING: please use sysfs_emit > > No functional change intended > > CC: Tyrel Datwyle

Re: [PATCH 1/1] powerpc: fix a memory leak

2023-09-14 Thread Tyrel Datwyler
On 9/14/23 02:46, Yuanjun Gong wrote: > When one of the methods xive_native_alloc_irq_on_chip, irq_create_mapping > or irq_get_handler_data fails, the function will directly return without > disposing vinst->name and vinst. Fix it. > > Fixes: c20e1e299d93 ("powerpc/vas: Alloc and setup IRQ and

Re: [PATCH] scsi: ibmvscsi: Replace all non-returning strlcpy with strscpy

2023-05-17 Thread Tyrel Datwyler
py() completely [2], replace > strlcpy() here with strscpy(). > No return values were used, so direct replacement is safe. > > [1] https://www.kernel.org/doc/html/latest/process/deprecated.html#strlcpy > [2] https://github.com/KSPP/linux/issues/89 > > Signed-off-by: Azeem Shaikh Acked-by: Tyrel Datwyler

Re: [PATCH] powerpc: kernel: pci_dn: Add missing of_node_put() for of_get_xx API

2022-07-01 Thread Tyrel Datwyler
On 7/1/22 12:47, Tyrel Datwyler wrote: > On 7/1/22 06:17, Liang He wrote: >> In pci_add_device_node_info(), we should use of_node_put() for the >> reference 'parent' returned by of_get_parent() to keep refcount >> balance. >> >> Fixes: cca87d303c85 ("powerpc

Re: [PATCH] powerpc: kernel: pci_dn: Add missing of_node_put() for of_get_xx API

2022-07-01 Thread Tyrel Datwyler
On 7/1/22 06:17, Liang He wrote: > In pci_add_device_node_info(), we should use of_node_put() for the > reference 'parent' returned by of_get_parent() to keep refcount > balance. > > Fixes: cca87d303c85 ("powerpc/pci: Refactor pci_dn") > Co-authored-by: Miaoqian Lin > Signed-off-by: Liang He >

[PATCH] ibmvfc: alloc/free queue resource only during probe/remove

2022-06-16 Thread Tyrel Datwyler
nstead during connection resets to sanitize and reconfigure the queues. Fixes: 3034ebe26389 ("scsi: ibmvfc: Add alloc/dealloc routines for SCSI Sub-CRQ Channels") Cc: sta...@vger.kernel.org Signed-off-by: Tyrel Datwyler Reviewed-by: Brian King --- drivers/scsi/ibmvsc

[PATCH] ibmvfc: store vhost pointer during subcrq allocation

2022-06-16 Thread Tyrel Datwyler
] ibmvfc_init_crq+0x160/0x280 [ibmvfc] [c000146235f0] [c0080321a9cc] ibmvfc_probe+0x2a4/0x530 [ibmvfc] Fixes: 3034ebe263897 ("scsi: ibmvfc: Add alloc/dealloc routines for SCSI Sub-CRQ Channels") Cc: sta...@vger.kernel.org Signed-off-by: Tyrel Datwyler Reviewed-by: Brian King --- dr

[PATCH] ibmvfc: multiqueue bug fixes

2022-06-16 Thread Tyrel Datwyler
Fixes for a couple observed crashes of the ibmvfc driver when in MQ mode. Tyrel Datwyler (2): ibmvfc: store vhost pointer during subcrq allocation ibmvfc: alloc/free queue resource only during probe/remove drivers/scsi/ibmvscsi/ibmvfc.c | 82 ++ drivers/scsi

Re: [PATCH v2 0/4] pseries-wdt: initial support for H_WATCHDOG-based watchdog timers

2022-06-16 Thread Tyrel Datwyler
On 6/15/22 18:43, Daniel Henrique Barboza wrote: > Hi, > > I tried this series out with mainline QEMU built with Alexey's patch [1] > and I wasn't able to get it to work. I'm using a simple QEMU command line > booting a fedora36 guest in a Power9 boston host: I would assume the H_WATCHDOG

Re: [PATCH] powerpc/rtas: Allow ibm,platform-dump RTAS call with null buffer address

2022-06-14 Thread Tyrel Datwyler
; Fixes: bd59380c5ba4 ("powerpc/rtas: Restrict RTAS requests from userspace") > Cc: sta...@vger.kernel.org > Reported-by: Sathvika Vasireddy > Signed-off-by: Andrew Donnellan Similar to what is done for ibm,configure-connector with idx_buf2 and a NULL address. Reviewed-by: Ty

Re: [PATCH] powerpc/pci: Add config option for using OF 'reg' for PCI domain

2022-06-09 Thread Tyrel Datwyler
On 6/9/22 13:21, Guilherme G. Piccoli wrote: > First of all, thanks for looping me Bjorn! Much appreciated. > I'm also CCing Ben and Gavin, that know a lot of PPC PCI stuff. > > > On 09/06/2022 16:34, Bjorn Helgaas wrote: >> [...] >>> Upgrading powerpc kernels from LTS 4.4 version (which

Re: [PATCH v2 2/4] of: dynamic: add of_property_alloc() and of_property_free()

2022-06-02 Thread Tyrel Datwyler
On 6/1/22 23:58, Clément Léger wrote: > Le Wed, 1 Jun 2022 15:32:29 -0700, > Tyrel Datwyler a écrit : > >>> /** >>> - * __of_prop_dup - Copy a property dynamically. >>> - * @prop: Property to copy >>> + * of_property_free - Free a property al

Re: [PATCH 1/3] of: dynamic: add of_property_alloc() and of_property_free()

2022-06-02 Thread Tyrel Datwyler
On 6/2/22 07:06, Rob Herring wrote: > On Wed, Jun 1, 2022 at 5:31 PM Tyrel Datwyler wrote: >> >> On 5/5/22 12:37, Rob Herring wrote: >>> On Wed, May 04, 2022 at 05:40:31PM +0200, Clément Léger wrote: >>>> Add function which allows to dynamically al

Re: [PATCH v2 2/4] of: dynamic: add of_property_alloc() and of_property_free()

2022-06-01 Thread Tyrel Datwyler
On 6/1/22 01:17, Clément Léger wrote: > Add function which allows to dynamically allocate and free properties. > Use this function internally for all code that used the same logic > (mainly __of_prop_dup()). > > Signed-off-by: Clément Léger > --- > drivers/of/dynamic.c| 82

Re: [PATCH 1/3] of: dynamic: add of_property_alloc() and of_property_free()

2022-06-01 Thread Tyrel Datwyler
On 5/5/22 12:37, Rob Herring wrote: > On Wed, May 04, 2022 at 05:40:31PM +0200, Clément Léger wrote: >> Add function which allows to dynamically allocate and free properties. >> Use this function internally for all code that used the same logic >> (mainly __of_prop_dup()). >> >> Signed-off-by:

Re: [PATCH] powerpc/eeh: Drop redundant spinlock initialization

2022-05-10 Thread Tyrel Datwyler
On 5/10/22 02:53, Haowen Bai wrote: > slot_errbuf_lock has declared and initialized by DEFINE_SPINLOCK, > so we don't need to spin_lock_init again, drop it. > > Signed-off-by: Haowen Bai > --- > arch/powerpc/platforms/pseries/eeh_pseries.c | 1 - > 1 file changed, 1 deletion(-) > > diff --git

Re: [PATCH] powerpc/pci: Add config option for using OF 'reg' for PCI domain

2022-05-05 Thread Tyrel Datwyler
On 5/5/22 02:31, Pali Rohár wrote: > Hello! > > On Thursday 05 May 2022 07:16:40 Christophe Leroy wrote: >> Le 04/05/2022 à 19:57, Pali Rohár a écrit : >>> Since commit 63a72284b159 ("powerpc/pci: Assign fixed PHB number based on >>> device-tree properties"), powerpc kernel always fallback to PCI

Re: [PATCH] powerpc/pci: Remove useless null check before call of_node_put()

2022-04-25 Thread Tyrel Datwyler
On 4/23/22 07:32, Michael Ellerman wrote: > Tyrel Datwyler writes: >> On 4/20/22 19:52, Haowen Bai wrote: >>> No need to add null check before call of_node_put(), since the >>> implementation of of_node_put() has done it. >>> >>> Signed-off-by:

Re: [PATCH] powerpc/pci: Remove useless null check before call of_node_put()

2022-04-22 Thread Tyrel Datwyler
On 4/20/22 19:52, Haowen Bai wrote: > No need to add null check before call of_node_put(), since the > implementation of of_node_put() has done it. > > Signed-off-by: Haowen Bai > --- > arch/powerpc/kernel/pci_dn.c | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) > > diff --git

[PATCH] ibmvscsis: increase INITIAL_SRP_LIMIT to 1024

2022-03-22 Thread Tyrel Datwyler
st_limit size of 800. Signed-off-by: Tyrel Datwyler --- drivers/scsi/ibmvscsi_tgt/ibmvscsi_tgt.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/scsi/ibmvscsi_tgt/ibmvscsi_tgt.c b/drivers/scsi/ibmvscsi_tgt/ibmvscsi_tgt.c index 61f06f6885a5..89b9fbce7488 10064

Re: [PATCH] powerpc: kernel: fix a refcount leak in format_show()

2022-03-01 Thread Tyrel Datwyler
On 3/1/22 04:55, Michael Ellerman wrote: > Hangyu Hua writes: >> node needs to be dropped when of_property_read_string fails. So an earlier >> call >> to of_node_put is required here. > > That's true but ... > >> diff --git a/arch/powerpc/kernel/secvar-sysfs.c >>

Re: [PATCH] powerpc/pseries: make pseries_devicetree_update() static

2022-02-08 Thread Tyrel Datwyler
On 2/7/22 2:12 PM, Nathan Lynch wrote: > pseries_devicetree_update() has only one call site, in the same file in > which it is defined. Make it static. > > Signed-off-by: Nathan Lynch > --- Reviewed-by: Tyrel Datwyler

Re: [PATCH v4] powerpc/pseries: read the lpar name from the firmware

2022-01-05 Thread Tyrel Datwyler
On 1/5/22 5:36 PM, Nathan Lynch wrote: > Tyrel Datwyler writes: >> On 1/5/22 3:19 PM, Nathan Lynch wrote: >>> >> >> Is there benefit of adding a partition_name field/value pair to lparcfg? The >> lparstat utility can just as easily make the get_sysparm call v

Re: [PATCH v4] powerpc/pseries: read the lpar name from the firmware

2022-01-05 Thread Tyrel Datwyler
On 1/5/22 3:19 PM, Nathan Lynch wrote: > Laurent Dufour writes: >> On 07/12/2021, 18:11:09, Laurent Dufour wrote: >>> The LPAR name may be changed after the LPAR has been started in the HMC. >>> In that case lparstat command is not reporting the updated value because it >>> reads it from the

Re: [PATCH] ethernet: ibmveth: use default_groups in kobj_type

2022-01-05 Thread Tyrel Datwyler
"David S. Miller" > Cc: Jakub Kicinski > Cc: linuxppc-dev@lists.ozlabs.org > Cc: net...@vger.kernel.org > Signed-off-by: Greg Kroah-Hartman > --- Reviewed-by: Tyrel Datwyler

Re: [PATCH] powerpc/cacheinfo: use default_groups in kobj_type

2022-01-04 Thread Tyrel Datwyler
R. Shenoy" > Cc: Parth Shah > Cc: linuxppc-dev@lists.ozlabs.org > Signed-off-by: Greg Kroah-Hartman > --- Reviewed-by: Tyrel Datwyler

Re: [PATCH] tpm: Fix kexec crash due to access to ops NULL pointer (powerpc)

2021-12-20 Thread Tyrel Datwyler
On 12/20/21 5:31 PM, Stefan Berger wrote: > > On 12/20/21 20:13, Jason Gunthorpe wrote: >> On Mon, Dec 20, 2021 at 08:05:58PM -0500, Stefan Berger wrote: >> >>> diff --git a/drivers/char/tpm/tpm-chip.c b/drivers/char/tpm/tpm-chip.c >>> index ddaeceb7e109..4cb908349b31 100644 >>> +++

Re: [PATCH] tpm: Fix kexec crash due to access to ops NULL pointer (powerpc)

2021-12-20 Thread Tyrel Datwyler
On 12/20/21 5:05 PM, Stefan Berger wrote: > > On 12/20/21 19:39, Tyrel Datwyler wrote: >> On 12/11/21 5:28 PM, Stefan Berger wrote: >>> Fix the following crash on kexec by checking chip->ops for a NULL pointer >>> in tpm_chip_start() and returning an error code

Re: [PATCH] tpm: Fix kexec crash due to access to ops NULL pointer (powerpc)

2021-12-20 Thread Tyrel Datwyler
On 12/11/21 5:28 PM, Stefan Berger wrote: > Fix the following crash on kexec by checking chip->ops for a NULL pointer > in tpm_chip_start() and returning an error code if this is the case. > > BUG: Kernel NULL pointer dereference on read at 0x0060 > Faulting instruction address:

Re: [PATCH] powerpc/rtas: Introduce rtas_get_sensor_nonblocking() for pci hotplug driver.

2021-11-29 Thread Tyrel Datwyler
On 11/29/21 5:06 PM, Nathan Lynch wrote: > Tyrel Datwyler writes: >> On 11/29/21 12:58 AM, Mahesh Salgaonkar wrote: >>> -int rtas_get_sensor_fast(int sensor, int index, int *state) >>> +static int >>> +__rtas_get_sensor(int sensor, int index, int *state, bo

Re: [PATCH] powerpc/rtas: Introduce rtas_get_sensor_nonblocking() for pci hotplug driver.

2021-11-29 Thread Tyrel Datwyler
On 11/29/21 12:58 AM, Mahesh Salgaonkar wrote: > When certain PHB HW failure causes phyp to recover PHB, it marks the PE > state as temporarily unavailable until recovery is complete. This also > triggers an EEH handler in Linux which needs to notify drivers, and perform > recovery. But before

Re: [PATCH] powerpc/pseries/vas: Don't print an error when VAS is unavailable

2021-11-29 Thread Tyrel Datwyler
On 11/26/21 2:31 AM, Nicholas Piggin wrote: > Excerpts from Cédric Le Goater's message of November 26, 2021 5:13 pm: >> On 11/26/21 06:21, Nicholas Piggin wrote: >>> KVM does not support VAS so guests always print a useless error on boot >>> >>> vas: HCALL(398) error -2, query_type 0, result

Re: [PATCH] soc: fsl: guts: Fix a resource leak in the error handling path of 'fsl_guts_probe()'

2021-10-22 Thread Tyrel Datwyler
On 10/21/21 5:26 PM, Li Yang wrote: > On Wed, Aug 18, 2021 at 4:23 PM Christophe JAILLET > wrote: >> >> If an error occurs after 'of_find_node_by_path()', the reference taken for >> 'root' will never be released and some memory will leak. > > Thanks for finding this. This truly is a problem. >

Re: [PATCH] powerpc/pseries/mobility: ignore ibm, platform-facilities updates

2021-10-20 Thread Tyrel Datwyler
On 10/20/21 8:54 AM, Nathan Lynch wrote: > Tyrel Datwyler writes: >> On 10/19/21 2:36 PM, Nathan Lynch wrote: >>> Tyrel Datwyler writes: >>>> On 10/18/21 9:34 AM, Nathan Lynch wrote: >>>>> On VMs with NX encryption, compression, and/or RNG offload, th

Re: [PATCH] PCI/hotplug: Remove unneeded of_node_put() in pnv_php

2021-10-20 Thread Tyrel Datwyler
On 10/20/21 4:39 AM, Nathan Lynch wrote: > Wan Jiabing writes: >> Fix following coccicheck warning: >> ./drivers/pci/hotplug/pnv_php.c:161:2-13: ERROR: probable double put. >> >> Device node iterators put the previous value of the index variable, so >> an explicit put causes a double put. > > I

Re: [PATCH] PCI/hotplug: Remove unneeded of_node_put() in pnv_php

2021-10-20 Thread Tyrel Datwyler
On 10/20/21 2:46 AM, Wan Jiabing wrote: > Fix following coccicheck warning: > ./drivers/pci/hotplug/pnv_php.c:161:2-13: ERROR: probable double put. > > Device node iterators put the previous value of the index variable, so > an explicit put causes a double put. > > Signed-off-by: Wan Jiabing

Re: [PATCH] powerpc/pseries/mobility: ignore ibm, platform-facilities updates

2021-10-19 Thread Tyrel Datwyler
On 10/19/21 2:36 PM, Nathan Lynch wrote: > Hi Tyrel, thanks for the detailed review. > > Tyrel Datwyler writes: >> On 10/18/21 9:34 AM, Nathan Lynch wrote: >>> On VMs with NX encryption, compression, and/or RNG offload, these >>> capabilities are described by nod

Re: [PATCH] powerpc/pseries/mobility: ignore ibm, platform-facilities updates

2021-10-18 Thread Tyrel Datwyler
On 10/18/21 3:37 PM, Tyrel Datwyler wrote: > On 10/18/21 9:34 AM, Nathan Lynch wrote: <> >> >> One way to address that would be to make the drivers respond to node >> removal notifications, so that node references can be dropped >> appropriately. But th

Re: [PATCH] powerpc/pseries/mobility: ignore ibm, platform-facilities updates

2021-10-18 Thread Tyrel Datwyler
On 10/18/21 9:34 AM, Nathan Lynch wrote: > On VMs with NX encryption, compression, and/or RNG offload, these > capabilities are described by nodes in the ibm,platform-facilities device > tree hierarchy: > > $ tree -d /sys/firmware/devicetree/base/ibm,platform-facilities/ >

Re: [PATCH][next] powerpc/vas: Fix potential NULL pointer dereference

2021-10-18 Thread Tyrel Datwyler
the usage pattern it is obvious that if we determine !ptr attempting to also confirm !ptr->ops is going to blow up. LGTM. Reviewed-by: Tyrel Datwyler > --- > arch/powerpc/platforms/book3s/vas-api.c | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) > > diff --git a/ar

Re: [PATCH net-next 11/12] ethernet: ibmveth: use ether_addr_to_u64()

2021-10-15 Thread Tyrel Datwyler
us the const qualifier. Reviewed-by: Tyrel Datwyler > > Similar story to mlx4. > > Signed-off-by: Jakub Kicinski > --- > CC: cforn...@linux.ibm.com > CC: m...@ellerman.id.au > CC: b...@kernel.crashing.org > CC: pau...@samba.org > CC: linuxppc-dev@lists.ozlabs.org &

Re: [PATCH] ibmvscsi: use GFP_KERNEL with dma_alloc_coherent in initialize_event_pool

2021-10-15 Thread Tyrel Datwyler
On 10/14/21 9:36 PM, Michael Ellerman wrote: > Tyrel Datwyler writes: >> Just stumbled upon this trivial little patch that looks to have gotten lost >> in >> the shuffle. Seems it even got a reviewed-by from Brian [1]. >> >> So, uh I guess after almost 3 years.

Re: [PATCH] ibmvscsi: use GFP_KERNEL with dma_alloc_coherent in initialize_event_pool

2021-10-14 Thread Tyrel Datwyler
:59 PM, Tyrel Datwyler wrote: > During driver probe we allocate a dma region for our event pool. > Currently, zero is passed for the gfp_flags parameter. Driver probe > callbacks run in process context and we hold no locks so we can sleep > here if necessary. > > Fix by passing GFP

Re: [PATCH v2] scsi: ibmvscsi: Use dma_alloc_noncoherent() instead of get_zeroed_page/dma_map_single()

2021-10-14 Thread Tyrel Datwyler
On 10/11/21 8:23 PM, Cai Huoqing wrote: > Replacing get_zeroed_page/free_page/dma_map_single/dma_unmap_single() > with dma_alloc_noncoherent/dma_free_noncoherent() helps to reduce > code size, and simplify the code, and the hardware can keeep DMA > coherent itsel Not sure why the switch from

Re: [PATCH] powerpc: fix unbalanced node refcount in check_kvm_guest()

2021-09-28 Thread Tyrel Datwyler
e code slightly to > avoid repetition or goto. > > Signed-off-by: Nathan Lynch > Fixes: 107c55005fbd ("powerpc/pseries: Add KVM guest doorbell restrictions") Reviewed-by: Tyrel Datwyler

Re: [PATCH] pci/hotplug/pnv-php: Remove probable double put

2021-09-07 Thread Tyrel Datwyler
On 9/7/21 1:59 AM, Xu Wang wrote: > Device node iterators put the previous value of the index variable, > so an explicit put causes a double put. > > Signed-off-by: Xu Wang > --- > drivers/pci/hotplug/pnv_php.c | 1 - > 1 file changed, 1 deletion(-) > > diff --git

[PATCH] ibmvfc: fix command state accounting and stale response detection

2021-07-16 Thread Tyrel Datwyler
the purge list as a result of error handling or adapter reset. Cc: sta...@vger.kernel.org Fixes: 1f4a4a19508d ("scsi: ibmvfc: Complete commands outside the host/queue lock") Signed-off-by: Tyrel Datwyler --- drivers/scsi/ibmvscsi/ibmvfc.c | 19 +-- drivers/scsi/ibmvscs

Re: [PATCH 1/2] powerpc/prom_init: Convert prom_strcpy() into prom_strscpy_pad()

2021-06-22 Thread Tyrel Datwyler
On 6/21/21 9:11 PM, Michael Ellerman wrote: > Daniel Axtens writes: >> Hi >> >>> -static char __init *prom_strcpy(char *dest, const char *src) >>> +static ssize_t __init prom_strscpy_pad(char *dest, const char *src, size_t >>> n) >>> { >>> - char *tmp = dest; >>> + ssize_t rc; >>> +

Re: [PATCH 2/2] powerpc/prom_init: Pass linux_banner to firmware via option vector 7

2021-06-22 Thread Tyrel Datwyler
On 6/20/21 11:49 PM, Michael Ellerman wrote: > Pass the value of linux_banner to firmware via option vector 7. > > Option vector 7 is described in "LoPAR" Linux on Power Architecture > Reference v2.9, in table B.7 on page 824: > > An ASCII character formatted null terminated string that

Re: [PATCH v3] pseries/drmem: update LMBs after LPM

2021-05-03 Thread Tyrel Datwyler
On 5/3/21 10:28 AM, Laurent Dufour wrote: > Le 01/05/2021 à 01:58, Tyrel Datwyler a écrit : >> On 4/30/21 9:13 AM, Laurent Dufour wrote: >>> Le 29/04/2021 à 21:12, Tyrel Datwyler a écrit : >>>> On 4/29/21 3:27 AM, Aneesh Kumar K.V wrote: >>>>> Laurent D

Re: [RFC] powerpc/pseries: delete scanlog

2021-05-03 Thread Tyrel Datwyler
t knows better. +1 Feel free to add my RB tag to any non-RFC followup. Reviewed-by: Tyrel Datwyler > > Signed-off-by: Nathan Lynch > --- > arch/powerpc/configs/ppc64_defconfig | 1 - > arch/powerpc/configs/pseries_defconfig | 1 - > arch/powerpc/platforms/pser

Re: [PATCH v3] pseries/drmem: update LMBs after LPM

2021-04-30 Thread Tyrel Datwyler
On 4/30/21 9:13 AM, Laurent Dufour wrote: > Le 29/04/2021 à 21:12, Tyrel Datwyler a écrit : >> On 4/29/21 3:27 AM, Aneesh Kumar K.V wrote: >>> Laurent Dufour writes: >>> >>>> After a LPM, the device tree node ibm,dynamic-reconfiguration-memory may be >

Re: [PATCH] ppc64/numa: consider the max numa node for migratable LPAR

2021-04-29 Thread Tyrel Datwyler
On 4/29/21 11:19 AM, Laurent Dufour wrote: > When a LPAR is migratable, we should consider the maximum possible NUMA > node instead the number of NUMA node from the actual system. > > The DT property 'ibm,current-associativity-domains' is defining the maximum > number of nodes the LPAR can see

Re: [PATCH v3] pseries/drmem: update LMBs after LPM

2021-04-29 Thread Tyrel Datwyler
t >> the LMB's associativity node has not been updated after the DT node update >> and thus the node is overwritten by the Linux's topology instead of the >> hypervisor one. >> >> Introduce a hook called when the ibm,dynamic-reconfiguration-memory node is >>

Re: [PATCH v6] powerpc/kexec_file: use current CPU info while setting up FDT

2021-04-27 Thread Tyrel Datwyler
On 4/26/21 9:51 PM, Sourabh Jain wrote: > kexec_file_load uses initial_boot_params in setting up the device-tree > for the kernel to be loaded. Though initial_boot_params holds info > about CPUs at the time of boot, it doesn't account for hot added CPUs. > > So, kexec'ing with kexec_file_load

Re: [PATCH] pseries/drmem: update LMBs after LPM

2021-04-27 Thread Tyrel Datwyler
ode update > and thus the node is overwritten by the Linux's topology instead of the > hypervisor one. > > Introduce a hook called when the ibm,dynamic-reconfiguration-memory node is > updated to force an update of the LMB's associativity. > > Cc: Tyrel Datwyler > Signed-o

Re: [PATCH] pseries/drmem: update LMBs after LPM

2021-04-27 Thread Tyrel Datwyler
On 4/27/21 8:01 AM, Laurent Dufour wrote: > After a LPM, the device tree node ibm,dynamic-reconfiguration-memory may be > updated by the hypervisor in the case the NUMA topology of the LPAR's > memory is updated. > > This is caught by the kernel, but the memory's node is updated because > there

Re: [PATCH] powerpc/pseries: Add shutdown() to vio_driver and vio_bus

2021-04-19 Thread Tyrel Datwyler
On 4/17/21 5:30 AM, Michael Ellerman wrote: > Tyrel Datwyler writes: >> On 4/1/21 5:13 PM, Tyrel Datwyler wrote: >>> Currently, neither the vio_bus or vio_driver structures provide support >>> for a shutdown() routine. >>> >>> Add support

Re: [PATCH] powerpc/pseries: extract host bridge from pci_bus prior to bus removal

2021-04-16 Thread Tyrel Datwyler
t; Daniel > >> Fixes: 7340056567e3 ("powerpc/pci: Reorder pci bus/bridge unregistration >> during PHB removal") >> Signed-off-by: Tyrel Datwyler >> --- >> arch/powerpc/platforms/pseries/pci_dlpar.c | 4 +++- >> 1 file changed, 3 insertions(+),

Re: [PATCH] powerpc/pseries: Add shutdown() to vio_driver and vio_bus

2021-04-16 Thread Tyrel Datwyler
On 4/1/21 5:13 PM, Tyrel Datwyler wrote: > Currently, neither the vio_bus or vio_driver structures provide support > for a shutdown() routine. > > Add support for shutdown() by allowing drivers to provide a > implementation via function pointer in their vio_driver struct and >

Re: [PATCH] powerpc/pseries: extract host bridge from pci_bus prior to bus removal

2021-04-13 Thread Tyrel Datwyler
On 2/11/21 10:24 AM, Tyrel Datwyler wrote: > The pci_bus->bridge reference may no longer be valid after > pci_bus_remove() resulting in passing a bad value to device_unregister() > for the associated bridge device. > > Store the host_bridge reference in a separ

[PATCH] ibmvfc: Fix invalid state machine BUG_ON

2021-04-12 Thread Tyrel Datwyler
[SCSI] ibmvfc: Fix soft lockup on resume") Signed-off-by: Brian King [tyreld: added fixes tag] Signed-off-by: Tyrel Datwyler --- drivers/scsi/ibmvscsi/ibmvfc.c | 53 ++ 1 file changed, 34 insertions(+), 19 deletions(-) diff --git a/drivers/scsi/ibmvscsi/

[PATCH] powerpc/pseries: Add shutdown() to vio_driver and vio_bus

2021-04-01 Thread Tyrel Datwyler
that calls a vio drivers shutdown() if defined. In the case that no shutdown() is defined by a vio driver and a kexec is in progress we implement a big hammer that calls remove() to ensure no further DMA for the devices is possible. Signed-off-by: Tyrel Datwyler --- arch/powerpc/include/asm/vio.h

Re: [PATCH] powerpc/pseries: Only register vio drivers if vio bus exists

2021-03-30 Thread Tyrel Datwyler
mebus initcalls pseries > specific") > Reported-by: Paul Menzel > Signed-off-by: Michael Ellerman > --- Reviewed-by: Tyrel Datwyler

[PATCH 1/2] ibmvfc: fix potential race in ibmvfc_wait_for_ops

2021-03-19 Thread Tyrel Datwyler
matching command that ibmvfc needs to wait on is not already on the free list. Fixes: 1f4a4a19508d ("scsi: ibmvfc: Complete commands outside the host/queue lock") Signed-off-by: Tyrel Datwyler --- drivers/scsi/ibmvscsi/ibmvfc.c | 42 ++ 1 file c

[PATCH 2/2] ibmvfc: make ibmvfc_wait_for_ops MQ aware

2021-03-19 Thread Tyrel Datwyler
management commands. As such the CRQ events are ignored when operating in MQ mode with channels. Fixes: 9000cb998bcf ("scsi: ibmvfc: Enable MQ and set reasonable defaults") Signed-off-by: Tyrel Datwyler --- drivers/scsi/ibmvscsi/ibmvfc.c | 51 ++ 1 file c

[PATCH 0/2] Fix EH race and MQ support

2021-03-19 Thread Tyrel Datwyler
-queues isntead of the primary CRQ. Tyrel Datwyler (2): ibmvfc: fix potential race in ibmvfc_wait_for_ops ibmvfc: make ibmvfc_wait_for_ops MQ aware drivers/scsi/ibmvscsi/ibmvfc.c | 67 +++--- 1 file changed, 54 insertions(+), 13 deletions(-) -- 2.27.0

[PATCH v2] rpadlpar: fix potential drc_name corruption in store functions

2021-03-15 Thread Tyrel Datwyler
: drc_name = PHB 4543°|<82>!, rc = -19 Fix this by using strscpy() instead of memcpy() to ensure the string is NULL terminated when copied into the static drc_name buffer. Further, since the string is now NULL terminated the code only needs to change '\n' to '\0' when present. Signed-off-by

Re: [PATCH] rpadlpar: fix potential drc_name corruption in store functions

2021-03-15 Thread Tyrel Datwyler
On 3/14/21 7:52 PM, Michael Ellerman wrote: > Tyrel Datwyler writes: >> On 3/13/21 1:17 AM, Michal Suchánek wrote: >>> On Wed, Mar 10, 2021 at 04:30:21PM -0600, Tyrel Datwyler wrote: >>>> Both add_slot_store() and remove_slot_store() try to fix up the drc_name >

Re: [PATCH] rpadlpar: fix potential drc_name corruption in store functions

2021-03-14 Thread Tyrel Datwyler
On 3/13/21 1:17 AM, Michal Suchánek wrote: > On Wed, Mar 10, 2021 at 04:30:21PM -0600, Tyrel Datwyler wrote: >> Both add_slot_store() and remove_slot_store() try to fix up the drc_name >> copied from the store buffer by placing a NULL terminator at nbyte + 1 >> or in place

[PATCH] ibmvfc: free channel_setup_buf during device tear down

2021-03-10 Thread Tyrel Datwyler
in ibmvfc_free_mem(). Fixes: e95eef3fc0bc ("scsi: ibmvfc: Implement channel enquiry and setup commands") Signed-off-by: Tyrel Datwyler --- drivers/scsi/ibmvscsi/ibmvfc.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/scsi/ibmvscsi/ibmvfc.c b/drivers/scsi/ibmvscsi/ibmvfc.c index e6

[PATCH] rpadlpar: fix potential drc_name corruption in store functions

2021-03-10 Thread Tyrel Datwyler
beyond the nth-byte of data copied from the user. Further, since the string is now NULL terminated the code only needs to change '\n' to '\0' when present. Signed-off-by: Tyrel Datwyler --- drivers/pci/hotplug/rpadlpar_sysfs.c | 14 ++ 1 file changed, 6 insertions(+), 8 deletions(-) d

Re: [PATCH] scsi: ibmvfc: Switch to using the new API kobj_to_dev()

2021-03-04 Thread Tyrel Datwyler
On 3/4/21 1:28 AM, Jiapeng Chong wrote: > Fix the following coccicheck warnings: > > ./drivers/scsi/ibmvscsi/ibmvfc.c:3483:60-61: WARNING opportunity for > kobj_to_dev(). > > Reported-by: Abaci Robot > Signed-off-by: Jiapeng Chong Acked-by: Tyrel Datwyler > ---

[PATCH v5 5/5] ibmvfc: reinitialize sub-CRQs and perform channel enquiry after LPM

2021-03-02 Thread Tyrel Datwyler
renegotiation. fixes: 3034ebe26389 ("ibmvfc: add alloc/dealloc routines for SCSI Sub-CRQ Channels") Signed-off-by: Tyrel Datwyler Reviewed-by: Brian King --- drivers/scsi/ibmvscsi/ibmvfc.c | 12 1 file changed, 12 insertions(+) diff --git a/drivers/scsi/ibmvscsi/ibmvfc.c

[PATCH v5 4/5] ibmvfc: store return code of H_FREE_SUB_CRQ during cleanup

2021-03-02 Thread Tyrel Datwyler
amount of time. Fixes: 39e461fddff0 ("ibmvfc: map/request irq and register Sub-CRQ interrupt handler") Signed-off-by: Tyrel Datwyler Reviewed-by: Brian King --- drivers/scsi/ibmvscsi/ibmvfc.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/drivers/scsi/ibmvscsi/

[PATCH v5 1/5] ibmvfc: simplify handling of sub-CRQ initialization

2021-03-02 Thread Tyrel Datwyler
sue, by tying a sub-CRQ setup failure and do_enquiry logic into ibmvfc_init_sub_crqs(). Signed-off-by: Tyrel Datwyler Reviewed-by: Brian King --- drivers/scsi/ibmvscsi/ibmvfc.c | 21 ++--- 1 file changed, 10 insertions(+), 11 deletions(-) diff --git a/drivers/scsi/ibmvscsi/ibmvfc.

[PATCH v5 0/5] ibmvfc: hard reset fixes

2021-03-02 Thread Tyrel Datwyler
rect amount of time * Patch 5: (new) similar fix for LPM case where CRQ pair needs re-enablement Tyrel Datwyler (5): powerpc/pseries: extract host bridge from pci_bus prior to bus removal ibmvfc: simplify handling of sub-CRQ initialization ibmvfc: fix invalid sub-CRQ handles after hard reset ib

[PATCH v5 2/5] ibmvfc: fix invalid sub-CRQ handles after hard reset

2021-03-02 Thread Tyrel Datwyler
once a new CRQ is registered with the hypervisor. fixes: 3034ebe26389 ("ibmvfc: add alloc/dealloc routines for SCSI Sub-CRQ Channels") Signed-off-by: Tyrel Datwyler Reviewed-by: Brian King --- drivers/scsi/ibmvscsi/ibmvfc.c | 21 + 1 file changed, 9 insertions(+), 12

[PATCH v5 3/5] ibmvfc: treat H_CLOSED as success during sub-CRQ registration

2021-03-02 Thread Tyrel Datwyler
setup. Fixes: 3034ebe26389 ("ibmvfc: add alloc/dealloc routines for SCSI Sub-CRQ Channels") Signed-off-by: Tyrel Datwyler Reviewed-by: Brian King --- drivers/scsi/ibmvscsi/ibmvfc.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/scsi/ibmvscsi/ibmvfc.c

Re: [PATCH 40/44] tty: hvc, drop unneeded forward declarations

2021-03-02 Thread Tyrel Datwyler
; > Signed-off-by: Jiri Slaby > Cc: linuxppc-dev@lists.ozlabs.org Reviewed-by: Tyrel Datwyler > --- > drivers/tty/hvc/hvcs.c | 25 - > 1 file changed, 25 deletions(-) > > diff --git a/drivers/tty/hvc/hvcs.c b/drivers/tty/hvc/hvcs.c >

Re: [PATCH v3 2/5] ibmvfc: fix invalid sub-CRQ handles after hard reset

2021-02-25 Thread Tyrel Datwyler
On 2/25/21 1:42 PM, Tyrel Datwyler wrote: > A hard reset results in a complete transport disconnect such that the > CRQ connection with the partner VIOS is broken. This has the side effect > of also invalidating the associated sub-CRQs. The current code assumes > that the sub-CRQs a

Re: [PATCH v3 5/5] ibmvfc: reinitialize sub-CRQs and perform channel enquiry after LPM

2021-02-25 Thread Tyrel Datwyler
On 2/25/21 1:42 PM, Tyrel Datwyler wrote: > A live partition migration (LPM) results in a CRQ disconnect similar to > a hard reset. In this LPM case the hypervisor moslty perserves the CRQ > transport such that it simply needs to be reenabled. However, the > capabilities may

[PATCH v4 2/5] ibmvfc: fix invalid sub-CRQ handles after hard reset

2021-02-25 Thread Tyrel Datwyler
once a new CRQ is registered with the hypervisor. fixes: faacf8c5f1d5 ("ibmvfc: add alloc/dealloc routines for SCSI Sub-CRQ Channels") Signed-off-by: Tyrel Datwyler --- drivers/scsi/ibmvscsi/ibmvfc.c | 21 + 1 file changed, 9 insertions(+), 12 deletions(-) diff --git

[PATCH v4 5/5] ibmvfc: reinitialize sub-CRQs and perform channel enquiry after LPM

2021-02-25 Thread Tyrel Datwyler
renegotiation. fixes: faacf8c5f1d5 ("ibmvfc: add alloc/dealloc routines for SCSI Sub-CRQ Channels") Signed-off-by: Tyrel Datwyler --- drivers/scsi/ibmvscsi/ibmvfc.c | 12 1 file changed, 12 insertions(+) diff --git a/drivers/scsi/ibmvscsi/ibmvfc.c b/drivers/scsi/ibmvscs

[PATCH v4 0/5] ibmvfc: hard reset fixes

2021-02-25 Thread Tyrel Datwyler
eeds re-enablement Tyrel Datwyler (5): powerpc/pseries: extract host bridge from pci_bus prior to bus removal ibmvfc: simplify handling of sub-CRQ initialization ibmvfc: fix invalid sub-CRQ handles after hard reset ibmvfc: treat H_CLOSED as success during sub-CRQ registration ibmvfc: s

[PATCH v4 3/5] ibmvfc: treat H_CLOSED as success during sub-CRQ registration

2021-02-25 Thread Tyrel Datwyler
setup. Fixes: faacf8c5f1d5 ("ibmvfc: add alloc/dealloc routines for SCSI Sub-CRQ Channels") Signed-off-by: Tyrel Datwyler Reviewed-by: Brian King --- drivers/scsi/ibmvscsi/ibmvfc.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/scsi/ibmvscsi/ibmvfc.c

[PATCH v4 4/5] ibmvfc: store return code of H_FREE_SUB_CRQ during cleanup

2021-02-25 Thread Tyrel Datwyler
amount of time. Fixes: 9288d35d70b5 ("ibmvfc: map/request irq and register Sub-CRQ interrupt handler") Signed-off-by: Tyrel Datwyler Reviewed-by: Brian King --- drivers/scsi/ibmvscsi/ibmvfc.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/drivers/scsi/ibmvscsi/

[PATCH v4 1/5] ibmvfc: simplify handling of sub-CRQ initialization

2021-02-25 Thread Tyrel Datwyler
sue, by tying a sub-CRQ setup failure and do_enquiry logic into ibmvfc_init_sub_crqs(). Signed-off-by: Tyrel Datwyler Reviewed-by: Brian King --- drivers/scsi/ibmvscsi/ibmvfc.c | 21 ++--- 1 file changed, 10 insertions(+), 11 deletions(-) diff --git a/drivers/scsi/ibmvscsi/ibmvfc.

[PATCH v3 5/5] ibmvfc: reinitialize sub-CRQs and perform channel enquiry after LPM

2021-02-25 Thread Tyrel Datwyler
renegotiation. Signed-off-by: Tyrel Datwyler --- drivers/scsi/ibmvscsi/ibmvfc.c | 12 1 file changed, 12 insertions(+) diff --git a/drivers/scsi/ibmvscsi/ibmvfc.c b/drivers/scsi/ibmvscsi/ibmvfc.c index 1bb08e5f3674..6bbc2697ad5a 100644 --- a/drivers/scsi/ibmvscsi/ibmvfc.c +++ b

[PATCH v3 4/5] ibmvfc: store return code of H_FREE_SUB_CRQ during cleanup

2021-02-25 Thread Tyrel Datwyler
amount of time. Fixes: 9288d35d70b5 ("ibmvfc: map/request irq and register Sub-CRQ interrupt handler") Signed-off-by: Tyrel Datwyler Reviewed-by: Brian King --- drivers/scsi/ibmvscsi/ibmvfc.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/drivers/scsi/ibmvscsi/

[PATCH v3 3/5] ibmvfc: treat H_CLOSED as success during sub-CRQ registration

2021-02-25 Thread Tyrel Datwyler
setup. Fixes: faacf8c5f1d5 ("ibmvfc: add alloc/dealloc routines for SCSI Sub-CRQ Channels") Signed-off-by: Tyrel Datwyler Reviewed-by: Brian King --- drivers/scsi/ibmvscsi/ibmvfc.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/scsi/ibmvscsi/ibmvfc.c

[PATCH v3 0/5] ibmvfc: hard reset fixes

2021-02-25 Thread Tyrel Datwyler
tags for patches 1-3 * Patch 4: use rtas_busy_delay to test rc and delay correct amount of time * Patch 5: (new) similar fix for LPM case where CRQ pair needs re-enablement Tyrel Datwyler (5): powerpc/pseries: extract host bridge from pci_bus prior to bus removal ibmvfc: simplify handling of sub

[PATCH v3 1/5] ibmvfc: simplify handling of sub-CRQ initialization

2021-02-25 Thread Tyrel Datwyler
sue, by tying a sub-CRQ setup failure and do_enquiry logic into ibmvfc_init_sub_crqs(). Signed-off-by: Tyrel Datwyler Reviewed-by: Brian King --- drivers/scsi/ibmvscsi/ibmvfc.c | 21 ++--- 1 file changed, 10 insertions(+), 11 deletions(-) diff --git a/drivers/scsi/ibmvscsi/ibmvfc.

[PATCH v3 2/5] ibmvfc: fix invalid sub-CRQ handles after hard reset

2021-02-25 Thread Tyrel Datwyler
once a new CRQ is registered with the hypervisor. fixes: faacf8c5f1d5 ("ibmvfc: add alloc/dealloc routines for SCSI Sub-CRQ Channels") Signed-off-by: Tyrel Datwyler Reviewed-by: Brian King --- drivers/scsi/ibmvscsi/ibmvfc.c | 21 + 1 file changed, 9 insertions(+), 12

Re: [PATCH v2 5/5] ibmvfc: reinitialize sub-CRQs and perform channel enquiry after LPM

2021-02-25 Thread Tyrel Datwyler
On 2/25/21 12:48 PM, Tyrel Datwyler wrote: > A live partition migration (LPM) results in a CRQ disconnect similar to > a hard reset. In this LPM case the hypervisor moslty perserves the CRQ > transport such that it simply needs to be reenabled. However, the > capabilities may

[PATCH v2 4/5] ibmvfc: store return code of H_FREE_SUB_CRQ during cleanup

2021-02-25 Thread Tyrel Datwyler
amount of time. Fixes: 9288d35d70b5 ("ibmvfc: map/request irq and register Sub-CRQ interrupt handler") Signed-off-by: Tyrel Datwyler --- drivers/scsi/ibmvscsi/ibmvfc.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/drivers/scsi/ibmvscsi/ibmvfc.c b/drivers/scs

[PATCH v2 0/5] ibmvfc: hard reset fixes

2021-02-25 Thread Tyrel Datwyler
amount of time * Patch 5: (new) similar fix for LPM case where CRQ pair needs re-enablement Tyrel Datwyler (5): powerpc/pseries: extract host bridge from pci_bus prior to bus removal ibmvfc: simplify handling of sub-CRQ initialization ibmvfc: fix invalid sub-CRQ handles after hard reset

[PATCH v2 1/5] ibmvfc: simplify handling of sub-CRQ initialization

2021-02-25 Thread Tyrel Datwyler
sue, by tying a sub-CRQ setup failure and do_enquiry logic into ibmvfc_init_sub_crqs(). Signed-off-by: Tyrel Datwyler Reviewed-by: Brian King --- drivers/scsi/ibmvscsi/ibmvfc.c | 21 ++--- 1 file changed, 10 insertions(+), 11 deletions(-) diff --git a/drivers/scsi/ibmvscsi/ibmvfc.

[PATCH v2 5/5] ibmvfc: reinitialize sub-CRQs and perform channel enquiry after LPM

2021-02-25 Thread Tyrel Datwyler
renegotiation. Signed-off-by: Tyrel Datwyler --- drivers/scsi/ibmvscsi/ibmvfc.c | 13 + 1 file changed, 13 insertions(+) diff --git a/drivers/scsi/ibmvscsi/ibmvfc.c b/drivers/scsi/ibmvscsi/ibmvfc.c index 4ac2c442e1e2..9ae6be56e375 100644 --- a/drivers/scsi/ibmvscsi/ibmvfc.c +++ b

[PATCH v2 3/5] ibmvfc: treat H_CLOSED as success during sub-CRQ registration

2021-02-25 Thread Tyrel Datwyler
setup. Fixes: faacf8c5f1d5 ("ibmvfc: add alloc/dealloc routines for SCSI Sub-CRQ Channels") Signed-off-by: Tyrel Datwyler Reviewed-by: Brian King --- drivers/scsi/ibmvscsi/ibmvfc.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/scsi/ibmvscsi/ibmvfc.c

  1   2   3   4   5   6   7   >