~ [ source navigation ] ~ [ diff markup ] ~ [ identifier search ] ~

TOMOYO Linux Cross Reference
Linux/arch/arc/include/asm/unwind.h

Version: ~ [ linux-5.2-rc1 ] ~ [ linux-5.1.2 ] ~ [ linux-5.0.16 ] ~ [ linux-4.20.17 ] ~ [ linux-4.19.43 ] ~ [ linux-4.18.20 ] ~ [ linux-4.17.19 ] ~ [ linux-4.16.18 ] ~ [ linux-4.15.18 ] ~ [ linux-4.14.119 ] ~ [ linux-4.13.16 ] ~ [ linux-4.12.14 ] ~ [ linux-4.11.12 ] ~ [ linux-4.10.17 ] ~ [ linux-4.9.176 ] ~ [ linux-4.8.17 ] ~ [ linux-4.7.10 ] ~ [ linux-4.6.7 ] ~ [ linux-4.5.7 ] ~ [ linux-4.4.179 ] ~ [ linux-4.3.6 ] ~ [ linux-4.2.8 ] ~ [ linux-4.1.52 ] ~ [ linux-4.0.9 ] ~ [ linux-3.19.8 ] ~ [ linux-3.18.139 ] ~ [ linux-3.17.8 ] ~ [ linux-3.16.67 ] ~ [ linux-3.15.10 ] ~ [ linux-3.14.79 ] ~ [ linux-3.13.11 ] ~ [ linux-3.12.74 ] ~ [ linux-3.11.10 ] ~ [ linux-3.10.108 ] ~ [ linux-3.9.11 ] ~ [ linux-3.8.13 ] ~ [ linux-3.7.10 ] ~ [ linux-3.6.11 ] ~ [ linux-3.5.7 ] ~ [ linux-3.4.113 ] ~ [ linux-3.3.8 ] ~ [ linux-3.2.102 ] ~ [ linux-3.1.10 ] ~ [ linux-3.0.101 ] ~ [ linux-2.6.39.4 ] ~ [ linux-2.6.38.8 ] ~ [ linux-2.6.37.6 ] ~ [ linux-2.6.36.4 ] ~ [ linux-2.6.35.14 ] ~ [ linux-2.6.34.15 ] ~ [ linux-2.6.33.20 ] ~ [ linux-2.6.32.71 ] ~ [ linux-2.6.0 ] ~ [ linux-2.4.37.11 ] ~ [ unix-v6-master ] ~ [ ccs-tools-1.8.5 ] ~ [ policy-sample ] ~
Architecture: ~ [ i386 ] ~ [ alpha ] ~ [ m68k ] ~ [ mips ] ~ [ ppc ] ~ [ sparc ] ~ [ sparc64 ] ~

  1 /*
  2  * Copyright (C) 2004, 2007-2010, 2011-2012 Synopsys, Inc. (www.synopsys.com)
  3  *
  4  * This program is free software; you can redistribute it and/or modify
  5  * it under the terms of the GNU General Public License version 2 as
  6  * published by the Free Software Foundation.
  7  */
  8 
  9 #ifndef _ASM_ARC_UNWIND_H
 10 #define _ASM_ARC_UNWIND_H
 11 
 12 #ifdef CONFIG_ARC_DW2_UNWIND
 13 
 14 #include <linux/sched.h>
 15 
 16 struct arc700_regs {
 17         unsigned long r0;
 18         unsigned long r1;
 19         unsigned long r2;
 20         unsigned long r3;
 21         unsigned long r4;
 22         unsigned long r5;
 23         unsigned long r6;
 24         unsigned long r7;
 25         unsigned long r8;
 26         unsigned long r9;
 27         unsigned long r10;
 28         unsigned long r11;
 29         unsigned long r12;
 30         unsigned long r13;
 31         unsigned long r14;
 32         unsigned long r15;
 33         unsigned long r16;
 34         unsigned long r17;
 35         unsigned long r18;
 36         unsigned long r19;
 37         unsigned long r20;
 38         unsigned long r21;
 39         unsigned long r22;
 40         unsigned long r23;
 41         unsigned long r24;
 42         unsigned long r25;
 43         unsigned long r26;
 44         unsigned long r27;      /* fp */
 45         unsigned long r28;      /* sp */
 46         unsigned long r29;
 47         unsigned long r30;
 48         unsigned long r31;      /* blink */
 49         unsigned long r63;      /* pc */
 50 };
 51 
 52 struct unwind_frame_info {
 53         struct arc700_regs regs;
 54         struct task_struct *task;
 55         unsigned call_frame:1;
 56 };
 57 
 58 #define UNW_PC(frame)           ((frame)->regs.r63)
 59 #define UNW_SP(frame)           ((frame)->regs.r28)
 60 #define UNW_BLINK(frame)        ((frame)->regs.r31)
 61 
 62 /* Rajesh FIXME */
 63 #ifdef CONFIG_FRAME_POINTER
 64 #define UNW_FP(frame)           ((frame)->regs.r27)
 65 #define FRAME_RETADDR_OFFSET    4
 66 #define FRAME_LINK_OFFSET       0
 67 #define STACK_BOTTOM_UNW(tsk)   STACK_LIMIT((tsk)->thread.ksp)
 68 #define STACK_TOP_UNW(tsk)      ((tsk)->thread.ksp)
 69 #else
 70 #define UNW_FP(frame)           ((void)(frame), 0)
 71 #endif
 72 
 73 #define STACK_LIMIT(ptr)        (((ptr) - 1) & ~(THREAD_SIZE - 1))
 74 
 75 #define UNW_REGISTER_INFO \
 76         PTREGS_INFO(r0), \
 77         PTREGS_INFO(r1), \
 78         PTREGS_INFO(r2), \
 79         PTREGS_INFO(r3), \
 80         PTREGS_INFO(r4), \
 81         PTREGS_INFO(r5), \
 82         PTREGS_INFO(r6), \
 83         PTREGS_INFO(r7), \
 84         PTREGS_INFO(r8), \
 85         PTREGS_INFO(r9), \
 86         PTREGS_INFO(r10), \
 87         PTREGS_INFO(r11), \
 88         PTREGS_INFO(r12), \
 89         PTREGS_INFO(r13), \
 90         PTREGS_INFO(r14), \
 91         PTREGS_INFO(r15), \
 92         PTREGS_INFO(r16), \
 93         PTREGS_INFO(r17), \
 94         PTREGS_INFO(r18), \
 95         PTREGS_INFO(r19), \
 96         PTREGS_INFO(r20), \
 97         PTREGS_INFO(r21), \
 98         PTREGS_INFO(r22), \
 99         PTREGS_INFO(r23), \
