Skip to content

Commit c790b41

Browse files
committed
parisc: use kernel_text_address() in unwind functions
Signed-off-by: Helge Deller <deller@gmx.de>
1 parent 6c3215c commit c790b41

1 file changed

Lines changed: 3 additions & 6 deletions

File tree

‎arch/parisc/kernel/unwind.c‎

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -168,7 +168,7 @@ void unwind_table_remove(struct unwind_table *table)
168168
}
169169

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

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

@@ -281,8 +280,7 @@ static void unwind_frame_regs(struct unwind_frame_info *info)
281280
break;
282281
info->prev_ip = tmp;
283282
sp = info->prev_sp;
284-
} while (info->prev_ip < (unsigned long)_stext ||
285-
info->prev_ip > (unsigned long)_etext);
283+
} while (!kernel_text_address(info->prev_ip));
286284

287285
info->rp = 0;
288286

@@ -435,9 +433,8 @@ unsigned long return_address(unsigned int level)
435433
do {
436434
if (unwind_once(&info) < 0 || info.ip == 0)
437435
return 0;
438-
if (!__kernel_text_address(info.ip)) {
436+
if (!kernel_text_address(info.ip))
439437
return 0;
440-
}
441438
} while (info.ip && level--);
442439

443440
return info.ip;

0 commit comments

Comments
 (0)