hulk inclusion category: bugfix bugzilla: https://gitee.com/openeuler/kernel/issues/IAO4WG
--------------------------------------------------
Add a lock to protect against the concurrency of PCC operation region.
Fixes: 039ec3f73992 ("soc: hisilicon: hisi_hbmdev: Add power domain control methods") Signed-off-by: Zhang Zekun zhangzekun11@huawei.com --- drivers/soc/hisilicon/hisi_hbmdev.c | 2 ++ 1 file changed, 2 insertions(+)
diff --git a/drivers/soc/hisilicon/hisi_hbmdev.c b/drivers/soc/hisilicon/hisi_hbmdev.c index 33e5f0d9dde0..4c7da1a0eb33 100644 --- a/drivers/soc/hisilicon/hisi_hbmdev.c +++ b/drivers/soc/hisilicon/hisi_hbmdev.c @@ -59,7 +59,9 @@ static int memdev_power_on(struct acpi_device *adev) acpi_handle handle = adev->handle; acpi_status status;
+ acpi_scan_lock_acquire(); status = acpi_evaluate_object(handle, "_ON", NULL, NULL); + acpi_scan_lock_release(); if (ACPI_FAILURE(status)) { acpi_handle_warn(handle, "Power on failed (0x%x)\n", status); return -ENODEV;