Re: [PATCH-next] powerpc/fsl_pci: Use PTR_ERR_OR_ZERO

2018-01-23 Thread Tyrel Datwyler
On 01/23/2018 12:37 PM, Christopher Díaz Riveros wrote: > Use PTR_ERR_OR_ZERO rather than if(IS_ERR(...)) + PTR_ERR > > This issue was detected by using the Coccinelle software. > > Signed-off-by: Christopher Díaz Riveros <chris...@gentoo.org> > --- Reviewed

Re: [RFC v2 1/3] hotplug/mobility: Apply assoc updates for Post Migration Topo

2018-03-07 Thread Tyrel Datwyler
On 02/26/2018 12:52 PM, Michael Bringmann wrote: > hotplug/mobility: Recognize more changes to the associativity of > memory blocks described by the 'ibm,dynamic-memory' and 'cpu' > properties when processing the topology of LPARS in Post Migration > events. Previous efforts only recognized

Re: [PATCH v06 3/5] migration/memory: Add hotplug READD_MULTIPLE

2018-10-16 Thread Tyrel Datwyler
On 10/15/2018 05:39 PM, Michael Ellerman wrote: > Michael Bringmann writes: >> diff --git a/arch/powerpc/platforms/pseries/hotplug-memory.c >> b/arch/powerpc/platforms/pseries/hotplug-memory.c >> index 2b796da..9c76345 100644 >> --- a/arch/powerpc/platforms/pseries/hotplug-memory.c >> +++

[PATCH] powerpc/pseries: add missing cpumask.h include file

2018-10-22 Thread Tyrel Datwyler
ation") Signed-off-by: Tyrel Datwyler --- arch/powerpc/include/asm/rtas.h | 1 + 1 file changed, 1 insertion(+) diff --git a/arch/powerpc/include/asm/rtas.h b/arch/powerpc/include/asm/rtas.h index 71e393c..06b8dd3 100644 --- a/arch/powerpc/include/asm/rtas.h +++ b/arch/powerpc/include/

Re: [PATCH v2] idle/x86: remove the call to boot_init_stack_canary() from cpu_startup_entry()

2018-10-19 Thread Tyrel Datwyler
On 10/19/2018 03:31 AM, Christophe Leroy wrote: > commit d7880812b359 ("idle: Add the stack canary init to > cpu_startup_entry()") added the call to boot_init_stack_canary() > in cpu_startup_entry() in an #ifdef CONFIG_X86 statement, with > the intention to remove that #ifdef later. > > While

Re: [PATCH 2/2] selftests/powerpc: Skip test instead of failing

2018-10-23 Thread Tyrel Datwyler
On 10/23/2018 01:23 PM, Breno Leitao wrote: > Current core-pkey selftest fails if the test runs without privileges to > write into the core pattern file (/proc/sys/kernel/core_pattern). This > causes the test to fail and give the impression that the subsystem being > tested is broken, when, in

Re: [PATCH 2/2] selftests/powerpc: Skip test instead of failing

2018-10-30 Thread Tyrel Datwyler
On 10/30/2018 08:16 AM, Michael Ellerman wrote: > Thiago Jung Bauermann writes: > >> Breno Leitao writes: >> >>> Hi Tyrel, >>> >>> On 10/23/2018 05:41 PM, Tyrel Datwyler wrote: >>>>> --- a/tools/testing/selftests/powerpc/ptrace/core-pk

Re: [PATCH] powerpc/xmon/ppc-opc: Use ARRAY_SIZE macro

2018-10-04 Thread Tyrel Datwyler
On 10/04/2018 10:10 AM, Gustavo A. R. Silva wrote: > Use ARRAY_SIZE instead of dividing sizeof array with sizeof an element. > > This code was detected with the help of Coccinelle. > > Signed-off-by: Gustavo A. R. Silva Reviewed-by: Tyrel Datwyler

Re: [PATCH] migration/mm: Add WARN_ON to try_offline_node

2018-10-02 Thread Tyrel Datwyler
On 10/02/2018 11:13 AM, Michael Bringmann wrote: > > > On 10/02/2018 11:04 AM, Michal Hocko wrote: >> On Tue 02-10-18 10:14:49, Michael Bringmann wrote: >>> On 10/02/2018 09:59 AM, Michal Hocko wrote: On Tue 02-10-18 09:51:40, Michael Bringmann wrote: [...] > When the device-tree

Re: [PATCH v03 1/5] powerpc/drmem: Export 'dynamic-memory' loader

2018-10-02 Thread Tyrel Datwyler
On 10/01/2018 05:59 AM, Michael Bringmann wrote: > powerpc/drmem: Export many of the functions of DRMEM to parse > "ibm,dynamic-memory" and "ibm,dynamic-memory-v2" during hotplug > operations and for Post Migration events. > > Also modify the DRMEM initialization code to allow it to, > > * Be

Re: [PATCH v03 3/5] migration/memory: Add hotplug READD_MULTIPLE

2018-10-02 Thread Tyrel Datwyler
On 10/01/2018 05:59 AM, Michael Bringmann wrote: > migration/memory: This patch adds a new pseries hotplug action > for CPU and memory operations, PSERIES_HP_ELOG_ACTION_READD_MULTIPLE. > This is a variant of the READD operation which performs the action > upon multiple instances of the resource

Re: [PATCH v03 4/5] migration/memory: Evaluate LMB assoc changes

2018-10-02 Thread Tyrel Datwyler
On 10/01/2018 06:00 AM, Michael Bringmann wrote: > migration/memory: This patch adds code that recognizes changes to > the associativity of memory blocks described by the device-tree > properties in order to drive equivalent 'hotplug' operations to > update local and general kernel data structures

