r2614 merge:
update cpuid for Core 2 and Atom
Igor Sysoev
13 years ago
71 | 71 | ngx_cpuinfo(void) |
72 | 72 | { |
73 | 73 | u_char *vendor; |
74 | uint32_t vbuf[5], cpu[4]; | |
74 | uint32_t vbuf[5], cpu[4], model; | |
75 | 75 | |
76 | 76 | vbuf[0] = 0; |
77 | 77 | vbuf[1] = 0; |
102 | 102 | case 6: |
103 | 103 | ngx_cacheline_size = 32; |
104 | 104 | |
105 | if ((cpu[0] & 0xf0) >= 0xd0) { | |
106 | /* Intel Core */ | |
105 | model = ((cpu[0] & 0xf0000) >> 8) | (cpu[0] & 0xf0); | |
106 | ||
107 | if (model >= 0xd0) { | |
108 | /* Intel Core, Core 2, Atom */ | |
107 | 109 | ngx_cacheline_size = 64; |
108 | 110 | } |
109 | 111 |