All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] pinctrl: amd: Fix an issue with shutdown when system set to s0ix
@ 2021-08-09 20:15 Mario Limonciello
  2021-08-11  8:26 ` Gabriel C
                   ` (2 more replies)
  0 siblings, 3 replies; 5+ messages in thread
From: Mario Limonciello @ 2021-08-09 20:15 UTC (permalink / raw)
  To: Linus Walleij, Raul E Rangel
  Cc: open list:PIN CONTROL SUBSYSTEM, open list, Nehal Shah,
	Shyam Sundar S K, Mario Limonciello, nix.or.die

IRQs are getting armed on shutdown causing the system to immediately
wake back up.

Link: https://lkml.org/lkml/2021/8/2/1114
Reported-by: nix.or.die@googlemail.com
CC: Raul E Rangel <rrangel@chromium.org>
Fixes: d62bd5ce12d7 ("pinctrl: amd: Implement irq_set_wake")
Signed-off-by: Mario Limonciello <mario.limonciello@amd.com>
---
 drivers/pinctrl/pinctrl-amd.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/drivers/pinctrl/pinctrl-amd.c b/drivers/pinctrl/pinctrl-amd.c
index a76be6cc26ee..5b764740b829 100644
--- a/drivers/pinctrl/pinctrl-amd.c
+++ b/drivers/pinctrl/pinctrl-amd.c
@@ -444,8 +444,7 @@ static int amd_gpio_irq_set_wake(struct irq_data *d, unsigned int on)
 	unsigned long flags;
 	struct gpio_chip *gc = irq_data_get_irq_chip_data(d);
 	struct amd_gpio *gpio_dev = gpiochip_get_data(gc);
-	u32 wake_mask = BIT(WAKE_CNTRL_OFF_S0I3) | BIT(WAKE_CNTRL_OFF_S3) |
-			BIT(WAKE_CNTRL_OFF_S4);
+	u32 wake_mask = BIT(WAKE_CNTRL_OFF_S0I3) | BIT(WAKE_CNTRL_OFF_S3);
 
 	raw_spin_lock_irqsave(&gpio_dev->lock, flags);
 	pin_reg = readl(gpio_dev->base + (d->hwirq)*4);
-- 
2.25.1


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

* Re: [PATCH] pinctrl: amd: Fix an issue with shutdown when system set to s0ix
  2021-08-09 20:15 [PATCH] pinctrl: amd: Fix an issue with shutdown when system set to s0ix Mario Limonciello
@ 2021-08-11  8:26 ` Gabriel C
  2021-08-11 12:21   ` Gabriel C
  2021-08-12  2:25 ` Shyam Sundar S K
  2021-08-12  9:17 ` Linus Walleij
  2 siblings, 1 reply; 5+ messages in thread
From: Gabriel C @ 2021-08-11  8:26 UTC (permalink / raw)
  To: Mario Limonciello
  Cc: Linus Walleij, Raul E Rangel, open list:PIN CONTROL SUBSYSTEM,
	open list, Nehal Shah, Shyam Sundar S K

Am Mo., 9. Aug. 2021 um 22:15 Uhr schrieb Mario Limonciello
<mario.limonciello@amd.com>:
>
> IRQs are getting armed on shutdown causing the system to immediately
> wake back up.
>
> Link: https://lkml.org/lkml/2021/8/2/1114
> Reported-by: nix.or.die@googlemail.com
> CC: Raul E Rangel <rrangel@chromium.org>
> Fixes: d62bd5ce12d7 ("pinctrl: amd: Implement irq_set_wake")
> Signed-off-by: Mario Limonciello <mario.limonciello@amd.com>
> ---
>  drivers/pinctrl/pinctrl-amd.c | 3 +--
>  1 file changed, 1 insertion(+), 2 deletions(-)
>
> diff --git a/drivers/pinctrl/pinctrl-amd.c b/drivers/pinctrl/pinctrl-amd.c
> index a76be6cc26ee..5b764740b829 100644
> --- a/drivers/pinctrl/pinctrl-amd.c
> +++ b/drivers/pinctrl/pinctrl-amd.c
> @@ -444,8 +444,7 @@ static int amd_gpio_irq_set_wake(struct irq_data *d, unsigned int on)
>         unsigned long flags;
>         struct gpio_chip *gc = irq_data_get_irq_chip_data(d);
>         struct amd_gpio *gpio_dev = gpiochip_get_data(gc);
> -       u32 wake_mask = BIT(WAKE_CNTRL_OFF_S0I3) | BIT(WAKE_CNTRL_OFF_S3) |
> -                       BIT(WAKE_CNTRL_OFF_S4);
> +       u32 wake_mask = BIT(WAKE_CNTRL_OFF_S0I3) | BIT(WAKE_CNTRL_OFF_S3);
>
>         raw_spin_lock_irqsave(&gpio_dev->lock, flags);
>         pin_reg = readl(gpio_dev->base + (d->hwirq)*4);
> --

Is working fine again with this fix.

Best Regards,

Gabriel C

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

* Re: [PATCH] pinctrl: amd: Fix an issue with shutdown when system set to s0ix
  2021-08-11  8:26 ` Gabriel C
@ 2021-08-11 12:21   ` Gabriel C
  0 siblings, 0 replies; 5+ messages in thread
From: Gabriel C @ 2021-08-11 12:21 UTC (permalink / raw)
  To: Mario Limonciello
  Cc: Linus Walleij, Raul E Rangel, open list:PIN CONTROL SUBSYSTEM,
	open list, Nehal Shah, Shyam Sundar S K

Am Mi., 11. Aug. 2021 um 10:26 Uhr schrieb Gabriel C
<nix.or.die@googlemail.com>:
>
> Am Mo., 9. Aug. 2021 um 22:15 Uhr schrieb Mario Limonciello
> <mario.limonciello@amd.com>:
> >
> > IRQs are getting armed on shutdown causing the system to immediately
> > wake back up.
> >
> > Link: https://lkml.org/lkml/2021/8/2/1114
> > Reported-by: nix.or.die@googlemail.com
> > CC: Raul E Rangel <rrangel@chromium.org>
> > Fixes: d62bd5ce12d7 ("pinctrl: amd: Implement irq_set_wake")
> > Signed-off-by: Mario Limonciello <mario.limonciello@amd.com>
> > ---
> >  drivers/pinctrl/pinctrl-amd.c | 3 +--
> >  1 file changed, 1 insertion(+), 2 deletions(-)
> >
> > diff --git a/drivers/pinctrl/pinctrl-amd.c b/drivers/pinctrl/pinctrl-amd.c
> > index a76be6cc26ee..5b764740b829 100644
> > --- a/drivers/pinctrl/pinctrl-amd.c
> > +++ b/drivers/pinctrl/pinctrl-amd.c
> > @@ -444,8 +444,7 @@ static int amd_gpio_irq_set_wake(struct irq_data *d, unsigned int on)
> >         unsigned long flags;
> >         struct gpio_chip *gc = irq_data_get_irq_chip_data(d);
> >         struct amd_gpio *gpio_dev = gpiochip_get_data(gc);
> > -       u32 wake_mask = BIT(WAKE_CNTRL_OFF_S0I3) | BIT(WAKE_CNTRL_OFF_S3) |
> > -                       BIT(WAKE_CNTRL_OFF_S4);
> > +       u32 wake_mask = BIT(WAKE_CNTRL_OFF_S0I3) | BIT(WAKE_CNTRL_OFF_S3);
> >
> >         raw_spin_lock_irqsave(&gpio_dev->lock, flags);
> >         pin_reg = readl(gpio_dev->base + (d->hwirq)*4);
> > --
>
> Is working fine again with this fix.
>

Ofc feel free to add:

Tested-by: Gabriel Craciunescu <nix.or.die@gmail.com>

Best Regards

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

