1 // SPDX-License-Identifier: GPL-2.0-only
2 #include <linux/types.h>
3 #include <linux/export.h>
6 unsigned int x86_family(unsigned int sig)
10 x86 = (sig >> 8) & 0xf;
13 x86 += (sig >> 20) & 0xff;
17 EXPORT_SYMBOL_GPL(x86_family);
19 unsigned int x86_model(unsigned int sig)
21 unsigned int fam, model;
23 fam = x86_family(sig);
25 model = (sig >> 4) & 0xf;
28 model += ((sig >> 16) & 0xf) << 4;
32 EXPORT_SYMBOL_GPL(x86_model);
34 unsigned int x86_stepping(unsigned int sig)
38 EXPORT_SYMBOL_GPL(x86_stepping);