mirror of https://github.com/torvalds/linux.git
perf/arm-cmn: Fix CMN S3 DTM offset
CMN S3's DTM offset is different between r0px and r1p0, and it
turns out this was not a error in the earlier documentation, but
does actually exist in the design. Lovely.
Cc: stable@vger.kernel.org
Fixes: 0dc2f4963f ("perf/arm-cmn: Support CMN S3")
Signed-off-by: Robin Murphy <robin.murphy@arm.com>
Signed-off-by: Will Deacon <will@kernel.org>
This commit is contained in:
parent
a29fea30dd
commit
b3fe1c83a5
|
|
@ -65,7 +65,7 @@
|
||||||
/* PMU registers occupy the 3rd 4KB page of each node's region */
|
/* PMU registers occupy the 3rd 4KB page of each node's region */
|
||||||
#define CMN_PMU_OFFSET 0x2000
|
#define CMN_PMU_OFFSET 0x2000
|
||||||
/* ...except when they don't :( */
|
/* ...except when they don't :( */
|
||||||
#define CMN_S3_DTM_OFFSET 0xa000
|
#define CMN_S3_R1_DTM_OFFSET 0xa000
|
||||||
#define CMN_S3_PMU_OFFSET 0xd900
|
#define CMN_S3_PMU_OFFSET 0xd900
|
||||||
|
|
||||||
/* For most nodes, this is all there is */
|
/* For most nodes, this is all there is */
|
||||||
|
|
@ -233,6 +233,9 @@ enum cmn_revision {
|
||||||
REV_CMN700_R1P0,
|
REV_CMN700_R1P0,
|
||||||
REV_CMN700_R2P0,
|
REV_CMN700_R2P0,
|
||||||
REV_CMN700_R3P0,
|
REV_CMN700_R3P0,
|
||||||
|
REV_CMNS3_R0P0 = 0,
|
||||||
|
REV_CMNS3_R0P1,
|
||||||
|
REV_CMNS3_R1P0,
|
||||||
REV_CI700_R0P0 = 0,
|
REV_CI700_R0P0 = 0,
|
||||||
REV_CI700_R1P0,
|
REV_CI700_R1P0,
|
||||||
REV_CI700_R2P0,
|
REV_CI700_R2P0,
|
||||||
|
|
@ -425,8 +428,8 @@ static enum cmn_model arm_cmn_model(const struct arm_cmn *cmn)
|
||||||
static int arm_cmn_pmu_offset(const struct arm_cmn *cmn, const struct arm_cmn_node *dn)
|
static int arm_cmn_pmu_offset(const struct arm_cmn *cmn, const struct arm_cmn_node *dn)
|
||||||
{
|
{
|
||||||
if (cmn->part == PART_CMN_S3) {
|
if (cmn->part == PART_CMN_S3) {
|
||||||
if (dn->type == CMN_TYPE_XP)
|
if (cmn->rev >= REV_CMNS3_R1P0 && dn->type == CMN_TYPE_XP)
|
||||||
return CMN_S3_DTM_OFFSET;
|
return CMN_S3_R1_DTM_OFFSET;
|
||||||
return CMN_S3_PMU_OFFSET;
|
return CMN_S3_PMU_OFFSET;
|
||||||
}
|
}
|
||||||
return CMN_PMU_OFFSET;
|
return CMN_PMU_OFFSET;
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue