Strange. Maybe a copy&paste problem?
Anyway, here is another version of the patch, required to build the fglrx module against kernel 3.4-rc2.
This time, cpu_possible_map has been dropped in favor of cpu_possible_mask.
Probably, this trivial change is necessary also for 64 bit kernels, but I have not tested it.
Anyway, this is the new patch:
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>.
Since 3.4-rc2, cpu_possible_map has been definitely removed. Let's use
cpu_possible_mask instead. This is probably required also for 64 bit kernels.
Signed-off-by: Gianluca Gennari <gennarone@gmail.com>
---
firegl_public.c | 13 +++++++++++++
1 files changed, 13 insertions(+), 0 deletions(-)
diff --git a/firegl_public.c b/firegl_public.c
index a56fff1..b4bdfb7 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"
@@ -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_cpu_mask(p, cpu_possible_mask)
+#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();
@@ -5799,10 +5806,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