Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F161222941
D32366.id96464.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
2 KB
Referenced Files
None
Subscribers
None
D32366.id96464.diff
View Options
Index: sys/compat/linuxkpi/common/include/linux/idr.h
===================================================================
--- sys/compat/linuxkpi/common/include/linux/idr.h
+++ sys/compat/linuxkpi/common/include/linux/idr.h
@@ -140,6 +140,11 @@
return (ida_simple_get(ida, 0, max, gfp));
}
+static inline int ida_alloc(struct ida *ida, gfp_t gfp)
+{
+ return (ida_alloc_max(ida, ~0u, gfp));
+}
+
static inline bool
ida_is_empty(struct ida *ida)
{
Index: sys/compat/linuxkpi/common/include/linux/kernel.h
===================================================================
--- sys/compat/linuxkpi/common/include/linux/kernel.h
+++ sys/compat/linuxkpi/common/include/linux/kernel.h
@@ -105,7 +105,7 @@
}
#define BUILD_BUG() do { CTASSERT(0); } while (0)
-#define BUILD_BUG_ON(x) _O_CTASSERT(!(x))
+#define BUILD_BUG_ON(x) do { _O_CTASSERT(!(x)) } while (0)
#define BUILD_BUG_ON_MSG(x, msg) BUILD_BUG_ON(x)
#define BUILD_BUG_ON_NOT_POWER_OF_2(x) BUILD_BUG_ON(!powerof2(x))
#define BUILD_BUG_ON_INVALID(expr) while (0) { (void)(expr); }
Index: sys/compat/linuxkpi/common/include/linux/mm.h
===================================================================
--- sys/compat/linuxkpi/common/include/linux/mm.h
+++ sys/compat/linuxkpi/common/include/linux/mm.h
@@ -294,4 +294,6 @@
void lkpi_unmap_mapping_range(void *obj, loff_t const holebegin __unused,
loff_t const holelen, int even_cows __unused);
+#define PAGE_ALIGNED(p) __is_aligned(p, PAGE_SIZE)
+
#endif /* _LINUX_MM_H_ */
Index: sys/compat/linuxkpi/common/include/linux/scatterlist.h
===================================================================
--- sys/compat/linuxkpi/common/include/linux/scatterlist.h
+++ sys/compat/linuxkpi/common/include/linux/scatterlist.h
@@ -182,6 +182,13 @@
sg_mark_end(&sg[nents - 1]);
}
+static inline void
+sg_init_one(struct scatterlist *sg, const void *buf, unsigned int buflen)
+{
+ sg_init_table(sg, 1);
+ sg_set_buf(sg, buf, buflen);
+}
+
static struct scatterlist *
sg_kmalloc(unsigned int nents, gfp_t gfp_mask)
{
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Thu, Jul 2, 8:54 PM (21 h, 25 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
34602408
Default Alt Text
D32366.id96464.diff (2 KB)
Attached To
Mode
D32366: A few linuxkpi additions for virtio-gpu
Attached
Detach File
Event Timeline
Log In to Comment