Skip to content

Instantly share code, notes, and snippets.

@coldnew
Created January 26, 2015 01:36
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save coldnew/cf3327e0c19565c67be9 to your computer and use it in GitHub Desktop.
Save coldnew/cf3327e0c19565c67be9 to your computer and use it in GitHub Desktop.
Vmware Fusion 7 modules on Gentoo Linux Kerne 3.18 patch
diff -aurN a/vsock-only/linux/notify.c b/vsock-only/linux/notify.c
--- a/vsock-only/linux/notify.c 2014-11-18 10:08:42.000000000 +0800
+++ b/vsock-only/linux/notify.c 2015-01-26 09:17:54.440277630 +0800
@@ -515,8 +515,11 @@
vsk = vsock_sk(sk);
PKT_FIELD(vsk, sentWaitingRead) = FALSE;
#endif
-
+#if LINUX_VERSION_CODE < KERNEL_VERSION(3,15,0)
sk->sk_data_ready(sk, 0);
+#else
+ sk->sk_data_ready(sk);
+#endif
}
diff -aurN a/vsock-only/linux/notifyQState.c b/vsock-only/linux/notifyQState.c
--- a/vsock-only/linux/notifyQState.c 2014-11-18 10:08:42.000000000 +0800
+++ b/vsock-only/linux/notifyQState.c 2015-01-26 09:19:25.500917968 +0800
@@ -164,7 +164,11 @@
struct sockaddr_vm *dst, // IN: unused
struct sockaddr_vm *src) // IN: unused
{
+#if LINUX_VERSION_CODE < KERNEL_VERSION(3,15,0)
sk->sk_data_ready(sk, 0);
+#else
+ sk->sk_data_ready(sk);
+#endif
}
@@ -566,7 +570,11 @@
}
/* See the comment in VSockVmciNotifyPktSendPostEnqueue */
+#if LINUX_VERSION_CODE < KERNEL_VERSION(3,15,0)
sk->sk_data_ready(sk, 0);
+#else
+ sk->sk_data_ready(sk);
+#endif
}
return err;
diff -aurN a/vmhgfs-only/inode.c b/vmhgfs-only/inode.c
--- a/vmhgfs-only/inode.c 2014-11-18 10:07:13.000000000 +0800
+++ b/vmhgfs-only/inode.c 2015-01-24 10:59:07.000000000 +0800
@@ -1922,7 +1922,11 @@
p,
#endif
&inode->i_dentry,
+#if LINUX_VERSION_CODE < KERNEL_VERSION(3, 18, 0)
d_alias) {
+#else
+ d_u.d_alias) {
+#endif
int dcount = hgfs_d_count(dentry);
if (dcount) {
LOG(4, ("Found %s %d \n", dentry->d_name.name, dcount));
@@ -1975,7 +1979,11 @@
/* Find a dentry with valid d_count. Refer bug 587879. */
list_for_each(pos, &inode->i_dentry) {
int dcount;
+#if LINUX_VERSION_CODE < KERNEL_VERSION(3, 18, 0)
struct dentry *dentry = list_entry(pos, struct dentry, d_alias);
+#else
+ struct dentry *dentry = list_entry(pos, struct dentry, d_u.d_alias);
+#endif
dcount = hgfs_d_count(dentry);
if (dcount) {
LOG(4, ("Found %s %d \n", (dentry)->d_name.name, dcount));
diff -aurN a/vmhgfs.ori/vmhgfs-only/page.c b/vmhgfs/vmhgfs-only/page.c
--- a/vmhgfs-only/page.c 2014-11-18 10:07:13.000000000 +0800
+++ b/vmhgfs-only/page.c 2015-01-24 10:55:23.000000000 +0800
@@ -1678,9 +1678,18 @@
LOG(6, (KERN_WARNING "VMware Hgfs: %s: Invalid unlock attempted\n", __func__));
return;
}
+#if LINUX_VERSION_CODE < KERNEL_VERSION(3, 18, 0)
smp_mb__before_clear_bit();
+#else
+ smp_mb__before_atomic();
+#endif
clear_bit(PG_BUSY, &req->wb_flags);
+#if LINUX_VERSION_CODE < KERNEL_VERSION(3, 18, 0)
smp_mb__after_clear_bit();
+#else
+ smp_mb__after_atomic();
+#endif
+
#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 13)
wake_up_bit(&req->wb_flags, PG_BUSY);
#else
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment