Re: [PATCH] powerpc/perf: Fix hv-24x7 metric events for power10

2022-10-17 Thread Madhavan Srinivasan
On 10/17/22 7:03 PM, Arnaldo Carvalho de Melo wrote: Em Fri, Oct 14, 2022 at 07:32:20PM +0530, Kajol Jain escreveu: Testcase stat_all_metrics.sh fails in powerpc: 90: perf all metrics test : FAILED! The testcase "stat_all_metrics.sh" verifies perf stat result for all the metric events

Re: [PATCH] soc: move from strlcpy with unused retval to strscpy

2022-10-17 Thread Bjorn Andersson
On Thu, 18 Aug 2022 23:01:06 +0200, Wolfram Sang wrote: > Follow the advice of the below link and prefer 'strscpy' in this > subsystem. Conversion is 1:1 because the return value is not used. > Generated by a coccinelle script. > > Applied, thanks! [1/1] soc: move from strlcpy with unused

Re: [PATCH AUTOSEL 5.19 05/29] powerpc/hw_breakpoint: Avoid relying on caller synchronization

2022-10-17 Thread Marco Elver
On Mon, 17 Oct 2022 at 17:08, Sasha Levin wrote: > > From: Marco Elver > > [ Upstream commit f95e5a3d59011eec1257d0e76de1e1f8969d426f ] > > Internal data structures (cpu_bps, task_bps) of powerpc's hw_breakpoint > implementation have relied on nr_bp_mutex serializing access to them. > > Before

[PATCH AUTOSEL 4.19 05/10] powerpc/64: don't refer nr_cpu_ids in asm code when it's undefined

2022-10-17 Thread Sasha Levin
From: Yury Norov [ Upstream commit 546a073d628111e3338af689938407e77d5dc38f ] generic_secondary_common_init() calls LOAD_REG_ADDR(r7, nr_cpu_ids) conditionally on CONFIG_SMP. However, if 'NR_CPUS == 1', kernel doesn't use the nr_cpu_ids, and in C code, it's just: #if NR_CPUS == 1 #define

[PATCH AUTOSEL 5.4 07/13] powerpc/64: don't refer nr_cpu_ids in asm code when it's undefined

2022-10-17 Thread Sasha Levin
From: Yury Norov [ Upstream commit 546a073d628111e3338af689938407e77d5dc38f ] generic_secondary_common_init() calls LOAD_REG_ADDR(r7, nr_cpu_ids) conditionally on CONFIG_SMP. However, if 'NR_CPUS == 1', kernel doesn't use the nr_cpu_ids, and in C code, it's just: #if NR_CPUS == 1 #define

[PATCH AUTOSEL 5.10 09/16] powerpc/64: don't refer nr_cpu_ids in asm code when it's undefined

2022-10-17 Thread Sasha Levin
From: Yury Norov [ Upstream commit 546a073d628111e3338af689938407e77d5dc38f ] generic_secondary_common_init() calls LOAD_REG_ADDR(r7, nr_cpu_ids) conditionally on CONFIG_SMP. However, if 'NR_CPUS == 1', kernel doesn't use the nr_cpu_ids, and in C code, it's just: #if NR_CPUS == 1 #define

[PATCH AUTOSEL 5.10 04/16] powerpc/hw_breakpoint: Avoid relying on caller synchronization

2022-10-17 Thread Sasha Levin
From: Marco Elver [ Upstream commit f95e5a3d59011eec1257d0e76de1e1f8969d426f ] Internal data structures (cpu_bps, task_bps) of powerpc's hw_breakpoint implementation have relied on nr_bp_mutex serializing access to them. Before overhauling synchronization of kernel/events/hw_breakpoint.c,

[PATCH AUTOSEL 5.15 10/21] powerpc/64: don't refer nr_cpu_ids in asm code when it's undefined

