Lines Matching +full:vendor +full:- +full:id
1 // SPDX-License-Identifier: GPL-2.0
14 void get_cpuid_0(char *vendor, unsigned int *lvl) in get_cpuid_0() argument
19 strncpy(&vendor[0], (char *)(&b), 4); in get_cpuid_0()
20 strncpy(&vendor[4], (char *)(&d), 4); in get_cpuid_0()
21 strncpy(&vendor[8], (char *)(&c), 4); in get_cpuid_0()
22 vendor[12] = '\0'; in get_cpuid_0()
29 int family = -1, model = -1, step = -1; in __get_cpuid()
31 char vendor[16]; in __get_cpuid() local
33 get_cpuid_0(vendor, &lvl); in __get_cpuid()
38 family = (a >> 8) & 0xf; /* bits 11 - 8 */ in __get_cpuid()
39 model = (a >> 4) & 0xf; /* Bits 7 - 4 */ in __get_cpuid()
50 nb = scnprintf(buffer, sz, fmt, vendor, family, model, step); in __get_cpuid()
54 buffer[nb-1] = '\0'; in __get_cpuid()
71 if (buf && __get_cpuid(buf, 128, "%s-%u-%X-%X$") < 0) { in get_cpuid_str()
78 /* Full CPUID format for x86 is vendor-family-model-stepping */
79 static bool is_full_cpuid(const char *id) in is_full_cpuid() argument
81 const char *tmp = id; in is_full_cpuid()
84 while ((tmp = strchr(tmp, '-')) != NULL) { in is_full_cpuid()
95 int strcmp_cpuid_str(const char *mapcpuid, const char *id) in strcmp_cpuid_str() argument
101 bool full_cpuid = is_full_cpuid(id); in strcmp_cpuid_str()
109 "vendor-family-model-stepping\n", id); in strcmp_cpuid_str()
119 match = !regexec(&re, id, 1, pmatch, 0); in strcmp_cpuid_str()
122 size_t match_len = (pmatch[0].rm_eo - pmatch[0].rm_so); in strcmp_cpuid_str()
129 cpuid_len = strrchr(id, '-') - id; in strcmp_cpuid_str()
131 cpuid_len = strlen(id); in strcmp_cpuid_str()