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 F2DC1364EA6; Tue, 16 Dec 2025 12:09:48 +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=1765886989; cv=none; b=Dd2vscWi6XRMqJcHJOxmHE9fKMxnB2Fb2Hc11cp4P/vcqBTlVe9uJjwdEBwnMIZHRzidRi5eFMoljXEobW7rul49zDepLs3xmU4I8A0s44VDZ5gDvm7KVfdDNd9eCYBTq1zUY9cEDM/TFclJNNkvpXE9gmhZx26KlWSdm0hm5o8= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1765886989; c=relaxed/simple; bh=hAr/Vhie2iBdKOMJKKPrqINSB2OKX7OHURsf5KTCqQ4=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=nNxTmfwXeXCSSQb/R2qvsCuTXVOkG3Bl/YuEMPNf+6gIE2WJgsm7Dxm/HfMlpPphhrCUvf68l+RbBEefoPThgEg4bYo7+Amhn8eX0GUU0yr9fOPRkcDugKejFb5VHciqAxMhZ8KtV/eitjhSIAfiXj0bk+nzlo2bcl8WAIEHqRU= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=rZ9WO4O5; 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="rZ9WO4O5" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 5924EC4CEF1; Tue, 16 Dec 2025 12:09:48 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1765886988; bh=hAr/Vhie2iBdKOMJKKPrqINSB2OKX7OHURsf5KTCqQ4=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=rZ9WO4O5A1rsmFtoXJErdiomNogIWtrgoDvEpJsc15SXYJkyLuY4sHDfOrJtMWnbo G115kGWapFr85z4iODHBHfvj8Jvt5cx9WV9A2IyGs5Q6u2Vgy8DnTbj6xOI7dR3/vm qd6vNQxPYk140CLdjQCIaBqEvT/a8pm9rlKPB8dc= 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.18 092/614] s390/smp: Fix fallback CPU detection Date: Tue, 16 Dec 2025 12:07:39 +0100 Message-ID: <20251216111404.653876753@linuxfoundation.org> X-Mailer: git-send-email 2.52.0 In-Reply-To: <20251216111401.280873349@linuxfoundation.org> References: <20251216111401.280873349@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.18-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 da84c0dc6b7e0..70df4ca5d4436 100644 --- a/arch/s390/kernel/smp.c +++ b/arch/s390/kernel/smp.c @@ -697,6 +697,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