Received: by 2002:a05:7412:5112:b0:fa:6e18:a558 with SMTP id fm18csp19990rdb; Mon, 22 Jan 2024 10:31:00 -0800 (PST) X-Google-Smtp-Source: AGHT+IF4VKa0/q1sNaEJAw2cVpWx6yGmrsMvbeGaQBasgNpd/tap+hu4M3wFIvkxpXfAZ4Z0/TWj X-Received: by 2002:a05:6e02:e4e:b0:361:a7ff:f569 with SMTP id l14-20020a056e020e4e00b00361a7fff569mr5977061ilk.7.1705948259828; Mon, 22 Jan 2024 10:30:59 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1705948259; cv=pass; d=google.com; s=arc-20160816; b=FwnXac6NqGdHhYC5g2Egb3eQt84ST8JfqqgSt8byvwl80Ei+MuVb4UA4bf5MVvsID7 Afb8jCfj+J39Eg75iZoI/yWL1HIHSEW9UXP7kgKIz0okGg80i7/dDNhETChnZnI915BZ bB0iO4aarEeshVwkKfTBwiMwHUy8zlWGiETgk8JtBjkDRCtRDYhU2pZ6U9WDsJnIJIoE 1pSAZkkhUUiBSPyQOX/PTgC+1vNQbuhJz5ZnXroi5YparXqgNnlBug2ZWtz6nFyO0Apf gatrs1G3I4eN9x3BG8QrnfI2IHU2Qi2Wv5zxVbgJEc+u5LNI9QSFGsIXV4IEk697WpBR 5GeA== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=in-reply-to:content-transfer-encoding:content-disposition :mime-version:list-unsubscribe:list-subscribe:list-id:precedence :references:message-id:subject:cc:to:from:date; bh=ia9gAaID9AGA33v2lROeSZcwXPHi/OoH9QFRPb8XpHE=; fh=7WrU/8Pw+P0HEhilvdFuE5Rn1JiM1HPtz2utmirivnY=; b=O/VjJ7yyje6FA1xpxzj+7YvYdJUVuGZvAVF68V8Xc9QUYN1b3ZVO7KCJy7cAM1HuCA 5rwGJ5Ddk9Ps0BePK67PSJEeyOEjgF/+dQrwqToVVi3wAhtIR5uDIrTZ2PIjd8zv+amV gEHogk3YPb0niZBo1fiL++rFl1+9y+KvxL5IT1+yaz++BYMPvjASAVkf8FaDBbmKxP+q 0hx02IKIJpmvr4g4vzMAwlnm59D5GjlnDxki+Wwlv0kmslxqMxUIMIHHcKlOxF4Vz7Db B++sMvkr7/7DbygzY294MwVGsJgiCPerqV58bPgxfs8NdCznahaB9datGRA9bW2ESQRW kNvg== ARC-Authentication-Results: i=2; mx.google.com; arc=pass (i=1 spf=pass spfdomain=arm.com dmarc=pass fromdomain=arm.com); spf=pass (google.com: domain of linux-kernel+bounces-33740-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-33740-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=arm.com Return-Path: Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org. [2604:1380:40f1:3f00::1]) by mx.google.com with ESMTPS id d123-20020a633681000000b005b896ecd1efsi8238599pga.172.2024.01.22.10.30.59 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 22 Jan 2024 10:30:59 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-33740-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; arc=pass (i=1 spf=pass spfdomain=arm.com dmarc=pass fromdomain=arm.com); spf=pass (google.com: domain of linux-kernel+bounces-33740-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-33740-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=arm.com 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 BDB10B2E2C2 for ; Mon, 22 Jan 2024 17:43:06 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id DC4F147F78; Mon, 22 Jan 2024 17:03:02 +0000 (UTC) Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 6EFE13CF75 for ; Mon, 22 Jan 2024 17:03:00 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=217.140.110.172 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1705942982; cv=none; b=FrgLhcwEsUQTQ42xNy/a7gq7grURblcU2coVo/0MlpEo8DughTv2EHD1L/l4gYd0qY0Ch7CchCMICb3334WbAfEse0fufAxmZONL690mPZ9DEN4vZrprUjOcz/XvfIJyTh5/1Q0CeiPh6sp0oBVQ+cd66rbZskDYN6A2s/eQ3Vg= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1705942982; c=relaxed/simple; bh=VU0ItME50ybDzXwR3CBIHMkFjO4Bnlzrbk3pCd4K1so=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=RMNXuLMiVLFcdR9U0xyJeivnEeSgCuL1tT6/rcDGTnls2GGwnE2hfQAUTOm0VYo1DnGBasv2zPaCB0yfB96kJNcbqUNX0KkcmRJHAETKUf2ZPtlABJZRHraGhiomSoVPi2qZgtw++HAao2zyWHhZJD18W5gIjy2Ca2qNbCI769Q= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=arm.com; spf=pass smtp.mailfrom=arm.com; arc=none smtp.client-ip=217.140.110.172 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=arm.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=arm.com Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id B6BF81FB; Mon, 22 Jan 2024 09:03:45 -0800 (PST) Received: from bogus (e103737-lin.cambridge.arm.com [10.1.197.49]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 1CE1A3F5A1; Mon, 22 Jan 2024 09:02:58 -0800 (PST) Date: Mon, 22 Jan 2024 17:02:55 +0000 From: Sudeep Holla To: yunhui cui Cc: Conor Dooley , paul.walmsley@sifive.com, palmer@dabbelt.com, aou@eecs.berkeley.edu, conor.dooley@microchip.com, robh@kernel.org, pierre.gondois@arm.com, suagrfillet@gmail.com, linux-riscv@lists.infradead.org, Sudeep Holla , linux-kernel@vger.kernel.org Subject: Re: [External] Re: [PATCH] RISC-V: cacheinfo: add init_cache_level() Message-ID: References: <20240122013510.55788-1-cuiyunhui@bytedance.com> <20240122-boxcar-conical-c728a709aa5c@spud> <20240122-jawline-handling-e190c90ddcfc@spud> 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=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: On Mon, Jan 22, 2024 at 06:57:49PM +0800, yunhui cui wrote: > Hi Conor, > > On Mon, Jan 22, 2024 at 4:55 PM Conor Dooley wrote: > > > > On Mon, Jan 22, 2024 at 04:32:15PM +0800, yunhui cui wrote: > > > Hi Conor, > > > > > > On Mon, Jan 22, 2024 at 4:09 PM Conor Dooley wrote: > > > > > > > > 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. > > > > > > In fact, the reason has been explained in the commit log. As for how > > > to reproduce it, you can check whether there is a "cache" node in > > > /sys/devices/system/cpu/cpux/ on the riscv platform. > > > > That's the thing - I tried to reproduce this several times and either: > > a) The system had cache information in DT and the directory was > > created. If I hot unplugged and re-plugged the directory was > > re-created. > > b) The system had no cache information in DT and the directory was never > > created. > > Indeed, I verified it again, it’s because there is no cache node in > dts, thank you for reminding me. > That's good. I wasn't able to figure out why the issue could occur without issues in DT/ACPI. -- Regards, Sudeep