Re: [PATCH 1/3] powerpc/numa: Set numa_node for all possible cpus

2020-03-12 Thread Vlastimil Babka
On 3/12/20 9:23 AM, Sachin Sant wrote: > > >> On 12-Mar-2020, at 10:57 AM, Srikar Dronamraju >> wrote: >> >> * Michal Hocko [2020-03-11 12:57:35]: >> >>> On Wed 11-03-20 16:32:35, Srikar Dronamraju wrote: A Powerpc system with multiple possible nodes and with CONFIG_NUMA enabled

Re: [RESEND PATCH v2 1/9] iomap: Constify ioreadX() iomem argument (as in generic implementation)

2020-03-12 Thread Michael Ellerman
Krzysztof Kozlowski writes: > diff --git a/arch/powerpc/kernel/iomap.c b/arch/powerpc/kernel/iomap.c > index 5ac84efc6ede..9fe4fb3b08aa 100644 > --- a/arch/powerpc/kernel/iomap.c > +++ b/arch/powerpc/kernel/iomap.c > @@ -15,23 +15,23 @@ > * Here comes the ppc64 implementation of the IOMAP >

Re: [PATCH v4 6/8] perf/tools: Enhance JSON/metric infrastructure to handle "?"

2020-03-12 Thread Jiri Olsa
On Mon, Mar 09, 2020 at 11:55:50AM +0530, Kajol Jain wrote: SNIP > diff --git a/tools/perf/util/expr.h b/tools/perf/util/expr.h > index 9377538f4097..d17664e628db 100644 > --- a/tools/perf/util/expr.h > +++ b/tools/perf/util/expr.h > @@ -15,6 +15,7 @@ struct parse_ctx { > struct parse_id

Re: [PATCH v4 6/8] perf/tools: Enhance JSON/metric infrastructure to handle "?"

2020-03-12 Thread Jiri Olsa
On Tue, Mar 10, 2020 at 03:34:55PM -0300, Arnaldo Carvalho de Melo wrote: SNIP > > diff --git a/tools/perf/arch/powerpc/util/header.c > > b/tools/perf/arch/powerpc/util/header.c > > index 3b4cdfc5efd6..036f6b2ce202 100644 > > --- a/tools/perf/arch/powerpc/util/header.c > > +++

Re: [5.6.0-rc2-next-20200218/powerpc] Boot failure on POWER9

2020-03-12 Thread Michael Ellerman
Michal Hocko writes: > On Thu 27-02-20 19:26:54, Michal Hocko wrote: >> [Cc ppc maintainers] > [...] >> Please have a look at >> http://lkml.kernel.org/r/52ef4673-7292-4c4c-b459-af583951b...@linux.vnet.ibm.com >> for the boot log with the debugging patch which tracks set_numa_mem. >> This seems

Re: [PATCH v4 6/8] perf/tools: Enhance JSON/metric infrastructure to handle "?"

2020-03-12 Thread Jiri Olsa
On Mon, Mar 09, 2020 at 11:55:50AM +0530, Kajol Jain wrote: SNIP > diff --git a/tools/perf/util/metricgroup.c b/tools/perf/util/metricgroup.c > index c3a8c701609a..11eeeb929b91 100644 > --- a/tools/perf/util/metricgroup.c > +++ b/tools/perf/util/metricgroup.c > @@ -474,6 +474,98 @@ static bool

Re: [RESEND PATCH v2 6/9] drm/mgag200: Constify ioreadX() iomem argument (as in generic implementation)

2020-03-12 Thread Thomas Zimmermann
Hi Krzysztof, I just received a resend email from 3 weeks ago :/ Do you want me to merge the mgag200 patch into drm-misc-next? Best regards Thomas Am 19.02.20 um 18:50 schrieb Krzysztof Kozlowski: > The ioreadX() helpers have inconsistent interface. On some architectures > void *__iomem

Re: [PATCH v4 6/8] perf/tools: Enhance JSON/metric infrastructure to handle "?"

2020-03-12 Thread Jiri Olsa
On Mon, Mar 09, 2020 at 11:55:50AM +0530, Kajol Jain wrote: SNIP > +static int metricgroup__add_metric_runtime_param(struct strbuf *events, > + struct list_head *group_list, struct pmu_event *pe) > +{ > + int i, count; > + int ret = -EINVAL; > + > + count =

Re: [PATCH v4 6/8] perf/tools: Enhance JSON/metric infrastructure to handle "?"

2020-03-12 Thread Jiri Olsa
On Mon, Mar 09, 2020 at 11:55:50AM +0530, Kajol Jain wrote: SNIP > diff --git a/tools/perf/util/expr.l b/tools/perf/util/expr.l > index 1928f2a3dddc..ec4b00671f67 100644 > --- a/tools/perf/util/expr.l > +++ b/tools/perf/util/expr.l > @@ -45,6 +45,21 @@ static char *normalize(char *str) >

Re: [PATCH v3] ima: add a new CONFIG for loading arch-specific policies

2020-03-12 Thread Michael Ellerman
Nayna Jain writes: > From: Nayna Jain > > Every time a new architecture defines the IMA architecture specific > functions - arch_ima_get_secureboot() and arch_ima_get_policy(), the IMA > include file needs to be updated. To avoid this "noise", this patch > defines a new IMA Kconfig

Re: [PATCH 1/3] powerpc/numa: Set numa_node for all possible cpus

2020-03-12 Thread Sachin Sant
> On 12-Mar-2020, at 10:57 AM, Srikar Dronamraju > wrote: > > * Michal Hocko [2020-03-11 12:57:35]: > >> On Wed 11-03-20 16:32:35, Srikar Dronamraju wrote: >>> A Powerpc system with multiple possible nodes and with CONFIG_NUMA >>> enabled always used to have a node 0, even if node 0 does

Re: [PATCH v4 6/8] perf/tools: Enhance JSON/metric infrastructure to handle "?"

2020-03-12 Thread kajoljain
On 3/11/20 12:04 AM, Arnaldo Carvalho de Melo wrote: > Em Mon, Mar 09, 2020 at 11:55:50AM +0530, Kajol Jain escreveu: >> Patch enhances current metric infrastructure to handle "?" in the metric >> expression. The "?" can be use for parameters whose value not known while >> creating metric

[PATCH kernel] powerpc/prom_init: Pass the "os-term" message to hypervisor

2020-03-12 Thread Alexey Kardashevskiy
The "os-term" RTAS calls has one argument with a message address of OS termination cause. rtas_os_term() already passes it but the recently added prom_init's version of that missed it; it also does not fill args correctly. This passes the message address and initializes the number of arguments.

Re: [RESEND PATCH v2 8/9] media: fsl-viu: Constify ioreadX() iomem argument (as in generic implementation)

2020-03-12 Thread Hans Verkuil
On 2/19/20 6:50 PM, Krzysztof Kozlowski wrote: > The ioreadX() helpers have inconsistent interface. On some architectures > void *__iomem address argument is a pointer to const, on some not. > > Implementations of ioreadX() do not modify the memory under the address > so they can be converted to

[PATCH v4] powerpc: Replace setup_irq() by request_irq()

2020-03-12 Thread afzal mohammed
request_irq() is preferred over setup_irq(). Invocations of setup_irq() occur after memory allocators are ready. Per tglx[1], setup_irq() existed in olden days when allocators were not ready by the time early interrupts were initialized. Hence replace setup_irq() by request_irq(). [1]

[PATCH v3 4/6] powerpc/mmu_gather: enable RCU_TABLE_FREE even for !SMP case

2020-03-12 Thread Santosh Sivaraj
From: "Aneesh Kumar K.V" commit 12e4d53f3f04e81f9e83d6fc10edc7314ab9f6b9 upstream. Patch series "Fixup page directory freeing", v4. This is a repost of patch series from Peter with the arch specific changes except ppc64 dropped. ppc64 changes are added here because we are redoing the patch

Re: [PATCH 1/3] powerpc/numa: Set numa_node for all possible cpus

2020-03-12 Thread Vlastimil Babka
On 3/12/20 2:14 PM, Srikar Dronamraju wrote: > * Vlastimil Babka [2020-03-12 10:30:50]: > >> On 3/12/20 9:23 AM, Sachin Sant wrote: >> >> On 12-Mar-2020, at 10:57 AM, Srikar Dronamraju >> >> wrote: >> >> * Michal Hocko [2020-03-11 12:57:35]: >> >>> On Wed 11-03-20 16:32:35, Srikar Dronamraju

Re: [5.6.0-rc2-next-20200218/powerpc] Boot failure on POWER9

2020-03-12 Thread Sachin Sant
> The patch below might work. Sachin can you test this? I tried faking up > a system with a memoryless node zero but couldn't get it to even start > booting. > The patch did not help. The kernel crashed during the boot with the same call trace. BUG_ON() introduced with the patch was not

Re: [PATCH v5 4/7] ASoC: fsl_asrc: rename asrc_priv to asrc

2020-03-12 Thread Mark Brown
On Mon, Mar 09, 2020 at 02:30:17PM -0700, Nicolin Chen wrote: > On Mon, Mar 09, 2020 at 11:58:31AM +0800, Shengjiu Wang wrote: > > In order to move common structure to fsl_asrc_common.h > > we change the name of asrc_priv to asrc, the asrc_priv > > will be used by new struct fsl_asrc_priv. > This

[PATCH v3 0/6] Memory corruption may occur due to incorrent tlb flush

2020-03-12 Thread Santosh Sivaraj
The TLB flush optimisation (a46cc7a90f: powerpc/mm/radix: Improve TLB/PWC flushes) may result in random memory corruption. Any concurrent page-table walk could end up with a Use-after-Free. Even on UP this might give issues, since mmu_gather is preemptible these days. An interrupt or preempted

[PATCH v3 6/6] asm-generic/tlb: avoid potential double flush

2020-03-12 Thread Santosh Sivaraj
From: Peter Zijlstra commit 0758cd8304942292e95a0f750c374533db378b32 upstream. Aneesh reported that: tlb_flush_mmu() tlb_flush_mmu_tlbonly() tlb_flush() <-- #1 tlb_flush_mmu_free() tlb_table_flush()

Re: [PATCH 1/3] powerpc/numa: Set numa_node for all possible cpus

2020-03-12 Thread Srikar Dronamraju
* Vlastimil Babka [2020-03-12 14:51:38]: > > * Vlastimil Babka [2020-03-12 10:30:50]: > > > >> On 3/12/20 9:23 AM, Sachin Sant wrote: > >> >> On 12-Mar-2020, at 10:57 AM, Srikar Dronamraju > >> >> wrote: > >> >> * Michal Hocko [2020-03-11 12:57:35]: > >> >>> On Wed 11-03-20 16:32:35, Srikar

Re: [PATCH 1/3] powerpc/numa: Set numa_node for all possible cpus

2020-03-12 Thread Vlastimil Babka
On 3/12/20 5:13 PM, Srikar Dronamraju wrote: > * Vlastimil Babka [2020-03-12 14:51:38]: > >> > * Vlastimil Babka [2020-03-12 10:30:50]: >> > >> >> On 3/12/20 9:23 AM, Sachin Sant wrote: >> >> >> On 12-Mar-2020, at 10:57 AM, Srikar Dronamraju >> >> >> wrote: >> >> >> * Michal Hocko

[PATCH v3 3/6] asm-generic/tlb, arch: Invert CONFIG_HAVE_RCU_TABLE_INVALIDATE

2020-03-12 Thread Santosh Sivaraj
From: Peter Zijlstra commit 96bc9567cbe112e9320250f01b9c060c882e8619 upstream. Make issuing a TLB invalidate for page-table pages the normal case. The reason is twofold: - too many invalidates is safer than too few, - most architectures use the linux page-tables natively and would thus

[PATCH v3 2/6] asm-generic/tlb: Track which levels of the page tables have been cleared

2020-03-12 Thread Santosh Sivaraj
From: Will Deacon commit a6d60245d6d9b1caf66b0d94419988c4836980af upstream It is common for architectures with hugepage support to require only a single TLB invalidation operation per hugepage during unmap(), rather than iterating through the mapping at a PAGE_SIZE increment. Currently,

[PATCH -next] PCI: rpaphp: remove set but not used variable 'value'

2020-03-12 Thread Chen Zhou
Fixes gcc '-Wunused-but-set-variable' warning: drivers/pci/hotplug/rpaphp_core.c: In function is_php_type: drivers/pci/hotplug/rpaphp_core.c:291:16: warning: variable value set but not used [-Wunused-but-set-variable] Reported-by: Hulk Robot Signed-off-by: Chen Zhou ---

Re: [RFC PATCH v1] pseries/drmem: don't cache node id in drmem_lmb struct

2020-03-12 Thread Scott Cheloha
Hi Michal, On Thu, Mar 12, 2020 at 06:02:37AM +0100, Michal Suchánek wrote: > On Wed, Mar 11, 2020 at 06:08:15PM -0500, Scott Cheloha wrote: > > At memory hot-remove time we can retrieve an LMB's nid from its > > corresponding memory_block. There is no need to store the nid > > in multiple

[PATCH v3 1/6] asm-generic/tlb: Track freeing of page-table directories in struct mmu_gather

2020-03-12 Thread Santosh Sivaraj
From: Peter Zijlstra commit 22a61c3c4f1379ef8b0ce0d5cb78baf3178950e2 upstream Some architectures require different TLB invalidation instructions depending on whether it is only the last-level of page table being changed, or whether there are also changes to the intermediate (directory) entries

Re: [PATCH -next] PCI: rpaphp: remove set but not used variable 'value'

2020-03-12 Thread Bjorn Helgaas
On Thu, Mar 12, 2020 at 10:04:12PM +0800, Chen Zhou wrote: > Fixes gcc '-Wunused-but-set-variable' warning: > > drivers/pci/hotplug/rpaphp_core.c: In function is_php_type: > drivers/pci/hotplug/rpaphp_core.c:291:16: warning: > variable value set but not used [-Wunused-but-set-variable] > >

Re: [PATCH 1/3] powerpc/numa: Set numa_node for all possible cpus

2020-03-12 Thread Srikar Dronamraju
* Vlastimil Babka [2020-03-12 10:30:50]: > On 3/12/20 9:23 AM, Sachin Sant wrote: > >> On 12-Mar-2020, at 10:57 AM, Srikar Dronamraju > >> wrote: > >> * Michal Hocko [2020-03-11 12:57:35]: > >>> On Wed 11-03-20 16:32:35, Srikar Dronamraju wrote: > To ensure a cpuless, memoryless dummy

[PATCH v3 5/6] mm/mmu_gather: invalidate TLB correctly on batch allocation failure and flush

2020-03-12 Thread Santosh Sivaraj
From: Peter Zijlstra commit 0ed1325967ab5f7a4549a2641c6ebe115f76e228 upstream. Architectures for which we have hardware walkers of Linux page table should flush TLB on mmu gather batch allocation failures and batch flush. Some architectures like POWER supports multiple translation modes (hash

Re: [PATCH -next] PCI: rpaphp: remove set but not used variable 'value'

2020-03-12 Thread Bjorn Helgaas
On Thu, Mar 12, 2020 at 09:38:02AM -0500, Bjorn Helgaas wrote: > On Thu, Mar 12, 2020 at 10:04:12PM +0800, Chen Zhou wrote: > > Fixes gcc '-Wunused-but-set-variable' warning: > > > > drivers/pci/hotplug/rpaphp_core.c: In function is_php_type: > > drivers/pci/hotplug/rpaphp_core.c:291:16: warning:

Re: [PATCH] powerpc/pseries: fix of_read_drc_info_cell() to point at next record

2020-03-12 Thread Nathan Lynch
Michael Ellerman writes: > > It would also be *really* nice if we had some unit tests for this > parsing code, it's demonstrably very bug prone. Can you say more about what form unit tests could take? Like some self tests that run at boot time, or is there a way to run the code in a user space

Re: [PATCH -next] PCI: rpaphp: remove set but not used variable 'value'

2020-03-12 Thread Tyrel Datwyler
On 3/12/20 7:41 AM, Bjorn Helgaas wrote: > On Thu, Mar 12, 2020 at 09:38:02AM -0500, Bjorn Helgaas wrote: >> On Thu, Mar 12, 2020 at 10:04:12PM +0800, Chen Zhou wrote: >>> Fixes gcc '-Wunused-but-set-variable' warning: >>> >>> drivers/pci/hotplug/rpaphp_core.c: In function is_php_type: >>>

Re: [PATCH] powerpc/pseries: fix of_read_drc_info_cell() to point at next record

2020-03-12 Thread Tyrel Datwyler
On 3/11/20 10:43 PM, Michael Ellerman wrote: > Tyrel Datwyler writes: >> On 3/10/20 10:25 AM, Nathan Lynch wrote: >>> Tyrel Datwyler writes: The expectation is that when calling of_read_drc_info_cell() repeatedly to parse multiple drc-info records that the in/out curval parameter

[PATCH 5/6] soc: fsl: qe: fix sparse warnings for ucc_fast.c

2020-03-12 Thread Li Yang
Fixes the following sparse warnings: drivers/soc/fsl/qe/ucc_fast.c:218:22: warning: incorrect type in assignment (different base types) drivers/soc/fsl/qe/ucc_fast.c:218:22:expected unsigned int [noderef] [usertype] *p_ucce drivers/soc/fsl/qe/ucc_fast.c:218:22:got restricted __be32

[PATCH 1/6] soc: fsl: qe: fix sparse warnings for qe.c

2020-03-12 Thread Li Yang
Fixes the following sparse warnings: drivers/soc/fsl/qe/qe.c:426:9: warning: cast to restricted __be32 drivers/soc/fsl/qe/qe.c:528:41: warning: incorrect type in assignment (different base types) drivers/soc/fsl/qe/qe.c:528:41:expected unsigned long long static [addressable] [toplevel]

Re: [PATCH] powerpc/pseries: fix of_read_drc_info_cell() to point at next record

2020-03-12 Thread Michael Ellerman
Nathan Lynch writes: > Michael Ellerman writes: >> >> It would also be *really* nice if we had some unit tests for this >> parsing code, it's demonstrably very bug prone. > > Can you say more about what form unit tests could take? Like some self > tests that run at boot time, or is there a way

[PATCH 2/6] soc: fsl: qe: fix sparse warning for qe_common.c

2020-03-12 Thread Li Yang
Fixes the following sparse warning: drivers/soc/fsl/qe/qe_common.c:75:48: warning: incorrect type in argument 2 (different base types) drivers/soc/fsl/qe/qe_common.c:75:48:expected restricted __be32 const [usertype] *addr drivers/soc/fsl/qe/qe_common.c:75:48:got unsigned int *

Re: [RFC 00/11] perf: Enhancing perf to export processor hazard information

2020-03-12 Thread Kim Phillips
On 3/11/20 11:00 AM, Ravi Bangoria wrote: > Hi Kim, Hi Ravi, > On 3/6/20 3:36 AM, Kim Phillips wrote: >>> On 3/3/20 3:55 AM, Kim Phillips wrote: On 3/2/20 2:21 PM, Stephane Eranian wrote: > On Mon, Mar 2, 2020 at 2:13 AM Peter Zijlstra > wrote: >> >> On Mon, Mar 02, 2020

Re: [PATCH v3 24/27] powerpc/powernv/pmem: Expose SMART data via ndctl

2020-03-12 Thread Alastair D'Silva
On Thu, 2020-03-05 at 14:36 +1100, Andrew Donnellan wrote: > On 21/2/20 2:27 pm, Alastair D'Silva wrote: > > +static int ndctl_smart(struct ocxlpmem *ocxlpmem, struct > > nd_cmd_pkg *pkg) > > +{ > > + u32 length, i; > > + struct nd_ocxl_smart *out; > > + int rc; > > + > > +

[PATCH 4/6] soc: fsl: qe: fix sparse warnings for qe_ic.c

2020-03-12 Thread Li Yang
Fixes the following sparse warnings: drivers/soc/fsl/qe/qe_ic.c:253:32: warning: incorrect type in argument 1 (different base types) drivers/soc/fsl/qe/qe_ic.c:253:32:expected restricted __be32 [noderef] [usertype] *base drivers/soc/fsl/qe/qe_ic.c:253:32:got unsigned int [noderef]

[PATCH 3/6] soc: fsl: qe: fix sparse warnings for ucc.c

2020-03-12 Thread Li Yang
Fixes the following sparse warnings: drivers/soc/fsl/qe/ucc.c:637:20: warning: incorrect type in assignment (different address spaces) drivers/soc/fsl/qe/ucc.c:637:20:expected struct qe_mux *qe_mux_reg drivers/soc/fsl/qe/ucc.c:637:20:got struct qe_mux [noderef] *

Re: [PATCH v5 1/7] ASoC: dt-bindings: fsl_asrc: Add new property fsl, asrc-format

2020-03-12 Thread Shengjiu Wang
Hi Rob On Tue, Mar 10, 2020 at 5:20 AM Nicolin Chen wrote: > > On Mon, Mar 09, 2020 at 11:58:28AM +0800, Shengjiu Wang wrote: > > In order to support new EASRC and simplify the code structure, > > We decide to share the common structure between them. This bring > > a problem that EASRC accept

Re: [PATCH] powerpc/pseries: fix of_read_drc_info_cell() to point at next record

2020-03-12 Thread Michael Ellerman
Tyrel Datwyler writes: > On 3/11/20 10:43 PM, Michael Ellerman wrote: >> Tyrel Datwyler writes: >>> On 3/10/20 10:25 AM, Nathan Lynch wrote: Tyrel Datwyler writes: > The expectation is that when calling of_read_drc_info_cell() > repeatedly to parse multiple drc-info records that

[PATCH 0/6] Fix sparse warnings for common qe library code

2020-03-12 Thread Li Yang
The QE code was previously only supported on big-endian PowerPC systems that use the same endian as the QE device. The endian transfer code is not really exercised. Recent updates extended the QE drivers to little-endian ARM/ARM64 systems which makes the endian transfer really meaningful and

[PATCH 6/6] soc: fsl: qe: fix sparse warnings for ucc_slow.c

2020-03-12 Thread Li Yang
Fixes the following sparse warnings: drivers/soc/fsl/qe/ucc_slow.c:78:17: warning: incorrect type in assignment (different address spaces) drivers/soc/fsl/qe/ucc_slow.c:78:17:expected struct ucc_slow *us_regs drivers/soc/fsl/qe/ucc_slow.c:78:17:got struct ucc_slow [noderef] *us_regs

Re: [PATCHv3 2/2] pseries/scm: buffer pmem's bound addr in dt for kexec kernel

2020-03-12 Thread Oliver O'Halloran
On Wed, Mar 4, 2020 at 7:50 PM Pingfan Liu wrote: > > At present, plpar_hcall(H_SCM_BIND_MEM, ...) takes a very long time, so > if dumping to fsdax, it will take a very long time. > > Take a closer look, during the papr_scm initialization, the only > configuration is through drc_pmem_bind()->

Re: [PATCH] powerpc/32: Fix missing NULL pmd check in virt_to_kpte()

2020-03-12 Thread Nathan Chancellor
On Sat, Mar 07, 2020 at 10:09:15AM +, Christophe Leroy wrote: > Commit 2efc7c085f05 ("powerpc/32: drop get_pteptr()"), > replaced get_pteptr() by virt_to_kpte(). But virt_to_kpte() lacks a > NULL pmd check and returns an invalid non NULL pointer when there > is no page table. > > Reported-by:

[PATCH v4 2/2] powerpc/powernv: Re-enable imc trace-mode in kernel

2020-03-12 Thread Anju T Sudhakar
commit <249fad734a25> ""powerpc/perf: Disable trace_imc pmu" disables IMC(In-Memory Collection) trace-mode in kernel, since frequent mode switching between accumulation mode and trace mode via the spr LDBAR in the hardware can trigger a checkstop(system crash). Patch to re-enable imc-trace mode

[PATCH v4 1/2] powerpc/perf: Implement a global lock to avoid races between trace, core and thread imc events.

2020-03-12 Thread Anju T Sudhakar
IMC(In-memory Collection Counters) does performance monitoring in two different modes, i.e accumulation mode(core-imc and thread-imc events), and trace mode(trace-imc events). A cpu thread can either be in accumulation-mode or trace-mode at a time and this is done via the LDBAR register in POWER