From: Alan Cox <alan@lxorguk.ukuu.org.uk>
To: carlos@techlinux.com.br (Carlos E Gorges)
Cc: cltien@cmedia.com.tw (ChenLi Tien),
alan@lxorguk.ukuu.org.uk (Alan Cox),
linux-smp@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] spin[un]locks revision on new cmpci driver (5.64)
Date: Sat, 26 May 2001 01:16:29 +0100 (BST) [thread overview]
Message-ID: <E153Rkr-0007I4-00@the-village.bc.nu> (raw)
In-Reply-To: <01052520370200.01716@shark.techlinux> from "Carlos E Gorges" at May 25, 2001 09:02:06 PM
> The following patch fixes SMP hangs w/ cmpci v5.64 ( k244-ac17 ).
Let me suggest a different approach
> - - spin_lock_irqsave(&s->lock, flags);
> set_spdifout(s, rate);
> + spin_lock_irqsave(&s->lock, flags);
Split the various locked versions stuff stuff like set_adc_rate out as
__set_adc_rate which doesnt take the lock, and set_adc_rate which takes the
lock and calls the other one.
That is how several other drivers were done and avoids messy lock/unlocks
some of which in your changes I think introduce races
Ditto for enable_dac as the old code and a newer __enable_dac, as well
I suspect as __set_spdifout (although is that ever called by anyone not
holding the lock ???)
> init_timer(&s->midi.timer);
> s->midi.timer.expires =3D jiffies+1;
> s->midi.timer.data =3D (unsigned long)s;
> +
> + spin_unlock_irqrestore(&s->lock, flags);
> s->midi.timer.function =3D cm_midi_timer;
> + spin_lock_irqsave(&s->lock, flags);
> +
That one doesnt seem to be needed
next prev parent reply other threads:[~2001-05-26 0:20 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2001-05-26 1:02 Carlos E Gorges
2001-05-26 0:16 ` Alan Cox [this message]
2001-05-26 3:35 ` Carlos E Gorges
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=E153Rkr-0007I4-00@the-village.bc.nu \
--to=alan@lxorguk.ukuu.org.uk \
--cc=carlos@techlinux.com.br \
--cc=cltien@cmedia.com.tw \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-smp@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®