From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-0.8 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id DB4D1C38A2A for ; Fri, 8 May 2020 10:10:53 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id B2C8D208D6 for ; Fri, 8 May 2020 10:10:53 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726913AbgEHKKx (ORCPT ); Fri, 8 May 2020 06:10:53 -0400 Received: from mout.kundenserver.de ([212.227.126.131]:56515 "EHLO mout.kundenserver.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725825AbgEHKKw (ORCPT ); Fri, 8 May 2020 06:10:52 -0400 Received: from mail-qt1-f181.google.com ([209.85.160.181]) by mrelayeu.kundenserver.de (mreue012 [212.227.15.129]) with ESMTPSA (Nemesis) id 1MjPYI-1irriC0HE2-00kyVw; Fri, 08 May 2020 12:10:50 +0200 Received: by mail-qt1-f181.google.com with SMTP id x12so768596qts.9; Fri, 08 May 2020 03:10:49 -0700 (PDT) X-Gm-Message-State: AGi0PubM1AJMs2SPzyREk1dNDm+Ef132FiQbX3qxneCk/+n8pwUXM/1B /NCWZJreM5ihguzXpz/DaSDEkiNR55Y10MPCzx8= X-Google-Smtp-Source: APiQypIExSSlqA8yisz6W2ZLVMPQ/wADq+SWrAtp8zPZ88mwmRPwDsgp08zt9Fp0MCbGchCGJqbxIfTbLpDmW0GLnAY= X-Received: by 2002:ac8:2bce:: with SMTP id n14mr2162626qtn.18.1588932648766; Fri, 08 May 2020 03:10:48 -0700 (PDT) MIME-Version: 1.0 References: <20200508095914.20509-1-grygorii.strashko@ti.com> In-Reply-To: <20200508095914.20509-1-grygorii.strashko@ti.com> From: Arnd Bergmann Date: Fri, 8 May 2020 12:10:32 +0200 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH net v3] net: ethernet: ti: fix build and remove TI_CPTS_MOD workaround To: Grygorii Strashko Cc: Networking , Tony Lindgren , "David S. Miller" , Russell King , "linux-kernel@vger.kernel.org" , linux-omap , Richard Cochran , Clay McClure , Dan Murphy , Murali Karicheri Content-Type: text/plain; charset="UTF-8" X-Provags-ID: V03:K1:+qrP48GYxWtsysT2SpoHntkSQ4zxwhAWRpqIiuLA9lj+qKiLLvF 7K2NZFCXh9TEslfE98abhA93G+YP2CAYgvW5CQSXWaFhydtbdGyHpZqloKPsSleDbc1ULJL kxfuR9A645lLHahWvsUoOuCJ7UEvM6z/QgJSuNn2HvBukic1DJjfT9ZrzcMyly2EygNY/NB H+BBvitw01j3BDekVWuhA== X-UI-Out-Filterresults: notjunk:1;V03:K0:EPX1zmu9EZs=:b66kWz7wlyXK8CaGzsC5R1 OIJTXQHxeIZjq9yFwdzgGaAYvKFtHDJMCyTkNvM2Z4lGddGAzWjUwuimCudzObZlYmXXd/vEM cj+wcjVNLKTDljX7LhMayi7QgmZOJOqflSlPu8fVkL4iue4+X86SMe7O+fYyEB7orCaXhbtkd ukKIngEA/BB62XP5L+osCwcTnoSsDzYPBVCf5Me4hAVhSi0TX27tl7VfsQD/OG02ZaW7dbrJ9 YZHS0V7S9VWxFRfSDQxUnxTHzrL/MjyNPTzTH3O9fLE5IdXs+OaxbcaaiHSxjDSvpUk+34/di WtIoJfl6VG6EySx7jlI4t5WAC65VC0DlH/7h3cvpK7EtTa4DkfGuE/0O3soZdKT1hZeBl1FaL wDl9qLUVzP7YUNhXO0iMtBeQ8Wt9GQcV7q9eXMbefuB52mAtbvUGY6ASfSpsCp8LhzvBoFV8q zz+XppeWGE2MQHAHscK9mNnRnJ/clKjjfibr2zVgUkaguTNhxuQDGSRMiHXFNxkdtDmUaA2Pz +cNiRJclP/3EUxjK1+9czlk966qDK1gVJcfx/yT+DP/DSa7FPkjik81Cn+99vrsiDR0j/aQnO OYGmLYBeBdnsRxBauMO+yubSuwQ+W94NdX2u8NCK0ypGQTOFdlgv+TMscQUY7slnZjdi1vw7j Q6ixFZ+c9NpkfkMiW85Nv+GmQQKy9GFJ7x8y9x29PmQwNQZOWFhrwVT8f9YiAIimtBumgv+ZG 6jUYkH6h4MznC1xflf0+Vjl4+56yTRma/BaAHqZ80isUc6OkhBPszNGwdmDBUgr7m9dKAlWUi pEkf3zMa+MxDoMVtCGkvkLf7DXcGozFP66hNJBA8I1nnCHXJgU= Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, May 8, 2020 at 11:59 AM Grygorii Strashko wrote: > > From: Clay McClure > > 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 > - use IS_REACHABLE(CONFIG_TI_CPTS) in code instead of IS_ENABLED() I don't understand what IS_REACHABLE() is needed for once all the other changes are in place. I'd hope we can avoid that. Do you still see failures without that or is it just a precaution. I can do some randconfig testing on your patch to see what else might be needed to avoid IS_REACHABLE(). Arnd