Commit bf44b90
powercap: intel_rapl: Make cpu optional for rapl_package
MSR RAPL Interface always removes a rapl_package when all the CPUs in
that rapl_package are offlined. This is because it relies on an online
CPU to access the MSR.
But for RAPL Interface using MMIO registers, when all the cpus within
the rapl_package are offlined,
1. the register can still be accessed
2. monitoring and setting the Power Pimits for the rapl_package is still
meaningful because of uncore power.
This means that, a valid rapl_package doesn't rely on one or more cpus
being onlined.
For this sense, make cpu optional for rapl_package. A rapl_package can
be registered either using a CPU id to represent the physical
package/die, or using the physical package id directly.
Note that, the thermal throttling interrupt is not disabled via
MSR_IA32_PACKAGE_THERM_INTERRUPT for such rapl_package at the moment.
If it is still needed in the future, this can be achieved by selecting
an onlined CPU using the physical package id.
Note that, processor_thermal_rapl, the current MMIO RAPL Interface
driver, can also be converted to register using a package id instead.
But this is not done right now because processor_thermal_rapl driver
works on single-package systems only, and offlining the only package
will not happen. So keep the previous logic.
Signed-off-by: Zhang Rui <rui.zhang@intel.com>
Tested-by: Wang Wendy <wendy.wang@intel.com>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>1 parent 693c1d7 commit bf44b90
4 files changed
Lines changed: 60 additions & 44 deletions
File tree
- drivers
- powercap
- thermal/intel/int340x_thermal
- include/linux
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
532 | 532 | | |
533 | 533 | | |
534 | 534 | | |
| 535 | + | |
| 536 | + | |
| 537 | + | |
| 538 | + | |
| 539 | + | |
| 540 | + | |
535 | 541 | | |
536 | 542 | | |
537 | 543 | | |
| |||
550 | 556 | | |
551 | 557 | | |
552 | 558 | | |
553 | | - | |
554 | | - | |
| 559 | + | |
| 560 | + | |
| 561 | + | |
555 | 562 | | |
556 | 563 | | |
| 564 | + | |
557 | 565 | | |
558 | 566 | | |
559 | 567 | | |
| |||
725 | 733 | | |
726 | 734 | | |
727 | 735 | | |
728 | | - | |
729 | 736 | | |
730 | 737 | | |
731 | 738 | | |
| |||
734 | 741 | | |
735 | 742 | | |
736 | 743 | | |
737 | | - | |
738 | | - | |
739 | 744 | | |
740 | 745 | | |
741 | 746 | | |
| |||
744 | 749 | | |
745 | 750 | | |
746 | 751 | | |
747 | | - | |
748 | | - | |
| 752 | + | |
| 753 | + | |
749 | 754 | | |
750 | 755 | | |
751 | 756 | | |
| |||
766 | 771 | | |
767 | 772 | | |
768 | 773 | | |
769 | | - | |
770 | 774 | | |
771 | 775 | | |
772 | 776 | | |
773 | 777 | | |
774 | 778 | | |
775 | 779 | | |
776 | 780 | | |
777 | | - | |
778 | 781 | | |
779 | 782 | | |
780 | 783 | | |
| |||
785 | 788 | | |
786 | 789 | | |
787 | 790 | | |
788 | | - | |
| 791 | + | |
789 | 792 | | |
790 | 793 | | |
791 | 794 | | |
| |||
835 | 838 | | |
836 | 839 | | |
837 | 840 | | |
838 | | - | |
839 | | - | |
840 | | - | |
| 841 | + | |
| 842 | + | |
| 843 | + | |
841 | 844 | | |
842 | 845 | | |
843 | 846 | | |
| |||
863 | 866 | | |
864 | 867 | | |
865 | 868 | | |
866 | | - | |
867 | | - | |
868 | | - | |
| 869 | + | |
| 870 | + | |
| 871 | + | |
869 | 872 | | |
870 | 873 | | |
871 | 874 | | |
| |||
911 | 914 | | |
912 | 915 | | |
913 | 916 | | |
| 917 | + | |
| 918 | + | |
| 919 | + | |
914 | 920 | | |
915 | 921 | | |
916 | 922 | | |
| |||
925 | 931 | | |
926 | 932 | | |
927 | 933 | | |
| 934 | + | |
| 935 | + | |
| 936 | + | |
928 | 937 | | |
929 | 938 | | |
930 | 939 | | |
| |||
1263 | 1272 | | |
1264 | 1273 | | |
1265 | 1274 | | |
1266 | | - | |
| 1275 | + | |
1267 | 1276 | | |
1268 | 1277 | | |
1269 | 1278 | | |
| |||
1401 | 1410 | | |
1402 | 1411 | | |
1403 | 1412 | | |
1404 | | - | |
| 1413 | + | |
1405 | 1414 | | |
1406 | | - | |
1407 | 1415 | | |
| 1416 | + | |
| 1417 | + | |
| 1418 | + | |
| 1419 | + | |
| 1420 | + | |
| 1421 | + | |
1408 | 1422 | | |
1409 | 1423 | | |
1410 | | - | |
| 1424 | + | |
1411 | 1425 | | |
1412 | 1426 | | |
1413 | 1427 | | |
| |||
1417 | 1431 | | |
1418 | 1432 | | |
1419 | 1433 | | |
1420 | | - | |
| 1434 | + | |
1421 | 1435 | | |
1422 | | - | |
1423 | 1436 | | |
1424 | 1437 | | |
1425 | 1438 | | |
1426 | 1439 | | |
1427 | 1440 | | |
1428 | 1441 | | |
1429 | 1442 | | |
1430 | | - | |
1431 | | - | |
1432 | | - | |
1433 | | - | |
| 1443 | + | |
| 1444 | + | |
| 1445 | + | |
| 1446 | + | |
| 1447 | + | |
| 1448 | + | |
| 1449 | + | |
| 1450 | + | |
| 1451 | + | |
| 1452 | + | |
| 1453 | + | |
| 1454 | + | |
| 1455 | + | |
| 1456 | + | |
1434 | 1457 | | |
| 1458 | + | |
1435 | 1459 | | |
1436 | 1460 | | |
1437 | 1461 | | |
1438 | 1462 | | |
1439 | | - | |
1440 | | - | |
1441 | | - | |
1442 | | - | |
1443 | | - | |
1444 | | - | |
1445 | | - | |
1446 | | - | |
1447 | 1463 | | |
1448 | 1464 | | |
1449 | 1465 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
68 | 68 | | |
69 | 69 | | |
70 | 70 | | |
71 | | - | |
| 71 | + | |
72 | 72 | | |
73 | | - | |
| 73 | + | |
74 | 74 | | |
75 | 75 | | |
76 | 76 | | |
| |||
83 | 83 | | |
84 | 84 | | |
85 | 85 | | |
86 | | - | |
| 86 | + | |
87 | 87 | | |
88 | 88 | | |
89 | 89 | | |
| |||
Lines changed: 3 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
27 | 27 | | |
28 | 28 | | |
29 | 29 | | |
30 | | - | |
| 30 | + | |
31 | 31 | | |
32 | | - | |
| 32 | + | |
33 | 33 | | |
34 | 34 | | |
35 | 35 | | |
| |||
42 | 42 | | |
43 | 43 | | |
44 | 44 | | |
45 | | - | |
| 45 | + | |
46 | 46 | | |
47 | 47 | | |
48 | 48 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
135 | 135 | | |
136 | 136 | | |
137 | 137 | | |
138 | | - | |
139 | | - | |
| 138 | + | |
| 139 | + | |
140 | 140 | | |
141 | 141 | | |
142 | 142 | | |
| |||
161 | 161 | | |
162 | 162 | | |
163 | 163 | | |
164 | | - | |
165 | | - | |
| 164 | + | |
| 165 | + | |
166 | 166 | | |
167 | 167 | | |
168 | 168 | | |
0 commit comments