Re: [PATCH] migration/mm: Add WARN_ON to try_offline_node

2018-10-01 Thread Tyrel Datwyler
On 10/01/2018 01:27 PM, Michal Hocko wrote: > On Mon 01-10-18 13:56:25, Michael Bringmann wrote: >> In some LPAR migration scenarios, device-tree modifications are >> made to the affinity of the memory in the system. For instance, >> it may occur that memory is installed to nodes 0,3 on a source

Re: [PATCH] migration/mm: Add WARN_ON to try_offline_node

2018-10-01 Thread Tyrel Datwyler
On 10/01/2018 01:27 PM, Michal Hocko wrote: > On Mon 01-10-18 13:56:25, Michael Bringmann wrote: >> In some LPAR migration scenarios, device-tree modifications are >> made to the affinity of the memory in the system. For instance, >> it may occur that memory is installed to nodes 0,3 on a source

Re: [PATCH] migration/mm: Add WARN_ON to try_offline_node

2018-10-03 Thread Tyrel Datwyler
On 10/03/2018 06:27 AM, Michael Bringmann wrote: > On 10/02/2018 02:45 PM, Tyrel Datwyler wrote: >> On 10/02/2018 11:13 AM, Michael Bringmann wrote: >>> >>> >>> On 10/02/2018 11:04 AM, Michal Hocko wrote: >>>> On Tue 02-10-18 10:14:49, Michael Bring

Re: [PATCH] powerpc/pseries: Disable CPU hotplug across migrations

2018-09-24 Thread Tyrel Datwyler
On 09/24/2018 07:30 AM, Nathan Fontenot wrote: > On 09/24/2018 03:56 AM, Gautham R Shenoy wrote: >> Hi Michael, >> >> On Mon, Sep 24, 2018 at 05:00:42PM +1000, Michael Ellerman wrote: >>> Nathan Fontenot writes: On 09/18/2018 05:32 AM, Gautham R Shenoy wrote: > Hi Nathan, > On Tue,

[PATCH] ibmveth: fix DMA unmap error in ibmveth_xmit_start error path

2018-12-31 Thread Tyrel Datwyler
24/0x490 __qdisc_run+0x20c/0x980 __dev_queue_xmit+0x1bc/0xf20 This fixes the API misuse by unampping descs[0] with dma_unmap_single. Fixes: 6e8ab30ec677 ("ibmveth: Add scatter-gather support") Cc: sta...@vger.kernel.org Signed-off-by: Tyrel Datwyler --- drivers/net/ethernet/ibm/ibmveth.c

[PATCH] powerpc/pseries: export timebase register sample in lparcfg

2018-12-08 Thread Tyrel Datwyler
period. This calculation is currently done erroneously by the lparstat tool from the powerpc-utils package. This patch exports the current timebase value after we sample the PURRs and exposes it to userspace accounting tools via /proc/ppc64/lparcfg. Signed-off-by: Tyrel Datwyler --- arch/powerpc

[PATCH] ibmvscsi: use GFP_ATOMIC with dma_alloc_coherent in map_sg_data

2019-01-09 Thread Tyrel Datwyler
have a spinlock holding the scsi host lock. Fix this by passing GFP_ATOMIC to dma_alloc_coherent() to prevent any sort of sleeping in atomic context deadlock. Fixes: 4dddbc26c389 ("[SCSI] ibmvscsi: handle large scatter/gather lists") Cc: sta...@vger.kernel.org Signed-off-by: Tyre

[PATCH] ibmvscsi: use GFP_KERNEL with dma_alloc_coherent in initialize_event_pool

2019-01-09 Thread Tyrel Datwyler
-by: Tyrel Datwyler --- drivers/scsi/ibmvscsi/ibmvscsi.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/scsi/ibmvscsi/ibmvscsi.c b/drivers/scsi/ibmvscsi/ibmvscsi.c index cb8535e..10d5e77 100644 --- a/drivers/scsi/ibmvscsi/ibmvscsi.c +++ b/drivers/scsi/ibmvscsi/ibmvscsi.c

Re: [PATCH] ibmvscsi: use GFP_ATOMIC with dma_alloc_coherent in map_sg_data

2019-01-10 Thread Tyrel Datwyler
On 01/10/2019 07:07 AM, Christoph Hellwig wrote: > On Wed, Jan 09, 2019 at 06:58:56PM -0800, Tyrel Datwyler wrote: >> While mapping DMA for scatter list when a scsi command is queued the >> existing call to dma_alloc_coherent() in our map_sg_data() function >> passes z

Re: Kconfig label updates

2019-01-10 Thread Tyrel Datwyler
On 01/09/2019 04:37 AM, Michael Ellerman wrote: > Hi Bjorn, > > Bjorn Helgaas writes: >> Hi, >> >> I want to update the PCI Kconfig labels so they're more consistent and >> useful to users, something like the patch below. IIUC, the items >> below are all IBM-related; please correct me if not.

Re: [PATCH] ibmvscsi: use GFP_ATOMIC with dma_alloc_coherent in map_sg_data

2019-01-10 Thread Tyrel Datwyler
On 01/10/2019 07:07 AM, Christoph Hellwig wrote: > On Wed, Jan 09, 2019 at 06:58:56PM -0800, Tyrel Datwyler wrote: >> While mapping DMA for scatter list when a scsi command is queued the >> existing call to dma_alloc_coherent() in our map_sg_data() function >> passes z

Re: [PATCH v2] powerpc: Avoid code patching freed init sections

