Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 11755
b: refs/heads/master
c: d16aaff
h: refs/heads/master
i:
  11753: 93ae4cd
  11751: 5bc0b7f
v: v3
  • Loading branch information
Siddha, Suresh B authored and Linus Torvalds committed Oct 31, 2005
1 parent d8c97c2 commit 6c3e787
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 13 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: d5cd4aadd3d220afac8e3e6d922e333592551f7d
refs/heads/master: d16aafff2570abb557a5cb18c98027aabd602e22
18 changes: 6 additions & 12 deletions trunk/arch/i386/kernel/cpu/intel_cacheinfo.c
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,6 @@ struct _cpuid4_info {
cpumask_t shared_cpu_map;
};

#define MAX_CACHE_LEAVES 4
static unsigned short num_cache_leaves;

static int __devinit cpuid4_cache_lookup(int index, struct _cpuid4_info *this_leaf)
Expand All @@ -144,20 +143,15 @@ static int __init find_num_cache_leaves(void)
{
unsigned int eax, ebx, ecx, edx;
union _cpuid4_leaf_eax cache_eax;
int i;
int retval;
int i = -1;

retval = MAX_CACHE_LEAVES;
/* Do cpuid(4) loop to find out num_cache_leaves */
for (i = 0; i < MAX_CACHE_LEAVES; i++) {
do {
++i;
/* Do cpuid(4) loop to find out num_cache_leaves */
cpuid_count(4, i, &eax, &ebx, &ecx, &edx);
cache_eax.full = eax;
if (cache_eax.split.type == CACHE_TYPE_NULL) {
retval = i;
break;
}
}
return retval;
} while (cache_eax.split.type != CACHE_TYPE_NULL);
return i;
}

unsigned int __devinit init_intel_cacheinfo(struct cpuinfo_x86 *c)
Expand Down

0 comments on commit 6c3e787

Please sign in to comment.