History log of /freebsd-current/sys/compat/linuxkpi/common/include/linux/kernel.h
Revision Date Author Comments
# e0eeeca8 08-Apr-2024 Vladimir Kondratyev <wulf@FreeBSD.org>

LinuxKPI: Add PTR_IF macro

Sponsored by: Serenity Cyber Security, LLC
Reviewed by: emaste
MFC after: 1 week


# 3208d4ad 08-Apr-2024 Vladimir Kondratyev <wulf@FreeBSD.org>

LinuxKPI: Import vanilla linux/overflow.h

It is dual-licensed (GPLv2 & MIT) and self-contained header file.
No need to reimplement it.

Sponsored by: Serenity CyberSecurity, LLC
Reviewed by: emaste
MFC after: 1 week


# 8cfd1dd8 08-Apr-2024 Vladimir Kondratyev <wulf@FreeBSD.org>

LinuxKPI: Move [SU](8|16|32|64)_(MAX|MIN) defines to linux/limits.h

Some source files get them from linux/limits.h directly rather than from
linux/kernel.h.
While here replace Linux constant values with sys/stdint.h provided ones.

Sponsored by: Serenity Cyber Security, LLC
Reviewed by: emaste
MFC after: 1 week


# fa862482 24-Dec-2023 Vladimir Kondratyev <wulf@FreeBSD.org>

LinuxKPI: Split linux/container_of.h off from linux/kernel.h

Sponsored by: Serenity Cyber Security, LLC
Reviewed by: manu, bz
MFC after: 1 week
Differential Revision: https://reviews.freebsd.org/D42796


# 31ef2909 24-Dec-2023 Vladimir Kondratyev <wulf@FreeBSD.org>

LinuxKPI: Add static_assert() macro

And move it along BUILD_BUG family in to
linux/build_bug.h to match Linux.

Sponsored by: Serenity Cyber Security, LLC
Reviewed by: manu, bz
MFC after: 1 week
Differential Revision: https://reviews.freebsd.org/D42800


# fdafd315 24-Nov-2023 Warner Losh <imp@FreeBSD.org>

sys: Automated cleanup of cdefs and other formatting

Apply the following automated changes to try to eliminate
no-longer-needed sys/cdefs.h includes as well as now-empty
blank lines in a row.

Remove /^#if.*\n#endif.*\n#include\s+<sys/cdefs.h>.*\n/
Remove /\n+#include\s+<sys/cdefs.h>.*\n+#if.*\n#endif.*\n+/
Remove /\n+#if.*\n#endif.*\n+/
Remove /^#if.*\n#endif.*\n/
Remove /\n+#include\s+<sys/cdefs.h>\n#include\s+<sys/types.h>/
Remove /\n+#include\s+<sys/cdefs.h>\n#include\s+<sys/param.h>/
Remove /\n+#include\s+<sys/cdefs.h>\n#include\s+<sys/capsicum.h>/

Sponsored by: Netflix


# 229c65a8 07-Sep-2023 Emmanuel Vadot <manu@FreeBSD.org>

kern: Globally define abs64

So we can use it in non-linuxkpi sources.

Reviewed by: emaste, mmel
Differential Revision: https://reviews.freebsd.org/D41767
Sponsored by: Beckhoff Automation GmbH & Co. KG


# 95ee2897 16-Aug-2023 Warner Losh <imp@FreeBSD.org>

sys: Remove $FreeBSD$: two-line .h pattern

Remove /^\s*\*\n \*\s+\$FreeBSD\$$\n/


# ad83dd2b 31-Mar-2023 John Baldwin <jhb@FreeBSD.org>

LinuxKPI: Appease -Wunused-but-set-variable warnings from GCC.

- Mark assert dummy variables as __unused.

- Use a dummy (void) cast of the flags argument passed to
spin_unlock_irqrestore so it gets treated as used.