* Re: [PATCH] pinctrl: amd: Fix an issue with shutdown when system set to s0ix
  2021-08-09 20:15 [PATCH] pinctrl: amd: Fix an issue with shutdown when system set to s0ix Mario Limonciello
  2021-08-11  8:26 ` Gabriel C
@ 2021-08-12  2:25 ` Shyam Sundar S K
  2021-08-12  9:17 ` Linus Walleij
  2 siblings, 0 replies; 5+ messages in thread
From: Shyam Sundar S K @ 2021-08-12  2:25 UTC (permalink / raw)
  To: Mario Limonciello, Linus Walleij, Raul E Rangel
  Cc: open list:PIN CONTROL SUBSYSTEM, open list, Nehal Shah, nix.or.die



On 8/10/2021 1:45 AM, Mario Limonciello wrote:
> IRQs are getting armed on shutdown causing the system to immediately
> wake back up.
> 
> Link: https://lkml.org/lkml/2021/8/2/1114
> Reported-by: nix.or.die@googlemail.com
> CC: Raul E Rangel <rrangel@chromium.org>
> Fixes: d62bd5ce12d7 ("pinctrl: amd: Implement irq_set_wake")
> Signed-off-by: Mario Limonciello <mario.limonciello@amd.com>
> ---
>  drivers/pinctrl/pinctrl-amd.c | 3 +--
>  1 file changed, 1 insertion(+), 2 deletions(-)
> 
> diff --git a/drivers/pinctrl/pinctrl-amd.c b/drivers/pinctrl/pinctrl-amd.c
> index a76be6cc26ee..5b764740b829 100644
> --- a/drivers/pinctrl/pinctrl-amd.c
> +++ b/drivers/pinctrl/pinctrl-amd.c
> @@ -444,8 +444,7 @@ static int amd_gpio_irq_set_wake(struct irq_data *d, unsigned int on)
>  	unsigned long flags;
>  	struct gpio_chip *gc = irq_data_get_irq_chip_data(d);
>  	struct amd_gpio *gpio_dev = gpiochip_get_data(gc);
> -	u32 wake_mask = BIT(WAKE_CNTRL_OFF_S0I3) | BIT(WAKE_CNTRL_OFF_S3) |
> -			BIT(WAKE_CNTRL_OFF_S4);
> +	u32 wake_mask = BIT(WAKE_CNTRL_OFF_S0I3) | BIT(WAKE_CNTRL_OFF_S3);
>  
>  	raw_spin_lock_irqsave(&gpio_dev->lock, flags);
>  	pin_reg = readl(gpio_dev->base + (d->hwirq)*4);
> 

Looks good to me.

Acked-by: Shyam Sundar S K <Shyam-sundar.S-k@amd.com>

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

* Re: [PATCH] pinctrl: amd: Fix an issue with shutdown when system set to s0ix
  2021-08-09 20:15 [PATCH] pinctrl: amd: Fix an issue with shutdown when system set to s0ix Mario Limonciello
  2021-08-11  8:26 ` Gabriel C
  2021-08-12  2:25 ` Shyam Sundar S K
@ 2021-08-12  9:17 ` Linus Walleij
  2 siblings, 0 replies; 5+ messages in thread
From: Linus Walleij @ 2021-08-12  9:17 UTC (permalink / raw)
  To: Mario Limonciello
  Cc: Raul E Rangel, open list:PIN CONTROL SUBSYSTEM, open list,
	Nehal Shah, Shyam Sundar S K, Gabriel C

On Mon, Aug 9, 2021 at 10:15 PM Mario Limonciello
<mario.limonciello@amd.com> wrote:

> IRQs are getting armed on shutdown causing the system to immediately
> wake back up.
>
> Link: https://lkml.org/lkml/2021/8/2/1114
> Reported-by: nix.or.die@googlemail.com
> CC: Raul E Rangel <rrangel@chromium.org>
> Fixes: d62bd5ce12d7 ("pinctrl: amd: Implement irq_set_wake")
> Signed-off-by: Mario Limonciello <mario.limonciello@amd.com>

Patch is applied.

Yours,
Linus Walleij

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

end of thread, other threads:[~2021-08-12  9:17 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-08-09 20:15 [PATCH] pinctrl: amd: Fix an issue with shutdown when system set to s0ix Mario Limonciello
2021-08-11  8:26 ` Gabriel C
2021-08-11 12:21   ` Gabriel C
2021-08-12  2:25 ` Shyam Sundar S K
2021-08-12  9:17 ` Linus Walleij

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.