diff mbox series

arm64: Kconfig: Enable MCT timer for ARCH_EXYNOS

Message ID 20211026115916.31553-1-semen.protsenko@linaro.org (mailing list archive)
State New, archived
Headers show
Series arm64: Kconfig: Enable MCT timer for ARCH_EXYNOS | expand

Commit Message

Sam Protsenko Oct. 26, 2021, 11:59 a.m. UTC
Some ARM64 Exynos SoCs have MCT timer block, e.g. Exynos850 and
Exynos5433. CLKSRC_EXYNOS_MCT option is not visible unless COMPILE_TEST
is enabled. Select CLKSRC_EXYNOS_MCT option for ARM64 ARCH_EXYNOS like
it's done in arch/arm/mach-exynos/Kconfig, to enable MCT timer support
for ARM64 Exynos SoCs.

Signed-off-by: Sam Protsenko <semen.protsenko@linaro.org>
---
 arch/arm64/Kconfig.platforms | 1 +
 1 file changed, 1 insertion(+)

Comments

Krzysztof Kozlowski Oct. 26, 2021, 2:03 p.m. UTC | #1
On 26/10/2021 13:59, Sam Protsenko wrote:
> Some ARM64 Exynos SoCs have MCT timer block, e.g. Exynos850 and
> Exynos5433. CLKSRC_EXYNOS_MCT option is not visible unless COMPILE_TEST
> is enabled. Select CLKSRC_EXYNOS_MCT option for ARM64 ARCH_EXYNOS like
> it's done in arch/arm/mach-exynos/Kconfig, to enable MCT timer support
> for ARM64 Exynos SoCs.
> 
> Signed-off-by: Sam Protsenko <semen.protsenko@linaro.org>
> ---
>  arch/arm64/Kconfig.platforms | 1 +
>  1 file changed, 1 insertion(+)
> 

+CC Marek, Marc, Mark and Chanwoo,
Looks like duplicated:
https://lore.kernel.org/lkml/20181018095708.1527-7-m.szyprowski@samsung.com/

The topic stalled and I think this particular patch did not make sense
on its own, without rest of changes from Marek. I am not sure, though...

Best regards,
Krzysztof
Sam Protsenko Oct. 28, 2021, 2:22 p.m. UTC | #2
On Tue, 26 Oct 2021 at 17:03, Krzysztof Kozlowski
<krzysztof.kozlowski@canonical.com> wrote:
>
> On 26/10/2021 13:59, Sam Protsenko wrote:
> > Some ARM64 Exynos SoCs have MCT timer block, e.g. Exynos850 and
> > Exynos5433. CLKSRC_EXYNOS_MCT option is not visible unless COMPILE_TEST
> > is enabled. Select CLKSRC_EXYNOS_MCT option for ARM64 ARCH_EXYNOS like
> > it's done in arch/arm/mach-exynos/Kconfig, to enable MCT timer support
> > for ARM64 Exynos SoCs.
> >
> > Signed-off-by: Sam Protsenko <semen.protsenko@linaro.org>
> > ---
> >  arch/arm64/Kconfig.platforms | 1 +
> >  1 file changed, 1 insertion(+)
> >
>
> +CC Marek, Marc, Mark and Chanwoo,
> Looks like duplicated:
> https://lore.kernel.org/lkml/20181018095708.1527-7-m.szyprowski@samsung.com/
>
> The topic stalled and I think this particular patch did not make sense
> on its own, without rest of changes from Marek. I am not sure, though...
>

Krzysztof, Marek,

That series looks nice, I'm quite interested in that being applied. Do
you think I can do something to help with that (e.g. rebasing,
re-sending on behalf of Marek, testing on Exynos850, etc)?