Reviewed by: manu, hselasky
Differential Revision: https://reviews.freebsd.org/D39349


# 4b0552d5 13-Feb-2023 Jean-Sébastien Pédron <dumbbell@FreeBSD.org>

linuxkpi: Move `IS_ENABLED()` and friends to <linux/kconfig.h>

The header is included in <linux/xarray.h> like it is on Linux. Some DRM
code depends on this header "pollution".

Reviewed by: bz
Approved by: bz
Differential Revision: https://reviews.freebsd.org/D38567


# d91cf060 10-Feb-2023 Jean-Sébastien Pédron <dumbbell@FreeBSD.org>

linuxkpi: Add <linux/stdarg.h> + include it from <linux/string.h>

The <stdarg.h> header was moved in Linux 5.15.

Reviewed by: manu
Approved by: manu
Differential Revision: https://reviews.freebsd.org/D38540


# f82cf28b 22-Oct-2022 Bjoern A. Zeeb <bz@FreeBSD.org>

LinuxKPI: add kstrtou32_from_user() and mac_pton()

While here:
- fix an argument of kstrtouint_from_user() to correct signedness.
- make kstrtou32() call kstrtouint() to avoid duplication (keep inline
function)

Add kstrtou32_from_user() based on other examples in the file
making it a copy of the now fixed kstrtouint_from_user().

Also add a rudimentarily hacked up version of mac_pton() which is
leanient accepting non-well-formed input but so far only with ':'
separators. It does not seem to obviously belong to any networking
header file so add it here.

Both new functions are needed for debugfs support for iwlwifi hence
coming together in one commit.

Sponsored by: The FreeBSD Foundation
MFC after: 3 days
Commented on by: emaste
Differential Revision: https://reviews.freebsd.org/D37088


# d3584f92 11-Nov-2022 Jean-Sébastien Pédron <dumbbell@FreeBSD.org>

linuxkpi: Define `typeof_member()` in <linux/kernel.h>

Reviewed by: manu
Approved by: manu
Differential Revision: https://reviews.freebsd.org/D36964


# bf27839a 09-Aug-2022 Emmanuel Vadot <manu@FreeBSD.org>

linuxkpi: Add add_taint stub

Needed by drm-kmod.

Sponsored by: Beckhoff Automation GmbH & Co. KG
Differential Revision: https://reviews.freebsd.org/D36112


# 4b2cb13e 09-Aug-2022 Emmanuel Vadot <manu@FreeBSD.org>

linuxkpi: Add few more include in linux/kernel.h

Those are needed and also included in linux (via polution).

Reviewed by: bz
Sponsored by: Beckhoff Automation GmbH & Co. KG
Differential Revision: https://reviews.freebsd.org/D36111


# 0e981d79 20-May-2022 Bjoern A. Zeeb <bz@FreeBSD.org>

LinuxKPI: move pm_message_t from kernel.h to pm.h

Move pm_message_t from kernel.h to pm.h and remove a private define
in usb.h as well as adjust the implementation in linux_usb.c.
This cleans up what I believe to be a historic shortcut and is
needed for future wireless driver updates.

Leave a note in UPDATING that drm-kmod users need to update to the
latest version before re-compiling a new kernel to avoid errors
(see PR).

Sponsored by: The FreeBSD Foundation
MFC after: 3 days
PR: 264449 (drm-kmod port update, thanks wulf)
Obtained from: bz_git_iwlwifi (Dec 2020) (partly)
Reviewed by: hselasky, imp
Differential Revision: https://reviews.freebsd.org/D35276


# 97f2e93a 08-Apr-2022 Bjoern A. Zeeb <bz@FreeBSD.org>

LinuxKPI: add ALIGN_DOWN()

Add ALIGN_DOWN as rounddown2() along ALIGN() which is implemented as
roundup2().

Sponsored by: The FreeBSD Foundation
MFC after: 3 days
Reviewed by: manu, hselasky (now with less ())
Differential Revision: https://reviews.freebsd.org/D34844


