Gentoo Archives: gentoo-commits

From: "Mike Auty (ikelos)" <ikelos@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] gentoo-x86 commit in app-emulation/vmware-modules/files: 1.0.0.20-vmblock-2.6.26-1.patch 1.0.0.20-vmnet-2.6.26.patch 1.0.0.22-makefile-kernel-dir.patch 1.0.0.20-vmmon-2.6.26.patch 1.0.0.20-vmblock-2.6.26-2.patch
Date: Tue, 30 Sep 2008 14:44:32
Message-Id: E1KkgSj-0002dU-2Y@stork.gentoo.org
1 ikelos 08/09/30 14:44:29
2
3 Added: 1.0.0.20-vmblock-2.6.26-1.patch
4 1.0.0.20-vmnet-2.6.26.patch
5 1.0.0.22-makefile-kernel-dir.patch
6 1.0.0.20-vmmon-2.6.26.patch
7 1.0.0.20-vmblock-2.6.26-2.patch
8 Log:
9 Remove old unused versions, fix up 1.0.0.20 bugs and put in a new version
10 for workstation 6.0.5 and player 2.0.5.
11 (Portage version: 2.2_rc11/cvs/Linux 2.6.26-gentoo-r1 i686)
12
13 Revision Changes Path
14 1.1 app-emulation/vmware-modules/files/1.0.0.20-vmblock-2.6.26-1.patch
15
16 file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/app-emulation/vmware-modules/files/1.0.0.20-vmblock-2.6.26-1.patch?rev=1.1&view=markup
17 plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/app-emulation/vmware-modules/files/1.0.0.20-vmblock-2.6.26-1.patch?rev=1.1&content-type=text/plain
18
19 Index: 1.0.0.20-vmblock-2.6.26-1.patch
20 ===================================================================
21 --- vmblock-only/linux/vmblockInt.h 2008-08-07 20:56:05.000000000 +0200
22 +++ vmblock-only/linux/vmblockInt.h 2008-08-07 21:00:10.000000000 +0200
23 @@ -50,7 +50,16 @@
24 #endif /* __KERNEL__ */
25
26 #define VMBLOCK_CONTROL_MODE S_IRUSR | S_IFREG
27 -#define VMBLOCK_CONTROL_PARENT proc_root_fs
28 +/*
29 + * constants like proc_root_fs has been removed from proc_fs.h
30 + * since kernel 2.6.26. We have to replace it by NULL and use
31 + * full path : to create /proc/fs/wonderful => use fs/wonderful
32 + */
33 +#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 26)
34 +# define VMBLOCK_CONTROL_PARENT proc_root_fs
35 +#else
36 +# define VMBLOCK_CONTROL_PARENT NULL
37 +#endif
38
39 /*
40 * Our modules may be compatible with kernels built for different processors.
41 --- vmblock-only/include/vmblock.h 2008-05-16 07:59:29.000000000 +0200
42 +++ vmblock-only/include/vmblock.h 2008-08-07 21:09:13.000000000 +0200
43 @@ -14,9 +14,16 @@
44 #ifdef sun
45 # include <sys/ioccom.h>
46 #endif
47 -
48 -#define VMBLOCK_FS_NAME "vmblock"
49 -
50 +/*
51 + * constants like proc_root_fs has been removed from proc_fs.h
52 + * since kernel 2.6.26. We have to replace it by NULL and use
53 + * full path : to create /proc/fs/wonderful => use fs/wonderful
54 + */
55 +#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 26)
56 +# define VMBLOCK_FS_NAME "vmblock"
57 +#else
58 +# define VMBLOCK_FS_NAME "fs/vmblock"
59 +#endif
60 /* Commands for the control half of vmblock driver */
61 #if defined(linux)
62 # define VMBLOCK_ADD_FILEBLOCK 98
63
64
65
66
67 1.1 app-emulation/vmware-modules/files/1.0.0.20-vmnet-2.6.26.patch
68
69 file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/app-emulation/vmware-modules/files/1.0.0.20-vmnet-2.6.26.patch?rev=1.1&view=markup
70 plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/app-emulation/vmware-modules/files/1.0.0.20-vmnet-2.6.26.patch?rev=1.1&content-type=text/plain
71
72 Index: 1.0.0.20-vmnet-2.6.26.patch
73 ===================================================================
74 --- ./vmnet-only/bridge.c 2008-05-16 07:59:28.000000000 +0200
75 +++ ./vmnet-only/bridge.c 2008-08-07 22:12:50.000000000 +0200
76 @@ -275,8 +275,12 @@
77 struct net_device *net) // IN: Network device
78 {
79 #ifdef VMW_NETDEV_HAS_NET
80 +# if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 26)
81 if (net->nd_net != bridge->internalDev->nd_net) {
82 - return 0;
83 +# else
84 + if (dev_net(net) != dev_net(bridge->internalDev)) {
85 +# endif
86 + return 0;
87 }
88 #endif
89 return strcmp(net->name, bridge->name) == 0;
90 --- ./vmnet-only/procfs.c 2008-05-16 07:59:28.000000000 +0200
91 +++ ./vmnet-only/procfs.c 2008-08-07 22:15:58.000000000 +0200
92 @@ -63,7 +63,11 @@
93 {
94 int retval;
95
96 +#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 26)
97 retval = VNetProc_MakeEntry(&proc_root, "vmnet", S_IFDIR, &base);
98 +#else
99 + retval = VNetProc_MakeEntry(NULL, "vmnet", S_IFDIR, &base);
100 +#endif
101 if (retval) {
102 return retval;
103 }
104 @@ -95,7 +99,11 @@
105 void
106 VNetProc_Cleanup(void)
107 {
108 +#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 26)
109 VNetProc_RemoveEntry(base, &proc_root);
110 +#else
111 + VNetProc_RemoveEntry(base, NULL);
112 +#endif
113 base = NULL;
114 }
115
116 --- ./vmnet-only/vmnetInt.h 2008-05-16 07:59:28.000000000 +0200
117 +++ ./vmnet-only/vmnetInt.h 2008-08-07 22:20:13.000000000 +0200
118 @@ -63,7 +63,11 @@
119 # define dev_lock_list() read_lock(&dev_base_lock)
120 # define dev_unlock_list() read_unlock(&dev_base_lock)
121 # ifdef VMW_NETDEV_HAS_NET
122 +# if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 26)
123 # define DEV_GET(x) __dev_get_by_name((x)->internalDev->nd_net, (x)->name)
124 +# else
125 +# define DEV_GET(x) __dev_get_by_name(dev_net((x)->internalDev), (x)->name)
126 +# endif
127 # else
128 # define DEV_GET(x) __dev_get_by_name((x)->name)
129 # endif
130 @@ -89,8 +93,13 @@
131
132 #ifdef VMW_NETDEV_HAS_NET
133 extern struct proto vmnet_proto;
134 +# if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 26)
135 # define compat_sk_alloc(_bri, _pri) sk_alloc((_bri)->internalDev->nd_net, \
136 PF_NETLINK, _pri, &vmnet_proto)
137 +# else
138 +# define compat_sk_alloc(_bri, _pri) sk_alloc(dev_net((_bri)->internalDev), \
139 + PF_NETLINK, _pri, &vmnet_proto)
140 +# endif
141 #elif defined(VMW_HAVE_SK_ALLOC_WITH_PROTO)
142 extern struct proto vmnet_proto;
143 # define compat_sk_alloc(_bri, _pri) sk_alloc(PF_NETLINK, _pri, &vmnet_proto, 1)
144
145
146
147 1.1 app-emulation/vmware-modules/files/1.0.0.22-makefile-kernel-dir.patch
148
149 file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/app-emulation/vmware-modules/files/1.0.0.22-makefile-kernel-dir.patch?rev=1.1&view=markup
150 plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/app-emulation/vmware-modules/files/1.0.0.22-makefile-kernel-dir.patch?rev=1.1&content-type=text/plain
151
152 Index: 1.0.0.22-makefile-kernel-dir.patch
153 ===================================================================
154 diff --git a/vmblock-only/Makefile b/vmblock-only/Makefile
155 index e7d18b5..02e2cf3 100644
156 --- a/vmblock-only/Makefile
157 +++ b/vmblock-only/Makefile
158 @@ -14,9 +14,9 @@ SRCROOT = .
159 VM_UNAME = $(shell uname -r)
160
161 # Header directory for the running kernel
162 -HEADER_DIR = /lib/modules/$(VM_UNAME)/build/include
163 +HEADER_DIR = $(KERNEL_DIR)
164
165 -BUILD_DIR = $(HEADER_DIR)/..
166 +BUILD_DIR = $(KBUILD_OUTPUT)
167
168 DRIVER := vmblock
169
170 diff --git a/vmmon-only/Makefile b/vmmon-only/Makefile
171 index 1707ffc..165da0a 100644
172 --- a/vmmon-only/Makefile
173 +++ b/vmmon-only/Makefile
174 @@ -14,9 +14,9 @@ SRCROOT = .
175 VM_UNAME = $(shell uname -r)
176
177 # Header directory for the running kernel
178 -HEADER_DIR = /lib/modules/$(VM_UNAME)/build/include
179 +HEADER_DIR = $(KERNEL_DIR)
180
181 -BUILD_DIR = $(HEADER_DIR)/..
182 +BUILD_DIR = $(KBUILD_OUTPUT)
183
184 DRIVER := vmmon
185
186 diff --git a/vmnet-only/Makefile b/vmnet-only/Makefile
187 index cd24c8c..a085f96 100644
188 --- a/vmnet-only/Makefile
189 +++ b/vmnet-only/Makefile
190 @@ -14,9 +14,9 @@ SRCROOT = .
191 VM_UNAME = $(shell uname -r)
192
193 # Header directory for the running kernel
194 -HEADER_DIR = /lib/modules/$(VM_UNAME)/build/include
195 +HEADER_DIR = $(KERNEL_DIR)
196
197 -BUILD_DIR = $(HEADER_DIR)/..
198 +BUILD_DIR = $(KBUILD_OUTPUT)
199
200 DRIVER := vmnet
201
202
203
204
205 1.1 app-emulation/vmware-modules/files/1.0.0.20-vmmon-2.6.26.patch
206
207 file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/app-emulation/vmware-modules/files/1.0.0.20-vmmon-2.6.26.patch?rev=1.1&view=markup
208 plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/app-emulation/vmware-modules/files/1.0.0.20-vmmon-2.6.26.patch?rev=1.1&content-type=text/plain
209
210 Index: 1.0.0.20-vmmon-2.6.26.patch
211 ===================================================================
212 --- vmmon-only/linux/driver.c 2008-08-07 22:04:50.000000000 +0200
213 +++ vmmon-only/linux/driver.c 2008-08-07 22:06:57.000000000 +0200
214 @@ -23,7 +23,9 @@
215 #include <linux/smp_lock.h>
216
217 #include <linux/poll.h>
218 -
219 +#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 26)
220 +# include <linux/mm.h>
221 +#endif
222 /*
223 * Power Management: hook resume to work around
224 * BIOS bugs where VT is not properly enabled after S4
225 @@ -179,23 +181,32 @@
226
227 static int LinuxDriver_Close(struct inode *inode, struct file *filp);
228 static unsigned int LinuxDriverPoll(struct file *file, poll_table *wait);
229 -#if defined(VMW_NOPAGE_261)
230 +#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 26)
231 +# if defined(VMW_NOPAGE_261)
232 static struct page *LinuxDriverNoPage(struct vm_area_struct *vma,
233 unsigned long address, int *type);
234 -#elif defined(KERNEL_2_4_0)
235 +# elif defined(KERNEL_2_4_0)
236 static struct page *LinuxDriverNoPage(struct vm_area_struct *vma,
237 unsigned long address, int unused);
238 -#else
239 +# else
240 static unsigned long LinuxDriverNoPage(struct vm_area_struct *vma,
241 unsigned long address, int write_access);
242 -#endif
243 -static int LinuxDriverMmap(struct file *filp, struct vm_area_struct *vma);
244 -
245 -static void LinuxDriverPollTimeout(unsigned long clientData);
246 +# endif
247
248 static struct vm_operations_struct vmuser_mops = {
249 .nopage = LinuxDriverNoPage
250 };
251 +#else
252 +static int LinuxDriverNoPage(struct vm_area_struct *vma,
253 + struct vm_fault *fdata);
254 +
255 +static struct vm_operations_struct vmuser_mops = {
256 + .fault = LinuxDriverNoPage
257 +};
258 +#endif
259 +static int LinuxDriverMmap(struct file *filp, struct vm_area_struct *vma);
260 +
261 +static void LinuxDriverPollTimeout(unsigned long clientData);
262
263 static struct file_operations vmuser_fops;
264 static struct timer_list tscTimer;
265 @@ -1172,20 +1183,20 @@
266 *
267 *-----------------------------------------------------------------------------
268 */
269 -
270 -#ifdef VMW_NOPAGE_261
271 +#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 26)
272 +# ifdef VMW_NOPAGE_261
273 static struct page *LinuxDriverNoPage(struct vm_area_struct *vma, //IN
274 unsigned long address, //IN
275 int *type) //OUT: Fault type
276 -#elif defined(KERNEL_2_4_0)
277 +# elif defined(KERNEL_2_4_0)
278 static struct page *LinuxDriverNoPage(struct vm_area_struct *vma, //IN
279 unsigned long address, //IN
280 int unused) //nothing
281 -#else
282 +# else
283 static unsigned long LinuxDriverNoPage(struct vm_area_struct *vma,//IN
284 unsigned long address, //IN
285 int write_access) //IN
286 -#endif
287 +# endif
288 {
289 VMLinux *vmLinux = (VMLinux *) vma->vm_file->private_data;
290 unsigned long pg;
291 @@ -1198,15 +1209,37 @@
292 }
293 page = vmLinux->pages4Gb[pg];
294 get_page(page);
295 -#ifdef KERNEL_2_4_0
296 -#ifdef VMW_NOPAGE_261
297 +# ifdef KERNEL_2_4_0
298 +# ifdef VMW_NOPAGE_261
299 *type = VM_FAULT_MINOR;
300 -#endif
301 +# endif
302 return page;
303 -#else
304 +# else
305 return page_address(page);
306 -#endif
307 +# endif
308 +}
309 +#else
310 +/* For kernel upper or equal to 2.6.26 */
311 +static int LinuxDriverNoPage(struct vm_area_struct *vma,
312 + struct vm_fault *fdata)
313 +{
314 + VMLinux *vmLinux = (VMLinux *) vma->vm_file->private_data;
315 + unsigned long pg;
316 + struct page* page;
317 +
318 + pg = fdata->pgoff;
319 + pg = VMMON_MAP_OFFSET(pg);
320 + if (pg >= vmLinux->size4Gb) {
321 + return VM_FAULT_MAJOR;
322 + }
323 + page = vmLinux->pages4Gb[pg];
324 + get_page(page);
325 + fdata->page = page;
326 + return VM_FAULT_MINOR;
327 }
328 +#endif
329 +
330 +
331
332
333 /*
334
335
336
337 1.1 app-emulation/vmware-modules/files/1.0.0.20-vmblock-2.6.26-2.patch
338
339 file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/app-emulation/vmware-modules/files/1.0.0.20-vmblock-2.6.26-2.patch?rev=1.1&view=markup
340 plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/app-emulation/vmware-modules/files/1.0.0.20-vmblock-2.6.26-2.patch?rev=1.1&content-type=text/plain
341
342 Index: 1.0.0.20-vmblock-2.6.26-2.patch
343 ===================================================================
344 --- vmblock-only/linux/filesystem.c 2008-08-08 15:27:46.000000000 +0200
345 +++ vmblock-only/linux/filesystem.c 2008-08-08 18:34:57.000000000 +0200
346 @@ -64,7 +64,11 @@ static char const *fsRoot;
347 static size_t fsRootLen;
348 static struct file_system_type fsType = {
349 .owner = THIS_MODULE,
350 +#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 26)
351 .name = VMBLOCK_FS_NAME,
352 +#else
353 + .name = VMBLOCK_FS_NAME_I,
354 +#endif
355 #if KERNEL_25_FS
356 .get_sb = FsOpGetSb,
357 .kill_sb = kill_anon_super,
358 @@ -506,8 +510,11 @@ FsOpReadSuper(struct super_block *sb, //
359 rootInode->i_op = &RootInodeOps;
360 rootInode->i_fop = &RootFileOps;
361 rootInode->i_mode = S_IFDIR | S_IRUGO | S_IXUGO;
362 -
363 +#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 26)
364 LOG(4, "%s file system mounted\n", VMBLOCK_FS_NAME);
365 +#else
366 + LOG(4, "%s file system mounted\n", VMBLOCK_FS_NAME_I);
367 +#endif
368 return 0;
369 }
370
371 --- vmblock-only/include/vmblock.h 2008-08-08 15:27:46.000000000 +0200
372 +++ vmblock-only/include/vmblock.h 2008-08-08 18:37:45.000000000 +0200
373 @@ -22,7 +22,8 @@
374 #if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 26)
375 # define VMBLOCK_FS_NAME "vmblock"
376 #else
377 -# define VMBLOCK_FS_NAME "fs/vmblock"
378 +# define VMBLOCK_FS_NAME_I "vmblock"
379 +# define VMBLOCK_FS_NAME "fs/" VMBLOCK_FS_NAME_I
380 #endif
381 /* Commands for the control half of vmblock driver */
382 #if defined(linux)
383 @@ -53,7 +54,11 @@
384 # ifdef VMX86_DEVEL
385 # define VMBLOCK_LIST_FILEBLOCKS _IO('v', 3)
386 # endif
387 -# define VMBLOCK_MOUNT_POINT "/var/run/" VMBLOCK_FS_NAME
388 +# if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 26)
389 +# define VMBLOCK_MOUNT_POINT "/var/run/" VMBLOCK_FS_NAME
390 +# else
391 +# define VMBLOCK_MOUNT_POINT "/var/run/" VMBLOCK_FS_NAME_I
392 +#endif
393 # define VMBLOCK_DEVICE VMBLOCK_MOUNT_POINT
394 # define VMBLOCK_DEVICE_MODE O_RDONLY
395 # define VMBLOCK_CONTROL(fd, op, path) ioctl(fd, op, path)