From: Daniel Palmer <daniel@0x0f.com>
To: maddy@linux.ibm.com, mpe@ellerman.id.au, npiggin@gmail.com,
chleroy@kernel.org, ritesh.list@gmail.com, sshegde@linux.ibm.com,
bigeasy@linutronix.de
Cc: linuxppc-dev@lists.ozlabs.org, linux-kernel@vger.kernel.org,
Daniel Palmer <daniel@0x0f.com>
Subject: [PATCH] powerpc/powermac: Always close the timebase-sync i2c bus
Date: Sat, 31 Oct 2026 08:24:18 +0900 [thread overview]
Message-ID: <20261030232418.1145779-1-daniel@0x0f.com> (raw)
smp_core99_cpu_prepare() opens an i2c bus for "tb sync" and that is
closed again in smp_core99_cpu_online().
If a processor module is dysfunctional, not seated correctly or
otherwise fails to come online smp_core99_cpu_online() is not called
and the bus stays open.
On some G5s (tested PowerMac7,3) this i2c bus also has the CPU
temperature sensor and fan controller connected to it so not closing
the bus stops the kernel from making sure the working CPU doesn't
roast itself to death.
Rename smp_core99_cpu_online() to smp_core99_cpu_online_prepare_down()
and wire it up to get called when onlining fails as well so the
bus is closed and the working CPU stays working.
Fixes: 68e694dcef24 ("powerpc/powermac: Convert to hotplug state machine")
Signed-off-by: Daniel Palmer <daniel@0x0f.com>
---
arch/powerpc/platforms/powermac/smp.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/arch/powerpc/platforms/powermac/smp.c b/arch/powerpc/platforms/powermac/smp.c
index 88e92af8acf9..e310b6fbbede 100644
--- a/arch/powerpc/platforms/powermac/smp.c
+++ b/arch/powerpc/platforms/powermac/smp.c
@@ -865,7 +865,7 @@ static int smp_core99_cpu_prepare(unsigned int cpu)
return 0;
}
-static int smp_core99_cpu_online(unsigned int cpu)
+static int smp_core99_cpu_online_prepare_down(unsigned int cpu)
{
/* Close i2c bus if it was used for tb sync */
if (pmac_tb_clock_chip_host && smp_core99_host_open) {
@@ -893,9 +893,9 @@ static void __init smp_core99_bringup_done(void)
#ifdef CONFIG_HOTPLUG_CPU
cpuhp_setup_state_nocalls(CPUHP_POWERPC_PMAC_PREPARE,
"powerpc/pmac:prepare", smp_core99_cpu_prepare,
- NULL);
+ smp_core99_cpu_online_prepare_down);
cpuhp_setup_state_nocalls(CPUHP_AP_ONLINE_DYN, "powerpc/pmac:online",
- smp_core99_cpu_online, NULL);
+ smp_core99_cpu_online_prepare_down, NULL);
#endif
if (ppc_md.progress)
--
2.55.0
reply other threads:[~2026-10-30 23:24 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=20261030232418.1145779-1-daniel@0x0f.com \
--to=daniel@0x0f.com \
--cc=bigeasy@linutronix.de \
--cc=chleroy@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linuxppc-dev@lists.ozlabs.org \
--cc=maddy@linux.ibm.com \
--cc=mpe@ellerman.id.au \
--cc=npiggin@gmail.com \
--cc=ritesh.list@gmail.com \
--cc=sshegde@linux.ibm.com \
/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®