Linux-ARM-Kernel Archive on lore.kernel.org
 help / color / Atom feed
From: Mian Yousaf Kaukab <ykaukab@suse.de>
To: linux-arm-kernel@lists.infradead.org, mathieu.poirier@linaro.org
Cc: alexander.shishkin@linux.intel.com, paul.gortmaker@windriver.com,
	Mian Yousaf Kaukab <ykaukab@suse.de>,
	linux-kernel@vger.kernel.org, suzuki.poulose@arm.com
Subject: [PATCH RFC 01/15] Revert "drivers/hwtracing: make coresight-* explicitly non-modular"
Date: Fri, 17 Jan 2020 15:39:56 +0100
Message-ID: <20200117144010.11149-2-ykaukab@suse.de> (raw)
In-Reply-To: <20200117144010.11149-1-ykaukab@suse.de>

This reverts commit 941943cf519f7cacbbcecee5c4ef4b77b466bd5c.

Keep the descriptions in the driver headers. Also extend the same
changes to the drivers added after the reverted commit.

Prepare to make Coresight infrastructure modular.

Signed-off-by: Mian Yousaf Kaukab <ykaukab@suse.de>
---
 drivers/hwtracing/coresight/coresight-catu.c       |  5 ++++-
 drivers/hwtracing/coresight/coresight-etb10.c      |  7 ++++++-
 drivers/hwtracing/coresight/coresight-etm3x.c      | 12 ++++++------
 drivers/hwtracing/coresight/coresight-etm4x.c      |  7 +++++--
 drivers/hwtracing/coresight/coresight-funnel.c     |  6 +++++-
 drivers/hwtracing/coresight/coresight-replicator.c |  6 +++++-
 drivers/hwtracing/coresight/coresight-stm.c        |  4 +++-
 drivers/hwtracing/coresight/coresight-tmc.c        |  6 +++++-
 drivers/hwtracing/coresight/coresight-tpiu.c       |  6 +++++-
 include/linux/amba/bus.h                           |  9 ---------
 10 files changed, 44 insertions(+), 24 deletions(-)

diff --git a/drivers/hwtracing/coresight/coresight-catu.c b/drivers/hwtracing/coresight/coresight-catu.c
index 16ebf38a9f66..6fc76b776744 100644
--- a/drivers/hwtracing/coresight/coresight-catu.c
+++ b/drivers/hwtracing/coresight/coresight-catu.c
@@ -9,6 +9,7 @@
 
 #include <linux/amba/bus.h>
 #include <linux/device.h>
+#include <linux/module.h>
 #include <linux/dma-mapping.h>
 #include <linux/io.h>
 #include <linux/kernel.h>
@@ -584,5 +585,7 @@ static struct amba_driver catu_driver = {
 	.probe				= catu_probe,
 	.id_table			= catu_ids,
 };
+module_amba_driver(catu_driver);
 
-builtin_amba_driver(catu_driver);
+MODULE_LICENSE("GPL v2");
+MODULE_DESCRIPTION("Coresight Address Translation Unit driver");
diff --git a/drivers/hwtracing/coresight/coresight-etb10.c b/drivers/hwtracing/coresight/coresight-etb10.c
index 3810290e6d07..2d5a542e5464 100644
--- a/drivers/hwtracing/coresight/coresight-etb10.c
+++ b/drivers/hwtracing/coresight/coresight-etb10.c
@@ -7,6 +7,7 @@
 
 #include <linux/atomic.h>
 #include <linux/kernel.h>
+#include <linux/module.h>
 #include <linux/init.h>
 #include <linux/types.h>
 #include <linux/device.h>
@@ -846,4 +847,8 @@ static struct amba_driver etb_driver = {
 	.probe		= etb_probe,
 	.id_table	= etb_ids,
 };
-builtin_amba_driver(etb_driver);
+
+module_amba_driver(etb_driver);
+
+MODULE_LICENSE("GPL v2");
+MODULE_DESCRIPTION("CoreSight Embedded Trace Buffer driver");
diff --git a/drivers/hwtracing/coresight/coresight-etm3x.c b/drivers/hwtracing/coresight/coresight-etm3x.c
index e2cb6873c3f2..8ee004ecaaa9 100644
--- a/drivers/hwtracing/coresight/coresight-etm3x.c
+++ b/drivers/hwtracing/coresight/coresight-etm3x.c
@@ -6,7 +6,7 @@
  */
 
 #include <linux/kernel.h>
