thermal: fix Mediatek thermal controller build
[linux/fpc-iii.git] / arch / x86 / lib / cpu.c
blobaa417a97511cd4200f9b6a7796cbb32f96bf1e8b
1 #include <linux/module.h>
3 unsigned int x86_family(unsigned int sig)
5 unsigned int x86;
7 x86 = (sig >> 8) & 0xf;
9 if (x86 == 0xf)
10 x86 += (sig >> 20) & 0xff;
12 return x86;
14 EXPORT_SYMBOL_GPL(x86_family);
16 unsigned int x86_model(unsigned int sig)
18 unsigned int fam, model;
20 fam = x86_family(sig);
22 model = (sig >> 4) & 0xf;
24 if (fam >= 0x6)
25 model += ((sig >> 16) & 0xf) << 4;
27 return model;
29 EXPORT_SYMBOL_GPL(x86_model);
31 unsigned int x86_stepping(unsigned int sig)
33 return sig & 0xf;
35 EXPORT_SYMBOL_GPL(x86_stepping);