From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-9.8 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH,MAILING_LIST_MULTI,SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS, USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id D5DCDC43603 for ; Fri, 6 Dec 2019 16:24:49 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id A94942466E for ; Fri, 6 Dec 2019 16:24:49 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726506AbfLFQYp (ORCPT ); Fri, 6 Dec 2019 11:24:45 -0500 Received: from mx2.suse.de ([195.135.220.15]:41976 "EHLO mx1.suse.de" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1726336AbfLFQYi (ORCPT ); Fri, 6 Dec 2019 11:24:38 -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 A57EBB1AA; Fri, 6 Dec 2019 16:24:35 +0000 (UTC) From: Thomas Renninger To: linux-kernel@vger.kernel.org Cc: 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, trenn@suse.de, fschnitzlein@suse.de, Felix Schnizlein , Thomas Renninger Subject: [PATCH 2/3] x86 cpuinfo: implement sysfs nodes for x86 Date: Fri, 6 Dec 2019 17:24:20 +0100 Message-Id: <20191206162421.15050-3-trenn@suse.de> X-Mailer: git-send-email 2.23.0 In-Reply-To: <20191206162421.15050-1-trenn@suse.de> References: <20191206162421.15050-1-trenn@suse.de> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Felix Schnizlein Enable sysfs cpuinfo for x86 based cpus. Export often used cpu information to sysfs: stepping, flags, bugs, bogomips, family, vendor_id, model, and model_name are exported. Sysfs documentation is updated to reflect changes. Example (on a kvm instance running no an intel cpu): /sys/devices/system/cpu/cpu1/info/:[0]# head * ==> bogomips <== 5187.72 ==> bugs <== cpu_meltdown spectre_v1 spectre_v2 spec_store_bypass l1tf mds swapgs itlb_multihit ==> cpu_family <== 6 ==> flags <== fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush mmx fxsr sse sse2 ss syscall nx pdpe1gb rdtscp lm constant_tsc rep_good nopl xtopology cpuid tsc_known_freq pni pclmulqdq ssse3 fma cx16 pcid sse4_1 sse4_2 x2apic movbe popcnt tsc_deadline_timer aes xsave avx f16c rdrand hypervisor lahf_lm abm cpuid_fault invpcid_single pti ssbd ibrs ibpb fsgsbase tsc_adjust bmi1 avx2 smep bmi2 erms invpcid xsaveopt arat umip ==> model <== 60 ==> model_name <== Intel Core Processor (Haswell, no TSX, IBRS) ==> stepping <== 1 ==> vendor_id <== GenuineIntel Signed-off-by: Felix Schnizlein Signed-off-by: Thomas Renninger --- Documentation/ABI/testing/sysfs-devices-system-cpu | 23 +++++ arch/x86/Kconfig | 1 + arch/x86/kernel/Makefile | 2 + arch/x86/kernel/cpuinfo.c | 99 ++++++++++++++++++++++ 4 files changed, 125 insertions(+) create mode 100644 arch/x86/kernel/cpuinfo.c diff --git a/Documentation/ABI/testing/sysfs-devices-system-cpu b/Documentation/ABI/testing/sysfs-devices-system-cpu index 84c324773b36..791390ab66d5 100644 --- a/Documentation/ABI/testing/sysfs-devices-system-cpu +++ b/Documentation/ABI/testing/sysfs-devices-system-cpu @@ -581,3 +581,26 @@ Contact: Linux kernel mailing list Description: Various information about the online cpu. Which attributes are available depends on the architecture, kernel configuration and cpu model. + +What: /sys/devices/system/cpu/cpu#/info/ + /sys/devices/system/cpu/cpu#/info/vendor_id + /sys/devices/system/cpu/cpu#/info/cpu_family + /sys/devices/system/cpu/cpu#/info/model + /sys/devices/system/cpu/cpu#/info/model_name + /sys/devices/system/cpu/cpu#/info/stepping + /sys/devices/system/cpu/cpu#/info/flags + /sys/devices/system/cpu/cpu#/info/bugs + /sys/devices/system/cpu/cpu#/info/bogomips +Date: June 2017 +Contact: Linux kernel mailing list +Description: Expose information about x86 cpu information. + + vendor_id, + cpu_family, + model, + model_name, + stepping: Cpu identification depending on each vendor + + flags: Extended capabilities supported by the cpu + bugs: Known bugs by cpu + bogomips: calculated bogomips diff --git a/arch/x86/Kconfig b/arch/x86/Kconfig index 8529a9dbd5ca..29fadd69d541 100644 --- a/arch/x86/Kconfig +++ b/arch/x86/Kconfig @@ -154,6 +154,7 @@ config X86 select HAVE_CMPXCHG_LOCAL select HAVE_CONTEXT_TRACKING if X86_64 select HAVE_COPY_THREAD_TLS + select HAVE_CPUINFO_SYSFS if SYSFS select HAVE_C_RECORDMCOUNT select HAVE_DEBUG_KMEMLEAK select HAVE_DMA_CONTIGUOUS diff --git a/arch/x86/kernel/Makefile b/arch/x86/kernel/Makefile index ccb13271895d..ccf1a338bc37 100644 --- a/arch/x86/kernel/Makefile +++ b/arch/x86/kernel/Makefile @@ -146,6 +146,8 @@ obj-$(CONFIG_UNWINDER_ORC) += unwind_orc.o obj-$(CONFIG_UNWINDER_FRAME_POINTER) += unwind_frame.o obj-$(CONFIG_UNWINDER_GUESS) += unwind_guess.o +obj-$(CONFIG_CPUINFO_SYSFS) += cpuinfo.o + ### # 64 bit specific files ifeq ($(CONFIG_X86_64),y) diff --git a/arch/x86/kernel/cpuinfo.c b/arch/x86/kernel/cpuinfo.c new file mode 100644 index 000000000000..3b772faf9f5f --- /dev/null +++ b/arch/x86/kernel/cpuinfo.c @@ -0,0 +1,99 @@ +/* + * Copyright (C) 2017 SUSE Linux GmbH + * Written by: Felix Schnizlein + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License version + * 2 as published by the Free Software Foundation. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + */ + +#include +#include +#include +#include + +static ssize_t cpuinfo_stepping(unsigned int c, char *buf) +{ + if (cpu_data(c).x86_stepping || cpu_data(c).cpuid_level >= 0) + return sprintf(buf, "%d\n", cpu_data(c).x86_stepping); + return sprintf(buf, "unknown\n"); +} + +static ssize_t cpuinfo_flags(unsigned int c, char *buf) +{ + struct cpuinfo_x86 *cpu = &cpu_data(c); + unsigned int i; + ssize_t len = 0; + + for (i = 0; i < (32 * NCAPINTS); i++) { + if (cpu_has(cpu, i) && x86_cap_flags[i] != NULL) + len += sprintf(buf+len, len == 0 ? "%s" : " %s", + x86_cap_flags[i]); + } + if (!len) + return 0; + return len + sprintf(buf+len, "\n"); +} + +static ssize_t cpuinfo_bugs(unsigned int c, char *buf) +{ + struct cpuinfo_x86 *cpu = &cpu_data(c); + unsigned int i; + ssize_t len = 0; + + for (i = 0; i < 32*NBUGINTS; i++) { + unsigned int bug_bit = 32*NCAPINTS + i; + + if (cpu_has_bug(cpu, bug_bit) && x86_bug_flags[i]) + len += sprintf(buf+len, len == 0 ? "%s" : " %s", + x86_bug_flags[i]); + } + if (!len) + return 0; + return len + sprintf(buf+len, "\n"); +} + +static ssize_t cpuinfo_bogomips(unsigned int c, char *buf) +{ + struct cpuinfo_x86 cpu = cpu_data(c); + + return sprintf(buf, "%lu.%02lu\n", cpu.loops_per_jiffy / (500000 / HZ), + (cpu.loops_per_jiffy / (5000 / HZ)) % 100); +} + +#define cpuinfo_cpu_family(cpu) cpu_data(cpu).x86 +#define cpuinfo_model(cpu) cpu_data(cpu).x86_model + +#define cpuinfo_vendor_id(cpu) cpu_data(cpu).x86_vendor_id[0] ?\ + cpu_data(cpu).x86_vendor_id : "unknown" + +#define cpuinfo_model_name(cpu) cpu_data(cpu).x86_model_id[0] ? \ + cpu_data(cpu).x86_model_id : "unknown" + +CPUINFO_DEFINE_ATTR(cpu_family, "%d"); +CPUINFO_DEFINE_ATTR(model, "%u"); +CPUINFO_DEFINE_ATTR(vendor_id, "%s"); +CPUINFO_DEFINE_ATTR(model_name, "%s"); + +CPUINFO_DEFINE_ATTR_FUNC(stepping); +CPUINFO_DEFINE_ATTR_FUNC(flags); +CPUINFO_DEFINE_ATTR_FUNC(bugs); +CPUINFO_DEFINE_ATTR_FUNC(bogomips); + +struct attribute *cpuinfo_attrs[] = { + CPUINFO_ATTR(vendor_id), + CPUINFO_ATTR(cpu_family), + CPUINFO_ATTR(model), + CPUINFO_ATTR(model_name), + CPUINFO_ATTR(stepping), + CPUINFO_ATTR(flags), + CPUINFO_ATTR(bugs), + CPUINFO_ATTR(bogomips), + NULL +}; -- 2.16.4 From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-9.8 required=3.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI, SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS,USER_AGENT_GIT autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 32E64C3F68F for ; Fri, 6 Dec 2019 16:24:58 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id F0BD72464E for ; Fri, 6 Dec 2019 16:24:57 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="k8Gowr0F" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org F0BD72464E Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=suse.de Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+infradead-linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=85eU0xxPSxJfmXzdSRdStVb1VFXcqj4FOIoU94WvpYo=; b=k8Gowr0FTHzFRa 8IkXjul+jE411Wy+vd0RFbDpQn61S2uBVS5tYKOB/hxgT0dwP7KWZ0t8xtjkKSfO+xNpsRKNJ35IH p0/HAWvKJMK6rJj04+dIU9JzMvNRMWVmwWdCMeMQoovrkrPh5pRWUvqxnZEQ6G8tCr4bbWkbAvT8Z lcjp6lbqSl4pS/gHkhsLdoMJ7ZmWs75DaI338wegqF9BWlLNIQHjgzhR6X5ss24BCmgvjwQY/umC1 dKTmWVKCGA8+bcmy2PoEFAoPSTha2RHBdcsuLzYCc0lVYL2Z65N8YqBCKB+HJPdtN4mCYr7Q/v19M ER6NpAc+UMuBNaf4XfMw==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1idGPU-0003ZD-N3; Fri, 06 Dec 2019 16:24:52 +0000 Received: from mx2.suse.de ([195.135.220.15] helo=mx1.suse.de) by bombadil.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1idGPG-0003Nb-VN for linux-arm-kernel@lists.infradead.org; Fri, 06 Dec 2019 16:24:40 +0000 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 A57EBB1AA; Fri, 6 Dec 2019 16:24:35 +0000 (UTC) From: Thomas Renninger To: linux-kernel@vger.kernel.org Subject: [PATCH 2/3] x86 cpuinfo: implement sysfs nodes for x86 Date: Fri, 6 Dec 2019 17:24:20 +0100 Message-Id: <20191206162421.15050-3-trenn@suse.de> X-Mailer: git-send-email 2.23.0 In-Reply-To: <20191206162421.15050-1-trenn@suse.de> References: <20191206162421.15050-1-trenn@suse.de> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20191206_082439_304133_FF7DC761 X-CRM114-Status: GOOD ( 17.47 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: linux-arch@vger.kernel.org, Felix Schnizlein , Felix Schnizlein , gregkh@linuxfoundation.org, x86@kernel.org, will.deacon@arm.com, linux@armlinux.org.uk, Thomas Renninger , fschnitzlein@suse.de, trenn@suse.de, linux-arm-kernel@lists.infradead.org Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+infradead-linux-arm-kernel=archiver.kernel.org@lists.infradead.org From: Felix Schnizlein Enable sysfs cpuinfo for x86 based cpus. Export often used cpu information to sysfs: stepping, flags, bugs, bogomips, family, vendor_id, model, and model_name are exported. Sysfs documentation is updated to reflect changes. Example (on a kvm instance running no an intel cpu): /sys/devices/system/cpu/cpu1/info/:[0]# head * ==> bogomips <== 5187.72 ==> bugs <== cpu_meltdown spectre_v1 spectre_v2 spec_store_bypass l1tf mds swapgs itlb_multihit ==> cpu_family <== 6 ==> flags <== fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush mmx fxsr sse sse2 ss syscall nx pdpe1gb rdtscp lm constant_tsc rep_good nopl xtopology cpuid tsc_known_freq pni pclmulqdq ssse3 fma cx16 pcid sse4_1 sse4_2 x2apic movbe popcnt tsc_deadline_timer aes xsave avx f16c rdrand hypervisor lahf_lm abm cpuid_fault invpcid_single pti ssbd ibrs ibpb fsgsbase tsc_adjust bmi1 avx2 smep bmi2 erms invpcid xsaveopt arat umip ==> model <== 60 ==> model_name <== Intel Core Processor (Haswell, no TSX, IBRS) ==> stepping <== 1 ==> vendor_id <== GenuineIntel Signed-off-by: Felix Schnizlein Signed-off-by: Thomas Renninger --- Documentation/ABI/testing/sysfs-devices-system-cpu | 23 +++++ arch/x86/Kconfig | 1 + arch/x86/kernel/Makefile | 2 + arch/x86/kernel/cpuinfo.c | 99 ++++++++++++++++++++++ 4 files changed, 125 insertions(+) create mode 100644 arch/x86/kernel/cpuinfo.c diff --git a/Documentation/ABI/testing/sysfs-devices-system-cpu b/Documentation/ABI/testing/sysfs-devices-system-cpu index 84c324773b36..791390ab66d5 100644 --- a/Documentation/ABI/testing/sysfs-devices-system-cpu +++ b/Documentation/ABI/testing/sysfs-devices-system-cpu @@ -581,3 +581,26 @@ Contact: Linux kernel mailing list Description: Various information about the online cpu. Which attributes are available depends on the architecture, kernel configuration and cpu model. + +What: /sys/devices/system/cpu/cpu#/info/ + /sys/devices/system/cpu/cpu#/info/vendor_id + /sys/devices/system/cpu/cpu#/info/cpu_family + /sys/devices/system/cpu/cpu#/info/model + /sys/devices/system/cpu/cpu#/info/model_name + /sys/devices/system/cpu/cpu#/info/stepping + /sys/devices/system/cpu/cpu#/info/flags + /sys/devices/system/cpu/cpu#/info/bugs + /sys/devices/system/cpu/cpu#/info/bogomips +Date: June 2017 +Contact: Linux kernel mailing list +Description: Expose information about x86 cpu information. + + vendor_id, + cpu_family, + model, + model_name, + stepping: Cpu identification depending on each vendor + + flags: Extended capabilities supported by the cpu + bugs: Known bugs by cpu + bogomips: calculated bogomips diff --git a/arch/x86/Kconfig b/arch/x86/Kconfig index 8529a9dbd5ca..29fadd69d541 100644 --- a/arch/x86/Kconfig +++ b/arch/x86/Kconfig @@ -154,6 +154,7 @@ config X86 select HAVE_CMPXCHG_LOCAL select HAVE_CONTEXT_TRACKING if X86_64 select HAVE_COPY_THREAD_TLS + select HAVE_CPUINFO_SYSFS if SYSFS select HAVE_C_RECORDMCOUNT select HAVE_DEBUG_KMEMLEAK select HAVE_DMA_CONTIGUOUS diff --git a/arch/x86/kernel/Makefile b/arch/x86/kernel/Makefile index ccb13271895d..ccf1a338bc37 100644 --- a/arch/x86/kernel/Makefile +++ b/arch/x86/kernel/Makefile @@ -146,6 +146,8 @@ obj-$(CONFIG_UNWINDER_ORC) += unwind_orc.o obj-$(CONFIG_UNWINDER_FRAME_POINTER) += unwind_frame.o obj-$(CONFIG_UNWINDER_GUESS) += unwind_guess.o +obj-$(CONFIG_CPUINFO_SYSFS) += cpuinfo.o + ### # 64 bit specific files ifeq ($(CONFIG_X86_64),y) diff --git a/arch/x86/kernel/cpuinfo.c b/arch/x86/kernel/cpuinfo.c new file mode 100644 index 000000000000..3b772faf9f5f --- /dev/null +++ b/arch/x86/kernel/cpuinfo.c @@ -0,0 +1,99 @@ +/* + * Copyright (C) 2017 SUSE Linux GmbH + * Written by: Felix Schnizlein + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License version + * 2 as published by the Free Software Foundation. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + */ + +#include +#include +#include +#include + +static ssize_t cpuinfo_stepping(unsigned int c, char *buf) +{ + if (cpu_data(c).x86_stepping || cpu_data(c).cpuid_level >= 0) + return sprintf(buf, "%d\n", cpu_data(c).x86_stepping); + return sprintf(buf, "unknown\n"); +} + +static ssize_t cpuinfo_flags(unsigned int c, char *buf) +{ + struct cpuinfo_x86 *cpu = &cpu_data(c); + unsigned int i; + ssize_t len = 0; + + for (i = 0; i < (32 * NCAPINTS); i++) { + if (cpu_has(cpu, i) && x86_cap_flags[i] != NULL) + len += sprintf(buf+len, len == 0 ? "%s" : " %s", + x86_cap_flags[i]); + } + if (!len) + return 0; + return len + sprintf(buf+len, "\n"); +} + +static ssize_t cpuinfo_bugs(unsigned int c, char *buf) +{ + struct cpuinfo_x86 *cpu = &cpu_data(c); + unsigned int i; + ssize_t len = 0; + + for (i = 0; i < 32*NBUGINTS; i++) { + unsigned int bug_bit = 32*NCAPINTS + i; + + if (cpu_has_bug(cpu, bug_bit) && x86_bug_flags[i]) + len += sprintf(buf+len, len == 0 ? "%s" : " %s", + x86_bug_flags[i]); + } + if (!len) + return 0; + return len + sprintf(buf+len, "\n"); +} + +static ssize_t cpuinfo_bogomips(unsigned int c, char *buf) +{ + struct cpuinfo_x86 cpu = cpu_data(c); + + return sprintf(buf, "%lu.%02lu\n", cpu.loops_per_jiffy / (500000 / HZ), + (cpu.loops_per_jiffy / (5000 / HZ)) % 100); +} + +#define cpuinfo_cpu_family(cpu) cpu_data(cpu).x86 +#define cpuinfo_model(cpu) cpu_data(cpu).x86_model + +#define cpuinfo_vendor_id(cpu) cpu_data(cpu).x86_vendor_id[0] ?\ + cpu_data(cpu).x86_vendor_id : "unknown" + +#define cpuinfo_model_name(cpu) cpu_data(cpu).x86_model_id[0] ? \ + cpu_data(cpu).x86_model_id : "unknown" + +CPUINFO_DEFINE_ATTR(cpu_family, "%d"); +CPUINFO_DEFINE_ATTR(model, "%u"); +CPUINFO_DEFINE_ATTR(vendor_id, "%s"); +CPUINFO_DEFINE_ATTR(model_name, "%s"); + +CPUINFO_DEFINE_ATTR_FUNC(stepping); +CPUINFO_DEFINE_ATTR_FUNC(flags); +CPUINFO_DEFINE_ATTR_FUNC(bugs); +CPUINFO_DEFINE_ATTR_FUNC(bogomips); + +struct attribute *cpuinfo_attrs[] = { + CPUINFO_ATTR(vendor_id), + CPUINFO_ATTR(cpu_family), + CPUINFO_ATTR(model), + CPUINFO_ATTR(model_name), + CPUINFO_ATTR(stepping), + CPUINFO_ATTR(flags), + CPUINFO_ATTR(bugs), + CPUINFO_ATTR(bogomips), + NULL +}; -- 2.16.4 _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel