Hey guys,

I've been trying to compile the kernel module for my system but it fails with this following message:

/usr/src/kernel-modules/fglrx/firegl_public.c: In function ‘KCL_flush_tlb_onepage’:
/usr/src/kernel-modules/fglrx/firegl_public.c:2352: error: too many arguments to function ‘on_each_cpu’
/usr/src/kernel-modules/fglrx/firegl_public.c: In function ‘__ke_flush_cache’:
/usr/src/kernel-modules/fglrx/firegl_public.c:2791: error: too many arguments to function ‘smp_call_function’
/usr/src/kernel-modules/fglrx/firegl_public.c: In function ‘__ke_vm_phys_addr_str’:
/usr/src/kernel-modules/fglrx/firegl_public.c:3522: warning: return makes pointer from integer without a cast
/usr/src/kernel-modules/fglrx/firegl_public.c:3523: warning: return makes pointer from integer without a cast
/usr/src/kernel-modules/fglrx/firegl_public.c:3524: warning: return makes pointer from integer without a cast
/usr/src/kernel-modules/fglrx/firegl_public.c:3526: warning: return makes pointer from integer without a cast
/usr/src/kernel-modules/fglrx/firegl_public.c: In function ‘KCL_enable_pat’:
/usr/src/kernel-modules/fglrx/firegl_public.c:4063: error: too many arguments to function ‘smp_call_function’
/usr/src/kernel-modules/fglrx/firegl_public.c: In function ‘KCL_disable_pat’:
/usr/src/kernel-modules/fglrx/firegl_public.c:4082: error: too many arguments to function ‘smp_call_function’
/usr/src/kernel-modules/fglrx/firegl_public.c: At top level:
/usr/src/kernel-modules/fglrx/firegl_public.c:5774: warning: initialization from incompatible pointer type
/usr/src/kernel-modules/fglrx/firegl_public.c:5800: warning: initialization from incompatible pointer type
make[1]: *** [/usr/src/kernel-modules/fglrx/firegl_public.o] Error 1
make: *** [_module_/usr/src/kernel-modules/fglrx] Error 2
make: Leaving directory `/usr/src/linux-2.6.27.4'
This is a vanilla kernel install of Linux 2.6.27.4 kernel (latest version at time of writing).

I tried patching, but failed

http://bugs.gentoo.org/attachment.cgi?id=1...amp;action=view

sudo patch < firegl_public.patch
patching file firegl_public.c
Hunk #1 succeeded at 207 with fuzz 1 (offset 8 lines).
Hunk #2 FAILED at 264.
Hunk #3 FAILED at 2530.
Hunk #4 FAILED at 2916.
Hunk #5 FAILED at 2932.
Hunk #6 FAILED at 2952.
Hunk #7 FAILED at 2960.
Hunk #8 succeeded at 4073 (offset -587 lines).
Hunk #9 FAILED at 4092.
7 out of 9 hunks FAILED -- saving rejects to file firegl_public.c.rej
Can anyone please help?

Thanks,
deltatux