mirror of
git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2025-06-08 08:17:45 +09:00
coresight: Clear self hosted claim tag on probe
This can be left behind from a crashed kernel after a kexec so clear it when probing each device. Clearing the self hosted bit even when claimed externally is harmless, so do it unconditionally. Reviewed-by: Leo Yan <leo.yan@arm.com> Reviewed-by: Yeoreum Yun <yeoreum.yun@arm.com> Signed-off-by: James Clark <james.clark@linaro.org> Signed-off-by: Suzuki K Poulose <suzuki.poulose@arm.com> Link: https://lore.kernel.org/r/20250325-james-coresight-claim-tags-v4-5-dfbd3822b2e5@linaro.org
This commit is contained in:
parent
a1b0e77ce5
commit
7cd6368657
8 changed files with 11 additions and 0 deletions
|
@ -567,6 +567,7 @@ static int __catu_probe(struct device *dev, struct resource *res)
|
|||
catu_desc.subtype.helper_subtype = CORESIGHT_DEV_SUBTYPE_HELPER_CATU;
|
||||
catu_desc.ops = &catu_ops;
|
||||
|
||||
coresight_clear_self_claim_tag(&catu_desc.access);
|
||||
drvdata->csdev = coresight_register(&catu_desc);
|
||||
if (IS_ERR(drvdata->csdev))
|
||||
ret = PTR_ERR(drvdata->csdev);
|
||||
|
|
|
@ -931,6 +931,8 @@ static int cti_probe(struct amba_device *adev, const struct amba_id *id)
|
|||
cti_desc.ops = &cti_ops;
|
||||
cti_desc.groups = drvdata->ctidev.con_groups;
|
||||
cti_desc.dev = dev;
|
||||
|
||||
coresight_clear_self_claim_tag(&cti_desc.access);
|
||||
drvdata->csdev = coresight_register(&cti_desc);
|
||||
if (IS_ERR(drvdata->csdev)) {
|
||||
ret = PTR_ERR(drvdata->csdev);
|
||||
|
|
|
@ -772,6 +772,8 @@ static int etb_probe(struct amba_device *adev, const struct amba_id *id)
|
|||
desc.pdata = pdata;
|
||||
desc.dev = dev;
|
||||
desc.groups = coresight_etb_groups;
|
||||
|
||||
coresight_clear_self_claim_tag(&desc.access);
|
||||
drvdata->csdev = coresight_register(&desc);
|
||||
if (IS_ERR(drvdata->csdev))
|
||||
return PTR_ERR(drvdata->csdev);
|
||||
|
|
|
@ -764,6 +764,7 @@ static void etm_init_arch_data(void *info)
|
|||
drvdata->nr_ext_out = BMVAL(etmccr, 20, 22);
|
||||
drvdata->nr_ctxid_cmp = BMVAL(etmccr, 24, 25);
|
||||
|
||||
coresight_clear_self_claim_tag_unlocked(&drvdata->csa);
|
||||
etm_set_pwrdwn(drvdata);
|
||||
etm_clr_pwrup(drvdata);
|
||||
CS_LOCK(drvdata->csa.base);
|
||||
|
|
|
@ -1372,6 +1372,8 @@ static void etm4_init_arch_data(void *info)
|
|||
drvdata->nrseqstate = FIELD_GET(TRCIDR5_NUMSEQSTATE_MASK, etmidr5);
|
||||
/* NUMCNTR, bits[30:28] number of counters available for tracing */
|
||||
drvdata->nr_cntr = FIELD_GET(TRCIDR5_NUMCNTR_MASK, etmidr5);
|
||||
|
||||
coresight_clear_self_claim_tag_unlocked(csa);
|
||||
etm4_cs_lock(drvdata, csa);
|
||||
cpu_detect_trace_filtering(drvdata);
|
||||
}
|
||||
|
|
|
@ -255,6 +255,7 @@ static int funnel_probe(struct device *dev, struct resource *res)
|
|||
drvdata->base = base;
|
||||
desc.groups = coresight_funnel_groups;
|
||||
desc.access = CSDEV_ACCESS_IOMEM(base);
|
||||
coresight_clear_self_claim_tag(&desc.access);
|
||||
}
|
||||
|
||||
dev_set_drvdata(dev, drvdata);
|
||||
|
|
|
@ -284,6 +284,7 @@ static int replicator_probe(struct device *dev, struct resource *res)
|
|||
desc.pdata = dev->platform_data;
|
||||
desc.dev = dev;
|
||||
|
||||
coresight_clear_self_claim_tag(&desc.access);
|
||||
drvdata->csdev = coresight_register(&desc);
|
||||
if (IS_ERR(drvdata->csdev)) {
|
||||
ret = PTR_ERR(drvdata->csdev);
|
||||
|
|
|
@ -869,6 +869,7 @@ static int __tmc_probe(struct device *dev, struct resource *res)
|
|||
dev->platform_data = pdata;
|
||||
desc.pdata = pdata;
|
||||
|
||||
coresight_clear_self_claim_tag(&desc.access);
|
||||
drvdata->csdev = coresight_register(&desc);
|
||||
if (IS_ERR(drvdata->csdev)) {
|
||||
ret = PTR_ERR(drvdata->csdev);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue