From: Dave Hansen <dave.hansen@intel.com>
To: Feng Tang <feng.tang@intel.com>,
Thomas Gleixner <tglx@linutronix.de>,
Ingo Molnar <mingo@redhat.com>, "H . Peter Anvin" <hpa@zytor.com>,
Borislav Petkov <bp@alien8.de>,
Peter Zijlstra <peterz@infradead.org>,
x86@kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [RFC PATCH v2] tools/x86: add kcpuid tool to show raw CPU features
Date: Tue, 22 Sep 2020 12:38:30 -0700 [thread overview]
Message-ID: <51821d92-8c77-7661-5cf6-bd5dbe0cdbaf@intel.com> (raw)
In-Reply-To: <1600752470-43179-1-git-send-email-feng.tang@intel.com>
On 9/21/20 10:27 PM, Feng Tang wrote:
> +static void parse_text(void)
> +{
> + FILE *file;
> + char *line = NULL;
> + size_t len = 0;
> + int ret;
> +
> + file = fopen("cpuid.txt", "r");
> + if (!file) {
> + printf("Error in opening 'cpuid.txt'\n");
> + return;
> + }
This mostly looks fine to me. A few things about cpuid.txt, though...
It needs to be read out of *some* location which is not the current
directory. Maybe:
/usr/share/hwdata/cpu.ids
or something. It also needs a "-f" argument to override this default
location. I don't know if there's a better per-kernel place to put this
file, though.
next prev parent reply other threads:[~2020-09-22 19:38 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-09-22 5:27 [RFC PATCH v2] tools/x86: add kcpuid tool to show raw CPU features Feng Tang
2020-09-22 19:38 ` Dave Hansen [this message]
2020-09-25 7:22 ` Feng Tang
2020-09-25 17:27 ` Borislav Petkov
2020-09-22 20:10 ` Borislav Petkov
2020-09-22 22:15 ` Arvind Sankar
2020-09-23 2:45 ` Feng Tang
2020-09-25 17:16 ` Borislav Petkov
2020-09-25 19:48 ` Arvind Sankar
2020-09-25 20:17 ` Borislav Petkov
2020-09-25 20:40 ` Arvind Sankar
2020-09-25 20:57 ` Borislav Petkov
2020-09-25 17:24 ` Borislav Petkov
2020-09-25 17:26 ` Dave Hansen
2020-09-28 7:07 ` Feng Tang
2020-09-28 8:34 ` Borislav Petkov
2020-09-28 8:56 ` Feng Tang
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=51821d92-8c77-7661-5cf6-bd5dbe0cdbaf@intel.com \
--to=dave.hansen@intel.com \
--cc=bp@alien8.de \
--cc=feng.tang@intel.com \
--cc=hpa@zytor.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@redhat.com \
--cc=peterz@infradead.org \
--cc=tglx@linutronix.de \
--cc=x86@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).