summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDima Panov <fluffy@FreeBSD.org>2025-06-25 23:18:49 +0300
committerDima Panov <fluffy@FreeBSD.org>2025-06-25 23:21:42 +0300
commite87ea443b592a26f677d446cde816e9c73ec4fcb (patch)
treeaf8908bc9c9d201439fd60fb7f498852dc86ca98
parentx11/cde-devel: Update to the latest cdesktopenv-code commit (diff)
emulators/open-vm-kmod: unbreak build on recent -CURRENT after 797020a76406a8e7a4afbd3706884b58a6e4b4ec (+)
In commit 797020a76406a8e7a4afbd3706884b58a6e4b4ec vm_page_lock() was retired and only one compat shim now is available -- vm_page_tryxbusy() as it used in linux compatibility layer. Adjust code by redefine macros under __FreeBSD_version check PR: 287811 Approved by: garga
-rw-r--r--emulators/open-vm-kmod/files/patch-vmmemctl_os.c22
1 files changed, 19 insertions, 3 deletions
diff --git a/emulators/open-vm-kmod/files/patch-vmmemctl_os.c b/emulators/open-vm-kmod/files/patch-vmmemctl_os.c
index d096f92236c3..d083ec453d4f 100644
--- a/emulators/open-vm-kmod/files/patch-vmmemctl_os.c
+++ b/emulators/open-vm-kmod/files/patch-vmmemctl_os.c
@@ -1,6 +1,22 @@
---- vmmemctl/os.c.orig 2024-10-10 15:05:07 UTC
+--- vmmemctl/os.c.orig 2025-05-15 19:16:07 UTC
+++ vmmemctl/os.c
-@@ -103,7 +103,11 @@ MALLOC_DEFINE(M_VMMEMCTL, BALLOON_NAME, "vmmemctl meta
+@@ -91,8 +91,13 @@ MALLOC_DEFINE(M_VMMEMCTL, BALLOON_NAME, "vmmemctl meta
+ /*
+ * FreeBSD specific MACROS
+ */
+-#define VM_PAGE_LOCK(page) vm_page_lock(page);
+-#define VM_PAGE_UNLOCK(page) vm_page_unlock(page)
++#if __FreeBSD_version < 1500046
++#define VM_PAGE_LOCK(page) vm_page_tryxbusy(page);
++#define VM_PAGE_UNLOCK(page) vm_page_xunbusy(page)
++#else
++#define VM_PAGE_LOCK(page) vm_page_tryxbusy(page);
++#define VM_PAGE_UNLOCK(page) vm_page_xunbusy(page)
++#endif
+
+ #define VM_OBJ_LOCK(object) VM_OBJECT_WLOCK(object)
+ #define VM_OBJ_UNLOCK(object) VM_OBJECT_WUNLOCK(object);
+@@ -103,7 +108,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)
@@ -13,7 +29,7 @@
/*
* Globals
-@@ -404,7 +408,7 @@ os_pmap_free(os_pmap *p) // IN
+@@ -404,7 +413,7 @@ os_pmap_free(os_pmap *p) // IN
static void
os_pmap_free(os_pmap *p) // IN
{