The Linux Kernel Mailing List
 help / color / mirror / Atom feed
* [PATCH] xen/events: Add wakeup support to xen-pirq
@ 2023-03-13 13:41 Simon Gaiser
  2023-07-24 10:29 ` Simon Gaiser
  0 siblings, 1 reply; 3+ messages in thread
From: Simon Gaiser @ 2023-03-13 13:41 UTC (permalink / raw)
  To: Juergen Gross, Stefano Stabellini, Oleksandr Tyshchenko
  Cc: xen-devel, linux-kernel, Simon Gaiser

This allows entering and exiting s2idle. Actual S0ix residency is
another topic [1].

Without this the ACPI code currently ignores the error enable_irq_wake()
returns when being used on a xen-pirq and the system goes to idle for
ever since the wakeup IRQ doesn't gets enabled. With [2] the error is
handled and the system refuses to go to s2idle.

Link: https://lore.kernel.org/xen-devel/9051e484-b128-715a-9253-48af8e47bb9d@invisiblethingslab.com/ # [1]
Link: https://lore.kernel.org/linux-acpi/20230313125344.2893-1-simon@invisiblethingslab.com/ # [2]
Signed-off-by: Simon Gaiser <simon@invisiblethingslab.com>
---

While I think that the set of flags I set is correct, I'm not familiar
with that code, so please pay special attention during review if they
are actually correct for xen-pirq.

 drivers/xen/events/events_base.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/drivers/xen/events/events_base.c b/drivers/xen/events/events_base.c
index c7715f8bd452..991082f04f05 100644
--- a/drivers/xen/events/events_base.c
+++ b/drivers/xen/events/events_base.c
@@ -2176,6 +2176,10 @@ static struct irq_chip xen_pirq_chip __read_mostly = {
 	.irq_set_affinity	= set_affinity_irq,
 
 	.irq_retrigger		= retrigger_dynirq,
+
+	.flags                  = IRQCHIP_SKIP_SET_WAKE |
+				  IRQCHIP_ENABLE_WAKEUP_ON_SUSPEND |
+				  IRQCHIP_MASK_ON_SUSPEND,
 };
 
 static struct irq_chip xen_percpu_chip __read_mostly = {
-- 
2.39.2


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

* Re: [PATCH] xen/events: Add wakeup support to xen-pirq
  2023-03-13 13:41 [PATCH] xen/events: Add wakeup support to xen-pirq Simon Gaiser
@ 2023-07-24 10:29 ` Simon Gaiser
  2023-07-31 11:57   ` Juergen Gross
  0 siblings, 1 reply; 3+ messages in thread
From: Simon Gaiser @ 2023-07-24 10:29 UTC (permalink / raw)
  To: Juergen Gross, Stefano Stabellini, Oleksandr Tyshchenko
  Cc: xen-devel, linux-kernel


[-- Attachment #1.1: Type: text/plain, Size: 1547 bytes --]

Simon Gaiser:
> This allows entering and exiting s2idle. Actual S0ix residency is
> another topic [1].
> 
> Without this the ACPI code currently ignores the error enable_irq_wake()
> returns when being used on a xen-pirq and the system goes to idle for
> ever since the wakeup IRQ doesn't gets enabled. With [2] the error is
> handled and the system refuses to go to s2idle.
> 
> Link: https://lore.kernel.org/xen-devel/9051e484-b128-715a-9253-48af8e47bb9d@invisiblethingslab.com/ # [1]
> Link: https://lore.kernel.org/linux-acpi/20230313125344.2893-1-simon@invisiblethingslab.com/ # [2]
> Signed-off-by: Simon Gaiser <simon@invisiblethingslab.com>
> ---
> 
> While I think that the set of flags I set is correct, I'm not familiar
> with that code, so please pay special attention during review if they
> are actually correct for xen-pirq.
> 
>  drivers/xen/events/events_base.c | 4 ++++
>  1 file changed, 4 insertions(+)
> 
> diff --git a/drivers/xen/events/events_base.c b/drivers/xen/events/events_base.c
> index c7715f8bd452..991082f04f05 100644
> --- a/drivers/xen/events/events_base.c
> +++ b/drivers/xen/events/events_base.c
> @@ -2176,6 +2176,10 @@ static struct irq_chip xen_pirq_chip __read_mostly = {
>  	.irq_set_affinity	= set_affinity_irq,
>  
>  	.irq_retrigger		= retrigger_dynirq,
> +
> +	.flags                  = IRQCHIP_SKIP_SET_WAKE |
> +				  IRQCHIP_ENABLE_WAKEUP_ON_SUSPEND |
> +				  IRQCHIP_MASK_ON_SUSPEND,
>  };
>  
>  static struct irq_chip xen_percpu_chip __read_mostly = {
ping

[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

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

* Re: [PATCH] xen/events: Add wakeup support to xen-pirq
  2023-07-24 10:29 ` Simon Gaiser
