linux-next: build failure after merge of the net-next tree

Stephen Rothwell posted 1 patch 3 weeks, 4 days ago
drivers/net/ethernet/broadcom/bnxt/bnxt_ptp.c | 4 ++++
1 file changed, 4 insertions(+)
linux-next: build failure after merge of the net-next tree
Posted by Stephen Rothwell 3 weeks, 4 days ago
Hi all,

After merging the net-next tree, today's linux-next build (powerpc
allyesconfig) failed like this:

drivers/net/ethernet/broadcom/bnxt/bnxt_ptp.c: In function 'bnxt_ptp_init':
drivers/net/ethernet/broadcom/bnxt/bnxt_ptp.c:1141:13: error: implicit declaration of function 'boot_cpu_has'; did you mean 'boot_cpu_init'? [-Wimplicit-function-declaration]
 1141 |             boot_cpu_has(X86_FEATURE_ART))
      |             ^~~~~~~~~~~~
      |             boot_cpu_init
drivers/net/ethernet/broadcom/bnxt/bnxt_ptp.c:1141:26: error: 'X86_FEATURE_ART' undeclared (first use in this function); did you mean 'X86_FEATURE_ANY'?
 1141 |             boot_cpu_has(X86_FEATURE_ART))
      |                          ^~~~~~~~~~~~~~~
      |                          X86_FEATURE_ANY
drivers/net/ethernet/broadcom/bnxt/bnxt_ptp.c:1141:26: note: each undeclared identifier is reported only once for each function it appears in

Caused by commit

  c470195b989f ("bnxt_en: Add PTP .getcrosststamp() interface to get device/host times")

boot_cpu_has() only exists for X86 ...

I have applied the folloring hack for today:

From: Stephen Rothwell <sfr@canb.auug.org.au>
Date: Tue, 13 Jan 2026 16:51:58 +1100
Subject: [PATCH] fix up for "bnxt_en: Add PTP .getcrosststamp() interface to
 get device/host times"

Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
---
 drivers/net/ethernet/broadcom/bnxt/bnxt_ptp.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/drivers/net/ethernet/broadcom/bnxt/bnxt_ptp.c b/drivers/net/ethernet/broadcom/bnxt/bnxt_ptp.c
index 75ad385f5f79..20f5a9f38fee 100644
--- a/drivers/net/ethernet/broadcom/bnxt/bnxt_ptp.c
+++ b/drivers/net/ethernet/broadcom/bnxt/bnxt_ptp.c
@@ -882,6 +882,7 @@ void bnxt_tx_ts_cmp(struct bnxt *bp, struct bnxt_napi *bnapi,
 	}
 }
 
+#ifdef X86_FEATURE_ART
 static int bnxt_phc_get_syncdevicetime(ktime_t *device,
 				       struct system_counterval_t *system,
 				       void *ctx)
@@ -924,6 +925,7 @@ static int bnxt_ptp_getcrosststamp(struct ptp_clock_info *ptp_info,
 	return get_device_system_crosststamp(bnxt_phc_get_syncdevicetime,
 					     ptp, NULL, xtstamp);
 }
+#endif
 
 static const struct ptp_clock_info bnxt_ptp_caps = {
 	.owner		= THIS_MODULE,
@@ -1137,9 +1139,11 @@ int bnxt_ptp_init(struct bnxt *bp)
 		if (bnxt_ptp_pps_init(bp))
 			netdev_err(bp->dev, "1pps not initialized, continuing without 1pps support\n");
 	}
+#ifdef X86_FEATURE_ART
 	if ((bp->fw_cap & BNXT_FW_CAP_PTP_PTM) && pcie_ptm_enabled(bp->pdev) &&
 	    boot_cpu_has(X86_FEATURE_ART))
 		ptp->ptp_info.getcrosststamp = bnxt_ptp_getcrosststamp;
+#endif
 
 	ptp->ptp_clock = ptp_clock_register(&ptp->ptp_info, &bp->pdev->dev);
 	if (IS_ERR(ptp->ptp_clock)) {
-- 
2.52.0



-- 
Cheers,
Stephen Rothwell
Re: linux-next: build failure after merge of the net-next tree
Posted by Pavan Chebbi 3 weeks, 4 days ago
On Tue, Jan 13, 2026 at 11:46 AM Stephen Rothwell <sfr@canb.auug.org.au> wrote:
>
> Hi all,
>
> After merging the net-next tree, today's linux-next build (powerpc
> allyesconfig) failed like this:

