Received: by 2002:ab2:6857:0:b0:1ef:ffd0:ce49 with SMTP id l23csp2378491lqp; Sun, 24 Mar 2024 16:45:08 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCWkWFklUisEbBrigRB8VO0lOffo3LiTZkaB8Ao4mL6HTuR0XEqbGRW9nQX+crbvBXaqawmZ18PFXm5weLevttsRTST7iMFXJzRMB6gHHw== X-Google-Smtp-Source: AGHT+IGkA+dIaT8WJjdozl7UmcrjMsvJx6pG5fVL1J8jQgyTcLD8oJWQId9tTP0C7+BPCopw766b X-Received: by 2002:a17:906:1ecf:b0:a46:11a9:430 with SMTP id m15-20020a1709061ecf00b00a4611a90430mr3498596ejj.76.1711323907880; Sun, 24 Mar 2024 16:45:07 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1711323907; cv=pass; d=google.com; s=arc-20160816; b=Pl/4bDRsdu+3g6qLnnuTG+7Q5GdflXNZn9cELxlMsuExa+Cl5J0mv5KqpLgxFvVluc FSFIGbZ46iVV+ckP9rCNljdbRxx8kuHseeZPYKwotiTifRCCShRZuIxmYHIw2pXaRtbb lAwNAzlzyE6wrk8+ffhM2D5vvE0tyFBaD2kxeOZoYlbzReNgRFtDxeioX5EiPYLTzav3 WsbSWT67/GNROfUtnqtaQbhVoxBd8F8X2hLMY8rH2FVcKP3KrgXk4AelwB/1BRubnhJW xQ612/5fG+4jZOrcer2++QixVMU5Z9MzuHdGXIdKFpfIPQ7pqVcCfzg6kWa5/MC1MVX+ g9oQ== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:in-reply-to:message-id :date:subject:cc:to:from:dkim-signature; bh=l2APVNWe+h4TgWwnwJaCjVGRHq1NJfQhICvZkWOuD0g=; fh=blZ4wjEUSFuVnUw1m/6liDpiwXa6ebk1LjbpqU+5z0Q=; b=QwYlJPpBd8gbt806gkST9lDX8kNYuuwyulUGlOze0tbiNgpiCE2+9kaRAyC+B7uRuB pPzYojR2ovMuWfedDfCmrQvAwjQzL5C2gxgjCwmfRFPDa87tM9lto9YBAZzcTjGfkEKv 3SUzzN+tJ/Z7bTtxG/7ym4jjp1OySMZPAsJb423PLXetIep8110IGkkhPoc4xGXAyBqs OTQasWioapi2sqh3GLnCLYsK12lJpNHtzAFwtECsUydz1OJrX7YLbeAlzCqpBS84Hor5 3NQowGsdZjec3hVf+g+OMqQyOjhiLXAEQNPTypbGU0Lv0Bz5r6lA22T4x2w3+CY3B9kC C2fw==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=XVFlCH4J; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-113209-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-113209-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [147.75.80.249]) by mx.google.com with ESMTPS id gv9-20020a170906f10900b00a46da73535esi1943730ejb.961.2024.03.24.16.45.07 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 24 Mar 2024 16:45:07 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-113209-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) client-ip=147.75.80.249; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=XVFlCH4J; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-113209-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-113209-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by am.mirrors.kernel.org (Postfix) with ESMTPS id 919BA1F21BB4 for ; Sun, 24 Mar 2024 23:45:07 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 2594F131BAE; Sun, 24 Mar 2024 22:40:12 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="XVFlCH4J" 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 2C1E217E3BE; Sun, 24 Mar 2024 22:40:10 +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=1711320011; cv=none; b=LS5ISOLmWi7oABxEAf6Fk+7eVWqO+JJ7SWkW21JUtm+S95LCLQJy3ET7K4GeU63NJ9ZWm3mwDso0u6NKbuEm8q96YPMHsE/a8bVN4GLvl0Hi++5moK2vJhOgx8JtLce123hXdMBtSoD6Dvz6fBK+lcRB+YJUHBucG9oPxPqr2Gw= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1711320011; c=relaxed/simple; bh=1CZXj3ZSEJhTLO9kDaryueK7/Emi8Jki56hPONpCagg=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=qoXzi2Iy+lMLLC1hPLvVWxyuWfxOiCHWesbPo8qpzo90+0EZc7YhgC0H36tk+Nfnj4zXeQc0nJtbWZhZDW3TKxEZMBR0S92hvJsprJchezhQRkM965KHZzPpJyWFOHvL2n++IE0rKj+3V5tOGP9V9wiu+RfF4fyoO4XSaH4eZVI= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=XVFlCH4J; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id 22C1CC43399; Sun, 24 Mar 2024 22:40:10 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1711320010; bh=1CZXj3ZSEJhTLO9kDaryueK7/Emi8Jki56hPONpCagg=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=XVFlCH4JYFzjCzR8uV83P8aJuqM5HdhIOdDdn59rBK8xyui/rROnN90YErKwvUMZJ EPeORa0bXRBGMFTrDm57Wqzut4OxUQX51dQw0NLf1iZ0a8aq27qKnT7EyVRobd9fJW QRR1yXiidrv4tNI4uvDDJOpR1CgU0v/3BPasfSTOzrg2Vr4Avc4DV+5pa6yP2Rp1az iACtpE8ktKfWDqJScllXdaBFq7Zct3Av0vqp9dbFwmRndO9WMEZk78qEQJSmcaOBR8 sbmR+YW83Fo7YL8vkFLG6ZRpAH0k5+quVZKhspc396S9yXjIxSUHlbdsc1N451WasY qRiDzgLUgaKxw== From: Sasha Levin To: linux-kernel@vger.kernel.org, stable@vger.kernel.org Cc: Heiko Carstens , Sasha Levin Subject: [PATCH 6.8 318/715] s390/cache: prevent rebuild of shared_cpu_list Date: Sun, 24 Mar 2024 18:28:17 -0400 Message-ID: <20240324223455.1342824-319-sashal@kernel.org> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20240324223455.1342824-1-sashal@kernel.org> References: <20240324223455.1342824-1-sashal@kernel.org> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-stable: review X-Patchwork-Hint: Ignore Content-Transfer-Encoding: 8bit From: Heiko Carstens [ Upstream commit cb0cd4ee11142339f2d47eef6db274290b7a482d ] With commit 36bbc5b4ffab ("cacheinfo: Allow early detection and population of cache attributes") the shared cpu list for each cache level higher than L1 is rebuilt even if the list already has been set up. This is caused by the removal of the cpumask_empty() check within cache_shared_cpu_map_setup(). However architectures can enforce that the shared cpu list is not rebuilt by simply setting cpu_map_populated of the per cpu cache info structure to true, which is also the fix for this problem. Before: $ cat /sys/devices/system/cpu/cpu1/cache/index2/shared_cpu_list 0-7 After: $ cat /sys/devices/system/cpu/cpu1/cache/index2/shared_cpu_list 1 Fixes: 36bbc5b4ffab ("cacheinfo: Allow early detection and population of cache attributes") Signed-off-by: Heiko Carstens Signed-off-by: Sasha Levin --- arch/s390/kernel/cache.c | 1 + 1 file changed, 1 insertion(+) diff --git a/arch/s390/kernel/cache.c b/arch/s390/kernel/cache.c index 56254fa06f990..4f26690302209 100644 --- a/arch/s390/kernel/cache.c +++ b/arch/s390/kernel/cache.c @@ -166,5 +166,6 @@ int populate_cache_leaves(unsigned int cpu) ci_leaf_init(this_leaf++, pvt, ctype, level, cpu); } } + this_cpu_ci->cpu_map_populated = true; return 0; } -- 2.43.0