1 // SPDX-License-Identifier: GPL-2.0
2 #include <linux/compiler.h>
4 #include "arch-tests.h"
5 #include "tests/tests.h"
6 #include "util/header.h"
8 int test__cpuid_match(struct test_suite
*test __maybe_unused
,
9 int subtest __maybe_unused
)
11 /* midr with no leading zeros matches */
12 if (strcmp_cpuid_str("0x410fd0c0", "0x00000000410fd0c0"))
14 /* Upper case matches */
15 if (strcmp_cpuid_str("0x410fd0c0", "0x00000000410FD0C0"))
17 /* r0p0 = r0p0 matches */
18 if (strcmp_cpuid_str("0x00000000410fd480", "0x00000000410fd480"))
20 /* r0p1 > r0p0 matches */
21 if (strcmp_cpuid_str("0x00000000410fd480", "0x00000000410fd481"))
23 /* r1p0 > r0p0 matches*/
24 if (strcmp_cpuid_str("0x00000000410fd480", "0x00000000411fd480"))
26 /* r0p0 < r0p1 doesn't match */
27 if (!strcmp_cpuid_str("0x00000000410fd481", "0x00000000410fd480"))
29 /* r0p0 < r1p0 doesn't match */
30 if (!strcmp_cpuid_str("0x00000000411fd480", "0x00000000410fd480"))
32 /* Different CPU doesn't match */
33 if (!strcmp_cpuid_str("0x00000000410fd4c0", "0x00000000430f0af0"))