]> git.baikalelectronics.ru Git - kernel.git/commit
platform/x86: amd-pmc: Move SMU logging setup out of init
authorMario Limonciello <mario.limonciello@amd.com>
Mon, 11 Apr 2022 14:38:18 +0000 (09:38 -0500)
committerHans de Goede <hdegoede@redhat.com>
Wed, 13 Apr 2022 11:49:48 +0000 (13:49 +0200)
commit7ed15e282fbcdc87fa22eafa2f36101f0f108195
tree086e0834489d99c05f9a0ef407f72a0a90a856cf
parentf39705a438a2425111e10e7f1513a1fcd95944c0
platform/x86: amd-pmc: Move SMU logging setup out of init

SMU logging is setup when the device is probed currently.

In analyzing boot performance it was observed that amd_pmc_probe is
taking ~116800us on startup on an OEM platform.  This is longer than
expected, and is caused by enabling SMU logging at startup.

As the SMU logging is only needed for debugging, initialize it only upon
use.  This decreases the time for amd_pmc_probe to ~28800us.

Reviewed-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Mario Limonciello <mario.limonciello@amd.com>
Link: https://lore.kernel.org/r/20220411143820.13971-1-mario.limonciello@amd.com
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
drivers/platform/x86/amd-pmc.c