Lines Matching +full:vendor +full:- +full:id
1 // SPDX-License-Identifier: GPL-2.0
30 int family = -1, model = -1, step = -1; in __get_cpuid()
32 char vendor[16]; in __get_cpuid() local
35 strncpy(&vendor[0], (char *)(&b), 4); in __get_cpuid()
36 strncpy(&vendor[4], (char *)(&d), 4); in __get_cpuid()
37 strncpy(&vendor[8], (char *)(&c), 4); in __get_cpuid()
38 vendor[12] = '\0'; in __get_cpuid()
43 family = (a >> 8) & 0xf; /* bits 11 - 8 */ in __get_cpuid()
44 model = (a >> 4) & 0xf; /* Bits 7 - 4 */ in __get_cpuid()
55 nb = scnprintf(buffer, sz, fmt, vendor, family, model, step); in __get_cpuid()
59 buffer[nb-1] = '\0'; in __get_cpuid()
76 if (buf && __get_cpuid(buf, 128, "%s-%u-%X-%X$") < 0) { in get_cpuid_str()
83 /* Full CPUID format for x86 is vendor-family-model-stepping */
84 static bool is_full_cpuid(const char *id) in is_full_cpuid() argument
86 const char *tmp = id; in is_full_cpuid()
89 while ((tmp = strchr(tmp, '-')) != NULL) { in is_full_cpuid()
100 int strcmp_cpuid_str(const char *mapcpuid, const char *id) in strcmp_cpuid_str() argument
106 bool full_cpuid = is_full_cpuid(id); in strcmp_cpuid_str()
114 "vendor-family-model-stepping\n", id); in strcmp_cpuid_str()
124 match = !regexec(&re, id, 1, pmatch, 0); in strcmp_cpuid_str()
127 size_t match_len = (pmatch[0].rm_eo - pmatch[0].rm_so); in strcmp_cpuid_str()
134 cpuid_len = strrchr(id, '-') - id; in strcmp_cpuid_str()
136 cpuid_len = strlen(id); in strcmp_cpuid_str()