2018-09-12 Thread Tyrel Datwyler
On 09/12/2018 05:36 PM, Michael Neuling wrote: > >>> --- a/arch/powerpc/lib/code-patching.c >>> +++ b/arch/powerpc/lib/code-patching.c >>> @@ -23,11 +23,33 @@ >>> #include >>> #include >>> >>> + >> >> This blank line is not needed > > Ack > >> >>> +static inline bool

Re: [PATCH] powerpc/pseries: Disable CPU hotplug across migrations

2018-09-17 Thread Tyrel Datwyler
ery CPU is either in H_JOIN or offline. > > To prevent this this patch disables CPU hotplug during the migration > process. > > Signed-off-by: Nathan Fontenot Reviewed-by: Tyrel Datwyler

Re: [RFC 3/6] pseries/drcinfo: Pseries impl of arch_find_drc_info

2019-01-24 Thread Tyrel Datwyler
On 12/14/2018 12:51 PM, Michael Bringmann wrote: > This patch provides a common interface to parse ibm,drc-indexes, > ibm,drc-names, ibm,drc-types, ibm,drc-power-domains, or ibm,drc-info. > The generic interface arch_find_drc_match is provided which accepts > callback functions that may be applied

Re: [RFC 1/6] powerpc:/drc Define interface to acquire arch-specific drc info

2019-01-24 Thread Tyrel Datwyler
On 12/14/2018 12:50 PM, Michael Bringmann wrote: > Define interface to acquire arch-specific drc info to match against > hotpluggable devices. The current implementation exposes several > pseries-specific dynamic memory properties in generic kernel code. > This patch set provides an interface to

Re: [RFC 5/6] powerpc/pci/hotplug: Use common drcinfo parsing

2019-01-24 Thread Tyrel Datwyler
evious parsing implementation have been moved. >> >> Signed-off-by: Michael Bringmann > > This is fine with me. Any rpaphp_core.c maintainers want to comment? > Tyrel? It greatly simplifies the code in rpaphp_core.c, and as far as I can tell the refactoring maintains the exist

Re: [RFC 1/6] powerpc:/drc Define interface to acquire arch-specific drc info

2019-01-24 Thread Tyrel Datwyler
On 12/14/2018 12:50 PM, Michael Bringmann wrote: > Define interface to acquire arch-specific drc info to match against > hotpluggable devices. The current implementation exposes several > pseries-specific dynamic memory properties in generic kernel code. > This patch set provides an interface to

[PATCH 4/4] ibmvfc: Clean up transport events

2019-03-20 Thread Tyrel Datwyler
No change to functionality. Simply make transport event messages a litle clearer, and rework CRQ format enums such that we have separate enums for INIT messages and XPORT events. Signed-off-by: Tyrel Datwyler --- drivers/scsi/ibmvscsi/ibmvfc.c | 8 +--- drivers/scsi/ibmvscsi/ibmvfc.h | 7

[PATCH 3/4] ibmvfc: Byte swap status and error codes when logging

2019-03-20 Thread Tyrel Datwyler
Status and error codes are returned in big endian from the VIOS. The values are translated into a human readable format when logged, but the values are also logged. This patch byte swaps those values so that they are consistent between BE and LE platforms. Signed-off-by: Tyrel Datwyler

[PATCH 2/4] ibmvfc: Add failed PRLI to cmd_status lookup array

2019-03-20 Thread Tyrel Datwyler
The VIOS uses the SCSI_ERROR class to report PRLI failures. These errors are indicated with the combination of a IBMVFC_FC_SCSI_ERROR return status and 0x8000 error code. Add these codes to cmd_status[] with appropriate human readable error message. Signed-off-by: Tyrel Datwyler --- drivers

[PATCH 2/2] ibmvscsi: Fix empty event pool access during host removal

2019-03-20 Thread Tyrel Datwyler
y requests for which we never received a response. Finally, move the removal of the scsi host from our global list to the end so that the host is easily locatable for debugging purposes during teardown. Cc: # v2.6.12+ Signed-off-by: Tyrel Datwyler --- drivers/scsi/ibmvscsi/ibmvs

[PATCH 1/2] ibmvscsi: Protect ibmvscsi_head from concurrent modificaiton

2019-03-20 Thread Tyrel Datwyler
as is done similarly in the ibmvfc driver and ipr driver. Fixes: 32d6e4b6e4ea ("scsi: ibmvscsi: add vscsi hosts to global list_head") Cc: # v4.10+ Signed-off-by: Tyrel Datwyler --- drivers/scsi/ibmvscsi/ibmvscsi.c | 5 + 1 file changed, 5 insertions(+) diff --git a/drivers/scs

[PATCH 1/4] ibmvfc: Remove "failed" from logged errors

2019-03-20 Thread Tyrel Datwyler
e prefixing of "failed" to all error logged messages. The ibmvfc_log_error() function translates the returned error/status codes to a human readable message already. Signed-off-by: Tyrel Datwyler --- drivers/scsi/ibmvscsi/ibmvfc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) di

[PATCH 2/2] pci: rpaphp: get/put device node reference during slot alloc/dealloc

2019-03-22 Thread Tyrel Datwyler
When allocating the slot structure we store a pointer to the associated device_node. We really should be incrementing the reference count, so add an of_node_get() during slot alloc and an of_node_put() during slot dealloc. Signed-off-by: Tyrel Datwyler --- drivers/pci/hotplug/rpaphp_slot.c | 3

[PATCH 1/2] pci: rpadlpar: fix leaked device_node references in add/remove paths

