summaryrefslogtreecommitdiffstats
path: root/tools/power
diff options
context:
space:
mode:
authorLen Brown <len.brown@intel.com>2016-03-13 03:14:35 -0400
committerLen Brown <len.brown@intel.com>2016-03-13 03:55:42 -0400
commit5aea2f7f645b27635b856311dee5b775d277c686 (patch)
tree17c85a1628a19ea0491c250b5e221b57af798ad8 /tools/power
parentaa8d8cc79af16e16da04efff1c1a72b1ea4a9e7e (diff)
tools/power turbostat: call __cpuid() instead of __get_cpuid()
turbostat already checks whether calling each cpuid leavf is legal, and it doesn't look at the function return value, so call the simpler gcc intrinsic __cpuid() instead of __get_cpuid(). syntax only, no functional change Signed-off-by: Len Brown <len.brown@intel.com>
Diffstat (limited to 'tools/power')
-rw-r--r--tools/power/x86/turbostat/turbostat.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/tools/power/x86/turbostat/turbostat.c b/tools/power/x86/turbostat/turbostat.c
index db9c9d100042..b34241c3c92e 100644
--- a/tools/power/x86/turbostat/turbostat.c
+++ b/tools/power/x86/turbostat/turbostat.c
@@ -3103,7 +3103,7 @@ void process_cpuid()
3103 3103
3104 eax = ebx = ecx = edx = 0; 3104 eax = ebx = ecx = edx = 0;
3105 3105
3106 __get_cpuid(0, &max_level, &ebx, &ecx, &edx); 3106 __cpuid(0, max_level, ebx, ecx, edx);
3107 3107
3108 if (ebx == 0x756e6547 && edx == 0x49656e69 && ecx == 0x6c65746e) 3108 if (ebx == 0x756e6547 && edx == 0x49656e69 && ecx == 0x6c65746e)
3109 genuine_intel = 1; 3109 genuine_intel = 1;
@@ -3112,7 +3112,7 @@ void process_cpuid()
3112 fprintf(outf, "CPUID(0): %.4s%.4s%.4s ", 3112 fprintf(outf, "CPUID(0): %.4s%.4s%.4s ",
3113 (char *)&ebx, (char *)&edx, (char *)&ecx); 3113 (char *)&ebx, (char *)&edx, (char *)&ecx);
3114 3114
3115 __get_cpuid(1, &fms, &ebx, &ecx, &edx); 3115 __cpuid(1, fms, ebx, ecx, edx);
3116 family = (fms >> 8) & 0xf; 3116 family = (fms >> 8) & 0xf;
3117 model = (fms >> 4) & 0xf; 3117 model = (fms >> 4) & 0xf;
3118 stepping = fms & 0xf; 3118 stepping = fms & 0xf;
@@ -3143,7 +3143,7 @@ void process_cpuid()
3143 * This check is valid for both Intel and AMD. 3143 * This check is valid for both Intel and AMD.
3144 */ 3144 */
3145 ebx = ecx = edx = 0; 3145 ebx = ecx = edx = 0;
3146 __get_cpuid(0x80000000, &max_extended_level, &ebx, &ecx, &edx); 3146 __cpuid(0x80000000, max_extended_level, ebx, ecx, edx);
3147 3147
3148 if (max_extended_level >= 0x80000007) { 3148 if (max_extended_level >= 0x80000007) {
3149 3149
@@ -3151,7 +3151,7 @@ void process_cpuid()
3151 * Non-Stop TSC is advertised by CPUID.EAX=0x80000007: EDX.bit8 3151 * Non-Stop TSC is advertised by CPUID.EAX=0x80000007: EDX.bit8
3152 * this check is valid for both Intel and AMD 3152 * this check is valid for both Intel and AMD
3153 */ 3153 */
3154 __get_cpuid(0x80000007, &eax, &ebx, &ecx, &edx); 3154 __cpuid(0x80000007, eax, ebx, ecx, edx);
3155 has_invariant_tsc = edx & (1 << 8); 3155 has_invariant_tsc = edx & (1 << 8);
3156 } 3156 }
3157 3157
@@ -3160,7 +3160,7 @@ void process_cpuid()
3160 * this check is valid for both Intel and AMD 3160 * this check is valid for both Intel and AMD
3161 */ 3161 */
3162 3162
3163 __get_cpuid(0x6, &eax, &ebx, &ecx, &edx); 3163 __cpuid(0x6, eax, ebx, ecx, edx);
3164 has_aperf = ecx & (1 << 0); 3164 has_aperf = ecx & (1 << 0);
3165 do_dts = eax & (1 << 0); 3165 do_dts = eax & (1 << 0);
3166 do_ptm = eax & (1 << 6); 3166 do_ptm = eax & (1 << 6);
@@ -3209,7 +3209,7 @@ void process_cpuid()
3209 * CPUID 15H TSC/Crystal ratio, possibly Crystal Hz 3209 * CPUID 15H TSC/Crystal ratio, possibly Crystal Hz
3210 */ 3210 */
3211 eax_crystal = ebx_tsc = crystal_hz = edx = 0; 3211 eax_crystal = ebx_tsc = crystal_hz = edx = 0;
3212 __get_cpuid(0x15, &eax_crystal, &ebx_tsc, &crystal_hz, &edx); 3212 __cpuid(0x15, eax_crystal, ebx_tsc, crystal_hz, edx);
3213 3213
3214 if (ebx_tsc != 0) { 3214 if (ebx_tsc != 0) {
3215 3215
@@ -3243,7 +3243,7 @@ void process_cpuid()
3243 */ 3243 */
3244 base_mhz = max_mhz = bus_mhz = edx = 0; 3244 base_mhz = max_mhz = bus_mhz = edx = 0;
3245 3245
3246 __get_cpuid(0x16, &base_mhz, &max_mhz, &bus_mhz, &edx); 3246 __cpuid(0x16, base_mhz, max_mhz, bus_mhz, edx);
3247 if (debug) 3247 if (debug)
3248 fprintf(outf, "CPUID(0x16): base_mhz: %d max_mhz: %d bus_mhz: %d\n", 3248 fprintf(outf, "CPUID(0x16): base_mhz: %d max_mhz: %d bus_mhz: %d\n",
3249 base_mhz, max_mhz, bus_mhz); 3249 base_mhz, max_mhz, bus_mhz);