summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrew Bevitt <cyfred@gentoo.org>2004-12-27 00:46:54 +0000
committerAndrew Bevitt <cyfred@gentoo.org>2004-12-27 00:46:54 +0000
commiteb7d39c34888382fa9a4302fbc21141c348b4f09 (patch)
tree7058dffe09e19d3edf4787c46f65c5866905f2c3 /media-video/nvidia-kernel/files
parentRetrying that commit, something wen't wrong? (Manifest recommit) (diff)
downloadgentoo-2-eb7d39c34888382fa9a4302fbc21141c348b4f09.tar.gz
gentoo-2-eb7d39c34888382fa9a4302fbc21141c348b4f09.tar.bz2
gentoo-2-eb7d39c34888382fa9a4302fbc21141c348b4f09.zip
Some more patches from Zander
Diffstat (limited to 'media-video/nvidia-kernel/files')
-rw-r--r--media-video/nvidia-kernel/files/1.0.6629/NVIDIA_kernel-1.0-6629-1175225.patch12
-rw-r--r--media-video/nvidia-kernel/files/1.0.6629/NVIDIA_kernel-1.0-6629-1182399.patch105
-rw-r--r--media-video/nvidia-kernel/files/1.0.6629/nv-disable-preempt-on-smp_processor_id-2.patch20
-rw-r--r--media-video/nvidia-kernel/files/1.0.6629/nv-disable-preempt-on-smp_processor_id.patch26
-rw-r--r--media-video/nvidia-kernel/files/digest-nvidia-kernel-1.0.66292
5 files changed, 127 insertions, 38 deletions
diff --git a/media-video/nvidia-kernel/files/1.0.6629/NVIDIA_kernel-1.0-6629-1175225.patch b/media-video/nvidia-kernel/files/1.0.6629/NVIDIA_kernel-1.0-6629-1175225.patch
index 1c6ca8c804ba..461e80003895 100644
--- a/media-video/nvidia-kernel/files/1.0.6629/NVIDIA_kernel-1.0-6629-1175225.patch
+++ b/media-video/nvidia-kernel/files/1.0.6629/NVIDIA_kernel-1.0-6629-1175225.patch
@@ -1,6 +1,6 @@
diff -ru usr/src/nv/nv-linux.h usr/src/nv.1175225/nv-linux.h
--- usr/src/nv/nv-linux.h 2004-11-03 22:53:00.000000000 +0100
-+++ usr/src/nv.1175225/nv-linux.h 2004-12-08 22:13:42.000000000 +0100
++++ usr/src/nv.1175225/nv-linux.h 2004-12-21 21:03:33.000000000 +0100
@@ -533,6 +533,7 @@
*/
#if defined(CONFIG_SWIOTLB)
@@ -9,7 +9,7 @@ diff -ru usr/src/nv/nv-linux.h usr/src/nv.1175225/nv-linux.h
extern int nv_swiotlb;
#endif
-@@ -950,10 +951,40 @@
+@@ -950,10 +951,48 @@
sg_ptr->offset = (unsigned long)base & ~PAGE_MASK;
sg_ptr->length = num_pages * PAGE_SIZE;
@@ -47,6 +47,14 @@ diff -ru usr/src/nv/nv-linux.h usr/src/nv.1175225/nv-linux.h
return 1;
}
+#endif
++
++ if (sg_ptr->dma_address & ~PAGE_MASK)
++ {
++ nv_printf(NV_DBG_ERRORS,
++ "NVRM: VM: nv_sg_map_buffer: failed to obtain aligned mapping\n");
++ pci_unmap_sg(dev, sg_ptr, num_pages, PCI_DMA_BIDIRECTIONAL);
++ return 1;
++ }
NV_FIXUP_SWIOTLB_VIRT_ADDR_BUG(sg_ptr->dma_address);
diff --git a/media-video/nvidia-kernel/files/1.0.6629/NVIDIA_kernel-1.0-6629-1182399.patch b/media-video/nvidia-kernel/files/1.0.6629/NVIDIA_kernel-1.0-6629-1182399.patch
new file mode 100644
index 000000000000..140ab043feec
--- /dev/null
+++ b/media-video/nvidia-kernel/files/1.0.6629/NVIDIA_kernel-1.0-6629-1182399.patch
@@ -0,0 +1,105 @@
+diff -ru usr/src/nv/nv-linux.h usr/src/nv.1182399/nv-linux.h
+--- usr/src/nv/nv-linux.h 2004-11-03 22:53:00.000000000 +0100
++++ usr/src/nv.1182399/nv-linux.h 2004-12-21 18:58:41.000000000 +0100
+@@ -155,6 +155,10 @@
+ #endif
+ #endif /* defined(NVCPU_X86) */
+
++#ifndef get_cpu
++#define get_cpu() smp_processor_id()
++#define put_cpu()
++#endif
+
+ #if !defined (list_for_each)
+ #define list_for_each(pos, head) \
+diff -ru usr/src/nv/nv.c usr/src/nv.1182399/nv.c
+--- usr/src/nv/nv.c 2004-11-03 22:53:00.000000000 +0100
++++ usr/src/nv.1182399/nv.c 2004-12-21 18:58:55.000000000 +0100
+@@ -2769,21 +2769,13 @@
+ }
+
+
+-/* avoid compiler warnings on UP kernels,
+- * when spinlock macros are defined away
+- */
+-#define NO_COMPILER_WARNINGS(nvl) \
+- if (nvl == NULL) return
+-
+-
+ static void nv_lock_init_locks
+ (
+ nv_state_t *nv
+ )
+ {
+- nv_linux_state_t *nvl = NV_GET_NVL_FROM_NV_STATE(nv);
+-
+- NO_COMPILER_WARNINGS(nvl);
++ nv_linux_state_t *nvl;
++ nvl = NV_GET_NVL_FROM_NV_STATE(nv);
+
+ spin_lock_init(&nvl->rm_lock);
+
+@@ -2799,28 +2791,33 @@
+ nv_state_t *nv
+ )
+ {
+- nv_linux_state_t *nvl = NV_GET_NVL_FROM_NV_STATE(nv);
+- NO_COMPILER_WARNINGS(nvl);
++ nv_linux_state_t *nvl;
++ int cpu;
++
++ nvl = NV_GET_NVL_FROM_NV_STATE(nv);
++ cpu = get_cpu();
+
+- if (nvl->rm_lock_cpu == smp_processor_id())
++ if (nvl->rm_lock_cpu == cpu)
+ {
+ nvl->rm_lock_count++;
++ put_cpu();
+ return;
+ }
+
++ put_cpu();
+ spin_unlock_wait(&nvl->rm_lock);
+ spin_lock_irq(&nvl->rm_lock);
+
+- nvl->rm_lock_cpu = smp_processor_id();
+- nvl->rm_lock_count = 1;
++ nvl->rm_lock_cpu = smp_processor_id();
++ nvl->rm_lock_count = 1;
+ }
+
+ void NV_API_CALL nv_unlock_rm(
+ nv_state_t *nv
+ )
+ {
+- nv_linux_state_t *nvl = NV_GET_NVL_FROM_NV_STATE(nv);
+- NO_COMPILER_WARNINGS(nvl);
++ nv_linux_state_t *nvl;
++ nvl = NV_GET_NVL_FROM_NV_STATE(nv);
+
+ if (--nvl->rm_lock_count)
+ return;
+diff -ru usr/src/nv/os-interface.c usr/src/nv.1182399/os-interface.c
+--- usr/src/nv/os-interface.c 2004-11-03 22:53:00.000000000 +0100
++++ usr/src/nv.1182399/os-interface.c 2004-12-21 18:58:47.000000000 +0100
+@@ -732,10 +732,17 @@
+ //
+ inline void NV_API_CALL out_string(const char *str)
+ {
++#if DEBUG
+ static int was_newline = 0;
+
+- if (was_newline) printk("%d: %s", smp_processor_id(), str);
+- else printk("%s", str);
++ if (NV_NUM_CPUS() > 1 && was_newline)
++ {
++ printk("%d: %s", get_cpu(), str);
++ put_cpu();
++ }
++ else
++#endif
++ printk("%s", str);
+
+ #if DEBUG
+ if (NV_NUM_CPUS() > 1)
diff --git a/media-video/nvidia-kernel/files/1.0.6629/nv-disable-preempt-on-smp_processor_id-2.patch b/media-video/nvidia-kernel/files/1.0.6629/nv-disable-preempt-on-smp_processor_id-2.patch
deleted file mode 100644
index bba01249cecf..000000000000
--- a/media-video/nvidia-kernel/files/1.0.6629/nv-disable-preempt-on-smp_processor_id-2.patch
+++ /dev/null
@@ -1,20 +0,0 @@
---- 1/nv/nv.c 2004-12-19 17:08:46.000000000 +0200
-+++ 2/nv/nv.c 2004-12-19 17:09:07.000000000 +0200
-@@ -2821,7 +2821,7 @@ void NV_API_CALL nv_lock_rm(
- nv_linux_state_t *nvl = NV_GET_NVL_FROM_NV_STATE(nv);
- NO_COMPILER_WARNINGS(nvl);
-
-- if (nvl->rm_lock_cpu == smp_processor_id())
-+ if (nvl->rm_lock_cpu == _smp_processor_id())
- {
- nvl->rm_lock_count++;
- return;
-@@ -2830,7 +2830,7 @@ void NV_API_CALL nv_lock_rm(
- spin_unlock_wait(&nvl->rm_lock);
- spin_lock_irq(&nvl->rm_lock);
-
-- nvl->rm_lock_cpu = smp_processor_id();
-+ nvl->rm_lock_cpu = _smp_processor_id();
- nvl->rm_lock_count = 1;
- }
-
diff --git a/media-video/nvidia-kernel/files/1.0.6629/nv-disable-preempt-on-smp_processor_id.patch b/media-video/nvidia-kernel/files/1.0.6629/nv-disable-preempt-on-smp_processor_id.patch
index 3ec45c97101b..ea40fa14f4e3 100644
--- a/media-video/nvidia-kernel/files/1.0.6629/nv-disable-preempt-on-smp_processor_id.patch
+++ b/media-video/nvidia-kernel/files/1.0.6629/nv-disable-preempt-on-smp_processor_id.patch
@@ -1,20 +1,18 @@
---- 1/nv/nv.c 2004-11-07 16:11:33.593487328 +0200
-+++ 2/nv/nv.c 2004-11-07 16:12:12.473576656 +0200
-@@ -3156,6 +3156,8 @@ void NV_API_CALL nv_lock_rm(
- nv_linux_state_t *nvl = NV_GET_NVL_FROM_NV_STATE(nv);
- NO_COMPILER_WARNINGS(nvl);
+--- usr/src/nv/nv.c.orig 2004-12-27 11:38:13.298374416 +1100
++++ usr/src/nv/nv.c 2004-12-27 11:42:48.876480176 +1100
+@@ -2814,6 +2814,7 @@
+ int cpu;
+ nvl = NV_GET_NVL_FROM_NV_STATE(nv);
+ preempt_disable();
-+
- if (nvl->rm_lock_cpu == smp_processor_id())
- {
- nvl->rm_lock_count++;
-@@ -3167,6 +3169,8 @@ void NV_API_CALL nv_lock_rm(
+ cpu = get_cpu();
- nvl->rm_lock_cpu = smp_processor_id();
- nvl->rm_lock_count = 1;
-+
-+ preempt_enable();
+ if (nvl->rm_lock_cpu == cpu)
+@@ -2829,6 +2830,7 @@
+
+ nvl->rm_lock_cpu = smp_processor_id();
+ nvl->rm_lock_count = 1;
++ preempt_enable();
}
void NV_API_CALL nv_unlock_rm(
diff --git a/media-video/nvidia-kernel/files/digest-nvidia-kernel-1.0.6629 b/media-video/nvidia-kernel/files/digest-nvidia-kernel-1.0.6629
deleted file mode 100644
index 9324510b4ef9..000000000000
--- a/media-video/nvidia-kernel/files/digest-nvidia-kernel-1.0.6629
+++ /dev/null
@@ -1,2 +0,0 @@
-MD5 f7737c1e95371f37a4fd30da2f11e72c NVIDIA-Linux-x86-1.0-6629-pkg1.run 8725221
-MD5 652e69f549c81a7a3f2806daa74b9c36 NVIDIA-Linux-x86_64-1.0-6629-pkg2.run 7777882