Hi all,
due to this commit:
https://github.com/torvalds/linux/co...949a703977a7f3
the fgrlx module fails to compile on kernel 3.3-rc4 with the 32-bit x86 architecture, with this error:
This patch fixes the problem:
Regards,
Gennar1
due to this commit:
https://github.com/torvalds/linux/co...949a703977a7f3
the fgrlx module fails to compile on kernel 3.3-rc4 with the 32-bit x86 architecture, with this error:
Code:
DKMS make.log for fglrx-8.930 for kernel 3.3.0-rc4-extra-drivers (i686) mar 21 feb 2012, 14.36.00, CET AMD kernel module generator version 2.1 [: 393: 1: unexpected operator [: 399: 1: unexpected operator doing Makefile based build for kernel 2.6.x and higher rm -rf *.c *.h *.o *.ko *.a .??* *.symvers make -C /lib/modules/3.3.0-rc4-extra-drivers/build SUBDIRS=/var/lib/dkms/fglrx/8.930/build/2.6.x modules make[1]: ingresso nella directory "/home/jena/experimental-kernel/linux-3.3-rc4" CC [M] /var/lib/dkms/fglrx/8.930/build/2.6.x/firegl_public.o In file included from /var/lib/dkms/fglrx/8.930/build/2.6.x/firegl_public.c:192:0: /var/lib/dkms/fglrx/8.930/build/2.6.x/kcl_debug.h:202:5: warning: "_DEBUG" is not defined [-Wundef] /var/lib/dkms/fglrx/8.930/build/2.6.x/firegl_public.c: In function ?KCL_fpu_begin?: /var/lib/dkms/fglrx/8.930/build/2.6.x/firegl_public.c:5802:28: error: ?TS_USEDFPU? undeclared (first use in this function) /var/lib/dkms/fglrx/8.930/build/2.6.x/firegl_public.c:5802:28: note: each undeclared identifier is reported only once for each function it appears in /var/lib/dkms/fglrx/8.930/build/2.6.x/firegl_public.c: At top level: /var/lib/dkms/fglrx/8.930/build/2.6.x/kcl_debug.h:162:16: warning: ?module_log_map? defined but not used [-Wunused-variable] /var/lib/dkms/fglrx/8.930/build/2.6.x/kcl_debug.h:175:19: warning: ?module_type_map? defined but not used [-Wunused-variable] make[2]: *** [/var/lib/dkms/fglrx/8.930/build/2.6.x/firegl_public.o] Errore 1 make[1]: *** [_module_/var/lib/dkms/fglrx/8.930/build/2.6.x] Errore 2 make[1]: uscita dalla directory "/home/jena/experimental-kernel/linux-3.3-rc4" make: *** [kmod_build] Errore 2 build failed with return value 2
Code:
fixed fgrlx compilation error on 32-bit x86 arch with kernel 3.3-rc4 due to commit: https://github.com/torvalds/linux/commit/f94edacf998516ac9d849f7bc6949a703977a7f3 Signed-off-by: Gianluca Gennari <[email protected]> --- firegl_public.c | 9 +++++++++ 1 files changed, 9 insertions(+), 0 deletions(-) diff --git a/firegl_public.c b/firegl_public.c index 6e0aa82..5010b91 100644 --- a/firegl_public.c +++ b/firegl_public.c @@ -5797,6 +5797,14 @@ void ATI_API_CALL KCL_fpu_begin(void) #ifdef CONFIG_X86_64 kernel_fpu_begin(); #else +#if LINUX_VERSION_CODE >= KERNEL_VERSION(3,3,0) + struct task_struct *tsk = current; + preempt_disable(); + if (tsk->thread.has_fpu) + __save_init_fpu(tsk); + else + clts(); +#else struct thread_info *cur_task = current_thread_info(); preempt_disable(); if (cur_task->status & TS_USEDFPU) @@ -5804,6 +5812,7 @@ void ATI_API_CALL KCL_fpu_begin(void) else clts(); #endif +#endif } /** \brief End of using FPU -- 1.7.5.4
Gennar1
Comment