public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
From: "Fabio Rossi" <rossi.f@inwind.net>
To: gentoo-commits@lists.gentoo.org
Subject: [gentoo-commits] proj/vmware:master commit in: app-emulation/vmware-modules/files/, app-emulation/vmware-modules/
Date: Tue,  5 Dec 2017 00:16:34 +0000 (UTC)	[thread overview]
Message-ID: <1512428591.0f4fedb03b69af3b839d73c74a0aa87bc1132ba8.fabio@gentoo> (raw)

commit:     0f4fedb03b69af3b839d73c74a0aa87bc1132ba8
Author:     Fabio Rossi <rossi.f <AT> inwind <DOT> it>
AuthorDate: Mon Dec  4 23:03:11 2017 +0000
Commit:     Fabio Rossi <rossi.f <AT> inwind <DOT> net>
CommitDate: Mon Dec  4 23:03:11 2017 +0000
URL:        https://gitweb.gentoo.org/proj/vmware.git/commit/?id=0f4fedb0

app-emulation/vmware-modules: add support to kernel 4.15-rc2

Patch inspired to https://github.com/mkubecek/vmware-host-modules/commit/562121d7bc06
but I prefer to leave the sources as close as possible to the original ones.

The changes are due to kernel commits b9eaf18722221ef8b2bd6a67240ebe668622152a
and e99e88a9d2b067465adaa9c111ada99a041bef9a

 .../files/308-4.15-00-init_timer.patch             | 105 +++++++++++++++++++++
 .../vmware-modules/vmware-modules-308.5.8.ebuild   |   1 +
 2 files changed, 106 insertions(+)

diff --git a/app-emulation/vmware-modules/files/308-4.15-00-init_timer.patch b/app-emulation/vmware-modules/files/308-4.15-00-init_timer.patch
new file mode 100644
index 0000000..94855db
--- /dev/null
+++ b/app-emulation/vmware-modules/files/308-4.15-00-init_timer.patch
@@ -0,0 +1,105 @@
+--- vmmon-only/linux/hostif.c	2017-12-04 23:49:53.485615520 +0100
++++ vmmon-only/linux/hostif.c.orig	2017-12-04 23:54:13.982630086 +0100
+@@ -1780,7 +1780,11 @@
+  */
+ 
+ static void
++#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 15, 0)
++HostIFUptimeResyncMono(struct timer_list *data)  // IN: ignored
++#else
+ HostIFUptimeResyncMono(unsigned long data)  // IN: ignored
++#endif
+ {
+    unsigned long jifs;
+    uintptr_t flags;
+@@ -1842,8 +1846,12 @@
+                   -(tv.tv_usec * (UPTIME_FREQ / 1000000) + 
+                     tv.tv_sec * UPTIME_FREQ));
+ 
++#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 15, 0)
++   timer_setup(&uptimeState.timer, HostIFUptimeResyncMono, 0);
++#else
+    init_timer(&uptimeState.timer);
+    uptimeState.timer.function = HostIFUptimeResyncMono;
++#endif
+    mod_timer(&uptimeState.timer, jiffies + HZ);
+ }
+ 
+--- vmmon-only/linux/driver.c	2017-12-04 23:49:53.061615496 +0100
++++ vmmon-only/linux/driver.c.orig	2017-12-04 23:53:26.086627408 +0100
+@@ -115,7 +115,11 @@
+ #endif
+ static int LinuxDriverMmap(struct file *filp, struct vm_area_struct *vma);
+ 
++#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 15, 0)
++static void LinuxDriverPollTimeout(struct timer_list *clientData);
++#else
+ static void LinuxDriverPollTimeout(unsigned long clientData);
++#endif
+ static unsigned int LinuxDriverEstimateTSCkHz(void);
+ 
+ static struct vm_operations_struct vmuser_mops = {
+@@ -227,7 +231,11 @@
+  *----------------------------------------------------------------------
+  */
+ static void
++#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 15, 0)
++LinuxDriverEstimateTSCkHzDeferred(struct timer_list *data)
++#else
+ LinuxDriverEstimateTSCkHzDeferred(unsigned long data)
++#endif
+ {
+    LinuxDriverEstimateTSCkHz();
+ }
+@@ -265,9 +273,11 @@
+    }
+ 
+    Vmx86_ReadTSCAndUptime(&tsckHzStartTime);
++#if LINUX_VERSION_CODE < KERNEL_VERSION(4, 15, 0)
+    tscTimer.function = LinuxDriverEstimateTSCkHzDeferred;
+-   tscTimer.expires  = jiffies + 4 * HZ;
+    tscTimer.data     = 0;
++#endif
++   tscTimer.expires  = jiffies + 4 * HZ;
+    add_timer(&tscTimer);
+ }
+ 
+@@ -309,9 +319,14 @@
+     */
+ 
+    init_waitqueue_head(&linuxState.pollQueue);
++
++#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 15, 0)
++   timer_setup(&linuxState.pollTimer, LinuxDriverPollTimeout, 0);
++#else
+    init_timer(&linuxState.pollTimer);
+    linuxState.pollTimer.data = 0;
+    linuxState.pollTimer.function = LinuxDriverPollTimeout;
++#endif
+ 
+    linuxState.fastClockThread = NULL;
+    linuxState.fastClockFile = NULL;
+@@ -360,7 +375,11 @@
+        linuxState.deviceName, linuxState.major, linuxState.minor);
+ 
+    HostIF_InitUptime();
++#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 15, 0)
++   timer_setup(&tscTimer, LinuxDriverEstimateTSCkHzDeferred, 0UL);
++#else
+    init_timer(&tscTimer);
++#endif
+    LinuxDriverInitTSCkHz();
+    Vmx86_InitIDList();
+ 
+@@ -858,7 +877,11 @@
+  */
+ 
+ static void
++#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 15, 0)
++LinuxDriverPollTimeout(struct timer_list *clientData)  // IN:
++#else
+ LinuxDriverPollTimeout(unsigned long clientData)  // IN:
++#endif
+ {
+    LinuxDriverWakeUp(FALSE);
+ }

diff --git a/app-emulation/vmware-modules/vmware-modules-308.5.8.ebuild b/app-emulation/vmware-modules/vmware-modules-308.5.8.ebuild
index 0f74914..e6f2999 100644
--- a/app-emulation/vmware-modules/vmware-modules-308.5.8.ebuild
+++ b/app-emulation/vmware-modules/vmware-modules-308.5.8.ebuild
@@ -114,6 +114,7 @@ src_prepare() {
 	kernel_is ge 4 13 0 && epatch "${FILESDIR}/${PV_MAJOR}-4.13-01-vmmon-fix-page-accounting.patch"
 	kernel_is ge 4 14 0 && epatch "${FILESDIR}/${PV_MAJOR}-4.14-00-vmmon-global-page-state.patch"
 	kernel_is ge 4 14 0 && epatch "${FILESDIR}/${PV_MAJOR}-4.14-01-deprecated-asm-uaccess.patch"
+	kernel_is ge 4 15 0 && epatch "${FILESDIR}/${PV_MAJOR}-4.15-00-init_timer.patch"
 
 	# Allow user patches so they can support RC kernels and whatever else
 	epatch_user


             reply	other threads:[~2017-12-05  0:16 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-12-05  0:16 Fabio Rossi [this message]
  -- strict thread matches above, loose matches on Subject: below --
2017-11-09 21:56 [gentoo-commits] proj/vmware:master commit in: app-emulation/vmware-modules/files/, app-emulation/vmware-modules/ Fabio Rossi
2017-11-09 21:56 Fabio Rossi
2017-11-09 21:56 Fabio Rossi
2017-08-22 10:02 Fabio Rossi
2016-08-05  7:29 Fabio Rossi
2016-05-30 21:52 Fabio Rossi
2016-03-18 23:33 Andreas Hüttel
2016-03-18  3:16 Evan Teran
2016-03-17  2:03 Evan Teran
2016-03-17  1:44 Evan Teran
2015-07-10 23:42 Evan Teran
2015-07-10 23:17 Evan Teran
2014-10-11 21:54 Evan Teran
2014-10-11 15:52 Evan Teran
2014-10-11 15:52 Evan Teran
2014-10-10 13:55 Evan Teran
2014-10-10 13:55 Evan Teran
2014-10-10 13:55 Evan Teran

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1512428591.0f4fedb03b69af3b839d73c74a0aa87bc1132ba8.fabio@gentoo \
    --to=rossi.f@inwind.net \
    --cc=gentoo-commits@lists.gentoo.org \
    --cc=gentoo-dev@lists.gentoo.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox