Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 22 Apr 2026 21:08:20 +0000
From:      Bjoern A. Zeeb <bz@FreeBSD.org>
To:        src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org
Cc:        Jean-=?utf-8?Q?S=C3=A9bast?==?utf-8?Q?ien P=C3=A9?=dron <dumbbell@FreeBSD.org>
Subject:   git: b795f210fb5d - stable/15 - linuxkpi: Add `rol32()`
Message-ID:  <69e938c4.26c4f.2c0e73ff@gitrepo.freebsd.org>

index | next in thread | raw e-mail

The branch stable/15 has been updated by bz:

URL: https://cgit.FreeBSD.org/src/commit/?id=b795f210fb5da5f9af1ed192583ec9b5dce2bc7a

commit b795f210fb5da5f9af1ed192583ec9b5dce2bc7a
Author:     Jean-Sébastien Pédron <dumbbell@FreeBSD.org>
AuthorDate: 2026-01-07 21:18:38 +0000
Commit:     Bjoern A. Zeeb <bz@FreeBSD.org>
CommitDate: 2026-04-22 20:56:58 +0000

    linuxkpi: Add `rol32()`
    
    `rol64()` and `rol32()` are used by <linux/siphash.h>. The former was
    added previously, before <linux/siphash.h> was added. However the latter
    was not, and it broke the build on armv7.
    
    Reported by:    adrian
    Reviewed by:    adrian, rpokala
    Sponsored by:   The FreeBSD Foundation
    Differential Revision: https://reviews.freebsd.org/D54588
    
    (cherry picked from commit 6c0bcd15e4782ff2e23119a37396d693d09c695d)
---
 sys/compat/linuxkpi/common/include/linux/bitops.h | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/sys/compat/linuxkpi/common/include/linux/bitops.h b/sys/compat/linuxkpi/common/include/linux/bitops.h
index 427d52b0dc81..125081ab5b74 100644
--- a/sys/compat/linuxkpi/common/include/linux/bitops.h
+++ b/sys/compat/linuxkpi/common/include/linux/bitops.h
@@ -443,4 +443,10 @@ rol64(uint64_t word, unsigned int shift)
 	return ((word << (shift & 63)) | (word >> ((-shift) & 63)));
 }
 
+static inline uint32_t
+rol32(uint32_t word, unsigned int shift)
+{
+	return ((word << (shift & 31)) | (word >> ((-shift) & 31)));
+}
+
 #endif	/* _LINUXKPI_LINUX_BITOPS_H_ */


home | help

Want to link to this message? Use this
URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?69e938c4.26c4f.2c0e73ff>