Skip to contentSkip to conversation

Change of /proc/cpuinfo format

PATCH ryan 2 participants 2 messages Dec 5, 2000

lore
Share & tools
lore

ryan

author
#0 lore raw

Hi,

There was a minor change to the format of /proc/cpuinfo which hoses several programs. Most notably is vmware.

The details are the field formerly known as 'flags' is now known as 'features' which breaks any programs attempting to parse /proc/cpuinfo and making decisions about what feature set the cpu supports.

I'm not quite sure why the name change is necessary, and even if one wants to keep the name change there is a discontunity of cpuinfo formats and programs which intend to run on kernels 2.2 and 2.4 needs to know this...

Here is a small patch to save your typing fingers:

setup.c renamed from setup.c.old +1 -1
@@ -2131,7 +2131,7 @@
 			        "fpu_exception\t: %s\n"
 			        "cpuid level\t: %d\n"
 			        "wp\t\t: %s\n"
-			        "features\t:",
+			        "flags\t:",
 			     c->fdiv_bug ? "yes" : "no",
 			     c->hlt_works_ok ? "no" : "yes",
 			     c->f00f_bug ? "yes" : "no",

in linux/arch/i386/kernel

-ryan

--
Ryan Rawson
Software Designer
[email protected]
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [email protected]
Please read the FAQ at http://www.tux.org/lkml/

#1 lore raw
Quoted 5 lines

I'm not quite sure why the name change is necessary, and even if one wants to keep the name change there is a discontunity of cpuinfo formats and programs which intend to run on kernels 2.2 and 2.4 needs to know this...

The reason is that HPA, who did the recent IA32 CPU detection cleanup, felt that the information reported in the new 'features' field was sufficiently different from that reported in the old 'flags' field that it was worth renaming -- so that programs wouldn't try to rely on the old flag names.

(Specifically: some flags were renamed to be distinct between Intel, AMD, etc, because the exact behavior of the flag may vary between brands.)

setup.c line 2134

Quoted 2 lines
setup.c renamed from setup.c.old +1 -1
-			        "features\t:",
+			        "flags\t:",

This patch is already in test12pre5, and is wrong. You need two tabs after 'flags'.

Peter
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [email protected]
Please read the FAQ at http://www.tux.org/lkml/