> Best regards,
> Krzysztof
Krzysztof Kozlowski Oct. 28, 2021, 2:35 p.m. UTC | #3
On 28/10/2021 16:22, Sam Protsenko wrote:
> On Tue, 26 Oct 2021 at 17:03, Krzysztof Kozlowski
> <krzysztof.kozlowski@canonical.com> wrote:
>>
>> On 26/10/2021 13:59, Sam Protsenko wrote:
>>> Some ARM64 Exynos SoCs have MCT timer block, e.g. Exynos850 and
>>> Exynos5433. CLKSRC_EXYNOS_MCT option is not visible unless COMPILE_TEST
>>> is enabled. Select CLKSRC_EXYNOS_MCT option for ARM64 ARCH_EXYNOS like
>>> it's done in arch/arm/mach-exynos/Kconfig, to enable MCT timer support
>>> for ARM64 Exynos SoCs.
>>>
>>> Signed-off-by: Sam Protsenko <semen.protsenko@linaro.org>
>>> ---
>>>  arch/arm64/Kconfig.platforms | 1 +
>>>  1 file changed, 1 insertion(+)
>>>
>>
>> +CC Marek, Marc, Mark and Chanwoo,
>> Looks like duplicated:
>> https://lore.kernel.org/lkml/20181018095708.1527-7-m.szyprowski@samsung.com/
>>
>> The topic stalled and I think this particular patch did not make sense
>> on its own, without rest of changes from Marek. I am not sure, though...
>>
> 
> Krzysztof, Marek,
> 
> That series looks nice, I'm quite interested in that being applied. Do
> you think I can do something to help with that (e.g. rebasing,
> re-sending on behalf of Marek, testing on Exynos850, etc)?

I think there were no objections against v4 of this patchset, but
somehow it wasn't applied.

Marek,
Does it make sense to try respinning your v4?

Best regards,
Krzysztof
Marek Szyprowski Oct. 29, 2021, 11:38 a.m. UTC | #4
On 28.10.2021 16:35, Krzysztof Kozlowski wrote:
> On 28/10/2021 16:22, Sam Protsenko wrote:
>> On Tue, 26 Oct 2021 at 17:03, Krzysztof Kozlowski
>> <krzysztof.kozlowski@canonical.com> wrote:
>>> On 26/10/2021 13:59, Sam Protsenko wrote:
>>>> Some ARM64 Exynos SoCs have MCT timer block, e.g. Exynos850 and
>>>> Exynos5433. CLKSRC_EXYNOS_MCT option is not visible unless COMPILE_TEST
>>>> is enabled. Select CLKSRC_EXYNOS_MCT option for ARM64 ARCH_EXYNOS like
>>>> it's done in arch/arm/mach-exynos/Kconfig, to enable MCT timer support
>>>> for ARM64 Exynos SoCs.
>>>>
>>>> Signed-off-by: Sam Protsenko <semen.protsenko@linaro.org>
>>>> ---
>>>>   arch/arm64/Kconfig.platforms | 1 +
>>>>   1 file changed, 1 insertion(+)
>>>>
>>> +CC Marek, Marc, Mark and Chanwoo,
>>> Looks like duplicated:
>>> https://lore.kernel.org/lkml/20181018095708.1527-7-m.szyprowski@samsung.com/
>>>
>>> The topic stalled and I think this particular patch did not make sense
>>> on its own, without rest of changes from Marek. I am not sure, though...
>>>
>> Krzysztof, Marek,
>>
>> That series looks nice, I'm quite interested in that being applied. Do
>> you think I can do something to help with that (e.g. rebasing,
>> re-sending on behalf of Marek, testing on Exynos850, etc)?
> I think there were no objections against v4 of this patchset, but
> somehow it wasn't applied.
>
> Marek,
> Does it make sense to try respinning your v4?

I think I've abandoned it, because I got a final NACK on the arch timer 
change (support for 'not-fw-configured' timers). Without that the above 
mentioned changes doesn't make much sense.

I know that the Exynos5433 firmware breaks the defined protocol, but on 
the other hand I can do nothing more than carrying internally those few 
patches out of tree to keep it fully working with 'mainline'.

I've observed the same problem with newer Exynos SoCs, but those so far 
didn't get mainline support (yet), although there have been some 
attempts from the community.

