Bug 217028

Summary: CONFIG_AMD_PMF missing CONFIG_POWER_SUPPLY depend/select
Product: Drivers Reporter: z
Component: Platform_x86Assignee: drivers_platform_x86 (drivers_platform_x86)
Status: RESOLVED CODE_FIX    
Severity: high CC: jwrdegoede, regressions
Priority: P1    
Hardware: AMD   
OS: Linux   
Kernel Version: 6.1.11-gentoo Subsystem:
Regression: No Bisected commit-id:

Description z 2023-02-13 03:07:41 UTC
That depend is missing resulting in this error:
ld: drivers/platform/x86/amd/pmf/core.o: in function `amd_pmf_remove':
core.c:(.text+0x10): undefined reference to `power_supply_unreg_notifier'
ld: drivers/platform/x86/amd/pmf/core.o: in function `amd_pmf_probe':
core.c:(.text+0x38f): undefined reference to `power_supply_reg_notifier'
make[1]: *** [scripts/Makefile.vmlinux:34: vmlinux] Error 1
make: *** [Makefile:1248: vmlinux] Error 2

The relevant kconfig file is located at drivers/platform/x86/amd/pmf
Comment 1 Hans de Goede 2023-02-13 12:33:18 UTC
Thank you for reporting this.

This is fixed by this (just mergd) patch in the for-next branch of the platform-drivers-x86 tree:

https://git.kernel.org/pub/scm/linux/kernel/git/pdx86/platform-drivers-x86.git/commit/?h=for-next&id=a2f9d361e3d70fcd8c53612034be7dae4f586d97
Comment 2 The Linux kernel's regression tracker (Thorsten Leemhuis) 2023-02-13 13:12:55 UTC
(In reply to Hans de Goede from comment #1)
> 
> This is fixed by this (just mergd) patch in the for-next branch of the
> platform-drivers-x86 tree:
> https://git.kernel.org/pub/scm/linux/kernel/git/pdx86/platform-drivers-x86.
> git/commit/?h=for-next&id=a2f9d361e3d70fcd8c53612034be7dae4f586d97

Thx for this. Quick question: why is there no "CC: <stable...>? This seems needed (see docs; a fixes tag alone is not enough) if this is something that showed up in 6.1.y. Or am I missing something?
Comment 3 Hans de Goede 2023-02-13 13:57:17 UTC
(In reply to The Linux kernel's regression tracker (Thorsten Leemhuis) from comment #2)
> Thx for this. Quick question: why is there no "CC: <stable...>? This seems
> needed (see docs; a fixes tag alone is not enough) if this is something that
> showed up in 6.1.y. Or am I missing something?

Good point, I've added the Cc: stable now, new commit-id:

https://git.kernel.org/pub/scm/linux/kernel/git/pdx86/platform-drivers-x86.git/commit/?h=for-next&id=3004e8d2a0a98bbf4223ae146464fadbff68bf78