Commit 4cd641a
LoongArch: Remove unnecessary checks for ORC unwinder
According to the following function definitions, __kernel_text_address()
already checks __module_text_address(), so it should remove the check of
__module_text_address() in bt_address() at least.
int __kernel_text_address(unsigned long addr)
{
if (kernel_text_address(addr))
return 1;
...
return 0;
}
int kernel_text_address(unsigned long addr)
{
bool no_rcu;
int ret = 1;
...
if (is_module_text_address(addr))
goto out;
...
return ret;
}
bool is_module_text_address(unsigned long addr)
{
guard(rcu)();
return __module_text_address(addr) != NULL;
}
Furthermore, there are two checks of __kernel_text_address(), one is in
bt_address() and the other is after calling bt_address(), it looks like
redundant.
Handle the exception address first and then use __kernel_text_address()
to validate the calculated address for exception or the normal address
in bt_address(), then it can remove the check of __kernel_text_address()
after calling bt_address().
Just remove unnecessary checks, no functional changes intended.
Signed-off-by: Tiezhu Yang <yangtiezhu@loongson.cn>
Signed-off-by: Huacai Chen <chenhuacai@loongson.cn>1 parent 6e5416d commit 4cd641a
1 file changed
Lines changed: 5 additions & 11 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
352 | 352 | | |
353 | 353 | | |
354 | 354 | | |
355 | | - | |
356 | | - | |
357 | | - | |
358 | | - | |
359 | | - | |
360 | | - | |
361 | 355 | | |
362 | 356 | | |
363 | 357 | | |
| |||
375 | 369 | | |
376 | 370 | | |
377 | 371 | | |
378 | | - | |
| 372 | + | |
379 | 373 | | |
380 | 374 | | |
381 | | - | |
| 375 | + | |
| 376 | + | |
| 377 | + | |
| 378 | + | |
382 | 379 | | |
383 | 380 | | |
384 | 381 | | |
| |||
501 | 498 | | |
502 | 499 | | |
503 | 500 | | |
504 | | - | |
505 | | - | |
506 | | - | |
507 | 501 | | |
508 | 502 | | |
509 | 503 | | |
| |||
0 commit comments