* ld.lld: error: undefined symbol: __bad_ndelay
@ 2026-03-31 11:21 kernel test robot
2026-04-08 14:21 ` Andy Shevchenko
0 siblings, 1 reply; 2+ messages in thread
From: kernel test robot @ 2026-03-31 11:21 UTC (permalink / raw)
To: Daniel Lezcano
Cc: llvm, oe-kbuild-all, linux-kernel, Jonathan Cameron,
Alexandru-Catalin Ionita, Ciprian Costea, Radu Pirea (NXP OSS),
Andy Shevchenko
tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: d0c3bcd5b8976159d835a897254048e078f447e6
commit: 4434072a893e4864519c167947083ff3e4cc2d95 iio: adc: Add the NXP SAR ADC support for the s32g2/3 platforms
date: 3 months ago
config: x86_64-buildonly-randconfig-001-20260331 (https://download.01.org/0day-ci/archive/20260331/202603311958.ly6uROit-lkp@intel.com/config)
compiler: clang version 20.1.8 (https://github.com/llvm/llvm-project 87f0227cb60147a26a1eeb4fb06e3b505e9c7261)
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20260331/202603311958.ly6uROit-lkp@intel.com/reproduce)
If you fix the issue in a separate patch/commit (i.e. not just a new version of
the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <lkp@intel.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/202603311958.ly6uROit-lkp@intel.com/
All errors (new ones prefixed by >>):
>> ld.lld: error: undefined symbol: __bad_ndelay
>>> referenced by delay.h:78 (include/asm-generic/delay.h:78)
>>> vmlinux.o:(nxp_sar_adc_probe)
>>> referenced by delay.h:78 (include/asm-generic/delay.h:78)
>>> vmlinux.o:(nxp_sar_adc_read_raw)
>>> referenced by delay.h:78 (include/asm-generic/delay.h:78)
>>> vmlinux.o:(nxp_sar_adc_read_raw)
>>> referenced 2 more times
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: ld.lld: error: undefined symbol: __bad_ndelay
2026-03-31 11:21 ld.lld: error: undefined symbol: __bad_ndelay kernel test robot
@ 2026-04-08 14:21 ` Andy Shevchenko
0 siblings, 0 replies; 2+ messages in thread
From: Andy Shevchenko @ 2026-04-08 14:21 UTC (permalink / raw)
To: kernel test robot
Cc: Daniel Lezcano, llvm, oe-kbuild-all, linux-kernel,
Jonathan Cameron, Alexandru-Catalin Ionita, Ciprian Costea,
Radu Pirea (NXP OSS)
On Tue, Mar 31, 2026 at 07:21:42PM +0800, kernel test robot wrote:
> tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
> head: d0c3bcd5b8976159d835a897254048e078f447e6
> commit: 4434072a893e4864519c167947083ff3e4cc2d95 iio: adc: Add the NXP SAR ADC support for the s32g2/3 platforms
> date: 3 months ago
> config: x86_64-buildonly-randconfig-001-20260331 (https://download.01.org/0day-ci/archive/20260331/202603311958.ly6uROit-lkp@intel.com/config)
> compiler: clang version 20.1.8 (https://github.com/llvm/llvm-project 87f0227cb60147a26a1eeb4fb06e3b505e9c7261)
> reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20260331/202603311958.ly6uROit-lkp@intel.com/reproduce)
>
> If you fix the issue in a separate patch/commit (i.e. not just a new version of
> the same patch/commit), kindly add following tags
> | Reported-by: kernel test robot <lkp@intel.com>
> | Closes: https://lore.kernel.org/oe-kbuild-all/202603311958.ly6uROit-lkp@intel.com/
My understanding that in some interesting cases (CONFIG_COMMON_CLK=n) this
leads to division by 0 that compiler prevents by saturating the value. Note,
I haven't checked the real assembly for that, just a speculation based on
the code reading and kernel configuration (*).
With saturated value it's obviously is over any given threshold which is
currently 20000.
*Yes, seems the specifications says that this is UB (as unspecified)
and compiler may do whatever it wants in such a case. Here it seems does
the saturation (which is logically okay as 0 is compile-time constant).
Related: https://github.com/llvm/llvm-project/issues/136679.
> All errors (new ones prefixed by >>):
>
> >> ld.lld: error: undefined symbol: __bad_ndelay
> >>> referenced by delay.h:78 (include/asm-generic/delay.h:78)
> >>> vmlinux.o:(nxp_sar_adc_probe)
> >>> referenced by delay.h:78 (include/asm-generic/delay.h:78)
> >>> vmlinux.o:(nxp_sar_adc_read_raw)
> >>> referenced by delay.h:78 (include/asm-generic/delay.h:78)
> >>> vmlinux.o:(nxp_sar_adc_read_raw)
> >>> referenced 2 more times
--
With Best Regards,
Andy Shevchenko
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2026-04-08 14:21 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-03-31 11:21 ld.lld: error: undefined symbol: __bad_ndelay kernel test robot
2026-04-08 14:21 ` Andy Shevchenko
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.