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 4/6] LoongArch: Drop pernode exception handlers
Date: Tue, 28 Feb 2023 20:42:46 +0800 [thread overview]
Message-ID: <2defcb38-91f5-78ec-0c78-766e4f2271d5@loongson.cn> (raw)
In-Reply-To: <20230228080257.28807-5-hejinyang@loongson.cn>
On 02/28/2023 04:02 PM, Jinyang He wrote:
> diff --git a/arch/loongarch/mm/tlb.c b/arch/loongarch/mm/tlb.c
> index 8bad6b0cff59..dda35eae1c49 100644
> --- a/arch/loongarch/mm/tlb.c
> +++ b/arch/loongarch/mm/tlb.c
> @@ -250,50 +250,10 @@ static void output_pgtable_bits_defines(void)
> pr_debug("\n");
> }
>
> -#ifdef CONFIG_NUMA
> -unsigned long pcpu_handlers[NR_CPUS];
> -#endif
> -extern long exception_handlers[VECSIZE * 128 / sizeof(long)];
> -
> void setup_tlb_handler(int cpu)
It may be necessary to rename the function after modification.
Youling.
> {
> setup_ptwalker();
> local_flush_tlb_all();
> -
> - /* The tlb handlers are generated only once */
> - if (cpu == 0) {
> - memcpy((void *)tlbrentry, handle_tlb_refill, 0x80);
> - local_flush_icache_range(tlbrentry, tlbrentry + 0x80);
> - set_handler(EXCCODE_TLBI * VECSIZE, handle_tlb_load, VECSIZE);
> - set_handler(EXCCODE_TLBL * VECSIZE, handle_tlb_load, VECSIZE);
> - set_handler(EXCCODE_TLBS * VECSIZE, handle_tlb_store, VECSIZE);
> - set_handler(EXCCODE_TLBM * VECSIZE, handle_tlb_modify, VECSIZE);
> - set_handler(EXCCODE_TLBNR * VECSIZE, handle_tlb_protect, VECSIZE);
> - set_handler(EXCCODE_TLBNX * VECSIZE, handle_tlb_protect, VECSIZE);
> - set_handler(EXCCODE_TLBPE * VECSIZE, handle_tlb_protect, VECSIZE);
> - }
> -#ifdef CONFIG_NUMA
> - else {
> - void *addr;
> - struct page *page;
> - const int vec_sz = sizeof(exception_handlers);
> -
> - if (pcpu_handlers[cpu])
> - return;
> -
> - page = alloc_pages_node(cpu_to_node(cpu), GFP_ATOMIC, get_order(vec_sz));
> - if (!page)
> - return;
> -
> - addr = page_address(page);
> - pcpu_handlers[cpu] = (unsigned long)addr;
> - memcpy((void *)addr, (void *)eentry, vec_sz);
> - local_flush_icache_range((unsigned long)addr, (unsigned long)addr + vec_sz);
> - csr_write64(pcpu_handlers[cpu], LOONGARCH_CSR_EENTRY);
> - csr_write64(pcpu_handlers[cpu], LOONGARCH_CSR_MERRENTRY);
> - csr_write64(pcpu_handlers[cpu] + 80*VECSIZE, LOONGARCH_CSR_TLBRENTRY);
> - }
> -#endif
> }
>
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 " 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
2023-02-28 8:02 ` [PATCH v2 4/6] LoongArch: Drop pernode exception handlers Jinyang He
2023-02-28 12:42 ` Youling Tang [this message]
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=2defcb38-91f5-78ec-0c78-766e4f2271d5@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®