Received: by 2002:a05:7412:7c14:b0:fa:6e18:a558 with SMTP id ii20csp189410rdb; Mon, 22 Jan 2024 00:27:42 -0800 (PST) X-Google-Smtp-Source: AGHT+IG3fXBHEEA1UB5AxJ/1zBN9FYE5Ga9ZBPsKvmYdU6/FvZlf9N24VK5h3f2fOWhShQQ1cilv X-Received: by 2002:a05:6358:2c86:b0:175:d6b7:b5a9 with SMTP id l6-20020a0563582c8600b00175d6b7b5a9mr2643356rwm.23.1705912061614; Mon, 22 Jan 2024 00:27:41 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1705912061; cv=pass; d=google.com; s=arc-20160816; b=f8R+krDFyBwcaGmNn/MmeVoR3/7RsQ8IBVJ9Op3Jy4/0ElY0+D9/g8OoRDA8e0/ZBj pk9bFXipjTI62piO+2Nxw7a0XvCKRYSAw4oyWuvoch4EVNeJ5+k0oAT+bX3Yvem5h7No LrR0KhZLDzDKW45N4rMFuWPSLMc/eJ7ABJhWmwqYc8pqNMcRcL75+B+GVAQwRRlMnQeI 13uqFKg5DETG/pDBQjKTlJUssu2L5J00IQG1mT7Q/QdYUYlzQYhIc+1ethT0uxU3EoAJ c7Q+1f3mOXudwIjJb6tLrFxXbqoV32+yQGfTY3ZEOf43goEjW+jrxrryhp2VKoXcIpgO MkAg== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=in-reply-to:content-disposition:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:message-id:subject:cc :to:from:date:dkim-signature; bh=mD8xoW3EteGI7cwoVgMbKV/P9Y5ef0r8YpmqBOpfnfE=; fh=7nP4tEpkhmhXroeMhqpXCFdHR4s7yROU9MItQO1u7+4=; b=xda4bcLbU75teruNNwSTYMHXJBVUgzrZoOx8mIcldwvYQ575ry4DQ2AEk32uQAwL74 YYQNz+FskG7PzDIrRlgBED7yKmTBCiesJgUiIg+G23OJv0mwvdanc2NPgsi1nLjP7xwV 27tkh1SoqKq2YilvAhHvCsRa5RvqLyByx6vrCM7PRTtbMoTEDeQDJhwP58T1+cngZZqK b0sFFTwIsODxfT63RrPh13Iqw+7fIdVipZ5l3AvchK0c6jmR7NMgXiJtEBPcE18O8WyT 4t6arp4+V+4RRLhpoySAHYouGQuQYj0LtbMLLO62uwlmdX2vdgDzLo6sJPSOoAAWH0ZE 1ETw== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=VQwxwU+v; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-32492-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-32492-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org. [2604:1380:40f1:3f00::1]) by mx.google.com with ESMTPS id n38-20020a634d66000000b005cec854edacsi7588961pgl.371.2024.01.22.00.27.41 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 22 Jan 2024 00:27:41 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-32492-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) client-ip=2604:1380:40f1:3f00::1; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=VQwxwU+v; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-32492-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-32492-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 sy.mirrors.kernel.org (Postfix) with ESMTPS id BEC06B23396 for ; Mon, 22 Jan 2024 08:09:40 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 5D6341B26D; Mon, 22 Jan 2024 08:09:32 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="VQwxwU+v" 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 8BAF7E555 for ; Mon, 22 Jan 2024 08:09:31 +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=1705910971; cv=none; b=c6dTSenOHn+T+h7Ay9Qc8EnhkeptkO12aVe2FJOUsnxwOZYsg17xwNyjG09oGZC8OH1xaSqJa1y24Aj50wc50/gGXGUbxmTQX0TfaF3YfX/C92UUaofAU76CbuDmHouM3OQSzo2p+yBJ6Uqn7VLj3ewUlm5FT+ZRNEwsHS2So3U= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1705910971; c=relaxed/simple; bh=q6N2S4dWueEuclJ8E7L26oiHyMGXczNOp+gddKDOx9s=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=ibXMeUlB9q2VfVObHNwEZIYh4bIxzcIv6tMPVO49gX30gF7moHxOgufEa30lgNOSKyAO3lxHscyAFilUGKFxG1jT79Imz33hCtbBvuzxIyLefYG/E8z2wiVChr4tPWnMU0+GUHdem9ZOhxD9OblSlFU+W+blo60uYUdQSQXOK7g= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=VQwxwU+v; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id B46ECC433C7; Mon, 22 Jan 2024 08:09:28 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1705910971; bh=q6N2S4dWueEuclJ8E7L26oiHyMGXczNOp+gddKDOx9s=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=VQwxwU+vfDjLbSU1pEELnZbWyhZivnj2YFtITx2Ph6e4lrgAhmLM3Lx/XOolSx8A0 UGT4x+ZtfUkMpKNh2IKRHr1vF4Z7gAy4MvR33XUKHDqP0ZG9RNRteB3xsGvXZbibtr FCpWt715R9JQtZl46kCSTtM1eQH7PjWes2RViD4Hq6FluEN8xLH2Z24qV9yHx97Su1 ujUc5kcb1tu6uwmlgncujoKbRoV/lXICRAKwSeFN6KyD4Um3Jdea9aGfvT6f2/XG8F IXSyV1Pm2UdRGMWIix6bjKYtw/LPZ7FFfqngJ6efMfWFTBFo4JPfi+ucYwceYsAzWA dnUopJWNtWqkA== Date: Mon, 22 Jan 2024 08:09:26 +0000 From: Conor Dooley To: Yunhui Cui Cc: paul.walmsley@sifive.com, palmer@dabbelt.com, aou@eecs.berkeley.edu, conor.dooley@microchip.com, robh@kernel.org, sudeep.holla@arm.com, pierre.gondois@arm.com, suagrfillet@gmail.com, linux-riscv@lists.infradead.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH] RISC-V: cacheinfo: add init_cache_level() Message-ID: <20240122-boxcar-conical-c728a709aa5c@spud> References: <20240122013510.55788-1-cuiyunhui@bytedance.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="s5pIAgEeErdJqyzj" Content-Disposition: inline In-Reply-To: <20240122013510.55788-1-cuiyunhui@bytedance.com> --s5pIAgEeErdJqyzj Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Mon, Jan 22, 2024 at 09:35:10AM +0800, Yunhui Cui wrote: > When cacheinfo_sysfs_init() is executed, the general weak function > init_cache_level() returns -ENOENT, causing failure to add the "cache" > node to /sys/devices/system/cpu/cpux/. Implement the init_cache_level() > function on RISC-V to fix it. If you recall correctly, I asked you to explain how to reproduce this when you sent the patch. Thanks, Conor. >=20 > Signed-off-by: Yunhui Cui > --- > arch/riscv/kernel/cacheinfo.c | 6 ++++++ > 1 file changed, 6 insertions(+) >=20 > diff --git a/arch/riscv/kernel/cacheinfo.c b/arch/riscv/kernel/cacheinfo.c > index 09e9b88110d1..be9169a38bac 100644 > --- a/arch/riscv/kernel/cacheinfo.c > +++ b/arch/riscv/kernel/cacheinfo.c > @@ -71,6 +71,12 @@ static void ci_leaf_init(struct cacheinfo *this_leaf, > this_leaf->type =3D type; > } > =20 > +int init_cache_level(unsigned int cpu) > +{ > + /* The topology has been parsed by acpi or dt, return true. */ > + return 0; > +} > + > int populate_cache_leaves(unsigned int cpu) > { > struct cpu_cacheinfo *this_cpu_ci =3D get_cpu_cacheinfo(cpu); > --=20 > 2.20.1 >=20 >=20 --s5pIAgEeErdJqyzj Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iHUEABYIAB0WIQRh246EGq/8RLhDjO14tDGHoIJi0gUCZa4itgAKCRB4tDGHoIJi 0kJ9AQCc5GLsmpKQsR1KPqMJPZa55KlWp4yEsTQ+aFc/ANtDPQD/U9CecBvAjmFQ vXmJGKkZmi6e0YeekCbYJxQ179WMWAU= =EYgi -----END PGP SIGNATURE----- --s5pIAgEeErdJqyzj--