diff options
author | Baptiste Daroussin <bapt@FreeBSD.org> | 2024-12-12 17:46:02 +0100 |
---|---|---|
committer | Baptiste Daroussin <bapt@FreeBSD.org> | 2024-12-12 18:18:23 +0100 |
commit | 77dbd57b8e9dad16375ba7a249b8046dd66d1c46 (patch) | |
tree | ec5ddb7ef8c8cfdd3307c26cd7352085b2d011fd /emulators/open-vm-kmod/files/patch-vmmemctl_os.c | |
parent | science/PETSc: Correction (diff) |
emulators/open-vm-{tools,kmod}: split the package
Split the package to build the kmods separatly! Building separately has
multiple benefits:
1. it allows user to rebuild when they upgrade their kernel without
rebuilding all of the tools which can take a long time.
2. it allows us to provide the modules in the new kmods package
repository
3. it installs the kmods the in the same place as the regular kmods:
/boot/modules
It means we can probably get rid of the rc script in favor if letting
users use kld_list mecanism but I will let this decision to the
maintainer based on what it probably best for users.
Approved by: garga (maintainer)
Reviewed by: garga (maintainer)
Differential Revision: https://reviews.freebsd.org/D48059
Diffstat (limited to 'emulators/open-vm-kmod/files/patch-vmmemctl_os.c')
-rw-r--r-- | emulators/open-vm-kmod/files/patch-vmmemctl_os.c | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/emulators/open-vm-kmod/files/patch-vmmemctl_os.c b/emulators/open-vm-kmod/files/patch-vmmemctl_os.c new file mode 100644 index 000000000000..d096f92236c3 --- /dev/null +++ b/emulators/open-vm-kmod/files/patch-vmmemctl_os.c @@ -0,0 +1,24 @@ +--- vmmemctl/os.c.orig 2024-10-10 15:05:07 UTC ++++ vmmemctl/os.c +@@ -103,7 +103,11 @@ MALLOC_DEFINE(M_VMMEMCTL, BALLOON_NAME, "vmmemctl meta + #define KVA_FREE(offset, size) kva_free(offset, size) + + #define KMEM_ALLOC(size) kmem_malloc(size, M_WAITOK | M_ZERO) +-#define KMEM_FREE(offset, size) kmem_free(offset, size) ++#if __FreeBSD_version < 1400070 ++ #define KMEM_FREE(offset, size) kmem_free((vm_offset_t)offset, size) ++#else ++ #define KMEM_FREE(offset, size) kmem_free(offset, size) ++#endif + + /* + * Globals +@@ -404,7 +408,7 @@ os_pmap_free(os_pmap *p) // IN + static void + os_pmap_free(os_pmap *p) // IN + { +- KMEM_FREE((vm_offset_t)p->bitmap, p->size); ++ KMEM_FREE(p->bitmap, p->size); + p->size = 0; + p->bitmap = NULL; + } |