* [gentoo-user] ATI-drivers 12.3 with Kernel 3.4
@ 2012-04-16 13:09 Helmut Jarausch
2012-04-16 18:45 ` [gentoo-user] " walt
0 siblings, 1 reply; 3+ messages in thread
From: Helmut Jarausch @ 2012-04-16 13:09 UTC (permalink / raw
To: gentoo-user
Hi,
does anybody know about patches for the ATI-drivers 12.3 to work with
git-sources 3.4_rc3 ?
Many thanks for a hint,
Helmut.
^ permalink raw reply [flat|nested] 3+ messages in thread
* [gentoo-user] Re: ATI-drivers 12.3 with Kernel 3.4
2012-04-16 13:09 [gentoo-user] ATI-drivers 12.3 with Kernel 3.4 Helmut Jarausch
@ 2012-04-16 18:45 ` walt
2012-04-17 7:28 ` Helmut Jarausch
0 siblings, 1 reply; 3+ messages in thread
From: walt @ 2012-04-16 18:45 UTC (permalink / raw
To: gentoo-user
On 04/16/2012 06:09 AM, Helmut Jarausch wrote:
>
> Hi,
>
> does anybody know about patches for the ATI-drivers 12.3 to work with git-sources 3.4_rc3 ?
Well, "patch" is too formal for the ugly hack I use :)
After building your new kernel you should patch one kernel header file
before building ati-drivers (taken from lkml):
--- arch/x86/include/asm/compat.h.orig 2012-04-08 11:51:29.569528342 -0700
+++ arch/x86/include/asm/compat.h 2012-04-08 14:33:58.309972502 -0700
@@ -221,6 +221,7 @@
return (u32)(unsigned long)uptr;
}
+#ifdef CONFIG_x86_64
static inline void __user *arch_compat_alloc_user_space(long len)
{
compat_uptr_t sp;
@@ -234,6 +235,15 @@
return (void __user *)round_down(sp - len, 16);
}
+#else
+
+static inline void __user *arch_compat_alloc_user_space(long len)
+{
+ struct pt_regs *regs = task_pt_regs(current);
+ return (void __user *)regs->sp -len;
+}
+
+#endif
static inline bool is_x32_task(void)
{
Here's the ugly part: some names in compat.h were changed recently, and
I can't be bothered to do a proper fix, so I hacked this together instead:
--- common/lib/modules/fglrx/build_mod/firegl_public.c 2012-03-23 13:38:48.000000000 -0700
+++ /tmp/firegl_public.c 2012-04-16 10:45:41.426582953 -0700
@@ -4181,7 +4181,7 @@
{
unsigned int p;
KCL_DEBUG5(FN_FIREGL_KAS, "%d\n", level_init);
- for_each_cpu_mask(p, cpu_possible_map)
+ for (p=0; p<4; p++)
{
KCL_DEBUG1(FN_FIREGL_KAS,"Setting initial execution level for CPU # %d\n", p);
preempt_disable();
NOTE: my new machine has 4 cpus, numbered 0 through 3, and I hardcoded that
number into the ati code, above, instead of deciphering the new kernel headers.
Ugly, ugly, ugly. But it works perfectly :)
If you have two cpus you should change the p<4 to p<2, etc. And then wait
for a professional fix from ati :p
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [gentoo-user] Re: ATI-drivers 12.3 with Kernel 3.4
2012-04-16 18:45 ` [gentoo-user] " walt
@ 2012-04-17 7:28 ` Helmut Jarausch
0 siblings, 0 replies; 3+ messages in thread
From: Helmut Jarausch @ 2012-04-17 7:28 UTC (permalink / raw
To: gentoo-user; +Cc: walt
Many thanks, Walt,
your patches work just fine for me.
Helmut.
On 04/16/2012 08:45:14 PM, walt wrote:
> On 04/16/2012 06:09 AM, Helmut Jarausch wrote:
> >
> > Hi,
> >
> > does anybody know about patches for the ATI-drivers 12.3 to work
> with git-sources 3.4_rc3 ?
>
> Well, "patch" is too formal for the ugly hack I use :)
>
> After building your new kernel you should patch one kernel header file
> before building ati-drivers (taken from lkml):
>
>
> --- arch/x86/include/asm/compat.h.orig 2012-04-08 11:51:29.569528342
> -0700
> +++ arch/x86/include/asm/compat.h 2012-04-08 14:33:58.309972502
> -0700
> @@ -221,6 +221,7 @@
> return (u32)(unsigned long)uptr;
> }
>
> +#ifdef CONFIG_x86_64
> static inline void __user *arch_compat_alloc_user_space(long len)
> {
> compat_uptr_t sp;
> @@ -234,6 +235,15 @@
>
> return (void __user *)round_down(sp - len, 16);
> }
> +#else
> +
> +static inline void __user *arch_compat_alloc_user_space(long len)
> +{
> + struct pt_regs *regs = task_pt_regs(current);
> + return (void __user *)regs->sp -len;
> +}
> +
> +#endif
>
> static inline bool is_x32_task(void)
> {
>
>
> Here's the ugly part: some names in compat.h were changed recently,
> and
> I can't be bothered to do a proper fix, so I hacked this together
> instead:
>
> --- common/lib/modules/fglrx/build_mod/firegl_public.c 2012-03-23
> 13:38:48.000000000 -0700
> +++ /tmp/firegl_public.c 2012-04-16 10:45:41.426582953 -0700
> @@ -4181,7 +4181,7 @@
> {
> unsigned int p;
> KCL_DEBUG5(FN_FIREGL_KAS, "%d\n", level_init);
> - for_each_cpu_mask(p, cpu_possible_map)
> + for (p=0; p<4; p++)
> {
> KCL_DEBUG1(FN_FIREGL_KAS,"Setting initial execution level
> for CPU # %d\n", p);
> preempt_disable();
>
>
> NOTE: my new machine has 4 cpus, numbered 0 through 3, and I
> hardcoded that
> number into the ati code, above, instead of deciphering the new
> kernel headers.
> Ugly, ugly, ugly. But it works perfectly :)
>
> If you have two cpus you should change the p<4 to p<2, etc. And then
> wait
> for a professional fix from ati :p
>
>
>
>
>
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2012-04-17 7:30 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-04-16 13:09 [gentoo-user] ATI-drivers 12.3 with Kernel 3.4 Helmut Jarausch
2012-04-16 18:45 ` [gentoo-user] " walt
2012-04-17 7:28 ` Helmut Jarausch
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox