Re: [PATCH v1 04/11] powerpc/64s: Move and rename do_bad_slb_fault as it is not hash specific

2021-10-18 Thread Christophe Leroy
Le 15/10/2021 à 17:46, Nicholas Piggin a écrit : slb.c is hash-specific SLB management, but do_bad_slb_fault deals with segment interrupts that occur with radix MMU as well. --- arch/powerpc/include/asm/interrupt.h | 2 +- arch/powerpc/kernel/exceptions-64s.S | 4 ++--

[PATCH v2] tracing: Have all levels of checks prevent recursion

2021-10-18 Thread Steven Rostedt
[ Linus, I have patches that clean this up that are not marked for stable, but will depend on this patch. As I already have commits in my next queue, I can do one of the following: 1. Cherry pick this from my urgent tree, and build everything on top. 2. Add this on top

Re: [PATCH 00/13] block: add_disk() error handling stragglers

2021-10-18 Thread Luis Chamberlain
On Sun, Oct 17, 2021 at 08:26:33AM -0700, Geoff Levand wrote: > Hi Luis, > > On 10/15/21 4:52 PM, Luis Chamberlain wrote: > > This patch set consists of al the straggler drivers for which we have > > have no patch reviews done for yet. I'd like to ask for folks to please > > consider chiming in,

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

2021-10-18 Thread Nathan Lynch
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/ /sys/firmware/devicetree/base/ibm,platform-facilities/ ├──

[PATCH][linux-next] soc: fsl: dpio: Unsigned compared against 0 in qbman_swp_set_irq_coalescing()

2021-10-18 Thread Tim Gardner
Coverity complains of unsigned compare against 0. There are 2 cases in this function: 1821itp = (irq_holdoff * 1000) / p->desc->qman_256_cycles_per_ns; CID 121131 (#1 of 1): Unsigned compared against 0 (NO_EFFECT) unsigned_compare: This less-than-zero comparison of an unsigned value is

Re: [PATCH v2] powerpc/smp: do not decrement idle task preempt count in CPU offline

2021-10-18 Thread Srikar Dronamraju
* Nathan Lynch [2021-10-15 12:39:02]: > With PREEMPT_COUNT=y, when a CPU is offlined and then onlined again, we > get: > > BUG: scheduling while atomic: swapper/1/0/0x > no locks held by swapper/1/0. > CPU: 1 PID: 0 Comm: swapper/1 Not tainted 5.15.0-rc2+ #100 > Call Trace: >

[PATCH] driver: soc: dpio: use the whole functions to protect critical zone

2021-10-18 Thread Meng . Li
From: Meng Li In orininal code, use 2 function spin_lock() and local_irq_save() to protect the critical zone. But when enable the kernel debug config, there are below inconsistent lock state detected. WARNING: inconsistent lock state 5.10.63-yocto-standard #1 Not

Re: [PATCH] tracing: Have all levels of checks prevent recursion

2021-10-18 Thread Steven Rostedt
On Mon, 18 Oct 2021 12:19:20 +0200 Petr Mladek wrote: > > - > > bit = trace_get_context_bit() + start; > > if (unlikely(val & (1 << bit))) { > > /* > > * It could be that preempt_count has not been updated during > > * a switch between contexts.

[PATCH v2] soc: fsl: dpio: instead smp_processor_id with raw_smp_processor_id

2021-10-18 Thread Meng . Li
From: Meng Li When enable debug kernel configs,there will be calltrace as below: BUG: using smp_processor_id() in preemptible [] code: swapper/0/1 caller is debug_smp_processor_id+0x20/0x30 CPU: 6 PID: 1 Comm: swapper/0 Not tainted 5.10.63-yocto-standard #1 Hardware name: NXP Layerscape

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

2021-10-18 Thread Tyrel Datwyler
On 10/14/21 10:03 PM, Gustavo A. R. Silva wrote: > (!ptr && !ptr->foo) strikes again. :) > > The expression (!ptr && !ptr->foo) is bogus and in case ptr is NULL, > it leads to a NULL pointer dereference: ptr->foo. > > Fix this by converting && to || > > This issue was detected with the help of

Re: [PATCH v2] tracing: Have all levels of checks prevent recursion

2021-10-18 Thread Steven Rostedt
On Mon, 18 Oct 2021 15:44:12 -0400 Steven Rostedt (by way of Steven Rostedt ) wrote: > [ >Linus, > I have patches that clean this up that are not marked for stable, but > will depend on this patch. As I already have commits in my next queue, > I can do one of the following: >

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

2021-10-18 Thread Gustavo A. R. Silva
On Mon, Oct 18, 2021 at 02:09:31PM -0700, Tyrel Datwyler wrote: > On 10/14/21 10:03 PM, Gustavo A. R. Silva wrote: > > (!ptr && !ptr->foo) strikes again. :) > > > > The expression (!ptr && !ptr->foo) is bogus and in case ptr is NULL, > > it leads to a NULL pointer dereference: ptr->foo. > > > >

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] 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 this would likely force the drivers to

Re: [PATCH] powerpc/eeh: skip slot presence check when PE is temporarily unavailable.

2021-10-18 Thread Mahesh J Salgaonkar
On 2021-05-07 10:41:46 Fri, Oliver O'Halloran wrote: > On Fri, May 7, 2021 at 3:43 AM Mahesh Salgaonkar wrote: > > > > When certain PHB HW failure causes phyp to recover PHB, it marks the PE > > state as temporarily unavailable. In this case, per PAPR, rtas call > > ibm,read-slot-reset-state2

Re: [PATCH] tracing: Have all levels of checks prevent recursion

2021-10-18 Thread Petr Mladek
On Mon 2021-10-18 09:50:27, Steven Rostedt wrote: > On Mon, 18 Oct 2021 12:19:20 +0200 > Petr Mladek wrote: > > > On Fri 2021-10-15 11:00:35, Steven Rostedt wrote: > > > From: "Steven Rostedt (VMware)" > > > > > > While writing an email explaining the "bit = 0" logic for a discussion on > > >

[REPORT PATCH v2] powerpc/papr_scm: Implement initial support for injecting smart errors

2021-10-18 Thread Shivaprasad G Bhat
From: Vaibhav Jain Presently PAPR doesn't support injecting smart errors on an NVDIMM. This makes testing the NVDIMM health reporting functionality difficult as simulating NVDIMM health related events need a hacked up qemu version. To solve this problem this patch proposes simulating certain

[REPOST RFC PATCH v2] powerpc/papr_scm: Move duplicate definitions to common header files

2021-10-18 Thread Shivaprasad G Bhat
papr_scm and ndtest share common PDSM payload structs like nd_papr_pdsm_health. Presently these structs are duplicated across papr_pdsm.h and ndtest.h header files. Since 'ndtest' is essentially arch independent and can run on platforms other than PPC64, a way needs to be deviced to avoid

Re: [PATCH v3 07/12] asm-generic: Define 'func_desc_t' to commonly describe function descriptors

2021-10-18 Thread Christophe Leroy
Le 18/10/2021 à 08:29, Nicholas Piggin a écrit : Excerpts from Christophe Leroy's message of October 17, 2021 10:38 pm: We have three architectures using function descriptors, each with its own type and name. Add a common typedef that can be used in generic code. Also add a stub typedef

Re: [PATCH] powerpc/kexec_file: Add of_node_put() before goto

2021-10-18 Thread Hari Bathini
On 18/10/21 7:24 am, Wan Jiabing wrote: Fix following coccicheck warning: ./arch/powerpc/kexec/file_load_64.c:698:1-22: WARNING: Function for_each_node_by_type should have of_node_put() before goto Early exits from for_each_node_by_type should decrement the node reference counter.

Re: [PATCH 02/13] nvme-multipath: add error handling support for add_disk()

2021-10-18 Thread Chaitanya Kulkarni
On 10/15/21 16:52, Luis Chamberlain wrote: > We never checked for errors on add_disk() as this function > returned void. Now that this is fixed, use the shiny new > error handling. > > Since we now can tell for sure when a disk was added, move > setting the bit NVME_NSHEAD_DISK_LIVE only when we

[RESEND PATCH v2 2/3] Remove 256MB limit restriction for boot cpu paca allocation

2021-10-18 Thread Sourabh Jain
From: Mahesh Salgaonkar At the time when we detect and allocate paca for boot cpu, we havn't yet detected mmu feature of 1T segments support (not until mmu_early_init_devtree() call). This causes ppc64_bolted_size() to return 256MB as limit forcing boot cpu paca allocation below 256MB always.

[RESEND PATCH v2 3/3] powerpc: Set crashkernel offset to mid of RMA region

2021-10-18 Thread Sourabh Jain
On large config LPARs (having 192 and more cores), Linux fails to boot due to insufficient memory in the first memblock. It is due to the memory reservation for the crash kernel which starts at 128MB offset of the first memblock. This memory reservation for the crash kernel doesn't leave enough

Re: [PATCH v3 04/12] powerpc: Prepare func_desc_t for refactorisation

2021-10-18 Thread Christophe Leroy
Le 18/10/2021 à 08:27, Nicholas Piggin a écrit : Excerpts from Christophe Leroy's message of October 17, 2021 10:38 pm: In preparation of making func_desc_t generic, change the ELFv2 version to a struct containing 'addr' element. This allows using single helpers common to ELFv1 and ELFv2.

[REPOST PATCH v2] tests/nvdimm/ndtest: Simulate nvdimm health, DSC and smart-inject

2021-10-18 Thread Shivaprasad G Bhat
The 'papr_scm' module and 'papr' implementation in libndctl supports PDSMs for reporting PAPR NVDIMM health, dirty-shutdown-count and injecting smart-errors. This patch adds support for those PDSMs in ndtest module so that PDSM specific paths in libndctl can be exercised. Signed-off-by:

[RESEND PATCH v2 0/3] Update crashkernel offset to allow kernel to boot on large config LPARs

2021-10-18 Thread Sourabh Jain
As the crashkernel reserve memory at 128MB offset in the first memory block, it leaves less than 128MB memory to accommodate other essential system resources that need memory reservation in the same block. This creates kernel boot failure on large config LPARs having core count greater than 192.

[RESEND PATCH v2 1/3] fixup mmu_features immediately after getting cpu pa features.

2021-10-18 Thread Sourabh Jain
From: Mahesh Salgaonkar On system with radix support available, early_radix_enabled() starts returning true for a small window (until mmu_early_init_devtree() is called) even when radix mode disabled on kernel command line. This causes ppc64_bolted_size() to return ULONG_MAX in HPT mode instead

Re: [PATCH] dmaengine: bestcomm: fix system boot lockups

2021-10-18 Thread Vinod Koul
On 14-10-21, 11:40, Anatolij Gustschin wrote: > memset() and memcpy() on an MMIO region like here results in a > lockup at startup on mpc5200 platform (since this first happens > during probing of the ATA and Ethernet drivers). Use memset_io() > and memcpy_toio() instead. Applied, thanks --

Re: [PATCH v3 04/12] powerpc: Prepare func_desc_t for refactorisation

2021-10-18 Thread Nicholas Piggin
Excerpts from Christophe Leroy's message of October 17, 2021 10:38 pm: > In preparation of making func_desc_t generic, change the ELFv2 > version to a struct containing 'addr' element. > > This allows using single helpers common to ELFv1 and ELFv2. > > Signed-off-by: Christophe Leroy > --- >

Re: [PATCH v3 07/12] asm-generic: Define 'func_desc_t' to commonly describe function descriptors

2021-10-18 Thread Nicholas Piggin
Excerpts from Christophe Leroy's message of October 17, 2021 10:38 pm: > We have three architectures using function descriptors, each with its > own type and name. > > Add a common typedef that can be used in generic code. > > Also add a stub typedef for architecture without function

[V4 0/2] tools/perf: Add instruction and data address registers to extended regs in powerpc

2021-10-18 Thread Athira Rajeev
Patch set adds PMU registers namely Sampled Instruction Address Register (SIAR) and Sampled Data Address Register (SDAR) as part of extended regs in PowerPC. These registers provides the instruction/data address and adding these to extended regs helps in debug purposes. Patch 1/2 refactors the

[V4 1/2] tools/perf: Refactor the code definition of perf reg extended mask in tools side header file

2021-10-18 Thread Athira Rajeev
PERF_REG_PMU_MASK_300 and PERF_REG_PMU_MASK_31 defines the mask value for extended registers. Current definition of these mask values uses hex constant and does not use registers by name, making it less readable. Patch refactor the macro values in perf tools side header file by or'ing together the

[V4 2/2] tools/perf: Add perf tools support to expose instruction and data address registers as part of extended regs

2021-10-18 Thread Athira Rajeev
Patch enables presenting of Sampled Instruction Address Register (SIAR) and Sampled Data Address Register (SDAR) SPRs as part of extended regsiters for perf tool. Add these SPR's to sample_reg_mask in the tool side (to use with -I? option). Signed-off-by: Athira Rajeev Reviewed-by: Kajol Jain

Re: [PATCH v3 07/12] asm-generic: Define 'func_desc_t' to commonly describe function descriptors

2021-10-18 Thread Nicholas Piggin
Excerpts from Christophe Leroy's message of October 18, 2021 5:07 pm: > > > Le 18/10/2021 à 08:29, Nicholas Piggin a écrit : >> Excerpts from Christophe Leroy's message of October 17, 2021 10:38 pm: >>> We have three architectures using function descriptors, each with its >>> own type and name.

Re: [PATCH v3 0/4] Add mem_hops field in perf_mem_data_src structure

2021-10-18 Thread Peter Zijlstra
On Mon, Oct 18, 2021 at 02:46:18PM +1100, Michael Ellerman wrote: > Peter Zijlstra writes: > > On Wed, Oct 06, 2021 at 07:36:50PM +0530, Kajol Jain wrote: > > > >> Kajol Jain (4): > >> perf: Add comment about current state of PERF_MEM_LVL_* namespace and > >> remove an extra line > >>

Re: [PATCH] tracing: Have all levels of checks prevent recursion

2021-10-18 Thread Petr Mladek
On Fri 2021-10-15 11:00:35, Steven Rostedt wrote: > From: "Steven Rostedt (VMware)" > > While writing an email explaining the "bit = 0" logic for a discussion on > making ftrace_test_recursion_trylock() disable preemption, I discovered a > path that makes the "not do the logic if bit is zero"

Re: [PATCH 01/12] of: Add of_get_cpu_hwid() to read hardware ID from CPU nodes

2021-10-18 Thread Sudeep Holla
On Wed, Oct 06, 2021 at 11:43:21AM -0500, Rob Herring wrote: > There are various open coded implementions parsing the CPU node 'reg' > property which contains the CPU's hardware ID. Introduce a new function, > of_get_cpu_hwid(), to read the hardware ID. > > All the callers should be DT only code,

Re: [PATCH 04/12] arm64: Use of_get_cpu_hwid()

2021-10-18 Thread Sudeep Holla
On Wed, Oct 06, 2021 at 11:43:24AM -0500, Rob Herring wrote: > Replace the open coded parsing of CPU nodes' 'reg' property with > of_get_cpu_hwid(). > > This change drops an error message for missing 'reg' property, but that > should not be necessary as the DT tools will ensure 'reg' is present.

Re: [PATCH 11/12] cacheinfo: Allow for >32-bit cache 'id'

2021-10-18 Thread Sudeep Holla
On Wed, Oct 06, 2021 at 11:43:31AM -0500, Rob Herring wrote: > In preparation to set the cache 'id' based on the CPU h/w ids, allow for > 64-bit bit 'id' value. The only case that needs this is arm64, so > unsigned long is sufficient. > Reviewed-by: Sudeep Holla -- Regards, Sudeep

Re: [PATCH 12/12] cacheinfo: Set cache 'id' based on DT data

2021-10-18 Thread Sudeep Holla
On Wed, Oct 06, 2021 at 11:43:32AM -0500, Rob Herring wrote: > Use the minimum CPU h/w id of the CPUs associated with the cache for the > cache 'id'. This will provide a stable id value for a given system. As > we need to check all possible CPUs, we can't use the shared_cpu_map > which is just

Re: [PATCH] tracing: Have all levels of checks prevent recursion

2021-10-18 Thread Steven Rostedt
On Mon, 18 Oct 2021 12:19:20 +0200 Petr Mladek wrote: > On Fri 2021-10-15 11:00:35, Steven Rostedt wrote: > > From: "Steven Rostedt (VMware)" > > > > While writing an email explaining the "bit = 0" logic for a discussion on > > making ftrace_test_recursion_trylock() disable preemption, I