Received: by 2002:ac0:a582:0:0:0:0:0 with SMTP id m2-v6csp1135498imm; Thu, 4 Oct 2018 08:42:11 -0700 (PDT) X-Google-Smtp-Source: ACcGV630qthbF1R5EnASKv3F61mo9iTuThwfwLiZdw+dLCes9GFBtWOIRbLgsy/40jWugxbbUJ05 X-Received: by 2002:a63:7c1d:: with SMTP id x29-v6mr6176950pgc.273.1538667731544; Thu, 04 Oct 2018 08:42:11 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1538667731; cv=none; d=google.com; s=arc-20160816; b=MKKblHrv+q2kMLEjjO2QPnHDjOXUWV4iGpwYNr0O6G0+S9fTSFNuFU4AXA9zMcy6GY gSmq1LCM6GLVAexei+HSpvg5RFRdotTuizR352tpLqDi3wEUTkakk5wTNN81mu3MK6KG +FIDI0WCEuDXFmtE02lmLBNZKCKR7WDoTK7LPVBxywIu6y2/epYElZdW0h61Ffz02uRy e9G5LiRryVtgj6ao0S759C2I7GMa7v9UyV5BGtM6tHsIVbfim2icBBi5hL5Xxe8Rnidl KkSrlNwPgADAikIulBt3EnDrGsqW2UCghFUlrFfoRrSVDSToF4niC/pjDgQEOu4SikND WM/g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date; bh=HjLvDF7hHnW97jpbI8+oFP4855kEycaNsOsOpHDEohk=; b=BLqEq/domO4haQR7fisBLX+NdlFOgiJFRaCu1csWm3tCeBxLTe47TC42XaJi8wHtuI qKd0RUnWbYf3LBZctr+Cs/jRZ8YWbwn8dJfrr7Mvh0R0CffM6Y4p6y69R0GY5LWB/11g FG+vs0LJsSUmRU5GX4xcHfCZw1hNYY6e2VYPipctFaX3CwqzpApbpycqbrrVH5W72duP cU0HlEEc8dzILsutRCC2I62nDc2iY6GKOPSkWWGIYrHc/dG6td+L4L9QDNpP1DMVc0IB Icr81QLcPItg8dKdULgE0pQ+Uu+e6Hts7DtmPGHLCoPp9FjGbhrKm18xMV8YUQM71xmD YOfA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id s3-v6si1969490plb.194.2018.10.04.08.41.56; Thu, 04 Oct 2018 08:42:11 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727942AbeJDWfa (ORCPT + 99 others); Thu, 4 Oct 2018 18:35:30 -0400 Received: from mail.linuxfoundation.org ([140.211.169.12]:51474 "EHLO mail.linuxfoundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727557AbeJDWfa (ORCPT ); Thu, 4 Oct 2018 18:35:30 -0400 Received: from localhost (unknown [104.132.1.111]) by mail.linuxfoundation.org (Postfix) with ESMTPSA id E5FBB481; Thu, 4 Oct 2018 15:41:40 +0000 (UTC) Date: Thu, 4 Oct 2018 08:41:39 -0700 From: Greg KH To: Jeffrey Hugo Cc: sudeep.holla@arm.com, rjw@rjwysocki.net, linux-acpi@vger.kernel.org, jeremy.linton@arm.com, linux-kernel@vger.kernel.org, vkilari@codeaurora.org Subject: Re: [PATCH v4 1/2] drivers: base: cacheinfo: Do not populate sysfs for unknown cache types Message-ID: <20181004154139.GA6921@kroah.com> References: <1538666406-7504-1-git-send-email-jhugo@codeaurora.org> <1538666406-7504-2-git-send-email-jhugo@codeaurora.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1538666406-7504-2-git-send-email-jhugo@codeaurora.org> User-Agent: Mutt/1.10.1 (2018-07-13) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Oct 04, 2018 at 09:20:05AM -0600, Jeffrey Hugo wrote: > If a cache has an unknown type because neither the hardware nor the > firmware told us, an entry in the sysfs tree will be made, but the type > file will not be present. lscpu depends on the type file being present > for every entry, and will error out without printing system information > if lscpu cannot open the type file. > > Presenting information about a cache without indicating its type is not > useful, therefore if we hit a cache with an unknown type, stop populating > sysfs so that userspace has the maximum amount of useful information. > > This addresses the following lscpu error, which prevents any output. > lscpu: cannot open /sys/devices/system/cpu/cpu0/cache/index3/type: No such > file or directory > > Suggested-by: Sudeep Holla > Signed-off-by: Jeffrey Hugo > Reviewed-by: Jeremy Linton > Reviewed-by: Sudeep Holla > --- > drivers/base/cacheinfo.c | 2 ++ > 1 file changed, 2 insertions(+) Acked-by: Greg Kroah-Hartman