linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Mian Yousaf Kaukab <ykaukab@suse.de>
To: linux-arm-kernel@lists.infradead.org, mathieu.poirier@linaro.org
Cc: linux-kernel@vger.kernel.org, paul.gortmaker@windriver.com,
	suzuki.poulose@arm.com, alexander.shishkin@linux.intel.com,
	Mian Yousaf Kaukab <ykaukab@suse.de>
Subject: [PATCH RFC 04/15] coresight: make API private
Date: Fri, 17 Jan 2020 15:39:59 +0100	[thread overview]
Message-ID: <20200117144010.11149-5-ykaukab@suse.de> (raw)
In-Reply-To: <20200117144010.11149-1-ykaukab@suse.de>

There are no external users of coresight API. Move the function
prototypes to coresight-priv.h.

Not removing the whole file as there are following two users of it:
arch/arm/kernel/hw_breakpoint.c
drivers/misc/habanalabs/goya/goya_coresight.c

Lets clean this in a future patch.

Signed-off-by: Mian Yousaf Kaukab <ykaukab@suse.de>
---
 drivers/hwtracing/coresight/coresight-priv.h | 22 ++++++++++++
 include/linux/coresight.h                    | 50 ----------------------------
 2 files changed, 22 insertions(+), 50 deletions(-)

diff --git a/drivers/hwtracing/coresight/coresight-priv.h b/drivers/hwtracing/coresight/coresight-priv.h
index 82e563cdc879..e6eec9f46e13 100644
--- a/drivers/hwtracing/coresight/coresight-priv.h
+++ b/drivers/hwtracing/coresight/coresight-priv.h
@@ -202,4 +202,26 @@ static inline void *coresight_get_uci_data(const struct amba_id *id)
 
 void coresight_release_platform_data(struct coresight_platform_data *pdata);
 
+extern struct coresight_device *
+coresight_register(struct coresight_desc *desc);
+extern void coresight_unregister(struct coresight_device *csdev);
+extern int coresight_enable(struct coresight_device *csdev);
+extern void coresight_disable(struct coresight_device *csdev);
+extern int coresight_timeout(void __iomem *addr, u32 offset,
+			     int position, int value);
+
+extern int coresight_claim_device(void __iomem *base);
+extern int coresight_claim_device_unlocked(void __iomem *base);
+
+extern void coresight_disclaim_device(void __iomem *base);
+extern void coresight_disclaim_device_unlocked(void __iomem *base);
+extern char *coresight_alloc_device_name(struct coresight_dev_list *devs,
+					 struct device *dev);
+
+extern bool coresight_loses_context_with_cpu(struct device *dev);
+
+extern int coresight_get_cpu(struct device *dev);
+
+struct coresight_platform_data *coresight_get_platform_data(struct device *dev);
+
 #endif
diff --git a/include/linux/coresight.h b/include/linux/coresight.h
index 44e552de419c..8b39a83732b8 100644
--- a/include/linux/coresight.h
+++ b/include/linux/coresight.h
@@ -269,54 +269,4 @@ struct coresight_ops {
 	const struct coresight_ops_helper *helper_ops;
 };
 
