From: Andy Shevchenko <andriy.shevchenko@intel.com>
To: kernel test robot <lkp@intel.com>
Cc: Daniel Lezcano <daniel.lezcano@linaro.org>,
llvm@lists.linux.dev, oe-kbuild-all@lists.linux.dev,
linux-kernel@vger.kernel.org,
Jonathan Cameron <Jonathan.Cameron@huawei.com>,
Alexandru-Catalin Ionita <alexandru-catalin.ionita@nxp.com>,
Ciprian Costea <ciprianmarian.costea@nxp.com>,
"Radu Pirea (NXP OSS)" <radu-nicolae.pirea@oss.nxp.com>
Subject: Re: ld.lld: error: undefined symbol: __bad_ndelay
Date: Wed, 8 Apr 2026 17:21:20 +0300 [thread overview]
Message-ID: <adZkYM2MUiUFlI5M@ashevche-desk.local> (raw)
In-Reply-To: <202603311958.ly6uROit-lkp@intel.com>
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
prev parent reply other threads:[~2026-04-08 14:21 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-03-31 11:21 kernel test robot
2026-04-08 14:21 ` Andy Shevchenko [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=adZkYM2MUiUFlI5M@ashevche-desk.local \
--to=andriy.shevchenko@intel.com \
--cc=Jonathan.Cameron@huawei.com \
--cc=alexandru-catalin.ionita@nxp.com \
--cc=ciprianmarian.costea@nxp.com \
--cc=daniel.lezcano@linaro.org \
--cc=linux-kernel@vger.kernel.org \
--cc=lkp@intel.com \
--cc=llvm@lists.linux.dev \
--cc=oe-kbuild-all@lists.linux.dev \
--cc=radu-nicolae.pirea@oss.nxp.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®