All of lore.kernel.org
 help / color / mirror / Atom feed
From: Robin Murphy <robin.murphy@arm.com>
To: Leo Yan <leo.yan@arm.com>
Cc: will@kernel.org, mark.rutland@arm.com,
	linux-arm-kernel@lists.infradead.org,
	linux-perf-users@vger.kernel.org, ilkka@os.amperecomputing.com
Subject: Re: [PATCH 3/5] perf/arm-cmn: Refactor event filter data
Date: Mon, 6 Jul 2026 11:28:13 +0100	[thread overview]
Message-ID: <f5541259-cb61-46fc-bd76-a1a07f625e04@arm.com> (raw)
In-Reply-To: <20260705154438.GA710301@e132581.arm.com>

On 2026-07-05 4:44 pm, Leo Yan wrote:
> On Tue, Jun 30, 2026 at 04:19:18PM +0100, Robin Murphy wrote:
> 
> [...]
> 
>> +struct arm_cmn_filter_attr {
>> +	enum cmn_filter_select sel;
>> +	u8 val;
>> +};
> 
>> -#define _CMN_EVENT_ATTR(_model, _name, _type, _eventid, _filter, _fsel)\
>> +#define _CMN_EVENT_ATTR(_model, _name, _type, _eventid, _filter, ...)	\
>>   	(&((struct arm_cmn_event_attr[]) {{				\
>>   		.attr = __ATTR(_name, 0444, arm_cmn_event_show, NULL),	\
>>   		.model = _model,					\
>>   		.type = _type,						\
>>   		.eventid = _eventid,					\
>> -		.filter = _filter,					\
>> -		.fsel = _fsel,						\
>> +		.filter = {{_filter}},					\
> 
> This patch might break as the "val" field is never initialized. Should
> it use two parameters "_fa, _fb" instead?

Ah, you're right - this evolved through several different designs, and 
this line is still from when "_filter..." was the whole varargs, but 
then I brought forward more of the changes from patch #5 to try to 
minimise intra-series churn, and I guess the fact that it didn't 
completely fail to compile (as I was accustomed to by that point...) 
meant I missed this subtlety.

> #define _CMN_EVENT_ATTR(_model, _name, _type, _eventid, _fa, _fb, ...) \
>        (&((struct arm_cmn_event_attr[]) {{                              \
>                ...                                                      \
>                .filter = {{_fa, _fb}},                                  \
> 
> Although the issue is fixed by a later patch, I think it is good to
> correct this patch for bisection.

Agreed, I'll fix that for a v2.

Thanks,
Robin.


  reply	other threads:[~2026-07-06 10:28 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-06-30 15:19 [PATCH 0/5] perf/arm-cmn: Support CMN S3 r2 Robin Murphy
2026-06-30 15:19 ` [PATCH 1/5] perf/arm-cmn: Rename filter variables for clarity Robin Murphy
2026-07-07  5:31   ` Ilkka Koskinen
2026-06-30 15:19 ` [PATCH 2/5] perf/arm-cmn: Refactor event filter programming Robin Murphy
2026-07-07  5:37   ` Ilkka Koskinen
2026-06-30 15:19 ` [PATCH 3/5] perf/arm-cmn: Refactor event filter data Robin Murphy
2026-07-05 15:44   ` Leo Yan
2026-07-06 10:28     ` Robin Murphy [this message]
2026-06-30 15:19 ` [PATCH 4/5] perf/arm-cmn: Add new filters Robin Murphy
2026-06-30 15:19 ` [PATCH 5/5] perf/arm-cmn: Support CMN S3 r2 Robin Murphy

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=f5541259-cb61-46fc-bd76-a1a07f625e04@arm.com \
    --to=robin.murphy@arm.com \
    --cc=ilkka@os.amperecomputing.com \
    --cc=leo.yan@arm.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-perf-users@vger.kernel.org \
    --cc=mark.rutland@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.