From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id E0C38EE49A3 for ; Wed, 23 Aug 2023 15:19:29 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:References: Message-ID:Subject:Cc:To:From:Date:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=tRRy9OQus+FpzZNSaSeOGHiJPEQxjiqOJaj/4ii8pGA=; b=YNz5xtHOI8jOwi 6WEsAtMcRlxNBTKN727Xa/pGBKcIC4Sp0K4E+9Db9zZPt1xtN1NI3LiCgaOUVm60Gajoq+XzpUDIi mfyXHNrzYtVGovZhdoKJo9S84I/qJboCE7WyhzTpILT5n/tSWFmc82Vnl1g7itINjn2t2sPQO6kyh 0WTEPlmSTTKAfF4Z6TyGQITGB7KsMiFCr1cqgOfng1C+Vna8xzGXPg9ReIUbgt0/TqXuTjkYJlXiz NKjTFLHOn1yUn7F5R1n96pu6FhJCf0YROwbwgrNfwGsS5Tx28XR3OVgqOsWmD6HoBY08yEqShruei zcGNHiZ5N6qM9i+iskdQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1qYpdK-000xk8-2M; Wed, 23 Aug 2023 15:18:58 +0000 Received: from dfw.source.kernel.org ([2604:1380:4641:c500::1]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1qYpdH-000xjf-26 for linux-arm-kernel@lists.infradead.org; Wed, 23 Aug 2023 15:18:57 +0000 Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 1F6A1622F2; Wed, 23 Aug 2023 15:18:55 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 1BA3CC433C8; Wed, 23 Aug 2023 15:18:52 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1692803934; bh=1HhWgxgZ/OdvFcrLfSrPMjddPyrrJ+HBdSpwrFuf2NE=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=LytZAiuAivXLxyA3Cn6Qnvsp8H5wfxUNXLzsaGnvi2zRKoLLu2foo0Ho/J4NHvdnP N+hzTaLQEV8Llp2d4P8BRzgnfBErBQyVDszFmtQdgZOk9w0zPHKpQ4FS2HxqeSh60B MYi8jv8SgRo82IDiWw69ZmbCH0wzTp0kGsco/XPb164OcLzmnO5XxPoB+BdC/5/NHw nIoWO+Oz70rBgy9vDQh4byb5HhaLsume7UD3l29r+plpyxzW8PDxkzeKNk5RoJKGM+ 1jso12T48XMhH4dI3CUibNkX+Z5Y4s7zoEW7qryWaaAH2FxAxcUWj1v6zHG18D2VFG QzRQ3xyGQRaSg== Received: (nullmailer pid 2364874 invoked by uid 1000); Wed, 23 Aug 2023 15:18:51 -0000 Date: Wed, 23 Aug 2023 10:18:51 -0500 From: Rob Herring To: Nathan Chancellor 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() Message-ID: <20230823151851.GA2359738-robh@kernel.org> References: <20230815-watchdog-xilinx-div_u64-v1-1-20b0b5a65c2e@kernel.org> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20230815-watchdog-xilinx-div_u64-v1-1-20b0b5a65c2e@kernel.org> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20230823_081855_733878_21B80900 X-CRM114-Status: GOOD ( 17.87 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.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 > --- > 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 _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel