[PATCH v3] powerpc/fsl-85xx: fix compile error

2020-03-13 Thread WANG Wenhu
Include "linux/of_address.h" to fix the compile error for mpc85xx_l2ctlr_of_probe() when compiling fsl_85xx_cache_sram.c. CC arch/powerpc/sysdev/fsl_85xx_l2ctlr.o arch/powerpc/sysdev/fsl_85xx_l2ctlr.c: In function ‘mpc85xx_l2ctlr_of_probe’: arch/powerpc/sysdev/fsl_85xx_l2ctlr.c:90:11:

Re:Re: [PATCH v2] powerpc/fsl-85xx: fix compile error

2020-03-13 Thread 王文虎
发件人:Christophe Leroy 发送日期:2020-03-14 03:24:20 收件人:"王文虎" 抄送人:Benjamin Herrenschmidt ,Paul Mackerras ,Michael Ellerman ,Richard Fontana ,Kate Stewart ,Allison Randal ,Thomas Gleixner ,linuxppc-dev@lists.ozlabs.org,linux-ker...@vger.kernel.org,ker...@vivo.com,triv...@kernel.org 主题:Re: [PATCH

Re: [PATCH] powerpc/pseries: Fix MCE handling on pseries

2020-03-13 Thread Nicholas Piggin
Ganesh Goudar's on March 14, 2020 12:04 am: > MCE handling on pSeries platform fails as recent rework to use common > code for pSeries and PowerNV in machine check error handling tries to > access per-cpu variables in realmode. The per-cpu variables may be > outside the RMO region on pSeries

[PATCH v6 11/11] misc: pci_endpoint_test: Add LS1088a in pci_device_id table

2020-03-13 Thread Xiaowei Bao
Add LS1088a in pci_device_id table so that pci-epf-test can be used for testing PCIe EP in LS1088a. Signed-off-by: Xiaowei Bao Reviewed-by: Andrew Murray --- v2: - No change. v3: - No change. v4: - Use a maco to define the LS1088a device ID. v5: - No change. v6: - No change.

[PATCH v6 10/11] arm64: dts: layerscape: Add PCIe EP node for ls1088a

2020-03-13 Thread Xiaowei Bao
Add PCIe EP node for ls1088a to support EP mode. Signed-off-by: Xiaowei Bao Reviewed-by: Andrew Murray --- v2: - Remove the pf-offset proparty. v3: - No change. v4: - No change. v5: - No change. v6: - No change. arch/arm64/boot/dts/freescale/fsl-ls1088a.dtsi | 31

[PATCH v6 09/11] PCI: layerscape: Add EP mode support for ls1088a and ls2088a

2020-03-13 Thread Xiaowei Bao
Add PCIe EP mode support for ls1088a and ls2088a, there are some difference between LS1 and LS2 platform, so refactor the code of the EP driver. Signed-off-by: Xiaowei Bao --- v2: - This is a new patch for supporting the ls1088a and ls2088a platform. v3: - Adjust the some struct assignment

[PATCH v6 08/11] PCI: layerscape: Modify the MSIX to the doorbell mode

2020-03-13 Thread Xiaowei Bao
dw_pcie_ep_raise_msix_irq was never called in the exisitng driver before, because the ls1046a platform don't support the MSIX feature and msix_capable was always set to false. Now that add the ls1088a platform with MSIX support, use the doorbell method to support the MSIX feature. Signed-off-by:

[PATCH v6 07/11] PCI: layerscape: Modify the way of getting capability with different PEX

2020-03-13 Thread Xiaowei Bao
The different PCIe controller in one board may be have different capability of MSI or MSIX, so change the way of getting the MSI capability, make it more flexible. Signed-off-by: Xiaowei Bao --- v2: - Remove the repeated assignment code. v3: - Use ep_func msi_cap and msix_cap to decide the

[PATCH v6 06/11] PCI: layerscape: Fix some format issue of the code

2020-03-13 Thread Xiaowei Bao
Fix some format issue of the code in EP driver. Signed-off-by: Xiaowei Bao Reviewed-by: Andrew Murray --- v2: - No change. v3: - No change. v4: - No change. v5: - No change. v6: - No change. drivers/pci/controller/dwc/pci-layerscape-ep.c | 4 ++-- 1 file changed, 2 insertions(+), 2

[PATCH v6 05/11] dt-bindings: pci: layerscape-pci: Add compatible strings for ls1088a and ls2088a

2020-03-13 Thread Xiaowei Bao
Add compatible strings for ls1088a and ls2088a. Signed-off-by: Xiaowei Bao Acked-by: Rob Herring --- v2: - No change. v3: - Use one valid combination of compatible strings. v4: - Add the comma between the two compatible. v5: - No change. v6: - No change.

[PATCH v6 04/11] PCI: designware-ep: Modify MSI and MSIX CAP way of finding

2020-03-13 Thread Xiaowei Bao
Each PF of EP device should have it's own MSI or MSIX capabitily struct, so create a dw_pcie_ep_func struct and remove the msi_cap and msix_cap to this struct from dw_pcie_ep, and manage the PFs with a list. Signed-off-by: Xiaowei Bao --- v3: - This is a new patch, to fix the issue of MSI and

[PATCH v6 03/11] PCI: designware-ep: Move the function of getting MSI capability forward

2020-03-13 Thread Xiaowei Bao
Move the function of getting MSI capability to the front of init function, because the init function of the EP platform driver will use the return value by the function of getting MSI capability. Signed-off-by: Xiaowei Bao Reviewed-by: Andrew Murray --- v2: - No change. v3: - No change. v4:

[PATCH v6 01/11] PCI: designware-ep: Add multiple PFs support for DWC

2020-03-13 Thread Xiaowei Bao
Add multiple PFs support for DWC, due to different PF have different config space, we use func_conf_select callback function to access the different PF's config space, the different chip company need to implement this callback function when use the DWC IP core and intend to support multiple PFs

[PATCH v6 02/11] PCI: designware-ep: Add the doorbell mode of MSI-X in EP mode

2020-03-13 Thread Xiaowei Bao
Add the doorbell mode of MSI-X in DWC EP driver. Signed-off-by: Xiaowei Bao Reviewed-by: Andrew Murray --- v2: - Remove the macro of no used. v3: - No change. v4: - Modify the commit message. v5: - No change. v6: - No change. drivers/pci/controller/dwc/pcie-designware-ep.c | 14

[PATCH v6 00/11] Add the multiple PF support for DWC and Layerscape

2020-03-13 Thread Xiaowei Bao
Add the PCIe EP multiple PF support for DWC and Layerscape, add the doorbell MSIX function for DWC, use list to manage the PF of one PCIe controller, and refactor the Layerscape EP driver due to some platforms difference. Xiaowei Bao (11): PCI: designware-ep: Add multiple PFs support for DWC

Re: [PATCH v3] powerpc: setup_64: set up PACA earlier to avoid kcov problems

2020-03-13 Thread Nicholas Piggin
Daniel Axtens's on March 11, 2020 9:03 am: So: - change the test when setting up a PACA to consider the actual value of the MSR rather than the CPU feature. - move the PACA setup to before the cpu feature parsing. >>> >>> Hmm. Problem is that equally we want PACA to

Re: [PATCH v2] powerpc/fsl-85xx: fix compile error

2020-03-13 Thread Christophe Leroy
Le 13/03/2020 à 19:17, 王文虎 a écrit : 发件人:Christophe Leroy 发送日期:2020-03-14 01:45:11 收件人:WANG Wenhu ,Benjamin Herrenschmidt ,Paul Mackerras ,Michael Ellerman ,Richard Fontana ,Kate Stewart ,Allison Randal ,Thomas Gleixner ,linuxppc-dev@lists.ozlabs.org,linux-ker...@vger.kernel.org

Re:Re: [PATCH v2] powerpc/fsl-85xx: fix compile error

2020-03-13 Thread 王文虎
发件人:Christophe Leroy 发送日期:2020-03-14 01:45:11 收件人:WANG Wenhu ,Benjamin Herrenschmidt ,Paul Mackerras ,Michael Ellerman ,Richard Fontana ,Kate Stewart ,Allison Randal ,Thomas Gleixner ,linuxppc-dev@lists.ozlabs.org,linux-ker...@vger.kernel.org 抄送人:ker...@vivo.com,triv...@kernel.org 主题:Re:

Re: [PATCH v2] powerpc/perf: Use SIER_USER_MASK while updating SPRN_SIER for EBB events

2020-03-13 Thread Segher Boessenkool
On Fri, Mar 13, 2020 at 01:49:07PM -0400, Athira Rajeev wrote: > Sampled instruction address register (SIER), is a PMU register, SIER stands for "Sampled Instruction Event Register", instead. With that change, your patch is totally clear :-) Segher

[PATCH v2] powerpc/perf: Use SIER_USER_MASK while updating SPRN_SIER for EBB events

2020-03-13 Thread Athira Rajeev
Sampled instruction address register (SIER), is a PMU register, captures architecture state for a given sample. And sier_user_mask defined in commit 330a1eb7775b ("powerpc/perf: Core EBB support for 64-bit book3s") defines the architected bits that needs to be saved from the SPR. Currently all of

Re: [PATCH v2] powerpc/fsl-85xx: fix compile error

2020-03-13 Thread Christophe Leroy
Le 13/03/2020 à 18:19, WANG Wenhu a écrit : Include "linux/of_address.h" to fix the compile error for mpc85xx_l2ctlr_of_probe() when compiling fsl_85xx_cache_sram.c. CC arch/powerpc/sysdev/fsl_85xx_l2ctlr.o arch/powerpc/sysdev/fsl_85xx_l2ctlr.c: In function ‘mpc85xx_l2ctlr_of_probe’:

[PATCH v2] powerpc/fsl-85xx: fix compile error

2020-03-13 Thread WANG Wenhu
Include "linux/of_address.h" to fix the compile error for mpc85xx_l2ctlr_of_probe() when compiling fsl_85xx_cache_sram.c. CC arch/powerpc/sysdev/fsl_85xx_l2ctlr.o arch/powerpc/sysdev/fsl_85xx_l2ctlr.c: In function ‘mpc85xx_l2ctlr_of_probe’: arch/powerpc/sysdev/fsl_85xx_l2ctlr.c:90:11:

