Export symbols for external interfaces, so that they can be used in
other loadable modules.
Export is done under name space IDLE_INJECT.
Signed-off-by: Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com>
---
v2/v3/v4/v5:
No change
drivers/powercap/idle_inject.c | 7 +++++++
1 file changed, 7 insertions(+)
diff --git a/drivers/powercap/idle_inject.c b/drivers/powercap/idle_inject.c
index c03b5402c03b..ec02b370ec16 100644
--- a/drivers/powercap/idle_inject.c
+++ b/drivers/powercap/idle_inject.c
@@ -162,6 +162,7 @@ void idle_inject_set_duration(struct idle_inject_device *ii_dev,
if (!run_duration_us)
pr_debug("CPU is forced to 100 percent idle\n");
}
+EXPORT_SYMBOL_NS_GPL(idle_inject_set_duration, IDLE_INJECT);
/**
* idle_inject_get_duration - idle and run duration retrieval helper
@@ -176,6 +177,7 @@ void idle_inject_get_duration(struct idle_inject_device *ii_dev,
*run_duration_us = READ_ONCE(ii_dev->run_duration_us);
*idle_duration_us = READ_ONCE(ii_dev->idle_duration_us);
}
+EXPORT_SYMBOL_NS_GPL(idle_inject_get_duration, IDLE_INJECT);
/**
* idle_inject_set_latency - set the maximum latency allowed
@@ -187,6 +189,7 @@ void idle_inject_set_latency(struct idle_inject_device *ii_dev,
{
WRITE_ONCE(ii_dev->latency_us, latency_us);
}
+EXPORT_SYMBOL_NS_GPL(idle_inject_set_latency, IDLE_INJECT);
/**
* idle_inject_start - start idle injections
@@ -218,6 +221,7 @@ int idle_inject_start(struct idle_inject_device *ii_dev)
return 0;
}
+EXPORT_SYMBOL_NS_GPL(idle_inject_start, IDLE_INJECT);
/**
* idle_inject_stop - stops idle injections
@@ -264,6 +268,7 @@ void idle_inject_stop(struct idle_inject_device *ii_dev)
cpu_hotplug_enable();
}
+EXPORT_SYMBOL_NS_GPL(idle_inject_stop, IDLE_INJECT);
/**
* idle_inject_setup - prepare the current task for idle injection
@@ -339,6 +344,7 @@ struct idle_inject_device *idle_inject_register(struct cpumask *cpumask)
return NULL;
}
+EXPORT_SYMBOL_NS_GPL(idle_inject_register, IDLE_INJECT);
/**
* idle_inject_unregister - unregister idle injection control device
@@ -359,6 +365,7 @@ void idle_inject_unregister(struct idle_inject_device *ii_dev)
kfree(ii_dev);
}
+EXPORT_SYMBOL_NS_GPL(idle_inject_unregister, IDLE_INJECT);
static struct smp_hotplug_thread idle_inject_threads = {
.store = &idle_inject_thread.tsk,
--
2.39.1
On 01/02/2023 19:28, Srinivas Pandruvada wrote: > Export symbols for external interfaces, so that they can be used in > other loadable modules. > > Export is done under name space IDLE_INJECT. > > Signed-off-by: Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com> (missing my ack from v3) Acked-by: Daniel Lezcano <daniel.lezcano@linaro.org> > --- > v2/v3/v4/v5: > No change > > drivers/powercap/idle_inject.c | 7 +++++++ > 1 file changed, 7 insertions(+) > > diff --git a/drivers/powercap/idle_inject.c b/drivers/powercap/idle_inject.c > index c03b5402c03b..ec02b370ec16 100644 > --- a/drivers/powercap/idle_inject.c > +++ b/drivers/powercap/idle_inject.c > @@ -162,6 +162,7 @@ void idle_inject_set_duration(struct idle_inject_device *ii_dev, > if (!run_duration_us) > pr_debug("CPU is forced to 100 percent idle\n"); > } > +EXPORT_SYMBOL_NS_GPL(idle_inject_set_duration, IDLE_INJECT); > > /** > * idle_inject_get_duration - idle and run duration retrieval helper > @@ -176,6 +177,7 @@ void idle_inject_get_duration(struct idle_inject_device *ii_dev, > *run_duration_us = READ_ONCE(ii_dev->run_duration_us); > *idle_duration_us = READ_ONCE(ii_dev->idle_duration_us); > } > +EXPORT_SYMBOL_NS_GPL(idle_inject_get_duration, IDLE_INJECT); > > /** > * idle_inject_set_latency - set the maximum latency allowed > @@ -187,6 +189,7 @@ void idle_inject_set_latency(struct idle_inject_device *ii_dev, > { > WRITE_ONCE(ii_dev->latency_us, latency_us); > } > +EXPORT_SYMBOL_NS_GPL(idle_inject_set_latency, IDLE_INJECT); > > /** > * idle_inject_start - start idle injections > @@ -218,6 +221,7 @@ int idle_inject_start(struct idle_inject_device *ii_dev) > > return 0; > } > +EXPORT_SYMBOL_NS_GPL(idle_inject_start, IDLE_INJECT); > > /** > * idle_inject_stop - stops idle injections > @@ -264,6 +268,7 @@ void idle_inject_stop(struct idle_inject_device *ii_dev) > > cpu_hotplug_enable(); > } > +EXPORT_SYMBOL_NS_GPL(idle_inject_stop, IDLE_INJECT); > > /** > * idle_inject_setup - prepare the current task for idle injection > @@ -339,6 +344,7 @@ struct idle_inject_device *idle_inject_register(struct cpumask *cpumask) > > return NULL; > } > +EXPORT_SYMBOL_NS_GPL(idle_inject_register, IDLE_INJECT); > > /** > * idle_inject_unregister - unregister idle injection control device > @@ -359,6 +365,7 @@ void idle_inject_unregister(struct idle_inject_device *ii_dev) > > kfree(ii_dev); > } > +EXPORT_SYMBOL_NS_GPL(idle_inject_unregister, IDLE_INJECT); > > static struct smp_hotplug_thread idle_inject_threads = { > .store = &idle_inject_thread.tsk, -- <http://www.linaro.org/> Linaro.org │ Open source software for ARM SoCs Follow Linaro: <http://www.facebook.com/pages/Linaro> Facebook | <http://twitter.com/#!/linaroorg> Twitter | <http://www.linaro.org/linaro-blog/> Blog
© 2016 - 2025 Red Hat, Inc.