2.6.10-rc3-mm1-V0.7.33-03 and NVidia wierdness, with workaround...

From: Valdis . Kletnieks
Date: Thu Dec 16 2004 - 11:29:28 EST


(Yes, I know NVidia is evil and all that.. If you're not Ingo or NVidia,
consider this "documenting the workaround" ;)

For reasons I can't explain, the NVidia module won't initialize
correctly with V0-0.7.33-03 if built with CONFIG_SPINLOCK_BKL. It however
works fine with CONFIG_PREEMPT_BKL, changing nothing else in the config.
It also works fine with 2.6.10-rc3-mm1 without Ingo's patch.

Relevant .config snippet from the /proc/config.gz I'm running with right now:

# CONFIG_PREEMPT_NONE is not set
# CONFIG_PREEMPT_VOLUNTARY is not set
CONFIG_PREEMPT_DESKTOP=y
# CONFIG_PREEMPT_RT is not set
CONFIG_PREEMPT=y
CONFIG_PREEMPT_SOFTIRQS=y
CONFIG_PREEMPT_HARDIRQS=y
# CONFIG_SPINLOCK_BKL is not set
CONFIG_PREEMPT_BKL=y

If built with SPINLOCK_BKL, we get this in the kernel messages:

Dec 16 01:12:41 turing-police kernel: NVRM: rm_init_adapter failed

rm_init_adapter is in NVidia's binary code, so I can't shoot it.

The *odd* part is that it's failing with the spinlock but *not* the preempt version
or the unpatched version. (I was *expecting* that code that was happy with
the old-style BKL in -mm1 would be happy with the spinlock version and complain
if somebody hit the preempt flavor, not the other way around...)

Ingo? This ring any bells?

Attachment: pgp00000.pgp
Description: PGP signature