MOXA linux-2.6.x / linux-2.6.9-uc0 from sdlinux-moxaart.tgz
[linux-2.6.9-moxart.git] / arch / um / kernel / sysrq.c
blob80b84700fa9e9328d3dbd5dd7ec1baa22a8c68f8
1 /*
2 * Copyright (C) 2001 Jeff Dike (jdike@karaya.com)
3 * Licensed under the GPL
4 */
6 #include "linux/sched.h"
7 #include "linux/kernel.h"
8 #include "linux/module.h"
9 #include "asm/page.h"
10 #include "asm/processor.h"
11 #include "sysrq.h"
12 #include "user_util.h"
14 void show_trace(unsigned long * stack)
16 int i;
17 unsigned long addr;
19 if (!stack)
20 stack = (unsigned long*) &stack;
22 printk("Call Trace: ");
23 i = 1;
24 while (((long) stack & (THREAD_SIZE-1)) != 0) {
25 addr = *stack++;
26 if (__kernel_text_address(addr)) {
27 if (i && ((i % 6) == 0))
28 printk("\n ");
29 printk("[<%08lx>] ", addr);
30 i++;
33 printk("\n");
37 * The architecture-independent dump_stack generator
39 void dump_stack(void)
41 unsigned long stack;
43 show_trace(&stack);
45 EXPORT_SYMBOL(dump_stack);
47 void show_stack(struct task_struct *task, unsigned long *sp)
49 show_trace(sp);
53 * Overrides for Emacs so that we follow Linus's tabbing style.
54 * Emacs will notice this stuff at the end of the file and automatically
55 * adjust the settings for this buffer only. This must remain at the end
56 * of the file.
57 * ---------------------------------------------------------------------------
58 * Local variables:
59 * c-file-style: "linux"
60 * End: