Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

tools/power x86_energy_perf_policy: Version 2026.04.25

Since v2025.11.22:
Initial SoC Slider support
SoC Slider is an SoC-wide power/performance policy setting.
On SoC Slider systems, EPP plays a diminished role.

Whitespace cleanup via: indent -npro -kr -i8 -ts8 -sob -l160 -ss -ncs -cp1

No functional changes

Signed-off-by: Len Brown <len.brown@intel.com>

+66 -95
+66 -95
tools/power/x86/x86_energy_perf_policy/x86_energy_perf_policy.c
··· 4 4 * policy preference bias on recent X86 processors. 5 5 */ 6 6 /* 7 - * Copyright (c) 2010 - 2025 Intel Corporation. 7 + * Copyright (c) 2010 - 2026 Intel Corporation. 8 8 * Len Brown <len.brown@intel.com> 9 9 */ 10 10 ··· 82 82 83 83 char *proc_stat = "/proc/stat"; 84 84 85 - unsigned int has_epb; /* MSR_IA32_ENERGY_PERF_BIAS */ 86 - unsigned int has_hwp; /* IA32_PM_ENABLE, IA32_HWP_CAPABILITIES */ 85 + unsigned int has_epb; /* MSR_IA32_ENERGY_PERF_BIAS */ 86 + unsigned int has_hwp; /* IA32_PM_ENABLE, IA32_HWP_CAPABILITIES */ 87 87 /* IA32_HWP_REQUEST, IA32_HWP_STATUS */ 88 - unsigned int has_hwp_notify; /* IA32_HWP_INTERRUPT */ 88 + unsigned int has_hwp_notify; /* IA32_HWP_INTERRUPT */ 89 89 unsigned int has_hwp_activity_window; /* IA32_HWP_REQUEST[bits 41:32] */ 90 90 unsigned int has_hwp_epp; /* IA32_HWP_REQUEST[bits 31:24] */ 91 91 unsigned int has_hwp_request_pkg; /* IA32_HWP_REQUEST_PKG */ ··· 122 122 fprintf(stderr, "field: --all | --epb | --hwp-epp | --hwp-min | --hwp-max | --hwp-desired\n"); 123 123 fprintf(stderr, "other: --hwp-enable | --turbo-enable (0 | 1) | --help | --force\n"); 124 124 fprintf(stderr, "soc-slider: --soc-slider-balance # | --soc-slider-offset # | --platform-profile <name>\n"); 125 - fprintf(stderr, 126 - "value: ( # | \"normal\" | \"performance\" | \"balance-performance\" | \"balance-power\"| \"power\")\n"); 125 + fprintf(stderr, "value: ( # | \"normal\" | \"performance\" | \"balance-performance\" | \"balance-power\"| \"power\")\n"); 127 126 fprintf(stderr, "--hwp-window usec\n"); 128 127 129 128 fprintf(stderr, "Specify only Energy Performance BIAS (legacy usage):\n"); ··· 150 151 151 152 return msr_perf; 152 153 } 154 + 153 155 int msr_perf_2_ratio(int msr_perf) 154 156 { 155 157 int ratio; ··· 159 159 if (!bdx_highest_ratio) 160 160 return msr_perf; 161 161 162 - d = (double)msr_perf * (double) bdx_highest_ratio / 255.0; 163 - d = d + 0.5; /* round */ 162 + d = (double)msr_perf * (double)bdx_highest_ratio / 255.0; 163 + d = d + 0.5; /* round */ 164 164 ratio = (int)d; 165 165 166 166 if (debug) ··· 168 168 169 169 return ratio; 170 170 } 171 + 171 172 int parse_cmdline_epb(int i) 172 173 { 173 174 if (!has_epb) ··· 215 214 } 216 215 return i; 217 216 } 217 + 218 218 /* 219 219 * "power" changes hwp_max to cap.lowest 220 220 * All others leave it at cap.highest ··· 235 233 } 236 234 return i; 237 235 } 236 + 238 237 /* 239 238 * for --hwp-des, all strings leave it in autonomous mode 240 239 * If you want to change it, you need to explicitly pick a value ··· 273 270 fprintf(stderr, "--hwp-window: 0 for auto; 1 - 1270000000 usec for window duration\n"); 274 271 usage(); 275 272 } 276 - for (exponent = 0; ; ++exponent) { 273 + for (exponent = 0;; ++exponent) { 277 274 if (debug) 278 275 printf("%d 10^%d\n", i, exponent); 279 276 ··· 287 284 288 285 return (exponent << 7) | i; 289 286 } 287 + 290 288 int parse_cmdline_hwp_epp(int i) 291 289 { 292 290 update_hwp_epp = 1; ··· 309 305 } 310 306 return i; 311 307 } 308 + 312 309 int parse_cmdline_turbo(int i) 313 310 { 314 311 update_turbo = 1; ··· 529 524 } 530 525 } 531 526 532 - void for_packages(unsigned long long pkg_set, int (func)(int)) 527 + void for_packages(unsigned long long pkg_set, int (func) (int)) 533 528 { 534 529 int pkg_num; 535 530 ··· 558 553 559 554 void print_version(void) 560 555 { 561 - printf("x86_energy_perf_policy 2025.11.22 Len Brown <lenb@kernel.org>\n"); 556 + printf("x86_energy_perf_policy 2026.04.25 Len Brown <lenb@kernel.org>\n"); 562 557 } 563 558 564 559 static int platform_profile_access(int mode) ··· 796 791 free(buffer); 797 792 798 793 if (hypervisor) 799 - err(-1, 800 - "not supported on this virtual machine"); 794 + err(-1, "not supported on this virtual machine"); 801 795 } 802 796 803 797 int get_msr(int cpu, int offset, unsigned long long *msr) ··· 808 804 sprintf(pathname, use_android_msr_path ? "/dev/msr%d" : "/dev/cpu/%d/msr", cpu); 809 805 fd = open(pathname, O_RDONLY); 810 806 if (fd < 0) 811 - err(-1, "%s open failed, try chown or chmod +r %s, or run as root", 812 - pathname, use_android_msr_path ? "/dev/msr*" : "/dev/cpu/*/msr"); 813 - 807 + err(-1, "%s open failed, try chown or chmod +r %s, or run as root", pathname, use_android_msr_path ? "/dev/msr*" : "/dev/cpu/*/msr"); 814 808 815 809 retval = pread(fd, msr, sizeof(*msr), offset); 816 810 if (retval != sizeof(*msr)) { ··· 832 830 sprintf(pathname, use_android_msr_path ? "/dev/msr%d" : "/dev/cpu/%d/msr", cpu); 833 831 fd = open(pathname, O_RDWR); 834 832 if (fd < 0) 835 - err(-1, "%s open failed, try chown or chmod +r %s, or run as root", 836 - pathname, use_android_msr_path ? "/dev/msr*" : "/dev/cpu/*/msr"); 833 + err(-1, "%s open failed, try chown or chmod +r %s, or run as root", pathname, use_android_msr_path ? "/dev/msr*" : "/dev/cpu/*/msr"); 837 834 838 835 retval = pwrite(fd, &new_msr, sizeof(new_msr), offset); 839 836 if (retval != sizeof(new_msr)) ··· 864 863 buf[numread] = '\0'; 865 864 close(fd); 866 865 867 - return (unsigned int) numread; 866 + return (unsigned int)numread; 868 867 } 869 868 870 869 static unsigned int write_sysfs(const char *path, char *buf, size_t buflen) ··· 886 885 887 886 close(fd); 888 887 889 - return (unsigned int) numwritten; 888 + return (unsigned int)numwritten; 890 889 } 891 890 892 891 static int sysfs_read_string(const char *path, char *buf, size_t buflen) ··· 919 918 if (cpu != -1) 920 919 printf("cpu%d: ", cpu); 921 920 922 - printf("HWP_CAP: low %d eff %d guar %d high %d\n", 923 - cap->lowest, cap->efficient, cap->guaranteed, cap->highest); 921 + printf("HWP_CAP: low %d eff %d guar %d high %d\n", cap->lowest, cap->efficient, cap->guaranteed, cap->highest); 924 922 } 923 + 925 924 void read_hwp_cap(int cpu, struct msr_hwp_cap *cap, unsigned int msr_offset) 926 925 { 927 926 unsigned long long msr; ··· 943 942 printf("%s", str); 944 943 945 944 printf("HWP_REQ: min %d max %d des %d epp %d window 0x%x (%d*10^%dus) use_pkg %d\n", 946 - h->hwp_min, h->hwp_max, h->hwp_desired, h->hwp_epp, 947 - h->hwp_window, h->hwp_window & 0x7F, (h->hwp_window >> 7) & 0x7, h->hwp_use_pkg); 945 + h->hwp_min, h->hwp_max, h->hwp_desired, h->hwp_epp, h->hwp_window, h->hwp_window & 0x7F, (h->hwp_window >> 7) & 0x7, h->hwp_use_pkg); 948 946 } 947 + 949 948 void print_hwp_request_pkg(int pkg, struct msr_hwp_request *h, char *str) 950 949 { 951 950 printf("pkg%d: ", pkg); ··· 954 953 printf("%s", str); 955 954 956 955 printf("HWP_REQ_PKG: min %d max %d des %d epp %d window 0x%x (%d*10^%dus)\n", 957 - h->hwp_min, h->hwp_max, h->hwp_desired, h->hwp_epp, 958 - h->hwp_window, h->hwp_window & 0x7F, (h->hwp_window >> 7) & 0x7); 956 + h->hwp_min, h->hwp_max, h->hwp_desired, h->hwp_epp, h->hwp_window, h->hwp_window & 0x7F, (h->hwp_window >> 7) & 0x7); 959 957 } 958 + 960 959 void read_hwp_request_msr(int cpu, struct msr_hwp_request *hwp_req, unsigned int msr_offset) 961 960 { 962 961 unsigned long long msr; ··· 977 976 978 977 if (debug > 1) 979 978 printf("cpu%d: requesting min %d max %d des %d epp %d window 0x%0x use_pkg %d\n", 980 - cpu, hwp_req->hwp_min, hwp_req->hwp_max, 981 - hwp_req->hwp_desired, hwp_req->hwp_epp, 982 - hwp_req->hwp_window, hwp_req->hwp_use_pkg); 979 + cpu, hwp_req->hwp_min, hwp_req->hwp_max, hwp_req->hwp_desired, hwp_req->hwp_epp, hwp_req->hwp_window, hwp_req->hwp_use_pkg); 983 980 984 981 msr |= HWP_MIN_PERF(ratio_2_msr_perf(hwp_req->hwp_min)); 985 982 msr |= HWP_MAX_PERF(ratio_2_msr_perf(hwp_req->hwp_max)); ··· 1095 1096 1096 1097 epb = get_epb_sysfs(cpu); 1097 1098 if (epb >= 0) 1098 - printf("cpu%d: EPB %u\n", cpu, (unsigned int) epb); 1099 + printf("cpu%d: EPB %u\n", cpu, (unsigned int)epb); 1099 1100 1100 1101 if (!has_hwp) 1101 1102 return 0; ··· 1123 1124 if (has_hwp_notify) { 1124 1125 get_msr(first_cpu_in_pkg[pkg], MSR_HWP_INTERRUPT, &msr); 1125 1126 fprintf(stderr, 1126 - "pkg%d: MSR_HWP_INTERRUPT: 0x%08llx (Excursion_Min-%sabled, Guaranteed_Perf_Change-%sabled)\n", 1127 - pkg, msr, 1128 - ((msr) & 0x2) ? "EN" : "Dis", 1129 - ((msr) & 0x1) ? "EN" : "Dis"); 1127 + "pkg%d: MSR_HWP_INTERRUPT: 0x%08llx (Excursion_Min-%sabled, Guaranteed_Perf_Change-%sabled)\n", 1128 + pkg, msr, ((msr) & 0x2) ? "EN" : "Dis", ((msr) & 0x1) ? "EN" : "Dis"); 1130 1129 } 1131 1130 get_msr(first_cpu_in_pkg[pkg], MSR_HWP_STATUS, &msr); 1132 1131 fprintf(stderr, 1133 1132 "pkg%d: MSR_HWP_STATUS: 0x%08llx (%sExcursion_Min, %sGuaranteed_Perf_Change)\n", 1134 - pkg, msr, 1135 - ((msr) & 0x4) ? "" : "No-", 1136 - ((msr) & 0x1) ? "" : "No-"); 1133 + pkg, msr, ((msr) & 0x4) ? "" : "No-", ((msr) & 0x1) ? "" : "No-"); 1137 1134 1138 1135 return 0; 1139 1136 } ··· 1143 1148 1144 1149 return ratio * bclk_khz; 1145 1150 } 1151 + 1146 1152 /* 1147 1153 * If HWP is enabled and cpufreq sysfs attribtes are present, 1148 1154 * then update via sysfs. The intel_pstate driver may modify (clip) ··· 1160 1164 int retval; 1161 1165 int khz; 1162 1166 1163 - sprintf(pathname, "/sys/devices/system/cpu/cpu%d/cpufreq/scaling_%s_freq", 1164 - cpu, is_max ? "max" : "min"); 1167 + sprintf(pathname, "/sys/devices/system/cpu/cpu%d/cpufreq/scaling_%s_freq", cpu, is_max ? "max" : "min"); 1165 1168 1166 1169 fp = fopen(pathname, "w"); 1167 1170 if (!fp) { ··· 1212 1217 { 1213 1218 /* fail if min > max requested */ 1214 1219 if (req->hwp_min > req->hwp_max) { 1215 - errx(1, "cpu%d: requested hwp-min %d > hwp_max %d", 1216 - cpu, req->hwp_min, req->hwp_max); 1220 + errx(1, "cpu%d: requested hwp-min %d > hwp_max %d", cpu, req->hwp_min, req->hwp_max); 1217 1221 } 1218 1222 1219 1223 /* fail if desired > max requestd */ 1220 1224 if (req->hwp_desired && (req->hwp_desired > req->hwp_max)) { 1221 - errx(1, "cpu%d: requested hwp-desired %d > hwp_max %d", 1222 - cpu, req->hwp_desired, req->hwp_max); 1225 + errx(1, "cpu%d: requested hwp-desired %d > hwp_max %d", cpu, req->hwp_desired, req->hwp_max); 1223 1226 } 1224 1227 /* fail if desired < min requestd */ 1225 1228 if (req->hwp_desired && (req->hwp_desired < req->hwp_min)) { 1226 - errx(1, "cpu%d: requested hwp-desired %d < requested hwp_min %d", 1227 - cpu, req->hwp_desired, req->hwp_min); 1229 + errx(1, "cpu%d: requested hwp-desired %d < requested hwp_min %d", cpu, req->hwp_desired, req->hwp_min); 1228 1230 } 1229 1231 1230 1232 return 0; ··· 1231 1239 { 1232 1240 if (update_hwp_max) { 1233 1241 if (req->hwp_max > cap->highest) 1234 - errx(1, "cpu%d: requested max %d > capabilities highest %d, use --force?", 1235 - cpu, req->hwp_max, cap->highest); 1242 + errx(1, "cpu%d: requested max %d > capabilities highest %d, use --force?", cpu, req->hwp_max, cap->highest); 1236 1243 if (req->hwp_max < cap->lowest) 1237 - errx(1, "cpu%d: requested max %d < capabilities lowest %d, use --force?", 1238 - cpu, req->hwp_max, cap->lowest); 1244 + errx(1, "cpu%d: requested max %d < capabilities lowest %d, use --force?", cpu, req->hwp_max, cap->lowest); 1239 1245 } 1240 1246 1241 1247 if (update_hwp_min) { 1242 1248 if (req->hwp_min > cap->highest) 1243 - errx(1, "cpu%d: requested min %d > capabilities highest %d, use --force?", 1244 - cpu, req->hwp_min, cap->highest); 1249 + errx(1, "cpu%d: requested min %d > capabilities highest %d, use --force?", cpu, req->hwp_min, cap->highest); 1245 1250 if (req->hwp_min < cap->lowest) 1246 - errx(1, "cpu%d: requested min %d < capabilities lowest %d, use --force?", 1247 - cpu, req->hwp_min, cap->lowest); 1251 + errx(1, "cpu%d: requested min %d < capabilities lowest %d, use --force?", cpu, req->hwp_min, cap->lowest); 1248 1252 } 1249 1253 1250 1254 if (update_hwp_min && update_hwp_max && (req->hwp_min > req->hwp_max)) 1251 - errx(1, "cpu%d: requested min %d > requested max %d", 1252 - cpu, req->hwp_min, req->hwp_max); 1255 + errx(1, "cpu%d: requested min %d > requested max %d", cpu, req->hwp_min, req->hwp_max); 1253 1256 1254 1257 if (update_hwp_desired && req->hwp_desired) { 1255 1258 if (req->hwp_desired > req->hwp_max) 1256 - errx(1, "cpu%d: requested desired %d > requested max %d, use --force?", 1257 - cpu, req->hwp_desired, req->hwp_max); 1259 + errx(1, "cpu%d: requested desired %d > requested max %d, use --force?", cpu, req->hwp_desired, req->hwp_max); 1258 1260 if (req->hwp_desired < req->hwp_min) 1259 - errx(1, "cpu%d: requested desired %d < requested min %d, use --force?", 1260 - cpu, req->hwp_desired, req->hwp_min); 1261 + errx(1, "cpu%d: requested desired %d < requested min %d, use --force?", cpu, req->hwp_desired, req->hwp_min); 1261 1262 if (req->hwp_desired < cap->lowest) 1262 - errx(1, "cpu%d: requested desired %d < capabilities lowest %d, use --force?", 1263 - cpu, req->hwp_desired, cap->lowest); 1263 + errx(1, "cpu%d: requested desired %d < capabilities lowest %d, use --force?", cpu, req->hwp_desired, cap->lowest); 1264 1264 if (req->hwp_desired > cap->highest) 1265 - errx(1, "cpu%d: requested desired %d > capabilities highest %d, use --force?", 1266 - cpu, req->hwp_desired, cap->highest); 1265 + errx(1, "cpu%d: requested desired %d > capabilities highest %d, use --force?", cpu, req->hwp_desired, cap->highest); 1267 1266 } 1268 1267 1269 1268 return 0; ··· 1305 1322 } 1306 1323 return 0; 1307 1324 } 1325 + 1308 1326 int update_hwp_request_pkg_msr(int pkg) 1309 1327 { 1310 1328 struct msr_hwp_request req; ··· 1377 1393 set_epb_sysfs(cpu, new_epb); 1378 1394 1379 1395 if (verbose) 1380 - printf("cpu%d: ENERGY_PERF_BIAS old: %d new: %d\n", 1381 - cpu, epb, (unsigned int) new_epb); 1396 + printf("cpu%d: ENERGY_PERF_BIAS old: %d new: %d\n", cpu, epb, (unsigned int)new_epb); 1382 1397 1383 1398 return 0; 1384 1399 } ··· 1393 1410 1394 1411 turbo_is_present_and_disabled = ((msr & MSR_IA32_MISC_ENABLE_TURBO_DISABLE) != 0); 1395 1412 1396 - if (turbo_update_value == 1) { 1413 + if (turbo_update_value == 1) { 1397 1414 if (turbo_is_present_and_disabled) { 1398 1415 msr &= ~MSR_IA32_MISC_ENABLE_TURBO_DISABLE; 1399 1416 put_msr(cpu, MSR_IA32_MISC_ENABLE, msr); ··· 1462 1479 1463 1480 return 0; 1464 1481 } 1482 + 1465 1483 int mark_cpu_present(int cpu) 1466 1484 { 1467 1485 CPU_SET_S(cpu, cpu_setsize, cpu_present_set); ··· 1473 1489 * run func(cpu) on every cpu in /proc/stat 1474 1490 * return max_cpu number 1475 1491 */ 1476 - int for_all_proc_cpus(int (func)(int)) 1492 + int for_all_proc_cpus(int (func) (int)) 1477 1493 { 1478 1494 FILE *fp; 1479 1495 int cpu_num; ··· 1500 1516 return 0; 1501 1517 } 1502 1518 1503 - void for_all_cpus_in_set(size_t set_size, cpu_set_t *cpu_set, int (func)(int)) 1519 + void for_all_cpus_in_set(size_t set_size, cpu_set_t *cpu_set, int (func) (int)) 1504 1520 { 1505 1521 int cpu_num; 1506 1522 ··· 1508 1524 if (CPU_ISSET_S(cpu_num, set_size, cpu_set)) 1509 1525 func(cpu_num); 1510 1526 } 1511 - int for_all_cpus_in_set_and(size_t set_size, cpu_set_t *cpu_set, int (func)(int)) 1527 + 1528 + int for_all_cpus_in_set_and(size_t set_size, cpu_set_t *cpu_set, int (func) (int)) 1512 1529 { 1513 1530 int cpu_num; 1514 1531 int retval = 1; ··· 1558 1573 { 1559 1574 int retval; 1560 1575 1561 - if (!has_hwp) /* set in early_cpuid() */ 1576 + if (!has_hwp) /* set in early_cpuid() */ 1562 1577 return; 1563 1578 1564 1579 retval = for_all_cpus_in_set_and(cpu_setsize, cpu_selected_set, is_hwp_enabled_on_cpu); ··· 1575 1590 return 0; 1576 1591 1577 1592 /* fail if min > max requested */ 1578 - if ((update_hwp_max && update_hwp_min) && 1579 - (req_update.hwp_min > req_update.hwp_max)) { 1593 + if ((update_hwp_max && update_hwp_min) && (req_update.hwp_min > req_update.hwp_max)) { 1580 1594 printf("hwp-min %d > hwp_max %d\n", req_update.hwp_min, req_update.hwp_max); 1581 1595 return -EINVAL; 1582 1596 } 1583 1597 1584 1598 /* fail if desired > max requestd */ 1585 - if (req_update.hwp_desired && update_hwp_max && 1586 - (req_update.hwp_desired > req_update.hwp_max)) { 1599 + if (req_update.hwp_desired && update_hwp_max && (req_update.hwp_desired > req_update.hwp_max)) { 1587 1600 printf("hwp-desired cannot be greater than hwp_max\n"); 1588 1601 return -EINVAL; 1589 1602 } 1590 1603 /* fail if desired < min requestd */ 1591 - if (req_update.hwp_desired && update_hwp_min && 1592 - (req_update.hwp_desired < req_update.hwp_min)) { 1604 + if (req_update.hwp_desired && update_hwp_min && (req_update.hwp_desired < req_update.hwp_min)) { 1593 1605 printf("hwp-desired cannot be less than hwp_min\n"); 1594 1606 return -EINVAL; 1595 1607 } ··· 1629 1647 } 1630 1648 } 1631 1649 1632 - static void get_cpuid_or_exit(unsigned int leaf, 1633 - unsigned int *eax, unsigned int *ebx, 1634 - unsigned int *ecx, unsigned int *edx) 1650 + static void get_cpuid_or_exit(unsigned int leaf, unsigned int *eax, unsigned int *ebx, unsigned int *ecx, unsigned int *edx) 1635 1651 { 1636 1652 if (!__get_cpuid(leaf, eax, ebx, ecx, edx)) 1637 1653 errx(1, "Processor not supported\n"); ··· 1683 1703 genuine_intel = 1; 1684 1704 1685 1705 if (debug) 1686 - fprintf(stderr, "CPUID(0): %.4s%.4s%.4s ", 1687 - (char *)&ebx, (char *)&edx, (char *)&ecx); 1706 + fprintf(stderr, "CPUID(0): %.4s%.4s%.4s ", (char *)&ebx, (char *)&edx, (char *)&ecx); 1688 1707 1689 1708 get_cpuid_or_exit(1, &fms, &ebx, &ecx, &edx); 1690 1709 family = (fms >> 8) & 0xf; ··· 1693 1714 model += ((fms >> 16) & 0xf) << 4; 1694 1715 1695 1716 if (debug) { 1696 - fprintf(stderr, "%d CPUID levels; family:model:stepping 0x%x:%x:%x (%d:%d:%d)\n", 1697 - max_level, family, model, stepping, family, model, stepping); 1717 + fprintf(stderr, "%d CPUID levels; family:model:stepping 0x%x:%x:%x (%d:%d:%d)\n", max_level, family, model, stepping, family, model, stepping); 1698 1718 fprintf(stderr, "CPUID(1): %s %s %s %s %s %s %s %s\n", 1699 1719 ecx & (1 << 0) ? "SSE3" : "-", 1700 1720 ecx & (1 << 3) ? "MONITOR" : "-", 1701 1721 ecx & (1 << 7) ? "EIST" : "-", 1702 1722 ecx & (1 << 8) ? "TM2" : "-", 1703 - edx & (1 << 4) ? "TSC" : "-", 1704 - edx & (1 << 5) ? "MSR" : "-", 1705 - edx & (1 << 22) ? "ACPI-TM" : "-", 1706 - edx & (1 << 29) ? "TM" : "-"); 1723 + edx & (1 << 4) ? "TSC" : "-", edx & (1 << 5) ? "MSR" : "-", edx & (1 << 22) ? "ACPI-TM" : "-", edx & (1 << 29) ? "TM" : "-"); 1707 1724 } 1708 1725 1709 1726 if (!(edx & (1 << 5))) 1710 1727 errx(1, "CPUID: no MSR"); 1711 - 1712 1728 1713 1729 get_cpuid_or_exit(0x6, &eax, &ebx, &ecx, &edx); 1714 1730 /* turbo_is_enabled already set */ ··· 1724 1750 turbo_is_enabled ? "" : "No-", 1725 1751 has_hwp ? "" : "No-", 1726 1752 has_hwp_notify ? "" : "No-", 1727 - has_hwp_activity_window ? "" : "No-", 1728 - has_hwp_epp ? "" : "No-", 1729 - has_hwp_request_pkg ? "" : "No-", 1730 - has_epb ? "" : "No-"); 1753 + has_hwp_activity_window ? "" : "No-", has_hwp_epp ? "" : "No-", has_hwp_request_pkg ? "" : "No-", has_epb ? "" : "No-"); 1731 1754 1732 - return; /* success */ 1755 + return; /* success */ 1733 1756 } 1734 1757 1735 1758 int main(int argc, char **argv) ··· 1736 1765 probe_dev_msr(); 1737 1766 init_data_structures(); 1738 1767 1739 - early_cpuid(); /* initial cpuid parse before cmdline */ 1768 + early_cpuid(); /* initial cpuid parse before cmdline */ 1740 1769 1741 1770 cmdline(argc, argv); 1742 1771 ··· 1745 1774 1746 1775 parse_cpuid(); 1747 1776 1748 - /* If CPU-set and PKG-set are not initialized, default to all CPUs */ 1777 + /* If CPU-set and PKG-set are not initialized, default to all CPUs */ 1749 1778 if ((cpu_selected_set == 0) && (pkg_selected_set == 0)) 1750 1779 cpu_selected_set = cpu_present_set; 1751 1780