RE: FAILED: patch "[PATCH] pinctrl: amd: Don't save/restore interrupt status and wake" failed to apply to 5.10-stable tree

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



[Public]

> -----Original Message-----
> From: gregkh@xxxxxxxxxxxxxxxxxxx <gregkh@xxxxxxxxxxxxxxxxxxx>
> Sent: Monday, August 22, 2022 03:42
> To: Natikar, Basavaraj <Basavaraj.Natikar@xxxxxxx>;
> linus.walleij@xxxxxxxxxx; Limonciello, Mario <Mario.Limonciello@xxxxxxx>
> Cc: stable@xxxxxxxxxxxxxxx
> Subject: FAILED: patch "[PATCH] pinctrl: amd: Don't save/restore interrupt
> status and wake" failed to apply to 5.10-stable tree
> 
> 
> The patch below does not apply to the 5.10-stable tree.
> If someone wants it applied there, or to any other stable or longterm
> tree, then please email the backport, including the original git commit
> id to <stable@xxxxxxxxxxxxxxx>.

I had a look at this and the other ones that failed to apply.  I tried to apply this commit
( commit b8c824a869f220c6b46df724f85794349bafbf23 ) to all of them and then built it.

5.10.y: success
5.4.y: success
4.19.y: success
4.14.y: success
4.9.y: failed

So I'm not sure why the automated stuff failed for you for 4.14.y through 5.10.y.

Considering it worked for me and built successfully can you have a try with it again
at least on 4.14.y +?

Thanks,

> 
> thanks,
> 
> greg k-h
> 
> ------------------ original commit in Linus's tree ------------------
> 
> From b8c824a869f220c6b46df724f85794349bafbf23 Mon Sep 17 00:00:00 2001
> From: Basavaraj Natikar <Basavaraj.Natikar@xxxxxxx>
> Date: Mon, 13 Jun 2022 12:11:26 +0530
> Subject: [PATCH] pinctrl: amd: Don't save/restore interrupt status and wake
>  status bits
> 
> Saving/restoring interrupt and wake status bits across suspend can
> cause the suspend to fail if an IRQ is serviced across the
> suspend cycle.
> 
> Signed-off-by: Mario Limonciello <mario.limonciello@xxxxxxx>
> Signed-off-by: Basavaraj Natikar <Basavaraj.Natikar@xxxxxxx>
> Fixes: 79d2c8bede2c ("pinctrl/amd: save pin registers over
> suspend/resume")
> Link:
> https://nam11.safelinks.protection.outlook.com/?url=https%3A%2F%2Flore.
> kernel.org%2Fr%2F20220613064127.220416-3-
> Basavaraj.Natikar%40amd.com&amp;data=05%7C01%7Cmario.limonciello%4
> 0amd.com%7C19c619f81b23432a6eb608da841a3772%7C3dd8961fe4884e608e
> 11a82d994e183d%7C0%7C0%7C637967545388890457%7CUnknown%7CTWFp
> bGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVC
> I6Mn0%3D%7C3000%7C%7C%7C&amp;sdata=Fz3iik5pd2tlwxvCBiA9BNA5gJ2s
> U66y0NqNrrRkpM4%3D&amp;reserved=0
> Signed-off-by: Linus Walleij <linus.walleij@xxxxxxxxxx>
> 
> diff --git a/drivers/pinctrl/pinctrl-amd.c b/drivers/pinctrl/pinctrl-amd.c
> index e497df89a4a7..9ec97c6db5e9 100644
> --- a/drivers/pinctrl/pinctrl-amd.c
> +++ b/drivers/pinctrl/pinctrl-amd.c
> @@ -918,6 +918,7 @@ static int amd_gpio_suspend(struct device *dev)
>  {
>  	struct amd_gpio *gpio_dev = dev_get_drvdata(dev);
>  	struct pinctrl_desc *desc = gpio_dev->pctrl->desc;
> +	unsigned long flags;
>  	int i;
> 
>  	for (i = 0; i < desc->npins; i++) {
> @@ -926,7 +927,9 @@ static int amd_gpio_suspend(struct device *dev)
>  		if (!amd_gpio_should_save(gpio_dev, pin))
>  			continue;
> 
> -		gpio_dev->saved_regs[i] = readl(gpio_dev->base + pin*4);
> +		raw_spin_lock_irqsave(&gpio_dev->lock, flags);
> +		gpio_dev->saved_regs[i] = readl(gpio_dev->base + pin * 4) &
> ~PIN_IRQ_PENDING;
> +		raw_spin_unlock_irqrestore(&gpio_dev->lock, flags);
>  	}
> 
>  	return 0;
> @@ -936,6 +939,7 @@ static int amd_gpio_resume(struct device *dev)
>  {
>  	struct amd_gpio *gpio_dev = dev_get_drvdata(dev);
>  	struct pinctrl_desc *desc = gpio_dev->pctrl->desc;
> +	unsigned long flags;
>  	int i;
> 
>  	for (i = 0; i < desc->npins; i++) {
> @@ -944,7 +948,10 @@ static int amd_gpio_resume(struct device *dev)
>  		if (!amd_gpio_should_save(gpio_dev, pin))
>  			continue;
> 
> -		writel(gpio_dev->saved_regs[i], gpio_dev->base + pin*4);
> +		raw_spin_lock_irqsave(&gpio_dev->lock, flags);
> +		gpio_dev->saved_regs[i] |= readl(gpio_dev->base + pin * 4)
> & PIN_IRQ_PENDING;
> +		writel(gpio_dev->saved_regs[i], gpio_dev->base + pin * 4);
> +		raw_spin_unlock_irqrestore(&gpio_dev->lock, flags);
>  	}
> 
>  	return 0;




[Index of Archives]     [Linux Kernel]     [Kernel Development Newbies]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite Hiking]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux