r2614 merge:

update cpuid for Core 2 and Atom
This commit is contained in:
Igor Sysoev 2009-05-18 16:02:06 +00:00
parent 3a98a9da5c
commit 13433f719a
1 changed files with 5 additions and 3 deletions

View File

@ -72,7 +72,7 @@ void
ngx_cpuinfo(void)
{
u_char *vendor;
uint32_t vbuf[5], cpu[4];
uint32_t vbuf[5], cpu[4], model;
vbuf[0] = 0;
vbuf[1] = 0;
@ -103,8 +103,10 @@ ngx_cpuinfo(void)
case 6:
ngx_cacheline_size = 32;
if ((cpu[0] & 0xf0) >= 0xd0) {
/* Intel Core */
model = ((cpu[0] & 0xf0000) >> 8) | (cpu[0] & 0xf0);
if (model >= 0xd0) {
/* Intel Core, Core 2, Atom */
ngx_cacheline_size = 64;
}