All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jaswinder Singh Rajput <jaswinder@kernel.org>
To: Ingo Molnar <mingo@elte.hu>, "H. Peter Anvin" <hpa@zytor.com>,
	x86 maintainers <x86@kernel.org>,
	LKML <linux-kernel@vger.kernel.org>
Subject: [PATCH -tip] x86: cpu/proc.c adding extended_cpuid_level for /proc/cpuinfo
Date: Tue, 12 May 2009 12:44:42 +0530	[thread overview]
Message-ID: <1242112482.3283.1.camel@localhost.localdomain> (raw)


Here are 2 patches for adding new field extended_cpuid_level, please
choose PATCH whichever is more appropriate:

PATCH 1:
Subject: [PATCH] x86: cpu/proc.c adding extended_cpuid_level for /proc/cpuinfo

extended_cpuid_level also gives useful information like cpuid_level
and very useful for AMD processors.

Adding extended_cpuid_level in /proc/cpuinfo completes cpuid_level info.

Signed-off-by: Jaswinder Singh Rajput <jaswinderrajput@gmail.com>
---
 arch/x86/kernel/cpu/proc.c |    6 +++++-
 1 files changed, 5 insertions(+), 1 deletions(-)

diff --git a/arch/x86/kernel/cpu/proc.c b/arch/x86/kernel/cpu/proc.c
index 523bf39..1279e16 100644
--- a/arch/x86/kernel/cpu/proc.c
+++ b/arch/x86/kernel/cpu/proc.c
@@ -39,6 +39,7 @@ static void show_cpuinfo_misc(struct seq_file *m, struct cpuinfo_x86 *c)
 		   "fpu\t\t: %s\n"
 		   "fpu_exception\t: %s\n"
 		   "cpuid level\t: %d\n"
+		   "ext cpuid level\t: 0x%x\n"
 		   "wp\t\t: %s\n",
 		   c->fdiv_bug ? "yes" : "no",
 		   c->hlt_works_ok ? "no" : "yes",
@@ -47,6 +48,7 @@ static void show_cpuinfo_misc(struct seq_file *m, struct cpuinfo_x86 *c)
 		   c->hard_math ? "yes" : "no",
 		   fpu_exception ? "yes" : "no",
 		   c->cpuid_level,
+		   c->extended_cpuid_level,
 		   c->wp_works_ok ? "yes" : "no");
 }
 #else
@@ -56,8 +58,10 @@ static void show_cpuinfo_misc(struct seq_file *m, struct cpuinfo_x86 *c)
 		   "fpu\t\t: yes\n"
 		   "fpu_exception\t: yes\n"
 		   "cpuid level\t: %d\n"
+		   "ext cpuid level\t: 0x%x\n"
 		   "wp\t\t: yes\n",
-		   c->cpuid_level);
+		   c->cpuid_level,
+		   c->extended_cpuid_level);
 }
 #endif
 
-- 
1.6.0.6


OR

PATCH 2:
Subject: [PATCH] x86: cpu/proc.c adding extended_cpuid_level for /proc/cpuinfo

extended_cpuid_level also gives useful information like cpuid_level
and very useful for AMD processors.

Adding extended_cpuid_level in /proc/cpuinfo completes cpuid_level info.

Signed-off-by: Jaswinder Singh Rajput <jaswinderrajput@gmail.com>
---
 arch/x86/kernel/cpu/proc.c |    4 +++-
 1 files changed, 3 insertions(+), 1 deletions(-)

diff --git a/arch/x86/kernel/cpu/proc.c b/arch/x86/kernel/cpu/proc.c
index 523bf39..a965bf7 100644
--- a/arch/x86/kernel/cpu/proc.c
+++ b/arch/x86/kernel/cpu/proc.c
@@ -102,7 +102,9 @@ static int show_cpuinfo(struct seq_file *m, void *v)
 	show_cpuinfo_core(m, c, cpu);
 	show_cpuinfo_misc(m, c);
 
-	seq_printf(m, "flags\t\t:");
+	seq_printf(m, "ext cpuid level\t: 0x%x\n"
+		   "flags\t\t:",
+		   c->extended_cpuid_level);
 	for (i = 0; i < 32*NCAPINTS; i++)
 		if (cpu_has(c, i) && x86_cap_flags[i] != NULL)
 			seq_printf(m, " %s", x86_cap_flags[i]);
-- 
1.6.0.6



             reply	other threads:[~2009-05-12  7:15 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-05-12  7:14 Jaswinder Singh Rajput [this message]
2009-05-12 13:39 ` [PATCH -tip] x86: cpu/proc.c adding extended_cpuid_level for /proc/cpuinfo Borislav Petkov
2009-05-12 13:49   ` Jaswinder Singh Rajput
2009-05-12 14:10     ` Borislav Petkov
2009-05-12 16:40       ` H. Peter Anvin
2009-05-12 18:13         ` Borislav Petkov
2009-05-12 18:47           ` H. Peter Anvin
2009-05-12 19:49             ` Borislav Petkov
2009-06-05 19:20         ` Jaswinder Singh Rajput
2009-05-13  6:21 ` Andrew Morton
2009-05-13  8:03   ` Andi Kleen
2009-06-05 18:38   ` Jaswinder Singh Rajput
2009-06-05 20:55     ` H. Peter Anvin
2009-06-06  4:23       ` Jaswinder Singh Rajput
2009-06-10 16:40         ` Jaswinder Singh Rajput
2009-06-10 17:14           ` H. Peter Anvin
2009-06-10 17:42             ` Borislav Petkov
2009-06-10 17:48               ` H. Peter Anvin

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=1242112482.3283.1.camel@localhost.localdomain \
    --to=jaswinder@kernel.org \
    --cc=hpa@zytor.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@elte.hu \
    --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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.