summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'media-video/nvidia-kernel/files')
-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
4 files changed, 261 insertions, 9 deletions
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