Re: [PATCH 2/2] powerpc/smp: Use IS_ENABLED() to avoid #ifdef

2020-03-13 Thread Srikar Dronamraju
* Michael Ellerman [2020-03-13 22:20:20]: > We can avoid the #ifdef by using IS_ENABLED() in the existing > condition check. > Looks good to me. Reviewed-by: Srikar Dronamraju > Signed-off-by: Michael Ellerman > --- > arch/powerpc/kernel/smp.c | 5 ++--- > 1 file changed, 2 insertions(+),

Re: [PATCH 1/2] powerpc/smp: Drop superfluous NULL check

2020-03-13 Thread Srikar Dronamraju
* Michael Ellerman [2020-03-13 22:20:19]: > We don't need the NULL check of np, the result is the same because the > OF helpers cope with NULL, of_node_to_nid(NULL) == NUMA_NO_NODE (-1). > Looks good to me. Reviewed-by: Srikar Dronamraju > Signed-off-by: Michael Ellerman > --- >

[PATCH] powerpc/pseries: Handle UE event for memcpy_mcsafe

2020-03-13 Thread Ganesh Goudar
If we hit UE at an instruction with a fixup entry, flag to ignore the event and set nip to continue execution at the fixup entry. For powernv this changes are already made by commit 895e3dceeb97 ("powerpc/mce: Handle UE event for memcpy_mcsafe") Signed-off-by: Ganesh Goudar ---

