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=-12.3 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH, MAILING_LIST_MULTI,NICE_REPLY_A,SPF_HELO_NONE,SPF_PASS,USER_AGENT_SANE_1 autolearn=ham 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 66C3CC433B4 for ; Fri, 7 May 2021 01:12:35 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 3EBAF610F7 for ; Fri, 7 May 2021 01:12:35 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232696AbhEGBNd (ORCPT ); Thu, 6 May 2021 21:13:33 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49552 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230387AbhEGBNc (ORCPT ); Thu, 6 May 2021 21:13:32 -0400 Received: from bombadil.infradead.org (bombadil.infradead.org [IPv6:2607:7c80:54:e::133]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 1D201C061574 for ; Thu, 6 May 2021 18:12:33 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=bombadil.20210309; h=Content-Transfer-Encoding: Content-Type:In-Reply-To:MIME-Version:Date:Message-ID:From:References:Cc:To: Subject:Sender:Reply-To:Content-ID:Content-Description; bh=H1+2Au4eTrCAsPR/EJWV6bjuH3gIAlPhqBBCAVMazAM=; b=h3vTc+NvlYn9/R0dpHf/8jBQhr WtdMhPUcft8BVY7FaoY01m/oF87TMGhhV1iLdAUxfXph4JB4GS4YHRX46t/BNVUacgd02BQRfh1s/ XYPyqT0hOHkjqT4YP6EjBdKIcDd00kmigjhU4ip+HoYs2QVJyxh6O5xrYZTgzlWG740dmbkMyycNN PjuXF+yfFaxWWRx8hUIbT0+pAwzTedgz6lWAwuIeKhTae9C2DWs9Ueqdg9IMkfq9QS9zyP29wMus/ BX5t4iWpU759LMggY5cFZBnRDMfo0vxIeJY7vA3TXUbqLke8Ze2fRcWiPtUdDN2QTcQeHH3XMgIAd QmEuFOWw==; Received: from [2601:1c0:6280:3f0::7376] by bombadil.infradead.org with esmtpsa (Exim 4.94 #2 (Red Hat Linux)) id 1lep2d-006V98-5E; Fri, 07 May 2021 01:12:31 +0000 Subject: Re: [PATCH v3 net] ionic: fix ptp support config breakage To: Shannon Nelson , Jakub Kicinski Cc: netdev@vger.kernel.org, davem@davemloft.net, drivers@pensando.io, Allen Hubbe References: <20210506041846.62502-1-snelson@pensando.io> <20210506171529.0d95c9da@kicinski-fedora-pc1c0hjn.dhcp.thefacebook.com> From: Randy Dunlap Message-ID: <4e831e77-0688-f3a9-1202-76f88230c7a8@infradead.org> Date: Thu, 6 May 2021 18:12:29 -0700 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.9.1 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org On 5/6/21 5:48 PM, Shannon Nelson wrote: > On 5/6/21 5:21 PM, Randy Dunlap wrote: >> On 5/6/21 5:15 PM, Jakub Kicinski wrote: >>> On Wed,  5 May 2021 21:18:46 -0700 Shannon Nelson wrote: >>>> Driver link failed with undefined references in some >>>> kernel config variations. >>> This is really vague and the patch is not very obvious. >>> >>>>   ionic-y := ionic_main.o ionic_bus_pci.o ionic_devlink.o ionic_dev.o \ >>>>          ionic_debugfs.o ionic_lif.o ionic_rx_filter.o ionic_ethtool.o \ >>>> -       ionic_txrx.o ionic_stats.o ionic_fw.o >>>> -ionic-$(CONFIG_PTP_1588_CLOCK) += ionic_phc.o >>>> +       ionic_txrx.o ionic_stats.o ionic_fw.o ionic_phc.o >>> So we'd replace a build dependency.. >>> >>>> diff --git a/drivers/net/ethernet/pensando/ionic/ionic_phc.c b/drivers/net/ethernet/pensando/ionic/ionic_phc.c >>>> index a87c87e86aef..30c78808c45a 100644 >>>> --- a/drivers/net/ethernet/pensando/ionic/ionic_phc.c >>>> +++ b/drivers/net/ethernet/pensando/ionic/ionic_phc.c >>>> @@ -1,6 +1,8 @@ >>>>   // SPDX-License-Identifier: GPL-2.0 >>>>   /* Copyright(c) 2017 - 2021 Pensando Systems, Inc */ >>>>   +#if IS_ENABLED(CONFIG_PTP_1588_CLOCK) >>>> + >>>>   #include >>>>   #include >>>>   @@ -613,3 +615,4 @@ void ionic_lif_free_phc(struct ionic_lif *lif) >>>>       devm_kfree(lif->ionic->dev, lif->phc); >>>>       lif->phc = NULL; >>>>   } >>>> +#endif /* IS_ENABLED(CONFIG_PTP_1588_CLOCK) */ >>> .. with an ifdef around an entire file? Does not feel very clean. >>> >>> The construct of using: >>> >>>     drv-$(CONFIG_PTP_1588_CLOCK) += ptp.o >>> >>> seems relatively common, why does it now work here? >>> >>> Maybe the config in question has PTP as a module and ionic built in? >>> Then you should add depends on PTP_1588_CLOCK || !PTP_1588_CLOCK. >>> >>> Maybe somehow the "ionic-y" confuses kbuild and it should be ionic-objs? >>> >>> At the very least we need a better explanation in the commit message. >>> >> I'll take a look if someone can point me to the .config file. >> > > These are the notes I got from kernel test robot: > https://lore.kernel.org/lkml/202105041020.efEaBOYC-lkp@intel.com/ > https://lore.kernel.org/lkml/202105041154.GrLZmjGh-lkp@intel.com/ > https://lore.kernel.org/lkml/202105041634.paURyDp0-lkp@intel.com/ > https://lore.kernel.org/lkml/202105050636.UXXDl7m2-lkp@intel.com/ At first glance it looks like Jakub's suggestion of >>> Maybe the config in question has PTP as a module and ionic built in? >>> Then you should add depends on PTP_1588_CLOCK || !PTP_1588_CLOCK. is what is needed, but I'm still doing build testing ATM. -- ~Randy