Received: by 2002:a25:8b91:0:0:0:0:0 with SMTP id j17csp5403844ybl; Tue, 10 Dec 2019 05:34:57 -0800 (PST) X-Google-Smtp-Source: APXvYqzbgz05KFH9KfMBgZ9im+UB3NVAJN1ZRUlT/oqH5TYLkEGJooIR6LdXGIPm6kgxr0OaLqb8 X-Received: by 2002:aca:d7c6:: with SMTP id o189mr3814121oig.130.1575984897000; Tue, 10 Dec 2019 05:34:57 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1575984896; cv=none; d=google.com; s=arc-20160816; b=ABcVQxL7vwAQHBb8EEOovYxo4rgTLemSJRlZeD9czkohC85/kp45typPqIFlQiVNx0 lFjTonJR8G0O5uRCKLP1jfQAsKn/tk1eau2JxaCKHyGusWaa0bm1yzw5ekUC68UhPTAi 0/scguB2q3FbOI6Ush/D5QmN3bvcboA4e9HTJgs+6gPUqn/s+sfBnQiyGum1xJsQ+jGc HPCSg+kGpYudpFBDHSjbjJ/xApIxVZuD5O9beF+1c70hxx9ufav67PAqz6dWmAnpSKKF yYIpBkoZzdIa3F9Gr/jFmG3FQSVDiGEZFH7k7ZaqmYORG9hCHSsiMsKZfTRn9QV74p9D 1E0Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from; bh=l170l31bnIJpitHvgr8To0qSI+mcKq8AZp2/Y3isHuk=; b=gQvxH+aoy5Zr3avOrM5c4OhL4mUZ7pgdYqB24dEqyd3t8uIvG2zkjAHUzyx/RWuUSz hsIEjMKWgYszKa87VpeugOpoyLocilfO9V/8djj2BnY//lYTU9fzgiti106EAw+D4uf4 7Mo2sSfBkQVp9DchkKrhc4Z468rbBeK8HJILIWuvq1cd1HLPIbXwyrlCgx0w877C1nkV eb3nJUDnVcPaEJZyD0Qf7dX6G9ud83g9f4zejAeipuqnYaVu3l4yZJYLtq7QPyRrhu5T f9ImMRPFqRi+hLW4Kloi7MOgJZflV2jhXziJK3xlyEG/LynqBIb3IGskxqUUL9N0kouP wY+Q== 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 u1si1949241otk.80.2019.12.10.05.34.45; Tue, 10 Dec 2019 05:34:56 -0800 (PST) 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 S1727359AbfLJNdK (ORCPT + 99 others); Tue, 10 Dec 2019 08:33:10 -0500 Received: from mx2.suse.de ([195.135.220.15]:34860 "EHLO mx1.suse.de" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1727159AbfLJNdK (ORCPT ); Tue, 10 Dec 2019 08:33:10 -0500 X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay2.suse.de (unknown [195.135.220.254]) by mx1.suse.de (Postfix) with ESMTP id 2B2D2B1C2; Tue, 10 Dec 2019 13:33:08 +0000 (UTC) From: Thomas Renninger To: Will Deacon Cc: Felix Schnizlein , linux-kernel@vger.kernel.org, gregkh@linuxfoundation.org, Felix Schnizlein , linux-arch@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux@armlinux.org.uk, will.deacon@arm.com, x86@kernel.org Subject: Re: [PATCH 3/3] arm64 cpuinfo: implement sysfs nodes for arm64 Date: Tue, 10 Dec 2019 14:33:07 +0100 Message-ID: <11195456.EmMzWPVPDU@skinner.arch.suse.de> In-Reply-To: <20191209173804.GD7489@willie-the-truck> References: <20191206162421.15050-1-trenn@suse.de> <25032400.G9DUGnJgnc@skinner.arch.suse.de> <20191209173804.GD7489@willie-the-truck> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Monday, December 9, 2019 6:38:05 PM CET Will Deacon wrote: > On Mon, Dec 09, 2019 at 12:28:44PM +0100, Thomas Renninger wrote: > > On Monday, December 9, 2019 11:31:11 AM CET Will Deacon wrote: > > > On Fri, Dec 06, 2019 at 05:24:21PM +0100, Thomas Renninger wrote: > > > > From: Felix Schnizlein > > > > > > > > Export all information from /proc/cpuinfo to sysfs: > > > > implementer, architecture, variant, part, revision, > > > > bogomips and flags are exported. > > > > > > > > Example: > > > > /sys/devices/system/cpu/cpu1/info/:[0]# head * > > > > ... > > > > > > ==> flags <== > > > > fp asimd evtstrm aes pmull sha1 sha2 crc32 cpuid asimdrdm > > > > ... > > > > > I don't understand why we need this on arm64 Again: proc is moving to sys. You probably export feature flags in /proc/cpuinfo for a good reason. So where in sysfs should this show up? > Even if we exposed them via sysfs, existing > software will continue to grep them out of /proc/cpuinfo because it's more > reliable and new software would still be encouraged to use either the HWCAPs > directly or, even better, our CPUID (MRS) emulation. Ok, so /proc/cpuinfo Features: is deprecated on arm64. Is that correct? Then it would indeed not make sense to port it/anything to sys. It is this comment you are referring to: arch/arm64/kernel/cpuinfo.c * Dump out the common processor features in a single line. * Userspace should read the hwcaps with getauxval(AT_HWCAP) * rather than attempting to parse this, but there's a body of * software which does already (at least for 32-bit). Then let's shorten this. Sorry for keep digging/asking. Felix made this up rather neat, so that other archs can implement to expose sysfs CPU info easy and consistent. While x86 also ported parts of cpuinfo, e.g. microcode version, most general info is still missing in sysfs. If I find the time, I may check for other archs like ppc64le or s390x to find data which still should show up in sysfs and could then be put in the same directory/file structure. ARM people may still want to make use of this at some point of time, if appropriate. I'll drop patch 3/3. Thanks for explaining me the ARM details, Thomas