-#include <linux/moduleparam.h>
+#include <linux/module.h>
 #include <linux/init.h>
 #include <linux/types.h>
 #include <linux/device.h>
@@ -33,10 +33,6 @@
 #include "coresight-etm.h"
 #include "coresight-etm-perf.h"
 
-/*
- * Not really modular but using module_param is the easiest way to
- * remain consistent with existing use cases for now.
- */
 static int boot_enable;
 module_param_named(boot_enable, boot_enable, int, S_IRUGO);
 
@@ -947,4 +943,8 @@ static struct amba_driver etm_driver = {
 	.probe		= etm_probe,
 	.id_table	= etm_ids,
 };
-builtin_amba_driver(etm_driver);
+
+module_amba_driver(etm_driver);
+
+MODULE_LICENSE("GPL v2");
+MODULE_DESCRIPTION("CoreSight Program Flow Trace driver");
diff --git a/drivers/hwtracing/coresight/coresight-etm4x.c b/drivers/hwtracing/coresight/coresight-etm4x.c
index a90d757f7043..c83fb4492282 100644
--- a/drivers/hwtracing/coresight/coresight-etm4x.c
+++ b/drivers/hwtracing/coresight/coresight-etm4x.c
@@ -4,7 +4,7 @@
  */
 
 #include <linux/kernel.h>
-#include <linux/moduleparam.h>
+#include <linux/module.h>
 #include <linux/init.h>
 #include <linux/types.h>
 #include <linux/device.h>
@@ -1568,4 +1568,7 @@ static struct amba_driver etm4x_driver = {
 	.probe		= etm4_probe,
 	.id_table	= etm4_ids,
 };
-builtin_amba_driver(etm4x_driver);
+module_amba_driver(etm4x_driver);
+
+MODULE_LICENSE("GPL v2");
+MODULE_DESCRIPTION("CoreSight Program Flow Trace v4 driver");
diff --git a/drivers/hwtracing/coresight/coresight-funnel.c b/drivers/hwtracing/coresight/coresight-funnel.c
index 900690a9f7f0..08d8f2b3565f 100644
--- a/drivers/hwtracing/coresight/coresight-funnel.c
+++ b/drivers/hwtracing/coresight/coresight-funnel.c
@@ -7,6 +7,7 @@
 
 #include <linux/acpi.h>
 #include <linux/kernel.h>
+#include <linux/module.h>
 #include <linux/init.h>
 #include <linux/types.h>
 #include <linux/device.h>
@@ -372,4 +373,7 @@ static struct amba_driver dynamic_funnel_driver = {
 	.probe		= dynamic_funnel_probe,
 	.id_table	= dynamic_funnel_ids,
 };
-builtin_amba_driver(dynamic_funnel_driver);
+module_amba_driver(dynamic_funnel_driver);
+
+MODULE_LICENSE("GPL v2");
+MODULE_DESCRIPTION("CoreSight Funnel driver");
diff --git a/drivers/hwtracing/coresight/coresight-replicator.c b/drivers/hwtracing/coresight/coresight-replicator.c
index e7dc1c31d20d..cc14c3696be0 100644
--- a/drivers/hwtracing/coresight/coresight-replicator.c
+++ b/drivers/hwtracing/coresight/coresight-replicator.c
@@ -8,6 +8,7 @@
 #include <linux/acpi.h>
 #include <linux/amba/bus.h>
 #include <linux/kernel.h>
+#include <linux/module.h>
 #include <linux/device.h>
 #include <linux/platform_device.h>
 #include <linux/io.h>
@@ -369,4 +370,7 @@ static struct amba_driver dynamic_replicator_driver = {
 	.probe		= dynamic_replicator_probe,
 	.id_table	= dynamic_replicator_ids,
 };
