Date: Wed, 18 Nov 2020 13:47:11 +0000 (UTC) From: Hans Petter Selasky <hselasky@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r367789 - in head/sys/compat/linuxkpi/common/include: asm linux Message-ID: <202011181347.0AIDlBPr079529@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: hselasky Date: Wed Nov 18 13:47:11 2020 New Revision: 367789 URL: https://svnweb.freebsd.org/changeset/base/367789 Log: Allow LinuxKPI types to be used in bootloaders, by checking for the _STANDALONE definition. No functional change intended. MFC after: 1 week Sponsored by: Mellanox Technologies // NVIDIA Networking Modified: head/sys/compat/linuxkpi/common/include/asm/types.h head/sys/compat/linuxkpi/common/include/linux/types.h Modified: head/sys/compat/linuxkpi/common/include/asm/types.h ============================================================================== --- head/sys/compat/linuxkpi/common/include/asm/types.h Wed Nov 18 13:45:32 2020 (r367788) +++ head/sys/compat/linuxkpi/common/include/asm/types.h Wed Nov 18 13:47:11 2020 (r367789) @@ -31,7 +31,7 @@ #ifndef _ASM_TYPES_H_ #define _ASM_TYPES_H_ -#ifdef _KERNEL +#if defined(_KERNEL) || defined(_STANDALONE) #include <sys/types.h> @@ -59,6 +59,6 @@ typedef vm_paddr_t dma64_addr_t; typedef unsigned short umode_t; -#endif /* _KERNEL */ +#endif /* _KERNEL || _STANDALONE */ #endif /* _ASM_TYPES_H_ */ Modified: head/sys/compat/linuxkpi/common/include/linux/types.h ============================================================================== --- head/sys/compat/linuxkpi/common/include/linux/types.h Wed Nov 18 13:45:32 2020 (r367788) +++ head/sys/compat/linuxkpi/common/include/linux/types.h Wed Nov 18 13:47:11 2020 (r367789) @@ -57,8 +57,10 @@ typedef uint16_t __aligned_u16 __aligned(sizeof(uint16 typedef uint32_t __aligned_u32 __aligned(sizeof(uint32_t)); typedef uint64_t __aligned_u64 __aligned(sizeof(uint64_t)); +#ifdef _KERNEL typedef unsigned short ushort; typedef unsigned int uint; +#endif typedef unsigned long ulong; typedef unsigned gfp_t; typedef off_t loff_t; @@ -67,7 +69,7 @@ typedef uint16_t __bitwise__ __sum16; typedef unsigned long pgoff_t; typedef unsigned __poll_t; -typedef u64 phys_addr_t; +typedef uint64_t phys_addr_t; typedef size_t __kernel_size_t;
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202011181347.0AIDlBPr079529>