* [PATCH 0/3] clocksource/drivers: Prevent clockevent driver unbind
@ 2025-11-11 15:32 Johan Hovold
2025-11-11 15:32 ` [PATCH 1/3] clocksource/drivers/arm_arch_timer_mmio: Prevent " Johan Hovold
` (3 more replies)
0 siblings, 4 replies; 13+ messages in thread
From: Johan Hovold @ 2025-11-11 15:32 UTC (permalink / raw)
To: Mark Rutland, Marc Zyngier, Daniel Lezcano, Thomas Gleixner
Cc: linux-kernel, Johan Hovold
Clockevents cannot be deregistered so suppress driver bind attributes to
prevent drivers from being unbound and, for example, releasing
underlying resources after registration.
Note that the NXP STM patch depends on the recently submitted section
mismatch fix. [1]
Johan
[1] https://lore.kernel.org/lkml/20251017054943.7195-1-johan@kernel.org/
Johan Hovold (3):
clocksource/drivers/arm_arch_timer_mmio: Prevent driver unbind
clocksource/drivers/nxp-pit: Prevent driver unbind
clocksource/drivers/nxp-stm: Prevent driver unbind
drivers/clocksource/arm_arch_timer_mmio.c | 2 ++
drivers/clocksource/timer-nxp-pit.c | 3 ++-
drivers/clocksource/timer-nxp-stm.c | 3 ++-
3 files changed, 6 insertions(+), 2 deletions(-)
--
2.51.0
^ permalink raw reply [flat|nested] 13+ messages in thread
* [PATCH 1/3] clocksource/drivers/arm_arch_timer_mmio: Prevent driver unbind
2025-11-11 15:32 [PATCH 0/3] clocksource/drivers: Prevent clockevent driver unbind Johan Hovold
@ 2025-11-11 15:32 ` Johan Hovold
2025-11-11 15:45 ` Marc Zyngier
2025-11-26 14:40 ` [tip: timers/clocksource] " tip-bot2 for Johan Hovold
2025-11-11 15:32 ` [PATCH 2/3] clocksource/drivers/nxp-pit: " Johan Hovold
` (2 subsequent siblings)
3 siblings, 2 replies; 13+ messages in thread
From: Johan Hovold @ 2025-11-11 15:32 UTC (permalink / raw)
To: Mark Rutland, Marc Zyngier, Daniel Lezcano, Thomas Gleixner
Cc: linux-kernel, Johan Hovold
Clockevents cannot be deregistered so suppress the bind attributes to
prevent the driver from being unbound and releasing the underlying
resources after registration.
Fixes: 4891f01527bb ("clocksource/drivers/arm_arch_timer: Add standalone MMIO driver")
Signed-off-by: Johan Hovold <johan@kernel.org>
---
drivers/clocksource/arm_arch_timer_mmio.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/drivers/clocksource/arm_arch_timer_mmio.c b/drivers/clocksource/arm_arch_timer_mmio.c
index ebe1987d651e..d10362692fdd 100644
--- a/drivers/clocksource/arm_arch_timer_mmio.c
+++ b/drivers/clocksource/arm_arch_timer_mmio.c
@@ -426,6 +426,7 @@ static struct platform_driver arch_timer_mmio_drv = {
.driver = {
.name = "arch-timer-mmio",
.of_match_table = arch_timer_mmio_of_table,
+ .suppress_bind_attrs = true,
},
.probe = arch_timer_mmio_probe,
};
@@ -434,6 +435,7 @@ builtin_platform_driver(arch_timer_mmio_drv);
static struct platform_driver arch_timer_mmio_acpi_drv = {
.driver = {
.name = "gtdt-arm-mmio-timer",
+ .suppress_bind_attrs = true,
},
.probe = arch_timer_mmio_probe,
};
--
2.51.0
^ permalink raw reply related [flat|nested] 13+ messages in thread
* [PATCH 2/3] clocksource/drivers/nxp-pit: Prevent driver unbind
2025-11-11 15:32 [PATCH 0/3] clocksource/drivers: Prevent clockevent driver unbind Johan Hovold
2025-11-11 15:32 ` [PATCH 1/3] clocksource/drivers/arm_arch_timer_mmio: Prevent " Johan Hovold
@ 2025-11-11 15:32 ` Johan Hovold
2025-11-12 10:00 ` Daniel Lezcano
2025-11-26 14:40 ` [tip: timers/clocksource] " tip-bot2 for Johan Hovold
2025-11-11 15:32 ` [PATCH 3/3] clocksource/drivers/nxp-stm: " Johan Hovold
2025-11-12 9:48 ` [PATCH 0/3] clocksource/drivers: Prevent clockevent " Daniel Lezcano
3 siblings, 2 replies; 13+ messages in thread
From: Johan Hovold @ 2025-11-11 15:32 UTC (permalink / raw)
To: Mark Rutland, Marc Zyngier, Daniel Lezcano, Thomas Gleixner
Cc: linux-kernel, Johan Hovold
The driver does not support unbinding (e.g. as clockevents cannot be
deregistered) so suppress the bind attributes to prevent the driver from
being unbound and rebound after registration (and disabling the timer
when reprobing fails).
Even if the driver can currently only be built-in, also switch to
builtin_platform_driver() to prevent it from being unloaded should
modular builds ever be enabled.
Fixes: bee33f22d7c3 ("clocksource/drivers/nxp-pit: Add NXP Automotive s32g2 / s32g3 support")
Signed-off-by: Johan Hovold <johan@kernel.org>
---
drivers/clocksource/timer-nxp-pit.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/drivers/clocksource/timer-nxp-pit.c b/drivers/clocksource/timer-nxp-pit.c
index 2d0a3554b6bf..d1740f18f718 100644
--- a/drivers/clocksource/timer-nxp-pit.c
+++ b/drivers/clocksource/timer-nxp-pit.c
@@ -374,9 +374,10 @@ static struct platform_driver nxp_pit_driver = {
.driver = {
.name = "nxp-pit",
.of_match_table = pit_timer_of_match,
+ .suppress_bind_attrs = true,
},
.probe = pit_timer_probe,
};
-module_platform_driver(nxp_pit_driver);
+builtin_platform_driver(nxp_pit_driver);
TIMER_OF_DECLARE(vf610, "fsl,vf610-pit", pit_timer_init);
--
2.51.0
^ permalink raw reply related [flat|nested] 13+ messages in thread
* [PATCH 3/3] clocksource/drivers/nxp-stm: Prevent driver unbind
2025-11-11 15:32 [PATCH 0/3] clocksource/drivers: Prevent clockevent driver unbind Johan Hovold
2025-11-11 15:32 ` [PATCH 1/3] clocksource/drivers/arm_arch_timer_mmio: Prevent " Johan Hovold
2025-11-11 15:32 ` [PATCH 2/3] clocksource/drivers/nxp-pit: " Johan Hovold
@ 2025-11-11 15:32 ` Johan Hovold
2025-11-26 14:40 ` [tip: timers/clocksource] " tip-bot2 for Johan Hovold
2025-11-12 9:48 ` [PATCH 0/3] clocksource/drivers: Prevent clockevent " Daniel Lezcano
3 siblings, 1 reply; 13+ messages in thread
From: Johan Hovold @ 2025-11-11 15:32 UTC (permalink / raw)
To: Mark Rutland, Marc Zyngier, Daniel Lezcano, Thomas Gleixner
Cc: linux-kernel, Johan Hovold
Clockevents cannot be deregistered so suppress the bind attributes to
prevent the driver from being unbound and releasing the underlying
resources after registration.
Even if the driver can currently only be built-in, also switch to
builtin_platform_driver() to prevent it from being unloaded should
modular builds ever be enabled.
Fixes: cec32ac75827 ("clocksource/drivers/nxp-timer: Add the System Timer Module for the s32gx platforms")
Signed-off-by: Johan Hovold <johan@kernel.org>
---
drivers/clocksource/timer-nxp-stm.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/drivers/clocksource/timer-nxp-stm.c b/drivers/clocksource/timer-nxp-stm.c
index c320d764b12e..1ab907233f48 100644
--- a/drivers/clocksource/timer-nxp-stm.c
+++ b/drivers/clocksource/timer-nxp-stm.c
@@ -487,9 +487,10 @@ static struct platform_driver nxp_stm_driver = {
.driver = {
.name = "nxp-stm",
.of_match_table = nxp_stm_of_match,
+ .suppress_bind_attrs = true,
},
};
-module_platform_driver(nxp_stm_driver);
+builtin_platform_driver(nxp_stm_driver);
MODULE_DESCRIPTION("NXP System Timer Module driver");
MODULE_LICENSE("GPL");
--
2.51.0
^ permalink raw reply related [flat|nested] 13+ messages in thread
* Re: [PATCH 1/3] clocksource/drivers/arm_arch_timer_mmio: Prevent driver unbind
2025-11-11 15:32 ` [PATCH 1/3] clocksource/drivers/arm_arch_timer_mmio: Prevent " Johan Hovold
@ 2025-11-11 15:45 ` Marc Zyngier
2025-11-26 14:40 ` [tip: timers/clocksource] " tip-bot2 for Johan Hovold
1 sibling, 0 replies; 13+ messages in thread
From: Marc Zyngier @ 2025-11-11 15:45 UTC (permalink / raw)
To: Johan Hovold; +Cc: Mark Rutland, Daniel Lezcano, Thomas Gleixner, linux-kernel
On Tue, 11 Nov 2025 15:32:24 +0000,
Johan Hovold <johan@kernel.org> wrote:
>
> Clockevents cannot be deregistered so suppress the bind attributes to
> prevent the driver from being unbound and releasing the underlying
> resources after registration.
>
> Fixes: 4891f01527bb ("clocksource/drivers/arm_arch_timer: Add standalone MMIO driver")
> Signed-off-by: Johan Hovold <johan@kernel.org>
> ---
> drivers/clocksource/arm_arch_timer_mmio.c | 2 ++
> 1 file changed, 2 insertions(+)
>
> diff --git a/drivers/clocksource/arm_arch_timer_mmio.c b/drivers/clocksource/arm_arch_timer_mmio.c
> index ebe1987d651e..d10362692fdd 100644
> --- a/drivers/clocksource/arm_arch_timer_mmio.c
> +++ b/drivers/clocksource/arm_arch_timer_mmio.c
> @@ -426,6 +426,7 @@ static struct platform_driver arch_timer_mmio_drv = {
> .driver = {
> .name = "arch-timer-mmio",
> .of_match_table = arch_timer_mmio_of_table,
> + .suppress_bind_attrs = true,
> },
> .probe = arch_timer_mmio_probe,
> };
> @@ -434,6 +435,7 @@ builtin_platform_driver(arch_timer_mmio_drv);
> static struct platform_driver arch_timer_mmio_acpi_drv = {
> .driver = {
> .name = "gtdt-arm-mmio-timer",
> + .suppress_bind_attrs = true,
> },
> .probe = arch_timer_mmio_probe,
> };
Acked-by: Marc Zyngier <maz@kernel.org>
M.
--
Without deviation from the norm, progress is not possible.
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [PATCH 0/3] clocksource/drivers: Prevent clockevent driver unbind
2025-11-11 15:32 [PATCH 0/3] clocksource/drivers: Prevent clockevent driver unbind Johan Hovold
` (2 preceding siblings ...)
2025-11-11 15:32 ` [PATCH 3/3] clocksource/drivers/nxp-stm: " Johan Hovold
@ 2025-11-12 9:48 ` Daniel Lezcano
2025-11-12 11:00 ` Johan Hovold
3 siblings, 1 reply; 13+ messages in thread
From: Daniel Lezcano @ 2025-11-12 9:48 UTC (permalink / raw)
To: Johan Hovold, Mark Rutland, Marc Zyngier, Thomas Gleixner; +Cc: linux-kernel
Hi Johan,
On 11/11/25 16:32, Johan Hovold wrote:
> Clockevents cannot be deregistered so suppress driver bind attributes to
> prevent drivers from being unbound and, for example, releasing
> underlying resources after registration.
For non architected timers, we want to be able to convert the timers as
modules.
That's an on-going work [1].
Your series assumes we won't convert that into modules, so you do the
conversion to builtin. But actually, there is a slow move to module
conversion.
However, given a clockevent can not be unregistered, the
'suppress_bind_attrs' flag makes sense for those registering one.
-- Daniel
[1]
https://lore.kernel.org/all/20250602151853.1942521-1-daniel.lezcano@linaro.org/
--
<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
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [PATCH 2/3] clocksource/drivers/nxp-pit: Prevent driver unbind
2025-11-11 15:32 ` [PATCH 2/3] clocksource/drivers/nxp-pit: " Johan Hovold
@ 2025-11-12 10:00 ` Daniel Lezcano
2025-11-12 11:01 ` Johan Hovold
2025-11-26 14:40 ` [tip: timers/clocksource] " tip-bot2 for Johan Hovold
1 sibling, 1 reply; 13+ messages in thread
From: Daniel Lezcano @ 2025-11-12 10:00 UTC (permalink / raw)
To: Johan Hovold, Mark Rutland, Marc Zyngier, Thomas Gleixner; +Cc: linux-kernel
On 11/11/25 16:32, Johan Hovold wrote:
> The driver does not support unbinding (e.g. as clockevents cannot be
> deregistered) so suppress the bind attributes to prevent the driver from
> being unbound and rebound after registration (and disabling the timer
> when reprobing fails).
>
> Even if the driver can currently only be built-in, also switch to
> builtin_platform_driver() to prevent it from being unloaded should
> modular builds ever be enabled.
>
> Fixes: bee33f22d7c3 ("clocksource/drivers/nxp-pit: Add NXP Automotive s32g2 / s32g3 support")
> Signed-off-by: Johan Hovold <johan@kernel.org>
> ---
> drivers/clocksource/timer-nxp-pit.c | 3 ++-
> 1 file changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/clocksource/timer-nxp-pit.c b/drivers/clocksource/timer-nxp-pit.c
> index 2d0a3554b6bf..d1740f18f718 100644
> --- a/drivers/clocksource/timer-nxp-pit.c
> +++ b/drivers/clocksource/timer-nxp-pit.c
> @@ -374,9 +374,10 @@ static struct platform_driver nxp_pit_driver = {
> .driver = {
> .name = "nxp-pit",
> .of_match_table = pit_timer_of_match,
> + .suppress_bind_attrs = true,
> },
> .probe = pit_timer_probe,
> };
> -module_platform_driver(nxp_pit_driver);
> +builtin_platform_driver(nxp_pit_driver);
Do not use builtin_platform here. You can add the tristate Kconfig
option for this driver, I tested it.
--
<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
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [PATCH 0/3] clocksource/drivers: Prevent clockevent driver unbind
2025-11-12 9:48 ` [PATCH 0/3] clocksource/drivers: Prevent clockevent " Daniel Lezcano
@ 2025-11-12 11:00 ` Johan Hovold
0 siblings, 0 replies; 13+ messages in thread
From: Johan Hovold @ 2025-11-12 11:00 UTC (permalink / raw)
To: Daniel Lezcano; +Cc: Mark Rutland, Marc Zyngier, Thomas Gleixner, linux-kernel
On Wed, Nov 12, 2025 at 10:48:22AM +0100, Daniel Lezcano wrote:
> On 11/11/25 16:32, Johan Hovold wrote:
> > Clockevents cannot be deregistered so suppress driver bind attributes to
> > prevent drivers from being unbound and, for example, releasing
> > underlying resources after registration.
>
> For non architected timers, we want to be able to convert the timers as
> modules.
>
> That's an on-going work [1].
>
> Your series assumes we won't convert that into modules, so you do the
> conversion to builtin. But actually, there is a slow move to module
> conversion.
No, that's not the case. The builtin_platform_driver macro still allows
building drivers as modules, it just prevents unloading them.
Johan
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [PATCH 2/3] clocksource/drivers/nxp-pit: Prevent driver unbind
2025-11-12 10:00 ` Daniel Lezcano
@ 2025-11-12 11:01 ` Johan Hovold
2025-11-12 15:20 ` Daniel Lezcano
0 siblings, 1 reply; 13+ messages in thread
From: Johan Hovold @ 2025-11-12 11:01 UTC (permalink / raw)
To: Daniel Lezcano; +Cc: Mark Rutland, Marc Zyngier, Thomas Gleixner, linux-kernel
On Wed, Nov 12, 2025 at 11:00:05AM +0100, Daniel Lezcano wrote:
> On 11/11/25 16:32, Johan Hovold wrote:
> > The driver does not support unbinding (e.g. as clockevents cannot be
> > deregistered) so suppress the bind attributes to prevent the driver from
> > being unbound and rebound after registration (and disabling the timer
> > when reprobing fails).
> >
> > Even if the driver can currently only be built-in, also switch to
> > builtin_platform_driver() to prevent it from being unloaded should
> > modular builds ever be enabled.
> >
> > Fixes: bee33f22d7c3 ("clocksource/drivers/nxp-pit: Add NXP Automotive s32g2 / s32g3 support")
> > Signed-off-by: Johan Hovold <johan@kernel.org>
> > ---
> > drivers/clocksource/timer-nxp-pit.c | 3 ++-
> > 1 file changed, 2 insertions(+), 1 deletion(-)
> >
> > diff --git a/drivers/clocksource/timer-nxp-pit.c b/drivers/clocksource/timer-nxp-pit.c
> > index 2d0a3554b6bf..d1740f18f718 100644
> > --- a/drivers/clocksource/timer-nxp-pit.c
> > +++ b/drivers/clocksource/timer-nxp-pit.c
> > @@ -374,9 +374,10 @@ static struct platform_driver nxp_pit_driver = {
> > .driver = {
> > .name = "nxp-pit",
> > .of_match_table = pit_timer_of_match,
> > + .suppress_bind_attrs = true,
> > },
> > .probe = pit_timer_probe,
> > };
> > -module_platform_driver(nxp_pit_driver);
> > +builtin_platform_driver(nxp_pit_driver);
>
> Do not use builtin_platform here. You can add the tristate Kconfig
> option for this driver, I tested it.
As I just commented on the cover letter, that's not relevant here;
builtin_platform_driver() only prevents unloading a driver built as a
module (which is something we want to prevent for these drivers).
Johan
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [PATCH 2/3] clocksource/drivers/nxp-pit: Prevent driver unbind
2025-11-12 11:01 ` Johan Hovold
@ 2025-11-12 15:20 ` Daniel Lezcano
0 siblings, 0 replies; 13+ messages in thread
From: Daniel Lezcano @ 2025-11-12 15:20 UTC (permalink / raw)
To: Johan Hovold; +Cc: Mark Rutland, Marc Zyngier, Thomas Gleixner, linux-kernel
On 11/12/25 12:01, Johan Hovold wrote:
> On Wed, Nov 12, 2025 at 11:00:05AM +0100, Daniel Lezcano wrote:
>> On 11/11/25 16:32, Johan Hovold wrote:
>>> The driver does not support unbinding (e.g. as clockevents cannot be
>>> deregistered) so suppress the bind attributes to prevent the driver from
>>> being unbound and rebound after registration (and disabling the timer
>>> when reprobing fails).
>>>
>>> Even if the driver can currently only be built-in, also switch to
>>> builtin_platform_driver() to prevent it from being unloaded should
>>> modular builds ever be enabled.
>>>
>>> Fixes: bee33f22d7c3 ("clocksource/drivers/nxp-pit: Add NXP Automotive s32g2 / s32g3 support")
>>> Signed-off-by: Johan Hovold <johan@kernel.org>
>>> ---
>>> drivers/clocksource/timer-nxp-pit.c | 3 ++-
>>> 1 file changed, 2 insertions(+), 1 deletion(-)
>>>
>>> diff --git a/drivers/clocksource/timer-nxp-pit.c b/drivers/clocksource/timer-nxp-pit.c
>>> index 2d0a3554b6bf..d1740f18f718 100644
>>> --- a/drivers/clocksource/timer-nxp-pit.c
>>> +++ b/drivers/clocksource/timer-nxp-pit.c
>>> @@ -374,9 +374,10 @@ static struct platform_driver nxp_pit_driver = {
>>> .driver = {
>>> .name = "nxp-pit",
>>> .of_match_table = pit_timer_of_match,
>>> + .suppress_bind_attrs = true,
>>> },
>>> .probe = pit_timer_probe,
>>> };
>>> -module_platform_driver(nxp_pit_driver);
>>> +builtin_platform_driver(nxp_pit_driver);
>>
>> Do not use builtin_platform here. You can add the tristate Kconfig
>> option for this driver, I tested it.
>
> As I just commented on the cover letter, that's not relevant here;
> builtin_platform_driver() only prevents unloading a driver built as a
> module (which is something we want to prevent for these drivers).
I see your point, I agree. That is something we want to prevent for
drivers having a clockevent.
Even if the core framework will prevent the module to be unloaded, we
can consider these changes an additional guard.
--
<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
^ permalink raw reply [flat|nested] 13+ messages in thread
* [tip: timers/clocksource] clocksource/drivers/nxp-stm: Prevent driver unbind
2025-11-11 15:32 ` [PATCH 3/3] clocksource/drivers/nxp-stm: " Johan Hovold
@ 2025-11-26 14:40 ` tip-bot2 for Johan Hovold
0 siblings, 0 replies; 13+ messages in thread
From: tip-bot2 for Johan Hovold @ 2025-11-26 14:40 UTC (permalink / raw)
To: linux-tip-commits; +Cc: Johan Hovold, Daniel Lezcano, x86, linux-kernel
The following commit has been merged into the timers/clocksource branch of tip:
Commit-ID: 6a2416892e8942f5e2bfe9b85c0164f410a53a2d
Gitweb: https://git.kernel.org/tip/6a2416892e8942f5e2bfe9b85c0164f410a53a2d
Author: Johan Hovold <johan@kernel.org>
AuthorDate: Tue, 11 Nov 2025 16:32:26 +01:00
Committer: Daniel Lezcano <daniel.lezcano@linaro.org>
CommitterDate: Wed, 26 Nov 2025 11:25:03 +01:00
clocksource/drivers/nxp-stm: Prevent driver unbind
Clockevents cannot be deregistered so suppress the bind attributes to
prevent the driver from being unbound and releasing the underlying
resources after registration.
Even if the driver can currently only be built-in, also switch to
builtin_platform_driver() to prevent it from being unloaded should
modular builds ever be enabled.
Fixes: cec32ac75827 ("clocksource/drivers/nxp-timer: Add the System Timer Module for the s32gx platforms")
Signed-off-by: Johan Hovold <johan@kernel.org>
Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org>
Link: https://patch.msgid.link/20251111153226.579-4-johan@kernel.org
---
drivers/clocksource/timer-nxp-stm.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/drivers/clocksource/timer-nxp-stm.c b/drivers/clocksource/timer-nxp-stm.c
index c320d76..1ab9072 100644
--- a/drivers/clocksource/timer-nxp-stm.c
+++ b/drivers/clocksource/timer-nxp-stm.c
@@ -487,9 +487,10 @@ static struct platform_driver nxp_stm_driver = {
.driver = {
.name = "nxp-stm",
.of_match_table = nxp_stm_of_match,
+ .suppress_bind_attrs = true,
},
};
-module_platform_driver(nxp_stm_driver);
+builtin_platform_driver(nxp_stm_driver);
MODULE_DESCRIPTION("NXP System Timer Module driver");
MODULE_LICENSE("GPL");
^ permalink raw reply related [flat|nested] 13+ messages in thread
* [tip: timers/clocksource] clocksource/drivers/nxp-pit: Prevent driver unbind
2025-11-11 15:32 ` [PATCH 2/3] clocksource/drivers/nxp-pit: " Johan Hovold
2025-11-12 10:00 ` Daniel Lezcano
@ 2025-11-26 14:40 ` tip-bot2 for Johan Hovold
1 sibling, 0 replies; 13+ messages in thread
From: tip-bot2 for Johan Hovold @ 2025-11-26 14:40 UTC (permalink / raw)
To: linux-tip-commits; +Cc: Johan Hovold, Daniel Lezcano, x86, linux-kernel
The following commit has been merged into the timers/clocksource branch of tip:
Commit-ID: e25f964cf414dafa6bee5c9c2c0b1d1fb041dc92
Gitweb: https://git.kernel.org/tip/e25f964cf414dafa6bee5c9c2c0b1d1fb041dc92
Author: Johan Hovold <johan@kernel.org>
AuthorDate: Tue, 11 Nov 2025 16:32:25 +01:00
Committer: Daniel Lezcano <daniel.lezcano@linaro.org>
CommitterDate: Wed, 26 Nov 2025 11:24:57 +01:00
clocksource/drivers/nxp-pit: Prevent driver unbind
The driver does not support unbinding (e.g. as clockevents cannot be
deregistered) so suppress the bind attributes to prevent the driver from
being unbound and rebound after registration (and disabling the timer
when reprobing fails).
Even if the driver can currently only be built-in, also switch to
builtin_platform_driver() to prevent it from being unloaded should
modular builds ever be enabled.
Fixes: bee33f22d7c3 ("clocksource/drivers/nxp-pit: Add NXP Automotive s32g2 / s32g3 support")
Signed-off-by: Johan Hovold <johan@kernel.org>
Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org>
Link: https://patch.msgid.link/20251111153226.579-3-johan@kernel.org
---
drivers/clocksource/timer-nxp-pit.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/drivers/clocksource/timer-nxp-pit.c b/drivers/clocksource/timer-nxp-pit.c
index 2d0a355..d1740f1 100644
--- a/drivers/clocksource/timer-nxp-pit.c
+++ b/drivers/clocksource/timer-nxp-pit.c
@@ -374,9 +374,10 @@ static struct platform_driver nxp_pit_driver = {
.driver = {
.name = "nxp-pit",
.of_match_table = pit_timer_of_match,
+ .suppress_bind_attrs = true,
},
.probe = pit_timer_probe,
};
-module_platform_driver(nxp_pit_driver);
+builtin_platform_driver(nxp_pit_driver);
TIMER_OF_DECLARE(vf610, "fsl,vf610-pit", pit_timer_init);
^ permalink raw reply related [flat|nested] 13+ messages in thread
* [tip: timers/clocksource] clocksource/drivers/arm_arch_timer_mmio: Prevent driver unbind
2025-11-11 15:32 ` [PATCH 1/3] clocksource/drivers/arm_arch_timer_mmio: Prevent " Johan Hovold
2025-11-11 15:45 ` Marc Zyngier
@ 2025-11-26 14:40 ` tip-bot2 for Johan Hovold
1 sibling, 0 replies; 13+ messages in thread
From: tip-bot2 for Johan Hovold @ 2025-11-26 14:40 UTC (permalink / raw)
To: linux-tip-commits
Cc: Johan Hovold, Daniel Lezcano, Marc Zyngier, x86, linux-kernel
The following commit has been merged into the timers/clocksource branch of tip:
Commit-ID: 6aa10f0e2ef9eba1955be6a9d0a8eaecf6bdb7ae
Gitweb: https://git.kernel.org/tip/6aa10f0e2ef9eba1955be6a9d0a8eaecf6bdb7ae
Author: Johan Hovold <johan@kernel.org>
AuthorDate: Tue, 11 Nov 2025 16:32:24 +01:00
Committer: Daniel Lezcano <daniel.lezcano@linaro.org>
CommitterDate: Wed, 26 Nov 2025 11:24:47 +01:00
clocksource/drivers/arm_arch_timer_mmio: Prevent driver unbind
Clockevents cannot be deregistered so suppress the bind attributes to
prevent the driver from being unbound and releasing the underlying
resources after registration.
Fixes: 4891f01527bb ("clocksource/drivers/arm_arch_timer: Add standalone MMIO driver")
Signed-off-by: Johan Hovold <johan@kernel.org>
Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org>
Acked-by: Marc Zyngier <maz@kernel.org>
Link: https://patch.msgid.link/20251111153226.579-2-johan@kernel.org
---
drivers/clocksource/arm_arch_timer_mmio.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/drivers/clocksource/arm_arch_timer_mmio.c b/drivers/clocksource/arm_arch_timer_mmio.c
index ebe1987..d103626 100644
--- a/drivers/clocksource/arm_arch_timer_mmio.c
+++ b/drivers/clocksource/arm_arch_timer_mmio.c
@@ -426,6 +426,7 @@ static struct platform_driver arch_timer_mmio_drv = {
.driver = {
.name = "arch-timer-mmio",
.of_match_table = arch_timer_mmio_of_table,
+ .suppress_bind_attrs = true,
},
.probe = arch_timer_mmio_probe,
};
@@ -434,6 +435,7 @@ builtin_platform_driver(arch_timer_mmio_drv);
static struct platform_driver arch_timer_mmio_acpi_drv = {
.driver = {
.name = "gtdt-arm-mmio-timer",
+ .suppress_bind_attrs = true,
},
.probe = arch_timer_mmio_probe,
};
^ permalink raw reply related [flat|nested] 13+ messages in thread
end of thread, other threads:[~2025-11-26 14:40 UTC | newest]
Thread overview: 13+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-11-11 15:32 [PATCH 0/3] clocksource/drivers: Prevent clockevent driver unbind Johan Hovold
2025-11-11 15:32 ` [PATCH 1/3] clocksource/drivers/arm_arch_timer_mmio: Prevent " Johan Hovold
2025-11-11 15:45 ` Marc Zyngier
2025-11-26 14:40 ` [tip: timers/clocksource] " tip-bot2 for Johan Hovold
2025-11-11 15:32 ` [PATCH 2/3] clocksource/drivers/nxp-pit: " Johan Hovold
2025-11-12 10:00 ` Daniel Lezcano
2025-11-12 11:01 ` Johan Hovold
2025-11-12 15:20 ` Daniel Lezcano
2025-11-26 14:40 ` [tip: timers/clocksource] " tip-bot2 for Johan Hovold
2025-11-11 15:32 ` [PATCH 3/3] clocksource/drivers/nxp-stm: " Johan Hovold
2025-11-26 14:40 ` [tip: timers/clocksource] " tip-bot2 for Johan Hovold
2025-11-12 9:48 ` [PATCH 0/3] clocksource/drivers: Prevent clockevent " Daniel Lezcano
2025-11-12 11:00 ` Johan Hovold
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox