linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Save and Restore Generic Interrupt Controller for System Sleep on ARM
@ 2017-11-29 22:49 dbasehore .
  2017-11-30  9:44 ` Marc Zyngier
  0 siblings, 1 reply; 4+ messages in thread
From: dbasehore . @ 2017-11-29 22:49 UTC (permalink / raw)
  To: linux-kernel
  Cc: Marc Zyngier, Thomas Gleixner, sudeep.holla, Linux-pm mailing list

There was some work in ARM Trusted Firmware to support saving and
restoring the Generic Interrupt Controller (GICv3) before and after
sleep, but it seems that the plan is to have this all in the kernel
now. The point of doing this is to save power during sleep. On an
RK3399 system, we save about 15mW by disabling the power rail that the
GIC is on.

I was looking for whether anyone had anything in progress already or
for preferences on how to do this. Marc suggested using a device tree
entry to indicate the need to save and restore the GIC. There is
another requirement to resend MAPC commands on certain implementations
of the GICv3 which could be indicated by another device tree entry.

If someone does have patches, I'll be able to test and verify them on
my system since we've gotten things working with the ARM Trusted
Firmware patches.

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Save and Restore Generic Interrupt Controller for System Sleep on ARM
  2017-11-29 22:49 Save and Restore Generic Interrupt Controller for System Sleep on ARM dbasehore .
@ 2017-11-30  9:44 ` Marc Zyngier
  2017-12-01  1:21   ` dbasehore .
  0 siblings, 1 reply; 4+ messages in thread
From: Marc Zyngier @ 2017-11-30  9:44 UTC (permalink / raw)
  To: dbasehore .
  Cc: linux-kernel, Thomas Gleixner, sudeep.holla, Linux-pm mailing list

On Wed, Nov 29 2017 at  2:49:18 pm GMT, "dbasehore ." <dbasehore@chromium.org> wrote:
> There was some work in ARM Trusted Firmware to support saving and
> restoring the Generic Interrupt Controller (GICv3) before and after
> sleep, but it seems that the plan is to have this all in the kernel
> now. The point of doing this is to save power during sleep. On an
> RK3399 system, we save about 15mW by disabling the power rail that the
> GIC is on.
>
> I was looking for whether anyone had anything in progress already or
> for preferences on how to do this. Marc suggested using a device tree
> entry to indicate the need to save and restore the GIC. There is
> another requirement to resend MAPC commands on certain implementations
> of the GICv3 which could be indicated by another device tree entry.

Let's be precise: This is a GIC-500 requirement, and not something that
the GICv3 architecture defines (PM is *not* part of the GICv3
architecture).

> If someone does have patches, I'll be able to test and verify them on
> my system since we've gotten things working with the ARM Trusted
> Firmware patches.

I'm not aware of any such patch that has been posted for mainline, so
just post whatever you have and we'll take it from there.

IT is hard to comment further on what you're trying to do without seeing
the code and a description of the new API between ATF and the kernel.

Thanks,

	M.
-- 
Jazz is not dead, it just smell funny.

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Save and Restore Generic Interrupt Controller for System Sleep on ARM
  2017-11-30  9:44 ` Marc Zyngier
@ 2017-12-01  1:21   ` dbasehore .
  2017-12-06  9:48     ` Marc Zyngier
  0 siblings, 1 reply; 4+ messages in thread
From: dbasehore . @ 2017-12-01  1:21 UTC (permalink / raw)
  To: Marc Zyngier
  Cc: linux-kernel, Thomas Gleixner, sudeep.holla, Linux-pm mailing list

On Thu, Nov 30, 2017 at 1:44 AM, Marc Zyngier <marc.zyngier@arm.com> wrote:
> On Wed, Nov 29 2017 at  2:49:18 pm GMT, "dbasehore ." <dbasehore@chromium.org> wrote:
>> There was some work in ARM Trusted Firmware to support saving and
>> restoring the Generic Interrupt Controller (GICv3) before and after
>> sleep, but it seems that the plan is to have this all in the kernel
>> now. The point of doing this is to save power during sleep. On an
>> RK3399 system, we save about 15mW by disabling the power rail that the
>> GIC is on.
>>
>> I was looking for whether anyone had anything in progress already or
>> for preferences on how to do this. Marc suggested using a device tree
>> entry to indicate the need to save and restore the GIC. There is
>> another requirement to resend MAPC commands on certain implementations
>> of the GICv3 which could be indicated by another device tree entry.
>
> Let's be precise: This is a GIC-500 requirement, and not something that
> the GICv3 architecture defines (PM is *not* part of the GICv3
> architecture).
>

Just to double check, do the register restores apply to all GICv3
designs? If so, I can put that code in the gic-v3 code instead of
breaking it out.

>> If someone does have patches, I'll be able to test and verify them on
>> my system since we've gotten things working with the ARM Trusted
>> Firmware patches.
>
> I'm not aware of any such patch that has been posted for mainline, so
> just post whatever you have and we'll take it from there.
>
> IT is hard to comment further on what you're trying to do without seeing
> the code and a description of the new API between ATF and the kernel.
>
> Thanks,
>
>         M.
> --
> Jazz is not dead, it just smell funny.

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Save and Restore Generic Interrupt Controller for System Sleep on ARM
  2017-12-01  1:21   ` dbasehore .
@ 2017-12-06  9:48     ` Marc Zyngier
  0 siblings, 0 replies; 4+ messages in thread
From: Marc Zyngier @ 2017-12-06  9:48 UTC (permalink / raw)
  To: dbasehore .
  Cc: linux-kernel, Thomas Gleixner, sudeep.holla, Linux-pm mailing list

On Thu, Nov 30 2017 at  5:21:20 pm GMT, "dbasehore ." <dbasehore@chromium.org> wrote:
> On Thu, Nov 30, 2017 at 1:44 AM, Marc Zyngier <marc.zyngier@arm.com> wrote:
>> On Wed, Nov 29 2017 at 2:49:18 pm GMT, "dbasehore ."
>> <dbasehore@chromium.org> wrote:
>>> There was some work in ARM Trusted Firmware to support saving and
>>> restoring the Generic Interrupt Controller (GICv3) before and after
>>> sleep, but it seems that the plan is to have this all in the kernel
>>> now. The point of doing this is to save power during sleep. On an
>>> RK3399 system, we save about 15mW by disabling the power rail that the
>>> GIC is on.
>>>
>>> I was looking for whether anyone had anything in progress already or
>>> for preferences on how to do this. Marc suggested using a device tree
>>> entry to indicate the need to save and restore the GIC. There is
>>> another requirement to resend MAPC commands on certain implementations
>>> of the GICv3 which could be indicated by another device tree entry.
>>
>> Let's be precise: This is a GIC-500 requirement, and not something that
>> the GICv3 architecture defines (PM is *not* part of the GICv3
>> architecture).
>>
>
> Just to double check, do the register restores apply to all GICv3
> designs? If so, I can put that code in the gic-v3 code instead of
> breaking it out.

I would keep it GIC-500 specific for the time being. But that code
should live in the GICv3 driver, gated on the IIDR registers and some
form of firmware negotiation.

Again, it will be much easier to comment on this when we see the
code. So far, I feel a bit uneasy talking mostly hypothetically.

Thanks,

	M.
-- 
Jazz is not dead, it just smell funny.

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2017-12-06  9:48 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-11-29 22:49 Save and Restore Generic Interrupt Controller for System Sleep on ARM dbasehore .
2017-11-30  9:44 ` Marc Zyngier
2017-12-01  1:21   ` dbasehore .
2017-12-06  9:48     ` Marc Zyngier

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).