From: Lad Prabhakar <prabhakar.mahadev-lad.rj@bp.renesas.com>
Previously, the OSTM driver's platform probe path was only enabled for
selected SoCs (e.g., RZ/G2L and RZ/V2H) due to issues on RZ/Ax (ARM32)
SoCs, which encountered IRQ conflicts like:
/soc/timer@e803b000: used for clock events
genirq: Flags mismatch irq 16. 00215201 (timer@e803c000) vs. 00215201 (timer@e803c000)
Failed to request irq 16 for /soc/timer@e803c000
renesas_ostm e803c000.timer: probe with driver renesas_ostm failed with error -16
These issues have since been resolved by commit 37385c0772a4
("clocksource/drivers/renesas-ostm: Avoid reprobe after successful early
probe"), which prevents reprobe on successfully initialized early timers.
With this fix in place, there is no longer a need to restrict platform
probing based on SoC-specific configs. This change unconditionally enables
reprobe support for all SoCs, simplifying the logic and avoiding the need
to update the configuration for every new Renesas SoC with OSTM.
RZ/A1 and RZ/A2 remain unaffected with this change.
Signed-off-by: Lad Prabhakar <prabhakar.mahadev-lad.rj@bp.renesas.com>
---
v2->v3:
- Dropped config check and unconditionally enabled reprobe support for all
SoCs.
- Dropped Reviewed-by tag from Geert
v1->v2:
- Instead of adding config for new SoC, changed the probe condition to
`CONFIG_ARM64`.
- Updated commit message
- Added a Reviewed-by tag from Geert.
---
drivers/clocksource/renesas-ostm.c | 2 --
1 file changed, 2 deletions(-)
diff --git a/drivers/clocksource/renesas-ostm.c b/drivers/clocksource/renesas-ostm.c
index 3fcbd02b2483..fcf7ac35a9f1 100644
--- a/drivers/clocksource/renesas-ostm.c
+++ b/drivers/clocksource/renesas-ostm.c
@@ -225,7 +225,6 @@ static int __init ostm_init(struct device_node *np)
TIMER_OF_DECLARE(ostm, "renesas,ostm", ostm_init);
-#if defined(CONFIG_ARCH_RZG2L) || defined(CONFIG_ARCH_R9A09G057)
static int __init ostm_probe(struct platform_device *pdev)
{
struct device *dev = &pdev->dev;
@@ -246,4 +245,3 @@ static struct platform_driver ostm_device_driver = {
},
};
builtin_platform_driver_probe(ostm_device_driver, ostm_probe);
-#endif
--
2.49.0
Hi Prabhakar,
kernel test robot noticed the following build warnings:
[auto build test WARNING on tip/timers/core]
[also build test WARNING on robh/for-next linus/master v6.15-rc6 next-20250514]
[cannot apply to daniel-lezcano/clockevents/next]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch#_base_tree_information]
url: https://github.com/intel-lab-lkp/linux/commits/Prabhakar/dt-bindings-timer-renesas-ostm-Document-RZ-V2N-R9A09G056-support/20250506-223636
base: tip/timers/core
patch link: https://lore.kernel.org/r/20250506103152.109525-3-prabhakar.mahadev-lad.rj%40bp.renesas.com
patch subject: [PATCH v3 2/2] clocksource/drivers/renesas-ostm: Unconditionally enable reprobe support
config: hexagon-randconfig-001-20250513 (https://download.01.org/0day-ci/archive/20250515/202505151255.rCHp8Bvu-lkp@intel.com/config)
compiler: clang version 21.0.0git (https://github.com/llvm/llvm-project f819f46284f2a79790038e1f6649172789734ae8)
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20250515/202505151255.rCHp8Bvu-lkp@intel.com/reproduce)
If you fix the issue in a separate patch/commit (i.e. not just a new version of
the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <lkp@intel.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/202505151255.rCHp8Bvu-lkp@intel.com/
All warnings (new ones prefixed by >>):
>> drivers/clocksource/renesas-ostm.c:235:34: warning: unused variable 'ostm_of_table' [-Wunused-const-variable]
235 | static const struct of_device_id ostm_of_table[] = {
| ^~~~~~~~~~~~~
1 warning generated.
vim +/ostm_of_table +235 drivers/clocksource/renesas-ostm.c
3a3e9f23c2cae9 Biju Das 2021-11-12 234
3a3e9f23c2cae9 Biju Das 2021-11-12 @235 static const struct of_device_id ostm_of_table[] = {
3a3e9f23c2cae9 Biju Das 2021-11-12 236 { .compatible = "renesas,ostm", },
3a3e9f23c2cae9 Biju Das 2021-11-12 237 { /* sentinel */ }
3a3e9f23c2cae9 Biju Das 2021-11-12 238 };
3a3e9f23c2cae9 Biju Das 2021-11-12 239
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
On Thu, 15 May 2025 at 07:04, kernel test robot <lkp@intel.com> wrote:
> kernel test robot noticed the following build warnings:
>
> [auto build test WARNING on tip/timers/core]
> [also build test WARNING on robh/for-next linus/master v6.15-rc6 next-20250514]
> [cannot apply to daniel-lezcano/clockevents/next]
> [If your patch is applied to the wrong git tree, kindly drop us a note.
> And when submitting patch, we suggest to use '--base' as documented in
> https://git-scm.com/docs/git-format-patch#_base_tree_information]
>
> url: https://github.com/intel-lab-lkp/linux/commits/Prabhakar/dt-bindings-timer-renesas-ostm-Document-RZ-V2N-R9A09G056-support/20250506-223636
> base: tip/timers/core
> patch link: https://lore.kernel.org/r/20250506103152.109525-3-prabhakar.mahadev-lad.rj%40bp.renesas.com
> patch subject: [PATCH v3 2/2] clocksource/drivers/renesas-ostm: Unconditionally enable reprobe support
> config: hexagon-randconfig-001-20250513 (https://download.01.org/0day-ci/archive/20250515/202505151255.rCHp8Bvu-lkp@intel.com/config)
> compiler: clang version 21.0.0git (https://github.com/llvm/llvm-project f819f46284f2a79790038e1f6649172789734ae8)
> reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20250515/202505151255.rCHp8Bvu-lkp@intel.com/reproduce)
>
> If you fix the issue in a separate patch/commit (i.e. not just a new version of
> the same patch/commit), kindly add following tags
> | Reported-by: kernel test robot <lkp@intel.com>
> | Closes: https://lore.kernel.org/oe-kbuild-all/202505151255.rCHp8Bvu-lkp@intel.com/
>
> All warnings (new ones prefixed by >>):
>
> >> drivers/clocksource/renesas-ostm.c:235:34: warning: unused variable 'ostm_of_table' [-Wunused-const-variable]
> 235 | static const struct of_device_id ostm_of_table[] = {
> | ^~~~~~~~~~~~~
> 1 warning generated.
>
>
> vim +/ostm_of_table +235 drivers/clocksource/renesas-ostm.c
>
> 3a3e9f23c2cae9 Biju Das 2021-11-12 234
> 3a3e9f23c2cae9 Biju Das 2021-11-12 @235 static const struct of_device_id ostm_of_table[] = {
> 3a3e9f23c2cae9 Biju Das 2021-11-12 236 { .compatible = "renesas,ostm", },
> 3a3e9f23c2cae9 Biju Das 2021-11-12 237 { /* sentinel */ }
> 3a3e9f23c2cae9 Biju Das 2021-11-12 238 };
> 3a3e9f23c2cae9 Biju Das 2021-11-12 239
The table is unused if CONFIG_OF=n due to
.of_match_table = of_match_ptr(ostm_of_table),
Gr{oetje,eeting}s,
Geert
--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org
In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
-- Linus Torvalds
Hi Geert,
On Thu, May 15, 2025 at 6:59 AM Geert Uytterhoeven <geert@linux-m68k.org> wrote:
>
> On Thu, 15 May 2025 at 07:04, kernel test robot <lkp@intel.com> wrote:
> > kernel test robot noticed the following build warnings:
> >
> > [auto build test WARNING on tip/timers/core]
> > [also build test WARNING on robh/for-next linus/master v6.15-rc6 next-20250514]
> > [cannot apply to daniel-lezcano/clockevents/next]
> > [If your patch is applied to the wrong git tree, kindly drop us a note.
> > And when submitting patch, we suggest to use '--base' as documented in
> > https://git-scm.com/docs/git-format-patch#_base_tree_information]
> >
> > url: https://github.com/intel-lab-lkp/linux/commits/Prabhakar/dt-bindings-timer-renesas-ostm-Document-RZ-V2N-R9A09G056-support/20250506-223636
> > base: tip/timers/core
> > patch link: https://lore.kernel.org/r/20250506103152.109525-3-prabhakar.mahadev-lad.rj%40bp.renesas.com
> > patch subject: [PATCH v3 2/2] clocksource/drivers/renesas-ostm: Unconditionally enable reprobe support
> > config: hexagon-randconfig-001-20250513 (https://download.01.org/0day-ci/archive/20250515/202505151255.rCHp8Bvu-lkp@intel.com/config)
> > compiler: clang version 21.0.0git (https://github.com/llvm/llvm-project f819f46284f2a79790038e1f6649172789734ae8)
> > reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20250515/202505151255.rCHp8Bvu-lkp@intel.com/reproduce)
> >
> > If you fix the issue in a separate patch/commit (i.e. not just a new version of
> > the same patch/commit), kindly add following tags
> > | Reported-by: kernel test robot <lkp@intel.com>
> > | Closes: https://lore.kernel.org/oe-kbuild-all/202505151255.rCHp8Bvu-lkp@intel.com/
> >
> > All warnings (new ones prefixed by >>):
> >
> > >> drivers/clocksource/renesas-ostm.c:235:34: warning: unused variable 'ostm_of_table' [-Wunused-const-variable]
> > 235 | static const struct of_device_id ostm_of_table[] = {
> > | ^~~~~~~~~~~~~
> > 1 warning generated.
> >
> >
> > vim +/ostm_of_table +235 drivers/clocksource/renesas-ostm.c
> >
> > 3a3e9f23c2cae9 Biju Das 2021-11-12 234
> > 3a3e9f23c2cae9 Biju Das 2021-11-12 @235 static const struct of_device_id ostm_of_table[] = {
> > 3a3e9f23c2cae9 Biju Das 2021-11-12 236 { .compatible = "renesas,ostm", },
> > 3a3e9f23c2cae9 Biju Das 2021-11-12 237 { /* sentinel */ }
> > 3a3e9f23c2cae9 Biju Das 2021-11-12 238 };
> > 3a3e9f23c2cae9 Biju Das 2021-11-12 239
>
> The table is unused if CONFIG_OF=n due to
>
> .of_match_table = of_match_ptr(ostm_of_table),
>
Thanks for the pointer, I'll add a __maybe_unused compiler attribute
and send a new version.
Cheers,
Prabhakar
> Gr{oetje,eeting}s,
>
> Geert
>
> --
> Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org
>
> In personal conversations with technical people, I call myself a hacker. But
> when I'm talking to journalists I just say "programmer" or something like that.
> -- Linus Torvalds
On Tue, 6 May 2025 at 12:32, Prabhakar <prabhakar.csengg@gmail.com> wrote:
> From: Lad Prabhakar <prabhakar.mahadev-lad.rj@bp.renesas.com>
>
> Previously, the OSTM driver's platform probe path was only enabled for
> selected SoCs (e.g., RZ/G2L and RZ/V2H) due to issues on RZ/Ax (ARM32)
> SoCs, which encountered IRQ conflicts like:
>
> /soc/timer@e803b000: used for clock events
> genirq: Flags mismatch irq 16. 00215201 (timer@e803c000) vs. 00215201 (timer@e803c000)
> Failed to request irq 16 for /soc/timer@e803c000
> renesas_ostm e803c000.timer: probe with driver renesas_ostm failed with error -16
>
> These issues have since been resolved by commit 37385c0772a4
> ("clocksource/drivers/renesas-ostm: Avoid reprobe after successful early
> probe"), which prevents reprobe on successfully initialized early timers.
>
> With this fix in place, there is no longer a need to restrict platform
> probing based on SoC-specific configs. This change unconditionally enables
> reprobe support for all SoCs, simplifying the logic and avoiding the need
> to update the configuration for every new Renesas SoC with OSTM.
>
> RZ/A1 and RZ/A2 remain unaffected with this change.
>
> Signed-off-by: Lad Prabhakar <prabhakar.mahadev-lad.rj@bp.renesas.com>
> ---
> v2->v3:
> - Dropped config check and unconditionally enabled reprobe support for all
> SoCs.
> - Dropped Reviewed-by tag from Geert
Reviewed-by: Geert Uytterhoeven <geert+renesas@glider.be>
Boots fine on RSK+RZA1 and RZA2MEVB.
Tested-by: Geert Uytterhoeven <geert+renesas@glider.be>
Gr{oetje,eeting}s,
Geert
--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org
In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
-- Linus Torvalds
© 2016 - 2025 Red Hat, Inc.