Go to:
Gentoo Home
Documentation
Forums
Lists
Bugs
Planet
Store
Wiki
Get Gentoo!
Gentoo's Bugzilla – Attachment 298247 Details for
Bug 397847
app-emulation/vmware-modules-238.5 fail to compile with gentoo-sources-3.2.0
Home
|
New
–
[Ex]
|
Browse
|
Search
|
Privacy Policy
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Patch for kernel 3.1
vmware3.1.0.patch (text/plain), 9.67 KB, created by
Richard Cox
on 2012-01-07 17:24:42 UTC
(
hide
)
Description:
Patch for kernel 3.1
Filename:
MIME Type:
Creator:
Richard Cox
Created:
2012-01-07 17:24:42 UTC
Size:
9.67 KB
patch
obsolete
>diff -u -r source-orig/vmblock-only/linux/dentry.c source/vmblock-only/linux/dentry.c >--- source-orig/vmblock-only/linux/dentry.c 2011-03-26 04:03:06.000000000 +0100 >+++ source/vmblock-only/linux/dentry.c 2011-05-27 07:32:17.000000000 +0200 >@@ -104,7 +104,11 @@ > return actualDentry->d_op->d_revalidate(actualDentry, nd); > } > >- if (path_lookup(iinfo->name, 0, &actualNd)) { >+#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 39) >+ if (compat_path_lookup(iinfo->name, 0, &actualNd)) { >+#else >+ if (kern_path(iinfo->name, 0, &(actualNd.path))) { >+#endif > LOG(4, "DentryOpRevalidate: [%s] no longer exists\n", iinfo->name); > return 0; > } >diff -u -r source-orig/vmblock-only/linux/filesystem.c source/vmblock-only/linux/filesystem.c >--- source-orig/vmblock-only/linux/filesystem.c 2011-03-26 04:03:06.000000000 +0100 >+++ source/vmblock-only/linux/filesystem.c 2011-05-30 10:20:50.000000000 +0200 >@@ -44,9 +44,14 @@ > /* File system operations */ > > #if defined(VMW_GETSB_2618) >+#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 39) > static int FsOpGetSb(struct file_system_type *fsType, int flags, > const char *devName, void *rawData, struct vfsmount *mnt); > #else >+static struct dentry *FsOpMount(struct file_system_type *fsType, int flags, >+ const char *devName, void *rawData); >+#endif >+#else > static struct super_block *FsOpGetSb(struct file_system_type *fsType, int flags, > const char *devName, void *rawData); > #endif >@@ -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, 39) > .get_sb = FsOpGetSb, >+ #else >+ .mount = FsOpMount, >+ #endif > .kill_sb = kill_anon_super, > }; > >@@ -336,7 +345,11 @@ > goto error_inode; > } > >+#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 39) > if (compat_path_lookup(iinfo->name, 0, &actualNd)) { >+#else >+ if (kern_path(iinfo->name, 0, &(actualNd.path))) { >+#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 +546,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 +564,7 @@ > * > *----------------------------------------------------------------------------- > */ >- >+#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 39) > static int > FsOpGetSb(struct file_system_type *fs_type, // IN: file system type of mount > int flags, // IN: mount flags >@@ -563,6 +575,16 @@ > return get_sb_nodev(fs_type, flags, rawData, FsOpReadSuper, mnt); > } > #else >+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); >+} >+#endif >+#else > /* > *----------------------------------------------------------------------------- > * >diff -u -r source-orig/vmci-only/linux/driver.c source/vmci-only/linux/driver.c >--- source-orig/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-orig/vmmon-only/linux/driver.c source/vmmon-only/linux/driver.c >--- source-orig/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-orig/vmmon-only/linux/hostif.c source/vmmon-only/linux/hostif.c >--- source-orig/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-orig/vmmon-only/linux/iommu.c source/vmmon-only/linux/iommu.c >--- source-orig/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-orig/vmnet-only/compat_netdevice.h source/vmnet-only/compat_netdevice.h >--- source-orig/vmnet-only/compat_netdevice.h 2011-03-26 06:37:29.000000000 +0100 >+++ source/vmnet-only/compat_netdevice.h 2011-08-10 08:17:57.000000000 +0200 >@@ -47,6 +47,19 @@ > # define net_device device > #endif > >+/* it looks like these have been removed from the kernel 3.1 >+ * probably because the "transition" is considered complete. >+ * so to keep this source compatible we just redefine them like they were >+ * previously >+ */ >+#if LINUX_VERSION_CODE >= KERNEL_VERSION(3, 1, 0) >+#define HAVE_ALLOC_NETDEV /* feature macro: alloc_xxxdev >+ functions are available. */ >+#define HAVE_FREE_NETDEV /* free_netdev() */ >+#define HAVE_NETDEV_PRIV /* netdev_priv() */ >+#define HAVE_NETIF_QUEUE >+#define HAVE_NET_DEVICE_OPS >+#endif > > /* > * SET_MODULE_OWNER appeared sometime during 2.3.x. It was setting >diff -u -r source-orig/vmnet-only/driver.c source/vmnet-only/driver.c >--- source-orig/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-orig/vmnet-only/filter.c source/vmnet-only/filter.c >--- source-orig/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-orig/vmnet-only/hub.c source/vmnet-only/hub.c >--- source-orig/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-orig/vsock-only/linux/af_vsock.c source/vsock-only/linux/af_vsock.c >--- source-orig/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-orig/vsock-only/linux/util.c source/vsock-only/linux/util.c >--- source-orig/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
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 397847
:
298215
|
298245
| 298247 |
298249