From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from frasgout.his.huawei.com (frasgout.his.huawei.com [185.176.79.56]) (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 B691334DB47; Tue, 18 Nov 2025 15:32:54 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=185.176.79.56 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1763479977; cv=none; b=b5hAAeG+OaAoJcdCDQxc9ZZKx34XfBUqoIVTcM5yniMv/muzEHNFEmL6RSQ7E+7PLtcLESIGWfBeCYHsOHRjoG6yGvk6shbq62WnHDTCYJJCi/fYb2hijYcdz4eM15hVFNKWP76OiFhuH/ZhOuKVC2s+cQqvzwdCS/qXYzJRye4= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1763479977; c=relaxed/simple; bh=8mY7pkaIljckbRv1AqZvpt4oijnWbRlYQoDQJdHratA=; h=Date:From:To:CC:Subject:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=YunUznKxGosQW7vrzBCl0DkIbWVQaAEyPSfsNlLVnsCRMW3Bek/JMibEs2H+xFHGShFan43LNRX5dm73YKy9eEvzFWK0F/N5wWkOBJttOniU68+JO+3/eNlWyHPGqi4Ez5anBNkPbaeUU+IIpuMx8C0Icu7xDN95pe84T9puFHo= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=huawei.com; spf=pass smtp.mailfrom=huawei.com; arc=none smtp.client-ip=185.176.79.56 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=huawei.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=huawei.com Received: from mail.maildlp.com (unknown [172.18.186.31]) by frasgout.his.huawei.com (SkyGuard) with ESMTPS id 4d9pWm28jfzHnGd0; Tue, 18 Nov 2025 23:32:20 +0800 (CST) Received: from dubpeml100005.china.huawei.com (unknown [7.214.146.113]) by mail.maildlp.com (Postfix) with ESMTPS id 552F01400DC; Tue, 18 Nov 2025 23:32:51 +0800 (CST) Received: from localhost (10.126.168.5) by dubpeml100005.china.huawei.com (7.214.146.113) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.1544.36; Tue, 18 Nov 2025 15:32:49 +0000 Date: Tue, 18 Nov 2025 15:32:48 +0000 From: Jonathan Cameron To: Ben Horgan CC: , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , Shaopeng Tan , Zeng Heng Subject: Re: [PATCH v5 04/34] ACPI / PPTT: Find cache level by cache-id Message-ID: <20251118153248.0000558a@huawei.com> In-Reply-To: <20251117170014.4113754-5-ben.horgan@arm.com> References: <20251117170014.4113754-1-ben.horgan@arm.com> <20251117170014.4113754-5-ben.horgan@arm.com> X-Mailer: Claws Mail 4.3.0 (GTK 3.24.42; x86_64-w64-mingw32) Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset="US-ASCII" Content-Transfer-Encoding: 7bit X-ClientProxiedBy: lhrpeml500010.china.huawei.com (7.191.174.240) To dubpeml100005.china.huawei.com (7.214.146.113) On Mon, 17 Nov 2025 16:59:43 +0000 Ben Horgan wrote: > From: James Morse > > The MPAM table identifies caches by id. The MPAM driver also wants to know > the cache level to determine if the platform is of the shape that can be > managed via resctrl. Cacheinfo has this information, but only for CPUs that > are online. > > Waiting for all CPUs to come online is a problem for platforms where > CPUs are brought online late by user-space. > > Add a helper that walks every possible cache, until it finds the one > identified by cache-id, then return the level. > > Signed-off-by: James Morse > Signed-off-by: Ben Horgan > Reviewed-by: Gavin Shan > Reviewed-by: Fenghua Yu > Tested-by: Fenghua Yu > Tested-by: Shaopeng Tan > Tested-by: Carl Worth > Tested-by: Gavin Shan > Tested-by: Zeng Heng Reviewed-by: Jonathan Cameron