updated on Thu Jan 26 16:09:46 UTC 2012
[aur-mirror.git] / vmware-patch / vmmon-2.6.37.diff
blob3ee55e511a6f4e62d2a858e1942cd65f7ccc1d76
1 diff -ru vmmon-only/include/compat_semaphore.h vmmon-only/include/compat_semaphore.h
2 --- vmmon-only/include/compat_semaphore.h 2011-01-11 21:55:57.028999997 +0100
3 +++ vmmon-only/include/compat_semaphore.h 2011-01-11 21:58:57.529999998 +0100
4 @@ -45,5 +45,13 @@
5 #endif
6 #endif
8 +#if (defined CONFIG_PREEMPT_RT && LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 31)) || LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 37)
9 + #ifndef DECLARE_MUTEX
10 + #define DECLARE_MUTEX(_m) DEFINE_SEMAPHORE(_m)
11 + #endif
12 + #ifndef init_MUTEX
13 + #define init_MUTEX(_m) sema_init(_m,1)
14 + #endif
15 +#endif
17 #endif /* __COMPAT_SEMAPHORE_H__ */
18 diff -ru vmmon-only/linux/driver.c vmmon-only/linux/driver.c.orig
19 --- vmmon-only/linux/driver.c 2011-01-31 12:41:29.236666671 +0100
20 +++ vmmon-only/linux/driver.c.orig 2010-11-11 21:37:22.000000000 +0100
21 @@ -145,7 +145,7 @@
22 #endif
23 #if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 0) && \
24 (defined(CONFIG_SMP) || defined(CONFIG_PREEMPT))
25 -# define kernel_locked_by_current() (current->lock_depth >= 0)
26 +# define kernel_locked_by_current() kernel_locked()
27 #else
28 # define kernel_locked_by_current() 0
29 #endif
30 --- vmmon-only/linux/driver.c.orig 2010-09-21 04:14:54.000000000 -0400
31 +++ vmmon-only/linux/driver.c 2010-11-19 17:22:02.338155199 -0500
32 @@ -419,7 +419,7 @@
33 memset(&vmuser_fops, 0, sizeof vmuser_fops);
34 vmuser_fops.owner = THIS_MODULE;
35 vmuser_fops.poll = LinuxDriverPoll;
36 -#ifdef VMW_HAVE_UNLOCKED_IOCTL
37 +#if defined(VMW_HAVE_UNLOCKED_IOCTL) || defined(HAVE_UNLOCKED_IOCTL)
38 vmuser_fops.unlocked_ioctl = LinuxDriver_UnlockedIoctl;
39 #else
40 vmuser_fops.ioctl = LinuxDriver_Ioctl;