Best regards
Sam Protsenko Oct. 29, 2021, 1:15 p.m. UTC | #5
On Fri, 29 Oct 2021 at 14:38, Marek Szyprowski <m.szyprowski@samsung.com> wrote:
>
> On 28.10.2021 16:35, Krzysztof Kozlowski wrote:
> > On 28/10/2021 16:22, Sam Protsenko wrote:
> >> On Tue, 26 Oct 2021 at 17:03, Krzysztof Kozlowski
> >> <krzysztof.kozlowski@canonical.com> wrote:
> >>> On 26/10/2021 13:59, Sam Protsenko wrote:
> >>>> Some ARM64 Exynos SoCs have MCT timer block, e.g. Exynos850 and
> >>>> Exynos5433. CLKSRC_EXYNOS_MCT option is not visible unless COMPILE_TEST
> >>>> is enabled. Select CLKSRC_EXYNOS_MCT option for ARM64 ARCH_EXYNOS like
> >>>> it's done in arch/arm/mach-exynos/Kconfig, to enable MCT timer support
> >>>> for ARM64 Exynos SoCs.
> >>>>
> >>>> Signed-off-by: Sam Protsenko <semen.protsenko@linaro.org>
> >>>> ---
> >>>>   arch/arm64/Kconfig.platforms | 1 +
> >>>>   1 file changed, 1 insertion(+)
> >>>>
> >>> +CC Marek, Marc, Mark and Chanwoo,
> >>> Looks like duplicated:
> >>> https://lore.kernel.org/lkml/20181018095708.1527-7-m.szyprowski@samsung.com/
> >>>
> >>> The topic stalled and I think this particular patch did not make sense
> >>> on its own, without rest of changes from Marek. I am not sure, though...
> >>>
> >> Krzysztof, Marek,
> >>
> >> That series looks nice, I'm quite interested in that being applied. Do
> >> you think I can do something to help with that (e.g. rebasing,
> >> re-sending on behalf of Marek, testing on Exynos850, etc)?
> > I think there were no objections against v4 of this patchset, but
> > somehow it wasn't applied.
> >
> > Marek,
> > Does it make sense to try respinning your v4?
>
> I think I've abandoned it, because I got a final NACK on the arch timer
> change (support for 'not-fw-configured' timers). Without that the above
> mentioned changes doesn't make much sense.
>
> I know that the Exynos5433 firmware breaks the defined protocol, but on
> the other hand I can do nothing more than carrying internally those few
> patches out of tree to keep it fully working with 'mainline'.
>
> I've observed the same problem with newer Exynos SoCs, but those so far
> didn't get mainline support (yet), although there have been some
> attempts from the community.
>

There is no such problem on Exynos850 SoC (which I'm trying to
upstream right now), the architectured timer seems to be working fine
there, as is. Or maybe everything is configured properly in
bootloader, not sure. Also I managed to use MCT as a primary
clocksource (for sched_clock, etc) by disabling arch timer in
arch/arm64/kernel/time.c (just for the sake of test), and it works
fine.  So I still would like to have MCT enabled in kernel: this way
we can at least test the driver, as the clocksource can be changed to
MCT via sysfs (or by disabling arch timer in time.c). And for that we
need to at least enable CLKSRC_EXYNOS_MCT in ARCH_EXYNOS.

I guess all your patches (except one you mentioned) from that series
should be fine to apply. Do you mind if I re-send your patch series
(minus one patch) on your behalf? That would spare you some boring
work, and at least minimize your local delta you're carrying.

Thanks!