2019-03-22 Thread Tyrel Datwyler
, and call of_node_put() on the obtained device_node in the add and remove paths. Also, fixup a reference leak in the find_vio_slot() helper where we fail to call of_node_put() on the vdevice node after we iterate over its children. Signed-off-by: Tyrel Datwyler --- drivers/pci/hotplug

Re: [PATCH v2 2/2] arch: powerpc/hlwd-pic: Add missing of_node-put() in hlwd_pic_probe()

2019-02-25 Thread Tyrel Datwyler
hlwd_irq_host = host; > + of_node_put(np); > break; > } > } > @@ -237,4 +238,3 @@ void hlwd_quiesce(void) > > __hlwd_quiesce(io_base); > } > - > This line removal at the end of the patch is likely accidental, but really should not be here. Otherwise, Reviewed-by: Tyrel Datwyler

Re: [PATCH v2 1/2] arch: powerpc/kexec: Add missing of_node-put() in default_machine_kexec_prepare()

2019-02-25 Thread Tyrel Datwyler
On 02/25/2019 01:00 AM, Himadri Pandya wrote: > Decrement the reference count on device_node "node" while breaking out > of the loop. Issue identified by Coccinelle. > > Signed-off-by: Himadri Pandya > --- > Changes in V2: > - Change subject line > --- >

Re: [PATCH] powerpc/pseries: export timebase register sample in lparcfg

2019-02-17 Thread Tyrel Datwyler
Ping? Any objections to this patch? A fix is already upstream in powerpc-utils to utilize the timebase value if available. -Tyrel On 12/08/2018 03:48 PM, Tyrel Datwyler wrote: > The Processor Utilzation of Resource Registers (PURR) provide an estimate of > resources used by a cpu thread. S

Re: [PATCH] powerpc/pseries: Fix dn reference error in dlpar_cpu_remove_by_index

2019-02-19 Thread Tyrel Datwyler
On 02/19/2019 07:46 AM, Michael Bringmann wrote: > powerpc/pseries: Fix dn reference error in dlpar_cpu_remove_by_index() > > A reference to the device node of the CPU to be removed is released > upon successful removal of the associated CPU device. If the call > to remove the CPU device fails,

Re: [PATCH v02] powerpc/pseries: Check for ceded CPU's during LPAR migration

2019-01-31 Thread Tyrel Datwyler
On 01/31/2019 01:53 PM, Michael Bringmann wrote: > On 1/30/19 11:38 PM, Michael Ellerman wrote: >> Michael Bringmann writes: >>> This patch is to check for cede'ed CPUs during LPM. Some extreme >>> tests encountered a problem ehere Linux has put some threads to >>> sleep (possibly to save energy

Re: [PATCH v02] powerpc/pseries: Check for ceded CPU's during LPAR migration

2019-01-31 Thread Tyrel Datwyler
On 01/31/2019 02:21 PM, Tyrel Datwyler wrote: > On 01/31/2019 01:53 PM, Michael Bringmann wrote: >> On 1/30/19 11:38 PM, Michael Ellerman wrote: >>> Michael Bringmann writes: >>>> This patch is to check for cede'ed CPUs during LPM. Some extreme >>>> t

Re: [PATCH 0/8]

2019-04-11 Thread Tyrel Datwyler
On 03/19/2019 07:58 PM, Sam Bobroff wrote: > Hi all, > > This patch set adds support for EEH recovery of hot plugged devices on pSeries > machines. Specifically, devices discovered by PCI rescanning using > /sys/bus/pci/rescan, which includes devices hotplugged by QEMU's device_add > command.

[PATCH 2/3] powerpc/pseries: Disable PRRN memory device tree trigger

2019-05-15 Thread Tyrel Datwyler
Memory affintiy updates as currently implemented have proved unstable. This patch comments out the PRRN hook for the time being while we investigate how to either stablize the current implementation or find a better approach. Signed-off-by: Tyrel Datwyler --- arch/powerpc/platforms/pseries

[PATCH 1/3] powerpc/pseries: Simplify cpu readd to use drc_index

2019-05-15 Thread Tyrel Datwyler
the drc_index from the device_node. This patch simplifies dlpar_cpu_readd() to take a drc_index directly and does away with an uneccsary device_node lookup. Signed-off-by: Tyrel Datwyler --- arch/powerpc/include/asm/topology.h | 2 +- arch/powerpc/mm/numa.c | 6

[PATCH 3/3] powerpc/pseries: Don't update cpu topology after PRRN event

2019-05-15 Thread Tyrel Datwyler
when its added back. Signed-off-by: Tyrel Datwyler --- arch/powerpc/kernel/rtasd.c | 1 - 1 file changed, 1 deletion(-) diff --git a/arch/powerpc/kernel/rtasd.c b/arch/powerpc/kernel/rtasd.c index 8a1746d755c9..d3aa3a056d8e 100644 --- a/arch/powerpc/kernel/rtasd.c +++ b/arch/powerpc/kernel

Re: [PATCH 1/3] powerpc/pseries: Simplify cpu readd to use drc_index

2019-06-02 Thread Tyrel Datwyler
On 05/20/2019 08:01 AM, Nathan Lynch wrote: > Tyrel Datwyler writes: > >> On 05/16/2019 12:17 PM, Nathan Lynch wrote: >>> Tyrel Datwyler writes: >>>> The current dlpar_cpu_readd() takes in a cpu_id and uses that to look up >>>> the cpus device_no

Re: [PATCH] powerpc/pseries: fix oops in hotplug memory notifier

2019-06-07 Thread Tyrel Datwyler
On 06/06/2019 10:04 PM, Nathan Lynch wrote: > During post-migration device tree updates, we can oops in > pseries_update_drconf_memory if the source device tree has an > ibm,dynamic-memory-v2 property and the destination has a > ibm,dynamic_memory (v1) property. The notifier processes an "update"

Re: [PATCH v3] scsi: ibmvscsi: Don't use rc uninitialized in ibmvscsi_do_work

2019-06-03 Thread Tyrel Datwyler
statement and > make it return early so that rc is never used uninitialized in this > function. > > Fixes: 035a3c4046b5 ("scsi: ibmvscsi: redo driver work thread to use enum > action states") > Link: https://github.com/ClangBuiltLinux/linux/issues/502 > Suggested-by: Mic

Re: [PATCH v2] scsi: ibmvscsi: Don't use rc uninitialized in ibmvscsi_do_work

2019-06-03 Thread Tyrel Datwyler
t; > Fixes: 035a3c4046b5 ("scsi: ibmvscsi: redo driver work thread to use enum > action states") > Link: https://github.com/ClangBuiltLinux/linux/issues/502 > Suggested-by: Michael Ellerman > Signed-off-by: Nathan Chancellor Acked-by: Tyrel Datwyler

Re: [PATCH] scsi: ibmvscsi: Don't use rc uninitialized in ibmvscsi_do_work

2019-06-03 Thread Tyrel Datwyler
On 06/02/2019 03:15 AM, Michael Ellerman wrote: > Hi Nathan, > > Nathan Chancellor writes: >> clang warns: >> >> drivers/scsi/ibmvscsi/ibmvscsi.c:2126:7: warning: variable 'rc' is used >> uninitialized whenever switch case is taken [-Wsometimes-uninitialized] >> case

Re: [PATCH v2] scsi: ibmvscsi: Don't use rc uninitialized in ibmvscsi_do_work

