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 C6AC12C0F83; Thu, 15 Jan 2026 17:41:44 +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=1768498904; cv=none; b=vDz7RqRz2aWRwz4fNUd2qNKCx4SeIckpMyM94VRg27TVMw3q30YSeYOBbmMqr71iGU25iXdbNuaSxbv/VIrRT6xOa8O12JsG65hCv9qmdfjtftEhX14774xDsxz/ygBdB3phY5IsMaHp9nXuX/+wsWbwGlA1o/mc9SgMqx1wqQg= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1768498904; c=relaxed/simple; bh=fsYfpPAP3SteP2jjhrn/47NXIT8lEhaYGHdVhoTHx2s=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=RC+f9jIQHOr1430UKQFfNzFZvzpboA2AA39xhxkE3TMM7fqf2OAsj8Y7AzroHSUQsivi/tHXSkWmNkG+7gBlzQyN+Tp9VpU07bSaQUdBXH5LvTCHy7LzcFL2WgSU7eEYvnOQP+wowsm+a/fAqz8i4rlVttqNxc1HRVY+qyl6/eE= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=Fh61QXIK; 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="Fh61QXIK" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 51A6EC19425; Thu, 15 Jan 2026 17:41:44 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1768498904; bh=fsYfpPAP3SteP2jjhrn/47NXIT8lEhaYGHdVhoTHx2s=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=Fh61QXIKwmM5YjASQH/t/IhFQ0XjsIq4CImL4SaceedNmsXpEfs+cZAEbiDYNXkhT 5x1nbCMmewihcDdxsf/+WJhpXKmFkEU5ATKkaOIsqJkmXEqKN+kngSFQuoflZvWO8A QbwkFkw8R4mehPPuZe5x5F4MfBM1GYktcFJTpNyM= 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 5.10 039/451] s390/smp: Fix fallback CPU detection Date: Thu, 15 Jan 2026 17:44:00 +0100 Message-ID: <20260115164232.306669384@linuxfoundation.org> X-Mailer: git-send-email 2.52.0 In-Reply-To: <20260115164230.864985076@linuxfoundation.org> References: <20260115164230.864985076@linuxfoundation.org> User-Agent: quilt/0.69 X-stable: review X-Patchwork-Hint: ignore Precedence: bulk X-Mailing-List: stable@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 5.10-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 2e0c3b0a5a58a..253774d155a1f 100644 --- a/arch/s390/kernel/smp.c +++ b/arch/s390/kernel/smp.c @@ -732,6 +732,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