aboutsummaryrefslogtreecommitdiffstats
path: root/arch/parisc/kernel/unwind.c
diff options
context:
space:
mode:
Diffstat (limited to 'arch/parisc/kernel/unwind.c')
-rw-r--r--arch/parisc/kernel/unwind.c9
1 files changed, 3 insertions, 6 deletions
diff --git a/arch/parisc/kernel/unwind.c b/arch/parisc/kernel/unwind.c
index 76ed62ed785b..ddd988b267a9 100644
--- a/arch/parisc/kernel/unwind.c
+++ b/arch/parisc/kernel/unwind.c
@@ -168,7 +168,7 @@ void unwind_table_remove(struct unwind_table *table)
168} 168}
169 169
170/* Called from setup_arch to import the kernel unwind info */ 170/* Called from setup_arch to import the kernel unwind info */
171int unwind_init(void) 171int __init unwind_init(void)
172{ 172{
173 long start, stop; 173 long start, stop;
174 register unsigned long gp __asm__ ("r27"); 174 register unsigned long gp __asm__ ("r27");
@@ -233,7 +233,6 @@ static void unwind_frame_regs(struct unwind_frame_info *info)
233 e = find_unwind_entry(info->ip); 233 e = find_unwind_entry(info->ip);
234 if (e == NULL) { 234 if (e == NULL) {
235 unsigned long sp; 235 unsigned long sp;
236 extern char _stext[], _etext[];
237 236
238 dbg("Cannot find unwind entry for 0x%lx; forced unwinding\n", info->ip); 237 dbg("Cannot find unwind entry for 0x%lx; forced unwinding\n", info->ip);
239 238
@@ -281,8 +280,7 @@ static void unwind_frame_regs(struct unwind_frame_info *info)
281 break; 280 break;
282 info->prev_ip = tmp; 281 info->prev_ip = tmp;
283 sp = info->prev_sp; 282 sp = info->prev_sp;
284 } while (info->prev_ip < (unsigned long)_stext || 283 } while (!kernel_text_address(info->prev_ip));
285 info->prev_ip > (unsigned long)_etext);
286 284
287 info->rp = 0; 285 info->rp = 0;
288 286
@@ -435,9 +433,8 @@ unsigned long return_address(unsigned int level)
435 do { 433 do {
436 if (unwind_once(&info) < 0 || info.ip == 0) 434 if (unwind_once(&info) < 0 || info.ip == 0)
437 return 0; 435 return 0;
438 if (!__kernel_text_address(info.ip)) { 436 if (!kernel_text_address(info.ip))
439 return 0; 437 return 0;
440 }
441 } while (info.ip && level--); 438 } while (info.ip && level--);
442 439
443 return info.ip; 440 return info.ip;