]> git.neil.brown.name Git - history.git/commitdiff
[PATCH] VIA C3 Nehemiah cachesize errata fix.
authorDave Jones <davej@codemonkey.org.uk>
Thu, 13 Feb 2003 02:38:22 +0000 (18:38 -0800)
committerLinus Torvalds <torvalds@home.transmeta.com>
Thu, 13 Feb 2003 02:38:22 +0000 (18:38 -0800)
Whoops, VIA goofed, and it reports L2 size as 65KB.

arch/i386/kernel/cpu/centaur.c

index 27cc5d3a52b06ae008d1251bbe29e4ceb8acb2a9..5ac69d51ef21f909526835be702d671c1c74be8c 100644 (file)
@@ -408,6 +408,12 @@ static unsigned int centaur_size_cache(struct cpuinfo_x86 * c, unsigned int size
        /* VIA C3 CPUs (670-68F) need further shifting. */
        if ((c->x86 == 6) && ((c->x86_model == 7) || (c->x86_model == 8)))
                size >>= 8;
+
+       /* VIA also screwed up Nehemiah stepping 1, and made
+          it return '65KB' instead of '64KB' */
+       if ((c->x86==6) && (c->x86_model==9) && (c->x86_mask==1))
+               size -=1;
+
        return size;
 }