Thanks for the report. Yes, kernel test robot also reported it. We
will send a patch fixing it ASAP.

>
> drivers/net/ethernet/broadcom/bnxt/bnxt_ptp.c: In function 'bnxt_ptp_init':
> drivers/net/ethernet/broadcom/bnxt/bnxt_ptp.c:1141:13: error: implicit declaration of function 'boot_cpu_has'; did you mean 'boot_cpu_init'? [-Wimplicit-function-declaration]
>  1141 |             boot_cpu_has(X86_FEATURE_ART))
>       |             ^~~~~~~~~~~~
>       |             boot_cpu_init
> drivers/net/ethernet/broadcom/bnxt/bnxt_ptp.c:1141:26: error: 'X86_FEATURE_ART' undeclared (first use in this function); did you mean 'X86_FEATURE_ANY'?
>  1141 |             boot_cpu_has(X86_FEATURE_ART))
>       |                          ^~~~~~~~~~~~~~~
>       |                          X86_FEATURE_ANY
> drivers/net/ethernet/broadcom/bnxt/bnxt_ptp.c:1141:26: note: each undeclared identifier is reported only once for each function it appears in
>
> Caused by commit
>
>   c470195b989f ("bnxt_en: Add PTP .getcrosststamp() interface to get device/host times")
>
> boot_cpu_has() only exists for X86 ...
>
> I have applied the folloring hack for today:
>
> From: Stephen Rothwell <sfr@canb.auug.org.au>
> Date: Tue, 13 Jan 2026 16:51:58 +1100
> Subject: [PATCH] fix up for "bnxt_en: Add PTP .getcrosststamp() interface to
>  get device/host times"
>
> Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
> ---
>  drivers/net/ethernet/broadcom/bnxt/bnxt_ptp.c | 4 ++++
>  1 file changed, 4 insertions(+)
>
> diff --git a/drivers/net/ethernet/broadcom/bnxt/bnxt_ptp.c b/drivers/net/ethernet/broadcom/bnxt/bnxt_ptp.c
> index 75ad385f5f79..20f5a9f38fee 100644
> --- a/drivers/net/ethernet/broadcom/bnxt/bnxt_ptp.c
> +++ b/drivers/net/ethernet/broadcom/bnxt/bnxt_ptp.c
> @@ -882,6 +882,7 @@ void bnxt_tx_ts_cmp(struct bnxt *bp, struct bnxt_napi *bnapi,
>         }
>  }
>
> +#ifdef X86_FEATURE_ART
>  static int bnxt_phc_get_syncdevicetime(ktime_t *device,
>                                        struct system_counterval_t *system,
>                                        void *ctx)
> @@ -924,6 +925,7 @@ static int bnxt_ptp_getcrosststamp(struct ptp_clock_info *ptp_info,
>         return get_device_system_crosststamp(bnxt_phc_get_syncdevicetime,
>                                              ptp, NULL, xtstamp);
>  }
> +#endif
>
>  static const struct ptp_clock_info bnxt_ptp_caps = {
>         .owner          = THIS_MODULE,
> @@ -1137,9 +1139,11 @@ int bnxt_ptp_init(struct bnxt *bp)
>                 if (bnxt_ptp_pps_init(bp))
>                         netdev_err(bp->dev, "1pps not initialized, continuing without 1pps support\n");
>         }
> +#ifdef X86_FEATURE_ART
>         if ((bp->fw_cap & BNXT_FW_CAP_PTP_PTM) && pcie_ptm_enabled(bp->pdev) &&
>             boot_cpu_has(X86_FEATURE_ART))
>                 ptp->ptp_info.getcrosststamp = bnxt_ptp_getcrosststamp;
> +#endif
>
>         ptp->ptp_clock = ptp_clock_register(&ptp->ptp_info, &bp->pdev->dev);
>         if (IS_ERR(ptp->ptp_clock)) {
> --
> 2.52.0
>
>
>
> --
> Cheers,
> Stephen Rothwell