[v2,0/2] AMD PMF Smart PC error handling cleanups

Message ID 20240217014107.113749-1-mario.limonciello@amd.com
Headers
Series AMD PMF Smart PC error handling cleanups |

Message

Mario Limonciello Feb. 17, 2024, 1:41 a.m. UTC
  While debugging the suspend issue for amd-pmf the initial bisect result
pointed at red herrings of cleanup flow problems for
amd_pmf_init_smart_pc().  The actual issue wasn't in this code, but still
a lot of memory is allocated and not immediately released if any of the
error branches are taken.

This series cleans that up so that every step is cleaned up. I believe
this actually fixes driver bugs that "could" occur if a BIOS advertisd
Smart PC as well as ITS auto or CNQF but didn't include a policy in the
BIOS.

Mario Limonciello (2):
  platform/x86/amd/pmf: Add debugging message for missing policy data
  platform/x86/amd/pmf: Fixup error handling for amd_pmf_init_smart_pc()

 drivers/platform/x86/amd/pmf/tee-if.c | 69 +++++++++++++++++----------
 1 file changed, 43 insertions(+), 26 deletions(-)
  

Comments

Hans de Goede Feb. 19, 2024, 12:38 p.m. UTC | #1
Hi,

On 2/17/24 02:41, Mario Limonciello wrote:
> While debugging the suspend issue for amd-pmf the initial bisect result
> pointed at red herrings of cleanup flow problems for
> amd_pmf_init_smart_pc().  The actual issue wasn't in this code, but still
> a lot of memory is allocated and not immediately released if any of the
> error branches are taken.
> 
> This series cleans that up so that every step is cleaned up. I believe
> this actually fixes driver bugs that "could" occur if a BIOS advertisd
> Smart PC as well as ITS auto or CNQF but didn't include a policy in the
> BIOS.
> 
> Mario Limonciello (2):
>   platform/x86/amd/pmf: Add debugging message for missing policy data
>   platform/x86/amd/pmf: Fixup error handling for amd_pmf_init_smart_pc()

Thank you for your patch-series, I've applied this series
to my review-hans branch:
https://git.kernel.org/pub/scm/linux/kernel/git/pdx86/platform-drivers-x86.git/log/?h=review-hans

Note it will show up in my review-hans branch once I've pushed my
local branch there, which might take a while.

I will include this patch in my next fixes pull-req to Linus
for the current kernel development cycle.

Regards,

Hans