# 8e587a5f 22-Mar-2022 Emmanuel Vadot <manu@FreeBSD.org>

linuxkpi: Add kstrtouint_from_user

Like kstrtoint_from_user but for uint.
Needed by drm v5.10

MFC after: 1 month
Reviewed by: hselasky
Sponsored by: Beckhoff Automation GmbH & Co. KG
Differential Revision: https://reviews.freebsd.org/D34642


# fab601c5 22-Feb-2022 Bjoern A. Zeeb <bz@FreeBSD.org>

LinuxKPI: change DECLARE_FLEX_ARRAY()

DECLARE_FLEX_ARRAY can be used inside a structure. On FreeBSD due to
-Wgnu-variable-sized-type-not-at-end this yields an error. Use [0]
instead of [] to overcome this.

Sponsored by: The FreeBSD Foundation
MFC after: 3 days
Reviewed by: hselasky
Differential Revision: https://reviews.freebsd.org/D34350


# c840d5ce 09-Feb-2022 Bjoern A. Zeeb <bz@FreeBSD.org>

LinuxKPI: add kstrtoint_from_user() and DECLARE_FLEX_ARRAY()

Add an implementation of kstrtoint_from_user() based on the other
implementations and an attempt at DECLARE_FLEX_ARRAY() which works
for the driver needing it.

MFC after: 3 days
Reviewed by: hselasky
Differential Revision: https://reviews.freebsd.org/D34231


# 64dab63f 25-Dec-2021 Vladimir Kondratyev <wulf@FreeBSD.org>

LinuxKPI: Use negative bit field size to trigger BUILD_BUG_ON_ZERO

compile time assertion on non-NULL pointers. Tests conducted show that
_Static_assert, negative array size method and current code does not
handle pointers well enough. Bit field method solves this problem.

This change is derrived from Linux implementation of BUILD_BUG_ON_ZERO.

MFC after: 1 week
Differential Revision: https://reviews.freebsd.org/D33674


# 307f78f3 19-Dec-2021 Vladimir Kondratyev <wulf@FreeBSD.org>

LinuxKPI: Constantly use _LINUXKPI_ prefix in include guards

MFC after: 1 week
Reviewed by: bz, emaste, hselasky, manu
Differential Revision: https://reviews.freebsd.org/D33562


# c427456f 23-Nov-2021 Vladimir Kondratyev <wulf@FreeBSD.org>

LinuxKPI: Implement kstrtoull

Required by drm-kmod 5.7

MFC after: 1 week
Reviewed by: hselasky, manu
Differential Revision: https://reviews.freebsd.org/D33291


# deb9bfbd 08-Jan-2022 Bjoern A. Zeeb <bz@FreeBSD.org>

LinuxKPI: add hex2bin()

Add a hex2bin() implementation needed by a driver's debugfs code.

MFC after: 3 days
Reviewed by: hselasky
Differential Revision: https://reviews.freebsd.org/D33798


# 2390a144 02-Nov-2021 Hans Petter Selasky <hselasky@FreeBSD.org>

LinuxKPI: Add sysctl(8) knob to control verbosity of WARN_ON's.

The purpose of this change is to reduce the amount of dmesg(8) noise when
VT switching after a panic.

Submitted by: Greg V <greg@unrelenting.technology>
MFC after: 1 week
Differential Revision: https://reviews.freebsd.org/D30174
Sponsored by: NVIDIA Networking


# b382b785 22-Oct-2021 Bjoern A. Zeeb <bz@FreeBSD.org>

LinuxKPI: add kstrtou8() and kstrtou8_from_user() to kernel.h

Analogous to the other sized version of kstrto[u]<type>() and
kstrtobool_from_user() add the "u8" versions needed by a driver.

MFC after: 3 days
Reviewed by: hselasky
Differential Revision: https://reviews.freebsd.org/D32598