100         PTREGS_INFO(r24), \
101         PTREGS_INFO(r25), \
102         PTREGS_INFO(r26), \
103         PTREGS_INFO(r27), \
104         PTREGS_INFO(r28), \
105         PTREGS_INFO(r29), \
106         PTREGS_INFO(r30), \
107         PTREGS_INFO(r31), \
108         PTREGS_INFO(r63)
109 
110 #define UNW_DEFAULT_RA(raItem, dataAlign) \
111         ((raItem).where == Memory && !((raItem).value * (dataAlign) + 4))
112 
113 extern int arc_unwind(struct unwind_frame_info *frame);
114 extern void arc_unwind_init(void);
115 extern void *unwind_add_table(struct module *module, const void *table_start,
116                               unsigned long table_size);
117 extern void unwind_remove_table(void *handle, int init_only);
118 
119 static inline int
120 arch_unwind_init_running(struct unwind_frame_info *info,
121                          int (*callback) (struct unwind_frame_info *info,
122                                           void *arg),
123                          void *arg)
124 {
125         return 0;
126 }
127 
128 static inline int arch_unw_user_mode(const struct unwind_frame_info *info)
129 {
130         return 0;
131 }
132 
133 static inline void arch_unw_init_blocked(struct unwind_frame_info *info)
134 {
135         return;
136 }
137 
138 static inline void arch_unw_init_frame_info(struct unwind_frame_info *info,
139                                             struct pt_regs *regs)
140 {
141         return;
142 }
143 
144 #else
145 
146 #define UNW_PC(frame) ((void)(frame), 0)
147 #define UNW_SP(frame) ((void)(frame), 0)
148 #define UNW_FP(frame) ((void)(frame), 0)
149 
150 static inline void arc_unwind_init(void)
151 {
152 }
153 
154 #define unwind_add_table(a, b, c)
155 #define unwind_remove_table(a, b)
156 
157 #endif /* CONFIG_ARC_DW2_UNWIND */
158 
159 #endif /* _ASM_ARC_UNWIND_H */
160 

~ [ source navigation ] ~ [ diff markup ] ~ [ identifier search ] ~

kernel.org | git.kernel.org | LWN.net | Project Home | Wiki (Japanese) | Wiki (English) | SVN repository | Mail admin

Linux® is a registered trademark of Linus Torvalds in the United States and other countries.
TOMOYO® is a registered trademark of NTT DATA CORPORATION.

osdn.jp