Commit 0834667
cpufreq: ACPI: Fix max-frequency computation
Commit 3c55e94 ("cpufreq: ACPI: Extend frequency tables to cover
boost frequencies") introduced an assumption in acpi_cpufreq_cpu_init()
that the first entry in the P-state table was the nominal frequency.
This assumption is incorrect. The frequency corresponding to the P0
P-State need not be the same as the nominal frequency advertised via
CPPC.
Since the driver is using the CPPC.highest_perf and CPPC.nominal_perf
to compute the boost-ratio, it makes sense to use CPPC.nominal_freq to
compute the max-frequency. CPPC.nominal_freq is advertised on
platforms supporting CPPC revisions 3 or higher.
Hence, fallback to using the first entry in the P-State table only on
platforms that do not advertise CPPC.nominal_freq.
Fixes: 3c55e94 ("cpufreq: ACPI: Extend frequency tables to cover boost frequencies")
Tested-by: Dhananjay Ugwekar <[email protected]>
Signed-off-by: Gautham R. Shenoy <[email protected]>
Reviewed-by: Mario Limonciello <[email protected]>
Link: https://patch.msgid.link/[email protected]
[ rjw: Retain reverse X-mas tree ordering of local variable declarations ]
[ rjw: Subject and changelog edits ]
Signed-off-by: Rafael J. Wysocki <[email protected]>1 parent 7420a7e commit 0834667
1 file changed
+27
-9
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
623 | 623 | | |
624 | 624 | | |
625 | 625 | | |
626 | | - | |
| 626 | + | |
| 627 | + | |
| 628 | + | |
| 629 | + | |
| 630 | + | |
| 631 | + | |
| 632 | + | |
| 633 | + | |
627 | 634 | | |
628 | 635 | | |
629 | 636 | | |
| |||
652 | 659 | | |
653 | 660 | | |
654 | 661 | | |
| 662 | + | |
| 663 | + | |
| 664 | + | |
655 | 665 | | |
656 | 666 | | |
657 | 667 | | |
| |||
664 | 674 | | |
665 | 675 | | |
666 | 676 | | |
| 677 | + | |
667 | 678 | | |
668 | | - | |
| 679 | + | |
| 680 | + | |
| 681 | + | |
| 682 | + | |
669 | 683 | | |
670 | 684 | | |
671 | 685 | | |
| |||
675 | 689 | | |
676 | 690 | | |
677 | 691 | | |
| 692 | + | |
678 | 693 | | |
679 | 694 | | |
680 | | - | |
681 | 695 | | |
682 | 696 | | |
683 | 697 | | |
| |||
827 | 841 | | |
828 | 842 | | |
829 | 843 | | |
830 | | - | |
| 844 | + | |
831 | 845 | | |
832 | | - | |
| 846 | + | |
833 | 847 | | |
834 | 848 | | |
835 | | - | |
836 | | - | |
837 | | - | |
838 | | - | |
| 849 | + | |
| 850 | + | |
| 851 | + | |
| 852 | + | |
| 853 | + | |
839 | 854 | | |
| 855 | + | |
| 856 | + | |
| 857 | + | |
840 | 858 | | |
841 | 859 | | |
842 | 860 | | |
| |||
0 commit comments