From 8b676ab135be20abe601aef8b908aba65c0c12ef Mon Sep 17 00:00:00 2001 From: knu Date: Thu, 12 Jul 2001 14:26:10 +0000 Subject: Fix for the latest CURRENT. (SMPng folks, feel free to correct it if it's a wrong fix) Tested by: kuriyama --- emulators/vmware2/Makefile | 6 +---- emulators/vmware2/files/patch-be | 52 +++++++++++++++++++++++++++++----------- emulators/vmware3/Makefile | 6 +---- emulators/vmware3/files/patch-be | 52 +++++++++++++++++++++++++++++----------- 4 files changed, 78 insertions(+), 38 deletions(-) (limited to 'emulators') diff --git a/emulators/vmware2/Makefile b/emulators/vmware2/Makefile index 6fc7ca9ada3..e80642e66b9 100644 --- a/emulators/vmware2/Makefile +++ b/emulators/vmware2/Makefile @@ -8,7 +8,7 @@ PORTNAME= vmware2 PORTVERSION= 2.0.3.799 -PORTREVISION= 1 +PORTREVISION= 2 CATEGORIES= emulators linux MASTER_SITES= http://www4.vmware.com/software/ \ ${FREEBSD_MODULE_SITES} \ @@ -98,10 +98,6 @@ post-patch: ${WRKSRC}/vmmon-only/freebsd/*.c .endif cd ${WRKSRC}/vmmon-only/freebsd && ${TOUCH} bus_if.h device_if.h -.if ${OSVERSION} >= 500018 - ${PERL} -i -pe 's,,,' \ - ${WRKSRC}/vmmon-only/freebsd/*.c -.endif .if ${OSVERSION} >= 500019 ${PERL} -i -pe 's,,,' \ ${WRKSRC}/vmmon-only/freebsd/*.c \ diff --git a/emulators/vmware2/files/patch-be b/emulators/vmware2/files/patch-be index 0f1463f0bf8..1bfac1cee74 100644 --- a/emulators/vmware2/files/patch-be +++ b/emulators/vmware2/files/patch-be @@ -1,61 +1,85 @@ ---- vmmon-only/freebsd/hostif.c.orig Wed Jun 6 22:49:52 2001 -+++ vmmon-only/freebsd/hostif.c Thu Jun 7 13:13:02 2001 -@@ -107,7 +107,13 @@ +--- vmmon-only/freebsd/hostif.c.orig Thu Jul 12 22:05:29 2001 ++++ vmmon-only/freebsd/hostif.c Thu Jul 12 22:14:09 2001 +@@ -55,7 +55,11 @@ + + #include + #include ++#if __FreeBSD_version >= 500018 ++#include ++#else + #include ++#endif + #include + #include + #include +@@ -107,7 +111,16 @@ paddr = (vm_offset_t)addr; m = PHYS_TO_VM_PAGE(paddr); -+#if __FreeBSD_version >= 500013 ++#if __FreeBSD_version >= 500021 ++ GIANT_REQUIRED; ++#elif __FreeBSD_version >= 500013 + mtx_lock(&vm_mtx); +#endif vm_page_wire(m); -+#if __FreeBSD_version >= 500013 ++#if __FreeBSD_version >= 500021 ++#elif __FreeBSD_version >= 500013 + mtx_unlock(&vm_mtx); +#endif return 0; } -@@ -120,7 +126,13 @@ +@@ -120,7 +133,16 @@ paddr = (vm_offset_t)addr; m = PHYS_TO_VM_PAGE(paddr); -+#if __FreeBSD_version >= 500013 ++#if __FreeBSD_version >= 500021 ++ GIANT_REQUIRED; ++#elif __FreeBSD_version >= 500013 + mtx_lock(&vm_mtx); +#endif vm_page_unwire(m, 1); -+#if __FreeBSD_version >= 500013 ++#if __FreeBSD_version >= 500021 ++#elif __FreeBSD_version >= 500013 + mtx_unlock(&vm_mtx); +#endif return 0; } -@@ -1066,10 +1078,16 @@ +@@ -1066,10 +1088,19 @@ return NULL; } paddr = vtophys(addr); -+#if __FreeBSD_version >= 500013 ++#if __FreeBSD_version >= 500021 ++ GIANT_REQUIRED; ++#elif __FreeBSD_version >= 500013 + mtx_lock(&vm_mtx); +#endif ka->kaddr = kmem_alloc_pageable(kernel_map, PAGE_SIZE); ka->map = PHYS_TO_VM_PAGE(paddr); vm_page_wire(ka->map); pmap_kenter(ka->kaddr, paddr); -+#if __FreeBSD_version >= 500013 ++#if __FreeBSD_version >= 500021 ++#elif __FreeBSD_version >= 500013 + mtx_unlock(&vm_mtx); +#endif return ka->kaddr; } -@@ -1079,9 +1097,15 @@ +@@ -1079,9 +1110,18 @@ if (ka->map==NULL) return 0; -+#if __FreeBSD_version >= 500013 ++#if __FreeBSD_version >= 500021 ++ GIANT_REQUIRED; ++#elif __FreeBSD_version >= 500013 + mtx_lock(&vm_mtx); +#endif vm_page_unwire(ka->map, 1); pmap_kremove(ka->kaddr); kmem_free(kernel_map, ka->kaddr, PAGE_SIZE); -+#if __FreeBSD_version >= 500013 ++#if __FreeBSD_version >= 500021 ++#elif __FreeBSD_version >= 500013 + mtx_unlock(&vm_mtx); +#endif ka->kaddr = 0; diff --git a/emulators/vmware3/Makefile b/emulators/vmware3/Makefile index 6fc7ca9ada3..e80642e66b9 100644 --- a/emulators/vmware3/Makefile +++ b/emulators/vmware3/Makefile @@ -8,7 +8,7 @@ PORTNAME= vmware2 PORTVERSION= 2.0.3.799 -PORTREVISION= 1 +PORTREVISION= 2 CATEGORIES= emulators linux MASTER_SITES= http://www4.vmware.com/software/ \ ${FREEBSD_MODULE_SITES} \ @@ -98,10 +98,6 @@ post-patch: ${WRKSRC}/vmmon-only/freebsd/*.c .endif cd ${WRKSRC}/vmmon-only/freebsd && ${TOUCH} bus_if.h device_if.h -.if ${OSVERSION} >= 500018 - ${PERL} -i -pe 's,,,' \ - ${WRKSRC}/vmmon-only/freebsd/*.c -.endif .if ${OSVERSION} >= 500019 ${PERL} -i -pe 's,,,' \ ${WRKSRC}/vmmon-only/freebsd/*.c \ diff --git a/emulators/vmware3/files/patch-be b/emulators/vmware3/files/patch-be index 0f1463f0bf8..1bfac1cee74 100644 --- a/emulators/vmware3/files/patch-be +++ b/emulators/vmware3/files/patch-be @@ -1,61 +1,85 @@ ---- vmmon-only/freebsd/hostif.c.orig Wed Jun 6 22:49:52 2001 -+++ vmmon-only/freebsd/hostif.c Thu Jun 7 13:13:02 2001 -@@ -107,7 +107,13 @@ +--- vmmon-only/freebsd/hostif.c.orig Thu Jul 12 22:05:29 2001 ++++ vmmon-only/freebsd/hostif.c Thu Jul 12 22:14:09 2001 +@@ -55,7 +55,11 @@ + + #include + #include ++#if __FreeBSD_version >= 500018 ++#include ++#else + #include ++#endif + #include + #include + #include +@@ -107,7 +111,16 @@ paddr = (vm_offset_t)addr; m = PHYS_TO_VM_PAGE(paddr); -+#if __FreeBSD_version >= 500013 ++#if __FreeBSD_version >= 500021 ++ GIANT_REQUIRED; ++#elif __FreeBSD_version >= 500013 + mtx_lock(&vm_mtx); +#endif vm_page_wire(m); -+#if __FreeBSD_version >= 500013 ++#if __FreeBSD_version >= 500021 ++#elif __FreeBSD_version >= 500013 + mtx_unlock(&vm_mtx); +#endif return 0; } -@@ -120,7 +126,13 @@ +@@ -120,7 +133,16 @@ paddr = (vm_offset_t)addr; m = PHYS_TO_VM_PAGE(paddr); -+#if __FreeBSD_version >= 500013 ++#if __FreeBSD_version >= 500021 ++ GIANT_REQUIRED; ++#elif __FreeBSD_version >= 500013 + mtx_lock(&vm_mtx); +#endif vm_page_unwire(m, 1); -+#if __FreeBSD_version >= 500013 ++#if __FreeBSD_version >= 500021 ++#elif __FreeBSD_version >= 500013 + mtx_unlock(&vm_mtx); +#endif return 0; } -@@ -1066,10 +1078,16 @@ +@@ -1066,10 +1088,19 @@ return NULL; } paddr = vtophys(addr); -+#if __FreeBSD_version >= 500013 ++#if __FreeBSD_version >= 500021 ++ GIANT_REQUIRED; ++#elif __FreeBSD_version >= 500013 + mtx_lock(&vm_mtx); +#endif ka->kaddr = kmem_alloc_pageable(kernel_map, PAGE_SIZE); ka->map = PHYS_TO_VM_PAGE(paddr); vm_page_wire(ka->map); pmap_kenter(ka->kaddr, paddr); -+#if __FreeBSD_version >= 500013 ++#if __FreeBSD_version >= 500021 ++#elif __FreeBSD_version >= 500013 + mtx_unlock(&vm_mtx); +#endif return ka->kaddr; } -@@ -1079,9 +1097,15 @@ +@@ -1079,9 +1110,18 @@ if (ka->map==NULL) return 0; -+#if __FreeBSD_version >= 500013 ++#if __FreeBSD_version >= 500021 ++ GIANT_REQUIRED; ++#elif __FreeBSD_version >= 500013 + mtx_lock(&vm_mtx); +#endif vm_page_unwire(ka->map, 1); pmap_kremove(ka->kaddr); kmem_free(kernel_map, ka->kaddr, PAGE_SIZE); -+#if __FreeBSD_version >= 500013 ++#if __FreeBSD_version >= 500021 ++#elif __FreeBSD_version >= 500013 + mtx_unlock(&vm_mtx); +#endif ka->kaddr = 0; -- cgit