Received: by 2002:a05:7412:37c9:b0:e2:908c:2ebd with SMTP id jz9csp2438352rdb; Thu, 21 Sep 2023 20:39:54 -0700 (PDT) X-Google-Smtp-Source: AGHT+IERhvKSH1IotuFcN2X6xUfF1jO2qhgfmsZ0NgORfVTrnoHtevDNlrtlIWKULgWuAZvMSYAb X-Received: by 2002:a05:6a20:4297:b0:155:2359:2194 with SMTP id o23-20020a056a20429700b0015523592194mr8972888pzj.46.1695353993841; Thu, 21 Sep 2023 20:39:53 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1695353993; cv=none; d=google.com; s=arc-20160816; b=rc515sgA4Yz8yr72bzB242zrB7iqud34hpMocSSMg9seLp+UanqxCBuWj7paHSSoV/ RAarTQIXmB+ZU+6NH2SPci5sa5UDEUUPeJCjyXCvDzfc3oIkDG7vcro9AeKzLwxRJTkx WVbHCAFM1ssekTqSM+2mq7mf5tAzXaMtf0SzzN1yz6vJ7DFO+/SFfI2LaZNcq6+1a9/s ofXsPMRZQBZPWwC3G9o65IsuvIyNdXVxt3ltIhpdICD9XlTUlCJG9Ka8PPM3amBYvdEe h8hs06nASd8NEfgFYx9WfLRCvU5w4pleRprXwDR1NNheP4qnPLhU2IQDs5HfHbNJzHbC kl0w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to:from :references:cc:to:content-language:subject:mime-version:date :dkim-signature:message-id; bh=DUJHN3YfhHAwoXl+1sbrTgWZ/YrCi9D1KruOjj1djMM=; fh=mqIgBY70BL8tWThFG6yXIX8Iz/om9wQcvATacYQ+ouA=; b=DpKKlwPNN/toe3CpAvxrK7zAutT+g9SkEHGGYrwLdO2Vdf7Cl3RlcrSj2OWeGbxbeB 2bou5R+Wtfe5HR9lmFaEn5z9LeQ9EvPrOsyASGp6sJScgZSS2Aa7fS637KKdNZK3gVcF cMAkENcxhbx7yJcoo88pE1le/82Z8TyoHBus0C59ZX9pdRfilv8jCm0a49+jAhaHWAOI 7NJ2naGnZRZrlfb7mR4xSbx5RjjeVE5PcLA6AV9xcX7QdVeD5gF/NN8YgNGM2f6YfP4x OFP3EU6v8Vll41JqnRILIzkLh7w5JhquFluxa9Of2Y2fPoOn934PaP3yjetknwNhVFo0 KHDQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linux.dev header.s=key1 header.b=hz6nVQjK; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.36 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linux.dev Return-Path: Received: from pete.vger.email (pete.vger.email. [23.128.96.36]) by mx.google.com with ESMTPS id ka15-20020a170903334f00b001bef085a37dsi2588951plb.86.2023.09.21.20.39.51 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 21 Sep 2023 20:39:53 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.36 as permitted sender) client-ip=23.128.96.36; Authentication-Results: mx.google.com; dkim=pass header.i=@linux.dev header.s=key1 header.b=hz6nVQjK; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.36 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linux.dev Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by pete.vger.email (Postfix) with ESMTP id 8D21483B5A00; Thu, 21 Sep 2023 16:58:20 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at pete.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229542AbjIUX6S (ORCPT + 99 others); Thu, 21 Sep 2023 19:58:18 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50732 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229477AbjIUX6R (ORCPT ); Thu, 21 Sep 2023 19:58:17 -0400 Received: from out-215.mta0.migadu.com (out-215.mta0.migadu.com [IPv6:2001:41d0:1004:224b::d7]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 3A35FF4 for ; Thu, 21 Sep 2023 16:58:11 -0700 (PDT) Message-ID: DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.dev; s=key1; t=1695340689; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=DUJHN3YfhHAwoXl+1sbrTgWZ/YrCi9D1KruOjj1djMM=; b=hz6nVQjKD0rPC1gxSGbf9AaBCRYE5ubk4LvtwRm0zjPsMz2vq/WYMTr5od3zFykk6d+1/6 uzX2glTAi41cOAgZi4PWHKelE5jD+s8uUQrPiBdLtGF82daQfAXhVUs0MH8MRJCYgIrqr/ JNLU2uUx1IJtzZ+RKW9lit3RmXVObtE= Date: Fri, 22 Sep 2023 00:58:04 +0100 MIME-Version: 1.0 Subject: Re: [PATCH net-next 2/3] ice: fix undefined references from DPLL code when !CONFIG_PTP_1588_CLOCK Content-Language: en-US To: Alexander Lobakin , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Jacob Keller Cc: Tony Nguyen , Richard Cochran , Arkadiusz Kubalewski , Michal Michalik , Milena Olech , intel-wired-lan@lists.osuosl.org, netdev@vger.kernel.org, linux-kernel@vger.kernel.org, kernel test robot References: <20230920180745.1607563-1-aleksander.lobakin@intel.com> <20230920180745.1607563-3-aleksander.lobakin@intel.com> X-Report-Abuse: Please report any abuse attempt to abuse@migadu.com and include these headers. From: Vadim Fedorenko In-Reply-To: <20230920180745.1607563-3-aleksander.lobakin@intel.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Migadu-Flow: FLOW_OUT X-Spam-Status: No, score=-0.8 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on pete.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (pete.vger.email [0.0.0.0]); Thu, 21 Sep 2023 16:58:20 -0700 (PDT) On 20/09/2023 19:07, Alexander Lobakin wrote: > DPLL code in ice unconditionally calls several PTP functions which are > only built when CONFIG_PTP_1588_CLOCK is set. This throws a good bunch > of link errors: > > ERROR: modpost: "ice_cgu_get_pin_name" > [drivers/net/ethernet/intel/ice/ice.ko] undefined! > ERROR: modpost: "ice_get_cgu_state" > [drivers/net/ethernet/intel/ice/ice.ko] undefined! > OR: modpost: "ice_is_cgu_present" > [drivers/net/ethernet/intel/ice/ice.ko] undefined! > ERROR: modpost: "ice_get_cgu_rclk_pin_info" > [drivers/net/ethernet/intel/ice/ice.ko] undefined! > ERROR: modpost: "ice_cgu_get_pin_type" > [drivers/net/ethernet/intel/ice/ice.ko] undefined! > ERROR: modpost: "ice_cgu_get_pin_freq_supp" > [drivers/net/ethernet/intel/ice/ice.ko] undefined! > > ice_dpll_{,de}init() can be only called at runtime when the > corresponding feature flags are set, which is not the case when PTP > support is not compiled. However, the linker has no clue about this. > Compile DPLL code only when CONFIG_PTP_1588_CLOCK is enabled and guard > the mentioned init/deinit function calls, so that ice_dpll.o is only > referred when it gets compiled. > > Note that ideally ice_is_feature_supported() needs to check for > compile-time flags first to be able to handle this without any > additional call guards, and we may want to do that in the future. > There is another fix under review [1], which came from Jacob. It converts the code a bit more, and will create conflicts. I would suggest to drop this patch until another series is fully reviewed. [1] https://lore.kernel.org/netdev/20230921000633.1238097-1-jacob.e.keller@intel.com/