summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrew Bevitt <cyfred@gentoo.org>2004-10-04 11:03:24 +0000
committerAndrew Bevitt <cyfred@gentoo.org>2004-10-04 11:03:24 +0000
commit22e3c4381ed2171b6737d6693e7ee5e0cddd06f2 (patch)
tree68311eb94cceb4461ab01a7bc28842eaba85471e /media-video/nvidia-kernel
parentMarked 0.43-r4 stable on x86; clean up old versions. (Manifest recommit) (diff)
downloadgentoo-2-22e3c4381ed2171b6737d6693e7ee5e0cddd06f2.tar.gz
gentoo-2-22e3c4381ed2171b6737d6693e7ee5e0cddd06f2.tar.bz2
gentoo-2-22e3c4381ed2171b6737d6693e7ee5e0cddd06f2.zip
Multiple patch updates. Namely those for __VMALLOC_RESERVE, pci_get_class()
Diffstat (limited to 'media-video/nvidia-kernel')
-rw-r--r--media-video/nvidia-kernel/ChangeLog11
-rw-r--r--media-video/nvidia-kernel/Manifest56
-rw-r--r--media-video/nvidia-kernel/files/1.0.6111/nv-pci_find_class.patch93
-rw-r--r--media-video/nvidia-kernel/files/1.0.6111/nv-remap-range.patch161
-rw-r--r--media-video/nvidia-kernel/files/1.0.6111/vmalloc-reserve.patch14
-rw-r--r--media-video/nvidia-kernel/files/digest-nvidia-kernel-1.0.6111-r22
-rw-r--r--media-video/nvidia-kernel/nvidia-kernel-1.0.6111-r2.ebuild139
7 files changed, 440 insertions, 36 deletions
diff --git a/media-video/nvidia-kernel/ChangeLog b/media-video/nvidia-kernel/ChangeLog
index 5f476bf92a60..7462d3b44016 100644
--- a/media-video/nvidia-kernel/ChangeLog
+++ b/media-video/nvidia-kernel/ChangeLog
@@ -1,6 +1,15 @@
# ChangeLog for media-video/nvidia-kernel
# Copyright 2002-2004 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/media-video/nvidia-kernel/ChangeLog,v 1.90 2004/09/21 00:09:17 azarah Exp $
+# $Header: /var/cvsroot/gentoo-x86/media-video/nvidia-kernel/ChangeLog,v 1.91 2004/10/04 11:03:24 cyfred Exp $
+
+*nvidia-kernel-1.0.6111-r2 (04 Oct 2004)
+
+ 04 Oct 2004; Andrew Bevitt <cyfred@gentoo.org>;
+ files/1.0.6111/nv-pci_find_class.patch,
+ +files/1.0.6111/nv-remap-range.patch, +files/1.0.6111/vmalloc-reserve.patch,
+ +nvidia-kernel-1.0.6111-r2.ebuild:
+ Multiple patch updates. Namely those for __VMALLOC_RESERVE, pci_get_class()
+ and remap_pfn_range()
21 Sep 2004; Martin Schlemmer <azarah@gentoo.org>
nvidia-kernel-1.0.6111-r1.ebuild:
diff --git a/media-video/nvidia-kernel/Manifest b/media-video/nvidia-kernel/Manifest
index a57e67bfa3ec..d07f5cc178f3 100644
--- a/media-video/nvidia-kernel/Manifest
+++ b/media-video/nvidia-kernel/Manifest
@@ -1,40 +1,44 @@
-MD5 f189c720f21a41c73a6c292ffec6cdfd nvidia-kernel-1.0.5328-r1.ebuild 4461
-MD5 99bfcd484af08a27fbf2ea071b0943db nvidia-kernel-1.0.6111-r1.ebuild 3916
-MD5 adaa4b988fdf7f5d01676454db070547 ChangeLog 21858
+MD5 8ce6e8510b5396c685ad67f806351d36 nvidia-kernel-1.0.6106-r1.ebuild 3622
+MD5 b4a7988f8e10107742f255ea291478c0 nvidia-kernel-1.0.4499.ebuild 4028
+MD5 50208459284c8e8ee159d1a3e2c25bd9 nvidia-kernel-1.0.6111-r2.ebuild 4113
MD5 c65724336acbdb77c80842d7a9174301 nvidia-kernel-1.0.5332-r1.ebuild 4256
-MD5 cc0512640bc35c3419b55a455c480d9f nvidia-kernel-1.0.5336-r4.ebuild 4782
-MD5 d5bc3ba053815cd1b559cba6bbd36452 nvidia-kernel-1.0.4363-r3.ebuild 4071
+MD5 99bfcd484af08a27fbf2ea071b0943db nvidia-kernel-1.0.6111-r1.ebuild 3916
+MD5 1e48aaa4989010b59109e1c81cd9741f nvidia-kernel-1.0.6111.ebuild 3723
+MD5 f189c720f21a41c73a6c292ffec6cdfd nvidia-kernel-1.0.5328-r1.ebuild 4461
MD5 20f6ae4f9076cd8f5dd1d2383d0eaca7 nvidia-kernel-1.0.4496-r3.ebuild 4286
-MD5 b4a7988f8e10107742f255ea291478c0 nvidia-kernel-1.0.4499.ebuild 4028
+MD5 d5bc3ba053815cd1b559cba6bbd36452 nvidia-kernel-1.0.4363-r3.ebuild 4071
+MD5 adaa4b988fdf7f5d01676454db070547 ChangeLog 21858
MD5 c84a79e7d9b69a204003fb8c2dbaad01 metadata.xml 297
-MD5 1e48aaa4989010b59109e1c81cd9741f nvidia-kernel-1.0.6111.ebuild 3723
-MD5 8ce6e8510b5396c685ad67f806351d36 nvidia-kernel-1.0.6106-r1.ebuild 3622
-MD5 56ebaa3ba92e9db848baea746a6aef1a files/digest-nvidia-kernel-1.0.4363-r3 74
-MD5 ed1e098d85579c75542ef0a49ee4dd5c files/digest-nvidia-kernel-1.0.6111-r1 163
-MD5 b6a9c4bdd3961980af4a70f57485d708 files/nvidia-1.1 441
-MD5 046ed3744551619863faea8c5c83db02 files/digest-nvidia-kernel-1.0.4499 74
-MD5 a88479c177f936b6ef19fc73bb39d149 files/digest-nvidia-kernel-1.0.4496-r3 80
-MD5 cf7b2bb276c568f0f66d10951b4ce3ad files/digest-nvidia-kernel-1.0.5332-r1 83
+MD5 cc0512640bc35c3419b55a455c480d9f nvidia-kernel-1.0.5336-r4.ebuild 4782
MD5 497ffcbd6a91ed9447dfdf7b736925bd files/digest-nvidia-kernel-1.0.5328-r1 80
+MD5 cf7b2bb276c568f0f66d10951b4ce3ad files/digest-nvidia-kernel-1.0.5332-r1 83
MD5 1316f73c0eecd8832bb362a3d5ca4892 files/digest-nvidia-kernel-1.0.5336-r4 80
MD5 50ffea0f5eb12d252905f379bc7be2d6 files/digest-nvidia-kernel-1.0.6106-r1 163
+MD5 ed1e098d85579c75542ef0a49ee4dd5c files/digest-nvidia-kernel-1.0.6111-r1 163
+MD5 ed1e098d85579c75542ef0a49ee4dd5c files/digest-nvidia-kernel-1.0.6111-r2 163
+MD5 046ed3744551619863faea8c5c83db02 files/digest-nvidia-kernel-1.0.4499 74
MD5 ed1e098d85579c75542ef0a49ee4dd5c files/digest-nvidia-kernel-1.0.6111 163
-MD5 335be8e5143f2227bcf74718de074343 files/1.0.6111/power-suspend-2.6.9-changes.patch 606
-MD5 29eafcaf7ab5d59dd90d3d3243bf57c3 files/1.0.6111/nv_enable_pci.patch 3640
-MD5 682af795a321ec35f27c87d7b387df18 files/1.0.6111/nv-pci_find_class.patch 1112
-MD5 bc61be48f85d84f91d2035fa3cc92a47 files/1.0.6106/NVIDIA_kernel-1.0-6106-koutput-support.patch 6659
-MD5 c2a29e883336157e1a3e99a0bceca549 files/1.0.4499/NVIDIA_kernel-1.0-4499-2.6-20031014.diff 69389
+MD5 56ebaa3ba92e9db848baea746a6aef1a files/digest-nvidia-kernel-1.0.4363-r3 74
+MD5 a88479c177f936b6ef19fc73bb39d149 files/digest-nvidia-kernel-1.0.4496-r3 80
+MD5 b6a9c4bdd3961980af4a70f57485d708 files/nvidia-1.1 441
MD5 f7d7092e9eb9fbe926ff1b8aa9b3f50e files/1.0.4363/NVIDIA_kernel-1.0-4363-2.5-20030714.diff 79485
-MD5 0d4e20c2320c685caad56e357cff0b0c files/1.0.5328/NVIDIA_kernel-1.0-5328-2.6-20040105.diff 95197
+MD5 183b64f528e98221291072f12db5859d files/1.0.4496/NVIDIA_kernel-1.0-4496-2.6-pci_name-20030905.diff 608
+MD5 c0f21cb76a7471671ec9665968dfaafb files/1.0.4496/NVIDIA_kernel-1.0-4496-2.6-20031026.diff 81900
+MD5 6d98825a3cf78f4a5ce42d4f4decab89 files/1.0.4496/NVIDIA_kernel-1.0-4496-2.6-20030905.diff 81553
+MD5 c2a29e883336157e1a3e99a0bceca549 files/1.0.4499/NVIDIA_kernel-1.0-4499-2.6-20031014.diff 69389
MD5 e6571e952e13f13d9910b7ad29eaeb4a files/1.0.5328/NVIDIA_kernel-1.0-5328-2.4-via-chipset-fix.patch 970
+MD5 0d4e20c2320c685caad56e357cff0b0c files/1.0.5328/NVIDIA_kernel-1.0-5328-2.6-20040105.diff 95197
MD5 f04497fe1a0f76fcc41a93b554072c4a files/1.0.5328/NVIDIA_kernel-1.0-5328-2.6-20031226.diff 77616
-MD5 6d98825a3cf78f4a5ce42d4f4decab89 files/1.0.4496/NVIDIA_kernel-1.0-4496-2.6-20030905.diff 81553
-MD5 c0f21cb76a7471671ec9665968dfaafb files/1.0.4496/NVIDIA_kernel-1.0-4496-2.6-20031026.diff 81900
-MD5 183b64f528e98221291072f12db5859d files/1.0.4496/NVIDIA_kernel-1.0-4496-2.6-pci_name-20030905.diff 608
MD5 4c7749ca72483547e15031a2af560415 files/1.0.5332/NVIDIA-Linux-x86_64-1.0-5332-2.6.diff 7216
-MD5 442f1483c003d291a90dfcc87903b045 files/1.0.5336/NVIDIA_kernel-1.0-5336-2.6-20040521.patch 18711
MD5 276907ebd8946791398f5f24c27e54c4 files/1.0.5336/NVIDIA_kernel-1.0-5336-basic-sysfs-support-v2.patch 5666
-MD5 5dc4b9a2463cb459721ae3e642f6239f files/1.0.5336/NVIDIA_kernel-1.0-5336-fix-makefile-for-2.6.patch 886
+MD5 6b364c4b64c6de0aea70163850fa3914 files/1.0.5336/Makefile 4410
MD5 d48d291f79542df558588d1d3575d51c files/1.0.5336/NVIDIA_kernel-1.0-5336-kbuild-koutput-support.patch 1681
+MD5 442f1483c003d291a90dfcc87903b045 files/1.0.5336/NVIDIA_kernel-1.0-5336-2.6-20040521.patch 18711
+MD5 5dc4b9a2463cb459721ae3e642f6239f files/1.0.5336/NVIDIA_kernel-1.0-5336-fix-makefile-for-2.6.patch 886
MD5 7bf40e44b8f2181a1047ddfd13acd6b3 files/1.0.5336/NVIDIA_kernel-1.0-5336-basic-sysfs-support.patch 5439
-MD5 6b364c4b64c6de0aea70163850fa3914 files/1.0.5336/Makefile 4410
+MD5 bc61be48f85d84f91d2035fa3cc92a47 files/1.0.6106/NVIDIA_kernel-1.0-6106-koutput-support.patch 6659
+MD5 762e6f6e16aa6dd5b2469e99fe8decd3 files/1.0.6111/nv-pci_find_class.patch 2903
+MD5 335be8e5143f2227bcf74718de074343 files/1.0.6111/power-suspend-2.6.9-changes.patch 606
+MD5 5177339888e44bb5f4b6124fa5830e7f files/1.0.6111/vmalloc-reserve.patch 542
+MD5 29eafcaf7ab5d59dd90d3d3243bf57c3 files/1.0.6111/nv_enable_pci.patch 3640
+MD5 c2b155f40d7b904f07550e8e326969c2 files/1.0.6111/nv-remap-range.patch 5715
diff --git a/media-video/nvidia-kernel/files/1.0.6111/nv-pci_find_class.patch b/media-video/nvidia-kernel/files/1.0.6111/nv-pci_find_class.patch
index 97c46827d1f4..b76a1231b461 100644
--- a/media-video/nvidia-kernel/files/1.0.6111/nv-pci_find_class.patch
+++ b/media-video/nvidia-kernel/files/1.0.6111/nv-pci_find_class.patch
@@ -1,35 +1,110 @@
---- NVIDIA-Linux-x86-1.0-6111-pkg1/usr/src/nv/nv.c 2004-09-20 23:29:14.953986656 +0200
-+++ NVIDIA-Linux-x86-1.0-6111-pkg1.az/usr/src/nv/nv.c 2004-09-20 23:29:36.414724128 +0200
-@@ -639,7 +639,7 @@
+--- conftest.sh.old 2004-09-15 10:57:44.000000000 +1000
++++ conftest.sh 2004-09-15 11:48:52.561314384 +1000
+@@ -23,6 +23,30 @@
+ fi
+
+ case "$4" in
++ check_pci_class)
++ #
++ # Determine if the current kernel uses pci_find_class or pci_get_class
++ #
++
++ echo "#include <linux/pci.h>
++ int do_test_pci_class(void) {
++ struct pci_dev *get_dev;
++ get_dev = pci_get_class(0,NULL);
++ }" > conftest$$.c
++
++ $CC $CFLAGS -c conftest$$.c > /dev/null 2>&1
++ rm -f conftest$$.c
++
++ if [ -f conftest$$.o ]; then
++ echo "get"
++ rm -f conftest$$.o
++ exit 0
++ else
++ echo "find"
++ exit 0
++ fi
++ ;;
++
+ remap_page_range)
+ #
+ # Determine the number of arguments expected by remap_page_range.
+--- nv.c.old 2004-09-15 11:40:05.079503808 +1000
++++ nv.c 2004-09-15 11:47:40.042338944 +1000
+@@ -639,7 +639,11 @@
u8 cap_ptr;
int func, slot;
-- dev = pci_find_class(class << 8, NULL);
++#ifdef HAVE_PCI_GET_CLASS
+ dev = pci_get_class(class << 8, NULL);
++#else
+ dev = pci_find_class(class << 8, NULL);
++#endif
do {
for (func = 0; func < 8; func++) {
slot = PCI_SLOT(dev->devfn);
-@@ -650,7 +650,7 @@
+@@ -650,7 +654,11 @@
if (cap_ptr)
return fn;
}
-- dev = pci_find_class(class << 8, dev);
++#ifdef HAVE_PCI_GET_CLASS
+ dev = pci_get_class(class << 8, dev);
++#else
+ dev = pci_find_class(class << 8, dev);
++#endif
} while (dev);
return NULL;
-@@ -3484,12 +3484,12 @@
+@@ -3484,12 +3492,20 @@
struct pci_dev *dev = NULL;
int count = 0;
-- dev = pci_find_class(PCI_CLASS_DISPLAY_VGA << 8, dev);
++#ifdef HAVE_PCI_GET_CLASS
+ dev = pci_get_class(PCI_CLASS_DISPLAY_VGA << 8, dev);
++#else
+ dev = pci_find_class(PCI_CLASS_DISPLAY_VGA << 8, dev);
++#endif
while (dev)
{
if ((dev->vendor == 0x10de) && (dev->device >= 0x20))
count++;
-- dev = pci_find_class(PCI_CLASS_DISPLAY_VGA << 8, dev);
++#ifdef HAVE_PCI_GET_CLASS
+ dev = pci_get_class(PCI_CLASS_DISPLAY_VGA << 8, dev);
++#else
+ dev = pci_find_class(PCI_CLASS_DISPLAY_VGA << 8, dev);
++#endif
}
return count;
}
+--- Makefile.kbuild.old 2004-09-15 10:57:52.000000000 +1000
++++ Makefile.kbuild 2004-09-15 11:39:30.153813320 +1000
+@@ -185,6 +185,12 @@
+ endif
+ endif
+
++ifeq ($(shell $(CONFTEST) check_pci_class), get)
++ EXTRA_CFLAGS += -DHAVE_PCI_GET_CLASS
++else
++ EXTRA_CFLAGS += -DHAVE_PCI_FIND_CLASS
++endif
++
+ #
+ # Miscellaneous NVIDIA kernel module build support targets. They are needed
+ # to satisfy KBUILD requirements and to support NVIDIA specifics.
+--- Makefile.nvidia.old 2004-09-15 11:44:30.980080776 +1000
++++ Makefile.nvidia 2004-09-15 11:45:37.209012448 +1000
+@@ -73,6 +73,12 @@
+ DEFINES += -DNV_CHANGE_PAGE_ATTR_PRESENT
+ endif
+
++ifeq ($(shell $(CONFTEST) check_pci_class), get)
++ DEFINES += -DHAVE_PCI_GET_CLASS
++else
++ DEFINES += -DHAVE_PCI_FIND_CLASS
++endif
++
+ DEFINES+=$(EXTRA_DEFINES)
+
+ # allow build parameters to be passed in through the environment
diff --git a/media-video/nvidia-kernel/files/1.0.6111/nv-remap-range.patch b/media-video/nvidia-kernel/files/1.0.6111/nv-remap-range.patch
new file mode 100644
index 000000000000..243cd8eb9cab
--- /dev/null
+++ b/media-video/nvidia-kernel/files/1.0.6111/nv-remap-range.patch
@@ -0,0 +1,161 @@
+--- Makefile.kbuild.orig 2004-10-04 19:57:29.364110664 +1000
++++ Makefile.kbuild 2004-10-04 20:01:23.803470464 +1000
+@@ -133,7 +133,7 @@
+ endif
+
+ #
+-# NVIDIA specific CFLAGS and #define's. The remap_page_range check has become
++# NVIDIA specific CFLAGS and #define's. The remap_range check has become
+ # necessary with the introduction of the five argument version to Linux 2.4
+ # distribution kernels; this conflicting change cannot be detected at compile
+ # time.
+@@ -160,13 +160,15 @@
+ endif
+
+-ifeq ($(PATCHLEVEL), 4)
+- REMAP_PAGE_RANGE := $(shell $(CONFTEST) remap_page_range)
++ REMAP_RANGE := $(shell $(CONFTEST) remap_range)
+
+- ifeq ($(REMAP_PAGE_RANGE), 5)
++ ifeq ($(REMAP_RANGE), PFN)
++ EXTRA_CFLAGS += -DREMAP_PFN_RANGE
++ endif
++
++ ifeq ($(REMAP_RANGE), 5)
+ EXTRA_CFLAGS += -DREMAP_PAGE_RANGE_5
+ endif
+
+- ifeq ($(REMAP_PAGE_RANGE), 4)
++ ifeq ($(REMAP_RANGE), 4)
+ EXTRA_CFLAGS += -DREMAP_PAGE_RANGE_4
+ endif
+-endif
+--- Makefile.nvidia.orig 2004-10-04 19:57:36.572014896 +1000
++++ Makefile.nvidia 2004-10-04 20:01:13.459043056 +1000
+@@ -60,12 +60,15 @@
+ INSTALL=$(shell which install)
+ INCLUDES += -I$(KERNEL_HEADERS)
+
+-REMAP_PAGE_RANGE := $(shell $(CONFTEST) remap_page_range)
++REMAP_RANGE := $(shell $(CONFTEST) remap_range)
+
+-ifeq ($(REMAP_PAGE_RANGE), 5)
++ifeq ($(REMAP_RANGE), PFN)
++ DEFINES += -DREMAP_PFN_RANGE
++endif
++ifeq ($(REMAP_RANGE), 5)
+ DEFINES += -DREMAP_PAGE_RANGE_5
+ endif
+-ifeq ($(REMAP_PAGE_RANGE), 4)
++ifeq ($(REMAP_RANGE), 4)
+ DEFINES += -DREMAP_PAGE_RANGE_4
+ endif
+
+--- conftest.sh.orig 2004-10-04 19:38:34.819587648 +1000
++++ conftest.sh 2004-10-04 19:56:28.547356216 +1000
+@@ -47,11 +47,27 @@
+ fi
+ ;;
+
+- remap_page_range)
++ remap_range)
+ #
+ # Determine the number of arguments expected by remap_page_range.
++ # Extended to determine if should use remap_pfn_range() aswell
+ #
+
++ echo "#include <linux/mm.h>
++ int do_test_remap_page_range(void) {
++ pgprot_t pgprot;
++ remap_pfn_range(NULL, 0L, 0L, 0L, pgprot);
++ }" > conftest$$.c
++
++ $CC $CFLAGS -c conftest$$.c > /dev/null 2>&1
++ rm -f conftest$$.c
++
++ if [ -f conftest$$.o ]; then
++ echo "PFN"
++ rm -f conftest$$.o;
++ exit 0
++ fi
++
+ echo "#include <linux/mm.h>
+ int do_test_remap_page_range(void) {
+ pgprot_t pgprot;
+--- nv-linux.h.orig 2004-10-04 19:25:54.819125280 +1000
++++ nv-linux.h 2004-10-04 19:38:26.043921752 +1000
+@@ -567,13 +567,15 @@
+ * relevant releases to date use it. This version was backported to 2.4
+ * without means to identify the change, hence this hack.
+ */
+-#if defined(KERNEL_2_6) || defined(REMAP_PAGE_RANGE_5)
+-#define NV_REMAP_PAGE_RANGE(x...) remap_page_range(vma, x)
++#if defined(REMAP_PFN_RANGE)
++#define NV_REMAP_RANGE(from, offset, x...) remap_pfn_range(vma, from, ((offset)) >> PAGE_SHIFT, x)
++#elif defined(KERNEL_2_6) || defined(REMAP_PAGE_RANGE_5)
++#define NV_REMAP_RANGE(x...) remap_page_range(vma, x)
+ #elif defined(REMAP_PAGE_RANGE_4)
+-#define NV_REMAP_PAGE_RANGE(x...) remap_page_range(x)
++#define NV_REMAP_RANGE(x...) remap_page_range(x)
+ #else
+ #warning "conftest.sh failed, assuming old Linux 2.4 remap_page_range(4)!"
+-#define NV_REMAP_PAGE_RANGE(x...) remap_page_range(x)
++#define NV_REMAP_RANGE(x...) remap_page_range(x)
+ #endif
+
+ #if defined(pmd_offset_map)
+--- nv.c.orig 2004-10-04 19:25:49.387950944 +1000
++++ nv.c 2004-10-04 19:31:56.270176368 +1000
+@@ -1775,7 +1775,7 @@
+ pages = nv->regs->size / PAGE_SIZE;
+
+ vma->vm_page_prot = pgprot_noncached(vma->vm_page_prot);
+- if (NV_REMAP_PAGE_RANGE(vma->vm_start,
++ if (NV_REMAP_RANGE(vma->vm_start,
+ NV_VMA_OFFSET(vma),
+ vma->vm_end - vma->vm_start,
+ vma->vm_page_prot))
+@@ -1794,7 +1794,7 @@
+ pages = nv->fb->size / PAGE_SIZE;
+
+ vma->vm_page_prot = pgprot_noncached(vma->vm_page_prot);
+- if (NV_REMAP_PAGE_RANGE(vma->vm_start,
++ if (NV_REMAP_RANGE(vma->vm_start,
+ NV_VMA_OFFSET(vma),
+ vma->vm_end - vma->vm_start,
+ vma->vm_page_prot))
+@@ -1912,7 +1912,7 @@
+ while (pages--)
+ {
+ page = (unsigned long) at->page_table[i++].phys_addr;
+- if (NV_REMAP_PAGE_RANGE(start, page, PAGE_SIZE, vma->vm_page_prot))
++ if (NV_REMAP_RANGE(start, page, PAGE_SIZE, vma->vm_page_prot))
+ return -EAGAIN;
+ start += PAGE_SIZE;
+ pos += PAGE_SIZE;
+--- os-agp.c.orig 2004-10-04 19:26:06.363370288 +1000
++++ os-agp.c 2004-10-04 19:32:06.228662448 +1000
+@@ -331,10 +331,10 @@
+ agp_addr = agpinfo.aper_base + (agp_data->offset << PAGE_SHIFT);
+
+ #if defined(NVCPU_IA64)
+- err = NV_REMAP_PAGE_RANGE(vma->vm_start, (size_t) agp_addr,
++ err = NV_REMAP_RANGE(vma->vm_start, (size_t) agp_addr,
+ agp_data->num_pages << PAGE_SHIFT, vma->vm_page_prot);
+ #else
+- err = NV_REMAP_PAGE_RANGE(vma->vm_start, (size_t) agp_addr,
++ err = NV_REMAP_RANGE(vma->vm_start, (size_t) agp_addr,
+ agp_data->num_pages << PAGE_SHIFT, PAGE_SHARED);
+ #endif
+
+--- os-interface.c.orig 2004-10-04 19:26:14.267168728 +1000
++++ os-interface.c 2004-10-04 19:32:12.958639336 +1000
+@@ -1087,7 +1087,7 @@
+
+ vma = (struct vm_area_struct *) *priv;
+
+- if (NV_REMAP_PAGE_RANGE(vma->vm_start,
++ if (NV_REMAP_RANGE(vma->vm_start,
+ start & PAGE_MASK, size_bytes, PAGE_SHARED))
+ return NULL;
+
diff --git a/media-video/nvidia-kernel/files/1.0.6111/vmalloc-reserve.patch b/media-video/nvidia-kernel/files/1.0.6111/vmalloc-reserve.patch
new file mode 100644
index 000000000000..fc7bfcb1d2b5
--- /dev/null
+++ b/media-video/nvidia-kernel/files/1.0.6111/vmalloc-reserve.patch
@@ -0,0 +1,14 @@
+diff -uNp --exclude='*.orig' --exclude='*.rej' --exclude='*.dmn' -r NVIDIA-Linux-x86-1.0-6111-pkg1/usr/src/nv/nv.c NVIDIA-Linux-x86-1.0-6111-pkg1-new/usr/src/nv/nv.c
+--- NVIDIA-Linux-x86-1.0-6111-pkg1/usr/src/nv/nv.c 2004-08-31 22:52:17.000000000 +0100
++++ NVIDIA-Linux-x86-1.0-6111-pkg1-new/usr/src/nv/nv.c 2004-09-20 02:49:42.399538232 +0100
+@@ -19,6 +19,10 @@
+ MODULE_ALIAS_CHARDEV_MAJOR(NV_MAJOR_DEVICE_NUMBER);
+ #endif
+
++#ifndef __VMALLOC_RESERVE
++unsigned int __VMALLOC_RESERVE;
++#endif
++
+ /*
+ * our global state; one per device
+ */
diff --git a/media-video/nvidia-kernel/files/digest-nvidia-kernel-1.0.6111-r2 b/media-video/nvidia-kernel/files/digest-nvidia-kernel-1.0.6111-r2
new file mode 100644
index 000000000000..891f45379b0a
--- /dev/null
+++ b/media-video/nvidia-kernel/files/digest-nvidia-kernel-1.0.6111-r2
@@ -0,0 +1,2 @@
+MD5 51e83be46f83c52102ccb8995b54f4e2 NVIDIA-Linux-x86-1.0-6111-pkg1.run 8167999
+MD5 6c7b0c8b3ce5c34186e0c80042e6d046 NVIDIA-Linux-x86_64-1.0-6111-pkg2.run 7333486
diff --git a/media-video/nvidia-kernel/nvidia-kernel-1.0.6111-r2.ebuild b/media-video/nvidia-kernel/nvidia-kernel-1.0.6111-r2.ebuild
new file mode 100644
index 000000000000..8627d8326231
--- /dev/null
+++ b/media-video/nvidia-kernel/nvidia-kernel-1.0.6111-r2.ebuild
@@ -0,0 +1,139 @@
+# Copyright 1999-2004 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/media-video/nvidia-kernel/nvidia-kernel-1.0.6111-r2.ebuild,v 1.1 2004/10/04 11:03:24 cyfred Exp $
+
+inherit eutils kmod
+
+X86_PKG_V="pkg1"
+AMD64_PKG_V="pkg2"
+NV_V="${PV/1.0./1.0-}"
+X86_NV_PACKAGE="NVIDIA-Linux-x86-${NV_V}"
+AMD64_NV_PACKAGE="NVIDIA-Linux-x86_64-${NV_V}"
+
+DESCRIPTION="Linux kernel module for the NVIDIA X11 driver"
+HOMEPAGE="http://www.nvidia.com/"
+SRC_URI="x86? (ftp://download.nvidia.com/XFree86/Linux-x86/${NV_V}/${X86_NV_PACKAGE}-${X86_PKG_V}.run)
+ amd64? (http://download.nvidia.com/XFree86/Linux-x86_64/${NV_V}/${AMD64_NV_PACKAGE}-${AMD64_PKG_V}.run)"
+
+if use x86; then
+ PKG_V="${X86_PKG_V}"
+ NV_PACKAGE="${X86_NV_PACKAGE}"
+elif use amd64; then
+ PKG_V="${AMD64_PKG_V}"
+ NV_PACKAGE="${AMD64_NV_PACKAGE}"
+fi
+
+S="${WORKDIR}/${NV_PACKAGE}-${PKG_V}/usr/src/nv"
+
+# The slot needs to be set to $KV to prevent unmerges of modules for other kernels.
+LICENSE="NVIDIA"
+SLOT="${KV}"
+KEYWORDS="-* ~x86 ~amd64"
+RESTRICT="nostrip"
+IUSE=""
+
+DEPEND="virtual/linux-sources"
+export _POSIX2_VERSION="199209"
+
+KMOD_SOURCES="none"
+
+mtrr_check() {
+ if [ ! -f /proc/mtrr ]
+ then
+ eerror "This version needs MTRR support for most chipsets!"
+ eerror "Please enable MTRR support in your kernel config, found at:"
+ eerror
+ eerror " Processor type and features -> [*] MTRR (Memory Type Range Register) support"
+ eerror
+ eerror "and recompile your kernel ..."
+ die "MTRR support not detected!"
+ fi
+}
+
+pkg_setup() {
+ mtrr_check
+}
+
+src_unpack() {
+ # Let the kmod eclass set the variables for us
+ kmod_src_unpack
+
+ cd ${WORKDIR}
+ bash ${DISTDIR}/${NV_PACKAGE}-${PKG_V}.run --extract-only
+
+ # Add patches below, with a breif description.
+ # 1) SYSFS supported by nvidia
+ # 2) minion.de patches not released yet
+
+ cd ${S}
+
+ # Fix up the removal of PM_SAVE_STATE in kernels > 2.6.8
+ epatch ${FILESDIR}/${PV}/power-suspend-2.6.9-changes.patch
+ # Update pci stuff to work with irqroutes being changed in kernels
+ epatch ${FILESDIR}/${PV}/nv_enable_pci.patch
+ # Fix VMALLOC_RESERVE issues with the new 2.6.9 release candidates
+ epatch ${FILESDIR}/${PV}/vmalloc-reserve.patch
+ # Port pci_find_class() -> pci_get_class() for >= 2.6.9-rc2
+ epatch ${FILESDIR}/${PV}/nv-pci_find_class.patch
+ # Fix remap_page_range() -> remap_pfn_range() for >= 2.6.9-rc2
+ epatch ${FILESDIR}/${PV}/nv-remap-range.patch
+
+ # TODO Combine the above patches into one
+
+ # if you set this then it's your own fault when stuff breaks :)
+ [ ! -z "${USE_CRAZY_OPTS}" ] && sed -i "s:-O:${CFLAGS}:" Makefile.*
+}
+
+src_compile() {
+ # IGNORE_CC_MISMATCH disables a sanity check that's needed when gcc has been
+ # updated but the running kernel is still compiled with an older gcc. This is
+ # needed for chrooted building, where the sanity check detects the gcc of the
+ # kernel outside the chroot rather than within.
+ if is_kernel 2 5 || is_kernel 2 6
+ then
+ unset ARCH
+ fi
+ make IGNORE_CC_MISMATCH="yes" SYSSRC="${KERNEL_DIR}" SYSOUT="${KV_OUTPUT}" \
+ clean module V=1 || die "Failed to build module"
+}
+
+src_install() {
+ # The driver goes into the standard modules location
+ insinto /lib/modules/${KV}/video
+
+ # Insert the module
+ doins nvidia.${KV_OBJ}
+
+ # Add the aliases
+ insinto /etc/modules.d
+ newins ${FILESDIR}/nvidia-1.1 nvidia
+
+ # Docs
+ dodoc ${S}/README
+
+ # The device creation script
+ into /
+ newsbin ${S}/makedevices.sh NVmakedevices.sh
+}
+
+pkg_postinst() {
+ if [ "${ROOT}" = "/" ]
+ then
+ # Update module dependency
+ [ -x /usr/sbin/update-modules ] && /usr/sbin/update-modules
+ if [ ! -e /dev/.devfsd ] && [ ! -e /dev/.udev ] && [ -x /sbin/NVmakedevices.sh ]
+ then
+ /sbin/NVmakedevices.sh >/dev/null 2>&1
+ fi
+ fi
+
+ echo
+ einfo "If you need to load the module automatically on boot up you need"
+ einfo "to add \"nvidia\" to /etc/modules.autoload.d/kernel-${KV_MAJOR}.${KV_MINOR}"
+ echo
+ einfo "Please note that the driver name is \"nvidia\", not \"NVdriver\""
+ echo
+ einfo "This module will now work correctly under udev, you do not need to"
+ einfo "manually create the devices anymore."
+ echo
+}