# 6d15ccde 08-Oct-2021 Alex Richardson <arichardson@FreeBSD.org>

linuxkpi: Allow BUILD_BUG_ON in if statements without braces

I got a compilation failure in virtio-gpu without this change.

Reviewed By: #linuxkpi, manu, bz, hselasky
Differential Revision: https://reviews.freebsd.org/D32366


# fee0d486 09-Jun-2021 Neel Chauhan <nc@FreeBSD.org>

linuxkpi: Add _RET_IP_ macro in kernel.h

This is needed by the drm-kmod 5.7 update.

Approved by: hselasky (src)
MFC after: 3 days
Differential Revision: https://reviews.freebsd.org/D30707


# 05c2d94a 07-Jun-2021 Greg V <greg@unrelenting.technology>

LinuxKPI: add pr_err_once

Reviewed by: hselasky, emaste
MFC after: 1 week
Differential Revision: https://reviews.freebsd.org/D30672


# 1082490c 24-May-2021 Bjoern A. Zeeb <bz@FreeBSD.org>

LinuxKPI: change BUILD_BUG_ON()

BUILD_BUG_ON() can be used inside functions where the definition to
CTASSERT() (_Static_assert()) seems to not work.
Go back to an old-style CTASSERT() implementation but also add a
variable dclaration to avoid "unsued typedef" errors and dummy-use
the variable to avoid "unusued variable" errors. Given it is all
self-contained in a block and not used outside this should be
optimised away.

Sponsored by: The FreeBSD Foundation
MFC after: 2 weeks
Reviewed by: hselasky
Differential Revision: https://reviews.freebsd.org/D30431


# 43b4c006 24-May-2021 Bjoern A. Zeeb <bz@FreeBSD.org>

LinuxKPI: extract stringify() in their own header file

Add linux/stringify.h as directly included by drivers. Remove the
definitions from compiler.h and include the new header in places
where the stringify macros are already used without linuxkpi.

I have adjusted the Copyright of the new file according to the commit
originaly adding the macros (99e690772adbcb78c9e8441bedcf1913d72ea72f).

Sposnored by: The FreeBSD Foundation
MFC after: 2 weeks
Reviewed by: hselasky
Differential Revision: https://reviews.freebsd.org/D30440


# 4abbf816 28-Jan-2021 Bjoern A. Zeeb <bz@FreeBSD.org>

LinuxKPI: upstream a collection of drm-kmod conflicting changes

The upcoming in-kernel implementations for LinuxKPI based on work on
iwlwifi (and other wireless drivers) conflicts in a few places with
the drm-kmod graphics work outside the base system.

In order to transition smoothly extract the conflicting bits.
This included "unaligned" accessor functions, sg_pcopy_from_buffer(),
IS_*() macros (to be further restricted in the future), power management
bits (possibly no longer conflicting with DRM), and other minor changes.

Obtained-from: bz_iwlwifi
Sponsored-by: The FreeBSD Foundation
MFC after: 3 days
Reviewed by: kib, hselasky, manu, bdragon (looked at earlier versions)
Differential Revision: https://reviews.freebsd.org/D26598


# e23ee5b8 16-Oct-2020 Hans Petter Selasky <hselasky@FreeBSD.org>

Remove ifdefs around IS_ALIGNED() definition in the LinuxKPI.

Discussed with: manu@
MFC after: 1 week
Sponsored by: Mellanox Technologies // NVIDIA Networking


# 0e4e9e8f 26-Jul-2020 Emmanuel Vadot <manu@FreeBSD.org>

linuxkpi: Add taint* defines

This isn't used for us but allow us to port drivers more easily.

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


# d326a6c7 30-Jun-2020 Hans Petter Selasky <hselasky@FreeBSD.org>

Document the is_signed(), type_max() and type_min() function macros in the
LinuxKPI. Try to make the function argument more readable.

