opnsense-src/sys
Alex Richardson 9bb8a4091c Reduce code duplication in machine/_types.h
Many of these typedefs are the same across all architectures or can
be set based on an architecture-independent compiler-provided macro
(e.g. __SIZEOF_SIZE_T__). These macros have been available since GCC 4.6
and Clang sometime before 3.0 (godbolt.org does not have any older clang
versions installed).

I originally considered using the compiler-provided `__FOO_TYPE__` directly.
However, in order to do so we have to check that those match the previous
typedef exactly (not just that they have the same size) since any change
would be an ABI break. For example, changing `long` to `long long` results
in different C++ name mangling. Additionally, Clang and GCC disagree on
the underlying type for some of (u)int*_fast_t types, so this change
only moves the definitions that are identical across all architectures
and does not touch those types.

This de-deduplication will allow us to have a smaller diff downstream in
CheriBSD: we only have to only change the (u)intptr_t definition in
sys/_types.h in CheriBSD instead of having to change machine/_types.h for
all CHERI-enabled architectures (currently RISC-V, AArch64 and MIPS).

Reviewed By: imp, kib
Differential Revision: https://reviews.freebsd.org/D29895
2021-06-14 16:30:16 +01:00
..
amd64 an: Remove driver 2021-06-12 01:08:54 +02:00
arm Reduce code duplication in machine/_types.h 2021-06-14 16:30:16 +01:00
arm64 Reduce code duplication in machine/_types.h 2021-06-14 16:30:16 +01:00
bsm
cam sg: get rid of unused include. 2021-06-13 11:30:49 +03:00
cddl fbt: Remove some handling for multiple CTF containers 2021-04-02 17:49:13 -04:00
compat linuxkpi: Add list_for_each_entry_lockless() macro 2021-06-10 08:15:29 -07:00
conf Remove an(4) leftover from conf/NOTES 2021-06-12 08:58:11 +00:00
contrib zfs: merge openzfs/zfs@afa7b3484 (master) into main 2021-06-13 04:38:47 +02:00
crypto ossl: Use crypto_cursor_segment(). 2021-05-25 16:59:19 -07:00
ddb fix style nit: space after if 2021-05-05 15:26:09 -06:00
dev USB/U3G: Added Panasonic CF-F9 GOBI 3G modem to U3G module. 2021-06-13 10:23:01 -06:00
dts arm64: rockchip: Add some DTSO to disable sd/mmc 2021-05-13 18:15:31 +02:00
fs krpc: Acquire ref count of CLIENT for backchannel use 2021-06-11 16:57:14 -07:00
gdb gdb: report specific stop reason for watchpoints 2021-03-30 11:36:41 -03:00
geom gconcat: Add new lock to allow modifications to the disk list in preparation for online append 2021-06-02 15:59:25 -06:00
gnu
i386 an: Remove driver 2021-06-12 01:08:54 +02:00
isa Remove more remnants of sio(4) 2021-04-07 14:33:02 -04:00
kern ktls: Fix interaction with RATELIMIT 2021-06-14 10:51:16 -04:00
kgssapi
libkern Use '.arch_extension crc' in the arm64 crc32 code 2021-05-06 07:42:35 +00:00
mips Reduce code duplication in machine/_types.h 2021-06-14 16:30:16 +01:00
modules zfs: merge openzfs/zfs@afa7b3484 (master) into main 2021-06-13 04:38:47 +02:00
net pf: store L4 headers in pf_pdesc 2021-06-14 14:22:06 +02:00
net80211 net80211/LinuxKPI: add more radiotap definitions 2021-06-05 16:21:49 +00:00
netgraph netgraph/bridge: malloc without flags 2021-06-14 15:41:46 +02:00
netinet tcp: remove debug output from RACK 2021-06-11 20:23:39 +02:00
netinet6 Enter the net epoch before calling ip6_setpktopts 2021-06-04 13:18:11 -04:00
netipsec Add missing sockaddr length and family validation to various protocols 2021-05-03 13:35:19 -04:00
netpfil pf: store L4 headers in pf_pdesc 2021-06-14 14:22:06 +02:00
netsmb netsmb: Avoid a read-after-free in smb_t2_request_int() 2021-05-26 10:45:40 -04:00
nfs Fix panic when using BOOTP to resolve root path. 2021-03-28 14:02:40 -05:00
nfsclient nfs: Cleanup dead files 2021-03-17 06:16:31 +11:00
nfsserver nfs: Cleanup dead files 2021-03-17 06:16:31 +11:00
nlm
ofed OFED: migrate LinuxKPI net_device/ifnet macros into ofed 2021-05-27 12:26:01 +00:00
opencrypto cryptosoft: Use crypto_cursor_segment(). 2021-05-25 16:59:19 -07:00
powerpc Reduce code duplication in machine/_types.h 2021-06-14 16:30:16 +01:00
riscv Reduce code duplication in machine/_types.h 2021-06-14 16:30:16 +01:00
rpc krpc: Acquire ref count of CLIENT for backchannel use 2021-06-11 16:57:14 -07:00
security tcp_input/syncache: acquire only read lock on PCB for SYN,!ACK packets 2021-04-12 08:25:31 -07:00
sys Reduce code duplication in machine/_types.h 2021-06-14 16:30:16 +01:00
teken
tests Revise FIB lookups per second benchmarking routines. 2021-05-05 12:28:17 +02:00
tools makesyscalls.lua: improve generated file style(9) compliance 2021-05-13 13:59:25 -04:00
ufs ffs: Correct the input size check in sysctl_ffs_fsck() 2021-05-31 18:59:18 -04:00
vm vm: add another pager private flag 2021-05-15 20:47:29 +00:00
x86 Reduce code duplication in machine/_types.h 2021-06-14 16:30:16 +01:00
xdr
xen x86/xen: remove PVHv1 code 2021-05-17 11:41:21 +02:00
Makefile