Linux-OMAP Archive on lore.kernel.org
 help / color / Atom feed
From: David Miller <davem@davemloft.net>
To: grygorii.strashko@ti.com
Cc: arnd@arndb.de, netdev@vger.kernel.org, tony@atomide.com,
	linux@armlinux.org.uk, linux-kernel@vger.kernel.org,
	linux-omap@vger.kernel.org, clay@daemons.net, dmurphy@ti.com
Subject: Re: [PATCH net v4] net: ethernet: ti: Remove TI_CPTS_MOD workaround
Date: Tue, 12 May 2020 12:35:12 -0700 (PDT)
Message-ID: <20200512.123512.1831107664735178245.davem@davemloft.net> (raw)
In-Reply-To: <20200512100230.17752-1-grygorii.strashko@ti.com>

From: Grygorii Strashko <grygorii.strashko@ti.com>
Date: Tue, 12 May 2020 13:02:30 +0300

> From: Clay McClure <clay@daemons.net>
> 
> My recent commit b6d49cab44b5 ("net: Make PTP-specific drivers depend on
> PTP_1588_CLOCK") exposes a missing dependency in defconfigs that select
> TI_CPTS without selecting PTP_1588_CLOCK, leading to linker errors of the
> form:
> 
> drivers/net/ethernet/ti/cpsw.o: in function `cpsw_ndo_stop':
> cpsw.c:(.text+0x680): undefined reference to `cpts_unregister'
>  ...
> 
> That's because TI_CPTS_MOD (which is the symbol gating the _compilation_ of
> cpts.c) now depends on PTP_1588_CLOCK, and so is not enabled in these
> configurations, but TI_CPTS (which is the symbol gating _calls_ to the cpts
> functions) _is_ enabled. So we end up compiling calls to functions that
> don't exist, resulting in the linker errors.
> 
> This patch fixes build errors and restores previous behavior by:
>  - ensure PTP_1588_CLOCK=y in TI specific configs and CPTS will be built
>  - remove TI_CPTS_MOD and, instead, add dependencies from CPTS in
>    TI_CPSW/TI_KEYSTONE_NETCP/TI_CPSW_SWITCHDEV as below:
> 
>    config TI_CPSW_SWITCHDEV
>    ...
>     depends on TI_CPTS || !TI_CPTS
> 
>    which will ensure proper dependencies PTP_1588_CLOCK -> TI_CPTS ->
> TI_CPSW/TI_KEYSTONE_NETCP/TI_CPSW_SWITCHDEV and build type selection.
> 
> Note. For NFS boot + CPTS all of above configs have to be built-in.
> 
> Cc: Arnd Bergmann <arnd@arndb.de>
> Cc: Dan Murphy <dmurphy@ti.com>
> Cc: Tony Lindgren <tony@atomide.com>
> Fixes: b6d49cab44b5 ("net: Make PTP-specific drivers depend on PTP_1588_CLOCK")
> Reported-by: kbuild test robot <lkp@intel.com>
> Signed-off-by: Clay McClure <clay@daemons.net>
> [grygorii.strashko@ti.com: rewording, add deps cpsw/netcp from cpts, drop IS_REACHABLE]
> Signed-off-by: Grygorii Strashko <grygorii.strashko@ti.com>

Applied, thanks.

      parent reply index

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-05-12 10:02 Grygorii Strashko
2020-05-12 10:08 ` Arnd Bergmann
2020-05-12 14:22 ` Tony Lindgren
2020-05-12 14:34   ` Grygorii Strashko
2020-05-12 14:50     ` Tony Lindgren
2020-05-12 19:35 ` David Miller [this message]

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=20200512.123512.1831107664735178245.davem@davemloft.net \
    --to=davem@davemloft.net \
    --cc=arnd@arndb.de \
    --cc=clay@daemons.net \
    --cc=dmurphy@ti.com \
    --cc=grygorii.strashko@ti.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-omap@vger.kernel.org \
    --cc=linux@armlinux.org.uk \
    --cc=netdev@vger.kernel.org \
    --cc=tony@atomide.com \
    /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

Linux-OMAP Archive on lore.kernel.org

Archives are clonable:
	git clone --mirror https://lore.kernel.org/linux-omap/0 linux-omap/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 linux-omap linux-omap/ https://lore.kernel.org/linux-omap \
		linux-omap@vger.kernel.org
	public-inbox-index linux-omap

Example config snippet for mirrors

Newsgroup available over NNTP:
	nntp://nntp.lore.kernel.org/org.kernel.vger.linux-omap


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git