Go to:
Gentoo Home
Documentation
Forums
Lists
Bugs
Planet
Store
Wiki
Get Gentoo!
Gentoo's Bugzilla – Attachment 182663 Details for
Bug 255208
app-emulation/vmware-modules-1.0.0.23 fails to compile on kernels <=2.6.27
Home
|
New
–
[Ex]
|
Browse
|
Search
|
Privacy Policy
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
1.0.0.23-smpcall-pollinitwait.patch Patch to fix the issues described here
1.0.0.23-smpcall-pollinitwait.patch (text/plain), 10.60 KB, created by
Robert Schultz
on 2009-02-20 14:47:28 UTC
(
hide
)
Description:
1.0.0.23-smpcall-pollinitwait.patch Patch to fix the issues described here
Filename:
MIME Type:
Creator:
Robert Schultz
Created:
2009-02-20 14:47:28 UTC
Size:
10.60 KB
patch
obsolete
>diff -Naur a/vmblock-only/include/compat_wait.h b/vmblock-only/include/compat_wait.h >--- a/vmblock-only/include/compat_wait.h 2008-10-28 22:47:20.000000000 -0700 >+++ b/vmblock-only/include/compat_wait.h 2009-01-20 04:49:44.000000000 -0700 >@@ -75,7 +75,11 @@ > #elif LINUX_VERSION_CODE >= KERNEL_VERSION(2, 4, 0) // { > > /* If prototype does not match, build will abort here */ >+#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 29) > extern void poll_initwait(compat_poll_wqueues *); >+#else >+extern void poll_initwait(struct poll_wqueues *pwq); >+#endif > > #define compat_poll_initwait(wait, table) ( \ > (wait) = (table), \ >diff -Naur a/vmci-only/include/compat_wait.h b/vmci-only/include/compat_wait.h >--- a/vmci-only/include/compat_wait.h 2008-10-28 22:47:21.000000000 -0700 >+++ b/vmci-only/include/compat_wait.h 2009-01-20 04:49:44.000000000 -0700 >@@ -75,7 +75,11 @@ > #elif LINUX_VERSION_CODE >= KERNEL_VERSION(2, 4, 0) // { > > /* If prototype does not match, build will abort here */ >+#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 29) > extern void poll_initwait(compat_poll_wqueues *); >+#else >+extern void poll_initwait(struct poll_wqueues *pwq); >+#endif > > #define compat_poll_initwait(wait, table) ( \ > (wait) = (table), \ >diff -Naur a/vmmon-only/include/compat_wait.h b/vmmon-only/include/compat_wait.h >--- a/vmmon-only/include/compat_wait.h 2008-10-28 22:47:18.000000000 -0700 >+++ b/vmmon-only/include/compat_wait.h 2009-01-20 04:49:44.000000000 -0700 >@@ -75,7 +75,11 @@ > #elif LINUX_VERSION_CODE >= KERNEL_VERSION(2, 4, 0) // { > > /* If prototype does not match, build will abort here */ >+#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 29) > extern void poll_initwait(compat_poll_wqueues *); >+#else >+extern void poll_initwait(struct poll_wqueues *pwq); >+#endif > > #define compat_poll_initwait(wait, table) ( \ > (wait) = (table), \ >diff -Naur a/vmmon-only/include/x86apic.h b/vmmon-only/include/x86apic.h >--- a/vmmon-only/include/x86apic.h 2008-10-28 22:47:17.000000000 -0700 >+++ b/vmmon-only/include/x86apic.h 2009-01-20 04:49:44.000000000 -0700 >@@ -94,7 +94,11 @@ > #define APIC_LVT_DELVMODE(_lvt) (_lvt & 0x700) > #define APIC_LVT_RESET_VALUE 0x00010000 > >+#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 28) > #define APIC_BASE_MSR 0x1b >+#else >+#define APIC_BASE_MSR 0x800 >+#endif > > #define APIC_MSR_BASEMASK QWORD(0x0000000f,0xfffff000) > #define APIC_MSR_ENABLED 0x00000800 >diff -Naur a/vmmon-only/linux/driver.c b/vmmon-only/linux/driver.c >--- a/vmmon-only/linux/driver.c 2008-10-28 22:47:18.000000000 -0700 >+++ b/vmmon-only/linux/driver.c 2009-01-20 04:49:44.000000000 -0700 >@@ -1984,10 +1984,17 @@ > } > > case IOCTL_VMX86_ALLOW_CORE_DUMP: >+#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 29) > if (current->euid == current->uid && > current->fsuid == current->uid && > current->egid == current->gid && > current->fsgid == current->gid) { >+#else /* 2.6.29 and higher */ >+ if (current->cred->euid == current->cred->uid && >+ current->cred->fsuid == current->cred->uid && >+ current->cred->egid == current->cred->gid && >+ current->cred->fsgid == current->cred->gid) { >+#endif /* 2.6.29 check */ > #if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 23) || defined(MMF_DUMPABLE) > /* Dump core, readable by user. */ > set_bit(MMF_DUMPABLE, ¤t->mm->flags); >diff -Naur a/vmmon-only/linux/hostif.c b/vmmon-only/linux/hostif.c >--- a/vmmon-only/linux/hostif.c 2008-10-28 22:47:17.000000000 -0700 >+++ b/vmmon-only/linux/hostif.c 2009-01-20 04:49:44.000000000 -0700 >@@ -2718,13 +2718,22 @@ > set_fs(get_ds()); > > { >+#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 29) > compat_poll_wqueues table; > poll_table *wait; >+#else /* 2.6.29 and above */ >+ struct poll_wqueues table; >+ struct poll_wqueues *wait; >+#endif /* 2.6.29 and above */ > unsigned int mask; > > compat_poll_initwait(wait, &table); > current->state = TASK_INTERRUPTIBLE; >+#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 29) > mask = file->f_op->poll(file, wait); >+#else >+ mask = file->f_op->poll(file, (poll_table *) wait); >+#endif /* 2.6.29 */ > if (!(mask & (POLLIN | POLLERR | POLLHUP))) { > #ifdef KERNEL_2_4_0 > vm->vmhost->vcpuSemaTask[vcpuid] = current; >@@ -2743,7 +2752,6 @@ > } > > res = file->f_op->read(file, &ch, 1, &file->f_pos); >- > set_fs(old_fs); > compat_fput(file); > >@@ -3455,8 +3463,13 @@ > oldFS = get_fs(); > set_fs(KERNEL_DS); > compat_allow_signal(SIGKILL); >+#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 29) > cap_raise(current->cap_effective, CAP_SYS_RESOURCE); > compat_set_user_nice(current, linuxState.fastClockPriority); >+#else /* 2.6.29 */ >+ (void) cap_raised(current->cred->cap_effective, CAP_SYS_RESOURCE); >+ set_user_nice(current, linuxState.fastClockPriority); >+#endif /* 2.6.29 and higher */ > > while (linuxState.fastClockRate > HZ + HZ/16) { > unsigned long buf; >@@ -3579,19 +3592,38 @@ > Bool cap; > long pid; > >+#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 29) > fsuid = current->fsuid; > current->fsuid = 0; >+#else >+ fsuid = current->cred->fsuid; >+#warning current->cred->fsuid = 0; >+#endif /* 2.6.29 */ > filp = filp_open("/dev/rtc", O_RDONLY, 0); >+ >+#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 29) > current->fsuid = fsuid; >+#else >+#warning current->cred->fsuid = fsuid; >+#endif /* 2.6.29 */ > if (IS_ERR(filp)) { > Warning("/dev/rtc open failed: %d\n", (int)(VA)filp); > return -(int)(VA)filp; > } >+#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 29) > cap = cap_raised(current->cap_effective, CAP_SYS_RESOURCE); > cap_raise(current->cap_effective, CAP_SYS_RESOURCE); >+#else /* 2.6.29 */ >+ cap = cap_raised(current->cred->cap_effective, CAP_SYS_RESOURCE); >+ (void) cap_raised(current->cred->cap_effective, CAP_SYS_RESOURCE); >+#endif /* 2.6.29 */ > res = HostIFDoIoctl(filp, RTC_PIE_ON, 0); > if (!cap) { >- cap_lower(current->cap_effective, CAP_SYS_RESOURCE); >+#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 29) >+ cap_lower(current->cap_effective, CAP_SYS_RESOURCE); >+#else >+#warning cap_lower(current->cred->cap_effective, CAP_SYS_RESOURCE); >+#endif /* 2.6.29 */ > } > if (res < 0) { > Warning("/dev/rtc enable interrupt failed: %d\n", res); >diff -Naur a/vmmon-only/linux/vmmonInt.h b/vmmon-only/linux/vmmonInt.h >--- a/vmmon-only/linux/vmmonInt.h 2008-10-28 22:47:17.000000000 -0700 >+++ b/vmmon-only/linux/vmmonInt.h 2009-01-20 04:49:44.000000000 -0700 >@@ -46,7 +46,10 @@ > #endif > > #if defined(CONFIG_SMP) && LINUX_VERSION_CODE >= KERNEL_VERSION(2, 2, 8) >-#ifdef VMW_HAVE_SMP_CALL_3ARG >+#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 29) >+#define VMW_HAVE_SMP_CALL_3ARG >+#endif >+#ifdef VMW_HAVE_SMP_CALL_3ARG > #define compat_smp_call_function(fn, info, wait) smp_call_function(fn, info, wait) > #else > #define compat_smp_call_function(fn, info, wait) smp_call_function(fn, info, 1, wait) >diff -Naur a/vmnet-only/bridge.c b/vmnet-only/bridge.c >--- a/vmnet-only/bridge.c 2008-10-28 22:47:18.000000000 -0700 >+++ b/vmnet-only/bridge.c 2009-01-20 04:49:44.000000000 -0700 >@@ -646,7 +646,11 @@ > dev_unlock_list(); > } else { > struct sock *sk = bridge->sk; >+#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 29) > atomic_add(skb->truesize, &sk->sk_wmem_alloc); >+#else >+#warning EHUD gotta figure out what this does and how to fix it: atomic_add(skb->truesize, &sk->sk_wmem_alloc); >+#endif /* 2.6.29 */ > clone->sk = sk; > clone->protocol = ((struct ethhdr *)skb->data)->h_proto; // XXX > if ((dev->flags & IFF_UP) != 0) { >diff -Naur a/vmnet-only/compat_wait.h b/vmnet-only/compat_wait.h >--- a/vmnet-only/compat_wait.h 2008-10-28 22:47:19.000000000 -0700 >+++ b/vmnet-only/compat_wait.h 2009-01-20 04:49:44.000000000 -0700 >@@ -75,7 +75,11 @@ > #elif LINUX_VERSION_CODE >= KERNEL_VERSION(2, 4, 0) // { > > /* If prototype does not match, build will abort here */ >+#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 29) > extern void poll_initwait(compat_poll_wqueues *); >+#else /* 2.6.29 */ >+extern void poll_initwait(struct poll_wqueues *); >+#endif /* 2.6.29 */ > > #define compat_poll_initwait(wait, table) ( \ > (wait) = (table), \ >diff -Naur a/vmnet-only/driver.c b/vmnet-only/driver.c >--- a/vmnet-only/driver.c 2008-10-28 22:47:19.000000000 -0700 >+++ b/vmnet-only/driver.c 2009-01-20 04:49:44.000000000 -0700 >@@ -146,6 +146,13 @@ > .owner = THIS_MODULE, > .obj_size = sizeof(struct sock), > }; >+#elif LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 29) >+struct proto vmnet_proto = { >+ .name = "VMNET", >+ .owner = THIS_MODULE, >+ .obj_size = sizeof(struct sock), >+}; >+ > #endif > > /* >diff -Naur a/vmnet-only/netif.c b/vmnet-only/netif.c >--- a/vmnet-only/netif.c 2008-10-28 22:47:18.000000000 -0700 >+++ b/vmnet-only/netif.c 2009-01-20 04:49:44.000000000 -0700 >@@ -324,7 +324,10 @@ > goto out; > } > >+#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 29) > dev->priv = netIf; >+#endif /* 2.6.29 */ >+ > netIf->dev = dev; > > memcpy(dev->dev_addr, netIf->port.paddr, sizeof netIf->port.paddr); >@@ -566,7 +569,11 @@ > VNetNetifStartXmit(struct sk_buff *skb, // IN: > struct net_device *dev) // IN: > { >+#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 29) > VNetNetIF *netIf = (VNetNetIF*)dev->priv; >+#else >+ VNetNetIF *netIf = netdev_priv(dev); >+#endif /* 2.6.29 */ > > if(skb == NULL) { > return 0; >@@ -618,7 +625,12 @@ > VNetNetifSetMAC(struct net_device *dev, // IN: > void *p) // IN: > { >+#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 29) > VNetNetIF *netIf = (VNetNetIF*)dev->priv; >+#else >+ VNetNetIF *netIf = netdev_priv(dev); >+#endif /* 2.6.29 */ >+ > struct sockaddr const *addr = p; > if (!VMX86_IS_STATIC_MAC(addr->sa_data)) { > return -EINVAL; >@@ -675,7 +687,11 @@ > struct net_device_stats * > VNetNetifGetStats(struct net_device *dev) // IN: > { >+#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 29) > VNetNetIF *netIf = (VNetNetIF*)dev->priv; >+#else >+ VNetNetIF *netIf = netdev_priv(dev); >+#endif /* 2.6.29 */ > return &(netIf->stats); > } > >diff -Naur a/vsock-only/include/compat_wait.h b/vsock-only/include/compat_wait.h >--- a/vsock-only/include/compat_wait.h 2009-01-20 14:11:34.000000000 +0100 >+++ b/vsock-only/include/compat_wait.h 2009-01-20 14:51:05.000000000 +0100 >@@ -75,7 +75,11 @@ > #elif LINUX_VERSION_CODE >= KERNEL_VERSION(2, 4, 0) // { > > /* If prototype does not match, build will abort here */ >+#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 29) > extern void poll_initwait(compat_poll_wqueues *); >+#else >+extern void poll_initwait(struct poll_wqueues *pwq); >+#endif > > #define compat_poll_initwait(wait, table) ( \ > (wait) = (table), \
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 255208
:
180507
| 182663 |
189961