linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Greg Ungerer <gerg@linux-m68k.org>
To: Arnd Bergmann <arnd@arndb.de>, Stephen Boyd <sboyd@kernel.org>
Cc: Michael Turquette <mturquette@baylibre.com>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	linux-clk <linux-clk@vger.kernel.org>,
	Mark Brown <broonie@kernel.org>,
	Geert Uytterhoeven <geert@linux-m68k.org>,
	Mark Salter <msalter@redhat.com>,
	Aurelien Jacquiot <jacquiot.aurelien@gmail.com>,
	Jiaxun Yang <jiaxun.yang@flygoat.com>,
	Guan Xuetao <gxt@pku.edu.cn>,
	Russell King <linux@armlinux.org.uk>,
	Yoshinori Sato <ysato@users.sourceforge.jp>,
	Rich Felker <dalias@libc.org>,
	Thomas Bogendoerfer <tsbogend@alpha.franken.de>,
	"open list:BROADCOM NVRAM DRIVER" <linux-mips@vger.kernel.org>,
	linux-c6x-dev@linux-c6x.org,
	linux-m68k <linux-m68k@lists.linux-m68k.org>,
	Linux ARM <linux-arm-kernel@lists.infradead.org>,
	Linux-sh list <linux-sh@vger.kernel.org>
Subject: Re: [PATCH 6/9] clk: Allow the common clk framework to be selectable
Date: Tue, 7 Apr 2020 14:57:39 +1000	[thread overview]
Message-ID: <8a2a142a-106a-4241-fca5-5ef12e66cd41@linux-m68k.org> (raw)
In-Reply-To: <CAK8P3a3Yt2woG2LMcQ0jNPGuHdMtFbBmLvtBbrWFQ4J6x3v9aQ@mail.gmail.com>

Hi Arnd, Stephen

On 6/4/20 5:35 pm, Arnd Bergmann wrote:
> On Mon, Apr 6, 2020 at 5:01 AM Stephen Boyd <sboyd@kernel.org> wrote:
>> Quoting Arnd Bergmann (2020-04-05 05:45:20)
>>> On Sun, Apr 5, 2020 at 4:51 AM Stephen Boyd <sboyd@kernel.org> wrote:
>>>> There's one snag with doing this, and that's making sure that randconfig
>>>> builds don't select this option when some architecture or platform
>>>> implements 'struct clk' outside of the common clk framework. Introduce a
>>>> new config option 'HAVE_LEGACY_CLK' to indicate those platforms that
>>>> haven't migrated to the common clk framework and therefore shouldn't be
>>>> allowed to select this new config option. Also add a note that we hope
>>>> one day to remove this config entirely.
>>>
>>> Good idea!
>>>
>>> I've looked through the individual ones and commented a bit on
>>> what I think may or may not happen with them.
>>>
>>> ralink SOC_MT7621 is the only one that I think you got wrong,
>>> as it already has common-clk support.
>>
>> Ah I missed that it was inside a big if RALINK. Thanks. I suppose I
>> should just remove the select then for that config and not worry about
>> the duplication of clkdev and common clk configs.
> 
> Won't that cause build failures in those configurations that have
> both implementations?
> 
> According to the Makefile, the clk.c file is built whenever CONFIG_MIPS_GIC
> is unset, so I think we need
> 
>           select HAVE_LEGACY_CLK if !MIPS_GIC
> 
> or maybe move the select into the per-chip configs that need it:
> RT288X, RT305X, RT3883, and MT7620.
> 
>>>> diff --git a/arch/m68k/Kconfig.cpu b/arch/m68k/Kconfig.cpu
>>>> index 60ac1cd8b96f..bd2d29c22a10 100644
>>>> --- a/arch/m68k/Kconfig.cpu
>>>> +++ b/arch/m68k/Kconfig.cpu
>>>
>>>     text    data     bss     dec     hex filename
>>> 1934726 263616   83284 2281626 22d09a obj/vmlinux-before
>>> 1971989 266192   83308 2321489 236c51 obj/vmlinux-after
>>>
>>> The coldfire clock implementation looks rather simple compared
>>> to chips from the 2010s: most chips have only fixed clocks,
>>> and three of them have one of two registers of clock gates.
>>>
>>> It shouldn't be hard to convert, but enabling common-clk will
>>> cause a noticeable kernel size increase on the fairly limited
>>> hardware.
>>>
>>> Simply enabling COMMON_CLK in m5475evb_defconfig
>>> results in a 1.7% or 40KB growth in kernel size, plus there
>>> would be additional dynamic memory usage:
>> There could certainly be some work done to reduce the code size of the
>> CCF. I haven't looked but perhaps we could save some memory by making
>> the basic types selectable too and then push a bunch of kconfig updates
>> through for that.
> 
> Right, that might help. Another possibility would be to support both
> the common clk layer and the custom clk implementation on coldfire
> until we remove the other custom implementations, by which point
> even fewer people will care about coldfire.
> 
> Let's see what Geert and Greg think would be the best path for coldfire,
> maybe the added 40KB is less of a problem after all.