2019-06-03 Thread Tyrel Datwyler
On 06/03/2019 04:25 PM, Tyrel Datwyler wrote: > On 06/03/2019 03:19 PM, Nathan Chancellor wrote: >> clang warns: >> >> drivers/scsi/ibmvscsi/ibmvscsi.c:2126:7: warning: variable 'rc' is used >> uninitialized whenever switch case is taken [-Wsometimes-uni

Re: [PATCH v2] scsi: ibmvscsi: Don't use rc uninitialized in ibmvscsi_do_work

2019-06-03 Thread Tyrel Datwyler
On 06/03/2019 04:34 PM, Tyrel Datwyler wrote: > On 06/03/2019 04:25 PM, Tyrel Datwyler wrote: >> On 06/03/2019 03:19 PM, Nathan Chancellor wrote: >>> clang warns: >>> >>> drivers/scsi/ibmvscsi/ibmvscsi.c:2126:7: warning: variable 'rc' is used >>>

Re: [PATCH v2] PCI: rpaphp: Avoid a sometimes-uninitialized warning

2019-06-03 Thread Tyrel Datwyler
lug/drc-info: Add code to search ibm,drc-info > property") > Suggested-by: Nick Desaulniers > Signed-off-by: Nathan Chancellor Acked-by: Tyrel Datwyler

Re: [PATCH] powerpc/setup_64: fix -Wempty-body warnings

2019-06-05 Thread Tyrel Datwyler
On 06/05/2019 01:17 PM, Qian Cai wrote: > At the beginning of setup_64.c, it has, > > #ifdef DEBUG > #define DBG(fmt...) udbg_printf(fmt) > #else > #define DBG(fmt...) > #endif Simpler solution is just to define the debug in the else clause as such: #define DBG(fmt...) do { } while(0)

Re: [PATCH] powerpc/pseries: fix oops in hotplug memory notifier

2019-06-15 Thread Tyrel Datwyler
On 06/13/2019 06:05 PM, Nathan Lynch wrote: > Nathan Lynch writes: > >> Tyrel Datwyler writes: >> >>> Maybe we are ok with this behavior as I haven't dug deep enough into the >>> memory >>> subsystem here to really understand what the memory co

Re: [RFC PATCH 1/3] powerpc/mm: Handle page table allocation failures

2019-05-14 Thread Tyrel Datwyler
On 05/14/2019 07:50 AM, Aneesh Kumar K.V wrote: > This fixes the below crash that arises due to not handling page table > allocation > failures while allocating hugetlb page table. Was there supposed to be a oops stack trace attached here in the commit log? -Tyrel > > Fixes: e2b3d202d1db

Re: [PATCH 1/3] powerpc/pseries: Simplify cpu readd to use drc_index

2019-05-17 Thread Tyrel Datwyler
On 05/16/2019 12:17 PM, Nathan Lynch wrote: > Tyrel Datwyler writes: >> The current dlpar_cpu_readd() takes in a cpu_id and uses that to look up >> the cpus device_node so that we can get at the ibm,my-drc-index >> property. The only user of cpu readd is an OF notifier ca

Re: [PATCH] powerpc: Fix kobject memleak

2019-04-30 Thread Tyrel Datwyler
: Tobin C. Harding > --- Reviewed-by: Tyrel Datwyler

[PATCH 3/3] ibmvscsi: fix tripping of blk_mq_run_hw_queue WARN_ON

2019-05-01 Thread Tyrel Datwyler
From: Tyrel Datwyler After a successful SRP login response we call scsi_unblock_requests() to kick any pending IO's. The callback to process this SRP response happens in a tasklet and therefore is in softirq context. The result of such is that when blk-mq is enabled it is no longer safe to call

Re: [PATCH 0/8]

2019-04-19 Thread Tyrel Datwyler
On 04/14/2019 08:41 PM, Sam Bobroff wrote: > On Thu, Apr 11, 2019 at 05:55:33PM -0700, Tyrel Datwyler wrote: >> On 03/19/2019 07:58 PM, Sam Bobroff wrote: >>> Hi all, >>> >>> This patch set adds support for EEH recovery of hot plugged devices on >>>

[PATCH v2 2/3] ibmvscsi: redo driver work thread to use enum action states

2019-05-02 Thread Tyrel Datwyler
From: Tyrel Datwyler The current implemenation relies on two flags in the drivers private host structure to signal the need for a host reset or to reenable the CRQ after a LPAR migration. This patch does away with those flags and introduces a single action flag and defined enums

[PATCH v2 3/3] ibmvscsi: fix tripping of blk_mq_run_hw_queue WARN_ON

2019-05-02 Thread Tyrel Datwyler
From: Tyrel Datwyler After a successful SRP login response we call scsi_unblock_requests() to kick any pending IO's. The callback to process this SRP response happens in a tasklet and therefore is in softirq context. The result of such is that when blk-mq is enabled it is no longer safe to call

[PATCH v2 1/3] ibmvscsi: Wire up host_reset() in the drivers scsi_host_template

2019-05-02 Thread Tyrel Datwyler
From: Tyrel Datwyler Wire up the host_reset function in our driver_template to allow a user requested adpater reset via the host_reset sysfs attribute. Example: echo "adapter" > /sys/class/scsi_host/host0/host_reset Signed-off-by: Tyrel Datwyler --- Changes in v2: remo

Re: [PATCH 2/3] ibmvscsi: redo driver work thread to use enum action states

2019-05-02 Thread Tyrel Datwyler
On 05/02/2019 02:43 PM, Brian King wrote: > On 5/1/19 7:47 PM, Tyrel Datwyler wrote: >> From: Tyrel Datwyler >> >> The current implemenation relies on two flags in the drivers private host >> structure to signal the need for a host reset or to reenable the CR

Re: [PATCH 1/3] ibmvscsi: Wire up host_reset() in the drivers scsi_host_template

2019-05-02 Thread Tyrel Datwyler
On 05/02/2019 02:50 PM, Brian King wrote: > On 5/1/19 7:47 PM, Tyrel Datwyler wrote: >> From: Tyrel Datwyler >> >> Wire up the host_reset function in our driver_template to allow a user >> requested adpater reset via the host_reset sysfs attribute. >> >> Exa

[PATCH 1/3] ibmvscsi: Wire up host_reset() in the drivers scsi_host_template

2019-05-01 Thread Tyrel Datwyler
From: Tyrel Datwyler Wire up the host_reset function in our driver_template to allow a user requested adpater reset via the host_reset sysfs attribute. Example: echo "adapter" > /sys/class/scsi_host/host0/host_reset Signed-off-by: Tyrel Datwyler --- drivers/scsi/ibmvscsi/ib

[PATCH 2/3] ibmvscsi: redo driver work thread to use enum action states

2019-05-01 Thread Tyrel Datwyler
From: Tyrel Datwyler The current implemenation relies on two flags in the drivers private host structure to signal the need for a host reset or to reenable the CRQ after a LPAR migration. This patch does away with those flags and introduces a single action flag and defined enums

Re: Coccinelle: Checking of_node_put() calls with SmPL

2019-07-11 Thread Tyrel Datwyler
On 07/10/2019 11:35 PM, wen.yan...@zte.com.cn wrote: >>> we developed a coccinelle script to detect such problems. >> >> Would you find the implementation of the function “dt_init_idle_driver” >> suspicious according to discussed source code search patterns? >>

Re: [PATCH v2] powerpc/pseries: Use correct event modifier in rtas_parse_epow_errlog()

2019-04-25 Thread Tyrel Datwyler
interrupts") > Signed-off-by: YueHaibing > --- Reviewed-by: Tyrel Datwyler > v2: fix compile issue by 'event_modifier'-->'modifier' > --- > arch/powerpc/platforms/pseries/ras.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/arch/powerpc/platfor

Re: [PATCH] PCI: hotplug: Remove surplus return from a void function

2019-08-28 Thread Tyrel Datwyler
c: cleanup_slots() > > Signed-off-by: Krzysztof Wilczynski For rpa*_core.c portions, Acked-by: Tyrel Datwyler > --- > drivers/pci/hotplug/cpci_hotplug_core.c | 1 - > drivers/pci/hotplug/cpqphp_core.c | 1 - > drivers/pci/hotplug/cpqphp_ctrl.c | 4 ---

Re: [PATCH] net/ibmvnic: Fix missing { in __ibmvnic_reset

2019-09-09 Thread Tyrel Datwyler
; queue") > Signed-off-by: Michal Suchanek Reviewed-by: Tyrel Datwyler > --- > drivers/net/ethernet/ibm/ibmvnic.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/drivers/net/ethernet/ibm/ibmvnic.c > b/drivers/net/ethernet/ibm/ibmvnic.c &g

Re: [PATCH] scsi: ibmvfc: Mark expected switch fall-throughs

2019-07-30 Thread Tyrel Datwyler
_ct.port_id[1] << 8) | > ~~~ > bsg_request->rqst_data.h_ct.port_id[2]; > ~~ > drivers/scsi/ibmvscsi/ibmvfc.c:1841:2: note: here > case FC_BSG_RPT_CT: > ^~~~ > > Reported-by: Stephen Rothwell > Signed-off-by: Gustavo A. R. Silva > --- Acked-by: Tyrel Datwyler

Re: [PATCH v2 1/3] powerpc/rtas: use device model APIs and serialization during LPM

2019-08-05 Thread Tyrel Datwyler
On 8/2/19 12:29 PM, Nathan Lynch wrote: > The LPAR migration implementation and userspace-initiated cpu hotplug > can interleave their executions like so: > > 1. Set cpu 7 offline via sysfs. > > 2. Begin a partition migration, whose implementation requires the OS >to ensure all present cpus

[PATCH] ibmvfc: fix WARN_ON during event pool release

2019-07-17 Thread Tyrel Datwyler
point in the code path we have quiesced the adapter and its overly paranoid anyways to be holding the host lock. Reported-by: Abdul Haleem Signed-off-by: Tyrel Datwyler --- drivers/scsi/ibmvscsi/ibmvfc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/scsi/ibmvscsi/ibmv

[RFC PATCH 2/9] powerpc/pseries: fix bad drc_index_start value parsing of drc-info entry

2019-10-01 Thread Tyrel Datwyler
() passes over the current int encoded value and actually stores the next one wrongly. Simply endian swap the current value in place after reading the first two string values. The remaining int encoded values can then be read correctly using of_prop_next_u32(). Signed-off-by: Tyrel Datwyler --- arch

[RFC PATCH 7/9] PCI: rpaphp: annotate and correctly byte swap DRC properties

2019-10-01 Thread Tyrel Datwyler
. Fix this for better static checking by annotating values we know to explicitly big endian, and byte swap were appropriate. Signed-off-by: Tyrel Datwyler --- drivers/pci/hotplug/rpaphp_core.c | 26 +- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/drivers/pci

[RFC PATCH 6/9] PCI: rpaphp: add drc-info support for hotplug slot registration

2019-10-01 Thread Tyrel Datwyler
Split physical PCI slot registration scanning into seperate routines that support the old ibm,drc-* properties and one that supports the new compressed ibm,drc-info property. Signed-off-by: Tyrel Datwyler --- drivers/pci/hotplug/rpaphp_core.c | 89 ++- 1 file

[RFC PATCH 9/9] powerpc: Enable support for ibm,drc-info property

2019-10-01 Thread Tyrel Datwyler
Advertise client support for the PAPR architected ibm,drc-info device tree property during CAS handshake. Signed-off-by: Tyrel Datwyler --- arch/powerpc/kernel/prom_init.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/powerpc/kernel/prom_init.c b/arch/powerpc/kernel

[RFC PATCH 1/9] powerpc/pseries: add cpu DLPAR support for drc-info property

2019-10-01 Thread Tyrel Datwyler
From: Tyrel Datwyler Older firmwares provided information about Dynamic Reconfig Connectors (DRC) through several device tree properties, namely ibm,drc-types, ibm,drc-indexes, ibm,drc-names, and ibm,drc-power-domains. New firmwares have the ability to present this same information in a much

[RFC PATCH 0/9] Fixes and Enablement of ibm,drc-info property

2019-10-01 Thread Tyrel Datwyler
to suppport partitions with 24TB+ or possible memory this property is required to perform platform migration. This serious fixup the short comings of the previous implementation in the areas of general implementation, cpu hotplug, and IOA hotplug. Tyrel Datwyler (9): powerpc/pseries: add cpu

[RFC PATCH 3/9] powerpc/pseries: fix drc-info mappings of logical cpus to drc-index

2019-10-01 Thread Tyrel Datwyler
nd instead testing directly for ibm,drc-info, and then falling back to the old style ibm,drc-indexes in the case it doesn't exit. Fix the second by incrementing value to the next element prior to parsing drc-info entries. Signed-off-by: Tyrel Datwyler --- arch/powerpc/platforms/pseries/pseries_ene

[RFC PATCH 5/9] PCI: rpaphp: don't rely on firmware feature to imply drc-info support

2019-10-01 Thread Tyrel Datwyler
for the ibm,drc-info property, and falling back to the older ibm,drc-* properties if it doesn't exist. Signed-off-by: Tyrel Datwyler --- drivers/pci/hotplug/rpaphp_core.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/pci/hotplug/rpaphp_core.c b/drivers/pci/hotplug

[RFC PATCH 4/9] PCI: rpaphp: fix up pointer to first drc-info entry

2019-10-01 Thread Tyrel Datwyler
ot; pointer to point at the first element of the first drc-info entry prior. Signed-off-by: Tyrel Datwyler --- drivers/pci/hotplug/rpaphp_core.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/pci/hotplug/rpaphp_core.c b/drivers/pci/hotplug/rpaphp_core.c index 18627bb..e350264 1006

[RFC PATCH 8/9] PCI: rpaphp: correctly match ibm, my-drc-index to drc-name when using drc-info

2019-10-01 Thread Tyrel Datwyler
-start-index. Signed-off-by: Tyrel Datwyler --- drivers/pci/hotplug/rpaphp_core.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/drivers/pci/hotplug/rpaphp_core.c b/drivers/pci/hotplug/rpaphp_core.c index eabc0c51..5327606 100644 --- a/drivers/pci/hotplug/rpaphp_core.c

[PATCH v2 2/9] powerpc/pseries: Fix drc-info mappings of logical cpus to drc-index

2019-11-10 Thread Tyrel Datwyler
ting value to the next element prior to parsing drc-info entries. Signed-off-by: Tyrel Datwyler --- arch/powerpc/platforms/pseries/pseries_energy.c | 23 ++- 1 file changed, 10 insertions(+), 13 deletions(-) diff --git a/arch/powerpc/platforms/pseries/pseries_energy.c b/ar

[PATCH v2 8/9] PCI: rpaphp: Correctly match ibm, my-drc-index to drc-name when using drc-info

2019-11-10 Thread Tyrel Datwyler
this entries drc-start-index. Signed-off-by: Tyrel Datwyler --- drivers/pci/hotplug/rpaphp_core.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/drivers/pci/hotplug/rpaphp_core.c b/drivers/pci/hotplug/rpaphp_core.c index 129534c..951f7f2 100644 --- a/drivers/pci/hotplug

[PATCH v2 4/9] PCI: rpaphp: Fix up pointer to first drc-info entry

2019-11-10 Thread Tyrel Datwyler
e pointing at the first element of an entry. Fix up by incrementing the "value" pointer to point at the first element of the first drc-info entry prior. Signed-off-by: Tyrel Datwyler --- drivers/pci/hotplug/rpaphp_core.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a

[PATCH v2 0/9] Fixes and Enablement of ibm,drc-info property

2019-11-10 Thread Tyrel Datwyler
, tfalcon) Patch 3: added comment regarding indexing of drc values (tfalcon) split drc-index and drc-info logic into multiple functions for collecting cpu drc's for dlpar (mpe) Patch 7: fix up a couple more sparse warnings (mpe) Tyrel Datwyler (9

