powerpc/fsl: support low power boot for e500 and later
PATCH v2 1/1 powerpc/fsl: support low power boot for e500 and later
From: Wang Dongsheng <[email protected]>
low power boot means u-boot will put non-boot cpus into a low power status. Non-boot cpus don't need any more spin wait. e500, e500v2 will going to DOZE status. e500mc, e5500, e6500 will going to PW10 state.
e500/e500v2 will be kicked up by MPIC-IPI, e500mc later will be kicked up by doorbell.
This feature tested on:
POWER UP TEST:
P1022DS(e500v2),96k times.
P4080(e500mc), 110k times. T1024(e5500), 83k times. T4240(e6500), 150k times.
CPU HOTPLUG TEST:
P1022DS(e500v2),1.4 million times.
P4080(e500mc), 1.8 million times. T1024(e5500), 1.3 million times. T4240(e6500), 1.1 million times.
---
*V2*
Add:
Add Config option to select Boot Method, Boot by SPIN TABLE or Boot By LOW POWER.
The default boot method is SPIN TABLE.
Modify:
Rebase code to compatible with spin.
Delete:
Delete e6500rev2 PW20 state.
The default boot method SPIN TABLE has tested on last kernel. The low power boot method need add a kernel patch to support. Now PPC smp cpu boot, cpu hotplug, sleep, and deep sleep patches is rebasing for upstream, after ppc smp cpu boot upstreamed i will commit a kernel patch to complete support low power boot method.
arch/powerpc/cpu/mpc85xx/Kconfig +23 -0
@@ -199,3 +199,26 @@ source "board/xes/xpedite550x/Kconfig" source "board/Arcturus/ucp1020/Kconfig" endmenu + +menu "mpc85xx CPU Boot Method" + depends on MPC85xx + +choice + prompt "Boot select" + default BOOT_BY_SPIN + +config BOOT_BY_SPIN + bool "Spin boot cpus" + help + Non-boot cpus will be falled in a spin state when U-boot + started up. + +config BOOT_BY_LOW_POWER + bool "Low power boot cpus" + help + Non-boot cpus will be falled in a low power state when U-boot + started up. + +endchoice + +endmenu
arch/powerpc/cpu/mpc85xx/cpu.c +5 -0
@@ -284,6 +284,11 @@ int checkcpu (void)puts ("\n" );#endif +#if defined(CONFIG_BOOT_BY_SPIN ) +printf ("Boot-Method: SPIN BOOT\n" ); +#elif defined(CONFIG_BOOT_BY_LOW_POWER ) +printf ("Boot-Method: LOW POWER BOOT\n" ); +#endif return 0 ; }
arch/powerpc/cpu/mpc85xx/release.S +65 -0
88 lines not on this page · raw message
arch/powerpc/include/asm/processor.h +1 -0
@@ -482,6 +482,7 @@#define SPRN_GIVOR8 0x1bb/* Guest Interrupt Vector Offset Register 8 */ #define SPRN_GIVOR13 0x1bc/* Guest Interrupt Vector Offset Register 13 */ #define SPRN_GIVOR14 0x1bd/* Guest Interrupt Vector Offset Register 14 */ +#define SPRN_EPR 0x2be/* External Proxy Register */ /* e500 definitions */ #define SPRN_L1CFG0 0x203/* L1 Cache Configuration Register 0 */
Signature · 1 line
2.1.0.27.g96db324
PATCH v2 1/1 powerpc/fsl: support low power boot for e500 and later
Quoted 65 lines · Dongsheng Wang
From: Wang Dongsheng <[email protected]>
low power boot means u-boot will put non-boot cpus into a low power status. Non-boot cpus don't need any more spin wait. e500, e500v2 will going to DOZE status. e500mc, e5500, e6500 will going to PW10 state.
e500/e500v2 will be kicked up by MPIC-IPI, e500mc later will be kicked up by doorbell.
This feature tested on:
POWER UP TEST:
P1022DS(e500v2),96k times.P4080(e500mc), 110k times. T1024(e5500), 83k times. T4240(e6500), 150k times.CPU HOTPLUG TEST:
P1022DS(e500v2),1.4 million times.P4080(e500mc), 1.8 million times. T1024(e5500), 1.3 million times. T4240(e6500), 1.1 million times.Signed-off-by Wang Dongsheng <[email protected]>---
*V2*
Add:
Add Config option to select Boot Method, Boot by SPIN TABLE or Boot By LOW POWER.
The default boot method is SPIN TABLE.Modify:
Rebase code to compatible with spin.Delete:
Delete e6500rev2 PW20 state.The default boot method SPIN TABLE has tested on last kernel. The low power boot
method need add a kernel patch to support. Now PPC smp cpu boot, cpu hotplug,
sleep, and deep sleep patches is rebasing for upstream, after ppc smp cpu boot
upstreamed i will commit a kernel patch to complete support low power boot method.arch/powerpc/cpu/mpc85xx/Kconfig +11
-0@@ -199,3 +199,26 @@ source "board/xes/xpedite550x/Kconfig" source "board/Arcturus/ucp1020/Kconfig" endmenu + +menu "mpc85xx CPU Boot Method" + depends on MPC85xx + +choice + prompt "Boot select" + default BOOT_BY_SPIN + +config BOOT_BY_SPIN + bool "Spin boot cpus" + help
arch/powerpc/cpu/mpc85xx/Kconfig source "board/xes/xpedite550x/Kconfig" · line 222
Quoted 10 lines
arch/powerpc/cpu/mpc85xx/Kconfig +10
-0+ Non-boot cpus will be falled in a spin state when U-boot + started up. + +config BOOT_BY_LOW_POWER + bool "Low power boot cpus" + help + Non-boot cpus will be falled in a low power state when U-boot + started up. + +endchoice
I was going to say that this could be made dynamically configurable by always putting the cores into low power mode, and then waking them at bootm time if the spin table is chosen in the environment -- but if we can do that, we can also just leave the secondary cpus in holdoff until bootm.
At that point, we might as well just always use the spin table because the time from bootm to the OS releasing the secondaries should be small.
-Scott
PATCH v2 1/1 powerpc/fsl: support low power boot for e500 and later
Hi Scott,
Quoted 89 lines
-----Original Message-----
From: Wood Scott-B07421
Sent: Wednesday, August 12, 2015 12:55 PM
To: Wang Dongsheng-B40534
Cc: Sun York-R58495; u-boot at lists.denx.de
Subject: Re: [PATCH v2] powerpc/fsl: support low power boot for e500 and laterQuoted 65 lines · Dongsheng Wang
From: Wang Dongsheng <[email protected]>
low power boot means u-boot will put non-boot cpus into a low power status. Non-boot cpus don't need any more spin wait. e500, e500v2 will going to DOZE status. e500mc, e5500, e6500 will going to PW10 state.
e500/e500v2 will be kicked up by MPIC-IPI, e500mc later will be kicked up by doorbell.
This feature tested on:
POWER UP TEST:
P1022DS(e500v2),96k times.P4080(e500mc), 110k times. T1024(e5500), 83k times. T4240(e6500), 150k times.CPU HOTPLUG TEST:
P1022DS(e500v2),1.4 million times.P4080(e500mc), 1.8 million times. T1024(e5500), 1.3 million times. T4240(e6500), 1.1 million times.Signed-off-by Wang Dongsheng <[email protected]>---
*V2*
Add:
Add Config option to select Boot Method, Boot by SPIN TABLE or Boot By LOW POWER.
The default boot method is SPIN TABLE.Modify:
Rebase code to compatible with spin.Delete:
Delete e6500rev2 PW20 state.The default boot method SPIN TABLE has tested on last kernel. The low power boot
method need add a kernel patch to support. Now PPC smp cpu boot, cpu hotplug,
sleep, and deep sleep patches is rebasing for upstream, after ppc smp cpu boot
upstreamed i will commit a kernel patch to complete support low power boot method.arch/powerpc/cpu/mpc85xx/Kconfig +11
-0@@ -199,3 +199,26 @@ source "board/xes/xpedite550x/Kconfig" source "board/Arcturus/ucp1020/Kconfig" endmenu + +menu "mpc85xx CPU Boot Method" + depends on MPC85xx + +choice + prompt "Boot select" + default BOOT_BY_SPIN + +config BOOT_BY_SPIN + bool "Spin boot cpus" + helparch/powerpc/cpu/mpc85xx/Kconfig source "board/xes/xpedite550x/Kconfig" · line 222
Quoted 10 lines
arch/powerpc/cpu/mpc85xx/Kconfig +10
-0+ Non-boot cpus will be falled in a spin state when U-boot + started up. + +config BOOT_BY_LOW_POWER + bool "Low power boot cpus" + help + Non-boot cpus will be falled in a low power state when U-boot + started up. + +endchoiceI was going to say that this could be made dynamically configurable by always putting the cores into low power mode, and then waking them at bootm time if the spin table is chosen in the environment -- but if we can do that, we can also just leave the secondary cpus in holdoff until bootm.
Quoted 3 lines
At that point, we might as well just always use the spin table because the time from bootm to the OS releasing the secondaries should be small.
Yes, if all of cpus will enable in kernel. But in some cases we do not enable all the CPU in the kernel, so we need to push them to low power state.
Regards,
-Dongsheng
PATCH v2 1/1 powerpc/fsl: support low power boot for e500 and later
Quoted 100 lines · On Wed, 2015-08-12 at 00:15 -0500, Wang Dongsheng-B40534 wrote:
Hi Scott,
Quoted 98 lines
-----Original Message-----
From: Wood Scott-B07421
Sent: Wednesday, August 12, 2015 12:55 PM
To: Wang Dongsheng-B40534
Cc: Sun York-R58495; u-boot at lists.denx.de
Subject: Re: [PATCH v2] powerpc/fsl: support low power boot for e500 and laterQuoted 70 lines · Dongsheng Wang
From: Wang Dongsheng <[email protected]>
low power boot means u-boot will put non-boot cpus into a low power status. Non-boot cpus don't need any more spin wait. e500, e500v2 will going to DOZE status. e500mc, e5500, e6500 will going to PW10 state.
e500/e500v2 will be kicked up by MPIC-IPI, e500mc later will be kicked up
by doorbell.This feature tested on:
POWER UP TEST:
P1022DS(e500v2),96k times.P4080(e500mc), 110k times. T1024(e5500), 83k times. T4240(e6500), 150k times.CPU HOTPLUG TEST:
P1022DS(e500v2),1.4 million times.P4080(e500mc), 1.8 million times. T1024(e5500), 1.3 million times. T4240(e6500), 1.1 million times.Signed-off-by Wang Dongsheng <[email protected]>---
*V2*
Add:
Add Config option to select Boot Method, Boot by SPIN TABLE or Boot
By
LOW POWER.
The default boot method is SPIN TABLE.Modify:
Rebase code to compatible with spin.Delete:
Delete e6500rev2 PW20 state.The default boot method SPIN TABLE has tested on last kernel. The low power
boot
method need add a kernel patch to support. Now PPC smp cpu boot, cpu hotplug,
sleep, and deep sleep patches is rebasing for upstream, after ppc smp cpu
boot
upstreamed i will commit a kernel patch to complete support low power boot
method.arch/powerpc/cpu/mpc85xx/Kconfig +11
-0@@ -199,3 +199,26 @@ source "board/xes/xpedite550x/Kconfig" source "board/Arcturus/ucp1020/Kconfig" endmenu + +menu "mpc85xx CPU Boot Method" + depends on MPC85xx + +choice + prompt "Boot select" + default BOOT_BY_SPIN + +config BOOT_BY_SPIN + bool "Spin boot cpus" + helparch/powerpc/cpu/mpc85xx/Kconfig source "board/xes/xpedite550x/Kconfig" · line 222
Quoted 10 lines
arch/powerpc/cpu/mpc85xx/Kconfig +10
-0+ Non-boot cpus will be falled in a spin state when U-boot + started up. + +config BOOT_BY_LOW_POWER + bool "Low power boot cpus" + help + Non-boot cpus will be falled in a low power state when U-boot + started up. + +endchoiceI was going to say that this could be made dynamically configurable by always
putting the cores into low power mode, and then waking them at bootm time if
the spin table is chosen in the environment -- but if we can do that, we can
also just leave the secondary cpus in holdoff until bootm.
Quoted 6 lines
Quoted 3 lines
At that point, we might as well just always use the spin table because the time from bootm to the OS releasing the secondaries should be small.
Yes, if all of cpus will enable in kernel. But in some cases we do not enable all
the CPU in the kernel, so we need to push them to low power state.
If you don't plan to release a CPU in the OS, tell U-Boot to keep it disabled.
-Scott
PATCH v2 1/1 powerpc/fsl: support low power boot for e500 and later
Hi Scott,
Quoted 102 lines
-----Original Message-----
From: Wood Scott-B07421
Sent: Wednesday, August 12, 2015 1:18 PM
To: Wang Dongsheng-B40534
Cc: Sun York-R58495; u-boot at lists.denx.de
Subject: Re: [PATCH v2] powerpc/fsl: support low power boot for e500 and laterQuoted 16 lines · On Wed, 2015-08-12 at 00:15 -0500, Wang Dongsheng-B40534 wrote:
Hi Scott,
Quoted 14 lines
-----Original Message-----
From: Wood Scott-B07421
Sent: Wednesday, August 12, 2015 12:55 PM
To: Wang Dongsheng-B40534
Cc: Sun York-R58495; u-boot at lists.denx.de
Subject: Re: [PATCH v2] powerpc/fsl: support low power boot for e500 and laterQuoted 5 lines · Dongsheng Wang
From: Wang Dongsheng <[email protected]>
low power boot means u-boot will put non-boot cpus into a low power status. Non-boot cpus don't need any more spin wait. e500, e500v2 will going to DOZE status. e500mc, e5500, e6500 will going to PW10
state.
Quoted 75 lines
Quoted 75 lines
Quoted 58 lines
e500/e500v2 will be kicked up by MPIC-IPI, e500mc later will be kicked up by doorbell.
This feature tested on:
POWER UP TEST:
P1022DS(e500v2),96k times.P4080(e500mc), 110k times. T1024(e5500), 83k times. T4240(e6500), 150k times.CPU HOTPLUG TEST:
P1022DS(e500v2),1.4 million times.P4080(e500mc), 1.8 million times. T1024(e5500), 1.3 million times. T4240(e6500), 1.1 million times.Signed-off-by Wang Dongsheng <[email protected]>---
*V2*
Add:
Add Config option to select Boot Method, Boot by SPIN TABLE or
Boot By
LOW POWER.
The default boot method is SPIN TABLE.Modify:
Rebase code to compatible with spin.Delete:
Delete e6500rev2 PW20 state.The default boot method SPIN TABLE has tested on last kernel. The low power boot method need add a kernel patch to support. Now PPC smp cpu boot, cpu hotplug, sleep, and deep sleep patches is rebasing for upstream, after ppc smp cpu boot upstreamed i will commit a kernel patch to complete support low power boot method.
arch/powerpc/cpu/mpc85xx/Kconfig +11
-0@@ -199,3 +199,26 @@ source "board/xes/xpedite550x/Kconfig" source "board/Arcturus/ucp1020/Kconfig" endmenu + +menu "mpc85xx CPU Boot Method" + depends on MPC85xx + +choice + prompt "Boot select" + default BOOT_BY_SPIN + +config BOOT_BY_SPIN + bool "Spin boot cpus" + helparch/powerpc/cpu/mpc85xx/Kconfig source "board/xes/xpedite550x/Kconfig" · line 222
Quoted 10 lines
arch/powerpc/cpu/mpc85xx/Kconfig +10
-0+ Non-boot cpus will be falled in a spin state when U-boot + started up. + +config BOOT_BY_LOW_POWER + bool "Low power boot cpus" + help + Non-boot cpus will be falled in a low power state when U-boot + started up. + +endchoiceI was going to say that this could be made dynamically configurable by always putting the cores into low power mode, and then waking them at bootm time if the spin table is chosen in the environment -- but if we can do that, we can also just leave the secondary cpus in holdoff until bootm.
Quoted 2 lines
Quoted 2 lines
At that point, we might as well just always use the spin table because the time from bootm to the OS releasing the secondaries should be
Quoted 7 lines
small.
Quoted 4 lines
Quoted 1 line
Yes, if all of cpus will enable in kernel. But in some cases we do not enable all the CPU in the kernel, so we need to push them to low power state.
If you don't plan to release a CPU in the OS, tell U-Boot to keep it disabled.
Such as bootargs "maxcpus", as your said if we tell u-boot to keep it disabled, I think that is a new work for spin table, that is your talked hold off state when u-boot boot up?
You means drop this patch? And keep secondary cpus in hold off state when u-boot Boot up and if needed release them in bootm?
Regards,
-Dongsheng
PATCH v2 1/1 powerpc/fsl: support low power boot for e500 and later
Quoted 114 lines · On Wed, 2015-08-12 at 00:50 -0500, Wang Dongsheng-B40534 wrote:
Hi Scott,
Quoted 112 lines
-----Original Message-----
From: Wood Scott-B07421
Sent: Wednesday, August 12, 2015 1:18 PM
To: Wang Dongsheng-B40534
Cc: Sun York-R58495; u-boot at lists.denx.de
Subject: Re: [PATCH v2] powerpc/fsl: support low power boot for e500 and laterQuoted 17 lines · On Wed, 2015-08-12 at 00:15 -0500, Wang Dongsheng-B40534 wrote:
Hi Scott,
Quoted 15 lines
-----Original Message-----
From: Wood Scott-B07421
Sent: Wednesday, August 12, 2015 12:55 PM
To: Wang Dongsheng-B40534
Cc: Sun York-R58495; u-boot at lists.denx.de
Subject: Re: [PATCH v2] powerpc/fsl: support low power boot for e500 and laterQuoted 6 lines · Dongsheng Wang
From: Wang Dongsheng <[email protected]>
low power boot means u-boot will put non-boot cpus into a low power status. Non-boot cpus don't need any more spin wait. e500, e500v2 will going to DOZE status. e500mc, e5500, e6500 will going to PW10
state.
Quoted 76 lines
Quoted 76 lines
Quoted 66 lines
e500/e500v2 will be kicked up by MPIC-IPI, e500mc later will be kicked up by doorbell.
This feature tested on:
POWER UP TEST:
P1022DS(e500v2),96k times.P4080(e500mc), 110k times. T1024(e5500), 83k times. T4240(e6500), 150k times.CPU HOTPLUG TEST:
P1022DS(e500v2),1.4 million times.P4080(e500mc), 1.8 million times. T1024(e5500), 1.3 million times. T4240(e6500), 1.1 million times.Signed-off-by Wang Dongsheng <[email protected]>---
*V2*
Add:
Add Config option to select Boot Method, Boot by SPIN TABLE or
Boot By
LOW POWER.
The default boot method is SPIN TABLE.Modify:
Rebase code to compatible with spin.Delete:
Delete e6500rev2 PW20 state.The default boot method SPIN TABLE has tested on last kernel. The low power boot method need add a kernel patch to support. Now PPC smp cpu boot, cpu hotplug, sleep, and deep sleep patches is rebasing for upstream, after ppc smp cpu boot upstreamed i will commit a kernel patch to complete support low power boot method.
arch/powerpc/cpu/mpc85xx/Kconfig +18
-0@@ -199,3 +199,26 @@ source "board/xes/xpedite550x/Kconfig" source "board/Arcturus/ucp1020/Kconfig" endmenu + +menu "mpc85xx CPU Boot Method" + depends on MPC85xx + +choice + prompt "Boot select" + default BOOT_BY_SPIN + +config BOOT_BY_SPIN + bool "Spin boot cpus" + help + Non-boot cpus will be falled in a spin state when U-boot + started up. + +config BOOT_BY_LOW_POWER + bool "Low power boot cpus" + help + Non-boot cpus will be falled in a low power state when U-boot
arch/powerpc/cpu/mpc85xx/Kconfig source "board/xes/xpedite550x/Kconfig" · line 222
Quoted 3 lines
arch/powerpc/cpu/mpc85xx/Kconfig +3
-0+ started up. + +endchoiceI was going to say that this could be made dynamically configurable by always putting the cores into low power mode, and then waking them at bootm time if the spin table is chosen in the environment -- but if we can do that, we can also just leave the secondary cpus in holdoff until bootm.
Quoted 3 lines
Quoted 3 lines
At that point, we might as well just always use the spin table because the time from bootm to the OS releasing the secondaries should be
small.
Quoted 4 lines
Quoted 1 line
Yes, if all of cpus will enable in kernel. But in some cases we do not enable all the CPU in the kernel, so we need to push them to low power state.
Quoted 8 lines
Quoted 2 lines
If you don't plan to release a CPU in the OS, tell U-Boot to keep it disabled.
Such as bootargs "maxcpus", as your said if we tell u-boot to keep it disabled,
I think that is a new work for spin table, that is your talked hold off state when
u-boot boot up?
The spin table code itself shouldn't be affected much, but plat_mp_up() would be called later (during bootm), and should check coredisr1 to skip any CPUs that have been disabled by the user.
Quoted 3 lines
You means drop this patch? And keep secondary cpus in hold off state when u- boot
Boot up and if needed release them in bootm?
Yes.
-Scott