arm: psci: implement cpuidle_ops
Hi all,
we'd like to use cpuidle-arm.c for both arm and arm64 with psci as backend. For arm64, it works. But for arm, we miss cpuidle_ops. I want to add cpuidle_ops for arm psci, I dunno whether this is the correct direction, could you please give suggestions?
Thanks,
Jisheng
Quoted 6 lines · Jisheng Zhang
Hi all,
we'd like to use
cpuidle-arm.cfor both arm and arm64 with psci as backend. For arm64, it works. But for arm, we misscpuidle_ops. I want to addcpuidle_opsfor arm psci, I dunno whether this is the correct direction, could you please give suggestions?
You should look at the macro
arch/arm/include/asm/cpuidle.h:
#define CPUIDLE_METHOD_OF_DECLARE(name, _method, _ops)
Signature · 5 lines
<http://www.linaro.org/> Linaro.org ? Open source software for ARM SoCs Follow Linaro: <http://www.facebook.com/pages/Linaro> Facebook | <http://twitter.com/#!/linaroorg> Twitter | <http://www.linaro.org/linaro-blog/> Blog
Quoted 11 lines · Daniel Lezcano
Quoted 9 lines · Jisheng Zhang
Hi all,
we'd like to use
cpuidle-arm.cfor both arm and arm64 with psci as backend. For
arm64, it works. But for arm, we misscpuidle_ops. I want to addcpuidle_opsfor
arm psci, I dunno whether this is the correct direction, could you please give
suggestions?
Quoted 5 lines
You should look at the macro
arch/arm/include/asm/cpuidle.h:#define
CPUIDLE_METHOD_OF_DECLARE(name, _method, _ops)
And more precisely, you can look at the code using it.
Signature · 5 lines
<http://www.linaro.org/> Linaro.org ? Open source software for ARM SoCs Follow Linaro: <http://www.facebook.com/pages/Linaro> Facebook | <http://twitter.com/#!/linaroorg> Twitter | <http://www.linaro.org/linaro-blog/> Blog
Dear Daniel,
Quoted 8 lines · On Thu, 2 Jul 2015 10:07:11 +0200 Daniel Lezcano <[email protected]>…
Quoted 6 lines · Jisheng Zhang
Hi all,
we'd like to use
cpuidle-arm.cfor both arm and arm64 with psci as backend. For arm64, it works. But for arm, we misscpuidle_ops. I want to addcpuidle_opsfor arm psci, I dunno whether this is the correct direction, could you please give suggestions?
Quoted 5 lines
You should look at the macro
arch/arm/include/asm/cpuidle.h:#define
CPUIDLE_METHOD_OF_DECLARE(name, _method, _ops)
Yep, this is what I want to use. I want to use this MACRO to implement cpuidle_ops for arm, but I dunno whether this is the correct direction. And I'd like to reuse cpu_psci_cpu_init_idle() function in arch/arm64/kernel/psci.c to parse the DT, but I'm not sure where to put cpu_psci_cpu_init_idle() so that can be shared between arm and arm64. Also I noticed that there's a psci unification work from Mark Rutland, does it make sense to put it in drivers/firmware/psci.c?
Thanks a lot,
Jisheng
Quoted 14 lines · On Thu, 2 Jul 2015 10:16:08 +0200 Daniel Lezcano <[email protected]>…
Quoted 13 lines · Daniel Lezcano
Quoted 9 lines · Jisheng Zhang
Hi all,
we'd like to use
cpuidle-arm.cfor both arm and arm64 with psci as backend. For
arm64, it works. But for arm, we misscpuidle_ops. I want to addcpuidle_opsfor
arm psci, I dunno whether this is the correct direction, could you please give
suggestions?You should look at the macro
Quoted 8 lines
Quoted 3 lines
arch/arm/include/asm/cpuidle.h:#define
CPUIDLE_METHOD_OF_DECLARE(name, _method, _ops)And more precisely, you can look at the code using it.
Thanks for this URL. I'll cook similar patches for arm psci cpuidle_ops.
Thanks
Quoted 17 lines · Jisheng Zhang
Dear Daniel,
Quoted 12 lines · On Thu, 2 Jul 2015 10:07:11 +0200 Daniel Lezcano <[email protected]>…
Quoted 6 lines · Jisheng Zhang
Hi all,
we'd like to use
cpuidle-arm.cfor both arm and arm64 with psci as backend. For arm64, it works. But for arm, we misscpuidle_ops. I want to addcpuidle_opsfor arm psci, I dunno whether this is the correct direction, could you please give suggestions?You should look at the macro
arch/arm/include/asm/cpuidle.h:
Quoted 8 lines
Quoted 1 line
#define
CPUIDLE_METHOD_OF_DECLARE(name, _method, _ops)Yep, this is what I want to use. I want to use this MACRO to implement
cpuidle_opsfor arm, but I dunno whether this is the correct direction. And I'd like to reusecpu_psci_cpu_init_idle()function inarch/arm64/kernel/psci.cto parse the DT, but I'm not sure where to putcpu_psci_cpu_init_idle()so that can be shared between arm and arm64. Also I noticed that there's a psci unification work from Mark Rutland, does it make sense to put it indrivers/firmware/psci.c?
I think cpu_psci_cpu_init_idle() should live in drivers/firmware/psci.c. I also think that Lorenzo had an idea as to what should be done regarding unifying the arm and arm64 approaches, but he's currently away and I'm not all that familiar with cpuidle.
Thanks,
Mark.
Quoted 27 lines · Mark Rutland
Quoted 17 lines · Jisheng Zhang
Dear Daniel,
Quoted 12 lines · On Thu, 2 Jul 2015 10:07:11 +0200 Daniel Lezcano <[email protected]>…
Quoted 6 lines · Jisheng Zhang
Hi all,
we'd like to use
cpuidle-arm.cfor both arm and arm64 with psci as backend. For arm64, it works. But for arm, we misscpuidle_ops. I want to addcpuidle_opsfor arm psci, I dunno whether this is the correct direction, could you please give suggestions?You should look at the macro
arch/arm/include/asm/cpuidle.h:Quoted 8 lines
Quoted 1 line
#define
CPUIDLE_METHOD_OF_DECLARE(name, _method, _ops)Yep, this is what I want to use. I want to use this MACRO to implement
cpuidle_opsfor arm, but I dunno whether this is the correct direction. And I'd like to reusecpu_psci_cpu_init_idle()function inarch/arm64/kernel/psci.cto parse the DT, but I'm not sure where to putcpu_psci_cpu_init_idle()so that can be shared between arm and arm64. Also I noticed that there's a psci unification work from Mark Rutland, does it make sense to put it indrivers/firmware/psci.c?
Quoted 4 lines
I think
cpu_psci_cpu_init_idle()should live indrivers/firmware/psci.c. I also think that Lorenzo had an idea as to what should be done regarding unifying the arm and arm64 approaches, but he's currently away and I'm not all that familiar with cpuidle.
Yes, PSCI idle states initialization must be common between arm and arm64, and also cpu_psci_cpu_suspend now that the cpu_suspend() API was made common.
The drivers/firmware PSCI implementation for those hooks can be used to inizialize the respective arm/arm64 structures then, as highlighted in this thread. I will review the series.
Thanks,
Lorenzo