Message ID | 20211220165004.17005-2-krzysztof.kozlowski@canonical.com (mailing list archive) |
---|---|
State | Queued |
Headers | show |
Series | None | expand |
On Mon, Dec 20, 2021 at 5:50 PM Krzysztof Kozlowski <krzysztof.kozlowski@canonical.com> wrote: > From: Marek Szyprowski <m.szyprowski@samsung.com> > > diff --git a/arch/arm64/Kconfig.platforms b/arch/arm64/Kconfig.platforms > index 1aa8b7073218..91f5e9568122 100644 > --- a/arch/arm64/Kconfig.platforms > +++ b/arch/arm64/Kconfig.platforms > @@ -89,6 +89,7 @@ config ARCH_BRCMSTB > config ARCH_EXYNOS > bool "ARMv8 based Samsung Exynos SoC family" > select COMMON_CLK_SAMSUNG > + select CLKSRC_EXYNOS_MCT > select EXYNOS_PM_DOMAINS if PM_GENERIC_DOMAINS > select EXYNOS_PMU > select PINCTRL I applied this, but I don't think this is the best way to do it. As you describe, the driver is optional, and we probably shouldn't force-enable it here just because we build a kernel that may run on a platform that may want to use this. I understand the clocksource maintainers prefer the 'select' method, but I think this one shows why that doesn't always work well. This is probably even an example of a clocksource driver that could be a loadable module if someone did the work to make this possible. Arnd
On 21/12/2021 13:30, Arnd Bergmann wrote: > On Mon, Dec 20, 2021 at 5:50 PM Krzysztof Kozlowski > <krzysztof.kozlowski@canonical.com> wrote: >> From: Marek Szyprowski <m.szyprowski@samsung.com> >> >> diff --git a/arch/arm64/Kconfig.platforms b/arch/arm64/Kconfig.platforms >> index 1aa8b7073218..91f5e9568122 100644 >> --- a/arch/arm64/Kconfig.platforms >> +++ b/arch/arm64/Kconfig.platforms >> @@ -89,6 +89,7 @@ config ARCH_BRCMSTB >> config ARCH_EXYNOS >> bool "ARMv8 based Samsung Exynos SoC family" >> select COMMON_CLK_SAMSUNG >> + select CLKSRC_EXYNOS_MCT >> select EXYNOS_PM_DOMAINS if PM_GENERIC_DOMAINS >> select EXYNOS_PMU >> select PINCTRL > > > I applied this, but I don't think this is the best way to do it. As > you describe, the > driver is optional, and we probably shouldn't force-enable it here just because > we build a kernel that may run on a platform that may want to use this. All older ARMv8 designs actually require this because Architected timer is sharing block with MCT. The newer designs (not supported yet) could indeed skip it and rely on Architected entirely. > > I understand the clocksource maintainers prefer the 'select' method, but I think > this one shows why that doesn't always work well. This is probably even an > example of a clocksource driver that could be a loadable module if someone > did the work to make this possible. I understand. Maybe it is the time to make the timer user-visible option with default value. Probably several other timers could be converted to such approach as well. Best regards, Krzysztof
diff --git a/arch/arm64/Kconfig.platforms b/arch/arm64/Kconfig.platforms index 1aa8b7073218..91f5e9568122 100644 --- a/arch/arm64/Kconfig.platforms +++ b/arch/arm64/Kconfig.platforms @@ -89,6 +89,7 @@ config ARCH_BRCMSTB config ARCH_EXYNOS bool "ARMv8 based Samsung Exynos SoC family" select COMMON_CLK_SAMSUNG + select CLKSRC_EXYNOS_MCT select EXYNOS_PM_DOMAINS if PM_GENERIC_DOMAINS select EXYNOS_PMU select PINCTRL