Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F112054369
D18041.id50580.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
1 KB
Referenced Files
None
Subscribers
None
D18041.id50580.diff
View Options
Index: sys/compat/linuxkpi/common/include/linux/random.h
===================================================================
--- sys/compat/linuxkpi/common/include/linux/random.h
+++ sys/compat/linuxkpi/common/include/linux/random.h
@@ -43,6 +43,15 @@
arc4rand(buf, nbytes, 0);
}
+static inline uint32_t
+get_random_u32(void)
+{
+ uint32_t val;
+
+ get_random_bytes(&val, sizeof(val));
+ return (val);
+}
+
static inline u_int
get_random_int(void)
{
Index: sys/compat/linuxkpi/common/include/linux/sched.h
===================================================================
--- sys/compat/linuxkpi/common/include/linux/sched.h
+++ sys/compat/linuxkpi/common/include/linux/sched.h
@@ -178,4 +178,12 @@
return ((uint64_t)ts.tv_sec * NSEC_PER_SEC + ts.tv_nsec);
}
+static inline char *
+get_task_comm(char *buf, struct task_struct *task)
+{
+
+ // XXX: Linux task com len is 16, FreeBSD is 19 - problems?
+ strncpy(buf, task->comm, TASK_COMM_LEN);
+ return buf;
+}
#endif /* _LINUX_SCHED_H_ */
Index: sys/compat/linuxkpi/common/include/linux/slab.h
===================================================================
--- sys/compat/linuxkpi/common/include/linux/slab.h
+++ sys/compat/linuxkpi/common/include/linux/slab.h
@@ -43,6 +43,7 @@
MALLOC_DECLARE(M_KMALLOC);
#define kvmalloc(size) kmalloc(size, 0)
+#define kvzalloc(size, flags) kmalloc(size, (flags) | __GFP_ZERO)
#define kzalloc(size, flags) kmalloc(size, (flags) | __GFP_ZERO)
#define kzalloc_node(size, flags, node) kmalloc(size, (flags) | __GFP_ZERO)
#define kfree_const(ptr) kfree(ptr)
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Thu, Mar 13, 4:18 AM (15 h, 44 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
17129875
Default Alt Text
D18041.id50580.diff (1 KB)
Attached To
Mode
D18041: LKPI updates for drm-v4.18
Attached
Detach File
Event Timeline
Log In to Comment