Hi,
it seems your "oss sound cli cleanup" patch that was included into 2.5
some months ago has caused the following problem:
The final linking of the kernel fails with the following error:
<-- snip -->
...
sound/built-in.o(.text+0x2dc86): In function `write_mix':
: undefined reference to `lock'
sound/built-in.o(.text+0x2dc91): In function `write_mix':
: undefined reference to `lock'
sound/built-in.o(.text+0x2dcaa): In function `write_mix':
: undefined reference to `lock'
sound/built-in.o(.text+0x2dcb3): In function `write_mix':
: undefined reference to `lock'
sound/built-in.o(.text+0x2dcc7): In function `write_mix':
: undefined reference to `lock'
sound/built-in.o(.text+0x2dcd1): more undefined references to `lock'
follow
make: *** [.tmp_vmlinux1] Error 1
<-- snip -->
The following patch fixes the problem for me, please check whether it's
correct:
--- linux-2.5.65-full/sound/oss/ics2101.c.old 2003-03-21 19:13:23.000000000 +0100
+++ linux-2.5.65-full/sound/oss/ics2101.c 2003-03-21 19:13:53.000000000 +0100
@@ -29,7 +29,7 @@
extern int *gus_osp;
extern int gus_base;
-extern spinlock_t lock;
+spinlock_t lock = SPIN_LOCK_UNLOCKED;
static int volumes[ICS_MIXDEVS];
static int left_fix[ICS_MIXDEVS] =
{1, 1, 1, 2, 1, 2};
TIA
Adrian
--
"Is there not promise of rain?" Ling Tan asked suddenly out
of the darkness. There had been need of rain for many days.
"Only a promise," Lao Er said.
Pearl S. Buck - Dragon Seed
Am Fre, 2003-03-21 um 21.10 schrieb Adrian Bunk:
> The following patch fixes the problem for me, please check whether it's
> correct:
>
> --- linux-2.5.65-full/sound/oss/ics2101.c.old 2003-03-21 19:13:23.000000000 +0100
> +++ linux-2.5.65-full/sound/oss/ics2101.c 2003-03-21 19:13:53.000000000 +0100
> @@ -29,7 +29,7 @@
>
> extern int *gus_osp;
> extern int gus_base;
> -extern spinlock_t lock;
> +spinlock_t lock = SPIN_LOCK_UNLOCKED;
> static int volumes[ICS_MIXDEVS];
> static int left_fix[ICS_MIXDEVS] =
> {1, 1, 1, 2, 1, 2};
>
With that patch you do not protect anything.
The write_mix function should share the spinlock used in the
interrupt handler.
Do you compile for Uniprocessor? Can you post the relevant config?
I don't get a link error with SMP.
On Sun, Mar 23, 2003 at 07:11:03PM +0100, Peter Waechtler wrote:
> Am Fre, 2003-03-21 um 21.10 schrieb Adrian Bunk:
> > The following patch fixes the problem for me, please check whether it's
> > correct:
> >
> > --- linux-2.5.65-full/sound/oss/ics2101.c.old 2003-03-21 19:13:23.000000000 +0100
> > +++ linux-2.5.65-full/sound/oss/ics2101.c 2003-03-21 19:13:53.000000000 +0100
> > @@ -29,7 +29,7 @@
> >
> > extern int *gus_osp;
> > extern int gus_base;
> > -extern spinlock_t lock;
> > +spinlock_t lock = SPIN_LOCK_UNLOCKED;
> > static int volumes[ICS_MIXDEVS];
> > static int left_fix[ICS_MIXDEVS] =
> > {1, 1, 1, 2, 1, 2};
> >
>
> With that patch you do not protect anything.
> The write_mix function should share the spinlock used in the
> interrupt handler.
This sounds reasonable (I have to admit I didn't look deeply into the
code).
> Do you compile for Uniprocessor? Can you post the relevant config?
> I don't get a link error with SMP.
Yes, I'm compiling Uniprocessor. The .config is attached.
cu
Adrian
--
"Is there not promise of rain?" Ling Tan asked suddenly out
of the darkness. There had been need of rain for many days.
"Only a promise," Lao Er said.
Pearl S. Buck - Dragon Seed
On Sun, 2003-03-30 at 11:30, Adrian Bunk wrote:
> On Sun, Mar 23, 2003 at 07:11:03PM +0100, Peter Waechtler wrote:
> > Am Fre, 2003-03-21 um 21.10 schrieb Adrian Bunk:
> > > The following patch fixes the problem for me, please check whether it's
> > > correct:
> > >
[patch deleted]
> > With that patch you do not protect anything.
> > The write_mix function should share the spinlock used in the
> > interrupt handler.
>
> This sounds reasonable (I have to admit I didn't look deeply into the
> code).
>
> > Do you compile for Uniprocessor? Can you post the relevant config?
> > I don't get a link error with SMP.
>
> Yes, I'm compiling Uniprocessor. The .config is attached.
>
There's a problem when compiling the GUS driver into the kernel
instead of as a module. I renamed the global "lock" to "gus_lock"
and made sure that it's used (shared by gus_midi, gus_wave, ics2101)
[snippet of sound/oss/Makefile]
obj-$(CONFIG_SOUND_GUS) += gus.o ad1848.o
gus-objs := gus_card.o gus_midi.o gus_vol.o gus_wave.o ics2101.o
Adrian: Do you have a GUS and can test this?
On Mon, Mar 31, 2003 at 02:04:04AM +0200, Peter Waechtler wrote:
>
> There's a problem when compiling the GUS driver into the kernel
> instead of as a module. I renamed the global "lock" to "gus_lock"
> and made sure that it's used (shared by gus_midi, gus_wave, ics2101)
>
> [snippet of sound/oss/Makefile]
> obj-$(CONFIG_SOUND_GUS) += gus.o ad1848.o
> gus-objs := gus_card.o gus_midi.o gus_vol.o gus_wave.o ics2101.o
>
>
> Adrian: Do you have a GUS and can test this?
Unfortunately not, I noticed this problem while doing compile-only tests
with a .config that has as much as possible enabled.
BTW:
The sound/oss/mad16.c part of your patch doesn't belong to this problem?
cu
Adrian
--
"Is there not promise of rain?" Ling Tan asked suddenly out
of the darkness. There had been need of rain for many days.
"Only a promise," Lao Er said.
Pearl S. Buck - Dragon Seed
On Mon, 2003-03-31 at 12:05, Adrian Bunk wrote:
> On Mon, Mar 31, 2003 at 02:04:04AM +0200, Peter Waechtler wrote:
> >
> > There's a problem when compiling the GUS driver into the kernel
> > instead of as a module. I renamed the global "lock" to "gus_lock"
> > and made sure that it's used (shared by gus_midi, gus_wave, ics2101)
> >
> > [snippet of sound/oss/Makefile]
> > obj-$(CONFIG_SOUND_GUS) += gus.o ad1848.o
> > gus-objs := gus_card.o gus_midi.o gus_vol.o gus_wave.o ics2101.o
> >
> >
> > Adrian: Do you have a GUS and can test this?
>
> Unfortunately not, I noticed this problem while doing compile-only tests
> with a .config that has as much as possible enabled.
>
> BTW:
> The sound/oss/mad16.c part of your patch doesn't belong to this problem?
>
No. But there are more compile errors I've fixed while at it: