opnsense-src/sys/dev/hyperv/vmbus
Jessica Clarke cb75bb5126 vmbus: Avoid gratuitous ifdef and use more generic implementation instead
Checking for __LP64__ is non-portable as it assumes that ILP32 and LP64
are the only two ABIs that exist, but CheriBSD supports an additional
ABI where long is still 64-bit but pointers are 128-bit capabilities,
and thus __LP64__ is not defined. We could change this to check the
value of __SIZEOF_LONG__, since the code here only cares about that
aspect of the ABI, however in this instance, the only real reason an
ifdef is used at all is to be able to get log2(sizeof(u_long)), but if
we instead multiply and divide rather than shift, and let the compiler
optimise that to a shift, we can just use sizeof(u_long) instead. Note
also that VMBUS_EVTFLAGS_MAX could always just have been defined as
VMBUS_EVTFLAGS_SIZE / sizeof(u_long).

Reviewed by:	jhb
Differential Revision:	https://reviews.freebsd.org/D50630
2025-07-10 20:33:33 +01:00
..
aarch64 sys: Use the new arm_smccc_invoke macros 2024-10-15 18:24:41 +01:00
amd64 sys: Automated cleanup of cdefs and other formatting 2023-11-26 22:24:00 -07:00
i386 sys: Automated cleanup of cdefs and other formatting 2023-11-26 22:24:00 -07:00
x86 sys: Automated cleanup of cdefs and other formatting 2023-11-26 22:24:00 -07:00
hyperv.c Hyper-V: TLB flush enlightment using hypercall 2024-06-07 07:56:07 +00:00
hyperv_busdma.c sys: Automated cleanup of cdefs and other formatting 2023-11-26 22:24:00 -07:00
hyperv_common_reg.h sys: Remove $FreeBSD$: two-line .h pattern 2023-08-16 11:54:11 -06:00
hyperv_mmu.c hyperv: call smp_targeted_tlb_shootdown_native() with pin 2024-10-01 14:45:23 +03:00
hyperv_mmu.h Hyper-V: TLB flush enlightment using hypercall 2024-06-07 07:56:07 +00:00
hyperv_var.h Hyper-V: TLB flush enlightment using hypercall 2024-06-07 07:56:07 +00:00
vmbus.c sys: make the kernel metadata pointer global 2025-01-24 14:25:51 -07:00
vmbus_br.c sys: Automated cleanup of cdefs and other formatting 2023-11-26 22:24:00 -07:00
vmbus_brvar.h Hyper-V: vmbus: check if signaling host is needed in vmbus_rxbr_read 2023-10-20 09:15:21 +00:00
vmbus_chan.c vmbus: Avoid gratuitous ifdef and use more generic implementation instead 2025-07-10 20:33:33 +01:00
vmbus_chanvar.h Deprecate contigfree(9) in favour of free(9) 2024-07-26 10:45:01 +00:00
vmbus_et.c newbus: replace leftover device unit wildcards 2025-06-21 05:57:45 +03:00
vmbus_if.m sys: Remove $FreeBSD$: one-line sh pattern 2023-08-16 11:54:58 -06:00
vmbus_reg.h vmbus: Avoid gratuitous ifdef and use more generic implementation instead 2025-07-10 20:33:33 +01:00
vmbus_res.c sys: Automated cleanup of cdefs and other formatting 2023-11-26 22:24:00 -07:00
vmbus_var.h Retire non-NEW_PCIB code and remove config option 2024-07-18 18:55:12 +01:00
vmbus_xact.c Deprecate contigfree(9) in favour of free(9) 2024-07-26 10:45:01 +00:00