summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVadim Kuznetsov <vadimk@gentoo.org>2011-03-30 14:48:33 +0000
committerVadim Kuznetsov <vadimk@gentoo.org>2011-03-30 14:48:33 +0000
commit8a43179afb90d474cfa2cc96b994b78576db0fa7 (patch)
tree9bfc5e230cf8d081eb1100ecb44b9fb9c2dee6e4 /app-emulation/vmware-modules/files
parentRevision bump: fix building with net-libs/gnutls[nettle] (bug #361307); avoid... (diff)
downloadgentoo-2-8a43179afb90d474cfa2cc96b994b78576db0fa7.tar.gz
gentoo-2-8a43179afb90d474cfa2cc96b994b78576db0fa7.tar.bz2
gentoo-2-8a43179afb90d474cfa2cc96b994b78576db0fa7.zip
fixed sema patch
(Portage version: 2.1.9.45/cvs/Linux x86_64)
Diffstat (limited to 'app-emulation/vmware-modules/files')
-rw-r--r--app-emulation/vmware-modules/files/208-sema.patch141
1 files changed, 75 insertions, 66 deletions
diff --git a/app-emulation/vmware-modules/files/208-sema.patch b/app-emulation/vmware-modules/files/208-sema.patch
index 1ebdab7ee009..cbfbe9a3ab52 100644
--- a/app-emulation/vmware-modules/files/208-sema.patch
+++ b/app-emulation/vmware-modules/files/208-sema.patch
@@ -1,83 +1,92 @@
-diff -ru original//vmci-only/include/compat_semaphore.h patched//vmci-only/include/compat_semaphore.h
---- original//vmci-only/include/compat_semaphore.h 2010-11-11 15:37:25.000000000 -0500
-+++ patched//vmci-only/include/compat_semaphore.h 2010-11-20 10:11:56.000000000 -0500
-@@ -28,7 +28,7 @@
+diff --git a/vmci-only/include/compat_semaphore.h b/vmci-only/include/compat_semaphore.h
+index f5527b9..bc37afd 100644
+--- a/vmci-only/include/compat_semaphore.h
++++ b/vmci-only/include/compat_semaphore.h
+@@ -45,5 +45,13 @@
+ #endif
#endif
-
--#if defined CONFIG_PREEMPT_RT && LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 31)
+#if (defined CONFIG_PREEMPT_RT && LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 31)) || LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 37)
- /*
- * The -rt patch series changes the name of semaphore/mutex initialization
- * routines (across the entire kernel). Probably to identify locations that
-@@ -41,7 +41,7 @@
- #define DECLARE_MUTEX(_m) DEFINE_SEMAPHORE(_m)
- #endif
- #ifndef init_MUTEX
-- #define init_MUTEX(_m) semaphore_init(_m)
++ #ifndef DECLARE_MUTEX
++ #define DECLARE_MUTEX(_m) DEFINE_SEMAPHORE(_m)
++ #endif
++ #ifndef init_MUTEX
+ #define init_MUTEX(_m) sema_init(_m,1)
- #endif
- #endif
++ #endif
++#endif
-diff -ru original//vmmon-only/linux/driver.c patched//vmmon-only/linux/driver.c
---- original//vmmon-only/linux/driver.c 2010-11-11 15:37:22.000000000 -0500
-+++ patched//vmmon-only/linux/driver.c 2010-11-29 23:09:16.000000000 -0500
-@@ -145,7 +145,7 @@
- #endif
- #if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 0) && \
- (defined(CONFIG_SMP) || defined(CONFIG_PREEMPT))
--# define kernel_locked_by_current() kernel_locked()
-+# define kernel_locked_by_current() (current->lock_depth >= 0)
- #else
- # define kernel_locked_by_current() 0
- #endif
-@@ -170,6 +170,7 @@
- static int LinuxDriver_Ioctl(struct inode *inode, struct file *filp,
- u_int iocmd, unsigned long ioarg);
- #if defined(HAVE_UNLOCKED_IOCTL) || defined(HAVE_COMPAT_IOCTL)
-+#define VMW_HAVE_UNLOCKED_IOCTL
- static long LinuxDriver_UnlockedIoctl(struct file *filp,
- u_int iocmd, unsigned long ioarg);
- #endif
-diff -ru original//vmnet-only/compat_semaphore.h patched//vmnet-only/compat_semaphore.h
---- original//vmnet-only/compat_semaphore.h 2010-11-11 15:37:23.000000000 -0500
-+++ patched//vmnet-only/compat_semaphore.h 2010-11-20 10:11:56.000000000 -0500
-@@ -28,7 +28,7 @@
+ #endif /* __COMPAT_SEMAPHORE_H__ */
+diff --git a/vmmon-only/include/compat_semaphore.h b/vmmon-only/include/compat_semaphore.h
+index f5527b9..bc37afd 100644
+--- a/vmmon-only/include/compat_semaphore.h
++++ b/vmmon-only/include/compat_semaphore.h
+@@ -45,5 +45,13 @@
+ #endif
#endif
-
--#if defined CONFIG_PREEMPT_RT && LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 31)
+#if (defined CONFIG_PREEMPT_RT && LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 31)) || LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 37)
- /*
- * The -rt patch series changes the name of semaphore/mutex initialization
- * routines (across the entire kernel). Probably to identify locations that
-@@ -41,7 +41,7 @@
- #define DECLARE_MUTEX(_m) DEFINE_SEMAPHORE(_m)
- #endif
- #ifndef init_MUTEX
-- #define init_MUTEX(_m) semaphore_init(_m)
++ #ifndef DECLARE_MUTEX
++ #define DECLARE_MUTEX(_m) DEFINE_SEMAPHORE(_m)
++ #endif
++ #ifndef init_MUTEX
+ #define init_MUTEX(_m) sema_init(_m,1)
- #endif
- #endif
++ #endif
++#endif
-diff -ru original//vsock-only/shared/compat_semaphore.h patched//vsock-only/shared/compat_semaphore.h
---- original//vsock-only/shared/compat_semaphore.h 2010-11-11 13:04:44.000000000 -0500
-+++ patched//vsock-only/shared/compat_semaphore.h 2010-11-20 10:11:56.000000000 -0500
-@@ -28,7 +28,7 @@
+ #endif /* __COMPAT_SEMAPHORE_H__ */
+diff --git a/vmnet-only/compat_semaphore.h b/vmnet-only/compat_semaphore.h
+index f5527b9..548782d 100644
+--- a/vmnet-only/compat_semaphore.h
++++ b/vmnet-only/compat_semaphore.h
+@@ -45,5 +45,14 @@
+ #endif
#endif
++#if (defined CONFIG_PREEMPT_RT && LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 31)) || LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 37)
++ #ifndef DECLARE_MUTEX
++ #define DECLARE_MUTEX(_m) DEFINE_SEMAPHORE(_m)
++ #endif
++ #ifndef init_MUTEX
++ #define init_MUTEX(_m) sema_init(_m,1)
++ #endif
++#endif
++
--#if defined CONFIG_PREEMPT_RT && LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 31)
+ #endif /* __COMPAT_SEMAPHORE_H__ */
+diff --git a/vmnet-only/vnetFilter.h b/vmnet-only/vnetFilter.h
+index fe5c71f..303009f 100644
+--- a/vmnet-only/vnetFilter.h
++++ b/vmnet-only/vnetFilter.h
+@@ -203,5 +203,13 @@ struct VNet_SetLogLevel {
+ }
+ #include "vmware_pack_end.h"
+ VNet_SetLogLevel;
+#if (defined CONFIG_PREEMPT_RT && LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 31)) || LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 37)
- /*
- * The -rt patch series changes the name of semaphore/mutex initialization
- * routines (across the entire kernel). Probably to identify locations that
-@@ -41,7 +41,7 @@
- #define DECLARE_MUTEX(_m) DEFINE_SEMAPHORE(_m)
- #endif
- #ifndef init_MUTEX
-- #define init_MUTEX(_m) semaphore_init(_m)
++ #ifndef DECLARE_MUTEX
++ #define DECLARE_MUTEX(_m) DEFINE_SEMAPHORE(_m)
++ #endif
++ #ifndef init_MUTEX
+ #define init_MUTEX(_m) sema_init(_m,1)
- #endif
++ #endif
++#endif
+
+ #endif // ifndef _VNETFILTER_H_
+diff --git a/vsock-only/linux/af_vsock.h b/vsock-only/linux/af_vsock.h
+index 3a8a0ce..d36b2ae 100644
+--- a/vsock-only/linux/af_vsock.h
++++ b/vsock-only/linux/af_vsock.h
+@@ -88,4 +88,14 @@ typedef struct VSockVmciSock {
#endif
+ } VSockVmciSock;
++#if (defined CONFIG_PREEMPT_RT && LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 31)) || LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 37)
++ #ifndef DECLARE_MUTEX
++ #define DECLARE_MUTEX(_m) DEFINE_SEMAPHORE(_m)
++ #endif
++ #ifndef init_MUTEX
++ #define init_MUTEX(_m) sema_init(_m,1)
++ #endif
++#endif
++
++
+ #endif /* __AF_VSOCK_H__ */