summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSven Eden <sven.eden@gmx.de>2011-05-25 11:39:27 +0200
committerSven Eden <sven.eden@gmx.de>2011-05-25 11:39:27 +0200
commit4111ee2ac062ca16ea893dadbea35fb6f29c3b2e (patch)
tree36d86900257a27057a47c4d4bc5a4c533c479fd1 /app-emulation
parentFixed Manifest. (diff)
downloadseden-4111ee2ac062ca16ea893dadbea35fb6f29c3b2e.tar.gz
seden-4111ee2ac062ca16ea893dadbea35fb6f29c3b2e.tar.bz2
seden-4111ee2ac062ca16ea893dadbea35fb6f29c3b2e.zip
vmware-modules-238.4-r1.ebuild with patches against kernel-2.6.39 (Bug #368139)
Diffstat (limited to 'app-emulation')
-rw-r--r--app-emulation/vmware-modules/Manifest8
-rw-r--r--app-emulation/vmware-modules/files/238-jobserver.patch75
-rw-r--r--app-emulation/vmware-modules/files/238-makefile-include.patch65
-rw-r--r--app-emulation/vmware-modules/files/238-makefile-kernel-dir.patch80
-rw-r--r--app-emulation/vmware-modules/files/238-sema.patch83
-rw-r--r--app-emulation/vmware-modules/files/vmware-modules-linux-2.6.39.patch274
-rw-r--r--app-emulation/vmware-modules/vmware-modules-238.4-r1.ebuild81
7 files changed, 666 insertions, 0 deletions
diff --git a/app-emulation/vmware-modules/Manifest b/app-emulation/vmware-modules/Manifest
new file mode 100644
index 0000000..d366758
--- /dev/null
+++ b/app-emulation/vmware-modules/Manifest
@@ -0,0 +1,8 @@
+AUX 238-jobserver.patch 2899 RMD160 0a90332d966245e11f1ecee5a60e47779a746ccb SHA1 b6b36a98cf626f3fb5c7044b1c72f4ac917c5bd1 SHA256 131c606fdafe80f10151c667796270101f3b06ee70a1b872862e15bcfb4ee46d
+AUX 238-makefile-include.patch 2791 RMD160 8665507d2b565931dc13a5f49eec6e33205d42fb SHA1 d48ca9316e65d536e50d07dfe945a6ff195be7cd SHA256 ac676433ca499268bd6a1f0d7d904a44095bb1a777ad31d055e8c4990eea586c
+AUX 238-makefile-kernel-dir.patch 2201 RMD160 22b81e2c3c347ac6bad3afef15eea31250c34f2a SHA1 033160ded8fda76e6f016040cc4bb3f4ca0dd603 SHA256 780b79fcc6e8e836632f4542ac6c3da2d475b3ad1e2e88e1c51aea849a5172c7
+AUX 238-sema.patch 3621 RMD160 c1710c17094f21bdc31190975a29421055cb85a8 SHA1 960475b3c91a2850554170afbb810ff0d23ef08b SHA256 b56a5b6aa655f830f93424ec23cedd7dde7304f214357cde05bc89574600cbe0
+AUX vmware-modules-linux-2.6.39.patch 9536 RMD160 d2ee902624cbc38edccfdb0931a3f92b81482788 SHA1 80bf9abb1247288bb2af8f9b7108660573f6248b SHA256 f4557563f8de21d7c3fa01ca298953e4fc462727587234d5d978a1173ec5b2f5
+EBUILD vmware-modules-238.4-r1.ebuild 2014 RMD160 5fc5045b50c18db611d8a0989631c4cbb6cf735a SHA1 3118eec90ada249223693649d42ef95bc0025172 SHA256 c171cf634e93ba50340de875dd50191601b4a0b05638c1363016004298791fd3
+MISC ChangeLog 416 RMD160 712c4279ef8ec0cb41e5e3426b551fce9f0e80aa SHA1 c9366cad0058fbe0e1d8fa0ebcc13cc6dd153113 SHA256 022c59dc09d670bc6167c91c962144d3bf7bb2b7652ba021613592afb93e08b9
+MISC metadata.xml 288 RMD160 da2ee1499dd87693b63592a337d8352494cb9652 SHA1 e1b50a587afb7878e21828a957a6838e7d08e4e8 SHA256 100017b3059be218965923798780ab195dafaa893f98088592fb5b299e686c37
diff --git a/app-emulation/vmware-modules/files/238-jobserver.patch b/app-emulation/vmware-modules/files/238-jobserver.patch
new file mode 100644
index 0000000..59a6ccc
--- /dev/null
+++ b/app-emulation/vmware-modules/files/238-jobserver.patch
@@ -0,0 +1,75 @@
+diff -ru a/work/vmblock-only/Makefile b/work/vmblock-only/Makefile
+--- a/work/vmblock-only/Makefile 2011-01-22 08:59:15.907152002 -0500
++++ b/work/vmblock-only/Makefile 2011-01-22 09:13:55.894938002 -0500
+@@ -123,9 +123,9 @@
+ postbuild:: ;
+
+ $(DRIVER_KO): prebuild
+- make -C $(BUILD_DIR) SUBDIRS=$$PWD SRCROOT=$$PWD/$(SRCROOT) \
++ $(MAKE) -C $(BUILD_DIR) SUBDIRS=$$PWD SRCROOT=$$PWD/$(SRCROOT) \
+ MODULEBUILDDIR=$(MODULEBUILDDIR) modules
+- make -C $$PWD SRCROOT=$$PWD/$(SRCROOT) \
++ $(MAKE) -C $$PWD SRCROOT=$$PWD/$(SRCROOT) \
+ MODULEBUILDDIR=$(MODULEBUILDDIR) postbuild
+ endif
+
+diff -ru a/work/vmci-only/Makefile b/work/vmci-only/Makefile
+--- a/work/vmci-only/Makefile 2011-01-22 08:59:15.907152002 -0500
++++ b/work/vmci-only/Makefile 2011-01-22 09:13:55.898936002 -0500
+@@ -123,9 +123,9 @@
+ postbuild:: ;
+
+ $(DRIVER_KO): prebuild
+- make -C $(BUILD_DIR) SUBDIRS=$$PWD SRCROOT=$$PWD/$(SRCROOT) \
++ $(MAKE) -C $(BUILD_DIR) SUBDIRS=$$PWD SRCROOT=$$PWD/$(SRCROOT) \
+ MODULEBUILDDIR=$(MODULEBUILDDIR) modules
+- make -C $$PWD SRCROOT=$$PWD/$(SRCROOT) \
++ $(MAKE) -C $$PWD SRCROOT=$$PWD/$(SRCROOT) \
+ MODULEBUILDDIR=$(MODULEBUILDDIR) postbuild
+ endif
+
+diff -ru a/work/vmmon-only/Makefile b/work/vmmon-only/Makefile
+--- a/work/vmmon-only/Makefile 2011-01-22 08:59:15.907152002 -0500
++++ b/work/vmmon-only/Makefile 2011-01-22 09:13:55.894938002 -0500
+@@ -123,9 +123,9 @@
+ postbuild:: ;
+
+ $(DRIVER_KO): prebuild
+- make -C $(BUILD_DIR) SUBDIRS=$$PWD SRCROOT=$$PWD/$(SRCROOT) \
++ $(MAKE) -C $(BUILD_DIR) SUBDIRS=$$PWD SRCROOT=$$PWD/$(SRCROOT) \
+ MODULEBUILDDIR=$(MODULEBUILDDIR) modules
+- make -C $$PWD SRCROOT=$$PWD/$(SRCROOT) \
++ $(MAKE) -C $$PWD SRCROOT=$$PWD/$(SRCROOT) \
+ MODULEBUILDDIR=$(MODULEBUILDDIR) postbuild
+ endif
+
+diff -ru a/work/vmnet-only/Makefile b/work/vmnet-only/Makefile
+--- a/work/vmnet-only/Makefile 2011-01-22 08:59:15.911150002 -0500
++++ b/work/vmnet-only/Makefile 2011-01-22 09:13:55.898936002 -0500
+@@ -123,9 +123,9 @@
+ postbuild:: ;
+
+ $(DRIVER_KO): prebuild
+- make -C $(BUILD_DIR) SUBDIRS=$$PWD SRCROOT=$$PWD/$(SRCROOT) \
++ $(MAKE) -C $(BUILD_DIR) SUBDIRS=$$PWD SRCROOT=$$PWD/$(SRCROOT) \
+ MODULEBUILDDIR=$(MODULEBUILDDIR) modules
+- make -C $$PWD SRCROOT=$$PWD/$(SRCROOT) \
++ $(MAKE) -C $$PWD SRCROOT=$$PWD/$(SRCROOT) \
+ MODULEBUILDDIR=$(MODULEBUILDDIR) postbuild
+ endif
+
+diff -ru a/work/vsock-only/Makefile b/work/vsock-only/Makefile
+--- a/work/vsock-only/Makefile 2011-01-22 08:59:15.911150002 -0500
++++ b/work/vsock-only/Makefile 2011-01-22 09:13:55.894938002 -0500
+@@ -123,9 +123,9 @@
+ postbuild:: ;
+
+ $(DRIVER_KO): prebuild
+- make -C $(BUILD_DIR) SUBDIRS=$$PWD SRCROOT=$$PWD/$(SRCROOT) \
++ $(MAKE) -C $(BUILD_DIR) SUBDIRS=$$PWD SRCROOT=$$PWD/$(SRCROOT) \
+ MODULEBUILDDIR=$(MODULEBUILDDIR) modules
+- make -C $$PWD SRCROOT=$$PWD/$(SRCROOT) \
++ $(MAKE) -C $$PWD SRCROOT=$$PWD/$(SRCROOT) \
+ MODULEBUILDDIR=$(MODULEBUILDDIR) postbuild
+ endif
+
diff --git a/app-emulation/vmware-modules/files/238-makefile-include.patch b/app-emulation/vmware-modules/files/238-makefile-include.patch
new file mode 100644
index 0000000..777a3fd
--- /dev/null
+++ b/app-emulation/vmware-modules/files/238-makefile-include.patch
@@ -0,0 +1,65 @@
+diff --git a/work/vmblock-only/Makefile.kernel b/work/vmblock-only/Makefile.kernel
+index 9d7c5ca..92cefff 100644
+--- a/work/vmblock-only/Makefile.kernel
++++ b/work/vmblock-only/Makefile.kernel
+@@ -19,7 +19,7 @@
+
+ INCLUDE += -I$(SRCROOT)/include
+
+-EXTRA_CFLAGS := $(CC_OPTS) $(INCLUDE)
++EXTRA_CFLAGS := $(CC_OPTS) $(INCLUDE) $(LINUXINCLUDE)
+
+ EXTRA_CFLAGS += $(call vm_check_build, $(AUTOCONF_DIR)/setnice.c, -DVMW_HAVE_SET_USER_NICE, )
+ EXTRA_CFLAGS += $(call vm_check_build, $(AUTOCONF_DIR)/epoll.c, -DVMW_HAVE_EPOLL, )
+diff --git a/work/vmci-only/Makefile.kernel b/work/vmci-only/Makefile.kernel
+index 22dc232..67e709f 100644
+--- a/work/vmci-only/Makefile.kernel
++++ b/work/vmci-only/Makefile.kernel
+@@ -21,7 +21,7 @@ CC_OPTS += -DVMCI
+
+ INCLUDE := -I$(SRCROOT)/include -I$(SRCROOT)/common -I$(SRCROOT)/linux
+
+-EXTRA_CFLAGS := $(CC_OPTS) $(INCLUDE)
++EXTRA_CFLAGS := $(CC_OPTS) $(INCLUDE) $(LINUXINCLUDE)
+
+ EXTRA_CFLAGS += $(call vm_check_build, $(SRCROOT)/autoconf/epoll.c, -DVMW_HAVE_EPOLL, )
+
+diff --git a/work/vmmon-only/Makefile.kernel b/work/vmmon-only/Makefile.kernel
+index a7e26ea..befaca7 100644
+--- a/work/vmmon-only/Makefile.kernel
++++ b/work/vmmon-only/Makefile.kernel
+@@ -22,7 +22,7 @@ CC_OPTS += -DVMMON -DVMCORE
+ INCLUDE := -I$(SRCROOT)/include -I$(SRCROOT)/common -I$(SRCROOT)/linux \
+ -I$(SRCROOT)/vmcore
+
+-EXTRA_CFLAGS := $(CC_OPTS) $(INCLUDE)
++EXTRA_CFLAGS := $(CC_OPTS) $(INCLUDE) $(LINUXINCLUDE)
+
+ EXTRA_CFLAGS += $(call vm_check_build, $(SRCROOT)/autoconf/nopage1.c, -DVMW_NOPAGE_261, )
+ EXTRA_CFLAGS += $(call vm_check_build, $(SRCROOT)/autoconf/skas1.c, -DVMW_SKAS_MMAP, )
+diff --git a/work/vmnet-only/Makefile.kernel b/work/vmnet-only/Makefile.kernel
+index 4b16d06..0e252a6 100644
+--- a/work/vmnet-only/Makefile.kernel
++++ b/work/vmnet-only/Makefile.kernel
+@@ -19,7 +19,7 @@
+
+ INCLUDE := -I$(SRCROOT)
+
+-EXTRA_CFLAGS := $(CC_OPTS) $(INCLUDE)
++EXTRA_CFLAGS := $(CC_OPTS) $(INCLUDE) $(LINUXINCLUDE)
+ EXTRA_CFLAGS += $(call vm_check_build, $(SRCROOT)/epoll.c, -DVMW_HAVE_EPOLL, )
+ EXTRA_CFLAGS += $(call vm_check_build, $(SRCROOT)/sk_alloc.c,-DVMW_HAVE_SK_ALLOC_WITH_PROTO, )
+ EXTRA_CFLAGS += $(call vm_check_build, $(SRCROOT)/netdev_has_net.c,-DVMW_NETDEV_HAS_NET, )
+diff --git a/work/vsock-only/Makefile.kernel b/work/vsock-only/Makefile.kernel
+index 47ef5f3..b3539ef 100644
+--- a/work/vsock-only/Makefile.kernel
++++ b/work/vsock-only/Makefile.kernel
+@@ -25,7 +25,7 @@ INCLUDE += -I$(SRCROOT)/include
+ INCLUDE += -I$(SRCROOT)/linux
+ INCLUDE += -I$(SRCROOT)/common
+
+-EXTRA_CFLAGS := $(CC_OPTS) $(INCLUDE)
++EXTRA_CFLAGS := $(CC_OPTS) $(INCLUDE) $(LINUXINCLUDE)
+ EXTRA_CFLAGS += $(call vm_check_build, $(AUTOCONF_DIR)/epoll.c, -DVMW_HAVE_EPOLL, )
+ EXTRA_CFLAGS += $(call vm_check_build, $(AUTOCONF_DIR)/setnice.c, -DVMW_HAVE_SET_USER_NICE, )
+
diff --git a/app-emulation/vmware-modules/files/238-makefile-kernel-dir.patch b/app-emulation/vmware-modules/files/238-makefile-kernel-dir.patch
new file mode 100644
index 0000000..d4bd6d1
--- /dev/null
+++ b/app-emulation/vmware-modules/files/238-makefile-kernel-dir.patch
@@ -0,0 +1,80 @@
+diff --git a/work/vmblock-only/Makefile b/work/vmblock-only/Makefile
+index 0bd0e74..27c3ede 100644
+--- a/work/vmblock-only/Makefile
++++ b/work/vmblock-only/Makefile
+@@ -46,9 +46,9 @@ endif
+ VM_UNAME = $(shell uname -r)
+
+ # Header directory for the running kernel
+-HEADER_DIR = /lib/modules/$(VM_UNAME)/build/include
++HEADER_DIR = $(KERNEL_DIR)
+
+-BUILD_DIR = $(HEADER_DIR)/..
++BUILD_DIR = $(KBUILD_OUTPUT)
+
+ DRIVER := vmblock
+ PRODUCT := tools
+diff --git a/work/vmci-only/Makefile b/work/vmci-only/Makefile
+index 7babb8a..fbc5878 100644
+--- a/work/vmci-only/Makefile
++++ b/work/vmci-only/Makefile
+@@ -46,9 +46,9 @@ endif
+ VM_UNAME = $(shell uname -r)
+
+ # Header directory for the running kernel
+-HEADER_DIR = /lib/modules/$(VM_UNAME)/build/include
++HEADER_DIR = $(KERNEL_DIR)
+
+-BUILD_DIR = $(HEADER_DIR)/..
++BUILD_DIR = $(KBUILD_OUTPUT)
+
+ DRIVER := vmci
+ PRODUCT := @@PRODUCT@@
+diff --git a/work/vmmon-only/Makefile b/work/vmmon-only/Makefile
+index 4b4eb3e..1bb35ef 100644
+--- a/work/vmmon-only/Makefile
++++ b/work/vmmon-only/Makefile
+@@ -46,9 +46,9 @@ endif
+ VM_UNAME = $(shell uname -r)
+
+ # Header directory for the running kernel
+-HEADER_DIR = /lib/modules/$(VM_UNAME)/build/include
++HEADER_DIR = $(KERNEL_DIR)
+
+-BUILD_DIR = $(HEADER_DIR)/..
++BUILD_DIR = $(KBUILD_OUTPUT)
+
+ DRIVER := vmmon
+ PRODUCT := @@PRODUCT@@
+diff --git a/work/vmnet-only/Makefile b/work/vmnet-only/Makefile
+index 06856e7..fd53bf8 100644
+--- a/work/vmnet-only/Makefile
++++ b/work/vmnet-only/Makefile
+@@ -46,9 +46,9 @@ endif
+ VM_UNAME = $(shell uname -r)
+
+ # Header directory for the running kernel
+-HEADER_DIR = /lib/modules/$(VM_UNAME)/build/include
++HEADER_DIR = $(KERNEL_DIR)
+
+-BUILD_DIR = $(HEADER_DIR)/..
++BUILD_DIR = $(KBUILD_OUTPUT)
+
+ DRIVER := vmnet
+ PRODUCT := @@PRODUCT@@
+diff --git a/work/vsock-only/Makefile b/work/vsock-only/Makefile
+index e02adb0..210e502 100644
+--- a/work/vsock-only/Makefile
++++ b/work/vsock-only/Makefile
+@@ -46,9 +46,9 @@ endif
+ VM_UNAME = $(shell uname -r)
+
+ # Header directory for the running kernel
+-HEADER_DIR = /lib/modules/$(VM_UNAME)/build/include
++HEADER_DIR = $(KERNEL_DIR)
+
+-BUILD_DIR = $(HEADER_DIR)/..
++BUILD_DIR = $(KBUILD_OUTPUT)
+
+ DRIVER := vsock
+ PRODUCT := ws
diff --git a/app-emulation/vmware-modules/files/238-sema.patch b/app-emulation/vmware-modules/files/238-sema.patch
new file mode 100644
index 0000000..1ebdab7
--- /dev/null
+++ b/app-emulation/vmware-modules/files/238-sema.patch
@@ -0,0 +1,83 @@
+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 @@
+ #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)
++ #define init_MUTEX(_m) sema_init(_m,1)
+ #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
+
+
+-#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)
++ #define init_MUTEX(_m) sema_init(_m,1)
+ #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
+
+
+-#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)
++ #define init_MUTEX(_m) sema_init(_m,1)
+ #endif
+ #endif
+
diff --git a/app-emulation/vmware-modules/files/vmware-modules-linux-2.6.39.patch b/app-emulation/vmware-modules/files/vmware-modules-linux-2.6.39.patch
new file mode 100644
index 0000000..43b4950
--- /dev/null
+++ b/app-emulation/vmware-modules/files/vmware-modules-linux-2.6.39.patch
@@ -0,0 +1,274 @@
+diff -u -r source-original/vmblock-only/linux/dentry.c source/vmblock-only/linux/dentry.c
+--- source-original/vmblock-only/linux/dentry.c 2011-03-26 04:03:06.000000000 +0100
++++ source/vmblock-only/linux/dentry.c 2011-05-14 19:05:49.000000000 +0200
+@@ -103,8 +103,11 @@
+ actualDentry->d_op->d_revalidate) {
+ return actualDentry->d_op->d_revalidate(actualDentry, nd);
+ }
+-
+- if (path_lookup(iinfo->name, 0, &actualNd)) {
++#if LINUX_VERSION_CODE > KERNEL_VERSION(2, 6, 38)
++ if (kern_path(iinfo->name, 0, &actualNd)) {
++#else
++ if (compat_path_lookup(iinfo->name, 0, &actualNd)) {
++#endif
+ LOG(4, "DentryOpRevalidate: [%s] no longer exists\n", iinfo->name);
+ return 0;
+ }
+diff -u -r source-original/vmblock-only/linux/filesystem.c source/vmblock-only/linux/filesystem.c
+--- source-original/vmblock-only/linux/filesystem.c 2011-03-26 04:03:06.000000000 +0100
++++ source/vmblock-only/linux/filesystem.c 2011-05-14 19:05:57.000000000 +0200
+@@ -44,8 +44,13 @@
+ /* File system operations */
+
+ #if defined(VMW_GETSB_2618)
++#if LINUX_VERSION_CODE > KERNEL_VERSION(2, 6, 38)
++static struct dentry *FsOpMount(struct file_system_type *fsType, int flags,
++ const char *devName, void *rawData);
++#else
+ static int FsOpGetSb(struct file_system_type *fsType, int flags,
+ const char *devName, void *rawData, struct vfsmount *mnt);
++#endif
+ #else
+ static struct super_block *FsOpGetSb(struct file_system_type *fsType, int flags,
+ const char *devName, void *rawData);
+@@ -66,7 +71,11 @@
+ static struct file_system_type fsType = {
+ .owner = THIS_MODULE,
+ .name = VMBLOCK_FS_NAME,
++ #if LINUX_VERSION_CODE > KERNEL_VERSION(2, 6, 38)
++ .mount = FsOpMount,
++ #else
+ .get_sb = FsOpGetSb,
++ #endif
+ .kill_sb = kill_anon_super,
+ };
+
+@@ -335,8 +344,11 @@
+ Warning("Iget: could not make full name\n");
+ goto error_inode;
+ }
+-
++#if LINUX_VERSION_CODE > KERNEL_VERSION(2, 6, 38)
++ if (kern_path(iinfo->name, 0, &actualNd)) {
++#else
+ if (compat_path_lookup(iinfo->name, 0, &actualNd)) {
++#endif
+ /*
+ * This file does not exist, so we create an inode that doesn't know
+ * about its underlying file. Operations that create files and
+@@ -533,18 +545,17 @@
+ return 0;
+ }
+
+-
+ #if defined(VMW_GETSB_2618)
+ /*
+ *-----------------------------------------------------------------------------
+ *
+- * FsOpGetSb --
++ * FsOpGetSb/FsOpMount --
+ *
+ * Invokes generic kernel code to prepare superblock for
+ * deviceless filesystem.
+ *
+ * Results:
+- * 0 on success
++ * 0/dentry on success
+ * negative error code on failure
+ *
+ * Side effects:
+@@ -552,7 +563,17 @@
+ *
+ *-----------------------------------------------------------------------------
+ */
++#if LINUX_VERSION_CODE > KERNEL_VERSION(2, 6, 38)
++struct dentry *
++FsOpMount(struct file_system_type *fs_type, // IN: file system type of mount
++ int flags, // IN: mount flags
++ const char *dev_name, // IN: device mounting on
++ void *rawData) // IN: mount arguments
++{
++ return mount_nodev(fs_type, flags, rawData, FsOpReadSuper);
++}
+
++#else
+ static int
+ FsOpGetSb(struct file_system_type *fs_type, // IN: file system type of mount
+ int flags, // IN: mount flags
+@@ -562,6 +583,7 @@
+ {
+ return get_sb_nodev(fs_type, flags, rawData, FsOpReadSuper, mnt);
+ }
++#endif
+ #else
+ /*
+ *-----------------------------------------------------------------------------
+diff -u -r source-original/vmblock-only/linux/module.c source/vmblock-only/linux/module.c
+--- source-original/vmblock-only/linux/module.c 2011-03-26 04:03:06.000000000 +0100
++++ source/vmblock-only/linux/module.c 2011-05-14 20:01:54.000000000 +0200
+@@ -78,7 +78,6 @@
+ VMBlockInit(void)
+ {
+ int ret;
+-
+ ret = VMBlockInitControlOps();
+ if (ret < 0) {
+ goto error;
+diff -u -r source-original/vmci-only/linux/driver.c source/vmci-only/linux/driver.c
+--- source-original/vmci-only/linux/driver.c 2011-03-26 06:37:32.000000000 +0100
++++ source/vmci-only/linux/driver.c 2011-04-02 13:32:12.000000000 +0200
+@@ -42,7 +42,6 @@
+ #include <linux/miscdevice.h>
+ #include <linux/poll.h>
+ #include <linux/smp.h>
+-#include <linux/smp_lock.h>
+
+ #include "compat_file.h"
+ #include "compat_highmem.h"
+diff -u -r source-original/vmmon-only/linux/driver.c source/vmmon-only/linux/driver.c
+--- source-original/vmmon-only/linux/driver.c 2011-03-26 06:37:28.000000000 +0100
++++ source/vmmon-only/linux/driver.c 2011-04-02 13:26:59.000000000 +0200
+@@ -780,7 +780,7 @@
+
+
+ #define POLLQUEUE_MAX_TASK 1000
+-static spinlock_t pollQueueLock __attribute__((unused)) = SPIN_LOCK_UNLOCKED;
++static DEFINE_SPINLOCK(pollQueueLock);
+ static void *pollQueue[POLLQUEUE_MAX_TASK];
+ static unsigned int pollQueueCount = 0;
+
+@@ -1041,7 +1041,8 @@
+ * but unfortunately there is no way how to detect that
+ * we are building for RedHat's kernel...
+ */
+- static spinlock_t timerLock = SPIN_LOCK_UNLOCKED;
++
++ static DEFINE_SPINLOCK(timerLock);
+
+ spin_lock(&timerLock);
+ mod_timer(&linuxState.pollTimer, jiffies + 1);
+diff -u -r source-original/vmmon-only/linux/hostif.c source/vmmon-only/linux/hostif.c
+--- source-original/vmmon-only/linux/hostif.c 2011-03-26 06:37:27.000000000 +0100
++++ source/vmmon-only/linux/hostif.c 2011-04-02 13:27:58.000000000 +0200
+@@ -46,7 +46,6 @@
+ #include <linux/mman.h>
+
+ #include <linux/smp.h>
+-#include <linux/smp_lock.h>
+
+ #include <asm/io.h>
+ #include <linux/mc146818rtc.h>
+diff -u -r source-original/vmmon-only/linux/iommu.c source/vmmon-only/linux/iommu.c
+--- source-original/vmmon-only/linux/iommu.c 2011-03-26 06:37:27.000000000 +0100
++++ source/vmmon-only/linux/iommu.c 2011-04-02 13:28:58.000000000 +0200
+@@ -44,7 +44,7 @@
+
+
+ static LIST_HEAD(passthruDeviceList);
+-static spinlock_t passthruDeviceListLock = SPIN_LOCK_UNLOCKED;
++static DEFINE_SPINLOCK(passthruDeviceListLock);
+ static void *pciHolePage = NULL;
+
+ /*
+diff -u -r source-original/vmnet-only/driver.c source/vmnet-only/driver.c
+--- source-original/vmnet-only/driver.c 2011-03-26 06:37:29.000000000 +0100
++++ source/vmnet-only/driver.c 2011-04-02 14:14:57.000000000 +0200
+@@ -28,7 +28,6 @@
+ #include <linux/poll.h>
+
+ #include <linux/smp.h>
+-#include <linux/smp_lock.h>
+
+ #include <linux/netdevice.h>
+ #include <linux/etherdevice.h>
+@@ -105,7 +104,7 @@
+ * not have vnetStructureMutex already acquired,
+ * it is most certainly a bug.
+ */
+-static rwlock_t vnetPeerLock = RW_LOCK_UNLOCKED;
++static DEFINE_RWLOCK(vnetPeerLock);
+
+ /*
+ * All concurrent changes to the network structure are
+@@ -115,6 +114,7 @@
+ * vnetStructureMutex and vnetPeerLock for write.
+ */
+ compat_define_mutex(vnetStructureMutex);
++compat_define_mutex(vnetMutex);
+
+ #if defined(VM_X86_64) && !defined(HAVE_COMPAT_IOCTL)
+ /*
+@@ -264,11 +264,11 @@
+ struct file * filp) // IN:
+ {
+ int ret = -ENOTTY;
+- lock_kernel();
++ compat_mutex_lock(&vnetMutex);
+ if (filp && filp->f_op && filp->f_op->ioctl == VNetFileOpIoctl) {
+ ret = VNetFileOpIoctl(filp->f_dentry->d_inode, filp, iocmd, ioarg);
+ }
+- unlock_kernel();
++ compat_mutex_unlock(&vnetMutex);
+ return ret;
+ }
+
+@@ -1134,9 +1134,9 @@
+ if (filp && filp->f_dentry) {
+ inode = filp->f_dentry->d_inode;
+ }
+- lock_kernel();
++ compat_mutex_lock(&vnetMutex);
+ err = VNetFileOpIoctl(inode, filp, iocmd, ioarg);
+- unlock_kernel();
++ compat_mutex_unlock(&vnetMutex);
+ return err;
+ }
+ #endif
+diff -u -r source-original/vmnet-only/filter.c source/vmnet-only/filter.c
+--- source-original/vmnet-only/filter.c 2011-03-26 06:37:29.000000000 +0100
++++ source/vmnet-only/filter.c 2011-04-02 14:16:50.000000000 +0200
+@@ -85,7 +85,7 @@
+ * callbacks can be concurrently executing on multiple threads on multiple
+ * CPUs, so we should revisit locking for allowing for that in the future.
+ */
+-spinlock_t activeRuleLock = SPIN_LOCK_UNLOCKED;
++DEFINE_SPINLOCK(activeRuleLock);
+
+ /*
+ * Logging.
+diff -u -r source-original/vmnet-only/hub.c source/vmnet-only/hub.c
+--- source-original/vmnet-only/hub.c 2011-03-26 06:37:29.000000000 +0100
++++ source/vmnet-only/hub.c 2011-04-02 14:15:56.000000000 +0200
+@@ -81,7 +81,7 @@
+ * so we use __attribute__((unused)) to quiet the compiler.
+ */
+
+-static spinlock_t vnetHubLock __attribute__((unused)) = SPIN_LOCK_UNLOCKED;
++static DEFINE_SPINLOCK(vnetHubLock);
+
+
+ /*
+diff -u -r source-original/vsock-only/linux/af_vsock.c source/vsock-only/linux/af_vsock.c
+--- source-original/vsock-only/linux/af_vsock.c 2011-03-26 04:03:08.000000000 +0100
++++ source/vsock-only/linux/af_vsock.c 2011-04-02 13:33:39.000000000 +0200
+@@ -102,7 +102,6 @@
+ #include <linux/miscdevice.h>
+ #include <linux/poll.h>
+ #include <linux/smp.h>
+-#include <linux/smp_lock.h>
+ #include <asm/io.h>
+ #if defined(__x86_64__) && LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 12)
+ # if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 0)
+diff -u -r source-original/vsock-only/linux/util.c source/vsock-only/linux/util.c
+--- source-original/vsock-only/linux/util.c 2011-03-26 04:03:08.000000000 +0100
++++ source/vsock-only/linux/util.c 2011-04-02 13:35:45.000000000 +0200
+@@ -34,7 +34,7 @@
+ struct list_head vsockBindTable[VSOCK_HASH_SIZE + 1];
+ struct list_head vsockConnectedTable[VSOCK_HASH_SIZE];
+
+-spinlock_t vsockTableLock = SPIN_LOCK_UNLOCKED;
++DEFINE_SPINLOCK(vsockTableLock);
+
+ /*
+ * snprintf() wasn't exported until 2.4.10: fall back on sprintf in those
diff --git a/app-emulation/vmware-modules/vmware-modules-238.4-r1.ebuild b/app-emulation/vmware-modules/vmware-modules-238.4-r1.ebuild
new file mode 100644
index 0000000..9cb9326
--- /dev/null
+++ b/app-emulation/vmware-modules/vmware-modules-238.4-r1.ebuild
@@ -0,0 +1,81 @@
+# Copyright 1999-2011 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/app-emulation/vmware-modules/vmware-modules-238.4.ebuild,v 1.1 2011/04/15 12:32:45 vadimk Exp $
+
+EAPI="2"
+
+inherit eutils flag-o-matic linux-info linux-mod versionator
+
+PV_MAJOR=$(get_major_version)
+PV_MINOR=$(get_version_component_range 2)
+
+DESCRIPTION="VMware kernel modules"
+HOMEPAGE="http://www.vmware.com/"
+
+SRC_URI=""
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE=""
+
+RDEPEND=""
+DEPEND="${RDEPEND}
+ || ( =app-emulation/vmware-player-3.1.${PV_MINOR}*
+ =app-emulation/vmware-workstation-7.1.${PV_MINOR}* )"
+
+S=${WORKDIR}
+
+pkg_setup() {
+ CONFIG_CHECK="~HIGH_RES_TIMERS"
+ if kernel_is ge 2 6 37; then
+ if kernel_is lt 2 6 39; then
+ CONFIG_CHECK="${CONFIG_CHECK} BKL"
+ fi
+ fi
+
+ linux-info_pkg_setup
+
+ linux-mod_pkg_setup
+
+ VMWARE_GROUP=${VMWARE_GROUP:-vmware}
+
+ VMWARE_MODULE_LIST="vmblock vmci vmmon vmnet vsock"
+ VMWARE_MOD_DIR="${PN}-${PVR}"
+
+ BUILD_TARGETS="auto-build KERNEL_DIR=${KERNEL_DIR} KBUILD_OUTPUT=${KV_OUT_DIR}"
+
+ enewgroup "${VMWARE_GROUP}"
+ filter-flags -mfpmath=sse
+
+ for mod in ${VMWARE_MODULE_LIST}; do
+ MODULE_NAMES="${MODULE_NAMES} ${mod}(misc:${S}/${mod}-only)"
+ done
+}
+
+src_unpack() {
+ cd "${S}"
+ for mod in ${VMWARE_MODULE_LIST}; do
+ tar -xf /opt/vmware/lib/vmware/modules/source/${mod}.tar
+ done
+}
+
+src_prepare() {
+ epatch "${FILESDIR}/${PV_MAJOR}-makefile-kernel-dir.patch"
+ epatch "${FILESDIR}/${PV_MAJOR}-makefile-include.patch"
+ epatch "${FILESDIR}/${PV_MAJOR}-jobserver.patch"
+ kernel_is ge 2 6 37 && epatch "${FILESDIR}/${PV_MAJOR}-sema.patch"
+ kernel_is ge 2 6 39 && epatch "${FILESDIR}/vmware-modules-linux-2.6.39.patch"
+}
+
+src_install() {
+ linux-mod_src_install
+ local udevrules="${T}/60-vmware.rules"
+ cat > "${udevrules}" <<-EOF
+ KERNEL=="vmci", GROUP="vmware", MODE=660
+ KERNEL=="vmmon", GROUP="vmware", MODE=660
+ KERNEL=="vsock", GROUP="vmware", MODE=660
+ EOF
+ insinto /etc/udev/rules.d/
+ doins "${udevrules}"
+}