From: Rob Herring <robh@kernel.org>
To: Nathan Chancellor <nathan@kernel.org>
Cc: srinivas.neeli@amd.com, wim@linux-watchdog.org,
shubhrajyoti.datta@amd.com, michal.simek@amd.com,
linux@roeck-us.net, ndesaulniers@google.com, trix@redhat.com,
linux-watchdog@vger.kernel.org,
linux-arm-kernel@lists.infradead.org, patches@lists.linux.dev,
llvm@lists.linux.dev
Subject: Re: [PATCH] watchdog: xilinx_wwdt: Use div_u64() in xilinx_wwdt_start()
Date: Wed, 23 Aug 2023 10:18:51 -0500 [thread overview]
Message-ID: <20230823151851.GA2359738-robh@kernel.org> (raw)
In-Reply-To: <20230815-watchdog-xilinx-div_u64-v1-1-20b0b5a65c2e@kernel.org>
On Tue, Aug 15, 2023 at 12:06:50PM -0700, Nathan Chancellor wrote:
> After commit f1a43aadb5a6 ("watchdog: Enable COMPILE_TEST for more
> drivers"), it is possible to enable this driver on 32-bit architectures.
> When building for those architectures with clang, there is an error due
> to a 64-bit division in xilinx_wwdt_start():
>
> ERROR: modpost: "__aeabi_uldivmod" [drivers/watchdog/xilinx_wwdt.ko] undefined!
>
> Use div_u64() to fix this, which takes a 64-bit dividend and 32-bit
> divisor. GCC likely avoids the same error due to optimizations it
> employs to transform division by a constant into other equivalent
> operations, which may be different than what is implemented in clang.
>
> Link: https://github.com/ClangBuiltLinux/linux/issues/1915
> Signed-off-by: Nathan Chancellor <nathan@kernel.org>
> ---
> drivers/watchdog/xilinx_wwdt.c | 3 ++-
> 1 file changed, 2 insertions(+), 1 deletion(-)
Thanks for the fix. Also reported by 0-day with a similar failure:
All errors (new ones prefixed by >>):
microblaze-linux-ld: drivers/watchdog/xilinx_wwdt.o: in function `xilinx_wwdt_start':
>> drivers/watchdog/xilinx_wwdt.c:74: undefined reference to `__udivdi3'
Acked-by: Rob Herring <robh@kernel.org>
WARNING: multiple messages have this Message-ID (diff)
From: Rob Herring <robh@kernel.org>
To: Nathan Chancellor <nathan@kernel.org>
Cc: srinivas.neeli@amd.com, wim@linux-watchdog.org,
shubhrajyoti.datta@amd.com, michal.simek@amd.com,
linux@roeck-us.net, ndesaulniers@google.com, trix@redhat.com,
linux-watchdog@vger.kernel.org,
linux-arm-kernel@lists.infradead.org, patches@lists.linux.dev,
llvm@lists.linux.dev
Subject: Re: [PATCH] watchdog: xilinx_wwdt: Use div_u64() in xilinx_wwdt_start()
Date: Wed, 23 Aug 2023 10:18:51 -0500 [thread overview]
Message-ID: <20230823151851.GA2359738-robh@kernel.org> (raw)
In-Reply-To: <20230815-watchdog-xilinx-div_u64-v1-1-20b0b5a65c2e@kernel.org>
On Tue, Aug 15, 2023 at 12:06:50PM -0700, Nathan Chancellor wrote:
> After commit f1a43aadb5a6 ("watchdog: Enable COMPILE_TEST for more
> drivers"), it is possible to enable this driver on 32-bit architectures.
> When building for those architectures with clang, there is an error due
> to a 64-bit division in xilinx_wwdt_start():
>
> ERROR: modpost: "__aeabi_uldivmod" [drivers/watchdog/xilinx_wwdt.ko] undefined!
>
> Use div_u64() to fix this, which takes a 64-bit dividend and 32-bit
> divisor. GCC likely avoids the same error due to optimizations it
> employs to transform division by a constant into other equivalent
> operations, which may be different than what is implemented in clang.
>
> Link: https://github.com/ClangBuiltLinux/linux/issues/1915
> Signed-off-by: Nathan Chancellor <nathan@kernel.org>
> ---
> drivers/watchdog/xilinx_wwdt.c | 3 ++-
> 1 file changed, 2 insertions(+), 1 deletion(-)
Thanks for the fix. Also reported by 0-day with a similar failure:
All errors (new ones prefixed by >>):
microblaze-linux-ld: drivers/watchdog/xilinx_wwdt.o: in function `xilinx_wwdt_start':
>> drivers/watchdog/xilinx_wwdt.c:74: undefined reference to `__udivdi3'
Acked-by: Rob Herring <robh@kernel.org>
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
next prev parent reply other threads:[~2023-08-23 15:18 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-08-15 19:06 [PATCH] watchdog: xilinx_wwdt: Use div_u64() in xilinx_wwdt_start() Nathan Chancellor
2023-08-15 19:06 ` Nathan Chancellor
2023-08-15 20:07 ` Guenter Roeck
2023-08-15 20:07 ` Guenter Roeck
2023-08-23 15:18 ` Rob Herring [this message]
2023-08-23 15:18 ` Rob Herring
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=20230823151851.GA2359738-robh@kernel.org \
--to=robh@kernel.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-watchdog@vger.kernel.org \
--cc=linux@roeck-us.net \
--cc=llvm@lists.linux.dev \
--cc=michal.simek@amd.com \
--cc=nathan@kernel.org \
--cc=ndesaulniers@google.com \
--cc=patches@lists.linux.dev \
--cc=shubhrajyoti.datta@amd.com \
--cc=srinivas.neeli@amd.com \
--cc=trix@redhat.com \
--cc=wim@linux-watchdog.org \
/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 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.