aboutsummaryrefslogtreecommitdiffstats
path: root/arch/ia64/oprofile
diff options
context:
space:
mode:
Diffstat (limited to 'arch/ia64/oprofile')
-rw-r--r--arch/ia64/oprofile/backtrace.c20
1 files changed, 1 insertions, 19 deletions
diff --git a/arch/ia64/oprofile/backtrace.c b/arch/ia64/oprofile/backtrace.c
index adb01566bd57..5cdd7e4a597c 100644
--- a/arch/ia64/oprofile/backtrace.c
+++ b/arch/ia64/oprofile/backtrace.c
@@ -32,24 +32,6 @@ typedef struct
32 u64 *prev_pfs_loc; /* state for WAR for old spinlock ool code */ 32 u64 *prev_pfs_loc; /* state for WAR for old spinlock ool code */
33} ia64_backtrace_t; 33} ia64_backtrace_t;
34 34
35#if (__GNUC__ == 3 && __GNUC_MINOR__ < 3)
36/*
37 * Returns non-zero if the PC is in the spinlock contention out-of-line code
38 * with non-standard calling sequence (on older compilers).
39 */
40static __inline__ int in_old_ool_spinlock_code(unsigned long pc)
41{
42 extern const char ia64_spinlock_contention_pre3_4[] __attribute__ ((weak));
43 extern const char ia64_spinlock_contention_pre3_4_end[] __attribute__ ((weak));
44 unsigned long sc_start = (unsigned long)ia64_spinlock_contention_pre3_4;
45 unsigned long sc_end = (unsigned long)ia64_spinlock_contention_pre3_4_end;
46 return (sc_start && sc_end && pc >= sc_start && pc < sc_end);
47}
48#else
49/* Newer spinlock code does a proper br.call and works fine with the unwinder */
50#define in_old_ool_spinlock_code(pc) 0
51#endif
52
53/* Returns non-zero if the PC is in the Interrupt Vector Table */ 35/* Returns non-zero if the PC is in the Interrupt Vector Table */
54static __inline__ int in_ivt_code(unsigned long pc) 36static __inline__ int in_ivt_code(unsigned long pc)
55{ 37{
@@ -80,7 +62,7 @@ static __inline__ int next_frame(ia64_backtrace_t *bt)
80 */ 62 */
81 if (bt->prev_pfs_loc && bt->regs && bt->frame.pfs_loc == bt->prev_pfs_loc) 63 if (bt->prev_pfs_loc && bt->regs && bt->frame.pfs_loc == bt->prev_pfs_loc)
82 bt->frame.pfs_loc = &bt->regs->ar_pfs; 64 bt->frame.pfs_loc = &bt->regs->ar_pfs;
83 bt->prev_pfs_loc = (in_old_ool_spinlock_code(bt->frame.ip) ? bt->frame.pfs_loc : NULL); 65 bt->prev_pfs_loc = NULL;
84 66
85 return unw_unwind(&bt->frame) == 0; 67 return unw_unwind(&bt->frame) == 0;
86} 68}