coresight: etmv4: Update default filter and initialisation
Differing default states set on driver init / perf init and as a result of a sysfs reset. The ETMv4 can be programmed to trace the entire instruction address range without the need to use address comparator filter resources. (Described in the ETMv4.x technical reference manual) sysfs reset was using this method, perf and default driver init were setup with an address range comparator for the entire address range. The perf / driver init has been altered to use the method without needing any comparator address hardware. Minor adjustment to the vinst_ctrl register initialisation to ensure correct zero initialisation. Signed-off-by: Mike Leach <mike.leach@linaro.org> Signed-off-by: Mathieu Poirier <mathieu.poirier@linaro.org> Link: https://lore.kernel.org/r/20200518180242.7916-15-mathieu.poirier@linaro.org Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
parent
347adb0d63
commit
ae2041510d
|
@ -205,7 +205,7 @@ static ssize_t reset_store(struct device *dev,
|
||||||
* started state. ARM recommends start-stop logic is set before
|
* started state. ARM recommends start-stop logic is set before
|
||||||
* each trace run.
|
* each trace run.
|
||||||
*/
|
*/
|
||||||
config->vinst_ctrl |= BIT(0);
|
config->vinst_ctrl = BIT(0);
|
||||||
if (drvdata->nr_addr_cmp == true) {
|
if (drvdata->nr_addr_cmp == true) {
|
||||||
config->mode |= ETM_MODE_VIEWINST_STARTSTOP;
|
config->mode |= ETM_MODE_VIEWINST_STARTSTOP;
|
||||||
/* SSSTATUS, bit[9] */
|
/* SSSTATUS, bit[9] */
|
||||||
|
|
|
@ -791,7 +791,7 @@ static void etm4_set_default_config(struct etmv4_config *config)
|
||||||
config->ts_ctrl = 0x0;
|
config->ts_ctrl = 0x0;
|
||||||
|
|
||||||
/* TRCVICTLR::EVENT = 0x01, select the always on logic */
|
/* TRCVICTLR::EVENT = 0x01, select the always on logic */
|
||||||
config->vinst_ctrl |= BIT(0);
|
config->vinst_ctrl = BIT(0);
|
||||||
}
|
}
|
||||||
|
|
||||||
static u64 etm4_get_ns_access_type(struct etmv4_config *config)
|
static u64 etm4_get_ns_access_type(struct etmv4_config *config)
|
||||||
|
@ -894,17 +894,8 @@ static void etm4_set_start_stop_filter(struct etmv4_config *config,
|
||||||
|
|
||||||
static void etm4_set_default_filter(struct etmv4_config *config)
|
static void etm4_set_default_filter(struct etmv4_config *config)
|
||||||
{
|
{
|
||||||
u64 start, stop;
|
/* Trace everything 'default' filter achieved by no filtering */
|
||||||
|
config->viiectlr = 0x0;
|
||||||
/*
|
|
||||||
* Configure address range comparator '0' to encompass all
|
|
||||||
* possible addresses.
|
|
||||||
*/
|
|
||||||
start = 0x0;
|
|
||||||
stop = ~0x0;
|
|
||||||
|
|
||||||
etm4_set_comparator_filter(config, start, stop,
|
|
||||||
ETM_DEFAULT_ADDR_COMP);
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* TRCVICTLR::SSSTATUS == 1, the start-stop logic is
|
* TRCVICTLR::SSSTATUS == 1, the start-stop logic is
|
||||||
|
@ -925,11 +916,9 @@ static void etm4_set_default(struct etmv4_config *config)
|
||||||
/*
|
/*
|
||||||
* Make default initialisation trace everything
|
* Make default initialisation trace everything
|
||||||
*
|
*
|
||||||
* Select the "always true" resource selector on the
|
* This is done by a minimum default config sufficient to enable
|
||||||
* "Enablign Event" line and configure address range comparator
|
* full instruction trace - with a default filter for trace all
|
||||||
* '0' to trace all the possible address range. From there
|
* achieved by having no filtering.
|
||||||
* configure the "include/exclude" engine to include address
|
|
||||||
* range comparator '0'.
|
|
||||||
*/
|
*/
|
||||||
etm4_set_default_config(config);
|
etm4_set_default_config(config);
|
||||||
etm4_set_default_filter(config);
|
etm4_set_default_filter(config);
|
||||||
|
|
Loading…
Reference in New Issue