-#ifdef CONFIG_CORESIGHT
-extern struct coresight_device *
-coresight_register(struct coresight_desc *desc);
-extern void coresight_unregister(struct coresight_device *csdev);
-extern int coresight_enable(struct coresight_device *csdev);
-extern void coresight_disable(struct coresight_device *csdev);
-extern int coresight_timeout(void __iomem *addr, u32 offset,
-			     int position, int value);
-
-extern int coresight_claim_device(void __iomem *base);
-extern int coresight_claim_device_unlocked(void __iomem *base);
-
-extern void coresight_disclaim_device(void __iomem *base);
-extern void coresight_disclaim_device_unlocked(void __iomem *base);
-extern char *coresight_alloc_device_name(struct coresight_dev_list *devs,
-					 struct device *dev);
-
-extern bool coresight_loses_context_with_cpu(struct device *dev);
-#else
-static inline struct coresight_device *
-coresight_register(struct coresight_desc *desc) { return NULL; }
-static inline void coresight_unregister(struct coresight_device *csdev) {}
-static inline int
-coresight_enable(struct coresight_device *csdev) { return -ENOSYS; }
-static inline void coresight_disable(struct coresight_device *csdev) {}
-static inline int coresight_timeout(void __iomem *addr, u32 offset,
-				     int position, int value) { return 1; }
-static inline int coresight_claim_device_unlocked(void __iomem *base)
-{
-	return -EINVAL;
-}
-
-static inline int coresight_claim_device(void __iomem *base)
-{
-	return -EINVAL;
-}
-
-static inline void coresight_disclaim_device(void __iomem *base) {}
-static inline void coresight_disclaim_device_unlocked(void __iomem *base) {}
-
-static inline bool coresight_loses_context_with_cpu(struct device *dev)
-{
-	return false;
-}
-#endif
-
-extern int coresight_get_cpu(struct device *dev);
-
-struct coresight_platform_data *coresight_get_platform_data(struct device *dev);
-
 #endif
-- 
2.16.4


  parent reply	other threads:[~2020-01-17 14:39 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-01-17 14:39 [PATCH RFC 00/15] coresight: make drivers modular Mian Yousaf Kaukab
2020-01-17 14:39 ` [PATCH RFC 01/15] Revert "drivers/hwtracing: make coresight-* explicitly non-modular" Mian Yousaf Kaukab
2020-01-17 14:39 ` [PATCH RFC 02/15] coresight: remove multiple init calls from funnel driver Mian Yousaf Kaukab
2020-01-17 14:39 ` [PATCH RFC 03/15] coresight: remove multiple init calls from replicator driver Mian Yousaf Kaukab
2020-01-17 14:39 ` Mian Yousaf Kaukab [this message]
2020-01-17 14:40 ` [PATCH RFC 05/15] coresight: rename coresight.c to coresight-bus.c Mian Yousaf Kaukab
2020-01-17 14:40 ` [PATCH RFC 06/15] coresight: combine bus and PMU init calls Mian Yousaf Kaukab
2020-01-17 14:40 ` [PATCH RFC 07/15] coresight: Makefile: regroup object files Mian Yousaf Kaukab
2020-01-17 14:40 ` [PATCH RFC 08/15] coresight: tmc-etr: add function to register catu ops Mian Yousaf Kaukab
2020-01-17 14:40 ` [PATCH RFC 09/15] coresight: etm-perf: remove unnecessary configuration check Mian Yousaf Kaukab
2020-01-17 14:40 ` [PATCH RFC 10/15] coresight: export global symbols Mian Yousaf Kaukab
2020-01-17 14:40 ` [PATCH RFC 11/15] coresight: add coresight prefix to barrier_pkt Mian Yousaf Kaukab
2020-01-17 14:40 ` [PATCH RFC 12/15] coresight: use IS_ENABLED macro for configuration symbols Mian Yousaf Kaukab
2020-01-17 14:40 ` [PATCH RFC 13/15] coresight: Kconfig: make all configurations tristate Mian Yousaf Kaukab
2020-01-17 14:40 ` [PATCH RFC 14/15] arm64: defconfig: enable coresight Mian Yousaf Kaukab
2020-01-17 14:40 ` [PATCH RFC 15/15] arm: config: enable coresight in v5 and v7 defconfigs Mian Yousaf Kaukab

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20200117144010.11149-5-ykaukab@suse.de \
    --to=ykaukab@suse.de \
    --cc=alexander.shishkin@linux.intel.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mathieu.poirier@linaro.org \
    --cc=paul.gortmaker@windriver.com \
    --cc=suzuki.poulose@arm.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).