mirror of
https://github.com/anrieff/libcpuid
synced 2024-11-10 22:59:13 +00:00
parent
f8c7ee44e0
commit
dd702cd253
1 changed files with 2 additions and 1 deletions
|
@ -640,7 +640,8 @@ static int get_amd_multipliers(struct msr_info_t *info, uint32_t pstate, double
|
||||||
|
|
||||||
/* Constant values for common families */
|
/* Constant values for common families */
|
||||||
const int magic_constant = (info->id->ext_family == 0x11) ? 0x8 : 0x10;
|
const int magic_constant = (info->id->ext_family == 0x11) ? 0x8 : 0x10;
|
||||||
const double divisor = ((FUSION_C <= info->internal->code.amd) && (info->internal->code.amd <= FUSION_A)) ? 1.0 : 2.0;
|
const int is_apu = ((FUSION_C <= info->internal->code.amd) && (info->internal->code.amd <= FUSION_A)) || (info->internal->bits & _APU_);
|
||||||
|
const double divisor = is_apu ? 1.0 : 2.0;
|
||||||
|
|
||||||
/* Check if P-state is valid */
|
/* Check if P-state is valid */
|
||||||
if (pstate < MSR_PSTATE_0 || MSR_PSTATE_7 < pstate)
|
if (pstate < MSR_PSTATE_0 || MSR_PSTATE_7 < pstate)
|
||||||
|
|
Loading…
Reference in a new issue