From: "Lazar, Lijo" <lijo.lazar@amd.com>
To: Borislav Petkov <bp@alien8.de>, Alex Deucher <alexdeucher@gmail.com>
Cc: Alex Deucher <alexander.deucher@amd.com>,
Pratik Vishwakarma <Pratik.Vishwakarma@amd.com>,
amd-gfx list <amd-gfx@lists.freedesktop.org>,
lkml <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] drm/amdgpu: Fix build with missing pm_suspend_target_state module export
Date: Tue, 24 Aug 2021 20:46:33 +0530 [thread overview]
Message-ID: <2d7e3536-fc3e-629a-4f0d-2ac5ccacccc5@amd.com> (raw)
In-Reply-To: <YSS/F9kcQcRKlNJ5@zn.tnic>
On 8/24/2021 3:12 PM, Borislav Petkov wrote:
> From: Borislav Petkov <bp@suse.de>
>
> Building a randconfig here triggered:
>
> ERROR: modpost: "pm_suspend_target_state" [drivers/gpu/drm/amd/amdgpu/amdgpu.ko] undefined!
>
> because the module export of that symbol happens in
> kernel/power/suspend.c which is enabled with CONFIG_SUSPEND.
>
> The ifdef guards in amdgpu_acpi_is_s0ix_supported(), however, test for
> CONFIG_PM_SLEEP which is defined like this:
>
> config PM_SLEEP
> def_bool y
> depends on SUSPEND || HIBERNATE_CALLBACKS
>
Missed this altogether!
Reviewed-by: Lijo Lazar <lijo.lazar@amd.com>
Thanks,
Lijo
> and that randconfig has:
>
> # CONFIG_SUSPEND is not set
> CONFIG_HIBERNATE_CALLBACKS=y
>
> leading to the module export missing.
>
> Change the ifdeffery to depend directly on CONFIG_SUSPEND.
>
> Fixes: 5706cb3c910c ("drm/amdgpu: fix checking pmops when PM_SLEEP is not enabled")
> Signed-off-by: Borislav Petkov <bp@suse.de>
> Link: https://nam11.safelinks.protection.outlook.com/?url=https%3A%2F%2Flkml.kernel.org%2Fr%2FYSP6Lv53QV0cOAsd%40zn.tnic&data=04%7C01%7CLijo.Lazar%40amd.com%7C71b6769cdd574a05b32b08d966e37525%7C3dd8961fe4884e608e11a82d994e183d%7C0%7C0%7C637653949420453962%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&sdata=ai%2B95gtZz0r0pXYaUkG97tiuaiykEy8%2FB%2FtmHP3W4Zs%3D&reserved=0
> ---
> drivers/gpu/drm/amd/amdgpu/amdgpu_acpi.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_acpi.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_acpi.c
> index 4137e848f6a2..a9ce3b20d371 100644
> --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_acpi.c
> +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_acpi.c
> @@ -1040,7 +1040,7 @@ void amdgpu_acpi_detect(void)
> */
> bool amdgpu_acpi_is_s0ix_supported(struct amdgpu_device *adev)
> {
> -#if IS_ENABLED(CONFIG_AMD_PMC) && IS_ENABLED(CONFIG_PM_SLEEP)
> +#if IS_ENABLED(CONFIG_AMD_PMC) && IS_ENABLED(CONFIG_SUSPEND)
> if (acpi_gbl_FADT.flags & ACPI_FADT_LOW_POWER_S0) {
> if (adev->flags & AMD_IS_APU)
> return pm_suspend_target_state == PM_SUSPEND_TO_IDLE;
>
next prev parent reply other threads:[~2021-08-24 15:16 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-08-23 19:42 ERROR: modpost: "pm_suspend_target_state" [drivers/gpu/drm/amd/amdgpu/amdgpu.ko] undefined! Borislav Petkov
2021-08-23 19:49 ` Alex Deucher
2021-08-23 20:28 ` Borislav Petkov
2021-08-23 20:31 ` Alex Deucher
2021-08-23 20:46 ` Borislav Petkov
2021-08-23 20:49 ` Alex Deucher
2021-08-24 9:42 ` [PATCH] drm/amdgpu: Fix build with missing pm_suspend_target_state module export Borislav Petkov
2021-08-24 13:08 ` Lazar, Lijo
2021-08-24 13:40 ` Borislav Petkov
2021-08-24 13:52 ` Lazar, Lijo
2021-08-24 14:37 ` Borislav Petkov
2021-08-24 15:16 ` Lazar, Lijo [this message]
2021-08-24 15:57 ` Alex Deucher
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=2d7e3536-fc3e-629a-4f0d-2ac5ccacccc5@amd.com \
--to=lijo.lazar@amd.com \
--cc=Pratik.Vishwakarma@amd.com \
--cc=alexander.deucher@amd.com \
--cc=alexdeucher@gmail.com \
--cc=amd-gfx@lists.freedesktop.org \
--cc=bp@alien8.de \
--cc=linux-kernel@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).