mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: James Clark <james.clark@linaro.org>
To: Arnaldo Carvalho de Melo <acme@kernel.org>
Cc: Peter Zijlstra <peterz@infradead.org>,
	Ingo Molnar <mingo@redhat.com>,
	Namhyung Kim <namhyung@kernel.org>,
	Mark Rutland <mark.rutland@arm.com>,
	Alexander Shishkin <alexander.shishkin@linux.intel.com>,
	Jiri Olsa <jolsa@kernel.org>, Ian Rogers <irogers@google.com>,
	Adrian Hunter <adrian.hunter@intel.com>,
	Suzuki K Poulose <suzuki.poulose@arm.com>,
	Mike Leach <mike.leach@linaro.org>,
	John Garry <john.g.garry@oracle.com>,
	Will Deacon <will@kernel.org>, Leo Yan <leo.yan@linux.dev>,
	linux-perf-users@vger.kernel.org, linux-kernel@vger.kernel.org,
	coresight@lists.linaro.org, linux-arm-kernel@lists.infradead.org
Subject: Re: [PATCH v4 02/14] perf evsel: Refactor evsel__set_config_if_unset() arguments
Date: Wed, 14 Jan 2026 15:58:59 +0000	[thread overview]
Message-ID: <6a31e9e4-653a-4a8d-af91-4325b37535c7@linaro.org> (raw)
In-Reply-To: <aWe6igmKMq25GJP9@x1>



On 14/01/2026 3:47 pm, Arnaldo Carvalho de Melo wrote:
> On Wed, Jan 14, 2026 at 12:14:43PM +0000, James Clark wrote:
>> On 13/01/2026 10:13 pm, Arnaldo Carvalho de Melo wrote:
>>> On Mon, Dec 22, 2025 at 03:14:27PM +0000, James Clark wrote:
>>>> Make the evsel argument first to match the other evsel__* functions
>>>> and remove the redundant pmu argument, which can be accessed via evsel.
> 
>>> I haven't checked if this is the exactly where this takes place but
>>> should be in this series, 32-bit build is broken:
> 
>>>      3: almalinux:9-i386WARNING: image platform (linux/386) does not match the expected platform (linux/amd64)
>>> WARNING: image platform (linux/386) does not match the expected platform (linux/amd64)
>>>       21.72 almalinux:9-i386              : FAIL gcc version 11.4.1 20231218 (Red Hat 11.4.1-3) (GCC)
>>>        1378 |         perf_pmu__format_pack(&bits, val, vp, /*zero=*/true);
>>>             |                               ^~~~~
>>>             |                               |
>>>             |                               u64 * {aka long long unsigned int *}
>>>       In file included from util/evsel.h:14,
>>>                        from util/evsel.c:38:
>>>       util/pmu.h:282:43: note: expected ‘long unsigned int *’ but argument is of type ‘u64 *’ {aka ‘long long unsigned int *’}
>>>         282 | void perf_pmu__format_pack(unsigned long *format, __u64 value, __u64 *v,
>>>             |                            ~~~~~~~~~~~~~~~^~~~~~
>   
>>> What I have is in perf-tools-next/tmp.perf-tools-next BTW, I'll try and
>>> fix this tomorrow if you don't do it first. :-)
>   
>> Taking a look, but I'm wondering if this is already not working properly.
>> There are existing "unsigned long"s in pmu.c that operate on the config bits
>> which is what I copied.
>   
>> On this target an unsigned long is 32bits but struct
>> perf_event_attr->configs are __u64. So it looks like it might leave the top
>> bits unset sometimes.
>   
>> I'll look at a fix for that which should fix the compilation error at the
>> same time.
>   
>> Another question is, do we actually care about this platform?
> 
> It failed for other 32-bit platforms too, so the question is if we care
> about 32-bit at all.
> 
> - Arnaldo

I suppose the answer is we still do then.

I sent another version. A couple of patches were changed a bit where I 
used more bitfields instead of converting to u64s which was probably the 
right thing to do regardless of the build issue.


  reply	other threads:[~2026-01-14 15:59 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-12-22 15:14 [PATCH v4 00/14] perf cs-etm/arm-spe: Remove hard coded config fields James Clark
2025-12-22 15:14 ` [PATCH v4 01/14] perf parse-events: Refactor get_config_terms() to remove macros James Clark
2026-01-13 20:53   ` Arnaldo Carvalho de Melo
2025-12-22 15:14 ` [PATCH v4 02/14] perf evsel: Refactor evsel__set_config_if_unset() arguments James Clark
2026-01-13 22:13   ` Arnaldo Carvalho de Melo
2026-01-14 12:14     ` James Clark
2026-01-14 13:33       ` James Clark
2026-01-14 15:47       ` Arnaldo Carvalho de Melo
2026-01-14 15:58         ` James Clark [this message]
2025-12-22 15:14 ` [PATCH v4 03/14] perf evsel: Move evsel__* functions to evsel.c James Clark
2025-12-22 15:14 ` [PATCH v4 04/14] perf evsel: Support sparse fields in evsel__set_config_if_unset() James Clark
2025-12-22 15:14 ` [PATCH v4 05/14] perf parse-events: Track all user changed config bits James Clark
2025-12-22 15:14 ` [PATCH v4 06/14] perf evsel: apply evsel__set_config_if_unset() to all config fields James Clark
2025-12-22 15:14 ` [PATCH v4 07/14] perf evsel: Add a helper to get the value of a config field James Clark
2025-12-22 15:14 ` [PATCH v4 08/14] perf parse-events: Always track user config changes James Clark
2025-12-22 15:14 ` [PATCH v4 09/14] perf tests: Test evsel__set_config_if_unset() and config change tracking James Clark
2025-12-22 15:14 ` [PATCH v4 10/14] perf cs-etm: Make a helper to find the Coresight evsel James Clark
2025-12-22 15:14 ` [PATCH v4 11/14] perf cs-etm: Don't use hard coded config bits when setting up ETMCR James Clark
2025-12-22 15:14 ` [PATCH v4 12/14] perf cs-etm: Don't use hard coded config bits when setting up TRCCONFIGR James Clark
2025-12-22 15:14 ` [PATCH v4 13/14] perf cs-etm: Don't hard code config attribute when configuring the event James Clark
2025-12-22 15:14 ` [PATCH v4 14/14] perf arm-spe: Don't hard code config attribute James Clark
2026-01-13 20:58 ` [PATCH v4 00/14] perf cs-etm/arm-spe: Remove hard coded config fields Ian Rogers
2026-01-13 21:03   ` Arnaldo Carvalho de Melo
2026-01-13 21:01 ` Arnaldo Carvalho de Melo

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=6a31e9e4-653a-4a8d-af91-4325b37535c7@linaro.org \
    --to=james.clark@linaro.org \
    --cc=acme@kernel.org \
    --cc=adrian.hunter@intel.com \
    --cc=alexander.shishkin@linux.intel.com \
    --cc=coresight@lists.linaro.org \
    --cc=irogers@google.com \
    --cc=john.g.garry@oracle.com \
    --cc=jolsa@kernel.org \
    --cc=leo.yan@linux.dev \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-perf-users@vger.kernel.org \
    --cc=mark.rutland@arm.com \
    --cc=mike.leach@linaro.org \
    --cc=mingo@redhat.com \
    --cc=namhyung@kernel.org \
    --cc=peterz@infradead.org \
    --cc=suzuki.poulose@arm.com \
    --cc=will@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®