2022-10-17 Thread Sasha Levin
From: Yury Norov [ Upstream commit 546a073d628111e3338af689938407e77d5dc38f ] generic_secondary_common_init() calls LOAD_REG_ADDR(r7, nr_cpu_ids) conditionally on CONFIG_SMP. However, if 'NR_CPUS == 1', kernel doesn't use the nr_cpu_ids, and in C code, it's just: #if NR_CPUS == 1 #define

[PATCH AUTOSEL 5.15 04/21] powerpc/hw_breakpoint: Avoid relying on caller synchronization

2022-10-17 Thread Sasha Levin
From: Marco Elver [ Upstream commit f95e5a3d59011eec1257d0e76de1e1f8969d426f ] Internal data structures (cpu_bps, task_bps) of powerpc's hw_breakpoint implementation have relied on nr_bp_mutex serializing access to them. Before overhauling synchronization of kernel/events/hw_breakpoint.c,

[PATCH AUTOSEL 5.19 12/29] powerpc/64: don't refer nr_cpu_ids in asm code when it's undefined

2022-10-17 Thread Sasha Levin
From: Yury Norov [ Upstream commit 546a073d628111e3338af689938407e77d5dc38f ] generic_secondary_common_init() calls LOAD_REG_ADDR(r7, nr_cpu_ids) conditionally on CONFIG_SMP. However, if 'NR_CPUS == 1', kernel doesn't use the nr_cpu_ids, and in C code, it's just: #if NR_CPUS == 1 #define

[PATCH AUTOSEL 5.19 05/29] powerpc/hw_breakpoint: Avoid relying on caller synchronization

2022-10-17 Thread Sasha Levin
From: Marco Elver [ Upstream commit f95e5a3d59011eec1257d0e76de1e1f8969d426f ] Internal data structures (cpu_bps, task_bps) of powerpc's hw_breakpoint implementation have relied on nr_bp_mutex serializing access to them. Before overhauling synchronization of kernel/events/hw_breakpoint.c,

[PATCH AUTOSEL 6.0 14/32] powerpc/64: don't refer nr_cpu_ids in asm code when it's undefined

2022-10-17 Thread Sasha Levin
From: Yury Norov [ Upstream commit 546a073d628111e3338af689938407e77d5dc38f ] generic_secondary_common_init() calls LOAD_REG_ADDR(r7, nr_cpu_ids) conditionally on CONFIG_SMP. However, if 'NR_CPUS == 1', kernel doesn't use the nr_cpu_ids, and in C code, it's just: #if NR_CPUS == 1 #define

[PATCH AUTOSEL 6.0 05/32] powerpc/hw_breakpoint: Avoid relying on caller synchronization

2022-10-17 Thread Sasha Levin
From: Marco Elver [ Upstream commit f95e5a3d59011eec1257d0e76de1e1f8969d426f ] Internal data structures (cpu_bps, task_bps) of powerpc's hw_breakpoint implementation have relied on nr_bp_mutex serializing access to them. Before overhauling synchronization of kernel/events/hw_breakpoint.c,

Re: [PATCH v6 0/7] treewide cleanup of random integer usage

2022-10-17 Thread liulongfang
On 2022/10/11 7:06, Jason A. Donenfeld Wrote: > Changes v5->v6: > - Added a few missing conversions that weren't in my older tree, so now > this should be ready to go, as well as a couple nits people had from > v5. Barring something large and unforeseen, this is the "final > version", as

[PATCH net-next v7 10/10] arm64: dts: layerscape: Add nodes for QSGMII PCSs

2022-10-17 Thread Sean Anderson
Now that we actually read registers from QSGMII PCSs, it's important that we have the correct address (instead of hoping that we're the MAC with all the QSGMII PCSs on its bus). This adds nodes for the QSGMII PCSs. The exact mapping of QSGMII to MACs depends on the SoC. Since the first QSGMII

[PATCH net-next v7 09/10] powerpc: dts: qoriq: Add nodes for QSGMII PCSs

2022-10-17 Thread Sean Anderson
Now that we actually read registers from QSGMII PCSs, it's important that we have the correct address (instead of hoping that we're the MAC with all the QSGMII PCSs on its bus). This adds nodes for the QSGMII PCSs. They have the same addresses on all SoCs (e.g. if QSGMIIA is present it's used for

[PATCH net-next v7 08/10] powerpc: dts: t208x: Mark MAC1 and MAC2 as 10G

2022-10-17 Thread Sean Anderson
On the T208X SoCs, MAC1 and MAC2 support XGMII. Add some new MAC dtsi fragments, and mark the QMAN ports as 10G. Fixes: da414bb923d9 ("powerpc/mpc85xx: Add FSL QorIQ DPAA FMan support to the SoC device tree(s)") Signed-off-by: Sean Anderson --- (no changes since v4) Changes in v4: - New

[PATCH net-next v7 07/10] net: dpaa: Convert to phylink

2022-10-17 Thread Sean Anderson
This converts DPAA to phylink. All macs are converted. This should work with no device tree modifications (including those made in this series), except for QSGMII (as noted previously). The mEMAC configuration is one of the tricker areas. I have tried to capture all the restrictions across the

[PATCH net-next v7 06/10] net: fman: memac: Use lynx pcs driver

2022-10-17 Thread Sean Anderson
Although not stated in the datasheet, as far as I can tell PCS for mEMACs is a "Lynx." By reusing the existing driver, we can remove the PCS management code from the memac driver. This requires calling some PCS functions manually which phylink would usually do for us, but we will let it do that

[PATCH net-next v7 05/10] net: fman: memac: Add serdes support

2022-10-17 Thread Sean Anderson
This adds support for using a serdes which has to be configured. This is primarly in preparation for phylink conversion, which will then change the serdes mode dynamically. Signed-off-by: Sean Anderson --- (no changes since v4) Changes in v4: - Don't fail if phy support was not compiled in

[PATCH net-next v7 04/10] net: phylink: provide phylink_validate_mask_caps() helper

2022-10-17 Thread Sean Anderson
From: "Russell King (Oracle)" Provide a helper that restricts the link modes according to the phylink capabilities. Signed-off-by: Russell King (Oracle) [rebased on net-next/master and added documentation] Signed-off-by: Sean Anderson --- Changes in v7: - New drivers/net/phy/phylink.c | 43

[PATCH net-next v7 03/10] dt-bindings: net: fman: Add additional interface properties

2022-10-17 Thread Sean Anderson
At the moment, mEMACs are configured almost completely based on the phy-connection-type. That is, if the phy interface is RGMII, it assumed that RGMII is supported. For some interfaces, it is assumed that the RCW/bootloader has set up the SerDes properly. This is generally OK, but restricts

[PATCH net-next v7 02/10] dt-bindings: net: Add Lynx PCS binding

2022-10-17 Thread Sean Anderson
This binding is fairly bare-bones for now, since the Lynx driver doesn't parse any properties (or match based on the compatible). We just need it in order to prevent the PCS nodes from having phy devices attached to them. This is not really a problem, but it is a bit inefficient. This binding is

[PATCH net-next v7 01/10] dt-bindings: net: Expand pcs-handle to an array

2022-10-17 Thread Sean Anderson
This allows multiple phandles to be specified for pcs-handle, such as when multiple PCSs are present for a single MAC. To differentiate between them, also add a pcs-handle-names property. Signed-off-by: Sean Anderson Reviewed-by: Rob Herring --- This was previously submitted as [1]. I expect to

[PATCH net-next v7 00/10] net: dpaa: Convert to phylink

2022-10-17 Thread Sean Anderson
This series converts the DPAA driver to phylink. I have tried to maintain backwards compatibility with existing device trees whereever possible. However, one area where I was unable to achieve this was with QSGMII. Please refer to patch 2 for details. All mac drivers have now been converted. I

Re: [PATCH net-next v5 05/14] net: fman: Map the base address once

2022-10-17 Thread Geert Uytterhoeven
Hi Sean, On Mon, Oct 17, 2022 at 5:34 PM Sean Anderson wrote: > On 10/17/22 11:15 AM, Geert Uytterhoeven wrote: > > On Sat, Sep 3, 2022 at 12:00 AM Sean Anderson > > wrote: > >> We don't need to remap the base address from the resource twice (once in > >> mac_probe() and again in

Re: [PATCH 1/2] tools/perf/tests/shell: Update stat+csv_output.sh to include sanity check for topology

2022-10-17 Thread Disha Goel
On 10/6/22 9:21 PM, Athira Rajeev wrote: Testcase stat+csv_output.sh fails in powerpc: 84: perf stat CSV output linter: FAILED! The testcase "stat+csv_output.sh" verifies perf stat CSV output. The test covers aggregation modes like per-socket, per-core, per-die, -A (no_aggr mode)

Re: [PATCH net-next v5 05/14] net: fman: Map the base address once

2022-10-17 Thread Sean Anderson
On 10/17/22 11:15 AM, Geert Uytterhoeven wrote: > Hi Sean, > > On Sat, Sep 3, 2022 at 12:00 AM Sean Anderson wrote: >> We don't need to remap the base address from the resource twice (once in >> mac_probe() and again in set_fman_mac_params()). We still need the >> resource to get the end

Re: [PATCH net-next v5 05/14] net: fman: Map the base address once

2022-10-17 Thread Geert Uytterhoeven
Hi Sean, On Sat, Sep 3, 2022 at 12:00 AM Sean Anderson wrote: > We don't need to remap the base address from the resource twice (once in > mac_probe() and again in set_fman_mac_params()). We still need the > resource to get the end address, but we can use a single function call > to get both at

Re: [PATCH] powerpc/perf: Fix hv-24x7 metric events for power10

2022-10-17 Thread Arnaldo Carvalho de Melo
Em Fri, Oct 14, 2022 at 07:32:20PM +0530, Kajol Jain escreveu: > Testcase stat_all_metrics.sh fails in powerpc: > > 90: perf all metrics test : FAILED! > > The testcase "stat_all_metrics.sh" verifies perf stat > result for all the metric events present in perf list. > It runs perf metric events

Re: [PATCH v2] perf: Rewrite core context handling

2022-10-17 Thread Ravi Bangoria
On 14-Oct-22 3:26 PM, Ravi Bangoria wrote: > On 13-Oct-22 4:29 PM, Peter Zijlstra wrote: >> On Thu, Oct 13, 2022 at 03:37:23PM +0530, Ravi Bangoria wrote: >> - refcount_t refcount; + refcount_t refcount; /* event <-> ctx */ >>> >>> Ok. We need

Re: [PATCH] powerpc/xive: add missing iounmap() in error path in xive_spapr_populate_irq_data()

2022-10-17 Thread Cédric Le Goater
On 10/17/22 05:23, Yang Yingliang wrote: If remapping 'data->trig_page' fails, the 'data->eoi_mmio' need be unmapped before returning from xive_spapr_populate_irq_data(). Fixes: eac1e731b59e ("powerpc/xive: guest exploitation of the XIVE interrupt controller") Signed-off-by: Yang Yingliang

Re: Issues with the first PowerPC updates for the kernel 6.1

2022-10-17 Thread Christian Zigotzky
> On 17. Oct 2022, at 02:43, Michael Ellerman wrote: > Previously BIG_ENDIAN && GENERIC_CPU would use -mcpu=power5, now it uses > -mcpu=power4. Maybe this is the issue. We will wait and not release the RC1 for testing because it is a risk for our testers to test these new kernels because of

Re: [PATCH v4 5/5] drm/ofdrm: Support big-endian scanout buffers

2022-10-17 Thread Benjamin Herrenschmidt
On Thu, 2022-10-13 at 09:39 +0200, Javier Martinez Canillas wrote: > > In absence of such test results I think the most reasonable thing is to > > keep the logic that nobody complained about for 10+ years. > > > > I agree with Michal and Thomas on this. I don't see a strong reason to not > use