All of lore.kernel.org
 help / color / mirror / Atom feed
From: Andrew Morton <akpm@osdl.org>
To: mel@csn.ul.ie (Mel Gorman)
Cc: linuxppc-dev@ozlabs.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] Compile failure fix for ppc on 2.6.17-rc4-mm3 (2nd attempt)
Date: Fri, 26 May 2006 09:49:24 -0700	[thread overview]
Message-ID: <20060526094924.10efc515.akpm@osdl.org> (raw)
In-Reply-To: <20060526151214.GA5190@skynet.ie>

mel@csn.ul.ie (Mel Gorman) wrote:
>
> (Resending with Andrew's email address correct this time)
> 
>  For the last few -mm releases, kernels built for an old RS6000 failed to
>  compile with the message;
> 
>  arch/powerpc/kernel/built-in.o(.init.text+0x77b4): In function `vrsqrtefp':
>  : undefined reference to `__udivdi3'
>  arch/powerpc/kernel/built-in.o(.init.text+0x7800): In function `vrsqrtefp':
>  : undefined reference to `__udivdi3'
>  make: *** [.tmp_vmlinux1] Error 1

A function with a name like that doesn't _deserve_ to compile.

But actually vrsqrtefp() doesn't call __udivdi3 - the error lies somewhere
else in the kernel and the toolchain gets it wrong, so we don't know where.

The way I usually hunt this problem down is to build the .s files (make
arch/powerpc/kernel/foo.s) and then grep around, find the offending C
function.

If the problem is specific to powerpc then a

	diffstat 2.6.17.rc4-mm3 | grep powerpc

will narrow down the number of files to be searched by rather a lot.

>  2.6.17-rc5 is not affected but I didn't search for the culprit patch in
>  -mm. The following patch adds an implementation of __udivdi3 for plain old
>  ppc32. This may not be the correct fix as Google tells me that __udivdi3
>  has been replaced by calls to do_div() in a number of cases. There was no
>  obvious way to do that for vrsqrtefp, hence this workaround. The patch should
>  be acked, rejected or replaced by a ppc expert.

Yes, we've traditionally avoided adding the 64-bit divide library functions.

  reply	other threads:[~2006-05-26 16:50 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-05-26 15:12 [PATCH] Compile failure fix for ppc on 2.6.17-rc4-mm3 (2nd attempt) Mel Gorman
2006-05-26 15:12 ` Mel Gorman
2006-05-26 16:49 ` Andrew Morton [this message]
2006-05-29 15:49   ` Mel Gorman
2006-05-29 15:49     ` Mel Gorman
2006-05-29 16:22     ` Segher Boessenkool
2006-05-29 16:22       ` Segher Boessenkool
2006-05-29 17:38       ` Mel Gorman
2006-05-29 17:38         ` Mel Gorman
2006-05-29 17:56         ` Segher Boessenkool
2006-05-29 17:56           ` Segher Boessenkool
2006-05-29 19:05           ` Mel Gorman
2006-05-29 19:05             ` Mel Gorman
2006-06-09  9:36             ` Paul Mackerras
2006-06-09  9:36               ` Paul Mackerras
2006-06-13 16:49               ` Mel Gorman
2006-06-13 16:49                 ` Mel Gorman

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=20060526094924.10efc515.akpm@osdl.org \
    --to=akpm@osdl.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linuxppc-dev@ozlabs.org \
    --cc=mel@csn.ul.ie \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.