blob: 038edb798e32ebd2a2639756631fb3427457a4c9 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
|
#ifndef _ASM_IA64_UNWIND_H
#define _ASM_IA64_UNWIND_H
/*
* Copyright (C) 1999 Hewlett-Packard Co
* Copyright (C) 1999 David Mosberger-Tang <davidm@hpl.hp.com>
*
* A simple API for unwinding kernel stacks. This is used for
* debugging and error reporting purposes. The kernel doesn't need
* full-blown stack unwinding with all the bells and whitles, so there
* is not much point in implementing the full IA-64 unwind API (though
* it would of course be possible to implement the kernel API on top
* of it).
*/
struct task_struct; /* forward declaration */
struct switch_stack; /* forward declaration */
/*
* The following declarations are private to the unwind
* implementation:
*/
struct ia64_stack {
unsigned long *limit;
unsigned long *top;
};
/*
* No user of this module should every access this structure directly
* as it is subject to change. It is declared here solely so we can
* use automatic variables.
*/
struct ia64_frame_info {
struct ia64_stack regstk;
unsigned long *bsp;
unsigned long top_rnat; /* RSE NaT collection at top of backing store */
unsigned long cfm;
unsigned long ip; /* instruction pointer */
};
/*
* The official API follows below:
*/
/*
* Prepare to unwind blocked task t.
*/
extern void ia64_unwind_init_from_blocked_task (struct ia64_frame_info *info,
struct task_struct *t);
/*
* Prepare to unwind the current task. For this to work, the kernel
* stack identified by REGS must look like this:
*
* // //
* | |
* | kernel stack |
* | |
* +=====================+
* | struct pt_regs |
* +---------------------+ <--- REGS
* | struct switch_stack |
* +---------------------+
*/
extern void ia64_unwind_init_from_current (struct ia64_frame_info *info, struct pt_regs *regs);
/*
* Unwind to previous to frame. Returns 0 if successful, negative
* number in case of an error.
*/
extern int ia64_unwind_to_previous_frame (struct ia64_frame_info *info);
#define ia64_unwind_get_ip(info) ((info)->ip)
#define ia64_unwind_get_bsp(info) ((unsigned long) (info)->bsp)
#endif /* _ASM_IA64_UNWIND_H */
|