#
1.8 |
|
13-Jul-2023 |
kettenis |
Use the deep idle state available on Apple M1/M2 cores in the idle loop and for suspend. This state makes the CPU lose some of its register state so we need to save these registers before putting the core to sleep and restore them when we wake up. This deep idle state has a higher wakeup latency than the normal WFI idle state. Use similar logic as acpucpu(4) to decide which idle state to pick.
If some cores of a cluster are in this deep idle state, turbo states become available to the cores that remain active. So stop skipping these states. This improves single-core performance a little bit.
The main win is in power savings when running in a state with a high clock frequency. My M2 Pro mini goes from 14W to 6.5W when idle at the maximum clock frequency. But event at the lowest clock frequency there are small but significant power savings.
ok deraadt@, tobhe@
|
#
1.7 |
|
09-May-2023 |
kettenis |
Apparently there is no need to set the PS2 field.
ok patrick@
|
#
1.6 |
|
16-Apr-2023 |
kettenis |
The lowest performance level state for the E-cores on the M2 Pro/Max is 2 instead of 1. Handle this by taking the lowest state from the opp tables instead of hardcoding it. Fixes cpuperf on the M2 Pro/Max.
ok patrick@
|
Revision tags: OPENBSD_7_3_BASE
|
#
1.5 |
|
03-Dec-2022 |
kettenis |
The device tree bindings for aplcpu(4) changed once more, recycling the "apple,cluster-cpufreq" compatible that was used for the first version. Add support for the "new new" binding while retaining support for the "old new" binding. Hopefully nobody is using the "old" binding anymore now that we update the m1n1+u-boot+dtb "boot firmware" automatically on sysupgrade.
ok patrick@, tobhe@
|
#
1.4 |
|
18-Oct-2022 |
kettenis |
No longer match on "apple,cluster-cpufreq" compatible string.
ok miod@, kn@
|
Revision tags: OPENBSD_7_2_BASE
|
#
1.3 |
|
25-Aug-2022 |
kettenis |
The "Avalanche" performance cores on Apple's M2 SoC have more than 16 P-states. As a result the layout of the "state" register changed. Make the driver handle that.
Also make sure we use the correct lowest state in case the lowest frequency of the performance cores is different from the lowest frequency of the efficiency cores.
ok tobhe@
|
#
1.2 |
|
26-May-2022 |
kettenis |
Adjust compatible string to match what has been submitted to mainline Linux. Keep supporting the old compatible string for a bit longer. Add frequency sensors that reflect the actual frequencies the CPU clusters are running at as reported by the hardware.
ok patrick@
|
Revision tags: OPENBSD_7_1_BASE
|
#
1.1 |
|
20-Feb-2022 |
kettenis |
Add aplcpu(4), a driver to control the CPU performance levels on Apple SoCs.
ok gnezdo@
|
#
1.7 |
|
09-May-2023 |
kettenis |
Apparently there is no need to set the PS2 field.
ok patrick@
|
#
1.6 |
|
16-Apr-2023 |
kettenis |
The lowest performance level state for the E-cores on the M2 Pro/Max is 2 instead of 1. Handle this by taking the lowest state from the opp tables instead of hardcoding it. Fixes cpuperf on the M2 Pro/Max.
ok patrick@
|
Revision tags: OPENBSD_7_3_BASE
|
#
1.5 |
|
03-Dec-2022 |
kettenis |
The device tree bindings for aplcpu(4) changed once more, recycling the "apple,cluster-cpufreq" compatible that was used for the first version. Add support for the "new new" binding while retaining support for the "old new" binding. Hopefully nobody is using the "old" binding anymore now that we update the m1n1+u-boot+dtb "boot firmware" automatically on sysupgrade.
ok patrick@, tobhe@
|
#
1.4 |
|
18-Oct-2022 |
kettenis |
No longer match on "apple,cluster-cpufreq" compatible string.
ok miod@, kn@
|
Revision tags: OPENBSD_7_2_BASE
|
#
1.3 |
|
25-Aug-2022 |
kettenis |
The "Avalanche" performance cores on Apple's M2 SoC have more than 16 P-states. As a result the layout of the "state" register changed. Make the driver handle that.
Also make sure we use the correct lowest state in case the lowest frequency of the performance cores is different from the lowest frequency of the efficiency cores.
ok tobhe@
|
#
1.2 |
|
26-May-2022 |
kettenis |
Adjust compatible string to match what has been submitted to mainline Linux. Keep supporting the old compatible string for a bit longer. Add frequency sensors that reflect the actual frequencies the CPU clusters are running at as reported by the hardware.
ok patrick@
|
Revision tags: OPENBSD_7_1_BASE
|
#
1.1 |
|
20-Feb-2022 |
kettenis |
Add aplcpu(4), a driver to control the CPU performance levels on Apple SoCs.
ok gnezdo@
|
#
1.6 |
|
16-Apr-2023 |
kettenis |
The lowest performance level state for the E-cores on the M2 Pro/Max is 2 instead of 1. Handle this by taking the lowest state from the opp tables instead of hardcoding it. Fixes cpuperf on the M2 Pro/Max.
ok patrick@
|
Revision tags: OPENBSD_7_3_BASE
|
#
1.5 |
|
03-Dec-2022 |
kettenis |
The device tree bindings for aplcpu(4) changed once more, recycling the "apple,cluster-cpufreq" compatible that was used for the first version. Add support for the "new new" binding while retaining support for the "old new" binding. Hopefully nobody is using the "old" binding anymore now that we update the m1n1+u-boot+dtb "boot firmware" automatically on sysupgrade.
ok patrick@, tobhe@
|
#
1.4 |
|
18-Oct-2022 |
kettenis |
No longer match on "apple,cluster-cpufreq" compatible string.
ok miod@, kn@
|
Revision tags: OPENBSD_7_2_BASE
|
#
1.3 |
|
25-Aug-2022 |
kettenis |
The "Avalanche" performance cores on Apple's M2 SoC have more than 16 P-states. As a result the layout of the "state" register changed. Make the driver handle that.
Also make sure we use the correct lowest state in case the lowest frequency of the performance cores is different from the lowest frequency of the efficiency cores.
ok tobhe@
|
#
1.2 |
|
26-May-2022 |
kettenis |
Adjust compatible string to match what has been submitted to mainline Linux. Keep supporting the old compatible string for a bit longer. Add frequency sensors that reflect the actual frequencies the CPU clusters are running at as reported by the hardware.
ok patrick@
|
Revision tags: OPENBSD_7_1_BASE
|
#
1.1 |
|
20-Feb-2022 |
kettenis |
Add aplcpu(4), a driver to control the CPU performance levels on Apple SoCs.
ok gnezdo@
|
#
1.5 |
|
03-Dec-2022 |
kettenis |
The device tree bindings for aplcpu(4) changed once more, recycling the "apple,cluster-cpufreq" compatible that was used for the first version. Add support for the "new new" binding while retaining support for the "old new" binding. Hopefully nobody is using the "old" binding anymore now that we update the m1n1+u-boot+dtb "boot firmware" automatically on sysupgrade.
ok patrick@, tobhe@
|
#
1.4 |
|
18-Oct-2022 |
kettenis |
No longer match on "apple,cluster-cpufreq" compatible string.
ok miod@, kn@
|
Revision tags: OPENBSD_7_2_BASE
|
#
1.3 |
|
25-Aug-2022 |
kettenis |
The "Avalanche" performance cores on Apple's M2 SoC have more than 16 P-states. As a result the layout of the "state" register changed. Make the driver handle that.
Also make sure we use the correct lowest state in case the lowest frequency of the performance cores is different from the lowest frequency of the efficiency cores.
ok tobhe@
|
#
1.2 |
|
26-May-2022 |
kettenis |
Adjust compatible string to match what has been submitted to mainline Linux. Keep supporting the old compatible string for a bit longer. Add frequency sensors that reflect the actual frequencies the CPU clusters are running at as reported by the hardware.
ok patrick@
|
Revision tags: OPENBSD_7_1_BASE
|
#
1.1 |
|
20-Feb-2022 |
kettenis |
Add aplcpu(4), a driver to control the CPU performance levels on Apple SoCs.
ok gnezdo@
|
#
1.4 |
|
18-Oct-2022 |
kettenis |
No longer match on "apple,cluster-cpufreq" compatible string.
ok miod@, kn@
|
Revision tags: OPENBSD_7_2_BASE
|
#
1.3 |
|
25-Aug-2022 |
kettenis |
The "Avalanche" performance cores on Apple's M2 SoC have more than 16 P-states. As a result the layout of the "state" register changed. Make the driver handle that.
Also make sure we use the correct lowest state in case the lowest frequency of the performance cores is different from the lowest frequency of the efficiency cores.
ok tobhe@
|
#
1.2 |
|
26-May-2022 |
kettenis |
Adjust compatible string to match what has been submitted to mainline Linux. Keep supporting the old compatible string for a bit longer. Add frequency sensors that reflect the actual frequencies the CPU clusters are running at as reported by the hardware.
ok patrick@
|
Revision tags: OPENBSD_7_1_BASE
|
#
1.1 |
|
20-Feb-2022 |
kettenis |
Add aplcpu(4), a driver to control the CPU performance levels on Apple SoCs.
ok gnezdo@
|
#
1.3 |
|
25-Aug-2022 |
kettenis |
The "Avalanche" performance cores on Apple's M2 SoC have more than 16 P-states. As a result the layout of the "state" register changed. Make the driver handle that.
Also make sure we use the correct lowest state in case the lowest frequency of the performance cores is different from the lowest frequency of the efficiency cores.
ok tobhe@
|
#
1.2 |
|
26-May-2022 |
kettenis |
Adjust compatible string to match what has been submitted to mainline Linux. Keep supporting the old compatible string for a bit longer. Add frequency sensors that reflect the actual frequencies the CPU clusters are running at as reported by the hardware.
ok patrick@
|
Revision tags: OPENBSD_7_1_BASE
|
#
1.1 |
|
20-Feb-2022 |
kettenis |
Add aplcpu(4), a driver to control the CPU performance levels on Apple SoCs.
ok gnezdo@
|
#
1.2 |
|
26-May-2022 |
kettenis |
Adjust compatible string to match what has been submitted to mainline Linux. Keep supporting the old compatible string for a bit longer. Add frequency sensors that reflect the actual frequencies the CPU clusters are running at as reported by the hardware.
ok patrick@
|
Revision tags: OPENBSD_7_1_BASE
|
#
1.1 |
|
20-Feb-2022 |
kettenis |
Add aplcpu(4), a driver to control the CPU performance levels on Apple SoCs.
ok gnezdo@
|
#
1.1 |
|
20-Feb-2022 |
kettenis |
Add aplcpu(4), a driver to control the CPU performance levels on Apple SoCs.
ok gnezdo@
|