Re: [PATCH 4/4] x86/platform/atom: Check state of Punit managed devices on s2idle

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

 



On Sun, Dec 31, 2023 at 6:33 PM Hans de Goede <hdegoede@xxxxxxxxxx> wrote:
>
> From: Johannes Stezenbach <js@xxxxxxxxx>
>
> This is a port of "pm: Add pm suspend debug notifier for North IPs"
> from the latte-l-oss branch of:
> from https://github.com/MiCode/Xiaomi_Kernel_OpenSource latte-l-oss
>
> With the new acpi_s2idle_dev_ops and acpi_register_lps0_dev()
> functionality this can now finally be ported to the mainline kernel
> without requiring adding non-upstreamable hooks into the cpu_idle
> driver mechanism.
>
> This adds a check that all hardware blocks in the North complex
> (controlled by Punit) are in a state that allows the SoC to enter S0i3
> and prints an error message for any device in D0.

...

>  static void punit_dbgfs_register(struct punit_device *punit_device)
>  {
> +       punit_dev = punit_device;

This is not the correct (semantically) place for this.

Instead, optionally introduce a local variable in the
punit_atom_debug_init() and assign the global one there. Also it seems
that you may move this global variable under ifdeffery (and hence its
assignment) and have less stale bytes in the object file. (With this
said, it seems that local variables are plausible to have.)

>  }

-- 
With Best Regards,
Andy Shevchenko





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

  Powered by Linux