Suggested by: several
MFC after: 1 week
Sponsored by: Mellanox Technologies


# d0eed838 29-Jun-2020 Hans Petter Selasky <hselasky@FreeBSD.org>

Implement is_signed(), type_max() and type_min() function macros in the
LinuxKPI.

MFC after: 1 week
Sponsored by: Mellanox Technologies


# d053391c 01-Jun-2020 Hans Petter Selasky <hselasky@FreeBSD.org>

Implement __is_constexpr() function macro in the LinuxKPI.
Bump the FreeBSD version.

MFC after: 1 week
Sponsored by: Mellanox Technologies


# ef5f8c18 02-Jun-2020 Hans Petter Selasky <hselasky@FreeBSD.org>

Implement struct_size() function macro in the LinuxKPI.

MFC after: 1 week
Sponsored by: Mellanox Technologies


# c185f13b 02-Jun-2020 Hans Petter Selasky <hselasky@FreeBSD.org>

Implement BUILD_BUG_ON_ZERO() in the LinuxKPI.
Tested using gcc and clang.

MFC after: 1 week
Sponsored by: Mellanox Technologies


# 8e52f22b 27-May-2020 Emmanuel Vadot <manu@FreeBSD.org>

linuxkpi: Add kstrtou16

This function convert a char * to a u16.
Simply use strtoul and cast to compare for ERANGE

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


# 355711ea 17-May-2020 Emmanuel Vadot <manu@FreeBSD.org>

linuxkpi: Add offsetofend macro

This calculate the offset of the end of the member in the given struct.
Needed by DRM in Linux v5.3

Sponsored-by: The FreeBSD Foudation
Differential Revision: https://reviews.freebsd.org/D24849


# a164a32b 13-May-2020 Andriy Gapon <avg@FreeBSD.org>

linuxkpi: print stack trace in WARN_ON macros

Reviewed by: hselasky, kib
MFC after: 1 week
Differential Revision: https://reviews.freebsd.org/D24779


# 61f7fe6b 01-May-2020 Hans Petter Selasky <hselasky@FreeBSD.org>

Implement kstrtou64() in the LinuxKPI.

Submitted by: ashafer_badland.io (Austin Shafer)
MFC after: 1 week
Sponsored by: Mellanox Technologies


# c4e0746e 15-May-2019 Johannes Lundberg <johalun@FreeBSD.org>

LinuxKPI: Add helper macros IS_ALIGNED and DIV_ROUND_DOWN_ULL.

This patch is part of D19565

Reviewed by: hps
Approved by: imp (mentor), hps
MFC after: 1 week


# 4580f5ea 06-May-2019 Hans Petter Selasky <hselasky@FreeBSD.org>

Allow controlling pr_debug at runtime in the LinuxKPI.

Turning on pr_debug at compile time make it non-optional at runtime.
This often means that the amount of the debugging is unbearable.
Allow developer to turn on pr_debug output only when needed.

Build tested drm-current-kmod prior to commit.

MFC after: 1 week
Submitted by: kib@
Sponsored by: Mellanox Technologies


# 582141f6 14-Mar-2019 Hans Petter Selasky <hselasky@FreeBSD.org>

Revert r345102 until the DRM next port issues are resolved.

Requested by: Johannes Lundberg <johalun0@gmail.com>
MFC after: 1 week
Sponsored by: Mellanox Technologies


# 75f7460b 13-Mar-2019 Hans Petter Selasky <hselasky@FreeBSD.org>

Implement IS_ALIGNED() and DIV_ROUND_DOWN_ULL() function macros in the LinuxKPI.

Submitted by: Johannes Lundberg <johalun0@gmail.com>
MFC after: 1 week
Sponsored by: Limelight Networks
Sponsored by: Mellanox Technologies


# 0df8bab6 16-Nov-2018 Hans Petter Selasky <hselasky@FreeBSD.org>

