diff --git a/libcpuid/recog_amd.c b/libcpuid/recog_amd.c index 917aa84..3ada1f9 100644 --- a/libcpuid/recog_amd.c +++ b/libcpuid/recog_amd.c @@ -226,7 +226,7 @@ static void decode_amd_number_of_cores(struct cpu_raw_data_t* raw, struct cpu_id if (data->flags[CPU_FEATURE_HT]) { if (num_cores > 1) { data->num_cores = num_cores; - data->num_logical_cpus = logical_cpus / num_cores; + data->num_logical_cpus = logical_cpus; } else { data->num_cores = 1; data->num_logical_cpus = (logical_cpus >= 2 ? logical_cpus : 2); diff --git a/libcpuid/recog_intel.c b/libcpuid/recog_intel.c index c803c3a..8a27f4c 100644 --- a/libcpuid/recog_intel.c +++ b/libcpuid/recog_intel.c @@ -399,7 +399,7 @@ static void decode_intel_number_of_cores(struct cpu_raw_data_t* raw, if (data->flags[CPU_FEATURE_HT]) { if (num_cores > 1) { data->num_cores = num_cores; - data->num_logical_cpus = logical_cpus / num_cores; + data->num_logical_cpus = logical_cpus; } else { data->num_cores = 1; data->num_logical_cpus = (logical_cpus >= 2 ? logical_cpus : 2);