From: george anzinger <george@mvista.com>
To: Jeff Garzik <jgarzik@pobox.com>
Cc: "linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
Andrew Morton <akpm@zip.com.au>
Subject: Re: how is the asm-generic to be used?
Date: Thu, 05 Dec 2002 11:19:20 -0800 [thread overview]
Message-ID: <3DEFA6B8.98386781@mvista.com> (raw)
In-Reply-To: 3DEF86A2.2010704@pobox.com
Jeff Garzik wrote:
>
> george anzinger wrote:
> > Lets say there is a bit of code in the kernel ( i.e.
> > .../kernel/ ) that needs a function that is in an
> > asm-gneric/*.h file. Now someone comes along and does an
> > asm-x386/*.h with the same functionality but much faster asm
> > functions. How should the using code be set up to get the
> > faster asm version if it exists and the generic version if
> > it does not?
>
> Can you be more specific? :)
>
> asm-generic is for things that belong in include/asm-$ARCH but are also
> shared across multiple architectures.
>
What I have is a generic version of sc_math.h, a set of
inlines and defines that make it easy to access the mpy and
div instructions with 64-bit/32-bit arguments (for example
mpy takes 2 32-bit arguments and produces a 64-bit result).
Individual archs would do these things with an sc_math.h
that uses asm (which I also have for the i386 arch). So the
question is how things are set up so that the arch version
is used if available and the generic if not.
I think the answer (one of those, "it came to me in the
shower answers") is that it is handled by the make file
setting up the include file search paths so that first
asm-<arch> is search and then asm-generic.
--
George Anzinger george@mvista.com
High-res-timers:
http://sourceforge.net/projects/high-res-timers/
Preemption patch:
http://www.kernel.org/pub/linux/kernel/people/rml
prev parent reply other threads:[~2002-12-05 19:12 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2002-12-05 9:34 how is the asm-generic to be used? george anzinger
2002-12-05 17:02 ` Jeff Garzik
2002-12-05 19:19 ` george anzinger [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=3DEFA6B8.98386781@mvista.com \
--to=george@mvista.com \
--cc=akpm@zip.com.au \
--cc=jgarzik@pobox.com \
--cc=linux-kernel@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