Gentoo Archives: gentoo-commits

From: "Vadim Kuznetsov (vadimk)" <vadimk@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] gentoo-x86 commit in app-emulation/vmware-modules/files: 208-sema.patch
Date: Wed, 30 Mar 2011 14:48:43
Message-Id: 20110330144833.9058920057@flycatcher.gentoo.org
1 vadimk 11/03/30 14:48:33
2
3 Modified: 208-sema.patch
4 Log:
5 fixed sema patch
6
7 (Portage version: 2.1.9.45/cvs/Linux x86_64)
8
9 Revision Changes Path
10 1.2 app-emulation/vmware-modules/files/208-sema.patch
11
12 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/app-emulation/vmware-modules/files/208-sema.patch?rev=1.2&view=markup
13 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/app-emulation/vmware-modules/files/208-sema.patch?rev=1.2&content-type=text/plain
14 diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/app-emulation/vmware-modules/files/208-sema.patch?r1=1.1&r2=1.2
15
16 Index: 208-sema.patch
17 ===================================================================
18 RCS file: /var/cvsroot/gentoo-x86/app-emulation/vmware-modules/files/208-sema.patch,v
19 retrieving revision 1.1
20 retrieving revision 1.2
21 diff -u -r1.1 -r1.2
22 --- 208-sema.patch 27 Mar 2011 15:40:08 -0000 1.1
23 +++ 208-sema.patch 30 Mar 2011 14:48:33 -0000 1.2
24 @@ -1,83 +1,92 @@
25 -diff -ru original//vmci-only/include/compat_semaphore.h patched//vmci-only/include/compat_semaphore.h
26 ---- original//vmci-only/include/compat_semaphore.h 2010-11-11 15:37:25.000000000 -0500
27 -+++ patched//vmci-only/include/compat_semaphore.h 2010-11-20 10:11:56.000000000 -0500
28 -@@ -28,7 +28,7 @@
29 +diff --git a/vmci-only/include/compat_semaphore.h b/vmci-only/include/compat_semaphore.h
30 +index f5527b9..bc37afd 100644
31 +--- a/vmci-only/include/compat_semaphore.h
32 ++++ b/vmci-only/include/compat_semaphore.h
33 +@@ -45,5 +45,13 @@
34 + #endif
35 #endif
36
37 -
38 --#if defined CONFIG_PREEMPT_RT && LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 31)
39 +#if (defined CONFIG_PREEMPT_RT && LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 31)) || LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 37)
40 - /*
41 - * The -rt patch series changes the name of semaphore/mutex initialization
42 - * routines (across the entire kernel). Probably to identify locations that
43 -@@ -41,7 +41,7 @@
44 - #define DECLARE_MUTEX(_m) DEFINE_SEMAPHORE(_m)
45 - #endif
46 - #ifndef init_MUTEX
47 -- #define init_MUTEX(_m) semaphore_init(_m)
48 ++ #ifndef DECLARE_MUTEX
49 ++ #define DECLARE_MUTEX(_m) DEFINE_SEMAPHORE(_m)
50 ++ #endif
51 ++ #ifndef init_MUTEX
52 + #define init_MUTEX(_m) sema_init(_m,1)
53 - #endif
54 - #endif
55 ++ #endif
56 ++#endif
57
58 -diff -ru original//vmmon-only/linux/driver.c patched//vmmon-only/linux/driver.c
59 ---- original//vmmon-only/linux/driver.c 2010-11-11 15:37:22.000000000 -0500
60 -+++ patched//vmmon-only/linux/driver.c 2010-11-29 23:09:16.000000000 -0500
61 -@@ -145,7 +145,7 @@
62 - #endif
63 - #if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 0) && \
64 - (defined(CONFIG_SMP) || defined(CONFIG_PREEMPT))
65 --# define kernel_locked_by_current() kernel_locked()
66 -+# define kernel_locked_by_current() (current->lock_depth >= 0)
67 - #else
68 - # define kernel_locked_by_current() 0
69 - #endif
70 -@@ -170,6 +170,7 @@
71 - static int LinuxDriver_Ioctl(struct inode *inode, struct file *filp,
72 - u_int iocmd, unsigned long ioarg);
73 - #if defined(HAVE_UNLOCKED_IOCTL) || defined(HAVE_COMPAT_IOCTL)
74 -+#define VMW_HAVE_UNLOCKED_IOCTL
75 - static long LinuxDriver_UnlockedIoctl(struct file *filp,
76 - u_int iocmd, unsigned long ioarg);
77 - #endif
78 -diff -ru original//vmnet-only/compat_semaphore.h patched//vmnet-only/compat_semaphore.h
79 ---- original//vmnet-only/compat_semaphore.h 2010-11-11 15:37:23.000000000 -0500
80 -+++ patched//vmnet-only/compat_semaphore.h 2010-11-20 10:11:56.000000000 -0500
81 -@@ -28,7 +28,7 @@
82 + #endif /* __COMPAT_SEMAPHORE_H__ */
83 +diff --git a/vmmon-only/include/compat_semaphore.h b/vmmon-only/include/compat_semaphore.h
84 +index f5527b9..bc37afd 100644
85 +--- a/vmmon-only/include/compat_semaphore.h
86 ++++ b/vmmon-only/include/compat_semaphore.h
87 +@@ -45,5 +45,13 @@
88 + #endif
89 #endif
90
91 -
92 --#if defined CONFIG_PREEMPT_RT && LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 31)
93 +#if (defined CONFIG_PREEMPT_RT && LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 31)) || LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 37)
94 - /*
95 - * The -rt patch series changes the name of semaphore/mutex initialization
96 - * routines (across the entire kernel). Probably to identify locations that
97 -@@ -41,7 +41,7 @@
98 - #define DECLARE_MUTEX(_m) DEFINE_SEMAPHORE(_m)
99 - #endif
100 - #ifndef init_MUTEX
101 -- #define init_MUTEX(_m) semaphore_init(_m)
102 ++ #ifndef DECLARE_MUTEX
103 ++ #define DECLARE_MUTEX(_m) DEFINE_SEMAPHORE(_m)
104 ++ #endif
105 ++ #ifndef init_MUTEX
106 + #define init_MUTEX(_m) sema_init(_m,1)
107 - #endif
108 - #endif
109 ++ #endif
110 ++#endif
111
112 -diff -ru original//vsock-only/shared/compat_semaphore.h patched//vsock-only/shared/compat_semaphore.h
113 ---- original//vsock-only/shared/compat_semaphore.h 2010-11-11 13:04:44.000000000 -0500
114 -+++ patched//vsock-only/shared/compat_semaphore.h 2010-11-20 10:11:56.000000000 -0500
115 -@@ -28,7 +28,7 @@
116 + #endif /* __COMPAT_SEMAPHORE_H__ */
117 +diff --git a/vmnet-only/compat_semaphore.h b/vmnet-only/compat_semaphore.h
118 +index f5527b9..548782d 100644
119 +--- a/vmnet-only/compat_semaphore.h
120 ++++ b/vmnet-only/compat_semaphore.h
121 +@@ -45,5 +45,14 @@
122 + #endif
123 #endif
124
125 -
126 --#if defined CONFIG_PREEMPT_RT && LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 31)
127 +#if (defined CONFIG_PREEMPT_RT && LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 31)) || LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 37)
128 - /*
129 - * The -rt patch series changes the name of semaphore/mutex initialization
130 - * routines (across the entire kernel). Probably to identify locations that
131 -@@ -41,7 +41,7 @@
132 - #define DECLARE_MUTEX(_m) DEFINE_SEMAPHORE(_m)
133 - #endif
134 - #ifndef init_MUTEX
135 -- #define init_MUTEX(_m) semaphore_init(_m)
136 ++ #ifndef DECLARE_MUTEX
137 ++ #define DECLARE_MUTEX(_m) DEFINE_SEMAPHORE(_m)
138 ++ #endif
139 ++ #ifndef init_MUTEX
140 + #define init_MUTEX(_m) sema_init(_m,1)
141 - #endif
142 ++ #endif
143 ++#endif
144 ++
145 +
146 + #endif /* __COMPAT_SEMAPHORE_H__ */
147 +diff --git a/vmnet-only/vnetFilter.h b/vmnet-only/vnetFilter.h
148 +index fe5c71f..303009f 100644
149 +--- a/vmnet-only/vnetFilter.h
150 ++++ b/vmnet-only/vnetFilter.h
151 +@@ -203,5 +203,13 @@ struct VNet_SetLogLevel {
152 + }
153 + #include "vmware_pack_end.h"
154 + VNet_SetLogLevel;
155 ++#if (defined CONFIG_PREEMPT_RT && LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 31)) || LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 37)
156 ++ #ifndef DECLARE_MUTEX
157 ++ #define DECLARE_MUTEX(_m) DEFINE_SEMAPHORE(_m)
158 ++ #endif
159 ++ #ifndef init_MUTEX
160 ++ #define init_MUTEX(_m) sema_init(_m,1)
161 ++ #endif
162 ++#endif
163 +
164 + #endif // ifndef _VNETFILTER_H_
165 +diff --git a/vsock-only/linux/af_vsock.h b/vsock-only/linux/af_vsock.h
166 +index 3a8a0ce..d36b2ae 100644
167 +--- a/vsock-only/linux/af_vsock.h
168 ++++ b/vsock-only/linux/af_vsock.h
169 +@@ -88,4 +88,14 @@ typedef struct VSockVmciSock {
170 #endif
171 + } VSockVmciSock;
172
173 ++#if (defined CONFIG_PREEMPT_RT && LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 31)) || LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 37)
174 ++ #ifndef DECLARE_MUTEX
175 ++ #define DECLARE_MUTEX(_m) DEFINE_SEMAPHORE(_m)
176 ++ #endif
177 ++ #ifndef init_MUTEX
178 ++ #define init_MUTEX(_m) sema_init(_m,1)
179 ++ #endif
180 ++#endif
181 ++
182 ++
183 + #endif /* __AF_VSOCK_H__ */