From: Youling Tang <tangyouling@loongson.cn>
To: Jinyang He <hejinyang@loongson.cn>
Cc: Huacai Chen <chenhuacai@kernel.org>,
WANG Xuerui <kernel@xen0n.name>, Xi Ruoyao <xry111@xry111.site>,
loongarch@lists.linux.dev, linux-kernel@vger.kernel.org
Subject: Re: [PATCH v2 3/6] LoongArch: Create a exception handlers section
Date: Tue, 28 Feb 2023 20:42:36 +0800 [thread overview]
Message-ID: <68036cab-e2f0-86b6-c26c-4bcd0716e554@loongson.cn> (raw)
In-Reply-To: <20230228080257.28807-4-hejinyang@loongson.cn>
Hi, Jinyang
On 02/28/2023 04:02 PM, Jinyang He wrote:
> diff --git a/arch/loongarch/kernel/vmlinux.lds.S b/arch/loongarch/kernel/vmlinux.lds.S
> index ad2ce1a0908e..e99b50359900 100644
> --- a/arch/loongarch/kernel/vmlinux.lds.S
> +++ b/arch/loongarch/kernel/vmlinux.lds.S
> @@ -21,6 +21,11 @@
> */
> PECOFF_FILE_ALIGN = 0x200;
> PECOFF_SEGMENT_ALIGN = 0x10000;
> +EX_HANDLER_ALIGN = SZ_512;
> +EX_HANDLER_SIZE = SZ_512;
> +EX_HANDLER_TOTAL = 78; /* 64 Exceptions + 14 Interrupts */
You can define EXCCODE_NUM as 78 in loongarch.h, and remove the unused
EXCCODE_INT_END and EXCCODE_INT_NUM in PATCH4.
Youling.
> +EXCEPTION_ENTRY_ALIGN = SZ_64K;
> +TLBR_ENTRY_ALIGN = SZ_4K;
>
> OUTPUT_ARCH(loongarch)
> ENTRY(kernel_entry)
> @@ -54,6 +59,17 @@ SECTIONS
> . = ALIGN(PECOFF_SEGMENT_ALIGN);
> _etext = .;
>
> + . = ALIGN(EXCEPTION_ENTRY_ALIGN);
> + .ex_handlers : {
> + __ex_handlers = .;
> + *(SORT_BY_INIT_PRIORITY(.exception_handlers.*))
> + . = ALIGN(EX_HANDLER_ALIGN);
> + __ex_handlers_end = .;
> + . = ALIGN(TLBR_ENTRY_ALIGN);
> + __tlbr_entry = .;
> + *(.tlbrhandler)
> + }
> +
> /*
> * struct alt_inst entries. From the header (alternative.h):
> * "Alternative instructions for different CPU types or capabilities"
> @@ -154,3 +170,6 @@ SECTIONS
> *(.eh_frame)
> }
> }
> +
> +ASSERT(__ex_handlers_end == (__ex_handlers + EX_HANDLER_SIZE * EX_HANDLER_TOTAL),
> + "The amount of exception handlers does not match!");
next prev parent reply other threads:[~2023-02-28 12:42 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-02-28 8:02 [PATCH v2 0/6] Drop the per-node-mode exception handlers Jinyang He
2023-02-28 8:02 ` [PATCH v2 1/6] LoongArch: Rename handle_syscall to handle_sys Jinyang He
2023-02-28 8:02 ` [PATCH v2 2/6] LoongArch: Move the content defined by SYM_DATA to data or rodata section Jinyang He
2023-02-28 8:02 ` [PATCH v2 3/6] LoongArch: Create a exception handlers section Jinyang He
2023-02-28 12:42 ` Youling Tang [this message]
2023-02-28 8:02 ` [PATCH v2 4/6] LoongArch: Drop pernode exception handlers Jinyang He
2023-02-28 12:42 ` Youling Tang
2023-02-28 8:02 ` [PATCH v2 5/6] LoongArch: Fix up the prologue unwinder unwind exception frame Jinyang He
2023-02-28 8:02 ` [PATCH v2 6/6] LoongArch: Clean up la_abs macro Jinyang He
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=68036cab-e2f0-86b6-c26c-4bcd0716e554@loongson.cn \
--to=tangyouling@loongson.cn \
--cc=chenhuacai@kernel.org \
--cc=hejinyang@loongson.cn \
--cc=kernel@xen0n.name \
--cc=linux-kernel@vger.kernel.org \
--cc=loongarch@lists.linux.dev \
--cc=xry111@xry111.site \
/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®