[PATCH v2 7/9] PCI: rpaphp: Annotate and correctly byte swap DRC properties

2019-11-10 Thread Tyrel Datwyler
. Fix this for better static checking by annotating values we know to explicitly big endian, and byte swap where appropriate. Signed-off-by: Tyrel Datwyler --- drivers/pci/hotplug/rpaphp_core.c | 29 +++-- 1 file changed, 15 insertions(+), 14 deletions(-) diff --git a/drivers

[PATCH v2 6/9] PCI: rpaphp: Add drc-info support for hotplug slot registration

2019-11-10 Thread Tyrel Datwyler
Split physical PCI slot registration scanning into separate routines that support the old ibm,drc-* properties and one that supports the new compressed ibm,drc-info property. Signed-off-by: Tyrel Datwyler --- drivers/pci/hotplug/rpaphp_core.c | 89 ++- 1 file

[PATCH v2 3/9] powerpc/pseries: Add cpu DLPAR support for drc-info property

2019-11-10 Thread Tyrel Datwyler
-off-by: Tyrel Datwyler --- arch/powerpc/platforms/pseries/hotplug-cpu.c | 127 +++ 1 file changed, 112 insertions(+), 15 deletions(-) diff --git a/arch/powerpc/platforms/pseries/hotplug-cpu.c b/arch/powerpc/platforms/pseries/hotplug-cpu.c index bbda646..967c5e1 100644

