--- lib/modules/fglrx/build_mod/firegl_public.c
+++ lib/modules/fglrx/build_mod/firegl_public.c.new
@@ -4181,7 +4184,11 @@ static int kasInitExecutionLevels(unsigned long level_init)
{
unsigned int p;
KCL_DEBUG5(FN_FIREGL_KAS, "%d\n", level_init);
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(3,4,0)
+ for_each_possible_cpu(p)
+#else
for_each_cpu_mask(p, cpu_possible_map)
+#endif
{
KCL_DEBUG1(FN_FIREGL_KAS,"Setting initial execution level for CPU # %d\n", p);
preempt_disable();
--- lib/modules/fglrx/build_mod/kcl_ioctl.c
+++ lib/modules/fglrx/build_mod/kcl_ioctl.c.new
@@ -217,6 +217,10 @@
* \param size [in] Number of bytes to allocate
* \return Pointer to allocated memory
*/
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(3,4,0)
+DEFINE_PER_CPU(unsigned long, old_rsp);
+#endif
+
void* ATI_API_CALL KCL_IOCTL_AllocUserSpace32(long size)
{
void __user *ret = COMPAT_ALLOC_USER_SPACE(size);
I used the following steps to install AMD Catalyst-12.4 or 12.6 Beta and patch the fglrx module:
- change directory to the path where the installer is
- run the installer as root (superuser):
- follow the instructions, at the end of installation process you will get notice that there are some errors.
- exit the installer
- at console, copy the patch file (fglrx_kernel_3.4.0.patch) to /lib/modules/fglrx
- change directory to /lib/modules/fglrx
- patch the fglrx source:
- compile the fglrx modules:
- reboot.
(change to ./amd-driver-installer-8.98-x86.x86_64.run for AMD Catalyst-12.6 Beta)
# ./make.sh
# cd ..
# ./make_install.sh
References:
13 comments:
I'm crossing fingers on this one ...
Any feedback for others?
Thanks for the tip! Everything worked as expected with my custom 3.4 kernel.
Nicely done, thanks a lot! Running it with no issues.
The patch doesn't work with the official 12.6 released yesterday. The code is patched properly, but the compiler errors out.
Hi Richard, I have installed AMD Catalyst 12.6 official release, all are working nicely, including the patch. http://henryhermawan.blogspot.com/2012/07/official-release-of-amd-catalyst-126.html
Henry, thx for the patch, I will try it!
You're welcome.
You are the man, Henry! Worked like a charm, thank you very much :)
Best Regards,
Chris
still a problem with linux-3.5???
Hi Chris, glad to know this can solve your problem.
Hi tw3ak, I haven't tried it yet. I have downloaded Catalyst 12.8 & kernel 3.5.3 last week, unfortunately, I didn't have enough time to test them. I hope, I can test them soon.
Hi Henry,
I'm trying to compile the 12.4 fglrx module on my 3.5 kernel, but the compiler keeps erroring out with "/home/peter/catalyst/driver/common/lib/modules/fglrx/build_mod/2.6.x/firegl_public.c:2122:5: error: implicit declaration of function ‘do_mmap’ [-Werror=implicit-function-declaration]". Could you please give me some help?
Hi Peter,
You need to patch the fglrx module since do_mmap problem. I haven't tried it since I don't have enough time. Currently, I stick to kernel 3.4.x & catalyst 12.6.
FYI, yesterday (22-OCT-2012), AMD has released the official 12.10. You can try it on kernel 3.5.x or 3.6.x. If I have time, I will try it.
Post a Comment