All of lore.kernel.org
 help / color / mirror / Atom feed
From: Maxime Ripard <maxime.ripard@free-electrons.com>
To: Arnd Bergmann <arnd@arndb.de>
Cc: Stephen Boyd <sboyd@codeaurora.org>, Chen-Yu Tsai <wens@csie.org>,
	Michael Turquette <mturquette@baylibre.com>,
	Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
	Tobias Regnery <tobias.regnery@gmail.com>,
	linux-clk@vger.kernel.org,
	Linux ARM <linux-arm-kernel@lists.infradead.org>,
	Icenowy Zheng <icenowy@aosc.io>
Subject: Re: [PATCH] clk: sunxi-ng: select SUNXI_CCU_MULT for sun8i-a83t
Date: Fri, 2 Jun 2017 14:15:32 +0200	[thread overview]
Message-ID: <20170602121532.glfjkxp333ynvcwm@flea.lan> (raw)
In-Reply-To: <CAK8P3a2-hoVKFOr455ZseM4UrmHGFXTE7VbXpSd2Jdp7rnrKyA@mail.gmail.com>

[-- Attachment #1: Type: text/plain, Size: 1643 bytes --]

On Thu, Jun 01, 2017 at 11:07:46AM +0200, Arnd Bergmann wrote:
> On Thu, Jun 1, 2017 at 9:17 AM, Stephen Boyd <sboyd@codeaurora.org> wrote:
> > On 05/23, Arnd Bergmann wrote:
> >> On Tue, May 23, 2017 at 9:19 AM, Chen-Yu Tsai <wens@csie.org> wrote:
> >> An alternative would be to remove all the dependencies as 'lib-y'
> >> in the Makefile and remove the individual Kconfig symbols. That
> >> way, we would always build all of them when CONFIG_SUNXI_CCU
> >> is enabled, but the linker would drop the ones that do not get
> >> referenced.
> >
> > In this case you're right, and we should change them to lib-y in
> > the Makefile and then let the linker figure this all out. No more
> > dependency patches. I think we only need to do this sort of
> > Kconfig stuff when we want to make a library .ko file that each
> > SoC specific driver depends on for common code.
> >
> > It would be cool if the build system could figure that all out
> > for us, and let us have something like modlib-y that makes it a
> > library (archive) if all objects depending on it are builtin and
> > we have CONFIG_MODULES=n, or makes it into an object file if
> > something is builtin that depends on it, or makes it into a
> > module if everything that depends on it is a module.
> 
> In this case, there are no loadable modules, the sunxi clk drivers
> can only be built-in, which should simplify the problem a lot.

Using the linker to drop the useless stuff seems like a good idea. Do
you want to send a patch for it?

Maxim

-- 
Maxime Ripard, Free Electrons
Embedded Linux and Kernel engineering
http://free-electrons.com

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 801 bytes --]

WARNING: multiple messages have this Message-ID (diff)
From: maxime.ripard@free-electrons.com (Maxime Ripard)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH] clk: sunxi-ng: select SUNXI_CCU_MULT for sun8i-a83t
Date: Fri, 2 Jun 2017 14:15:32 +0200	[thread overview]
Message-ID: <20170602121532.glfjkxp333ynvcwm@flea.lan> (raw)
In-Reply-To: <CAK8P3a2-hoVKFOr455ZseM4UrmHGFXTE7VbXpSd2Jdp7rnrKyA@mail.gmail.com>