[PATCH v2 7/9] PCI: rpaphp: annotate and correctly byte swap DRC properties

2019-11-10 Thread Tyrel Datwyler
. Fix this for better static checking by annotating values we know to explicitly big endian, and byte swap where appropriate. Signed-off-by: Tyrel Datwyler --- drivers/pci/hotplug/rpaphp_core.c | 29 +++-- 1 file changed, 15 insertions(+), 14 deletions(-) diff --git a/drivers

[PATCH v2 5/9] PCI: rpaphp: Don't rely on firmware feature to imply drc-info support

2019-11-10 Thread Tyrel Datwyler
by checking explicitly for the ibm,drc-info property, and falling back to the older ibm,drc-* properties if it doesn't exist. Signed-off-by: Tyrel Datwyler --- drivers/pci/hotplug/rpaphp_core.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/pci/hotplug/rpaphp_core.c b

[PATCH v2 9/9] powerpc/pseries: Enable support for ibm, drc-info property

2019-11-10 Thread Tyrel Datwyler
Advertise client support for the PAPR architected ibm,drc-info device tree property during CAS handshake. Fixes: c7a3275e0f9e ("powerpc/pseries: Revert support for ibm,drc-info devtree property") Signed-off-by: Tyrel Datwyler --- arch/powerpc/kernel/prom_init.c | 2 +- 1 file

[PATCH v2 1/9] powerpc/pseries: Fix bad drc_index_start value parsing of drc-info entry

2019-11-10 Thread Tyrel Datwyler
() passes over the current int encoded value and actually stores the next one wrongly. Simply endian swap the current value in place after reading the first two string values. The remaining int encoded values can then be read correctly using of_prop_next_u32(). Signed-off-by: Tyrel Datwyler --- arch

Re: [PATCH 3/9] powerpc/pseries: Add cpu DLPAR support for drc-info property

2019-11-06 Thread Tyrel Datwyler
On 11/5/19 8:55 AM, Thomas Falcon wrote: > > On 11/5/19 9:24 AM, Tyrel Datwyler wrote: >> From: Tyrel Datwyler >> >> Older firmwares provided information about Dynamic Reconfig >> Connectors (DRC) through several device tree properties, namely >> ibm,drc-t

Re: [PATCH 0/9] Fixes and Enablement of ibm,drc-info property

2019-11-06 Thread Tyrel Datwyler
On 11/5/19 9:03 AM, Thomas Falcon wrote: > > On 11/5/19 9:24 AM, Tyrel Datwyler wrote: > > Hi, just pointing out a few typos... Damn, I thought I squashed them all the second time around. >> There was a previous effort to add support for the PAPR >> architect

Re: [RFC PATCH 0/9] Fixes and Enablement of ibm,drc-info property

2019-10-30 Thread Tyrel Datwyler
On 10/1/19 1:02 PM, Bjorn Helgaas wrote: > On Tue, Oct 01, 2019 at 01:12:05AM -0500, Tyrel Datwyler wrote: >> There was an initial previous effort yo add support for the PAPR >> architected ibm,drc-info property. This property provides a more >> memory compact representation o

<    1   2   3   4   5   6   7   >