1
0
mirror of https://github.com/gryf/gryf-overlay.git synced 2026-03-14 15:25:50 +01:00
Files
gryf-overlay/x11-drivers/ati-drivers/files/8.542/ati-drivers-2.6.27.patch
2010-03-27 13:22:52 +01:00

98 lines
2.9 KiB
Diff

--- firegl_public.c 2008-09-19 10:57:09.000000000 +0200
+++ firegl_public.c 2008-09-19 10:55:57.000000000 +0200
@@ -199,6 +199,12 @@
#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 */
@@ -250,7 +256,7 @@
const char BUILD_KERNEL_HAS_MODVERSIONS_CLEARED;
#endif
-#ifdef __SMP__
+#ifdef CONFIG_SMP
const unsigned long __ke_SMP_State = 1;
const char BUILD_KERNEL_HAS_SMP_SET;
#else
@@ -2516,8 +2522,8 @@
{
/*Some kernel developer removed the export of symbol "flush_tlb_page" on 2.6.25 x86_64 SMP kernel.
Define a simple version here.*/
-#if defined(__x86_64__) && defined(__SMP__) && (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,25))
- on_each_cpu(KCL_flush_tlb_one, &va, 1, 1);
+#if defined(__x86_64__) && (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,25))
+ on_each_cpu(KCL_flush_tlb_one, &va, 1);
#else
flush_tlb_page(vma, va);
#endif
@@ -2902,7 +2908,7 @@
/*****************************************************************************/
-#ifdef __SMP__
+#ifdef CONFIG_SMP
static atomic_t cpus_waiting;
static void deferred_flush(void* contextp)
@@ -2918,13 +2924,13 @@
while (atomic_read(&cpus_waiting) > 0)
barrier();
}
-#endif /* __SMP__ */
+#endif /* CONFIG_SMP */
int ATI_API_CALL __ke_flush_cache(void)
{
-#ifdef __SMP__
+#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 */
@@ -2938,7 +2944,7 @@
while (atomic_read(&cpus_waiting) > 0)
barrier();
-#else /* !__SMP__ */
+#else /* !CONFIG_SMP */
#if defined(__i386__) || defined(__x86_64__)
asm volatile ("wbinvd":::"memory");
#elif defined(__alpha__) || defined(__sparc__)
@@ -2946,7 +2952,7 @@
#else
#error "Please define flush_cache for your architecture."
#endif
-#endif /* !__SMP__ */
+#endif /* !CONFIG_SMP */
//for kernel 2.6.25, tlb_flush has been included when calling set_pages_*.
#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,25)
@@ -4654,7 +4660,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);
@@ -4673,7 +4679,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);