Skip to contentSkip to conversation

drivers/hwtracing: make coresight-etm-perf.c explicitly non-modular

PATCH In review Paul Gortmaker 3 participants 4 messages Feb 27, 2016 – Mar 1, 2016

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 drivers/hwtracing: make coresight-etm-perf.c explicitly non-modular

In commit 941943cf519f7cacbbcecee5c4ef4b77b466bd5c ("drivers/hwtracing:
make coresight-* explicitly non-modular") we removed all uses of modular functions/macros in favour of their built-in equivlents in this subsystem.

However that commit and commit 0bcbf2e30ff2271b54f54c8697a185f7d86ec6e4 ("coresight: etm-perf: new PMU driver for ETM tracers") were in flight at the same time, and hence one new non-modular user of module_init crept back in. Fix it up like we did all the others.

Since module_init translates to device_initcall in the non-modular case, the init ordering remains unchanged with this commit.

Cc Alexander Shishkin <[email protected]>
Cc Mathieu Poirier <[email protected]>
Cc Greg Kroah-Hartman <[email protected]>
---
 drivers/hwtracing/coresight/coresight-etm-perf.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/hwtracing/coresight/coresight-etm-perf.c +2 -2
index 36153a77e982..755125f7917f 100644
@@ -21,7 +21,7 @@
 #include <linux/device.h>
 #include <linux/list.h>
 #include <linux/mm.h>
-#include <linux/module.h>
+#include <linux/init.h>
 #include <linux/perf_event.h>
 #include <linux/slab.h>
 #include <linux/types.h>
@@ -390,4 +390,4 @@ static int __init etm_perf_init(void)
 
 	return ret;
 }
-module_init(etm_perf_init);
+device_initcall(etm_perf_init);
Signature · 1 line
2.6.1
#1 lore raw
Quoted 35 lines · Paul Gortmaker

In commit 941943cf519f7cacbbcecee5c4ef4b77b466bd5c ("drivers/hwtracing:
make coresight-* explicitly non-modular") we removed all uses of modular functions/macros in favour of their built-in equivlents in this subsystem.

However that commit and commit 0bcbf2e30ff2271b54f54c8697a185f7d86ec6e4 ("coresight: etm-perf: new PMU driver for ETM tracers") were in flight at the same time, and hence one new non-modular user of module_init crept back in. Fix it up like we did all the others.

Since module_init translates to device_initcall in the non-modular case, the init ordering remains unchanged with this commit.

Cc Alexander Shishkin <[email protected]>
Cc Mathieu Poirier <[email protected]>
Cc Greg Kroah-Hartman <[email protected]>
---
 drivers/hwtracing/coresight/coresight-etm-perf.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/hwtracing/coresight/coresight-etm-perf.c +1 -1
index 36153a77e982..755125f7917f 100644
@@ -21,7 +21,7 @@
 #include <linux/device.h>
 #include <linux/list.h>
 #include <linux/mm.h>
-#include <linux/module.h>
+#include <linux/init.h>
 #include <linux/perf_event.h>
 #include <linux/slab.h>
 #include <linux/types.h>

drivers/hwtracing/coresight/coresight-etm-perf.c static int __init etm_perf_init(void) · line 393

Quoted 5 lines
drivers/hwtracing/coresight/coresight-etm-perf.c +1 -1
@@ -390,4 +390,4 @@ static int __init etm_perf_init(void)
 
        return ret;
 }
-module_init(etm_perf_init);
+device_initcall(etm_perf_init);

Yes of course - Applied.

Greg, given the triviality of the changes, can you still pick this up for the next merge window?

Thanks,
Mathieu

Quoted 3 lines

--
2.6.1

#2 lore raw
Quoted 45 lines · Mathieu Poirier
Quoted 35 lines · Paul Gortmaker

In commit 941943cf519f7cacbbcecee5c4ef4b77b466bd5c ("drivers/hwtracing:
make coresight-* explicitly non-modular") we removed all uses of modular functions/macros in favour of their built-in equivlents in this subsystem.

However that commit and commit 0bcbf2e30ff2271b54f54c8697a185f7d86ec6e4 ("coresight: etm-perf: new PMU driver for ETM tracers") were in flight at the same time, and hence one new non-modular user of module_init crept back in. Fix it up like we did all the others.

Since module_init translates to device_initcall in the non-modular case, the init ordering remains unchanged with this commit.

Cc Alexander Shishkin <[email protected]>
Cc Mathieu Poirier <[email protected]>
Cc Greg Kroah-Hartman <[email protected]>
---
 drivers/hwtracing/coresight/coresight-etm-perf.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/hwtracing/coresight/coresight-etm-perf.c +1 -1
index 36153a77e982..755125f7917f 100644
@@ -21,7 +21,7 @@
 #include <linux/device.h>
 #include <linux/list.h>
 #include <linux/mm.h>
-#include <linux/module.h>
+#include <linux/init.h>
 #include <linux/perf_event.h>
 #include <linux/slab.h>
 #include <linux/types.h>

drivers/hwtracing/coresight/coresight-etm-perf.c static int __init etm_perf_init(void) · line 393

Quoted 5 lines
drivers/hwtracing/coresight/coresight-etm-perf.c +1 -1
@@ -390,4 +390,4 @@ static int __init etm_perf_init(void)
 
        return ret;
 }
-module_init(etm_perf_init);
+device_initcall(etm_perf_init);

Yes of course - Applied.

Quoted 2 lines

Greg, given the triviality of the changes, can you still pick this up for the next merge window?

Yes, want me to take it directly, or do you have more patches to send me?

thanks,

greg k-h

#3 lore raw
Quoted 46 lines · Greg Kroah-Hartman
Quoted 45 lines · Mathieu Poirier
Quoted 35 lines · Paul Gortmaker

In commit 941943cf519f7cacbbcecee5c4ef4b77b466bd5c ("drivers/hwtracing:
make coresight-* explicitly non-modular") we removed all uses of modular functions/macros in favour of their built-in equivlents in this subsystem.

However that commit and commit 0bcbf2e30ff2271b54f54c8697a185f7d86ec6e4 ("coresight: etm-perf: new PMU driver for ETM tracers") were in flight at the same time, and hence one new non-modular user of module_init crept back in. Fix it up like we did all the others.

Since module_init translates to device_initcall in the non-modular case, the init ordering remains unchanged with this commit.

Cc Alexander Shishkin <[email protected]>
Cc Mathieu Poirier <[email protected]>
Cc Greg Kroah-Hartman <[email protected]>
---
 drivers/hwtracing/coresight/coresight-etm-perf.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/hwtracing/coresight/coresight-etm-perf.c +1 -1
index 36153a77e982..755125f7917f 100644
@@ -21,7 +21,7 @@
 #include <linux/device.h>
 #include <linux/list.h>
 #include <linux/mm.h>
-#include <linux/module.h>
+#include <linux/init.h>
 #include <linux/perf_event.h>
 #include <linux/slab.h>
 #include <linux/types.h>

drivers/hwtracing/coresight/coresight-etm-perf.c static int __init etm_perf_init(void) · line 393

Quoted 5 lines
drivers/hwtracing/coresight/coresight-etm-perf.c +1 -1
@@ -390,4 +390,4 @@ static int __init etm_perf_init(void)
 
        return ret;
 }
-module_init(etm_perf_init);
+device_initcall(etm_perf_init);

Yes of course - Applied.

Quoted 5 lines
Quoted 2 lines

Greg, given the triviality of the changes, can you still pick this up for the next merge window?

Yes, want me to take it directly, or do you have more patches to send me?

Please go ahead and pick it up - there will be no more changes for the 4.6 cycle.

Thanks,
Mathieu

Quoted 4 lines

thanks,

greg k-h