On Thu, Jun 01, 2017 at 11:07:46AM +0200, Arnd Bergmann wrote:
> On Thu, Jun 1, 2017 at 9:17 AM, Stephen Boyd <sboyd@codeaurora.org> wrote:
> > On 05/23, Arnd Bergmann wrote:
> >> On Tue, May 23, 2017 at 9:19 AM, Chen-Yu Tsai <wens@csie.org> wrote:
> >> An alternative would be to remove all the dependencies as 'lib-y'
> >> in the Makefile and remove the individual Kconfig symbols. That
> >> way, we would always build all of them when CONFIG_SUNXI_CCU
> >> is enabled, but the linker would drop the ones that do not get
> >> referenced.
> >
> > In this case you're right, and we should change them to lib-y in
> > the Makefile and then let the linker figure this all out. No more
> > dependency patches. I think we only need to do this sort of
> > Kconfig stuff when we want to make a library .ko file that each
> > SoC specific driver depends on for common code.
> >
> > It would be cool if the build system could figure that all out
> > for us, and let us have something like modlib-y that makes it a
> > library (archive) if all objects depending on it are builtin and
> > we have CONFIG_MODULES=n, or makes it into an object file if
> > something is builtin that depends on it, or makes it into a
> > module if everything that depends on it is a module.
> 
> In this case, there are no loadable modules, the sunxi clk drivers
> can only be built-in, which should simplify the problem a lot.

Using the linker to drop the useless stuff seems like a good idea. Do
you want to send a patch for it?

Maxim

-- 
Maxime Ripard, Free Electrons
Embedded Linux and Kernel engineering
http://free-electrons.com
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 801 bytes
Desc: not available
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20170602/4dd131fe/attachment.sig>

  reply	other threads:[~2017-06-02 12:16 UTC|newest]

Thread overview: 34+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-05-22 20:29 [PATCH] clk: sunxi-ng: select SUNXI_CCU_MULT for sun8i-a83t Arnd Bergmann
2017-05-22 20:29 ` Arnd Bergmann
2017-05-23  0:55 ` Stephen Boyd
2017-05-23  0:55   ` Stephen Boyd
2017-05-23  7:19   ` Chen-Yu Tsai
2017-05-23  7:19     ` Chen-Yu Tsai
2017-05-23  7:54     ` Arnd Bergmann
2017-05-23  7:54       ` Arnd Bergmann
2017-06-01  7:17       ` Stephen Boyd
2017-06-01  7:17         ` Stephen Boyd
2017-06-01  9:07         ` Arnd Bergmann
2017-06-01  9:07           ` Arnd Bergmann
2017-06-02 12:15           ` Maxime Ripard [this message]
2017-06-02 12:15             ` Maxime Ripard
2017-06-02 22:30             ` [PATCH] clk: sunxi-ng: Move all clock types to a library Stephen Boyd
2017-06-02 22:30               ` Stephen Boyd
2017-06-03  4:22               ` kbuild test robot
2017-06-03  4:22                 ` kbuild test robot
2017-06-05 14:45                 ` Maxime Ripard
2017-06-05 14:45                   ` Maxime Ripard
2017-06-06 10:04                   ` Arnd Bergmann
2017-06-06 10:04                     ` Arnd Bergmann
2017-06-06 22:08                     ` Stephen Boyd
2017-06-06 22:08                       ` Stephen Boyd
2017-06-07  5:45                     ` Chen-Yu Tsai
2017-06-07  5:45                       ` Chen-Yu Tsai
2017-06-07  7:36                       ` Arnd Bergmann
2017-06-07  7:36                         ` Arnd Bergmann
2017-06-07  8:17                         ` Maxime Ripard
2017-06-07  8:17                           ` Maxime Ripard
2017-06-08  1:46                           ` Masahiro Yamada
2017-06-08  1:46                             ` Masahiro Yamada
2017-05-23  7:31 ` [PATCH] clk: sunxi-ng: select SUNXI_CCU_MULT for sun8i-a83t Chen-Yu Tsai
2017-05-23  7:31   ` Chen-Yu Tsai

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=20170602121532.glfjkxp333ynvcwm@flea.lan \
    --to=maxime.ripard@free-electrons.com \
    --cc=arnd@arndb.de \
    --cc=icenowy@aosc.io \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-clk@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mturquette@baylibre.com \
    --cc=sboyd@codeaurora.org \
    --cc=tobias.regnery@gmail.com \
    --cc=wens@csie.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 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.