From: Daniel Lezcano <daniel.lezcano@linaro.org>
To: daniel.lezcano@linaro.org, tglx@linutronix.de, willmcvicker@google.com
Cc: linux-kernel@vger.kernel.org,
Krzysztof Kozlowski <krzk@kernel.org>,
Alim Akhtar <alim.akhtar@samsung.com>,
linux-arm-kernel@lists.infradead.org (moderated list:ARM/SAMSUNG
S3C, S5P AND EXYNOS ARM ARCHITECTURES),
linux-samsung-soc@vger.kernel.org (open list:ARM/SAMSUNG S3C,
S5P AND EXYNOS ARM ARCHITECTURES)
Subject: [PATCH] clocksource/drivers/exynos_mct: Fix section mismatch from the module conversion
Date: Tue, 15 Jul 2025 14:18:33 +0200 [thread overview]
Message-ID: <20250715121834.2059191-1-daniel.lezcano@linaro.org> (raw)
In-Reply-To: <20250620181719.1399856-6-willmcvicker@google.com>
The function register_current_timer_delay() when compiling on ARM32
fails with a section mismatch. That is resulting from the module
conversion where the function exynos4_clocksource_init() is called
from mct_init_dt(). This one had its __init annotation removed to for
the module loading.
Fix this by adding the __init_or_module annotation for the functions:
- mct_init_dt()
- mct_init_spi()
- mct_init_dt()
Compiled on ARM32 + MODULES=no, ARM64 + MODULES=yes, ARM64 +
MODULES=no
Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org>
---
drivers/clocksource/exynos_mct.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/drivers/clocksource/exynos_mct.c b/drivers/clocksource/exynos_mct.c
index 5075ebe052a7..80d263ee046d 100644
--- a/drivers/clocksource/exynos_mct.c
+++ b/drivers/clocksource/exynos_mct.c
@@ -657,7 +657,7 @@ static int exynos4_timer_interrupts(struct device_node *np,
return err;
}
-static int mct_init_dt(struct device_node *np, unsigned int int_type)
+static __init_or_module int mct_init_dt(struct device_node *np, unsigned int int_type)
{
bool frc_shared = of_property_read_bool(np, "samsung,frc-shared");
u32 local_idx[MCT_NR_LOCAL] = {0};
@@ -705,12 +705,12 @@ static int mct_init_dt(struct device_node *np, unsigned int int_type)
return exynos4_clockevent_init();
}
-static int mct_init_spi(struct device_node *np)
+static __init_or_module int mct_init_spi(struct device_node *np)
{
return mct_init_dt(np, MCT_INT_SPI);
}
-static int mct_init_ppi(struct device_node *np)
+static __init_or_module int mct_init_ppi(struct device_node *np)
{
return mct_init_dt(np, MCT_INT_PPI);
}
--
2.43.0
next prev parent reply other threads:[~2025-07-15 13:05 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-06-20 18:17 [PATCH v4 0/6] Add module support for Arm64 Exynos MCT driver Will McVicker
2025-06-20 18:17 ` [PATCH v4 1/6] of/irq: Export of_irq_count for modules Will McVicker
2025-06-20 18:17 ` [PATCH v4 2/6] clocksource/drivers/exynos_mct: Don't register as a sched_clock on arm64 Will McVicker
2025-06-20 18:17 ` [PATCH v4 3/6] clocksource/drivers/exynos_mct: Set local timer interrupts as percpu Will McVicker
2025-08-26 13:51 ` Marek Szyprowski
2025-06-20 18:17 ` [PATCH v4 4/6] clocksource/drivers/exynos_mct: Fix uninitialized irq name warning Will McVicker
2025-06-20 18:17 ` [PATCH v4 5/6] clocksource/drivers/exynos_mct: Add module support Will McVicker
2025-06-24 13:48 ` Daniel Lezcano
2025-06-24 23:47 ` William McVicker
2025-06-25 9:23 ` Daniel Lezcano
2025-07-15 12:18 ` Daniel Lezcano [this message]
2025-07-15 17:23 ` [PATCH] clocksource/drivers/exynos_mct: Fix section mismatch from the module conversion William McVicker
2025-07-18 9:53 ` Arnd Bergmann
2025-07-25 8:48 ` Krzysztof Kozlowski
2025-07-25 8:52 ` Krzysztof Kozlowski
2025-07-25 9:40 ` [PATCH v4 5/6] clocksource/drivers/exynos_mct: Add module support Daniel Lezcano
2025-06-20 18:17 ` [PATCH v4 6/6] arm64: exynos: Drop select CLKSRC_EXYNOS_MCT Will McVicker
2025-07-15 11:03 ` [PATCH v4 0/6] Add module support for Arm64 Exynos MCT driver Daniel Lezcano
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=20250715121834.2059191-1-daniel.lezcano@linaro.org \
--to=daniel.lezcano@linaro.org \
--cc=alim.akhtar@samsung.com \
--cc=krzk@kernel.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-samsung-soc@vger.kernel.org \
--cc=tglx@linutronix.de \
--cc=willmcvicker@google.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).