diff options
author | Pawel Moll <pawel.moll@arm.com> | 2015-04-02 14:01:06 +0100 |
---|---|---|
committer | Sasha Levin <alexander.levin@verizon.com> | 2016-12-23 09:40:28 -0500 |
commit | 69ecf071d851281a0bc2feaf1f30e643927109c1 (patch) | |
tree | 157aff60113b28c69351d2c2fbd3ed4bb73b04af /drivers | |
parent | 41a83f7482d6281db0c47430235343c2cf024d59 (diff) | |
download | linux-stable-69ecf071d851281a0bc2feaf1f30e643927109c1.tar.gz linux-stable-69ecf071d851281a0bc2feaf1f30e643927109c1.tar.bz2 linux-stable-69ecf071d851281a0bc2feaf1f30e643927109c1.zip |
bus: arm-ccn: Provide required event arguments
[ Upstream commit 8f06c51fac1ca4104b8b64872f310e28186aea42 ]
Since 688d4dfcdd624192cbf03c08402e444d1d11f294 "perf tools: Support
parsing parameterized events" the perf userspace tools understands
"argument=?" syntax in the events file, making sure that required
arguments are provided by the user and not defaulting to 0, causing
confusion.
This patch adds the required arguments lists for CCN events.
Signed-off-by: Pawel Moll <pawel.moll@arm.com>
Signed-off-by: Sasha Levin <alexander.levin@verizon.com>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/bus/arm-ccn.c | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/drivers/bus/arm-ccn.c b/drivers/bus/arm-ccn.c index 27fd0dacad5f..d465cf097dbb 100644 --- a/drivers/bus/arm-ccn.c +++ b/drivers/bus/arm-ccn.c @@ -336,6 +336,23 @@ static ssize_t arm_ccn_pmu_event_show(struct device *dev, if (event->mask) res += snprintf(buf + res, PAGE_SIZE - res, ",mask=0x%x", event->mask); + + /* Arguments required by an event */ + switch (event->type) { + case CCN_TYPE_CYCLES: + break; + case CCN_TYPE_XP: + res += snprintf(buf + res, PAGE_SIZE - res, + ",xp=?,port=?,vc=?,dir=?"); + if (event->event == CCN_EVENT_WATCHPOINT) + res += snprintf(buf + res, PAGE_SIZE - res, + ",cmp_l=?,cmp_h=?,mask=?"); + break; + default: + res += snprintf(buf + res, PAGE_SIZE - res, ",node=?"); + break; + } + res += snprintf(buf + res, PAGE_SIZE - res, "\n"); return res; |