From: "Walter Chang (張維哲)" <Walter.Chang@mediatek.com>
To: "matthias.bgg@gmail.com" <matthias.bgg@gmail.com>,
"sudeep.holla@arm.com" <sudeep.holla@arm.com>,
"angelogioacchino.delregno@collabora.com"
<angelogioacchino.delregno@collabora.com>
Cc: "linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
"linux-mediatek@lists.infradead.org"
<linux-mediatek@lists.infradead.org>,
"jstultz@google.com" <jstultz@google.com>,
"tglx@linutronix.de" <tglx@linutronix.de>,
wsd_upstream <wsd_upstream@mediatek.com>,
"daniel.lezcano@linaro.org" <daniel.lezcano@linaro.org>,
"krzysztof.kozlowski@linaro.org" <krzysztof.kozlowski@linaro.org>,
"Chun-Hung Wu (巫駿宏)" <Chun-hung.Wu@mediatek.com>,
"linux-arm-kernel@lists.infradead.org"
<linux-arm-kernel@lists.infradead.org>,
"Stanley Chu (朱原陞)" <stanley.chu@mediatek.com>,
"macro@orcam.me.uk" <macro@orcam.me.uk>,
"Freddy Hsin (辛恒豐)" <Freddy.Hsin@mediatek.com>
Subject: Re: [PATCH v2 4/4] clocksource/drivers/timer-mediatek: Make timer-mediatek become loadable module
Date: Mon, 10 Apr 2023 06:58:00 +0000 [thread overview]
Message-ID: <8fe596ac0bb77907ffdee70a52d8399eac2c474c.camel@mediatek.com> (raw)
In-Reply-To: <32777456f8e0f98e4cd5b950f421d21f71b149cf.camel@mediatek.com>
On Wed, 2023-03-29 at 14:22 +0800, Walter.Chang wrote:
> First, I'd like to thank Angelo for assisting us in spliting out the
> CPUX driver [1], allowing this driver to become a module that can be
> loaded when needed.
>
> In response to Matthias's concern about whether SYST/GPT on the old
> MediaTek platforms can boot properly with the loadable module, I
> recently conducted a few tests and found that both hardwares are
> capable of booting normally with this loadable module.
>
> For my experiments, I used MT6768 with this patch:
>
> 1. When the module was not loaded or load the module but the
> corresponding compatible property was not specified in the dts, the
> following results were obtained:
>
> # cat /proc/timer_list | grep "Broadcast device" -A 15
> Broadcast device
> Clock Event Device: bc_hrtimer
> max_delta_ns: 9223372036854775807
> min_delta_ns: 1
> mult: 1
> shift: 0
> mode: 3
> next_event: 490204000000 nsecs
> set_next_event: <0000000000000000>
> shutdown: bc_shutdown.cfi_jt
> event_handler: tick_handle_oneshot_broadcast.cfi_jt
> retries: 0
>
> tick_broadcast_mask: ff
> tick_broadcast_oneshot_mask: 7e
>
> The built-in `bc_hrtimer` was used as the broadcast device, whereby
> one
> CPU was kept awake to wake up the other CPUs. As a result, one CPU
> could not enter the idle state.
>
> 2. When the module was loaded and the GPT compatible property was
> specified in the dts:
>
> # cat /proc/timer_list | grep "Broadcast device" -A 17
> Broadcast device
> Clock Event Device: mtk-clkevt
> max_delta_ns: 330382104634
> min_delta_ns: 1000
> mult: 27917287
> shift: 31
> mode: 3
> next_event: 1483221016462 nsecs
> set_next_event: mtk_gpt_clkevt_next_event.cfi_jt
> shutdown: mtk_gpt_clkevt_shutdown.cfi_jt
> periodic: mtk_gpt_clkevt_set_periodic.cfi_jt
> oneshot: mtk_gpt_clkevt_shutdown.cfi_jt
> resume: mtk_gpt_clkevt_shutdown.cfi_jt
> event_handler: tick_handle_oneshot_broadcast.cfi_jt
> retries: 17
>
> tick_broadcast_mask: ff
> tick_broadcast_oneshot_mask: bf
>
> 3. When the module was loaded and the SYST compatible property was
> specified in the dts:
>
> # cat /proc/timer_list | grep "Broadcast device" -A 17
> Broadcast device
> Clock Event Device: mtk-clkevt
> max_delta_ns: 330382104634
> min_delta_ns: 1000
> mult: 27917287
> shift: 31
> mode: 3
> next_event: 132252000000 nsecs
> set_next_event: mtk_syst_clkevt_next_event.cfi_jt
> shutdown: mtk_syst_clkevt_shutdown.cfi_jt
> oneshot: mtk_syst_clkevt_oneshot.cfi_jt
> resume: mtk_syst_clkevt_resume.cfi_jt
> event_handler: tick_handle_oneshot_broadcast.cfi_jt
> retries: 8
>
> tick_broadcast_mask: ff
> tick_broadcast_oneshot_mask: 3f
>
> These two experiments show that SYST/GPT on the old MediaTek
> platforms
> can also work properly with the loadable module, and will not cause
> any
> booting issues. Therefore, making timer-mediatek.c driver into a
> loadable module is feasible.
>
> Thanks,
> Walter Chang
>
> [1]
>
https://lore.kernel.org/lkml/20230309103913.116775-1-angelogioacchino.delregno@collabora.com/
Gentle ping.
Thanks,
Walter Chang
prev parent reply other threads:[~2023-04-10 6:59 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-02-14 10:53 [PATCH v2 0/4] Support timer drivers as loadable modules walter.chang
2023-02-14 10:53 ` [PATCH v2 1/4] time/sched_clock: Export sched_clock_register() walter.chang
2023-02-14 10:53 ` [PATCH v2 2/4] clocksource/drivers/mmio: Export clocksource_mmio_init() walter.chang
2023-02-14 10:53 ` [PATCH v2 3/4] clocksource/drivers/timer-of: Remove __init markings walter.chang
2023-02-14 10:53 ` [PATCH v2 4/4] clocksource/drivers/timer-mediatek: Make timer-mediatek become loadable module walter.chang
2023-02-14 11:09 ` Krzysztof Kozlowski
2023-02-14 23:20 ` John Stultz
2023-02-15 18:35 ` Krzysztof Kozlowski
2023-02-15 20:59 ` John Stultz
2023-02-14 22:20 ` Sudeep Holla
2023-02-15 12:43 ` AngeloGioacchino Del Regno
2023-02-15 13:18 ` Sudeep Holla
2023-02-15 13:30 ` AngeloGioacchino Del Regno
2023-02-15 14:46 ` Sudeep Holla
2023-02-16 1:03 ` John Stultz
2023-02-16 10:22 ` AngeloGioacchino Del Regno
2023-02-16 11:23 ` Matthias Brugger
2023-02-16 11:36 ` AngeloGioacchino Del Regno
2023-03-29 6:22 ` Walter Chang (張維哲)
2023-04-10 6:58 ` Walter Chang (張維哲) [this message]
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=8fe596ac0bb77907ffdee70a52d8399eac2c474c.camel@mediatek.com \
--to=walter.chang@mediatek.com \
--cc=Chun-hung.Wu@mediatek.com \
--cc=Freddy.Hsin@mediatek.com \
--cc=angelogioacchino.delregno@collabora.com \
--cc=daniel.lezcano@linaro.org \
--cc=jstultz@google.com \
--cc=krzysztof.kozlowski@linaro.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mediatek@lists.infradead.org \
--cc=macro@orcam.me.uk \
--cc=matthias.bgg@gmail.com \
--cc=stanley.chu@mediatek.com \
--cc=sudeep.holla@arm.com \
--cc=tglx@linutronix.de \
--cc=wsd_upstream@mediatek.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