Re: [RFC PATCH] Syscall tracing on PPC64_ELF_ABI_V1 without KALLSYMS_ALL

2022-12-12 Thread Christophe Leroy
The changes are absolutely not specific to powerpc. You should adjust the subject accordingly, and copy linux-arch and tracing and probably also ia64 and parisc. Le 12/12/2022 à 22:21, Michael Jeanson a écrit : > In ad050d2390fccb22aa3e6f65e11757ce7a5a7ca5 we fixed ftrace syscall > tracing on PP

Re: sched/debug: CPU hotplug operation suffers in a large cpu systems

2022-12-12 Thread Greg Kroah-Hartman
On Mon, Dec 12, 2022 at 02:17:58PM -0500, Phil Auld wrote: > Hi, > > On Tue, Nov 08, 2022 at 01:24:39PM +0100 Greg Kroah-Hartman wrote: > > On Tue, Nov 08, 2022 at 03:30:46PM +0530, Vishal Chourasia wrote: > > > > > > Thanks Greg & Peter for your direction. > > > > > > While we pursue the idea

Re: [PATCH] powerpc/pseries: fix potential memory leak in init_cpu_associativity()

2022-12-12 Thread Naveen N. Rao
Wang Yufen wrote: If the vcpu_associativity alloc memory successfully but the pcpu_associativity fails to alloc memory, the vcpu_associativity memory leaks. Fixes: d62c8deeb6e6 ("powerpc/pseries: Provide vcpu dispatch statistics") Signed-off-by: Wang Yufen --- arch/powerpc/platforms/pseries/lp

[powerpc:next] BUILD SUCCESS 13959373e9c9021cc80730c7bd1242e07b10b328

2022-12-12 Thread kernel test robot
allyesconfig arc allyesconfig i386 randconfig-a013-20221212 i386 randconfig-a014-20221212 i386 randconfig-a012-20221212 i386 randconfig-a011-20221212 i386 randconfig-a016

[PATCH v1 9/9] perf jevents: Add model list option

2022-12-12 Thread Ian Rogers
This allows the set of generated jevents events and metrics be limited to a subset of the model names. Appropriate if trying to minimize the binary size where only a set of models are possible. Signed-off-by: Ian Rogers --- tools/perf/pmu-events/Build | 3 ++- tools/perf/pmu-events/jevents.

[PATCH v1 8/9] perf jevents: Generate metrics and events as separate tables

2022-12-12 Thread Ian Rogers
Turn a perf json event into an event, metric or both. This reduces the number of events needed to scan to find an event or metric. As events no longer need the relatively seldom used metric fields, 4 bytes is saved per event. This reduces the big C string's size by 335kb (14.8%) on x86. Signed-off

[PATCH v1 7/9] perf pmu-events: Introduce pmu_metrics_table

2022-12-12 Thread Ian Rogers
Add a metrics table that is just a cast from pmu_events_table. This changes the APIs so that event and metric usage of the underlying table is different. Later changes will separate the tables. This introduction fixes a NO_JEVENTS=1 regression on: 68: Parse and process metrics

[PATCH v1 6/9] perf jevents: Combine table prefix and suffix writing

2022-12-12 Thread Ian Rogers
Combine into a single function to simplify, in a later change, writing metrics separately. Signed-off-by: Ian Rogers --- tools/perf/pmu-events/jevents.py | 36 +--- 1 file changed, 14 insertions(+), 22 deletions(-) diff --git a/tools/perf/pmu-events/jevents.py b/tool

[PATCH v1 5/9] perf stat: Remove evsel metric_name/expr

2022-12-12 Thread Ian Rogers
Metrics are their own unit and these variables held broken metrics previously and now just hold the value NULL. Remove code that used these variables. Signed-off-by: Ian Rogers --- tools/perf/builtin-stat.c | 1 - tools/perf/util/cgroup.c | 1 - tools/perf/util/evsel.c | 2 -

[PATCH v1 4/9] perf pmu-events: Separate metric out of pmu_event

