Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nginx/nginx.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIgor Sysoev <igor@sysoev.ru>2009-03-28 15:43:41 +0300
committerIgor Sysoev <igor@sysoev.ru>2009-03-28 15:43:41 +0300
commit7c6c186a7eceacbf27d9d7ce77456ea9864cd4a4 (patch)
treebe40485460abac16d1e480138a761770222328c3 /src/core/ngx_cpuinfo.c
parent2766157b0286b5c402e36c47f7ff98dacd6e7114 (diff)
update cpuid for Core 2 and Atom
Diffstat (limited to 'src/core/ngx_cpuinfo.c')
-rw-r--r--src/core/ngx_cpuinfo.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/src/core/ngx_cpuinfo.c b/src/core/ngx_cpuinfo.c
index 68eb094c9..39a6b05a0 100644
--- a/src/core/ngx_cpuinfo.c
+++ b/src/core/ngx_cpuinfo.c
@@ -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;
}