From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 5C98236896F for ; Thu, 2 Apr 2026 20:59:18 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1775163558; cv=none; b=VtoG0BjyawpmOChBl0qzqwH3djkCkqYAOMqe1KdMfAdEzicQvDh/SZpsUkjbe1ca7alWpCStZqfmv3dZkQONiRhG/GN1SSmJeXkep5lmk3eO5DwhNaQsEfJSeKL61Fh+Ul4sY2DxCuJXVVn//6sXbBYV3PMDChbX5kh34hqUyu8= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1775163558; c=relaxed/simple; bh=+5ZRBc0CU+qbCi5qaQ5PFMSrmldHGY/cmfZN28EmHZc=; h=From:To:Cc:Subject:Date:Message-Id:MIME-Version; b=fovYrgBmWTbDUYmJOIad6ezQzngCTetkEFbrCluMTQF0Xc1PYWYMSqSwCFkfwyWNTfKeXlWdYOic0lkIL+TOU58WAeocZaXD1ooQ3XLs4edQ6cbSuXvzQr/pluWdrjMwW9T0mfhWBeFYgSobilzQ05viUTMOl1RS55TT6fj30zs= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=QPU6dQZF; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="QPU6dQZF" Received: by smtp.kernel.org (Postfix) with ESMTPSA id BDA4AC116C6; Thu, 2 Apr 2026 20:59:16 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1775163558; bh=+5ZRBc0CU+qbCi5qaQ5PFMSrmldHGY/cmfZN28EmHZc=; h=From:To:Cc:Subject:Date:From; b=QPU6dQZFc6eM6ErWxtfxa48AGBdYOI4y1RuALIAUUaJNz+E2SAGmAMnTbyhT4qbnR J+/I9f7+MWUrp0isRazKl+48eUFBBvNsdwDbYFuX9rpo210nEzRpMJf9ZikpWJyOwR bGghX9JeTIkOKjDHH8R3G7mICsbkv2mqXtXA8U3FgzCjfUuXTZ0l+eGE02WIzDs50y AnTRs/TVW82dzyNvvHwu2bz/60QzO00muvLU3WE13wW5cvuhl37G0oWzfDOifoLPBG 92JJ5rG2NZSmaPyDpWkdCbCXGK3ymA/oxP2EB22GYh2ixpmtSpF4jKjqZse3Y5BWmc POmPcSfTqZvVg== From: Arnd Bergmann To: Andrew Morton , Tejun Heo , Breno Leitao Cc: Arnd Bergmann , linux-kernel@vger.kernel.org Subject: [PATCH] workqueue: avoid unguarded 64-bit division Date: Thu, 2 Apr 2026 22:59:03 +0200 Message-Id: <20260402205913.1953402-1-arnd@kernel.org> X-Mailer: git-send-email 2.39.5 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit From: Arnd Bergmann The printk() requires a division that is not allowed on 32-bit architectures: x86_64-linux-ld: lib/test_workqueue.o: in function `test_workqueue_init': test_workqueue.c:(.init.text+0x36f): undefined reference to `__udivdi3' Use div_u64() to print the resulting elapsed microseconds. Fixes: 24b2e73f9700 ("workqueue: add test_workqueue benchmark module") Signed-off-by: Arnd Bergmann --- lib/test_workqueue.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/test_workqueue.c b/lib/test_workqueue.c index f2ae1ac4bd93..99e160bd5ad1 100644 --- a/lib/test_workqueue.c +++ b/lib/test_workqueue.c @@ -242,7 +242,7 @@ static int __init run_bench(int n_threads, const char *scope, const char *label) pr_info("test_workqueue: %-16s %llu items/sec\tp50=%llu\tp90=%llu\tp95=%llu ns\n", label, - elapsed_us ? total_items * 1000000ULL / elapsed_us : 0, + elapsed_us ? div_u64(total_items * 1000000ULL, elapsed_us) : 0, all_latencies[total_items * 50 / 100], all_latencies[total_items * 90 / 100], all_latencies[total_items * 95 / 100]); -- 2.39.5