K 10 svn:author V 4 manu K 8 svn:date V 27 2020-08-24T12:59:55.541205Z K 7 svn:log V 1761 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 END