mirror of
https://github.com/freebsd/freebsd-src
synced 2024-10-17 13:53:39 +00:00
Redo physical/logical CPU count.
Suggested by: jhb
This commit is contained in:
parent
1a330eb01d
commit
7c799f4520
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=151431
|
@ -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. */
|
||||
|
|
|
@ -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);
|
||||
|
|
Loading…
Reference in a new issue