From: "Clemens Ladisch" <cladisch@fastmail.net>
To: Dave Dillow <dave@thedillows.org>
Cc: alsa-devel@alsa-project.org
Subject: Re: [PATCH 2/2] sis7019: add support for pre-2.6 kernels
Date: Mon, 10 Dec 2007 15:48:44 +0100 [thread overview]
Message-ID: <1197298124.31051.1225761969@webmail.messagingengine.com> (raw)
In-Reply-To: <1197296683.3994.11.camel@obelisk.thedillows.org>
Dave Dillow wrote:
> On Mon, 2007-12-10 at 08:53 +0100, Clemens Ladisch wrote:
> > Dave Dillow wrote:
> > > The sis7019 driver uses __ffs(), which is available in 2.6 kernels, but
> > > not in most earlier ones. This patches the driver to use a local version
> > > assembly version, as the hardware is SiS 55x only (i486/Pentium-ish).
> > >
> > > ++#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,0)
> > > ++static inline unsigned long sis_ffs(unsigned long word)
> > > ++{
> > > ++ __asm__("bsfl %1,%0"
> > > ++ :"=r" (word)
> > > ++ :"rm" (word));
> > > ++ return word;
> > > ++}
> > > ++#endif
> >
> > This should go into alsa-driver/include/adriver.h.
>
> I'm not sure -- there's no other inline assembly there, and if I provide
> an x86 _ffs() fallback, then it'll break on other architectures...
It won't break unless another driver actually uses __ffs(), and then we
can still add a generic implementation.
Regards,
Clemens
next prev parent reply other threads:[~2007-12-10 14:48 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-12-08 23:54 [PATCH 2/2] sis7019: add support for pre-2.6 kernels Dave Dillow
2007-12-10 7:53 ` Clemens Ladisch
2007-12-10 14:24 ` Dave Dillow
2007-12-10 14:48 ` Clemens Ladisch [this message]
2007-12-13 15:50 ` Takashi Iwai
2007-12-13 17:43 ` Dave Dillow
-- strict thread matches above, loose matches on Subject: below --
2007-11-28 7:19 Dave Dillow
2007-11-28 9:41 ` Takashi Iwai
2007-11-28 13:18 ` Dave Dillow
2007-11-28 12:56 ` Takashi Iwai
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=1197298124.31051.1225761969@webmail.messagingengine.com \
--to=cladisch@fastmail.net \
--cc=alsa-devel@alsa-project.org \
--cc=dave@thedillows.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