[PATCH 1/8] perf/arm-cmn: Refactor node ID handling. Again.
Robin Murphy
robin.murphy at arm.com
Tue Aug 27 06:51:25 PDT 2024
On 24/08/2024 2:00 am, Ilkka Koskinen wrote:
[...]
>> static struct arm_cmn_node *arm_cmn_node_to_xp(const struct arm_cmn *cmn,
>> const struct arm_cmn_node *dn)
>> {
>> - struct arm_cmn_nodeid nid = arm_cmn_nid(cmn, dn->id);
>> - int xp_idx = cmn->mesh_x * nid.y + nid.x;
>> + int id = dn->id >> (dn->portid_bits + dn->deviceid_bits);
>> + int bits = arm_cmn_xyidbits(cmn);
>> + int x = id > bits;
> ^^^
>
> Instead of comparison, shouldn't that be bit shift?
Oh dear indeed... and of course the effects of that would only show up
on hardware configurations I don't have. Good catch, thanks!
Cheers,
Robin.
More information about the linux-arm-kernel
mailing list