Re: [PATCH V3 08/11] accel/amdxdna: Add suspend and resume

From: Jeffrey Hugo
Date: Fri Oct 04 2024 - 14:14:53 EST


On 9/11/2024 12:06 PM, Lizhi Hou wrote:
+static int amdxdna_rpmops_suspend(struct device *dev)
+{
+ struct amdxdna_dev *xdna = pci_get_drvdata(to_pci_dev(dev));
+ int ret;
+
+ mutex_lock(&xdna->dev_lock);
+ WARN_ON(!list_empty(&xdna->client_list));

This feels weird. Can you explain?

+ ret = amdxdna_dev_suspend_nolock(xdna);
+ mutex_unlock(&xdna->dev_lock);
+
+ XDNA_DBG(xdna, "Runtime suspend done ret: %d", ret);
+ return ret;
+}
+