freebsd-dev/sys/x86
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
..
acpica Disable x2APIC for SandyBridge laptops with Samsung BIOS 2021-06-03 22:47:31 +03:00
bios smbios: Move smbios driver out from x86 machdep code 2021-02-23 21:17:09 +00:00
conf Use envvar rather than nonstandard hint. lines 2020-09-23 19:18:53 +00:00
cpufreq hwpstate_intel: don't unconditionally print the error message 2020-11-29 01:43:04 +00:00
include Reduce code duplication in machine/_types.h 2021-06-14 16:30:16 +01:00
iommu dmar: reserve memory windows of PCIe root port 2020-12-09 18:43:58 +00:00
isa amd64: Add MD bits for KASAN 2021-04-13 17:42:20 -04:00
linux linux: deduplicate DUMMY() entries 2021-05-29 17:51:36 +00:00
pci x86: clean up empty lines in .c and .h files 2020-09-01 21:23:59 +00:00
x86 i386: Make setidt_disp a size_t instead of uintptr_t 2021-06-01 19:37:50 -04:00
xen x86/xen: further PVHv1 removal cleanup 2021-05-18 10:43:31 +02:00