From: Thomas Gleixner <tglx@linutronix.de>
To: Jindong Yue <jindong.yue@nxp.com>, fweisbec@gmail.com, mingo@kernel.org
Cc: linux-kernel@vger.kernel.org, jindong.yue@nxp.com
Subject: Re: [PATCH v2] tick/broadcast: Allow later registered device enter oneshot mode
Date: Wed, 31 Mar 2021 10:06:57 +0200 [thread overview]
Message-ID: <87ft0b6926.ffs@nanos.tec.linutronix.de> (raw)
In-Reply-To: <20210331011045.25381-1-jindong.yue@nxp.com>
On Wed, Mar 31 2021 at 09:10, Jindong Yue wrote:
> --- a/kernel/time/tick-broadcast.c
> +++ b/kernel/time/tick-broadcast.c
> @@ -47,6 +47,7 @@ static inline void tick_resume_broadcast_oneshot(struct clock_event_device *bc)
> static inline void tick_broadcast_oneshot_offline(unsigned int cpu) { }
> # endif
> #endif
> +static void tick_handle_oneshot_broadcast(struct clock_event_device *dev);
Leftover ...
> /*
> * Debugging: see timer_list.c
> @@ -107,6 +108,19 @@ void tick_install_broadcast_device(struct clock_event_device *dev)
> tick_broadcast_device.evtdev = dev;
> if (!cpumask_empty(tick_broadcast_mask))
> tick_broadcast_start_periodic(dev);
> +
> + if (!(dev->features & CLOCK_EVT_FEAT_ONESHOT))
> + return;
> +
> + /*
> + * If system already runs in oneshot mode, switch new registered
the system .... the newly registered
> + * broadcast device to oneshot mode explicitly if possiable.
s/possible/possiable/
But the 'if possible' makes no sense here. The above check for
CLOCK_EVT_FEAT_ONESHOT established that it _is_ possible. So just remove
the 'if ...'.
> + */
> + if (tick_broadcast_oneshot_active()) {
> + tick_broadcast_switch_to_oneshot();
> + return;
> + }
Thanks,
tglx
next prev parent reply other threads:[~2021-03-31 8:07 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-03-31 1:10 [PATCH v2] tick/broadcast: Allow later registered device enter oneshot mode Jindong Yue
2021-03-31 8:06 ` Thomas Gleixner [this message]
2021-03-31 8:36 ` [EXT] " J.d. Yue
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=87ft0b6926.ffs@nanos.tec.linutronix.de \
--to=tglx@linutronix.de \
--cc=fweisbec@gmail.com \
--cc=jindong.yue@nxp.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@kernel.org \
/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