Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1470456
| From | Mathieu Poirier <mathieu.poirier@linaro.org> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | [PATCH 12/28] coresight: add PM runtime calls to coresight_simple_func() |
| Date | 2016-08-25 23:50 +0200 |
| Message-ID | <saaH7-6AK-5@gated-at.bofh.it> (permalink) |
| References | <saanL-6sR-7@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
It is mandatory to enable a coresight block's power domain before
trying to access management registers. Otherwise the transaction
simply stalls, leading to a system hang.
Signed-off-by: Mathieu Poirier <mathieu.poirier@linaro.org>
Reviewed-by: Sudeep Holla <sudeep.holla@arm.com>
---
drivers/hwtracing/coresight/coresight-priv.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/drivers/hwtracing/coresight/coresight-priv.h b/drivers/hwtracing/coresight/coresight-priv.h
index ad975c58080d..decfd52b5dc3 100644
--- a/drivers/hwtracing/coresight/coresight-priv.h
+++ b/drivers/hwtracing/coresight/coresight-priv.h
@@ -16,6 +16,7 @@
#include <linux/bitops.h>
#include <linux/io.h>
#include <linux/coresight.h>
+#include <linux/pm_runtime.h>
/*
* Coresight management registers (0xf00-0xfcc)
@@ -42,8 +43,11 @@ static ssize_t name##_show(struct device *_dev, \
struct device_attribute *attr, char *buf) \
{ \
type *drvdata = dev_get_drvdata(_dev->parent); \
- return scnprintf(buf, PAGE_SIZE, "0x%x\n", \
- readl_relaxed(drvdata->base + offset)); \
+ u32 val; \
+ pm_runtime_get_sync(_dev->parent); \
+ val = readl_relaxed(drvdata->base + offset); \
+ pm_runtime_put_sync(_dev->parent); \
+ return scnprintf(buf, PAGE_SIZE, "0x%x\n", val); \
} \
static DEVICE_ATTR_RO(name)
--
2.7.4
Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
[PATCH 00/28] coresight: next v4.8-rc3 Mathieu Poirier <mathieu.poirier@linaro.org> - 2016-08-25 23:30 +0200 [PATCH 20/28] coresight: etm-perf: pass struct perf_event to source::enable/disable() Mathieu Poirier <mathieu.poirier@linaro.org> - 2016-08-25 23:30 +0200 [PATCH 03/28] coresight: always use stashed trace id value in etm4_trace_id Mathieu Poirier <mathieu.poirier@linaro.org> - 2016-08-25 23:30 +0200 [PATCH 21/28] coresight: remove duplicated enumeration Mathieu Poirier <mathieu.poirier@linaro.org> - 2016-08-25 23:30 +0200 [PATCH 02/28] coresight-stm: support mmapping channel regions with mmio_addr Mathieu Poirier <mathieu.poirier@linaro.org> - 2016-08-25 23:30 +0200 [PATCH 26/28] coresight: etm4x: configuring include/exclude function Mathieu Poirier <mathieu.poirier@linaro.org> - 2016-08-25 23:30 +0200 [PATCH 17/28] coresight: tmc: Delete an unnecessary check before the function call "kfree" Mathieu Poirier <mathieu.poirier@linaro.org> - 2016-08-25 23:30 +0200 [PATCH 24/28] coresight: etm4x: cleaning up default filter configuration Mathieu Poirier <mathieu.poirier@linaro.org> - 2016-08-25 23:30 +0200 [PATCH 04/28] coresight: Remove erroneous dma_free_coherent in tmc_probe Mathieu Poirier <mathieu.poirier@linaro.org> - 2016-08-25 23:30 +0200 [PATCH 09/28] coresight: Cleanup TMC status check Mathieu Poirier <mathieu.poirier@linaro.org> - 2016-08-25 23:30 +0200 [PATCH 28/28] coresight: etm4x: adding configurable start/stop filtering Mathieu Poirier <mathieu.poirier@linaro.org> - 2016-08-25 23:30 +0200 [PATCH 08/28] coresight: etmv4: Fix ETMv4x peripheral ID table Mathieu Poirier <mathieu.poirier@linaro.org> - 2016-08-25 23:30 +0200 [PATCH 25/28] coresight: etm4x: adding range filter configuration function Mathieu Poirier <mathieu.poirier@linaro.org> - 2016-08-25 23:30 +0200 [PATCH 16/28] coresight: etm4x: remove duplicated include from coresight-etm4x.c Mathieu Poirier <mathieu.poirier@linaro.org> - 2016-08-25 23:40 +0200 [PATCH 10/28] coresight: Add better messages for coresight_timeout Mathieu Poirier <mathieu.poirier@linaro.org> - 2016-08-25 23:40 +0200 [PATCH 14/28] hwtracing: coresight: of_coresight: add missing of_node_put after calling of_parse_phandle Mathieu Poirier <mathieu.poirier@linaro.org> - 2016-08-25 23:40 +0200 [PATCH 15/28] coresight: Use local coresight_desc instances Mathieu Poirier <mathieu.poirier@linaro.org> - 2016-08-25 23:40 +0200 [PATCH 13/28] coresight-etm3x: Add ARM ETM 3.5 Cortex-A5 peripheral ID Mathieu Poirier <mathieu.poirier@linaro.org> - 2016-08-25 23:40 +0200 [PATCH 11/28] coresight: delay initialisation when children are missing Mathieu Poirier <mathieu.poirier@linaro.org> - 2016-08-25 23:50 +0200 [PATCH 12/28] coresight: add PM runtime calls to coresight_simple_func() Mathieu Poirier <mathieu.poirier@linaro.org> - 2016-08-25 23:50 +0200 [PATCH 06/28] coresight: Fix csdev connections initialisation Mathieu Poirier <mathieu.poirier@linaro.org> - 2016-08-25 23:50 +0200 [PATCH 23/28] coresight: etm4x: split default and filter configuration Mathieu Poirier <mathieu.poirier@linaro.org> - 2016-08-25 23:50 +0200 [PATCH 07/28] coresight: tmc: Limit the trace to available data Mathieu Poirier <mathieu.poirier@linaro.org> - 2016-08-26 00:00 +0200 [PATCH 19/28] coresight: fix handling of ETM trace register access via sysfs Mathieu Poirier <mathieu.poirier@linaro.org> - 2016-08-26 00:00 +0200 [PATCH 27/28] coresight: etm4x: adding configurable address range filtering Mathieu Poirier <mathieu.poirier@linaro.org> - 2016-08-26 00:00 +0200 [PATCH 01/28] coresight: access conn->child_name only if it's initialised Mathieu Poirier <mathieu.poirier@linaro.org> - 2016-08-26 00:30 +0200 Re: [PATCH 00/28] coresight: next v4.8-rc3 Greg KH <gregkh@linuxfoundation.org> - 2016-08-31 13:10 +0200
csiph-web