All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Jörn Nettingsmeier" <nettings@folkwang-hochschule.de>
To: Bastien Nocera <hadess@hadess.net>
Cc: LinuxPPC Dev <linuxppc-dev@lists.linuxppc.org>
Subject: Re: Kernel sound problems (and misc)
Date: Sun, 13 May 2001 21:37:15 +0200	[thread overview]
Message-ID: <3AFEE26B.DA891A5A@folkwang-hochschule.de> (raw)
In-Reply-To: 989768459.4941.0.camel@kara


Bastien Nocera wrote:

> The misc problem is, while trying to compile paulus' kernel, the vmlinux
> target fails to link with rwsem_down_write_failed and rwsem_wake
> undefined references.
>
> I hope somebody can help me tackle these.
>

i ran into a similar problem last week trying to build an ia32
kernel.
seems it was due to some fundamental changes to semaphore stuff and
a some compiler instructions i don't wuite understand.
someone sent me a patch, i've added it below. (part of it is
alpha-specific and irrelevant, but the last part seems interesting.)
might give you an idea, but might also be that you have a different
problem.
search the lkml archive for rwsem_, there were quite a few posts.

good luck,

jörn


This patch fixes the __builtin_expect compile problem in 2.4.4-pre6
by
moving the definition of __builtin_expect from
include/asm-alpha/compiler.h to include/linux/compiler.h and
including
this file where needed. I haven't touched the ia64 files that uses
__builtin_expect. Does any pre-2.96 compilers have support for ia64?

--
Niels Kristian Bech Jensen -- nkbj@image.dk --
http://www.image.dk/~nkbj/

----------->>  Stop software piracy --- use free software!
<<-----------

diff -u --recursive --new-file
v2.4.4-pre6/linux/include/asm-alpha/compiler.h
linux/include/asm-alpha/compiler.h
--- v2.4.4-pre6/linux/include/asm-alpha/compiler.h      Mon Nov 13
04:27:11 2000
+++ linux/include/asm-alpha/compiler.h  Sun Apr 22 08:28:07 2001
@@ -72,13 +72,4 @@
   __asm__("stw %1,%0" : "=m"(mem) : "r"(val))
 #endif

-/* Somewhere in the middle of the GCC 2.96 development cycle, we
implemented
-   a mechanism by which the user can annotate likely branch
directions and
-   expect the blocks to be reordered appropriately.  Define
__builtin_expect
-   to nothing for earlier compilers.  */
-
-#if __GNUC__ == 2 && __GNUC_MINOR__ < 96
-#define __builtin_expect(x, expected_value) (x)
-#endif
-
 #endif /* __ALPHA_COMPILER_H */
diff -u --recursive --new-file
v2.4.4-pre6/linux/include/asm-alpha/semaphore.h
linux/include/asm-alpha/semaphore.h
--- v2.4.4-pre6/linux/include/asm-alpha/semaphore.h     Sun Apr 22
08:18:53 2001
+++ linux/include/asm-alpha/semaphore.h Sun Apr 22 08:28:29 2001
@@ -11,7 +11,7 @@
 #include <asm/current.h>
 #include <asm/system.h>
 #include <asm/atomic.h>
-#include <asm/compiler.h>      /* __builtin_expect */
+#include <linux/compiler.h>
 #include <linux/wait.h>
 #include <linux/rwsem.h>

diff -u --recursive --new-file
v2.4.4-pre6/linux/include/linux/compiler.h
linux/include/linux/compiler.h
--- v2.4.4-pre6/linux/include/linux/compiler.h  Thu Jan  1 01:00:00
1970
+++ linux/include/linux/compiler.h      Sun Apr 22 08:29:12 2001
@@ -0,0 +1,13 @@
+#ifndef __LINUX_COMPILER_H
+#define __LINUX_COMPILER_H
+
+/* Somewhere in the middle of the GCC 2.96 development cycle, we
implemented
+   a mechanism by which the user can annotate likely branch
directions and
+   expect the blocks to be reordered appropriately.  Define
__builtin_expect
+   to nothing for earlier compilers.  */
+
+#if __GNUC__ == 2 && __GNUC_MINOR__ < 96
+#define __builtin_expect(x, expected_value) (x)
+#endif
+
+#endif /* __LINUX_COMPILER_H */
diff -u --recursive --new-file v2.4.4-pre6/linux/lib/rwsem.c
linux/lib/rwsem.c
--- v2.4.4-pre6/linux/lib/rwsem.c       Sun Apr 22 08:19:11 2001
+++ linux/lib/rwsem.c   Sun Apr 22 08:29:37 2001
@@ -6,6 +6,7 @@
 #include <linux/rwsem.h>
 #include <linux/sched.h>
 #include <linux/module.h>
+#include <linux/compiler.h>

 struct rwsem_waiter {
        struct rwsem_waiter     *next;

--
Jörn Nettingsmeier
home://Kurfürstenstr.49.45138.Essen.Germany
phone://+49.201.491621
http://icem-www.folkwang-hochschule.de/~nettings/
http://www.linuxdj.com/audio/lad/

** Sent via the linuxppc-dev mail list. See http://lists.linuxppc.org/

  parent reply	other threads:[~2001-05-13 19:37 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2001-05-13 15:40 Kernel sound problems (and misc) Bastien Nocera
2001-05-13 15:40 ` Bastien Nocera
2001-05-13 17:05   ` Benjamin Herrenschmidt
2001-05-13 19:37   ` Jörn Nettingsmeier [this message]
2001-05-13 22:39 ` Anton Blanchard
2001-05-13 22:54   ` Bastien Nocera
2001-05-13 22:54     ` Bastien Nocera
  -- strict thread matches above, loose matches on Subject: below --
2001-05-13 16:03 Iain Sandoe

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=3AFEE26B.DA891A5A@folkwang-hochschule.de \
    --to=nettings@folkwang-hochschule.de \
    --cc=hadess@hadess.net \
    --cc=linuxppc-dev@lists.linuxppc.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 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.