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)
# define lpj loops_per_jiffy
# define cpunum 0
#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;
unsigned long mask;
int i;
mask = c->features;
......@@ -484,13 +493,23 @@ show_cpuinfo (struct seq_file *m, void *v)
/* build the feature string: */
memcpy(features, " standard", 10);
cp = features;
if (mask & 1) {
strcpy(cp, " branchlong");
cp = strchr(cp, '\0');
mask &= ~1UL;
sep = 0;
for (i = 0; i < sizeof(feature_bits)/sizeof(feature_bits[0]); ++i) {
if (mask & feature_bits[i].mask) {
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);
}
seq_printf(m,
"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