Commit 578418cb authored by David Mosberger's avatar David Mosberger

ia64: Decode feature bits added by SDM2.1 (spontaneous deferral &

	16-byte atomic ops).
parent cc2b9554
...@@ -469,9 +469,18 @@ show_cpuinfo (struct seq_file *m, void *v) ...@@ -469,9 +469,18 @@ show_cpuinfo (struct seq_file *m, void *v)
# define lpj loops_per_jiffy # define lpj loops_per_jiffy
# define cpunum 0 # define cpunum 0
#endif #endif
char family[32], features[128], *cp; static struct {
unsigned long mask;
const char *feature_name;
} feature_bits[] = {
{ 1UL << 0, "branchlong" },
{ 1UL << 1, "spontaneous deferral"},
{ 1UL << 2, "16-byte atomic ops" }
};
char family[32], features[128], *cp, sep;
struct cpuinfo_ia64 *c = v; struct cpuinfo_ia64 *c = v;
unsigned long mask; unsigned long mask;
int i;
mask = c->features; mask = c->features;
...@@ -484,13 +493,23 @@ show_cpuinfo (struct seq_file *m, void *v) ...@@ -484,13 +493,23 @@ show_cpuinfo (struct seq_file *m, void *v)
/* build the feature string: */ /* build the feature string: */
memcpy(features, " standard", 10); memcpy(features, " standard", 10);
cp = features; cp = features;
if (mask & 1) { sep = 0;
strcpy(cp, " branchlong"); for (i = 0; i < sizeof(feature_bits)/sizeof(feature_bits[0]); ++i) {
cp = strchr(cp, '\0'); if (mask & feature_bits[i].mask) {
mask &= ~1UL; if (sep)
*cp++ = sep;
sep = ',';
*cp++ = ' ';
strcpy(cp, feature_bits[i].feature_name);
mask &= ~feature_bits[i].mask;
}
} }
if (mask) if (mask) {
/* print unknown features as a hex value: */
if (sep)
*cp++ = sep;
sprintf(cp, " 0x%lx", mask); sprintf(cp, " 0x%lx", mask);
}
seq_printf(m, seq_printf(m,
"processor : %d\n" "processor : %d\n"
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment