From nobody Mon Sep 15 19:11:20 2025 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4cQZQ05wgnz67sq2; Mon, 15 Sep 2025 19:11:20 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4cQZQ02Ytfz4Frg; Mon, 15 Sep 2025 19:11:20 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1757963480; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=mBAHnhuIJ/iFpf8D0h+lI+yw/MzG+pXe/GhB96ZQKnw=; b=CnBv5XM+1ADFQxr7XBiMS4xAI60zXxhusHDzY5vL6VFLKVdsW4saLSeQxqNKpn+KtMRdUE EVS04Wektzir71sBGI135lb6csYpO1tPnVfYt64uR6a4pnVDkbltpWnbnJKOENdin8luiB 1yaHMFp8cqUbIZhA5H9n04qNyCeoK4ZIGi4FjSAnLjuYNjIKOYF6g4e4BhurawnoTZgKgp vQ/GU31b3q9dEaTwU88jsFxsZjLexAqdFlwxXntq6I8vG4KMZq8uGA6bpxtQEoiTWL4u3H DC8pqHQKMkfLaW8aer0svuYDJZY29MzBMMJprvDTQzFrqC1vUUIrpFFWIh1MIw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1757963480; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=mBAHnhuIJ/iFpf8D0h+lI+yw/MzG+pXe/GhB96ZQKnw=; b=cQGo66kPZWv2HCogNZTSg3S8UvM7sTCo9+OLUO+z1i40B3iMJ3Ro3oKsl6TTwu83Zg4Jq9 WdttRycGamP8fp7t78bzib/+uza20ZiUVflnxOKIGaENeDkqjCSEUxIPHP0S2HaP+rkuxv DTkTS+8sIVOUcgpAjxDS93qYkq4yZartPVUCeeneJK2PbdoZDhrQDoWzpVqTh9L4XBMFbn krhJhY17vrVoaSXljCbDur/pyTlt/E7jDzTGGFWIeV/GEeN8/zYLLiqPywr8CwHaPjmHZL 5PBllDwaw9Aq8higKUweLmwIiqnaaich9311bV5ZOEIkcjsSve8huuo6aDnrDw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1757963480; a=rsa-sha256; cv=none; b=hidaPe8wUdqWZISZubd2pt6+4Nl5/Mx8xsF4YzKGsYyGRIyH42dY9G/FY45AW/H11Nh+EC J6eayb7Ny6klIeGyXwEeOATK5vqainb7WTe14CQ5VEsVH7UEYY26+NCZXDJZtlqsOlpYiq qoeTEaE8CJ4TIYL7J3v2HBdHr5J63vnQ2Eoa2JjAkG/3valkTJl7kDZNXJuIREJ+4VY+GM hxtHReJOvgcKvuoBYjwob2QPHDAxnHl3b8SmKipSAhrd5ApYMiuOh3aSBjdDrmhjJ0dCSW NayoAE8w70Ct9HtfGTGGaBCkOU6OsHiYeQesPmWCeSU97MtAcjQUfHmnB1l4sA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4cQZQ01KlMz16sD; Mon, 15 Sep 2025 19:11:20 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 58FJBK4r051122; Mon, 15 Sep 2025 19:11:20 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 58FJBK28051119; Mon, 15 Sep 2025 19:11:20 GMT (envelope-from git) Date: Mon, 15 Sep 2025 19:11:20 GMT Message-Id: <202509151911.58FJBK28051119@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: "Bjoern A. Zeeb" Subject: git: 88122c8eb70d - stable/15 - LinuxKPI: maths64: implement roundup_u64() List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: bz X-Git-Repository: src X-Git-Refname: refs/heads/stable/15 X-Git-Reftype: branch X-Git-Commit: 88122c8eb70d81decb7c6dd16e551c3df6ad3818 Auto-Submitted: auto-generated The branch stable/15 has been updated by bz: URL: https://cgit.FreeBSD.org/src/commit/?id=88122c8eb70d81decb7c6dd16e551c3df6ad3818 commit 88122c8eb70d81decb7c6dd16e551c3df6ad3818 Author: Bjoern A. Zeeb AuthorDate: 2025-09-04 20:27:48 +0000 Commit: Bjoern A. Zeeb CommitDate: 2025-09-15 14:52:54 +0000 LinuxKPI: maths64: implement roundup_u64() Needed by a wifi driver update. Sponsored by: The FreeBSD Foundation (initially) Reviewed by: dumbbell Differential Revision: https://reviews.freebsd.org/D52080 (cherry picked from commit 2a44e10edb13e6b2be7fa2814b418a6959cb1171) --- sys/compat/linuxkpi/common/include/linux/math64.h | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/sys/compat/linuxkpi/common/include/linux/math64.h b/sys/compat/linuxkpi/common/include/linux/math64.h index a216d350570f..25ca9da1b622 100644 --- a/sys/compat/linuxkpi/common/include/linux/math64.h +++ b/sys/compat/linuxkpi/common/include/linux/math64.h @@ -98,6 +98,12 @@ div64_u64_round_up(uint64_t dividend, uint64_t divisor) return ((dividend + divisor - 1) / divisor); } +static inline uint64_t +roundup_u64(uint64_t x1, uint32_t x2) +{ + return (div_u64(x1 + x2 - 1, x2) * x2); +} + #define DIV64_U64_ROUND_UP(...) \ div64_u64_round_up(__VA_ARGS__)