From: Thomas Bogendoerfer <tsbogend@alpha.franken.de>
To: Huang Pei <huangpei@loongson.cn>
Cc: Bibo Mao <maobibo@loongson.cn>,
linux-mips@vger.kernel.org, Jiaxun Yang <jiaxun.yang@flygoat.com>,
Paul Burton <paulburton@kernel.org>,
Li Xuefeng <lixuefeng@loongson.cn>,
Yang Tiezhu <yangtiezhu@loongson.cn>,
Gao Juxin <gaojuxin@loongson.cn>,
Huacai Chen <chenhuacai@loongson.cn>
Subject: Re: [PATCH 1/2] MIPS: reserve exception vector space ONLY ONCE
Date: Fri, 26 Jan 2024 11:12:12 +0100 [thread overview]
Message-ID: <ZbOFfA4nG6bQ/6WG@alpha.franken.de> (raw)
In-Reply-To: <20240123014758.12718-1-huangpei@loongson.cn>
On Tue, Jan 23, 2024 at 09:47:57AM +0800, Huang Pei wrote:
> "cpu_probe" is called both by BP and APs, but reserving exception vector
> (like 0x0-0x1000) called by "cpu_probe" need once and calling on APs is
> too late since memblock is unavailable at that time.
>
> So, reserve exception vector ONLY by BP.
>
> Suggested-by: Thomas Bogendoerfer <tsbogend@alpha.franken.de>
> Signed-off-by: Huang Pei <huangpei@loongson.cn>
> ---
> arch/mips/kernel/traps.c | 8 +++++++-
> 1 file changed, 7 insertions(+), 1 deletion(-)
>
> diff --git a/arch/mips/kernel/traps.c b/arch/mips/kernel/traps.c
> index 246c6a6b0261..5b778995d448 100644
> --- a/arch/mips/kernel/traps.c
> +++ b/arch/mips/kernel/traps.c
> @@ -2007,7 +2007,13 @@ unsigned long vi_handlers[64];
>
> void reserve_exception_space(phys_addr_t addr, unsigned long size)
> {
> - memblock_reserve(addr, size);
> + /*
> + * reserve exception space on CPUs other than CPU0
> + * is too late, since memblock is unavailable when APs
> + * up
> + */
> + if (smp_processor_id() == 0)
> + memblock_reserve(addr, size);
> }
>
> void __init *set_except_vector(int n, void *addr)
> --
> 2.30.2
applied to mips-fixes.
Thomas.
--
Crap can work. Given enough thrust pigs will fly, but it's not necessarily a
good idea. [ RFC1925, 2.3 ]
next prev parent reply other threads:[~2024-01-26 10:16 UTC|newest]
Thread overview: 50+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-12-25 9:30 [PATCH] MIPS: loongson64: fix boot failure Huang Pei
2024-01-09 21:40 ` Thomas Bogendoerfer
2024-01-13 9:55 ` [PATCH V2]: " Huang Pei
2024-01-13 9:55 ` [PATCH 1/3] MIPS: adjust exception vector space revervation Huang Pei
2024-01-13 9:55 ` [PATCH 2/3] MIPS: loongson64: fix booting failure Huang Pei
2024-01-13 9:55 ` [PATCH 3/3] Revert "MIPS: Loongson64: Handle more memory types passed from firmware" Huang Pei
2024-01-13 11:59 ` Jiaxun Yang
2024-01-14 8:53 ` Huang Pei
2024-01-14 11:58 ` Jiaxun Yang
2024-01-15 1:25 ` Huang Pei
2024-01-15 14:14 ` Jiaxun Yang
2024-01-16 3:10 ` Huang Pei
2024-01-18 12:39 ` [PATCH V3]: MIPS: loongson64: fix booting failure Huang Pei
2024-01-18 12:39 ` [PATCH 1/2] MIPS: reserve exception vector space ONLY ONCE Huang Pei
2024-01-18 12:39 ` [PATCH 2/2] MIPS: loongson64: set nid for reserved memblock region Huang Pei
2024-01-19 4:02 ` [PATCH V4]: MIPS: loongson64: fix boot failure Huang Pei
2024-01-19 4:02 ` [PATCH 1/2] MIPS: reserve exception vector space ONLY ONCE Huang Pei
2024-01-19 15:23 ` Sergei Shtylyov
2024-01-19 16:15 ` Thomas Bogendoerfer
2024-01-21 7:13 ` Huang Pei
2024-01-19 4:02 ` [PATCH 2/2] MIPS: loongson64: set nid for reserved memblock region Huang Pei
2024-01-19 10:05 ` Jiaxun Yang
2024-01-21 2:14 ` Huang Pei
2024-01-21 10:35 ` Jiaxun Yang
2024-01-22 8:08 ` [PATCH V6]: MIPS: loongson64: fix boot failure Huang Pei
2024-01-22 8:08 ` [PATCH 1/2] MIPS: reserve exception vector space ONLY ONCE Huang Pei
2024-01-22 8:08 ` [PATCH 2/2] MIPS: loongson64: set nid for reserved memblock region Huang Pei
2024-01-22 8:20 ` Sergey Shtylyov
2024-01-23 1:47 ` [PATCH 1/2] MIPS: reserve exception vector space ONLY ONCE Huang Pei
2024-01-23 1:47 ` [PATCH 2/2] MIPS: loongson64: set nid for reserved memblock region Huang Pei
2024-01-26 10:12 ` Thomas Bogendoerfer
2024-01-26 14:24 ` Huacai Chen
2024-01-26 17:24 ` Thomas Bogendoerfer
2024-01-27 9:12 ` [PATCH] " Huang Pei
2024-01-27 9:12 ` Huang Pei
2024-01-27 10:04 ` Thomas Bogendoerfer
2024-01-28 4:42 ` Huang Pei
2024-01-26 10:12 ` Thomas Bogendoerfer [this message]
2024-01-15 14:08 ` memblock_reserve for unadded region (was: [PATCH] MIPS: loongson64: fix boot failure) Jiaxun Yang
2024-01-16 3:27 ` Huang Pei
2024-01-16 8:39 ` Mike Rapoport
2024-01-16 12:23 ` Huang Pei
2024-01-17 2:20 ` Yajun Deng
2024-01-17 3:01 ` Huang Pei
2024-01-17 3:17 ` Yajun Deng
2024-01-17 3:59 ` Huang Pei
2024-01-17 6:46 ` Mike Rapoport
2024-01-17 7:45 ` Huang Pei
2024-01-17 11:08 ` Mike Rapoport
2024-01-18 2:26 ` Huang Pei
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=ZbOFfA4nG6bQ/6WG@alpha.franken.de \
--to=tsbogend@alpha.franken.de \
--cc=chenhuacai@loongson.cn \
--cc=gaojuxin@loongson.cn \
--cc=huangpei@loongson.cn \
--cc=jiaxun.yang@flygoat.com \
--cc=linux-mips@vger.kernel.org \
--cc=lixuefeng@loongson.cn \
--cc=maobibo@loongson.cn \
--cc=paulburton@kernel.org \
--cc=yangtiezhu@loongson.cn \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.