@ 2023-07-31 11:57   ` Juergen Gross
  0 siblings, 0 replies; 3+ messages in thread
From: Juergen Gross @ 2023-07-31 11:57 UTC (permalink / raw)
  To: Simon Gaiser, Thomas Gleixner
  Cc: xen-devel, linux-kernel, Oleksandr Tyshchenko, Stefano Stabellini


[-- Attachment #1.1.1: Type: text/plain, Size: 1932 bytes --]

On 24.07.23 12:29, Simon Gaiser wrote:
> Simon Gaiser:
>> This allows entering and exiting s2idle. Actual S0ix residency is
>> another topic [1].
>>
>> Without this the ACPI code currently ignores the error enable_irq_wake()
>> returns when being used on a xen-pirq and the system goes to idle for
>> ever since the wakeup IRQ doesn't gets enabled. With [2] the error is
>> handled and the system refuses to go to s2idle.
>>
>> Link: https://lore.kernel.org/xen-devel/9051e484-b128-715a-9253-48af8e47bb9d@invisiblethingslab.com/ # [1]
>> Link: https://lore.kernel.org/linux-acpi/20230313125344.2893-1-simon@invisiblethingslab.com/ # [2]
>> Signed-off-by: Simon Gaiser <simon@invisiblethingslab.com>
>> ---
>>
>> While I think that the set of flags I set is correct, I'm not familiar
>> with that code, so please pay special attention during review if they
>> are actually correct for xen-pirq.
>>
>>   drivers/xen/events/events_base.c | 4 ++++
>>   1 file changed, 4 insertions(+)
>>
>> diff --git a/drivers/xen/events/events_base.c b/drivers/xen/events/events_base.c
>> index c7715f8bd452..991082f04f05 100644
>> --- a/drivers/xen/events/events_base.c
>> +++ b/drivers/xen/events/events_base.c
>> @@ -2176,6 +2176,10 @@ static struct irq_chip xen_pirq_chip __read_mostly = {
>>   	.irq_set_affinity	= set_affinity_irq,
>>   
>>   	.irq_retrigger		= retrigger_dynirq,
>> +
>> +	.flags                  = IRQCHIP_SKIP_SET_WAKE |
>> +				  IRQCHIP_ENABLE_WAKEUP_ON_SUSPEND |
>> +				  IRQCHIP_MASK_ON_SUSPEND,
>>   };
>>   
>>   static struct irq_chip xen_percpu_chip __read_mostly = {
> ping

Sorry for not answering earlier.

I'm not sure about those flags either. Unfortunately I haven't found any
documentation or comments describing their detailed semantics in a way
enabling me to do a thorough review.

Thomas, are you seeing any problems with specifying those flags?


Juergen

[-- Attachment #1.1.2: OpenPGP public key --]
[-- Type: application/pgp-keys, Size: 3149 bytes --]

[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 495 bytes --]

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

end of thread, other threads:[~2023-07-31 11:57 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-03-13 13:41 [PATCH] xen/events: Add wakeup support to xen-pirq Simon Gaiser
2023-07-24 10:29 ` Simon Gaiser
2023-07-31 11:57   ` Juergen Gross

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox