All of lore.kernel.org
 help / color / mirror / Atom feed
* [RFC PATCH 0/1] CCF 64-bit transition
@ 2022-12-06 11:28 Cosmin Tanislav
  2022-12-06 11:28 ` [RFC PATCH 1/1] clk: core: use 64-bit integers Cosmin Tanislav
  0 siblings, 1 reply; 5+ messages in thread
From: Cosmin Tanislav @ 2022-12-06 11:28 UTC (permalink / raw)
  Cc: Michael Turquette, Stephen Boyd, Russell King, linux-clk,
	linux-kernel, Cosmin Tanislav

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


^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2022-12-06 15:46 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-12-06 11:28 [RFC PATCH 0/1] CCF 64-bit transition Cosmin Tanislav
2022-12-06 11:28 ` [RFC PATCH 1/1] clk: core: use 64-bit integers Cosmin Tanislav
2022-12-06 14:04   ` kernel test robot
2022-12-06 15:46   ` kernel test robot
2022-12-06 15:46   ` kernel test robot

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.