diff --git a/cpuid_tool/cpuid_tool.c b/cpuid_tool/cpuid_tool.c index 4dcaf10..58ecdf1 100644 --- a/cpuid_tool/cpuid_tool.c +++ b/cpuid_tool/cpuid_tool.c @@ -356,7 +356,7 @@ static void print_info(output_data_switch query, struct cpu_raw_data_t* raw, fprintf(fout, "%d\n", data->num_logical_cpus); break; case NEED_TOTAL_CPUS: - fprintf(fout, "%d\n", data->total_logical_cpus); + fprintf(fout, "%d\n", cpuid_get_total_cpus()); break; case NEED_L1D_SIZE: fprintf(fout, "%d\n", data->l1_data_cache); diff --git a/libcpuid/exports.def b/libcpuid/exports.def index b2200ea..92f0e55 100644 --- a/libcpuid/exports.def +++ b/libcpuid/exports.def @@ -27,3 +27,4 @@ cpu_rdmsr @23 cpu_msrinfo @24 cpu_msr_driver_close @25 cpu_clock_by_ic @26 +cpuid_get_total_cpus @27 diff --git a/libcpuid/libcpuid.sym b/libcpuid/libcpuid.sym index 8356c72..7a6a51c 100644 --- a/libcpuid/libcpuid.sym +++ b/libcpuid/libcpuid.sym @@ -24,3 +24,4 @@ cpu_rdmsr cpu_msrinfo cpu_msr_driver_close cpu_clock_by_ic +cpuid_get_total_cpus