-builtin_amba_driver(dynamic_replicator_driver);
+module_amba_driver(dynamic_replicator_driver);
+
+MODULE_LICENSE("GPL v2");
+MODULE_DESCRIPTION("CoreSight Replicator driver");
diff --git a/drivers/hwtracing/coresight/coresight-stm.c b/drivers/hwtracing/coresight/coresight-stm.c
index b908ca104645..1a641c803445 100644
--- a/drivers/hwtracing/coresight/coresight-stm.c
+++ b/drivers/hwtracing/coresight/coresight-stm.c
@@ -992,5 +992,7 @@ static struct amba_driver stm_driver = {
 	.probe          = stm_probe,
 	.id_table	= stm_ids,
 };
+module_amba_driver(stm_driver);
 
-builtin_amba_driver(stm_driver);
+MODULE_LICENSE("GPL v2");
+MODULE_DESCRIPTION("CoreSight System Trace Macrocell driver");
diff --git a/drivers/hwtracing/coresight/coresight-tmc.c b/drivers/hwtracing/coresight/coresight-tmc.c
index 1cf82fa58289..5831c150034b 100644
--- a/drivers/hwtracing/coresight/coresight-tmc.c
+++ b/drivers/hwtracing/coresight/coresight-tmc.c
@@ -5,6 +5,7 @@
  */
 
 #include <linux/kernel.h>
+#include <linux/module.h>
 #include <linux/init.h>
 #include <linux/types.h>
 #include <linux/device.h>
@@ -558,4 +559,7 @@ static struct amba_driver tmc_driver = {
 	.probe		= tmc_probe,
 	.id_table	= tmc_ids,
 };
-builtin_amba_driver(tmc_driver);
+module_amba_driver(tmc_driver);
+
+MODULE_LICENSE("GPL v2");
+MODULE_DESCRIPTION("CoreSight Trace Memory Controller driver");
diff --git a/drivers/hwtracing/coresight/coresight-tpiu.c b/drivers/hwtracing/coresight/coresight-tpiu.c
index f8583e4032a6..1f3c512fde2b 100644
--- a/drivers/hwtracing/coresight/coresight-tpiu.c
+++ b/drivers/hwtracing/coresight/coresight-tpiu.c
@@ -7,6 +7,7 @@
 
 #include <linux/atomic.h>
 #include <linux/kernel.h>
+#include <linux/module.h>
 #include <linux/init.h>
 #include <linux/device.h>
 #include <linux/io.h>
@@ -226,4 +227,7 @@ static struct amba_driver tpiu_driver = {
 	.probe		= tpiu_probe,
 	.id_table	= tpiu_ids,
 };
-builtin_amba_driver(tpiu_driver);
+module_amba_driver(tpiu_driver);
+
+MODULE_LICENSE("GPL v2");
+MODULE_DESCRIPTION("CoreSight Trace Port Interface Unit driver");
diff --git a/include/linux/amba/bus.h b/include/linux/amba/bus.h
index 26f0ecf401ea..5d53776ba4e0 100644
--- a/include/linux/amba/bus.h
+++ b/include/linux/amba/bus.h
@@ -205,13 +205,4 @@ struct amba_device name##_device = {				\
 #define module_amba_driver(__amba_drv) \
 	module_driver(__amba_drv, amba_driver_register, amba_driver_unregister)
 
-/*
- * builtin_amba_driver() - Helper macro for drivers that don't do anything
- * special in driver initcall.  This eliminates a lot of boilerplate.  Each
- * driver may only use this macro once, and calling it replaces the instance
- * device_initcall().
- */
-#define builtin_amba_driver(__amba_drv) \
-	builtin_driver(__amba_drv, amba_driver_register)
-
 #endif
-- 
2.16.4


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

  reply index

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 ` Mian Yousaf Kaukab [this message]
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 ` [PATCH RFC 04/15] coresight: make API private Mian Yousaf Kaukab
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-2-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

Linux-ARM-Kernel Archive on lore.kernel.org

Archives are clonable:
	git clone --mirror https://lore.kernel.org/linux-arm-kernel/0 linux-arm-kernel/git/0.git
	git clone --mirror https://lore.kernel.org/linux-arm-kernel/1 linux-arm-kernel/git/1.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 linux-arm-kernel linux-arm-kernel/ https://lore.kernel.org/linux-arm-kernel \
		linux-arm-kernel@lists.infradead.org
	public-inbox-index linux-arm-kernel

Example config snippet for mirrors

Newsgroup available over NNTP:
	nntp://nntp.lore.kernel.org/org.infradead.lists.linux-arm-kernel


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git