From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id DF92C341069; Tue, 16 Dec 2025 11:22:13 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1765884134; cv=none; b=Ltv5gBNFnS2vgPSfF81cGdbvggzvMb6TqiD148gP8TAVjvdCABt83lzQbQPfDNZXMzv9p2xKP2lTCYfrC3Oaam85tK2ve14qEt92tCKaGZTorgK8F/jpfkEKcBpgphodGPW45ltkBVyRx3kYwJKdVooSvYlDIfVm3RJYbCfGwVk= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1765884134; c=relaxed/simple; bh=DZwnqcNt6jhb7lptX6qxfSAQbjxfixpbIsaIc97RToA=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=QdelH4KsqLJDg+ZuBS4Y+dkZN26LBzge5qJGnLp0vyNZE7WxnLJaHKEi4Qhk3/uWuwZqQOHJ8P3P68y0wmUx0OY6EDG7KXr9sQ2mMrulFdl2fqRgehlUe8XcxizI8V82bmYeQSlEaqmbCxM/2VctdNkw6kofiiUSeEpjQdLIfaM= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=dm4wfKEy; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b="dm4wfKEy" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 5B2AFC4CEF1; Tue, 16 Dec 2025 11:22:13 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1765884133; bh=DZwnqcNt6jhb7lptX6qxfSAQbjxfixpbIsaIc97RToA=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=dm4wfKEy7sye1DVCCG9PCG9kVUGeZPIAqdVU9pjs3mVVaP19QeoSguHe0iejnABe6 J2N2G9/mLMprzQsz+nBWoBfQl/e+WDaqoWtYd4cWX7vTA9uUsRqciWH+6FP6PNpHgX A8/GU6s7g8Kl9gjT2TKA4hS5dotJ1UHJpmA27sTg= From: Greg Kroah-Hartman To: stable@vger.kernel.org Cc: Greg Kroah-Hartman , patches@lists.linux.dev, Alexander Egorenkov , Mete Durlu , Heiko Carstens , Sasha Levin Subject: [PATCH 6.12 068/354] s390/smp: Fix fallback CPU detection Date: Tue, 16 Dec 2025 12:10:35 +0100 Message-ID: <20251216111323.389604910@linuxfoundation.org> X-Mailer: git-send-email 2.52.0 In-Reply-To: <20251216111320.896758933@linuxfoundation.org> References: <20251216111320.896758933@linuxfoundation.org> User-Agent: quilt/0.69 X-stable: review X-Patchwork-Hint: ignore Precedence: bulk X-Mailing-List: patches@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 6.12-stable review patch. If anyone has any objections, please let me know. ------------------ From: Heiko Carstens [ Upstream commit 07a75d08cfa1b883a6e1256666e5f0617ee99231 ] In case SCLP CPU detection does not work a fallback mechanism using SIGP is in place. Since a cleanup this does not work correctly anymore: new CPUs are only considered if their type matches the boot CPU. Before the cleanup the information if a CPU type should be considered was also part of a structure generated by the fallback mechanism and indicated that a CPU type should not be considered when adding CPUs. Since the rework a global SCLP state is used instead. If the global SCLP state indicates that the CPU type should be considered and the fallback mechanism is used, there may be a mismatch with CPU types if CPUs are added. This can lead to a system with only a single CPU even tough there are many more CPUs. Address this by simply copying the boot cpu type into the generated data structure from the fallback mechanism. Reported-by: Alexander Egorenkov Fixes: d08d94306e90 ("s390/smp: cleanup core vs. cpu in the SCLP interface") Reviewed-by: Mete Durlu Signed-off-by: Heiko Carstens Signed-off-by: Sasha Levin --- arch/s390/kernel/smp.c | 1 + 1 file changed, 1 insertion(+) diff --git a/arch/s390/kernel/smp.c b/arch/s390/kernel/smp.c index 4df56fdb24880..b976f603dddcd 100644 --- a/arch/s390/kernel/smp.c +++ b/arch/s390/kernel/smp.c @@ -710,6 +710,7 @@ static void __ref smp_get_core_info(struct sclp_core_info *info, int early) continue; info->core[info->configured].core_id = address >> smp_cpu_mt_shift; + info->core[info->configured].type = boot_core_type; info->configured++; } info->combined = info->configured; -- 2.51.0