]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
MFC r361247, r361343, r361418-r361419, r361422, r361449
authorEmmanuel Vadot <manu@FreeBSD.org>
Mon, 24 Aug 2020 12:59:55 +0000 (12:59 +0000)
committerEmmanuel Vadot <manu@FreeBSD.org>
Mon, 24 Aug 2020 12:59:55 +0000 (12:59 +0000)
commitb87c9716d25fff3a883933c07950c72f19bc3f86
tree028136362e31efc624e8b8db1f69514e34cdd16f
parentcf8101886a1904157907192f1460c9a3bc6f2065
MFC r361247, r361343, r361418-r361419, r361422, r361449

r361247:
linuxkpi: Add irq_work.h

Since handlers are call in a thread context we can simply use a workqueue
to emulate those functions.
The DRM code was patched to do that already, having it in linuxkpi allows us
to not patch the upstream code.

Sponsored-by: The FreeBSD Foundation
Reviewed by: hselasky
Differential Revision: https://reviews.freebsd.org/D24859

r361343:
linuxkpi: Add rcu_work functions

The rcu_work function helps to queue some work after waiting for a grace
period.
This is needed by DRM drivers.

Sponsored-by: The FreeBSD Foundation
Reviewed by: hselasky
Differential Revision: https://reviews.freebsd.org/D24942

r361418:
libkern: Add arc4random_uniform

This variant get a random number up to the limit passed as the argument.
This is simply a copy of the libc version.

Sponsored-by: The FreeBSD Foundation
Reviewed by: cem, hselasky (previous version)
Differential Revision: https://reviews.freebsd.org/D24962

r361419:
linuxkpi: Add prandom_u32_max

This is just a wrapper around arc4random_uniform
Needed by DRM v5.3

Sponsored-by: The FreeBSD Foundation
Reviewed by: cem, hselasky
Differential Revision: https://reviews.freebsd.org/D24961

r361422:
bbr: Use arc4random_uniform from libkern.

This unbreak LINT build

Reported by: jenkins, melifaro

r361449:
linuxkpi: Add __same_type and __must_be_array macros

The same_type macro simply wraps around builtin_types_compatible_p which
exist for both GCC and CLANG, which returns 1 if both types are the same.
The __must_be_array macros returns 1 if the argument is an array.

This is needed for DRM v5.3

Sponsored-by: The FreeBSD Foundation
Reviewed by: hselasky
Differential Revision: https://reviews.freebsd.org/D24953
sys/compat/linuxkpi/common/include/linux/compiler.h
sys/compat/linuxkpi/common/include/linux/irq_work.h [new file with mode: 0644]
sys/compat/linuxkpi/common/include/linux/random.h
sys/compat/linuxkpi/common/include/linux/workqueue.h
sys/compat/linuxkpi/common/src/linux_work.c
sys/conf/files
sys/libkern/arc4random_uniform.c [new file with mode: 0644]
sys/sys/libkern.h