Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 14 Dec 2023 00:09:50 +0000 (UTC)
From:      "Bjoern A. Zeeb" <bz@FreeBSD.org>
To:        =?UTF-8?Q?Jean-S=C3=A9bastienP=C3=A9dron?= <dumbbell@FreeBSD.org>
Cc:        src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org,  dev-commits-src-main@FreeBSD.org
Subject:   Re: git: 59cbead6b15f - main - linuxkpi: Add support for  `suspend_noirq` callback in `struct dev_pm_ops`
Message-ID:  <3rrqsr57-255q-pro4-5rn3-o725214q07n7@SerrOFQ.bet>
In-Reply-To: <202312131828.3BDISons019199@gitrepo.freebsd.org>
References:  <202312131828.3BDISons019199@gitrepo.freebsd.org>

next in thread | previous in thread | raw e-mail | index | archive | help
  This message is in MIME format.  The first part should be readable text,
  while the remaining parts are likely unreadable without MIME-aware tools.

--1098556516-716910007-1702512590=:54546
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 8BIT

On Wed, 13 Dec 2023, Jean-SébastienPédron wrote:

> The branch main has been updated by dumbbell:
>
> URL: https://cgit.FreeBSD.org/src/commit/?id=59cbead6b15fd2320fa0a98dc680aef5d6e1438f
>
> commit 59cbead6b15fd2320fa0a98dc680aef5d6e1438f
> Author:     Jean-Sébastien Pédron <dumbbell@FreeBSD.org>
> AuthorDate: 2023-12-09 16:24:20 +0000
> Commit:     Jean-Sébastien Pédron <dumbbell@FreeBSD.org>
> CommitDate: 2023-12-13 18:18:47 +0000
>
>    linuxkpi: Add support for `suspend_noirq` callback in `struct dev_pm_ops`
>
>    [Why]
>    This callback is being used by the amdgpu DRM driver in Linux 5.18.
>
>    [How]
>    The callback is called after `suspend_late()`.
>
>    Reviewed by:    emaste, manu
>    Approved by:    emaste, manu
>    Differential Revision:  https://reviews.freebsd.org/D43029
> ---
> sys/compat/linuxkpi/common/include/linux/device.h | 1 +
> sys/compat/linuxkpi/common/src/linux_pci.c        | 2 ++
> 2 files changed, 3 insertions(+)
>
> diff --git a/sys/compat/linuxkpi/common/include/linux/device.h b/sys/compat/linuxkpi/common/include/linux/device.h
> index df06b356e092..7a5d813063a9 100644
> --- a/sys/compat/linuxkpi/common/include/linux/device.h
> +++ b/sys/compat/linuxkpi/common/include/linux/device.h
> @@ -81,6 +81,7 @@ struct dev_pm_ops {

This struct is embedded in driver source code in
struct pci_driver;  that means all LinuxKPI based drivers need to be
recompiled.

In case you MFC please at least append at the end!


> 	int (*poweroff_late)(struct device *dev);
> 	int (*restore)(struct device *dev);
> 	int (*restore_early)(struct device *dev);
> +	int (*suspend_noirq)(struct device *dev);
> 	int (*runtime_suspend)(struct device *dev);
> 	int (*runtime_resume)(struct device *dev);
> 	int (*runtime_idle)(struct device *dev);
> diff --git a/sys/compat/linuxkpi/common/src/linux_pci.c b/sys/compat/linuxkpi/common/src/linux_pci.c
> index 99750d5ced26..852cec9cdc94 100644
> --- a/sys/compat/linuxkpi/common/src/linux_pci.c
> +++ b/sys/compat/linuxkpi/common/src/linux_pci.c
> @@ -643,6 +643,8 @@ linux_pci_suspend(device_t dev)
> 		error = -pmops->suspend(&pdev->dev);
> 		if (error == 0 && pmops->suspend_late != NULL)
> 			error = -pmops->suspend_late(&pdev->dev);
> +		if (error == 0 && pmops->suspend_noirq != NULL)
> +			error = -pmops->suspend_noirq(&pdev->dev);
> 	}
> 	return (error);
> }
>

-- 
Bjoern A. Zeeb                                                     r15:7
--1098556516-716910007-1702512590=:54546--



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?3rrqsr57-255q-pro4-5rn3-o725214q07n7>