Another update of the patch for the newly released kernel 3.4-rc1. In the new kernel several header files have been cleaned-up and splitted into smaller files, so now we have to include a new header file. Again, this is only required for 32 bit kernels.
The patch has been tested with fglrx 8.951 (Catalyst 12.3) and the 3.4-rc1 vanilla kernel (32 bit).
The patch has been tested with fglrx 8.951 (Catalyst 12.3) and the 3.4-rc1 vanilla kernel (32 bit).
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 later modified (in 3.3-rc5) by commit: https://github.com/torvalds/linux/commit/7e16838d94b566a17b65231073d179bc04d590c8#diff-1 and finally backported to kernel 3.2.8. This new version adds support for the 3.4 kernels, where some ASM header file was splitted into several smaller files, so we have to explicitally include the new file <asm/fpu-internal.h>. 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 a56fff1..2858170 100644 --- a/firegl_public.c +++ b/firegl_public.c @@ -187,6 +187,9 @@ #include <linux/gfp.h> #include <linux/swap.h> #include "asm/i387.h" +#if LINUX_VERSION_CODE >= KERNEL_VERSION(3,4,0) +#include <asm/fpu-internal.h> +#endif #include "firegl_public.h" #include "kcl_osconfig.h" @@ -5799,10 +5802,16 @@ void ATI_API_CALL KCL_fpu_begin(void) #ifdef CONFIG_X86_64 kernel_fpu_begin(); #else +#ifndef TS_USEDFPU + preempt_disable(); + if (__thread_has_fpu(current)) + __save_init_fpu(current); +#else struct thread_info *cur_task = current_thread_info(); preempt_disable(); if (cur_task->status & TS_USEDFPU) __save_init_fpu(cur_task->task); +#endif else clts(); #endif -- 1.7.5.4
Comment