[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <34cec699-4d4e-6458-d49a-ae6d572e0a58@intel.com>
Date: Fri, 22 Sep 2023 15:58:43 +0200
From: Alexander Lobakin <aleksander.lobakin@...el.com>
To: Vadim Fedorenko <vadim.fedorenko@...ux.dev>
CC: "David S. Miller" <davem@...emloft.net>,
Eric Dumazet <edumazet@...gle.com>,
Jakub Kicinski <kuba@...nel.org>,
Paolo Abeni <pabeni@...hat.com>,
Jacob Keller <jacob.e.keller@...el.com>,
Tony Nguyen <anthony.l.nguyen@...el.com>,
Richard Cochran <richardcochran@...il.com>,
Arkadiusz Kubalewski <arkadiusz.kubalewski@...el.com>,
Michal Michalik <michal.michalik@...el.com>,
Milena Olech <milena.olech@...el.com>,
<intel-wired-lan@...ts.osuosl.org>, <netdev@...r.kernel.org>,
<linux-kernel@...r.kernel.org>, kernel test robot <lkp@...el.com>
Subject: Re: [PATCH net-next 2/3] ice: fix undefined references from DPLL code
when !CONFIG_PTP_1588_CLOCK
From: Vadim Fedorenko <vadim.fedorenko@...ux.dev>
Date: Fri, 22 Sep 2023 00:58:04 +0100
> 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.
I know, I already explained earlier in this topic that I sent the IDPF
fix separately and that series can be dropped.
>
> [1]
> https://lore.kernel.org/netdev/20230921000633.1238097-1-jacob.e.keller@intel.com/
Thanks,
Olek
Powered by blists - more mailing lists