riscv: Add ffs.c and ffsdi2.c
These are only needed for GCC, but it doesn't hurt to include these
always.
Reviewed by: mhorne
Differential Revision: https://reviews.freebsd.org/D54968
libkern: Add libcalls for ffs and __ffsdi2
These are needed when compiling a RISC-V kernel with GCC which does
not inline __builtin_ffs*.
The __ffsdi2 is adapated from the previous ffsl.c.
This partially reverts commit f4db342d44198973c1c7b9005d0c5683a582707e.
Reviewed by: mhorne
Differential Revision: https://reviews.freebsd.org/D54967
riscv: Enable the zifencei extension explicitly in -march
clang is more tolerant and implies this extension whereas GCC is
stricter and requires it to be included.
Reviewed by: mhorne
Differential Revision: https://reviews.freebsd.org/D54965
stand: Use the correct OUTPUT_ARCH in the linker script for RISC-V
Compare to the OUTPUT_ARCH in sys/conf/ldscript.riscv.
Reviewed by: mhorne
Differential Revision: https://reviews.freebsd.org/D54962
qlnxe: Avoid out-of-bounds reading the multicast ethernet address
The correct length of an ethernet address is ETHER_ADDR_LEN but not
ETHER_HDR_LEN.
MFC after: 1 week
(cherry picked from commit 85f499be90c15a3de02d1c62ce03b99fab52f925)
lio: Avoid out-of-bounds read or write MAC address
While here, replace loop copying the MAC address with memcpy() for
better readability.
Reviewed by: markj
MFC after: 1 week
Differential Revision: https://reviews.freebsd.org/D54177
(cherry picked from commit 094626d3a5009a56bf1b763dbdfc681ce371dc99)
locking.9: Tweak the table column width to fit 80 characters
While here, add some white spaces to improve the readability of source
code.
Reviewed by: ziaee, #manpages
MFC after: 1 week
Differential Revision: https://reviews.freebsd.org/D54121
(cherry picked from commit 176075e661fc657845d788ab3451e690c4e9bac6)
linux: Make the macro LINUX_IOCTL_SET public
There're some other drivers want to register and unregister linux
ioctl handler. Move the macro LINUX_IOCTL_SET from tdfx_linux.h to
linux_ioctl.h so that they can also benefit it.
While here, rename the declaration of linux ioctl function to be
consistent with the name of the handler.
Meanwhile, drop a comment about the macro, since its function is
obvious.
Reviewed by: markj
MFC after: 2 weeks
Differential Revision: https://reviews.freebsd.org/D53158
(cherry picked from commit 790c27317ec1a997a4e5c2bdee9e4acc610c8e3c)
arm: Use proper prototype for SYSINIT functions
The only possible return value of function module_info_init() is 0. Make
it return void to match the prototype of SYSINIT.
MFC after: 1 week
(cherry picked from commit 0b9c12fa976446705635a94984f45232f034eecf)
sys/sysent.h: Remove an unneeded type cast
The function exec_sysvec_init() already has the right prototype.
While here, remove an extra semicolon from the macro INIT_SYSENTVEC.
MFC after: 1 week
(cherry picked from commit 296db8c72dca1c17d9a4ce94cc8881e48df8187b)