[PATCH] powerpc/pseries: Fix MCE handling on pseries

2020-03-13 Thread Ganesh Goudar
MCE handling on pSeries platform fails as recent rework to use common code for pSeries and PowerNV in machine check error handling tries to access per-cpu variables in realmode. The per-cpu variables may be outside the RMO region on pSeries platform and needs translation to be enabled for access.

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

2020-03-13 Thread kajoljain
On 3/12/20 4:22 PM, Jiri Olsa wrote: > 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; >>

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

2020-03-13 Thread Michael Ellerman
Alexey Kardashevskiy writes: > 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

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

2020-03-13 Thread Vlastimil Babka
On 3/13/20 12:04 PM, Srikar Dronamraju wrote: >> I lost all the memory about it. :) >> Anyway, how about this? >> >> 1. make node_present_pages() safer >> static inline node_present_pages(nid) >> { >> if (!node_online(nid)) return 0; >> return (NODE_DATA(nid)->node_present_pages); >> } >> > >

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

2020-03-13 Thread Vlastimil Babka
On 3/13/20 12:12 PM, Srikar Dronamraju wrote: > * Michael Ellerman [2020-03-13 21:48:06]: > >> Sachin Sant writes: >> >> 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. >> >> >>

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

2020-03-13 Thread Srikar Dronamraju
* Vlastimil Babka [2020-03-12 17:41:58]: > 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

[PATCH 2/2] powerpc/smp: Use IS_ENABLED() to avoid #ifdef

2020-03-13 Thread Michael Ellerman
We can avoid the #ifdef by using IS_ENABLED() in the existing condition check. Signed-off-by: Michael Ellerman --- arch/powerpc/kernel/smp.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/arch/powerpc/kernel/smp.c b/arch/powerpc/kernel/smp.c index

[PATCH 1/2] powerpc/smp: Drop superfluous NULL check

2020-03-13 Thread Michael Ellerman
We don't need the NULL check of np, the result is the same because the OF helpers cope with NULL, of_node_to_nid(NULL) == NUMA_NO_NODE (-1). Signed-off-by: Michael Ellerman --- arch/powerpc/kernel/smp.c | 7 ++- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git

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

2020-03-13 Thread Srikar Dronamraju
* Michael Ellerman [2020-03-13 21:48:06]: > Sachin Sant writes: > >> 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 > >

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

2020-03-13 Thread Srikar Dronamraju
* Joonsoo Kim [2020-03-13 18:47:49]: > > >> > > >> > Also for a memoryless/cpuless node or possible but not present nodes, > > >> > node_to_mem_node(node) will still end up as node (atleast on powerpc). > > >> > > >> I think that's the place where this would be best to fix. > > >> > > > > > >

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

2020-03-13 Thread Michael Ellerman
Sachin Sant writes: >> 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

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

2020-03-13 Thread Michael Ellerman
Bjorn Helgaas writes: > 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: >> >

[PATCH] powerpc/book3s/hash64/devmap: Use H_PAGE_THP_HUGE when setting up huge devmap pte entries

2020-03-13 Thread Aneesh Kumar K.V
H_PAGE_THP_HUGE is used to differentiate between a THP hugepage and hugetlb hugepage entries. The difference is w.r.t how we handle hash fault on these address. THP address enables MPSS in segments. We want to manage devmap hugepage entries similar to THP pt entries. Hence use H_PAGE_THP_HUGE for

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

2020-03-13 Thread Joonsoo Kim
2020년 3월 13일 (금) 오전 1:42, 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

Re: [PATCH] ocxl: control via sysfs whether the FPGA is reloaded on a link reset

2020-03-13 Thread Frederic Barrat
Le 11/03/2020 à 12:52, Philippe Bergheaud a écrit : Some opencapi FPGA images allow to control if the FPGA should be reloaded on the next adapter reset. If it is supported, the image specifies it through a Vendor Specific DVSEC in the config space of function 0. This patch adds an interface