]> asedeno.scripts.mit.edu Git - linux.git/commitdiff
habanalabs: remove simulator dedicated code
authorOded Gabbay <oded.gabbay@gmail.com>
Tue, 4 Jun 2019 12:07:11 +0000 (15:07 +0300)
committerOded Gabbay <oded.gabbay@gmail.com>
Tue, 4 Jun 2019 12:07:11 +0000 (15:07 +0300)
This patch removes two code sections in the common code that contain code
which is only relevant for simulator support (which is not upstreamed).

This removal saves the need to update this code upstream, which is not
needed anyway.

Signed-off-by: Oded Gabbay <oded.gabbay@gmail.com>
drivers/misc/habanalabs/device.c
drivers/misc/habanalabs/sysfs.c

index 6937c1fcab632b742faf50abe4ab44d7e9f01ad6..cca4af29daf7c00744db8cf1b2ebf637ecf46a53 100644 (file)
@@ -695,13 +695,6 @@ int hl_device_reset(struct hl_device *hdev, bool hard_reset,
 
                hdev->hard_reset_pending = true;
 
-               if (!hdev->pdev) {
-                       dev_err(hdev->dev,
-                               "Reset action is NOT supported in simulator\n");
-                       rc = -EINVAL;
-                       goto out_err;
-               }
-
                device_reset_work = kzalloc(sizeof(*device_reset_work),
                                                GFP_ATOMIC);
                if (!device_reset_work) {
index c900ab15cceb395bdc06f5941bfc87b62d1993cc..25eb46d29d880062c673ae3f4aaa9c2760a01cd4 100644 (file)
@@ -328,10 +328,6 @@ static ssize_t pci_addr_show(struct device *dev, struct device_attribute *attr,
 {
        struct hl_device *hdev = dev_get_drvdata(dev);
 
-       /* Use dummy, fixed address for simulator */
-       if (!hdev->pdev)
-               return sprintf(buf, "0000:%02d:00.0\n", hdev->id);
-
        return sprintf(buf, "%04x:%02x:%02x.%x\n",
                        pci_domain_nr(hdev->pdev->bus),
                        hdev->pdev->bus->number,