Commit 4b796a9f authored by Dave Jones's avatar Dave Jones Committed by Linus Torvalds

[PATCH] Make early_cpu_detect() set x86_cache_alignment on pre-cpuid CPU's too

From: Zdenek Pavlas <pavlas@nextra.cz>

On any x86 without cpuid, early_cpu_detect() left x86_cache_alignment as
zero, so kmem_cache_init() calls cache_estimate() with align == 0, and
it loops forever. I've tried this trivial fix, and it works for me.

Andi Kleen looked over this, and ok'd it.
parent 14bc28ad
......@@ -201,6 +201,8 @@ void __init early_cpu_detect(void)
{
struct cpuinfo_x86 *c = &boot_cpu_data;
c->x86_cache_alignment = 32;
if (!have_cpuid_p())
return;
......@@ -213,8 +215,6 @@ void __init early_cpu_detect(void)
get_cpu_vendor(c, 1);
c->x86 = 4;
c->x86_cache_alignment = 32;
if (c->cpuid_level >= 0x00000001) {
u32 junk, tfms, cap0, misc;
cpuid(0x00000001, &tfms, &misc, &junk, &cap0);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment