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