sm-commit AT lists.ibiblio.org
Subject: Source Mage code commit list
List archive
[SM-Commit] GIT changes to master z-rejected grimoire by Remko van der Vossen (bc46a130ce3ee684dd25774c90bb4c2a719abc1a)
- From: Remko van der Vossen <scm AT sourcemage.org>
- To: sm-commit AT lists.ibiblio.org
- Subject: [SM-Commit] GIT changes to master z-rejected grimoire by Remko van der Vossen (bc46a130ce3ee684dd25774c90bb4c2a719abc1a)
- Date: Mon, 25 May 2015 04:52:08 -0500
GIT changes to master z-rejected grimoire by Remko van der Vossen
<wich AT yuugen.jp>:
z-kernels/nvidia_legacy_340xx/HISTORY | 4 +
z-kernels/nvidia_legacy_340xx/NVIDIA-Linux-340.76-cr4.patch | 29
++++++++++++
z-kernels/nvidia_legacy_340xx/PRE_BUILD | 2
3 files changed, 35 insertions(+)
New commits:
commit bc46a130ce3ee684dd25774c90bb4c2a719abc1a
Author: Remko van der Vossen <wich AT yuugen.jp>
Commit: Remko van der Vossen <wich AT yuugen.jp>
nvidia_legacy_340xx: fix building against newer kernels
diff --git a/z-kernels/nvidia_legacy_340xx/HISTORY
b/z-kernels/nvidia_legacy_340xx/HISTORY
index d694818..ce35d92 100644
--- a/z-kernels/nvidia_legacy_340xx/HISTORY
+++ b/z-kernels/nvidia_legacy_340xx/HISTORY
@@ -1,3 +1,7 @@
+2015-05-24 Remko van der Vossen <wich AT sourcemage.org>
+ * PRE_BUILD, NVIDIA-Linux-340.76-cr4.patch:
+ allow building against newer kernels
+
2015-03-26 Vlad Glagolev <stealth AT sourcemage.org>
* PRE_BUILD: use check_tmp_noexec
diff --git a/z-kernels/nvidia_legacy_340xx/NVIDIA-Linux-340.76-cr4.patch
b/z-kernels/nvidia_legacy_340xx/NVIDIA-Linux-340.76-cr4.patch
new file mode 100644
index 0000000..620c5d9
--- /dev/null
+++ b/z-kernels/nvidia_legacy_340xx/NVIDIA-Linux-340.76-cr4.patch
@@ -0,0 +1,29 @@
+diff -Naur orig/kernel/nv-pat.c fixed/kernel/nv-pat.c
+--- orig/kernel/nv-pat.c 2015-01-22 20:01:16.000000000 +0100
++++ fixed/kernel/nv-pat.c 2015-05-25 11:53:18.000000000 +0200
+@@ -35,8 +35,13 @@
+ unsigned long cr0 = read_cr0();
+ write_cr0(((cr0 & (0xdfffffff)) | 0x40000000));
+ wbinvd();
++#if LINUX_VERSION_CODE < KERNEL_VERSION(3, 20, 0)
+ *cr4 = read_cr4();
+ if (*cr4 & 0x80) write_cr4(*cr4 & ~0x80);
++#else
++ *cr4 = __read_cr4();
++ if (*cr4 & 0x80) __write_cr4(*cr4 & ~0x80);
++#endif
+ __flush_tlb();
+ }
+
+@@ -46,7 +51,11 @@
+ wbinvd();
+ __flush_tlb();
+ write_cr0((cr0 & 0x9fffffff));
++#if LINUX_VERSION_CODE < KERNEL_VERSION(3, 20, 0)
+ if (cr4 & 0x80) write_cr4(cr4);
++#else
++ if (cr4 & 0x80) __write_cr4(cr4);
++#endif
+ }
+
+ static int nv_determine_pat_mode(void)
diff --git a/z-kernels/nvidia_legacy_340xx/PRE_BUILD
b/z-kernels/nvidia_legacy_340xx/PRE_BUILD
index 920f631..3902790 100755
--- a/z-kernels/nvidia_legacy_340xx/PRE_BUILD
+++ b/z-kernels/nvidia_legacy_340xx/PRE_BUILD
@@ -9,6 +9,8 @@ cd $SOURCE_DIRECTORY
&&
# Fix defunct desktop file
sedit 's/__.*__\///' nvidia-settings.desktop &&
+patch -p1 < "$SPELL_DIRECTORY"/NVIDIA-Linux-340.76-cr4.patch &&
+
#
# Setup Makefile symlink
#
- [SM-Commit] GIT changes to master z-rejected grimoire by Remko van der Vossen (bc46a130ce3ee684dd25774c90bb4c2a719abc1a), Remko van der Vossen, 05/25/2015
Archive powered by MHonArc 2.6.24.