git://git.onelab.eu
/
linux-2.6.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Fedora kernel-2.6.17-1.2142_FC4 patched with stable patch-2.6.17.4-vs2.0.2-rc26.diff
[linux-2.6.git]
/
arch
/
arm26
/
kernel
/
traps.c
diff --git
a/arch/arm26/kernel/traps.c
b/arch/arm26/kernel/traps.c
index
f0a49fe
..
4eea074
100644
(file)
--- a/
arch/arm26/kernel/traps.c
+++ b/
arch/arm26/kernel/traps.c
@@
-1,5
+1,5
@@
/*
/*
- * linux/arch/arm/kernel/traps.c
+ * linux/arch/arm
26
/kernel/traps.c
*
* Copyright (C) 1995-2002 Russell King
* Fragments that appear the same as linux/arch/i386/kernel/traps.c (C) Linus Torvalds
*
* Copyright (C) 1995-2002 Russell King
* Fragments that appear the same as linux/arch/i386/kernel/traps.c (C) Linus Torvalds
@@
-10,9
+10,11
@@
* published by the Free Software Foundation.
*
* 'traps.c' handles hardware exceptions after we have saved some state in
* published by the Free Software Foundation.
*
* 'traps.c' handles hardware exceptions after we have saved some state in
- * 'linux/arch/arm/lib/traps.S'. Mostly a debugging aid, but will probably
+ * 'linux/arch/arm
26
/lib/traps.S'. Mostly a debugging aid, but will probably
* kill the offending process.
*/
* kill the offending process.
*/
+
+#include <linux/module.h>
#include <linux/config.h>
#include <linux/types.h>
#include <linux/kernel.h>
#include <linux/config.h>
#include <linux/types.h>
#include <linux/kernel.h>
@@
-28,12
+30,11
@@
#include <asm/atomic.h>
#include <asm/io.h>
#include <asm/atomic.h>
#include <asm/io.h>
-#include <asm/pgalloc.h>
#include <asm/pgtable.h>
#include <asm/system.h>
#include <asm/uaccess.h>
#include <asm/unistd.h>
#include <asm/pgtable.h>
#include <asm/system.h>
#include <asm/uaccess.h>
#include <asm/unistd.h>
-#include <
asm/semaphore
.h>
+#include <
linux/mutex
.h>
#include "ptrace.h"
#include "ptrace.h"
@@
-131,11
+132,9
@@
static void dump_instr(struct pt_regs *regs)
/*static*/ void __dump_stack(struct task_struct *tsk, unsigned long sp)
{
/*static*/ void __dump_stack(struct task_struct *tsk, unsigned long sp)
{
- dump_mem("Stack: ", sp, 8192+(unsigned long)t
sk->thread_info
);
+ dump_mem("Stack: ", sp, 8192+(unsigned long)t
ask_stack_page(tsk)
);
}
}
-EXPORT_SYMBOL(dump_stack);
-
void dump_stack(void)
{
#ifdef CONFIG_DEBUG_ERRORS
void dump_stack(void)
{
#ifdef CONFIG_DEBUG_ERRORS
@@
-143,6
+142,8
@@
void dump_stack(void)
#endif
}
#endif
}
+EXPORT_SYMBOL(dump_stack);
+
//FIXME - was a static fn
void dump_backtrace(struct pt_regs *regs, struct task_struct *tsk)
{
//FIXME - was a static fn
void dump_backtrace(struct pt_regs *regs, struct task_struct *tsk)
{
@@
-157,7
+158,7
@@
void dump_backtrace(struct pt_regs *regs, struct task_struct *tsk)
} else if (verify_stack(fp)) {
printk("invalid frame pointer 0x%08x", fp);
ok = 0;
} else if (verify_stack(fp)) {
printk("invalid frame pointer 0x%08x", fp);
ok = 0;
- } else if (fp < (unsigned long)
(tsk->thread_info + 1
))
+ } else if (fp < (unsigned long)
end_of_stack(tsk
))
printk("frame pointer underflow");
printk("\n");
printk("frame pointer underflow");
printk("\n");
@@
-167,10
+168,10
@@
void dump_backtrace(struct pt_regs *regs, struct task_struct *tsk)
/* FIXME - this is probably wrong.. */
void show_stack(struct task_struct *task, unsigned long *sp) {
/* FIXME - this is probably wrong.. */
void show_stack(struct task_struct *task, unsigned long *sp) {
- dump_mem("Stack: ", (unsigned long)sp, 8192+(unsigned long)task
->thread_info
);
+ dump_mem("Stack: ", (unsigned long)sp, 8192+(unsigned long)task
_stack_page(task)
);
}
}
-
spinlock_t die_lock = SPIN_LOCK_UNLOCKED
;
+
DEFINE_SPINLOCK(die_lock)
;
/*
* This function is protected against re-entrancy.
/*
* This function is protected against re-entrancy.
@@
-185,8
+186,9
@@
NORET_TYPE void die(const char *str, struct pt_regs *regs, int err)
printk("Internal error: %s: %x\n", str, err);
printk("CPU: %d\n", smp_processor_id());
show_regs(regs);
printk("Internal error: %s: %x\n", str, err);
printk("CPU: %d\n", smp_processor_id());
show_regs(regs);
- printk("Process %s (pid: %d, stack limit = 0x%p)\n",
- current->comm, current->pid, tsk->thread_info + 1);
+ printk("Process %s (pid: %d[#%u], stack limit = 0x%p)\n",
+ current->comm, current->pid,
+ current->xid, end_of_stack(tsk));
if (!user_mode(regs) || in_interrupt()) {
__dump_stack(tsk, (unsigned long)(regs + 1));
if (!user_mode(regs) || in_interrupt()) {
__dump_stack(tsk, (unsigned long)(regs + 1));
@@
-206,19
+208,19
@@
void die_if_kernel(const char *str, struct pt_regs *regs, int err)
die(str, regs, err);
}
die(str, regs, err);
}
-static DE
CLARE_MUTEX(undef_sem
);
+static DE
FINE_MUTEX(undef_mutex
);
static int (*undef_hook)(struct pt_regs *);
int request_undef_hook(int (*fn)(struct pt_regs *))
{
int ret = -EBUSY;
static int (*undef_hook)(struct pt_regs *);
int request_undef_hook(int (*fn)(struct pt_regs *))
{
int ret = -EBUSY;
-
down(&undef_sem
);
+
mutex_lock(&undef_mutex
);
if (undef_hook == NULL) {
undef_hook = fn;
ret = 0;
}
if (undef_hook == NULL) {
undef_hook = fn;
ret = 0;
}
-
up(&undef_sem
);
+
mutex_unlock(&undef_mutex
);
return ret;
}
return ret;
}
@@
-227,12
+229,12
@@
int release_undef_hook(int (*fn)(struct pt_regs *))
{
int ret = -EINVAL;
{
int ret = -EINVAL;
-
down(&undef_sem
);
+
mutex_lock(&undef_mutex
);
if (undef_hook == fn) {
undef_hook = NULL;
ret = 0;
}
if (undef_hook == fn) {
undef_hook = NULL;
ret = 0;
}
-
up(&undef_sem
);
+
mutex_unlock(&undef_mutex
);
return ret;
}
return ret;
}
@@
-425,7
+427,6
@@
asmlinkage int arm_syscall(int no, struct pt_regs *regs)
return 0;
case NR(usr26):
return 0;
case NR(usr26):
- case NR(usr32):
break;
default:
break;
default: