From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754881AbbCCIzQ (ORCPT ); Tue, 3 Mar 2015 03:55:16 -0500 Received: from down.free-electrons.com ([37.187.137.238]:35985 "EHLO mail.free-electrons.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1751263AbbCCIzO (ORCPT ); Tue, 3 Mar 2015 03:55:14 -0500 Date: Tue, 3 Mar 2015 09:52:04 +0100 From: Maxime Ripard To: Daniel Lezcano Cc: Thomas Gleixner , linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org Subject: Re: [PATCH v2 5/5] clocksource: sun5i: Add clock notifiers Message-ID: <20150303085204.GA4911@lukather> References: <1422265856-27631-1-git-send-email-maxime.ripard@free-electrons.com> <1422265856-27631-6-git-send-email-maxime.ripard@free-electrons.com> <54C62368.7050600@linaro.org> <20150126143541.GG31568@lukather> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="45Z9DzgjV8m4Oswq" Content-Disposition: inline In-Reply-To: <20150126143541.GG31568@lukather> User-Agent: Mutt/1.5.23 (2014-03-12) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org --45Z9DzgjV8m4Oswq Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Mon, Jan 26, 2015 at 03:35:41PM +0100, Maxime Ripard wrote: > > >+static int sun5i_rate_cb_clksrc(struct notifier_block *nb, > > >+ unsigned long event, void *data) > > >+{ > > >+ struct clk_notifier_data *ndata =3D data; > > >+ struct sun5i_timer *timer =3D to_sun5i_timer(nb); > > >+ struct sun5i_timer_clksrc *cs =3D container_of(timer, > > >+ struct sun5i_timer_clksrc, timer); > > >+ > > >+ switch (event) { > > >+ case PRE_RATE_CHANGE: > > >+ clocksource_unregister(&cs->clksrc); > > >+ break; > > >+ > > >+ case POST_RATE_CHANGE: > > >+ clocksource_register_hz(&cs->clksrc, ndata->new_rate); > > >+ break; > >=20 > > Why clocksource_unregister couldn't be in the POST_RATE_CHANGE ? >=20 > Wouldn't that leave a (small, I agree) window where the timer would > run at a rate different to the one it has been registered with? Ping? Maxime --=20 Maxime Ripard, Free Electrons Embedded Linux, Kernel and Android engineering http://free-electrons.com --45Z9DzgjV8m4Oswq Content-Type: application/pgp-signature; name="signature.asc" Content-Description: Digital signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 iQIcBAEBAgAGBQJU9XY0AAoJEBx+YmzsjxAgVjwP/jHxGT7g7ITeOtz2ssW/oATZ CJBLc4n4VojJup3niuA/zepimw2P1k8c7XcnuH+lqAq2rBreKwnwzN0fZTWoCjaA sNnTcbqW77Tmt4/Uu9kfwG801TjQJNoCSGS0KR8Dm3TxVvkiwwkhSC9cq0Uv+p3r euBLpPmqS7Xaa8IWov7hQmDWI6OhWGkk9g//A2dUFC6ERzAdGzRqkgw8JIWCnAfF uDfmDMB8mxMmMGuDBEm98lyD4ERqXUvrMQ3Y/sqIK++3ETRHmGsse8TQbt4tA5sH 5GvX8CbR5wCW7qmI4/6oyL97L1IsaRjq9zbMiOtzWWyrQ/zP137n8AYmshZgjsI7 6U7BxqBxp98ujzIX0tCC8qasVHxRXIV8D008Znce2yLun9/+8qaKKc+JtSU12ePp hgQiLJHlQ7a2ysLol1NTN73wleKYCooGDvq7qDWzTG86swVlGbgTzFh7jh5WXGxI Dwd22/1ki9RW+ww97azdE45eJjB4XciswW4CoGBpjlFGyyCDuyPnZoOjvDDwlaRd 3plS8jHQfCwZHQbdNi9+xBud6aECpDjqf0GLDIMJdp9hU+18pTSzShV5KFba8z8K hkChlUlarwlo1Lde6FGFvxwhN1TPOFHV1w9/0BGm4xeX2cyTahI9kGs3n/JGvcjC TDYjhWZVzn8APxHPnpJ4 =CpCy -----END PGP SIGNATURE----- --45Z9DzgjV8m4Oswq--