Hi,

I needed to amend the patch to wrap the remaining instances of the offending
function call in the macro, otherwise it wouldn't compile. This is under
2.6.27.2.

-- 
     2. That which causes joy or happiness.
--- firegl_public.c.orig	2008-11-09 02:08:16.000000000 +0100
+++ firegl_public.c	2008-11-24 17:42:25.000000000 +0100
@@ -207,6 +207,13 @@
 #define preempt_enable()
 #endif
 
+/* Since 2.6.27 smp_call_function doesn't have a nonatomic/retry argument */
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,27)
+#define SMP_CALL_FUNCTION(func, info, retry, wait) smp_call_function(func, info, wait)
+#else
+#define SMP_CALL_FUNCTION(func, info, retry, wait) smp_call_function(func, info, retry, wait)
+#endif
+
 // ============================================================
 /* globals */
 
@@ -3237,7 +3244,7 @@
 {
 #ifdef CONFIG_SMP
     /* write back invalidate all other CPUs (exported by kernel) */
-	if (smp_call_function(deferred_flush, NULL, 1, 0) != 0)
+	if (SMP_CALL_FUNCTION(deferred_flush, NULL, 1, 0) != 0)
 		panic("timed out waiting for the other CPUs!\n");
 
     /* invalidate this CPU */
@@ -4832,7 +4839,7 @@
 void ATI_API_CALL KCL_CallFuncOnOtherCpus(firegl_void_routine_t func_to_call)
 {
 #ifdef CONFIG_SMP
-	smp_call_function( firegl_smp_func_parameter_wrap, (void*)func_to_call, 0, 1 );
+	SMP_CALL_FUNCTION( firegl_smp_func_parameter_wrap, (void*)func_to_call, 0, 1 );
 #endif
 }
 
@@ -4943,7 +4950,7 @@
     }
 
 #ifdef CONFIG_SMP
-    if (smp_call_function(KCL_setup_pat, NULL, 0, 1) != 0)
+    if (SMP_CALL_FUNCTION(KCL_setup_pat, NULL, 0, 1) != 0)
        return 0;
 #endif
     KCL_setup_pat(NULL);
@@ -4961,7 +4968,7 @@
     }
 
 #ifdef CONFIG_SMP
-    if (smp_call_function(KCL_restore_pat, NULL, 0, 1) != 0)
+    if (SMP_CALL_FUNCTION(KCL_restore_pat, NULL, 0, 1) != 0)
        return;
 #endif
     KCL_restore_pat(NULL);

Reply via email to