Thread (30 messages) 30 messages, 3 authors, 2025-10-21

Re: [PATCH v6 01/15] genpt: Generic Page Table base API

From: Jason Gunthorpe <jgg@nvidia.com>
Date: 2025-10-08 14:37:16
Also in: linux-iommu, linux-kselftest, linux-patches, llvm

On Tue, Oct 07, 2025 at 01:11:46PM -0300, Jason Gunthorpe wrote:
+/*
+ * Return the highest value such that:
+ *    ffz_t(u32, U32_MAX) == UNDEFINED
+ *    ffz_t(u32, 0) == 0
+ *    ffz_t(u32, 1) == 1
+ *    log_mod(a, ret) == log_to_max_int(ret)
+ * aka find first zero bit
+ */
+static inline unsigned int ffz32(u32 a)
+{
+	return ffz(a);
+}
+static inline unsigned int ffz64(u64 a)
+{
+	if (sizeof(u64) == sizeof(unsigned long))
+		return ffz32(a);
This should be ffz(a), it breaks everything like this. I must have
run the kunits out of sequence to have missed this.

I updated the github

Jason
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help