[Pkg-fglrx-devel] Bug#476844: tested patch
Hilko Bengen
bengen at debian.org
Tue May 20 21:07:22 UTC 2008
tag 476844 +patch
thanks
I had a look at the site mentioned above
(http://sarah-a-happy.livejournal.com/90345.html). The suggested patch
enables building for 2.6.25 but it breaks builds on older kernels.
Adding a few #if ... #endif clauses around the changes was trivial. I
have successfully built the module on 2.6.24-1-686 and 2.6.25-2-686
after applying the patch found below
Cheers,
-Hilko
--- firegl_public.c.orig 2008-04-18 01:43:56.000000000 +0200
+++ firegl_public.c 2008-05-20 22:57:41.000000000 +0200
@@ -122,6 +122,9 @@
#include <asm/cpufeature.h>
#ifdef CONFIG_MTRR
#include <asm/mtrr.h>
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,25)
+#include <asm/cacheflush.h>
+#endif
#endif
#include <asm/delay.h>
#include <linux/agp_backend.h>
@@ -1160,7 +1163,11 @@
int ATI_API_CALL KCL_SetPageNoCache(void* virt, int pages)
{
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,25)
+ return set_pages_uc(virt_to_page(virt), pages);
+#else
return change_page_attr(virt_to_page(virt), pages, PAGE_KERNEL_NOCACHE);
+#endif
}
/** /brief Call global kernel task/thread scheduler */
@@ -1887,7 +1894,11 @@
*/
KCL_TYPE_Cap ATI_API_CALL KCL_PosixSecurityCapGetEffectiveVector()
{
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,25)
+ return (current->cap_effective).cap[0];
+#else
return cap_t(current->cap_effective);
+#endif
}
/** \brief Set vector of effective security caps for the current process
@@ -1895,7 +1906,11 @@
*/
void ATI_API_CALL KCL_PosixSecurityCapSetEffectiveVector(KCL_TYPE_Cap cap)
{
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,25)
+ (current->cap_effective).cap[0] = cap;
+#else
cap_t(current->cap_effective) = cap;
+#endif
}
/** \brief Get number of available RAM pages
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 188 bytes
Desc: not available
Url : http://lists.alioth.debian.org/pipermail/pkg-fglrx-devel/attachments/20080520/62120b50/attachment.pgp
More information about the Pkg-fglrx-devel
mailing list