From: Imre Kaloz <kaloz@kernel.org>
To: Thomas Bogendoerfer <tsbogend@alpha.franken.de>,
linux-mips@vger.kernel.org
Cc: stable@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: [PATCH] MIPS: SGI-IP27: Install the cache error vector on every CPU
Date: Wed, 21 Oct 2026 21:02:53 +0200 [thread overview]
Message-ID: <20261021190253.30128-1-kaloz@kernel.org> (raw)
The hub flips the low 128K of the CKSEG1 (attribute 0) uncached alias
per CPU slice, and the cache error vector is fetched through it.
trap_init() writes the vector through TO_UNCAC(), which is not flipped,
so only slice 0 sees it. Copy it to each secondary CPU's slot as it
comes up.
Fixes: 1da177e4c3f4 ("Linux-2.6.12-rc2")
Cc: stable@vger.kernel.org
Signed-off-by: Imre Kaloz <kaloz@kernel.org>
---
arch/mips/sgi-ip27/ip27-smp.c | 16 +++++++++++++++-
1 file changed, 15 insertions(+), 1 deletion(-)
diff --git a/arch/mips/sgi-ip27/ip27-smp.c b/arch/mips/sgi-ip27/ip27-smp.c
index 62733e049570..0fef66b86959 100644
--- a/arch/mips/sgi-ip27/ip27-smp.c
+++ b/arch/mips/sgi-ip27/ip27-smp.c
@@ -7,11 +7,13 @@
* Copyright (C) 2000 - 2001 by Silicon Graphics, Inc.
*/
#include <linux/init.h>
+#include <linux/string.h>
#include <linux/sched.h>
#include <linux/sched/task_stack.h>
#include <linux/topology.h>
#include <linux/nodemask.h>
+#include <asm/addrspace.h>
#include <asm/page.h>
#include <asm/processor.h>
#include <asm/ptrace.h>
@@ -133,6 +135,18 @@ static void ip27_init_cpu(void)
per_cpu_init();
}
+static void ip27_init_secondary(void)
+{
+ /*
+ * The hub flips the low 128K of the attribute 0 uncached alias per
+ * CPU slice and the cache error vector is fetched through that alias,
+ * so the copy trap_init() made through TO_UNCAC() only serves slice 0.
+ */
+ memcpy((void *)CKSEG1ADDR(0x100), (void *)TO_UNCAC(0x100), 0x80);
+
+ ip27_init_cpu();
+}
+
static void ip27_smp_finish(void)
{
hub_rt_clock_event_init();
@@ -182,7 +196,7 @@ static void __init ip27_prepare_cpus(unsigned int max_cpus)
const struct plat_smp_ops ip27_smp_ops = {
.send_ipi_single = ip27_send_ipi_single,
.send_ipi_mask = ip27_send_ipi_mask,
- .init_secondary = ip27_init_cpu,
+ .init_secondary = ip27_init_secondary,
.smp_finish = ip27_smp_finish,
.boot_secondary = ip27_boot_secondary,
.smp_setup = ip27_smp_setup,
base-commit: 24a19b953e2a3d0ea5a8c4951a0ab8f32720c907
--
2.47.3
reply other threads:[~2026-10-21 19:04 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=20261021190253.30128-1-kaloz@kernel.org \
--to=kaloz@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mips@vger.kernel.org \
--cc=stable@vger.kernel.org \
--cc=tsbogend@alpha.franken.de \
/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®