diff options
-rw-r--r-- | 0001-arm64-dts-allwinner-a64-h5-Add-CPU-idle-states.patch | 157 | ||||
-rw-r--r-- | PKGBUILD | 13 |
2 files changed, 5 insertions, 165 deletions
diff --git a/0001-arm64-dts-allwinner-a64-h5-Add-CPU-idle-states.patch b/0001-arm64-dts-allwinner-a64-h5-Add-CPU-idle-states.patch deleted file mode 100644 index 7aa451f..0000000 --- a/0001-arm64-dts-allwinner-a64-h5-Add-CPU-idle-states.patch +++ /dev/null @@ -1,157 +0,0 @@ -From 4c8fb634216bf73fac117436e1b936557dc97793 Mon Sep 17 00:00:00 2001 -From: Samuel Holland <samuel@sholland.org> -Date: Sat, 13 Mar 2021 23:54:25 -0600 -Subject: [PATCH] arm64: dts: allwinner: a64/h5: Add CPU idle states - -Powering off idle CPUs saves about 30 mW compared to using WFI only. -Additional power savings are possible by idling the L2 and downclocking -the cluster when all CPUs are idle. - -Entry and exit latency were measured using a logic analyzer, with GPIO -pins toggled in Linux after the calls to trace_cpu_idle() in -cpuidle_enter_state(), and in the power management firmware after CPU -power-off completes and immediately after detecting an interrupt. - -800 us and 1500 us are worst-case values, largely driven by the fact -that the power management firmware is single threaded. It can only -handle commands to power off CPUs one at a time, and it cannot process -any commands while powering on a CPU in response to an interrupt. - -The cluster suspend process reliably takes 36 us; I rounded this up to -50 us. If all CPUs enter the cluster idle state at the same time, exit -latency is actually reduced, because there is no contention in that -case. However, if only some CPUs enter the cluster idle state, behavior -is the same as for CPU idle. - -Polling delay for the power management firmware to detect a pending -interrupt is insignificant; it is less than 20 us. - -min-residency was chosen as the point where enabling the idle state -consumed no more average power than disabling the idle state at a -variety of interrupt rates. - -Signed-off-by: Samuel Holland <samuel@sholland.org> ---- - arch/arm64/boot/dts/allwinner/sun50i-a64.dtsi | 26 +++++++++++++++++++ - arch/arm64/boot/dts/allwinner/sun50i-h5.dtsi | 26 +++++++++++++++++++ - 2 files changed, 52 insertions(+) - -diff --git a/arch/arm64/boot/dts/allwinner/sun50i-a64.dtsi b/arch/arm64/boot/dts/allwinner/sun50i-a64.dtsi -index cac47cc50..83b198d12 100644 ---- a/arch/arm64/boot/dts/allwinner/sun50i-a64.dtsi -+++ b/arch/arm64/boot/dts/allwinner/sun50i-a64.dtsi -@@ -61,6 +61,7 @@ cpu0: cpu@0 { - clocks = <&ccu CLK_CPUX>; - clock-names = "cpu"; - #cooling-cells = <2>; -+ cpu-idle-states = <&cpu_sleep>, <&cluster_sleep>; - }; - - cpu1: cpu@1 { -@@ -72,6 +73,7 @@ cpu1: cpu@1 { - clocks = <&ccu CLK_CPUX>; - clock-names = "cpu"; - #cooling-cells = <2>; -+ cpu-idle-states = <&cpu_sleep>, <&cluster_sleep>; - }; - - cpu2: cpu@2 { -@@ -83,6 +85,7 @@ cpu2: cpu@2 { - clocks = <&ccu CLK_CPUX>; - clock-names = "cpu"; - #cooling-cells = <2>; -+ cpu-idle-states = <&cpu_sleep>, <&cluster_sleep>; - }; - - cpu3: cpu@3 { -@@ -94,6 +97,29 @@ cpu3: cpu@3 { - clocks = <&ccu CLK_CPUX>; - clock-names = "cpu"; - #cooling-cells = <2>; -+ cpu-idle-states = <&cpu_sleep>, <&cluster_sleep>; -+ }; -+ -+ idle-states { -+ entry-method = "psci"; -+ -+ cpu_sleep: cpu-sleep { -+ compatible = "arm,idle-state"; -+ local-timer-stop; -+ entry-latency-us = <800>; -+ exit-latency-us = <1500>; -+ min-residency-us = <25000>; -+ arm,psci-suspend-param = <0x00010003>; -+ }; -+ -+ cluster_sleep: cluster-sleep { -+ compatible = "arm,idle-state"; -+ local-timer-stop; -+ entry-latency-us = <850>; -+ exit-latency-us = <1500>; -+ min-residency-us = <50000>; -+ arm,psci-suspend-param = <0x01010013>; -+ }; - }; - - L2: l2-cache { -diff --git a/arch/arm64/boot/dts/allwinner/sun50i-h5.dtsi b/arch/arm64/boot/dts/allwinner/sun50i-h5.dtsi -index 62952660b..975a76a9f 100644 ---- a/arch/arm64/boot/dts/allwinner/sun50i-h5.dtsi -+++ b/arch/arm64/boot/dts/allwinner/sun50i-h5.dtsi -@@ -24,6 +24,7 @@ cpu0: cpu@0 { - clocks = <&ccu CLK_CPUX>; - clock-latency-ns = <244144>; /* 8 32k periods */ - #cooling-cells = <2>; -+ cpu-idle-states = <&cpu_sleep>, <&cluster_sleep>; - }; - - cpu1: cpu@1 { -@@ -34,6 +35,7 @@ cpu1: cpu@1 { - clocks = <&ccu CLK_CPUX>; - clock-latency-ns = <244144>; /* 8 32k periods */ - #cooling-cells = <2>; -+ cpu-idle-states = <&cpu_sleep>, <&cluster_sleep>; - }; - - cpu2: cpu@2 { -@@ -44,6 +46,7 @@ cpu2: cpu@2 { - clocks = <&ccu CLK_CPUX>; - clock-latency-ns = <244144>; /* 8 32k periods */ - #cooling-cells = <2>; -+ cpu-idle-states = <&cpu_sleep>, <&cluster_sleep>; - }; - - cpu3: cpu@3 { -@@ -54,6 +57,29 @@ cpu3: cpu@3 { - clocks = <&ccu CLK_CPUX>; - clock-latency-ns = <244144>; /* 8 32k periods */ - #cooling-cells = <2>; -+ cpu-idle-states = <&cpu_sleep>, <&cluster_sleep>; -+ }; -+ -+ idle-states { -+ entry-method = "psci"; -+ -+ cpu_sleep: cpu-sleep { -+ compatible = "arm,idle-state"; -+ local-timer-stop; -+ entry-latency-us = <800>; -+ exit-latency-us = <1500>; -+ min-residency-us = <25000>; -+ arm,psci-suspend-param = <0x00010003>; -+ }; -+ -+ cluster_sleep: cluster-sleep { -+ compatible = "arm,idle-state"; -+ local-timer-stop; -+ entry-latency-us = <850>; -+ exit-latency-us = <1500>; -+ min-residency-us = <50000>; -+ arm,psci-suspend-param = <0x01010013>; -+ }; - }; - }; - --- -2.39.0 - @@ -3,7 +3,7 @@ # Contributor: Jan Alexander Steffens (heftig) <heftig@archlinux.org> pkgbase=linux-pinephone -pkgver=6.12.8.megi1 +pkgver=6.12.9.megi1 pkgrel=1 pkgdesc='Pinephone Linux' url='https://git.kent-dobias.com/system/linux' @@ -32,7 +32,6 @@ source=( "$_srcname::git+file:///home/pants/dev/linux?signed#tag=$_srctag" config # the main kernel config file dts-pinephone-drop-modem-power-node.patch - 0001-arm64-dts-allwinner-a64-h5-Add-CPU-idle-states.patch ) validpgpkeys=( ABAF11C65A2970B130ABE3C479BE3E4300411886 # Linus Torvalds @@ -41,14 +40,12 @@ validpgpkeys=( 0E3A444DD0760E65901BF59679E824090BD31086 # Jaron Kent-Dobias ) # https://www.kernel.org/pub/linux/kernel/v6.x/sha256sums.asc -sha256sums=('bc55e72ec8656c9d6f9af7d1a55a91b61c00a88a180d14915ab20fb41def2c19' +sha256sums=('a9ddcf4f1e26d516171b9d0e7ad78f7c3e5e97a62dbc2547578e0553a00ba891' 'a2c3b02ecc3d6b00205685f61ce5063e0b185e065a92580be35d7a9a1f5c222e' - '4438dbb4fc8dd2788da95615cc97394591a6f5dc54851860f912c62fcc934973' - 'b63e4474efea0bfa183e3c6c1e65eadb096f9c06d60b6644f9b2db899e2d2061') -b2sums=('25ae4ea2c832b187a296a4feb68a2a1b91619047f67dd08516b9d0a9d3677da693d82839d6caa2580b7314947bb7c5f825c9eec21a1a38cf047e1e06e591d396' + '4438dbb4fc8dd2788da95615cc97394591a6f5dc54851860f912c62fcc934973') +b2sums=('c74c4d04d0e64bd714146eb7d0201fc7686852de5876f7f23d28fb9adefaa730d1c1f34ab46772a80ea9442473d1e39b17f15c00da23cf805bf9e409c9a07c8a' '4110686ed87c1f188d310d154ae506686edf4faccb521b473889eb1d68551a32bc7adde181a58d4f44e8f1ecf80fd51ccbb20bcd29803f28a5cd0ed83344528e' - 'a36eeb201687707a2662158c8ef8920609446d80315d18be4edb94cc5765743dcda0d98548779f2501a7eee4cba1713837dc5ecc5310c977edd3fd678f558414' - 'cb15e6c21c4770226869149099b46c2b20819ae4d66cdf1a8e02c782b451503fef4289fa00a4c0fc4ef60b09cf608c8aff7658fe8e0cbd6471446f75937c4758') + 'a36eeb201687707a2662158c8ef8920609446d80315d18be4edb94cc5765743dcda0d98548779f2501a7eee4cba1713837dc5ecc5310c977edd3fd678f558414') export KBUILD_BUILD_HOST=archlinux export KBUILD_BUILD_USER=$pkgbase |