@@ -282,82 +282,6 @@ static bool match_sm(
282
282
return true;
283
283
}
284
284
285
-
286
- struct special_map_entry {
287
- const char * platform ;
288
- uint16_t model ;
289
- uint8_t series ;
290
- char suffix ;
291
- };
292
-
293
- static const struct special_map_entry qualcomm_hardware_map_entries [] = {
294
- {
295
- /* "Kona" -> Qualcomm Kona */
296
- .platform = "Kona" ,
297
- .series = cpuinfo_arm_chipset_series_qualcomm_snapdragon ,
298
- .model = 865 ,
299
- },
300
- {
301
- /* "Bengal" -> Qualcomm Bengal */
302
- .platform = "Bengal" ,
303
- .series = cpuinfo_arm_chipset_series_qualcomm_snapdragon ,
304
- .model = 662 ,
305
- },
306
- {
307
- /* "Bengalp" -> Qualcomm Bengalp */
308
- .platform = "Bengalp" ,
309
- .series = cpuinfo_arm_chipset_series_qualcomm_snapdragon ,
310
- .model = 662 ,
311
- },
312
- {
313
- /* "Lito" -> Qualcomm Lito */
314
- .platform = "Lito" ,
315
- .series = cpuinfo_arm_chipset_series_qualcomm_snapdragon ,
316
- .model = 765 ,
317
- .suffix = 'G'
318
- },
319
- {
320
- /* "Lagoon" -> Qualcomm Lagoon */
321
- .platform = "Lagoon" ,
322
- .series = cpuinfo_arm_chipset_series_qualcomm_snapdragon ,
323
- .model = 0 ,
324
- },
325
- };
326
-
327
-
328
- int strcicmp (char const * a , char const * b )
329
- {
330
- for (;; a ++ , b ++ ) {
331
- int d = tolower ((unsigned char )* a ) - tolower ((unsigned char )* b );
332
- if (d != 0 || !* a )
333
- return d ;
334
- }
335
- }
336
-
337
- static bool match_qualcomm_special (
338
- const char * start , const char * end ,
339
- struct cpuinfo_arm_chipset chipset [restrict static 1 ])
340
- {
341
- for (size_t i = 0 ; i < CPUINFO_COUNT_OF (qualcomm_hardware_map_entries ); i ++ ) {
342
- int length = end - start ;
343
- if (strcicmp (qualcomm_hardware_map_entries [i ].platform , start ) == 0 &&
344
- qualcomm_hardware_map_entries [i ].platform [length ] == 0 )
345
- {
346
- * chipset = (struct cpuinfo_arm_chipset ) {
347
- .vendor = chipset_series_vendor [qualcomm_hardware_map_entries [i ].series ],
348
- .series = (enum cpuinfo_arm_chipset_series ) qualcomm_hardware_map_entries [i ].series ,
349
- .model = qualcomm_hardware_map_entries [i ].model ,
350
- .suffix = {
351
- [0 ] = qualcomm_hardware_map_entries [i ].suffix ,
352
- },
353
- };
354
- return true;
355
- }
356
- }
357
- return false;
358
-
359
- }
360
-
361
285
/**
362
286
* Tries to match /Samsung Exynos\d{4}$/ signature (case-insensitive) for Samsung Exynos chipsets.
363
287
* If match successful, extracts model information into \p chipset argument.
@@ -1829,6 +1753,13 @@ static bool is_tegra(const char* start, const char* end) {
1829
1753
return (length == 5 || start [5 ] == '3' );
1830
1754
}
1831
1755
1756
+ struct special_map_entry {
1757
+ const char * platform ;
1758
+ uint16_t model ;
1759
+ uint8_t series ;
1760
+ char suffix ;
1761
+ };
1762
+
1832
1763
static const struct special_map_entry special_hardware_map_entries [] = {
1833
1764
#if CPUINFO_ARCH_ARM
1834
1765
{
@@ -2387,14 +2318,6 @@ struct cpuinfo_arm_chipset cpuinfo_arm_linux_decode_chipset_from_proc_cpuinfo_ha
2387
2318
(int ) hardware_length , hardware );
2388
2319
return chipset ;
2389
2320
}
2390
-
2391
- if (match_qualcomm_special (pos , hardware_end , & chipset )) {
2392
- cpuinfo_log_debug (
2393
- "matched Qualcomm signature in /proc/cpuinfo Hardware string \"%.*s\"" ,
2394
- (int ) hardware_length , hardware );
2395
- return chipset ;
2396
- }
2397
-
2398
2321
}
2399
2322
word_start = false;
2400
2323
break ;
0 commit comments