summarylogtreecommitdiffstats
path: root/linux-4.0.patch
diff options
context:
space:
mode:
authorAlex Wiggins2015-06-08 21:25:47 +0100
committerAlex Wiggins2015-06-08 21:25:47 +0100
commitf400364b498233f43c42439e57acb42ad17ab10d (patch)
tree36fc5f715e8df91bfce6dec10489f1ee9834b39c /linux-4.0.patch
downloadaur-f400364b498233f43c42439e57acb42ad17ab10d.tar.gz
Initial AUR4 import - version 2011-2
Diffstat (limited to 'linux-4.0.patch')
-rw-r--r--linux-4.0.patch29
1 files changed, 29 insertions, 0 deletions
diff --git a/linux-4.0.patch b/linux-4.0.patch
new file mode 100644
index 00000000000..3a313729274
--- /dev/null
+++ b/linux-4.0.patch
@@ -0,0 +1,29 @@
+diff -durN /oss/build/osscore.c /oss/build/osscore.c
+--- /oss/build/osscore.c 2014-09-04 00:15:31.000000000 +0200
++++ /oss/build/osscore.c 2015-04-25 23:16:19.502116503 +0200
+@@ -1950,8 +1950,13 @@
+ }
+ else
+ {
++#if LINUX_VERSION_CODE < KERNEL_VERSION(4,0,0)
+ flags[1] = read_cr4 ();
+ write_cr4 (flags[1] | 0x600); /* Set OSFXSR & OSXMMEXCEPT */
++#else
++ flags[1] = __read_cr4 ();
++ __write_cr4 (flags[1] | 0x600); /* Set OSFXSR & OSXMMEXCEPT */
++#endif
+ FX_SAVE (envbuf);
+ asm ("fninit");
+ asm ("fwait");
+@@ -1971,7 +1976,11 @@
+ else
+ {
+ FX_RESTORE (envbuf);
++#if LINUX_VERSION_CODE < KERNEL_VERSION(4,0,0)
+ write_cr4 (flags[1]); /* Restore cr4 */
++#else
++ __write_cr4 (flags[1]); /* Restore cr4 */
++#endif
+ }
+ write_cr0 (flags[0]); /* Restore cr0 */
+ }