From: Andrew Morton <akpm@linux-foundation.org>
To: David Miller <davem@davemloft.net>
Cc: mathieu.desnoyers@polymtl.ca, netdev@vger.kernel.org,
linux-kernel@vger.kernel.org, shemminger@linux-foundation.org,
heiko.carstens@de.ibm.com
Subject: Re: link error : 2.6.21-rc6-mm1 for s390
Date: Tue, 10 Apr 2007 18:47:38 -0700 [thread overview]
Message-ID: <20070410184738.dc1c5943.akpm@linux-foundation.org> (raw)
In-Reply-To: <20070410.183629.57444787.davem@davemloft.net>
On Tue, 10 Apr 2007 18:36:29 -0700 (PDT)
David Miller <davem@davemloft.net> wrote:
> From: Andrew Morton <akpm@linux-foundation.org>
> Date: Tue, 10 Apr 2007 18:29:37 -0700
>
> > git-net.patch implements generic lib/div64.c, but s390 also has a
> > private one. Presumably the appropriate fix is to remove s390's
> > private implementation within davem's tree.
>
> The s390 version seems to be optimized in assembler for that
> processor, therefore we should probably instead elide the
> generic version on s390.
We're sure that it has the same API?
> How about something like this?
>
> diff --git a/include/asm-s390/div64.h b/include/asm-s390/div64.h
> index 6cd978c..21aea15 100644
> --- a/include/asm-s390/div64.h
> +++ b/include/asm-s390/div64.h
> @@ -1 +1,2 @@
> #include <asm-generic/div64.h>
> +#define HAVE_ARCH_DIV64_32
> diff --git a/lib/div64.c b/lib/div64.c
> index 74f0c8c..5b480fa 100644
> --- a/lib/div64.c
> +++ b/lib/div64.c
> @@ -23,6 +23,8 @@
> /* Not needed on 64bit architectures */
> #if BITS_PER_LONG == 32
>
> +#ifndef HAVE_ARCH_DIV64_32
> +
> uint32_t __div64_32(uint64_t *n, uint32_t base)
> {
> uint64_t rem = *n;
> @@ -58,6 +60,8 @@ uint32_t __div64_32(uint64_t *n, uint32_t base)
>
> EXPORT_SYMBOL(__div64_32);
>
> +#endif /* !(HAVE_ARCH_DIV64_32) */
> +
> /* 64bit divisor, dividend and result. dynamic precision */
> uint64_t div64_64(uint64_t dividend, uint64_t divisor)
> {
attribute(weak) would give a nicer result?
We'd also need to remove s390's EXPORT_SYMBOL(__div64_32), so s390 ends up
using lib/div64.c's EXPORT_SYMBOL().
next prev parent reply other threads:[~2007-04-11 1:47 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <20070411005616.GG15262@Krystal>
2007-04-11 1:29 ` link error : 2.6.21-rc6-mm1 for s390 Andrew Morton
2007-04-11 1:36 ` David Miller
2007-04-11 1:47 ` Andrew Morton [this message]
2007-04-11 2:05 ` David Miller
2007-04-11 5:11 ` David Miller
2007-04-11 6:39 ` Andrew Morton
2007-04-11 8:15 ` Martin Schwidefsky
2007-04-11 8:21 ` David Miller
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=20070410184738.dc1c5943.akpm@linux-foundation.org \
--to=akpm@linux-foundation.org \
--cc=davem@davemloft.net \
--cc=heiko.carstens@de.ibm.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mathieu.desnoyers@polymtl.ca \
--cc=netdev@vger.kernel.org \
--cc=shemminger@linux-foundation.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;
as well as URLs for NNTP newsgroup(s).