[pkg-nvidia-devel] Bug#500285: nvidia-kernel-source: port to 2.6.27

Clemens Buchacher drizzd at aon.at
Fri Sep 26 22:21:13 UTC 2008


Package: nvidia-kernel-source
Version: 173.14.09-5
Severity: normal
Tags: patch


This patch ports the module to 2.6.27-rc5. Note that it breaks with 2.6.24.
I don't claim correctness, I just fiddled with it until it compiled.

diff --git a/nv-linux.h b/nv-linux.h
index a3ec48d..415164a 100644
--- a/nv-linux.h
+++ b/nv-linux.h
@@ -104,7 +104,7 @@
 #endif
 
 #include <linux/spinlock.h>
-#include <asm/semaphore.h>
+#include <linux/semaphore.h>
 #include <linux/completion.h>
 #include <linux/highmem.h>
 
@@ -666,7 +666,7 @@ static inline int nv_execute_on_all_cpus(void (*func)(void *info), void *info)
     preempt_enable();
 #endif
 #else
-    ret = on_each_cpu(func, info, 1, 1);
+    ret = on_each_cpu(func, info, 1);
 #endif
     return ret;
 }
diff --git a/nv.c b/nv.c
index 7afef99..0853cd8 100644
--- a/nv.c
+++ b/nv.c
@@ -1296,14 +1296,14 @@ nv_kern_cpu_callback(struct notifier_block *nfb, unsigned long action, void *hcp
             if (get_cpu() == cpu)
                 __nv_setup_pat_entries(NULL);
             else
-                smp_call_function(__nv_setup_pat_entries, hcpu, 1, 1);
+                smp_call_function(__nv_setup_pat_entries, hcpu, 1);
             put_cpu();
             break;
         case CPU_DOWN_PREPARE:
             if (get_cpu() == cpu)
                 __nv_restore_pat_entries(NULL);
             else
-                smp_call_function(__nv_restore_pat_entries, hcpu, 1, 1);
+                smp_call_function(__nv_restore_pat_entries, hcpu, 1);
             put_cpu();
             break;
     }
diff --git a/os-interface.c b/os-interface.c
index d5534eb..b5db1fa 100644
--- a/os-interface.c
+++ b/os-interface.c
@@ -48,7 +48,7 @@ RM_STATUS NV_API_CALL os_raise_smp_barrier(void)
 #endif
     local_bh_disable();
     atomic_set(&os_smp_barrier, 1);
-    ret = smp_call_function(ipi_handler, NULL, 1, 0);
+    ret = smp_call_function(ipi_handler, NULL, 0);
 #endif
     return (ret == 0) ? RM_OK : RM_ERROR;
 }
@@ -688,7 +688,7 @@ U032 NV_API_CALL os_get_cpu_frequency(void)
 
 U032 NV_API_CALL os_get_current_process(void)
 {
-    return current->tgid;
+    return task_tgid(current);
 }
 
 RM_STATUS NV_API_CALL os_kill_process(
@@ -696,7 +696,7 @@ RM_STATUS NV_API_CALL os_kill_process(
     U032 sig
 )
 {
-    return kill_proc(pid, sig, 1) ? RM_ERR_OPERATING_SYSTEM : RM_OK;
+    return kill_pid(pid, sig, 1) ? RM_ERR_OPERATING_SYSTEM : RM_OK;
 }
 
 /*******************************************************************************/
---

-- System Information:
Debian Release: lenny/sid
  APT prefers unstable
  APT policy: (500, 'unstable'), (500, 'testing'), (500, 'stable')
Architecture: amd64 (x86_64)

Kernel: Linux 2.6.27-rc5 (SMP w/2 CPU cores; PREEMPT)
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/bash

Versions of packages nvidia-kernel-source depends on:
ii  debhelper                     7.0.16     helper programs for debian/rules
ii  dpatch                        2.0.30     patch maintenance system for Debia
ii  make                          3.81-5     The GNU version of the "make" util
ii  sed                           4.1.5-8    The GNU sed stream editor

Versions of packages nvidia-kernel-source recommends:
ii  devscripts                   2.10.35     scripts to make the life of a Debi
ii  kernel-package               11.001-0.1  A utility for building Linux kerne
ii  nvidia-glx                   173.14.09-5 NVIDIA binary Xorg driver

nvidia-kernel-source suggests no packages.

-- no debconf information





More information about the Pkg-nvidia-devel mailing list