Define asm macro in the LinuxKPI.

Submitted by: Johannes Lundberg <johalun0@gmail.com>
MFC after: 1 week
Sponsored by: Mellanox Technologies


# e35079db 30-Oct-2018 Hans Petter Selasky <hselasky@FreeBSD.org>

Implement the dump_stack() function in the LinuxKPI.

Submitted by: Johannes Lundberg <johalun0@gmail.com>
MFC after: 3 days
Sponsored by: Mellanox Technologies


# bf05cd05 30-Oct-2018 Hans Petter Selasky <hselasky@FreeBSD.org>

Implement __KERNEL_DIV_ROUND_UP() function macro in the LinuxKPI.

Submitted by: Johannes Lundberg <johalun0@gmail.com>
MFC after: 3 days
Sponsored by: Mellanox Technologies


# 35555d47 11-Jun-2018 Hans Petter Selasky <hselasky@FreeBSD.org>

Implement the kstrtobool() and kstrtobool_from_user() functions
in the LinuxKPI.

Submitted by: Johannes Lundberg <johalun0@gmail.com>
MFC after: 1 week
Sponsored by: Mellanox Technologies
Sponsored by: Limelight Networks


# 83630517 23-Mar-2018 Ed Maste <emaste@FreeBSD.org>

linuxkpi whitespace cleanup

Reviewed by: hselasky, markj
MFC after: 1 week
Differential Revision: https://reviews.freebsd.org/D14807


# cbfc3c73 14-Mar-2018 Hans Petter Selasky <hselasky@FreeBSD.org>

Fix compliancy of the kstrtoXXX() functions in the LinuxKPI, by skipping
one newline character at the end, if any.

Found by: greg@unrelenting.technology
MFC after: 1 week
Sponsored by: Mellanox Technologies


# e9e4ec11 04-Mar-2018 Hans Petter Selasky <hselasky@FreeBSD.org>

Properly wrap the BUILD_BUG() function macro in the LinuxKPI.

MFC after: 1 week
Sponsored by: Mellanox Technologies


# 20c8d827 04-Mar-2018 Hans Petter Selasky <hselasky@FreeBSD.org>

Implement BUILD_BUG() function macro in the LinuxKPI.

MFC after: 1 week
Submitted by: Johannes Lundberg <johalun0@gmail.com>
Sponsored by: Mellanox Technologies
Sponsored by: Limelight Networks


# 2460cbb4 17-Feb-2018 Hans Petter Selasky <hselasky@FreeBSD.org>

Implement BUILD_BUG_ON_INVALID() function macro in the LinuxKPI.

MFC after: 1 week
Submitted by: Johannes Lundberg <johalun0@gmail.com>
Sponsored by: Mellanox Technologies


# ee7c3198 25-Jun-2017 Mark Johnston <markj@FreeBSD.org>

Add u64_to_user_ptr() to the LinuxKPI.

MFC after: 1 week


# 4eb18346 18-Jun-2017 Mark Johnston <markj@FreeBSD.org>

Avoid including list.h in LinuxKPI headers.

list.h includes a number of FreeBSD headers as a workaround for the
LIST_HEAD name collision. To reduce pollution, avoid including list.h
in commonly used headers when it is not explicitly needed.

Reviewed by: hselasky
MFC after: 1 week
Differential Revision: https://reviews.freebsd.org/D11249


# cb564d24 30-May-2017 Mark Johnston <markj@FreeBSD.org>

Add some miscellaneous definitions to support DRM drivers.

Reviewed by: hselasky
MFC after: 1 week
Differential Revision: https://reviews.freebsd.org/D10985


# 8f7eee5a 23-Mar-2017 Hans Petter Selasky <hselasky@FreeBSD.org>

Use ppsratecheck() for ratelimiting in the LinuxKPI.

Suggested by: cem @
MFC after: 1 week
Sponsored by: Mellanox Technologies


# d2f312e0 23-Mar-2017 Hans Petter Selasky <hselasky@FreeBSD.org>

Add proper error checking for the string to number conversion
functions in the LinuxKPI.

MFC after: 1 week
Sponsored by: Mellanox Technologies


# e9db3df2 23-Mar-2017 Hans Petter Selasky <hselasky@FreeBSD.org>

Add support for ratelimited printouts in the LinuxKPI.

MFC after: 1 week
Sponsored by: Mellanox Technologies


# 1e3db1de 20-Feb-2017 Hans Petter Selasky <hselasky@FreeBSD.org>

Make the LinuxKPI task struct persistent accross system calls.

A set of helper functions have been added to manage the life of the
LinuxKPI task struct. When an external system call or task is invoked,
a check is made to create the task struct by demand. A thread
destructor callback is registered to free the task struct when a
thread exits to avoid memory leaks.

This change lays the ground for emulating the Linux kernel more
closely which is a dependency by the code using the LinuxKPI APIs.

Add new dedicated td_lkpi_task field has been added to struct thread
instead of abusing td_retval[1].

Fix some header file inclusions to make LINT kernel build properly
after this change.

Bump the __FreeBSD_version to force a rebuild of all kernel modules.

MFC after: 1 week
Sponsored by: Mellanox Technologies


# ddad2785 16-Feb-2017 Hans Petter Selasky <hselasky@FreeBSD.org>

Allow container_of() to be used with constant data pointers.

Obtained from: kmacy @
MFC after: 1 week
Sponsored by: Mellanox Technologies


# aef2a67b 22-May-2016 Hans Petter Selasky <hselasky@FreeBSD.org>

Add more printf() related functions to the LinuxKPI.

Obtained from: kmacy @
MFC after: 1 week
Sponsored by: Mellanox Technologies


# 03219fba 16-May-2016 Hans Petter Selasky <hselasky@FreeBSD.org>

Properly implement "cpu_has_clflush" macro.

Suggested by: kib, jhb
MFC after: 1 week
Sponsored by: Mellanox Technologies


# abb14a54 13-May-2016 Hans Petter Selasky <hselasky@FreeBSD.org>

Add more Linux defines. Improve some existing ones.

Obtained from: kmacy @
MFC after: 1 week
Sponsored by: Mellanox Technologies


# 510ebed7 03-Mar-2016 Hans Petter Selasky <hselasky@FreeBSD.org>

Add more functions to the LinuxKPI.

Define strnicmp as a function macro instead of a regular macro while
at it.

MFC after: 1 week
Sponsored by: Mellanox Technologies


# fe68f570 26-Jan-2016 Hans Petter Selasky <hselasky@FreeBSD.org>

Update and add various macros to the LinuxKPI and resolve a macro
redefinition issue in the cxgb driver.

MFC after: 1 week
Sponsored by: Mellanox Technologies
Reviewed by: np @


# 8d59ecb2 29-Oct-2015 Hans Petter Selasky <hselasky@FreeBSD.org>

Finish process of moving the LinuxKPI module into the default kernel build.

- Move all files related to the LinuxKPI into sys/compat/linuxkpi and
its subfolders.
- Update sys/conf/files and some Makefiles to use new file locations.
- Added description of COMPAT_LINUXKPI to sys/conf/NOTES which in turn
adds the LinuxKPI to all LINT builds.
- The LinuxKPI can be added to the kernel by setting the
COMPAT_LINUXKPI option. The OFED kernel option no longer builds the
LinuxKPI into the kernel. This was done to keep the build rules for
the LinuxKPI in sys/conf/files simple.
- Extend the LinuxKPI module to include support for USB by moving the
Linux USB compat from usb.ko to linuxkpi.ko.
- Bump the FreeBSD_version.
- A universe kernel build has been done.

Reviewed by: np @ (cxgb and cxgbe related changes only)
Sponsored by: Mellanox Technologies