File tree Expand file tree Collapse file tree 1 file changed +5
-2
lines changed
Expand file tree Collapse file tree 1 file changed +5
-2
lines changed Original file line number Diff line number Diff line change @@ -6566,7 +6566,7 @@ void Intel_Turbo_TDP_Config(CORE_RO *Core)
65666566
65676567 RDMSR (TurboActivation , MSR_TURBO_ACTIVATION_RATIO );
65686568
6569- if (( !TurboActivation .Ratio_Lock ) && (Turbo_Activation_Ratio >= 0 )
6569+ if (!TurboActivation .Ratio_Lock && (Turbo_Activation_Ratio >= 0 )
65706570 && (Turbo_Activation_Ratio != TurboActivation .MaxRatio ))
65716571 {
65726572 const short MaxRatio = \
@@ -15556,9 +15556,12 @@ static long CoreFreqK_ioctl( struct file *filp,
1555615556
1555715557 case COREFREQ_IOCTL_CONFIG_TDP : {
1555815558 CLOCK_ARG clockMod = {.sllong = arg };
15559+ const short MaxRatio = MAXCLOCK_TO_RATIO (short , \
15560+ PUBLIC (RO (Core ,AT (PUBLIC (RO (Proc ))-> Service .Core ))-> Clock .Hz ));
15561+
1555915562 switch (clockMod .NC ) {
1556015563 case CLOCK_MOD_ACT :
15561- if (clockMod .Ratio >= 0 )
15564+ if (( clockMod .Ratio >= 0 ) && ( clockMod . Ratio <= MaxRatio ) )
1556215565 {
1556315566 Controller_Stop (1 );
1556415567 Turbo_Activation_Ratio = clockMod .Ratio ;
You can’t perform that action at this time.
0 commit comments