Commit 0d1e013f authored by Linus Torvalds's avatar Linus Torvalds
Browse files
Pull arm64 fix from Will Deacon:

 - Fix event counting regression in Arm CMN PMU driver due to broken
   optimisation

* tag 'arm64-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux:
  Partially revert "perf/arm-cmn: Optimise DTC counter accesses"
parents db7c4673 a428eb4b
Loading
Loading
Loading
Loading
+6 −1
Original line number Diff line number Diff line
@@ -1576,7 +1576,6 @@ static int arm_cmn_event_init(struct perf_event *event)
			hw->dn++;
			continue;
		}
		hw->dtcs_used |= arm_cmn_node_to_xp(cmn, dn)->dtc;
		hw->num_dns++;
		if (bynodeid)
			break;
@@ -1589,6 +1588,12 @@ static int arm_cmn_event_init(struct perf_event *event)
			nodeid, nid.x, nid.y, nid.port, nid.dev, type);
		return -EINVAL;
	}
	/*
	 * Keep assuming non-cycles events count in all DTC domains; turns out
	 * it's hard to make a worthwhile optimisation around this, short of
	 * going all-in with domain-local counter allocation as well.
	 */
	hw->dtcs_used = (1U << cmn->num_dtcs) - 1;

	return arm_cmn_validate_group(cmn, event);
}