From: Takashi Iwai <tiwai@suse.de>
To: Ralf Baechle <ralf@linux-mips.org>
Cc: linux-arch@linux-mips.org, linux-kernel@vger.kernel.org,
alsa-devel@alsa-project.org, Jaroslav Kysela <perex@perex.cz>
Subject: Re: i8253 locking and PC speaker on non-{mips,x86}
Date: Sat, 28 May 2011 16:21:39 +0200 [thread overview]
Message-ID: <s5hr57izz0s.wl%tiwai@suse.de> (raw)
In-Reply-To: <20110528112120.GA9027@linux-mips.org>
At Sat, 28 May 2011 12:21:20 +0100,
Ralf Baechle wrote:
>
> No longer terribly relevant these days but ...
>
> drivers/input/misc/pcspkr.c:
>
> #if defined(CONFIG_MIPS) || defined(CONFIG_X86)
> /* Use the global PIT lock ! */
> #include <asm/i8253.h>
> #else
> #include <asm/8253pit.h>
> static DEFINE_RAW_SPINLOCK(i8253_lock);
> #endif
>
> sound/drivers/pcsp/pcsp.h:
>
> #if defined(CONFIG_MIPS) || defined(CONFIG_X86)
> /* Use the global PIT lock ! */
> #include <asm/i8253.h>
> #else
> #include <asm/8253pit.h>
> static DEFINE_RAW_SPINLOCK(i8253_lock);
>
> $ git grep -F pcsp.h sound/drivers/pcsp
> sound/drivers/pcsp/pcsp.c:#include "pcsp.h"
> sound/drivers/pcsp/pcsp_input.c:#include "pcsp.h"
> sound/drivers/pcsp/pcsp_lib.c:#include "pcsp.h"
> sound/drivers/pcsp/pcsp_mixer.c:#include "pcsp.h"
> $ git grep -w i8253_lock sound/drivers/pcsp/
> sound/drivers/pcsp/pcsp.h:static DEFINE_RAW_SPINLOCK(i8253_lock);
> sound/drivers/pcsp/pcsp_input.c: raw_spin_lock_irqsave(&i8253_lock, flags
> sound/drivers/pcsp/pcsp_input.c: raw_spin_unlock_irqrestore(&i8253_lock,
> sound/drivers/pcsp/pcsp_lib.c: raw_spin_lock_irqsave(&i8253_lock, flags
> sound/drivers/pcsp/pcsp_lib.c: raw_spin_unlock_irqrestore(&i8253_lock,
> sound/drivers/pcsp/pcsp_lib.c: raw_spin_lock(&i8253_lock);
> sound/drivers/pcsp/pcsp_lib.c: raw_spin_unlock(&i8253_lock);
> sound/drivers/pcsp/pcsp_lib.c: raw_spin_lock(&i8253_lock);
> sound/drivers/pcsp/pcsp_lib.c: raw_spin_unlock(&i8253_lock);
>
> Locks are great, everybody should have their own lock!
Yeah, if they were actually built. But snd-pcsp driver is built only
for x86:
config SND_PCSP
tristate "PC-Speaker support (READ HELP!)"
depends on PCSPKR_PLATFORM && X86 && HIGH_RES_TIMERS
depends on INPUT
depends on EXPERIMENTAL
So, the current code in sound/drivers/pcsp/pcsp.h is harmless, but
just confusing because of copy-and-paste from
drivers/input/misc/pcspkr.c.
The part for non-x86 should be removed or commented better.
thanks,
Takashi
prev parent reply other threads:[~2011-05-28 14:21 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-05-28 11:21 i8253 locking and PC speaker on non-{mips,x86} Ralf Baechle
2011-05-28 14:21 ` Takashi Iwai [this message]
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=s5hr57izz0s.wl%tiwai@suse.de \
--to=tiwai@suse.de \
--cc=alsa-devel@alsa-project.org \
--cc=linux-arch@linux-mips.org \
--cc=linux-kernel@vger.kernel.org \
--cc=perex@perex.cz \
--cc=ralf@linux-mips.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