drivers/clocksource/mmio.c | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-)
The following commit has been merged into the timers/clocksource branch of tip:
Commit-ID: 2423405880c2cd5473c8c4e937e8253b7444f532
Gitweb: https://git.kernel.org/tip/2423405880c2cd5473c8c4e937e8253b7444f532
Author: Daniel Lezcano <daniel.lezcano@kernel.org>
AuthorDate: Fri, 27 Mar 2026 19:05:54 +01:00
Committer: Daniel Lezcano <daniel.lezcano@kernel.org>
CommitterDate: Fri, 03 Apr 2026 10:52:05 +02:00
clocksource/drivers/mmio: Make the code compatible with modules
The next changes will bring the module support on the timer
drivers. Those use the API exported by the mmio clocksource which are
not exporting their symbols. Fix that by adding EXPORT_SYMBOL_GPL().
Signed-off-by: Daniel Lezcano <daniel.lezcano@kernel.org>
Acked-by: John Stultz <jstultz@google.com>
Link: https://patch.msgid.link/20260327180600.8150-3-daniel.lezcano@kernel.org
---
drivers/clocksource/mmio.c | 11 ++++++++---
1 file changed, 8 insertions(+), 3 deletions(-)
diff --git a/drivers/clocksource/mmio.c b/drivers/clocksource/mmio.c
index cd5fbf4..0fee8ed 100644
--- a/drivers/clocksource/mmio.c
+++ b/drivers/clocksource/mmio.c
@@ -21,21 +21,25 @@ u64 clocksource_mmio_readl_up(struct clocksource *c)
{
return (u64)readl_relaxed(to_mmio_clksrc(c)->reg);
}
+EXPORT_SYMBOL_GPL(clocksource_mmio_readl_up);
u64 clocksource_mmio_readl_down(struct clocksource *c)
{
return ~(u64)readl_relaxed(to_mmio_clksrc(c)->reg) & c->mask;
}
+EXPORT_SYMBOL_GPL(clocksource_mmio_readl_down);
u64 clocksource_mmio_readw_up(struct clocksource *c)
{
return (u64)readw_relaxed(to_mmio_clksrc(c)->reg);
}
+EXPORT_SYMBOL_GPL(clocksource_mmio_readw_up);
u64 clocksource_mmio_readw_down(struct clocksource *c)
{
return ~(u64)readw_relaxed(to_mmio_clksrc(c)->reg) & c->mask;
}
+EXPORT_SYMBOL_GPL(clocksource_mmio_readw_down);
/**
* clocksource_mmio_init - Initialize a simple mmio based clocksource
@@ -46,9 +50,9 @@ u64 clocksource_mmio_readw_down(struct clocksource *c)
* @bits: Number of valid bits
* @read: One of clocksource_mmio_read*() above
*/
-int __init clocksource_mmio_init(void __iomem *base, const char *name,
- unsigned long hz, int rating, unsigned bits,
- u64 (*read)(struct clocksource *))
+int clocksource_mmio_init(void __iomem *base, const char *name,
+ unsigned long hz, int rating, unsigned bits,
+ u64 (*read)(struct clocksource *))
{
struct clocksource_mmio *cs;
@@ -68,3 +72,4 @@ int __init clocksource_mmio_init(void __iomem *base, const char *name,
return clocksource_register_hz(&cs->clksrc, hz);
}
+EXPORT_SYMBOL_GPL(clocksource_mmio_init);
© 2016 - 2026 Red Hat, Inc.