From: Tiezhu Yang <yangtiezhu@loongson.cn>
To: Josh Poimboeuf <jpoimboe@kernel.org>
Cc: Huacai Chen <chenhuacai@kernel.org>,
Peter Zijlstra <peterz@infradead.org>,
Nathan Chancellor <nathan@kernel.org>,
loongarch@lists.linux.dev, linux-kernel@vger.kernel.org
Subject: Re: [PATCH v1 3/3] LoongArch: Fix unreachable instruction warnings about entry functions
Date: Thu, 4 Sep 2025 11:18:28 +0800 [thread overview]
Message-ID: <3da2092b-e6ca-a7a1-9459-c2754adf19aa@loongson.cn> (raw)
In-Reply-To: <ots6w2ntyudj5ucs5eowncta2vmfssatpcqwzpar3ekk577hxi@j45dd4dmwx6x>
On 2025/9/4 上午3:22, Josh Poimboeuf wrote:
> On Mon, Sep 01, 2025 at 03:21:56PM +0800, Tiezhu Yang wrote:
>> +++ b/arch/loongarch/kernel/Makefile
>> @@ -3,8 +3,6 @@
>> # Makefile for the Linux/LoongArch kernel.
>> #
>>
>> -OBJECT_FILES_NON_STANDARD_head.o := y
>> -
>> always-$(KBUILD_BUILTIN) := vmlinux.lds
>>
>> obj-y += head.o cpu-probe.o cacheinfo.o env.o setup.o entry.o genex.o \
>> diff --git a/arch/loongarch/kernel/head.S b/arch/loongarch/kernel/head.S
>> index e3865e92a917..a11880f3a7e1 100644
>> --- a/arch/loongarch/kernel/head.S
>> +++ b/arch/loongarch/kernel/head.S
>> @@ -42,6 +42,7 @@ SYM_DATA(kernel_fsize, .long _kernel_fsize);
>> .align 12
>>
>> SYM_CODE_START(kernel_entry) # kernel entry point
>> + UNWIND_HINT_UNDEFINED
>
> Should this not be UNWIND_HINT_END_OF_STACK?
Yes, makes sense, will do it in the next version.
> I notice Loongarch doesn't seem to use that anywhere. How does any ORC
> unwind succeed? UNWIND_HINT_UNDEFINED sets an error condition which
> should cause a livepatch transition to stall.
Actually, kernel_entry() or smpboot_entry() is recognized as the last
frame, because at this point is_entry_func() is true and
state->stack_info.type = STACK_TYPE_UNKNOWN in unwind_next_frame() of
arch/loongarch/kernel/unwind_orc.c.
Call Trace:
[<90000000031a36b4>] show_stack+0x5c/0x180
[<900000000319d4b0>] dump_stack_lvl+0x6c/0x9c
[<900000000458d3e0>] nmi_cpu_backtrace+0x160/0x168
[<90000000031a3b6c>] handle_backtrace+0xc/0x40
[<90000000032b1078>] __flush_smp_call_function_queue+0xd0/0x330
[<90000000031aec40>] loongson_ipi_interrupt+0xb0/0x168
[<900000000325b4d4>] __handle_irq_event_percpu+0x54/0x1a8
[<900000000325b63c>] handle_irq_event_percpu+0x14/0x80
[<9000000003262a48>] handle_percpu_irq+0x50/0xa0
[<900000000325aad4>] generic_handle_domain_irq+0x2c/0x80
[<9000000003bc4d24>] handle_cpu_irq+0x64/0xa0
[<90000000045a350c>] handle_loongarch_irq+0x2c/0x48
[<90000000045a35e4>] do_vint+0xbc/0xe0
[<90000000031a1624>] handle_vint+0x144/0x1e4
[<900000000321e2e8>] _nohz_idle_balance.isra.0+0x230/0x3a0
[<90000000031cd004>] handle_softirqs+0x10c/0x298
[<90000000031cd2e8>] __irq_exit_rcu+0x100/0x160
[<90000000045a35a4>] do_vint+0x7c/0xe0
[<90000000045a55cc>] idle_exit+0x0/0x4
[<90000000045a55d8>] arch_cpu_idle+0x8/0x30
[<90000000045a5698>] default_idle_call+0x18/0x50
[<90000000032250b0>] do_idle+0xb8/0x130
[<9000000003225374>] cpu_startup_entry+0x2c/0x38
[<90000000045a6240>] kernel_entry_end+0xdc/0xe0
[<90000000045c0d44>] start_kernel+0x65c/0x660
[<90000000045a60f0>] kernel_entry+0xf0/0xf8
Thanks,
Tiezhu
next prev parent reply other threads:[~2025-09-04 3:18 UTC|newest]
Thread overview: 35+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-09-01 7:21 [PATCH v1 0/3] Fix objtool warnings if LTO is enabled for LoongArch (Part 2) Tiezhu Yang
2025-09-01 7:21 ` [PATCH v1 1/3] objtool/LoongArch: Fix fall through warning about efi_boot_kernel() Tiezhu Yang
2025-09-01 8:16 ` Peter Zijlstra
2025-09-01 8:31 ` Tiezhu Yang
2025-09-03 19:17 ` Josh Poimboeuf
2025-09-04 2:15 ` Tiezhu Yang
2025-09-04 2:17 ` Huacai Chen
2025-09-04 17:26 ` Josh Poimboeuf
2025-09-05 4:33 ` Huacai Chen
2025-09-05 9:53 ` Tiezhu Yang
2025-09-01 7:21 ` [PATCH v1 2/3] objtool/LoongArch: Fix unreachable instruction warnings about EFISTUB Tiezhu Yang
2025-09-01 8:19 ` Peter Zijlstra
2025-09-01 8:39 ` Tiezhu Yang
2025-09-03 19:19 ` Josh Poimboeuf
2025-09-04 2:18 ` Tiezhu Yang
2025-09-04 2:21 ` Huacai Chen
2025-09-04 3:50 ` Tiezhu Yang
2025-09-04 3:59 ` Huacai Chen
2025-09-04 17:39 ` Josh Poimboeuf
2025-09-04 21:46 ` Josh Poimboeuf
2025-09-05 4:36 ` Huacai Chen
2025-09-05 16:04 ` Josh Poimboeuf
2025-09-09 3:59 ` Tiezhu Yang
2025-09-09 4:10 ` Huacai Chen
2025-09-09 16:05 ` Josh Poimboeuf
2025-09-10 6:55 ` Huacai Chen
2025-09-11 3:23 ` Josh Poimboeuf
2025-09-11 8:28 ` Huacai Chen
2025-09-01 7:21 ` [PATCH v1 3/3] LoongArch: Fix unreachable instruction warnings about entry functions Tiezhu Yang
2025-09-01 8:20 ` Peter Zijlstra
2025-09-03 19:22 ` Josh Poimboeuf
2025-09-04 1:26 ` Jinyang He
2025-09-04 3:18 ` Tiezhu Yang [this message]
2025-09-04 17:16 ` Josh Poimboeuf
2025-09-02 15:43 ` [PATCH v1 0/3] Fix objtool warnings if LTO is enabled for LoongArch (Part 2) Huacai Chen
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=3da2092b-e6ca-a7a1-9459-c2754adf19aa@loongson.cn \
--to=yangtiezhu@loongson.cn \
--cc=chenhuacai@kernel.org \
--cc=jpoimboe@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=loongarch@lists.linux.dev \
--cc=nathan@kernel.org \
--cc=peterz@infradead.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®