2022-12-12 Thread Ian Rogers
Previously both events and metrics were encoded in struct pmu_event. Create a new pmu_metric that has the metric related variables and remove these from pmu_event. Add iterators for pmu_metric and use in places that metrics are desired rather than events. Note, this change removes the setting of e

[PATCH v1 3/9] perf jevents: Rewrite metrics in the same file with each other

2022-12-12 Thread Ian Rogers
Rewrite metrics within the same file in terms of each other. For example, on Power8 other_stall_cpi is rewritten from: "PM_CMPLU_STALL / PM_RUN_INST_CMPL - PM_CMPLU_STALL_BRU_CRU / PM_RUN_INST_CMPL - PM_CMPLU_STALL_FXU / PM_RUN_INST_CMPL - PM_CMPLU_STALL_VSU / PM_RUN_INST_CMPL - PM_CMPLU_STALL_L

[PATCH v1 2/9] perf jevents metric: Add ability to rewrite metrics in terms of others

2022-12-12 Thread Ian Rogers
Add RewriteMetricsInTermsOfOthers that iterates over pairs of names and expressions trying to replace an expression, within the current expression, with its name. Signed-off-by: Ian Rogers --- tools/perf/pmu-events/metric.py | 69 +++- tools/perf/pmu-events/metric_te

[PATCH v1 1/9] perf jevents metric: Correct Function equality

2022-12-12 Thread Ian Rogers
rhs may not be defined, say for source_count, so add a guard. Signed-off-by: Ian Rogers --- tools/perf/pmu-events/metric.py | 6 -- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/tools/perf/pmu-events/metric.py b/tools/perf/pmu-events/metric.py index cc451a265751..1fa3478b9ab0

[PATCH v1 0/9] jevents/pmu-events improvements

2022-12-12 Thread Ian Rogers
Add an optimization to jevents using the metric code, rewrite metrics in terms of each other in order to minimize size and improve readability. For example, on Power8 other_stall_cpi is rewritten from: "PM_CMPLU_STALL / PM_RUN_INST_CMPL - PM_CMPLU_STALL_BRU_CRU / PM_RUN_INST_CMPL - PM_CMPLU_STALL_

Re: Mass-building defconfigs: many fail with assembler errors

2022-12-12 Thread Michael Ellerman
Jan-Benedict Glaw writes: > Hi! > > Is anybody else routinely building current Binutils + GCC, to try to > build all the Linux defconfigs? I did for several years, but eventually stopped because it was taking too much time I needed to spend on other things. > For PPC, a good number of those fail

Re: [PATCH] powerpc/qspinlock: Fix 32-bit build

2022-12-12 Thread Michael Ellerman
On Thu, 8 Dec 2022 22:32:25 +1000, Nicholas Piggin wrote: > Some 32-bit configurations don't pull in the spin_begin/end/relax > definitions. Fix is to restore a lost include. > > Applied to powerpc/next. [1/1] powerpc/qspinlock: Fix 32-bit build https://git.kernel.org/powerpc/c/13959373e9

Re: Mass-building defconfigs: many fail with assembler errors

2022-12-12 Thread Segher Boessenkool
Hi! On Mon, Dec 12, 2022 at 10:51:17PM +0100, Jan-Benedict Glaw wrote: > Is anybody else routinely building current Binutils + GCC, to try to > build all the Linux defconfigs? I do regularly build kernels for powerpc-linux, powerpc64-linux, powerpc64le-linux; ppc6xx_defconfig and ppc64_defconfig

[powerpc:next-test] BUILD SUCCESS 825eada7717cd75424d2b5f00cf754ed97d62d87

2022-12-12 Thread kernel test robot
x86_64 rhel-8.3-syz x86_64 rhel-8.3-kunit x86_64 rhel-8.3-kvm ia64 allmodconfig x86_64 rhel-8.3-bpf i386 randconfig-a013-20221212 i386

Re: [PATCH v8 4/9] phy: fsl: Add Lynx 10G SerDes driver

2022-12-12 Thread Stephen Boyd
Quoting Sean Anderson (2022-12-08 07:36:45) > On 12/6/22 21:17, Stephen Boyd wrote: > > Quoting Sean Anderson (2022-11-01 16:27:21) > >> On 11/1/22 16:10, Stephen Boyd wrote: > >> >> > >> >> Oh, I remember why I did this. I need the reference clock for > >> >> clk_hw_round_rate, > >> >> which is

[PATCH v2 4/4] powerpc/rtas: add tracepoints around RTAS entry

2022-12-12 Thread Nathan Lynch
Decompose the RTAS entry C code into tracing and non-tracing variants, calling the just-added tracepoints in the tracing-enabled path. Skip tracing in contexts known to be unsafe (real mode, CPU offline). Signed-off-by: Nathan Lynch --- arch/powerpc/kernel/rtas.c | 59 +++

[PATCH v2 2/4] powerpc/rtas: strengthen do_enter_rtas() type safety, drop inline

2022-12-12 Thread Nathan Lynch
Make do_enter_rtas() take a pointer to struct rtas_args and do the __pa() conversion in one place instead of leaving it to callers. This also makes it possible to introduce enter/exit tracepoints that access the rtas_args struct fields. There's no apparent reason to force inlining of do_enter_rtas

[PATCH v2 3/4] powerpc/tracing: tracepoints for RTAS entry and exit

2022-12-12 Thread Nathan Lynch
Add two sets of tracepoints to be used around RTAS entry: * rtas_input/rtas_output, which emit the function name, its inputs, the returned status, and any other outputs. These produce an API-level record of OS<->RTAS activity. * rtas_ll_entry/rtas_ll_exit, which are lower-level and emit the

[PATCH v2 1/4] powerpc/rtas: improve function information lookups

2022-12-12 Thread Nathan Lynch
The core RTAS support code and its clients perform two types of lookup for RTAS firmware function information. First, mapping a known function name to a token. The typical use case invokes rtas_token() to retrieve the token value to pass to rtas_call(). rtas_token() relies on of_get_property(), wh

[PATCH v2 0/4] RTAS function table and tracepoints

2022-12-12 Thread Nathan Lynch
Resubmiting with revisions the remainder from the earlier "RTAS maintenance" series[1] for further comments. Components: * Improved function token lookups, including efficient "reverse" token-to-name mappings. * Static tracepoints for RTAS entry and exit. Changes: * Rebase on current powerpc/ne

Re: powerpc-part: was: Re: [PATCH v6] livepatch: Clear relocation targets on a module removal

2022-12-12 Thread Song Liu
On Mon, Dec 12, 2022 at 9:12 AM Petr Mladek wrote: > > On Fri 2022-12-09 11:59:35, Song Liu wrote: > > On Fri, Dec 9, 2022 at 3:41 AM Petr Mladek wrote: > > > On Mon 2022-11-28 17:57:06, Song Liu wrote: > > > > On Fri, Nov 18, 2022 at 8:24 AM Petr Mladek wrote: > > > > > > > > > > > --- a/arch/p

Mass-building defconfigs: many fail with assembler errors

2022-12-12 Thread Jan-Benedict Glaw
Hi! Is anybody else routinely building current Binutils + GCC, to try to build all the Linux defconfigs? For PPC, a good number of those fail, and I probably don't understand PPC well enough to propose patches. Or did I pick wrongly targeted toolchains? Most of the time, my suspicion is that we'r

[RFC PATCH] Syscall tracing on PPC64_ELF_ABI_V1 without KALLSYMS_ALL

2022-12-12 Thread Michael Jeanson
In ad050d2390fccb22aa3e6f65e11757ce7a5a7ca5 we fixed ftrace syscall tracing on PPC64_ELF_ABI_V1 by looking for the non-dot prefixed symbol of a syscall. Ftrace uses kallsyms to locate syscall symbols and those non-dot prefixed symbols reside in a separate '.opd' section which is not included by ka

