nvidia-x11-legacy{340,304}: fix build with linux-3.18
Close #9218. It's our default kernel (now and for the upcoming release). - 304 won't build with 4.1, - 173 didn't even build with 3.14 due to other issues (3.12 is OK ATM) - all legacy drivers are up-to-date with upstream releases.
This commit is contained in:
parent
bf37974165
commit
e2e21ef320
@ -15,6 +15,8 @@ stdenv.mkDerivation {
|
|||||||
|
|
||||||
builder = ./builder-legacy304.sh;
|
builder = ./builder-legacy304.sh;
|
||||||
|
|
||||||
|
patches = [ ./nvidia-340.76-kernel-4.0.patch ];
|
||||||
|
|
||||||
src =
|
src =
|
||||||
if stdenv.system == "i686-linux" then
|
if stdenv.system == "i686-linux" then
|
||||||
fetchurl {
|
fetchurl {
|
||||||
|
@ -4,7 +4,7 @@
|
|||||||
unsigned long cr0 = read_cr0();
|
unsigned long cr0 = read_cr0();
|
||||||
write_cr0(((cr0 & (0xdfffffff)) | 0x40000000));
|
write_cr0(((cr0 & (0xdfffffff)) | 0x40000000));
|
||||||
wbinvd();
|
wbinvd();
|
||||||
+#if LINUX_VERSION_CODE < KERNEL_VERSION(3, 20, 0)
|
+#if LINUX_VERSION_CODE < KERNEL_VERSION(3, 18, 0)
|
||||||
*cr4 = read_cr4();
|
*cr4 = read_cr4();
|
||||||
if (*cr4 & 0x80) write_cr4(*cr4 & ~0x80);
|
if (*cr4 & 0x80) write_cr4(*cr4 & ~0x80);
|
||||||
+#else
|
+#else
|
||||||
@ -18,7 +18,7 @@
|
|||||||
wbinvd();
|
wbinvd();
|
||||||
__flush_tlb();
|
__flush_tlb();
|
||||||
write_cr0((cr0 & 0x9fffffff));
|
write_cr0((cr0 & 0x9fffffff));
|
||||||
+#if LINUX_VERSION_CODE < KERNEL_VERSION(3, 20, 0)
|
+#if LINUX_VERSION_CODE < KERNEL_VERSION(3, 18, 0)
|
||||||
if (cr4 & 0x80) write_cr4(cr4);
|
if (cr4 & 0x80) write_cr4(cr4);
|
||||||
+#else
|
+#else
|
||||||
+ if (cr4 & 0x80) __write_cr4(cr4);
|
+ if (cr4 & 0x80) __write_cr4(cr4);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user