Messages in this thread Patch in this message | | | From | "Hans-Frieder Vogt" <> | Date | Tue, 12 Jan 1999 09:01:13 +0100 | Subject | [PATCH] error in cpuid usage |
| |
Hi,
I found a minor error in the cpu detection code for x86 processors. In analogy with the standard functions the first extended cpuid function returns the highest supported function number, which is not a number in the region 0 .. 9, but 0x80000000 and above! So here is my very small patch:
Hans-Frieder
--- linux-2.2.0-pre6/arch/i386/kernel/setup.c Wed Jan 6 22:53:22 1999 +++ linux/arch/i386/kernel/setup.c Mon Jan 11 22:33:51 1999 @@ -252,7 +252,7 @@ */
cpuid(0x80000000, &n, &dummy, &dummy, &dummy); - if (n < 4) + if (n < 0x80000004) return 0; cpuid(0x80000001, &dummy, &dummy, &dummy, &(c->x86_capability)); v = (unsigned int *) c->x86_model_id;
-- -- Hans-Frieder Vogt e-mail: vogt@ila.uni-stuttgart.de Institut f"ur Luftfahrtantriebe tel : +49 (711) 685-3522 Universit"at Stuttgart Pfaffenwaldring 6 D-70569 Stuttgart, Germany
- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.rutgers.edu Please read the FAQ at http://www.tux.org/lkml/
| |