Re: sched/debug: CPU hotplug operation suffers in a large cpu systems

2022-12-12 Thread Phil Auld
Hi, On Tue, Nov 08, 2022 at 01:24:39PM +0100 Greg Kroah-Hartman wrote: > On Tue, Nov 08, 2022 at 03:30:46PM +0530, Vishal Chourasia wrote: > > > > Thanks Greg & Peter for your direction. > > > > While we pursue the idea of having debugfs based on kernfs, we thought about > > having a boot time

Re: [PATCH] perf test bpf: Skip test if kernel-debuginfo is not present

2022-12-12 Thread Arnaldo Carvalho de Melo
Em Thu, Nov 03, 2022 at 12:27:01PM +0530, Athira Rajeev escreveu: > > On 28-Oct-2022, at 9:12 PM, Kajol Jain wrote: > > > > Perf BPF filter test fails in environment where "kernel-debuginfo" > > is not installed. > > > > Test failure logs: > > <<>> > > 42: BPF filter:

Re: powerpc-part: was: Re: [PATCH v6] livepatch: Clear relocation targets on a module removal

2022-12-12 Thread Petr Mladek
On Fri 2022-12-09 11:59:35, Song Liu wrote: > On Fri, Dec 9, 2022 at 3:41 AM Petr Mladek wrote: > > On Mon 2022-11-28 17:57:06, Song Liu wrote: > > > On Fri, Nov 18, 2022 at 8:24 AM Petr Mladek wrote: > > > > > > > > > --- a/arch/powerpc/kernel/module_64.c > > > > > +++ b/arch/powerpc/kernel/modu

Re: (subset) [PATCH 000/606] i2c: Complete conversion to i2c_probe_new

2022-12-12 Thread Robert Foss
On Fri, 18 Nov 2022 23:35:34 +0100, Uwe Kleine-König wrote: > since commit b8a1a4cd5a98 ("i2c: Provide a temporary .probe_new() > call-back type") from 2016 there is a "temporary" alternative probe > callback for i2c drivers. > > This series completes all drivers to this new callback (unless I mis

Re: [PATCH] perf test: Update event group check for support of uncore event

2022-12-12 Thread Arnaldo Carvalho de Melo
Em Fri, Dec 09, 2022 at 12:57:34PM +0530, Athira Rajeev escreveu: > > > > On 08-Dec-2022, at 9:48 AM, Ravi Bangoria wrote: > > > > On 07-Dec-22 10:28 PM, Athira Rajeev wrote: > >> Event group test checks group creation for combinations of > >> hw, sw and uncore PMU events. Some of the uncore pm

Re: [PATCH v2] hvc/xen: prevent concurrent accesses to the shared ring

2022-12-12 Thread Roger Pau Monné
Hello, Gentle ping regarding the locking question below. Thanks, Roger. On Fri, Dec 02, 2022 at 12:40:05PM +0100, Roger Pau Monné wrote: > On Wed, Nov 30, 2022 at 05:08:06PM -0800, Stefano Stabellini wrote: > > On Wed, 30 Nov 2022, Roger Pau Monne wrote: > > > The hvc machinery registers both a

Re: [PATCH v1 5/5] powerpc/64e: Fix build failure with GCC 12 (unrecognized opcode: `wrteei')

2022-12-12 Thread Michael Ellerman
Christophe Leroy writes: > Le 11/12/2022 à 18:32, Pali Rohár a écrit : >> On Monday 11 July 2022 16:19:33 Christophe Leroy wrote: >>> With GCC 12, corenet64_smp_defconfig leads to the following build errors: >>> >>>CC arch/powerpc/kernel/irq.o >>> {standard input}: Assembler messages: >>>

Re: [PATCH v6] livepatch: Clear relocation targets on a module removal

2022-12-12 Thread Miroslav Benes
> > Petr has commented on the code aspects. I will just add that s390x was not > > dealt with at the time because there was no live patching support for > > s390x back then if I remember correctly and my notes do not lie. The same > > applies to powerpc32. I think that both should be fixed as well