x86/mm/pat: Don't report PAT on CPUs that don't support it
[linux/fpc-iii.git] / arch / x86 / lib / cpu.c
blobd6f848d1211d4b2deaf193fca80fb4834310dff4
1 #include <linux/types.h>
2 #include <linux/export.h>
4 unsigned int x86_family(unsigned int sig)
6 unsigned int x86;
8 x86 = (sig >> 8) & 0xf;
10 if (x86 == 0xf)
11 x86 += (sig >> 20) & 0xff;
13 return x86;
15 EXPORT_SYMBOL_GPL(x86_family);
17 unsigned int x86_model(unsigned int sig)
19 unsigned int fam, model;
21 fam = x86_family(sig);
23 model = (sig >> 4) & 0xf;
25 if (fam >= 0x6)
26 model += ((sig >> 16) & 0xf) << 4;
28 return model;
30 EXPORT_SYMBOL_GPL(x86_model);
32 unsigned int x86_stepping(unsigned int sig)
34 return sig & 0xf;
36 EXPORT_SYMBOL_GPL(x86_stepping);