Losing another 40k is not ideal, but not the end of the world.
It would not stop me running it on any platforms I regularly
run on. For sure some of the really old hardware just doesn't
have the RAM to spare.

Any way, I say we have to move forward and and move to using
the common clock framework for ColdFire sooner than later.

Regards
Greg


  reply	other threads:[~2020-04-07  5:07 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-04-05  2:51 [PATCH 0/9] Allow COMMON_CLK to be selectable Stephen Boyd
2020-04-05  2:51 ` [PATCH 1/9] ARM: Remove redundant COMMON_CLK selects Stephen Boyd
2020-04-05  6:20   ` Manivannan Sadhasivam
2020-04-06 11:03   ` Andreas Färber
2020-04-05  2:51 ` [PATCH 2/9] ARM: Remove redundant CLKDEV_LOOKUP selects Stephen Boyd
2020-04-05  2:51 ` [PATCH 3/9] arm64: tegra: " Stephen Boyd
2020-04-06  9:12   ` Thierry Reding
2020-04-05  2:51 ` [PATCH 4/9] h8300: " Stephen Boyd
2020-04-05  2:51 ` [PATCH 5/9] MIPS: " Stephen Boyd
2020-04-05  2:51 ` [PATCH 6/9] clk: Allow the common clk framework to be selectable Stephen Boyd
2020-04-05 12:45   ` Arnd Bergmann
     [not found]     ` <158614207114.88454.6776609424163493475@swboyd.mtv.corp.google.com>
2020-04-06  7:35       ` Arnd Bergmann
2020-04-07  4:57         ` Greg Ungerer [this message]
2020-04-07  7:07           ` Geert Uytterhoeven
2020-04-05 14:27   ` kbuild test robot
2020-04-05  2:51 ` [PATCH 7/9] ARM: mmp: Remove legacy clk code Stephen Boyd
2020-04-05  2:51 ` [PATCH 8/9] MIPS: Loongson64: Drop asm/clock.h include Stephen Boyd
2020-04-05  2:51 ` [PATCH 9/9] clk: Move HAVE_CLK config out of architecture layer Stephen Boyd

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=8a2a142a-106a-4241-fca5-5ef12e66cd41@linux-m68k.org \
    --to=gerg@linux-m68k.org \
    --cc=arnd@arndb.de \
    --cc=broonie@kernel.org \
    --cc=dalias@libc.org \
    --cc=geert@linux-m68k.org \
    --cc=gxt@pku.edu.cn \
    --cc=jacquiot.aurelien@gmail.com \
    --cc=jiaxun.yang@flygoat.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-c6x-dev@linux-c6x.org \
    --cc=linux-clk@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-m68k@lists.linux-m68k.org \
    --cc=linux-mips@vger.kernel.org \
    --cc=linux-sh@vger.kernel.org \
    --cc=linux@armlinux.org.uk \
    --cc=msalter@redhat.com \
    --cc=mturquette@baylibre.com \
    --cc=sboyd@kernel.org \
    --cc=tsbogend@alpha.franken.de \
    --cc=ysato@users.sourceforge.jp \
    /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;
as well as URLs for NNTP newsgroup(s).