> Best regards
>
> --
> Marek Szyprowski, PhD
> Samsung R&D Institute Poland
>
Marek Szyprowski Oct. 29, 2021, 1:36 p.m. UTC | #6
On 29.10.2021 15:15, Sam Protsenko wrote:
> On Fri, 29 Oct 2021 at 14:38, Marek Szyprowski <m.szyprowski@samsung.com> wrote:
>> On 28.10.2021 16:35, Krzysztof Kozlowski wrote:
>>> On 28/10/2021 16:22, Sam Protsenko wrote:
>>>> On Tue, 26 Oct 2021 at 17:03, Krzysztof Kozlowski
>>>> <krzysztof.kozlowski@canonical.com> wrote:
>>>>> On 26/10/2021 13:59, Sam Protsenko wrote:
>>>>>> Some ARM64 Exynos SoCs have MCT timer block, e.g. Exynos850 and
>>>>>> Exynos5433. CLKSRC_EXYNOS_MCT option is not visible unless COMPILE_TEST
>>>>>> is enabled. Select CLKSRC_EXYNOS_MCT option for ARM64 ARCH_EXYNOS like
>>>>>> it's done in arch/arm/mach-exynos/Kconfig, to enable MCT timer support
>>>>>> for ARM64 Exynos SoCs.
>>>>>>
>>>>>> Signed-off-by: Sam Protsenko <semen.protsenko@linaro.org>
>>>>>> ---
>>>>>>    arch/arm64/Kconfig.platforms | 1 +
>>>>>>    1 file changed, 1 insertion(+)
>>>>>>
>>>>> +CC Marek, Marc, Mark and Chanwoo,
>>>>> Looks like duplicated:
>>>>> https://lore.kernel.org/lkml/20181018095708.1527-7-m.szyprowski@samsung.com/
>>>>>
>>>>> The topic stalled and I think this particular patch did not make sense
>>>>> on its own, without rest of changes from Marek. I am not sure, though...
>>>>>
>>>> Krzysztof, Marek,
>>>>
>>>> That series looks nice, I'm quite interested in that being applied. Do
>>>> you think I can do something to help with that (e.g. rebasing,
>>>> re-sending on behalf of Marek, testing on Exynos850, etc)?
>>> I think there were no objections against v4 of this patchset, but
>>> somehow it wasn't applied.
>>>
>>> Marek,
>>> Does it make sense to try respinning your v4?
>> I think I've abandoned it, because I got a final NACK on the arch timer
>> change (support for 'not-fw-configured' timers). Without that the above
>> mentioned changes doesn't make much sense.
>>
>> I know that the Exynos5433 firmware breaks the defined protocol, but on
>> the other hand I can do nothing more than carrying internally those few
>> patches out of tree to keep it fully working with 'mainline'.
>>
>> I've observed the same problem with newer Exynos SoCs, but those so far
>> didn't get mainline support (yet), although there have been some
>> attempts from the community.
>>
> There is no such problem on Exynos850 SoC (which I'm trying to
> upstream right now), the architectured timer seems to be working fine
> there, as is. Or maybe everything is configured properly in
> bootloader, not sure. Also I managed to use MCT as a primary
> clocksource (for sched_clock, etc) by disabling arch timer in
> arch/arm64/kernel/time.c (just for the sake of test), and it works
> fine.  So I still would like to have MCT enabled in kernel: this way
> we can at least test the driver, as the clocksource can be changed to
> MCT via sysfs (or by disabling arch timer in time.c). And for that we
> need to at least enable CLKSRC_EXYNOS_MCT in ARCH_EXYNOS.
MCT can be also set as default by changing its rating, like it is done 
under #ifdef CONFIG_ARM.
> I guess all your patches (except one you mentioned) from that series
> should be fine to apply. Do you mind if I re-send your patch series
> (minus one patch) on your behalf? That would spare you some boring
> work, and at least minimize your local delta you're carrying.

Feel free to resend it.

Best regards
Sam Protsenko Nov. 1, 2021, 6:36 p.m. UTC | #7
On Fri, 29 Oct 2021 at 16:36, Marek Szyprowski <m.szyprowski@samsung.com> wrote:
>
> On 29.10.2021 15:15, Sam Protsenko wrote:
> > On Fri, 29 Oct 2021 at 14:38, Marek Szyprowski <m.szyprowski@samsung.com> wrote:
> >> On 28.10.2021 16:35, Krzysztof Kozlowski wrote:
> >>> On 28/10/2021 16:22, Sam Protsenko wrote:
> >>>> On Tue, 26 Oct 2021 at 17:03, Krzysztof Kozlowski
> >>>> <krzysztof.kozlowski@canonical.com> wrote:
> >>>>> On 26/10/2021 13:59, Sam Protsenko wrote:
> >>>>>> Some ARM64 Exynos SoCs have MCT timer block, e.g. Exynos850 and
> >>>>>> Exynos5433. CLKSRC_EXYNOS_MCT option is not visible unless COMPILE_TEST
> >>>>>> is enabled. Select CLKSRC_EXYNOS_MCT option for ARM64 ARCH_EXYNOS like
> >>>>>> it's done in arch/arm/mach-exynos/Kconfig, to enable MCT timer support
> >>>>>> for ARM64 Exynos SoCs.
> >>>>>>
> >>>>>> Signed-off-by: Sam Protsenko <semen.protsenko@linaro.org>
> >>>>>> ---
> >>>>>>    arch/arm64/Kconfig.platforms | 1 +
> >>>>>>    1 file changed, 1 insertion(+)
> >>>>>>
> >>>>> +CC Marek, Marc, Mark and Chanwoo,
> >>>>> Looks like duplicated:
> >>>>> https://lore.kernel.org/lkml/20181018095708.1527-7-m.szyprowski@samsung.com/
> >>>>>
> >>>>> The topic stalled and I think this particular patch did not make sense
> >>>>> on its own, without rest of changes from Marek. I am not sure, though...
> >>>>>
> >>>> Krzysztof, Marek,
> >>>>
> >>>> That series looks nice, I'm quite interested in that being applied. Do
> >>>> you think I can do something to help with that (e.g. rebasing,
> >>>> re-sending on behalf of Marek, testing on Exynos850, etc)?
> >>> I think there were no objections against v4 of this patchset, but
> >>> somehow it wasn't applied.
> >>>
> >>> Marek,
> >>> Does it make sense to try respinning your v4?
> >> I think I've abandoned it, because I got a final NACK on the arch timer
> >> change (support for 'not-fw-configured' timers). Without that the above
> >> mentioned changes doesn't make much sense.
> >>
> >> I know that the Exynos5433 firmware breaks the defined protocol, but on
> >> the other hand I can do nothing more than carrying internally those few
> >> patches out of tree to keep it fully working with 'mainline'.
> >>
> >> I've observed the same problem with newer Exynos SoCs, but those so far
> >> didn't get mainline support (yet), although there have been some
> >> attempts from the community.
> >>
> > There is no such problem on Exynos850 SoC (which I'm trying to
> > upstream right now), the architectured timer seems to be working fine
> > there, as is. Or maybe everything is configured properly in
> > bootloader, not sure. Also I managed to use MCT as a primary
> > clocksource (for sched_clock, etc) by disabling arch timer in
> > arch/arm64/kernel/time.c (just for the sake of test), and it works
> > fine.  So I still would like to have MCT enabled in kernel: this way
> > we can at least test the driver, as the clocksource can be changed to
> > MCT via sysfs (or by disabling arch timer in time.c). And for that we
> > need to at least enable CLKSRC_EXYNOS_MCT in ARCH_EXYNOS.
> MCT can be also set as default by changing its rating, like it is done
> under #ifdef CONFIG_ARM.
> > I guess all your patches (except one you mentioned) from that series
> > should be fine to apply. Do you mind if I re-send your patch series
> > (minus one patch) on your behalf? That would spare you some boring
> > work, and at least minimize your local delta you're carrying.
>
> Feel free to resend it.
>

Thanks! This patch of mine should be ignored then, I'll re-submit
Marek's patches soon.

> Best regards
>
> --
> Marek Szyprowski, PhD
> Samsung R&D Institute Poland
>
diff mbox series

Patch

diff --git a/arch/arm64/Kconfig.platforms b/arch/arm64/Kconfig.platforms
index 1aa8b7073218..7a6ef7883a0b 100644
--- a/arch/arm64/Kconfig.platforms
+++ b/arch/arm64/Kconfig.platforms
@@ -95,6 +95,7 @@  config ARCH_EXYNOS
 	select PINCTRL_EXYNOS
 	select PM_GENERIC_DOMAINS if PM
 	select SOC_SAMSUNG
+	select CLKSRC_EXYNOS_MCT
 	help
 	  This enables support for ARMv8 based Samsung Exynos SoC family.