mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Cosmin Tanislav <demonsingur@gmail.com>
To: unlisted-recipients:; (no To-header on input)
Cc: Michael Turquette <mturquette@baylibre.com>,
	Stephen Boyd <sboyd@kernel.org>,
	Russell King <linux@armlinux.org.uk>,
	linux-clk@vger.kernel.org, linux-kernel@vger.kernel.org,
	Cosmin Tanislav <demonsingur@gmail.com>
Subject: [RFC PATCH 0/1] CCF 64-bit transition
Date: Tue,  6 Dec 2022 13:28:26 +0200	[thread overview]
Message-ID: <20221206112827.115674-1-demonsingur@gmail.com> (raw)

I sent this as an RFC to get input from the maintainers, since I doubt
this is in a state to be accepted right away and it has not been thoroughly
tested.

Internally, we've been using a simpler way of scaling the clocks for both
providers and consumers, but it doesn't fit too well in the CCF.

Making the switch to 64-bit integers in the CCF would let us upstream more
of our drivers without needing a 64-bit system.

I've thought of some ways to improve this or make the transition easier,
but I need input before moving onto implementing them.

a)

Add a _32 suffix to the old API, and move the clk.h and clk-provider.h
headers to clk-internal.h and clk-provider-internal.h.

Add new clk.h and clk-provider.h headers that include the
clk-internal.h and clk-provider-internal.h header, and use macros to alias
the _32 suffixed API to the old unsuffixed names.

Add new clk-64.h and clk-provider-64.h headers that include the
clk-internal.h and clk-provider-internal.h header, and use macros to alias
the _64 suffixed API to the old unsuffixed names.

Drivers could transition to the 64-bit API by simply swapping the headers
that they include (and, obviously, testing). Code changes will still be
necessary to swap long for u64, but at least the API interaction will be
kept as close as possible.

b)

Introduce a clk_rate_t type. In case we will ever need to change the
definition again, it will be easier. I have no good ideas for a naming
scheme for the new API that will make use of this new type.

Cosmin Tanislav (1):
  clk: core: use 64-bit integers

 drivers/clk/clk.c            | 564 +++++++++++++++++++++++++++--------
 include/linux/clk-provider.h |  90 ++++++
 include/linux/clk.h          |  44 +++
 3 files changed, 578 insertions(+), 120 deletions(-)

-- 
2.38.1


             reply	other threads:[~2022-12-06 11:28 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-12-06 11:28 Cosmin Tanislav [this message]
2022-12-06 11:28 ` [RFC PATCH 1/1] clk: core: use 64-bit integers Cosmin Tanislav

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=20221206112827.115674-1-demonsingur@gmail.com \
    --to=demonsingur@gmail.com \
    --cc=linux-clk@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux@armlinux.org.uk \
    --cc=mturquette@baylibre.com \
    --cc=sboyd@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

all inboxes | Powered by JetHome®