Redo physical/logical CPU count.

Suggested by:	jhb
This commit is contained in:
Jung-uk Kim 2005-10-17 23:23:20 +00:00
parent 1a330eb01d
commit 7c799f4520
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=151431
2 changed files with 8 additions and 6 deletions

View file

@ -358,9 +358,10 @@ printcpuinfo(void)
cmp = ((regs[0] & 0xfc000000) >> 26) + 1;
}
if (cmp > 1)
printf("\n Physical cores: %d", cmp);
if (htt > 1)
printf("\n Logical cores: %d", htt);
printf("\n Cores per package: %d", cmp);
if ((htt / cmp) > 1)
printf("\n Logical CPUs per core: %d",
htt / cmp);
}
}
/* Avoid ugly blank lines: only print newline when we have to. */

View file

@ -848,9 +848,10 @@ printcpuinfo(void)
cmp = ((regs[0] & 0xfc000000) >> 26) + 1;
}
if (cmp > 1)
printf("\n Physical cores: %d", cmp);
if (htt > 1)
printf("\n Logical cores: %d", htt);
printf("\n Cores per package: %d", cmp);
if ((htt / cmp) > 1)
printf("\n Logical CPUs per core: %d",
htt / cmp);
}
} else if (strcmp(cpu_vendor, "CyrixInstead") == 0) {
printf(" DIR=0x%04x", cyrix_did);