coresight: hotplug enable/disable etm only for round robin access
Enable and disable ETM during hotplug operations only if ETM is allowed round-robin access by the funnel when all the ETMs share the same funnel priority. For 8960, 8064, etc it is observed that sometimes a core's ETM is starved by other core ETMs constantly producing data. This works around an issue seen where setting the prog bit of a core's ETMCR (i.e. ETMCR[10]) doesn't result in that core's ETMSR[1] getting set thereby triggering the "timeout while setting prog bit" warning. Subsequently performaing a manual ETB flush as part of disabling ETB to retrieve the collected trace data also fails. Change-Id: I6dd37979058644495d945e80e6a2de4696fc5a20 Signed-off-by: Pratik Patel <pratikp@codeaurora.org>
This commit is contained in:
committed by
Iliyan Malchev
parent
4db6062808
commit
8a57dac016
@@ -33,6 +33,8 @@ Optional properties:
|
|||||||
- coresight-default-sink : represents the default compile time CoreSight sink
|
- coresight-default-sink : represents the default compile time CoreSight sink
|
||||||
- qcom,pc-save : program counter save implemented
|
- qcom,pc-save : program counter save implemented
|
||||||
- qcom,blk-size : block size for tmc-etr to usb transfers
|
- qcom,blk-size : block size for tmc-etr to usb transfers
|
||||||
|
- qcom,round-robin : indicates if per core etms are allowed round-robin access
|
||||||
|
by the funnel
|
||||||
|
|
||||||
Examples:
|
Examples:
|
||||||
|
|
||||||
@@ -106,4 +108,5 @@ Examples:
|
|||||||
coresight-child-list = <&funnel_kpss>;
|
coresight-child-list = <&funnel_kpss>;
|
||||||
coresight-child-ports = <0>;
|
coresight-child-ports = <0>;
|
||||||
qcom,pc-save;
|
qcom,pc-save;
|
||||||
|
qcom,round-robin;
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -256,6 +256,7 @@ struct etm_drvdata {
|
|||||||
bool pcsave_enable;
|
bool pcsave_enable;
|
||||||
bool pcsave_sticky_enable;
|
bool pcsave_sticky_enable;
|
||||||
bool pcsave_boot_enable;
|
bool pcsave_boot_enable;
|
||||||
|
bool round_robin;
|
||||||
};
|
};
|
||||||
|
|
||||||
static struct etm_drvdata *etmdrvdata[NR_CPUS];
|
static struct etm_drvdata *etmdrvdata[NR_CPUS];
|
||||||
@@ -1845,7 +1846,7 @@ static int etm_cpu_callback(struct notifier_block *nfb, unsigned long action,
|
|||||||
etmdrvdata[cpu]->os_unlock = true;
|
etmdrvdata[cpu]->os_unlock = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (etmdrvdata[cpu]->enable)
|
if (etmdrvdata[cpu]->enable && etmdrvdata[cpu]->round_robin)
|
||||||
__etm_enable(etmdrvdata[cpu]);
|
__etm_enable(etmdrvdata[cpu]);
|
||||||
spin_unlock(&etmdrvdata[cpu]->spinlock);
|
spin_unlock(&etmdrvdata[cpu]->spinlock);
|
||||||
break;
|
break;
|
||||||
@@ -1858,7 +1859,7 @@ static int etm_cpu_callback(struct notifier_block *nfb, unsigned long action,
|
|||||||
|
|
||||||
case CPU_DYING:
|
case CPU_DYING:
|
||||||
spin_lock(&etmdrvdata[cpu]->spinlock);
|
spin_lock(&etmdrvdata[cpu]->spinlock);
|
||||||
if (etmdrvdata[cpu]->enable)
|
if (etmdrvdata[cpu]->enable && etmdrvdata[cpu]->round_robin)
|
||||||
__etm_disable(etmdrvdata[cpu]);
|
__etm_disable(etmdrvdata[cpu]);
|
||||||
spin_unlock(&etmdrvdata[cpu]->spinlock);
|
spin_unlock(&etmdrvdata[cpu]->spinlock);
|
||||||
break;
|
break;
|
||||||
@@ -2099,6 +2100,10 @@ static int __devinit etm_probe(struct platform_device *pdev)
|
|||||||
|
|
||||||
clk_disable_unprepare(drvdata->clk);
|
clk_disable_unprepare(drvdata->clk);
|
||||||
|
|
||||||
|
if (pdev->dev.of_node)
|
||||||
|
drvdata->round_robin = of_property_read_bool(pdev->dev.of_node,
|
||||||
|
"qcom,round-robin");
|
||||||
|
|
||||||
baddr = devm_kzalloc(dev, PAGE_SIZE + reg_size, GFP_KERNEL);
|
baddr = devm_kzalloc(dev, PAGE_SIZE + reg_size, GFP_KERNEL);
|
||||||
if (baddr) {
|
if (baddr) {
|
||||||
*(uint32_t *)(baddr + ETM_REG_DUMP_VER_OFF) = ETM_REG_DUMP_VER;
|
*(uint32_t *)(baddr + ETM_REG_DUMP_VER_OFF) = ETM_REG_DUMP_VER;
|
||||||
|
|||||||
Reference in New Issue
Block a user