freebsd-skq/sys/i386
Chuck Tuffli 3575504976 Fix the Linux kernel version number calculation
The Linux compatibility code was converting the version number (e.g.
2.6.32) in two different ways and then comparing the results.

The linux_map_osrel() function converted MAJOR.MINOR.PATCH similar to
what FreeBSD does natively. I.e. where major=v0, minor=v1, and patch=v2
    v = v0 * 1000000 + v1 * 1000 + v2;

The LINUX_KERNVER() macro, on the other hand, converted the value with
bit shifts. I.e. where major=a, minor=b, and patch=c
    v = (((a) << 16) + ((b) << 8) + (c))

The Linux kernel uses the later format via the KERNEL_VERSION() macro in
include/generated/uapi/linux/version.h

Fix is to use the LINUX_KERNVER() macro in linux_map_osrel() as well as
in the .trans_osrel functions.

PR: 229209
Reviewed by: emaste, cem, imp (mentor)
Approved by: imp (mentor)
Differential Revision: https://reviews.freebsd.org/D15952
2018-06-22 00:02:03 +00:00
..
acpica Rename assym.s to assym.inc 2018-03-20 17:58:51 +00:00
bios Use NULL for SYSINIT's last arg, which is a pointer type 2018-05-18 17:58:09 +00:00
cloudabi32 Use TO_PTR() to convert integers to pointers. 2017-11-26 14:45:56 +00:00
conf Finish COMPAT_AOUT support for amd64. It wasn't in any amd64 or MI 2018-06-02 06:40:15 +00:00
i386 Reorganize code flow in fpudna()/npxdna() to highlight the critical 2018-06-14 11:09:51 +00:00
ibcs2 Regen after 335177 (rename sys_obreak to sys_break). 2018-06-14 21:29:31 +00:00
include Tell the compiler that rdtscp clobbers %ecx. 2018-06-09 18:31:19 +00:00
linux Fix the Linux kernel version number calculation 2018-06-22 00:02:03 +00:00
pci Correct pseudo misspelling in sys/ comments 2018-02-23 18:15:50 +00:00
Makefile