2000-11-04 08:28:34

by David Hammerton

[permalink] [raw]
Subject: kernel 2.4-test10: new wrapper.h brakes drivers

Hi,

i just installed the latest kernel (2.4-test10).

On recompilation of my "Nvidia" kernel drivers (for geforce 2 3d video support
in linux), it failed linking to "mem_map_inc_count" (and dec_count).

Im not much of a programmer, but to get it working all i had to do was to add
to '/usr/src/linux/include/linux/wrapper.h':
/*the patch*/
#define mem_map_inc_count(p) atomic_inc(&(p->count))
#define mem_map_dec_count(p) atomic_dec(&(p->count))
/*end patch*/

yes, you'll notice i ripped this out of the older kernels..

good luck in finding an alternative, or just leave it in, or whatever.

cheers

David


2000-11-04 08:40:07

by Jeff Garzik

[permalink] [raw]
Subject: Re: kernel 2.4-test10: new wrapper.h brakes drivers

David Hammerton wrote:
>
> Hi,
>
> i just installed the latest kernel (2.4-test10).
>
> On recompilation of my "Nvidia" kernel drivers (for geforce 2 3d video support
> in linux), it failed linking to "mem_map_inc_count" (and dec_count).
>
> Im not much of a programmer, but to get it working all i had to do was to add
> to '/usr/src/linux/include/linux/wrapper.h':
> /*the patch*/
> #define mem_map_inc_count(p) atomic_inc(&(p->count))
> #define mem_map_dec_count(p) atomic_dec(&(p->count))
> /*end patch*/
>
> yes, you'll notice i ripped this out of the older kernels..
>
> good luck in finding an alternative, or just leave it in, or whatever.

if the nvidia kernel shell needs to support multiple kernel versions,
they should add

#ifndef mem_map_inc_count
...compat code...
#endif

--
Jeff Garzik | Dinner is ready when
Building 1024 | the smoke alarm goes off.
MandrakeSoft | -/usr/games/fortune