Commit 74411d6b authored by Zhang Zekun's avatar Zhang Zekun
Browse files

hisilicon/hisi_hbmdev: Add lock to protect pcc operation region

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: 039ec3f7 ("soc: hisilicon: hisi_hbmdev: Add power domain control methods")
Signed-off-by: default avatarZhang Zekun <zhangzekun11@huawei.com>
parent 8d7c8662
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -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;