summaryrefslogtreecommitdiff
path: root/arch/parisc
diff options
context:
space:
mode:
authorAndrew Morton <akpm@osdl.org>2004-04-11 22:41:20 -0700
committerLinus Torvalds <torvalds@ppc970.osdl.org>2004-04-11 22:41:20 -0700
commitb283f09cf8f51c29bf90e42e22099f76d0f33378 (patch)
tree7aee46f073ec3c8fc678b64eb430e2958ff0de1e /arch/parisc
parentee28db843649533f5650186251ae4a8bd49a3da9 (diff)
[PATCH] Fix get_wchan() FIXME wrt. order of functions
From: William Lee Irwin III <wli@holomorphy.com> This addresses the issue with get_wchan() that the various functions acting as scheduling-related primitives are not, in fact, contiguous in the text segment. It creates an ELF section for scheduling primitives to be placed in, and places currently-detected (i.e. skipped during stack decoding) scheduling primitives and others like io_schedule() and down(), which are currently missed by get_wchan() code, into this section also. The net effects are more reliability of get_wchan()'s results and the new ability, made use of by this code, to arbitrarily place scheduling primitives in the source code without disturbing get_wchan()'s accuracy. Suggestions by Arnd Bergmann and Matthew Wilcox regarding reducing the invasiveness of the patch were incorporated during prior rounds of review. I've at least tried to sweep all arches in this patch.
Diffstat (limited to 'arch/parisc')
-rw-r--r--arch/parisc/kernel/semaphore.c5
-rw-r--r--arch/parisc/kernel/vmlinux.lds.S1
2 files changed, 4 insertions, 2 deletions
diff --git a/arch/parisc/kernel/semaphore.c b/arch/parisc/kernel/semaphore.c
index ffb4851451fc..ee806bcc3726 100644
--- a/arch/parisc/kernel/semaphore.c
+++ b/arch/parisc/kernel/semaphore.c
@@ -5,6 +5,7 @@
#include <linux/sched.h>
#include <linux/spinlock.h>
#include <linux/errno.h>
+#include <linux/init.h>
/*
* Semaphores are complex as we wish to avoid using two variables.
@@ -58,7 +59,7 @@ void __up(struct semaphore *sem)
sem->count += (sem->count < 0) ? 1 : - 1;
-void __down(struct semaphore * sem)
+void __sched __down(struct semaphore * sem)
{
DOWN_HEAD
@@ -74,7 +75,7 @@ void __down(struct semaphore * sem)
UPDATE_COUNT
}
-int __down_interruptible(struct semaphore * sem)
+int __sched __down_interruptible(struct semaphore * sem)
{
DOWN_HEAD
diff --git a/arch/parisc/kernel/vmlinux.lds.S b/arch/parisc/kernel/vmlinux.lds.S
index 14d0882a19d2..e5d5aeef96e5 100644
--- a/arch/parisc/kernel/vmlinux.lds.S
+++ b/arch/parisc/kernel/vmlinux.lds.S
@@ -50,6 +50,7 @@ SECTIONS
_text = .; /* Text and read-only data */
.text ALIGN(16) : {
*(.text*)
+ SCHED_TEXT
*(.PARISC.unwind)
*(.fixup)
*(.lock.text) /* out-of-line lock text */