1 |
On 04/16/2012 06:09 AM, Helmut Jarausch wrote: |
2 |
> |
3 |
> Hi, |
4 |
> |
5 |
> does anybody know about patches for the ATI-drivers 12.3 to work with git-sources 3.4_rc3 ? |
6 |
|
7 |
Well, "patch" is too formal for the ugly hack I use :) |
8 |
|
9 |
After building your new kernel you should patch one kernel header file |
10 |
before building ati-drivers (taken from lkml): |
11 |
|
12 |
|
13 |
--- arch/x86/include/asm/compat.h.orig 2012-04-08 11:51:29.569528342 -0700 |
14 |
+++ arch/x86/include/asm/compat.h 2012-04-08 14:33:58.309972502 -0700 |
15 |
@@ -221,6 +221,7 @@ |
16 |
return (u32)(unsigned long)uptr; |
17 |
} |
18 |
|
19 |
+#ifdef CONFIG_x86_64 |
20 |
static inline void __user *arch_compat_alloc_user_space(long len) |
21 |
{ |
22 |
compat_uptr_t sp; |
23 |
@@ -234,6 +235,15 @@ |
24 |
|
25 |
return (void __user *)round_down(sp - len, 16); |
26 |
} |
27 |
+#else |
28 |
+ |
29 |
+static inline void __user *arch_compat_alloc_user_space(long len) |
30 |
+{ |
31 |
+ struct pt_regs *regs = task_pt_regs(current); |
32 |
+ return (void __user *)regs->sp -len; |
33 |
+} |
34 |
+ |
35 |
+#endif |
36 |
|
37 |
static inline bool is_x32_task(void) |
38 |
{ |
39 |
|
40 |
|
41 |
Here's the ugly part: some names in compat.h were changed recently, and |
42 |
I can't be bothered to do a proper fix, so I hacked this together instead: |
43 |
|
44 |
--- common/lib/modules/fglrx/build_mod/firegl_public.c 2012-03-23 13:38:48.000000000 -0700 |
45 |
+++ /tmp/firegl_public.c 2012-04-16 10:45:41.426582953 -0700 |
46 |
@@ -4181,7 +4181,7 @@ |
47 |
{ |
48 |
unsigned int p; |
49 |
KCL_DEBUG5(FN_FIREGL_KAS, "%d\n", level_init); |
50 |
- for_each_cpu_mask(p, cpu_possible_map) |
51 |
+ for (p=0; p<4; p++) |
52 |
{ |
53 |
KCL_DEBUG1(FN_FIREGL_KAS,"Setting initial execution level for CPU # %d\n", p); |
54 |
preempt_disable(); |
55 |
|
56 |
|
57 |
NOTE: my new machine has 4 cpus, numbered 0 through 3, and I hardcoded that |
58 |
number into the ati code, above, instead of deciphering the new kernel headers. |
59 |
Ugly, ugly, ugly. But it works perfectly :) |
60 |
|
61 |
If you have two cpus you should change the p<4 to p<2, etc. And then wait |
62 |
for a professional fix from ati :p |