Skip to content

Commit

Permalink
parisc: use kernel_text_address() in unwind functions
Browse files Browse the repository at this point in the history
Signed-off-by: Helge Deller <deller@gmx.de>
  • Loading branch information
Helge Deller committed Nov 30, 2013
1 parent 6c3215c commit c790b41
Showing 1 changed file with 3 additions and 6 deletions.
9 changes: 3 additions & 6 deletions arch/parisc/kernel/unwind.c
Original file line number Diff line number Diff line change
Expand Up @@ -168,7 +168,7 @@ void unwind_table_remove(struct unwind_table *table)
}

/* Called from setup_arch to import the kernel unwind info */
int unwind_init(void)
int __init unwind_init(void)
{
long start, stop;
register unsigned long gp __asm__ ("r27");
Expand Down Expand Up @@ -233,7 +233,6 @@ static void unwind_frame_regs(struct unwind_frame_info *info)
e = find_unwind_entry(info->ip);
if (e == NULL) {
unsigned long sp;
extern char _stext[], _etext[];

dbg("Cannot find unwind entry for 0x%lx; forced unwinding\n", info->ip);

Expand Down Expand Up @@ -281,8 +280,7 @@ static void unwind_frame_regs(struct unwind_frame_info *info)
break;
info->prev_ip = tmp;
sp = info->prev_sp;
} while (info->prev_ip < (unsigned long)_stext ||
info->prev_ip > (unsigned long)_etext);
} while (!kernel_text_address(info->prev_ip));

info->rp = 0;

Expand Down Expand Up @@ -435,9 +433,8 @@ unsigned long return_address(unsigned int level)
do {
if (unwind_once(&info) < 0 || info.ip == 0)
return 0;
if (!__kernel_text_address(info.ip)) {
if (!kernel_text_address(info.ip))
return 0;
}
} while (info.ip && level--);

return info.ip;
Expand Down

0 comments on commit c790b41

Please sign in to comment.