remove stub printf from amdgpu_acpi_enumerate_xcc()
authorjsg <jsg@openbsd.org>
Fri, 26 Jan 2024 11:36:26 +0000 (11:36 +0000)
committerjsg <jsg@openbsd.org>
Fri, 26 Jan 2024 11:36:26 +0000 (11:36 +0000)
the loop that looks for AMD* hid objects remains disabled

sys/dev/pci/drm/amd/amdgpu/amdgpu_acpi.c
sys/dev/pci/drm/include/linux/mod_devicetable.h
sys/dev/pci/drm/include/linux/xarray.h

index 8528900..f212482 100644 (file)
@@ -1085,9 +1085,6 @@ out:
 
 static int amdgpu_acpi_enumerate_xcc(void)
 {
-       STUB();
-       return -ENOSYS;
-#ifdef notyet
        struct amdgpu_acpi_dev_info *dev_info = NULL;
        struct amdgpu_acpi_xcc_info *xcc_info;
        struct acpi_device *acpi_dev;
@@ -1098,6 +1095,7 @@ static int amdgpu_acpi_enumerate_xcc(void)
        INIT_LIST_HEAD(&amdgpu_acpi_dev_list);
        xa_init(&numa_info_xa);
 
+#ifdef notyet
        for (id = 0; id < AMD_XCC_MAX_HID; id++) {
                snprintf(hid, sizeof(hid), "%s%d", "AMD", AMD_XCC_HID_START + id);
                acpi_dev = acpi_dev_get_first_match_dev(hid, NULL, -1);
@@ -1142,9 +1140,9 @@ static int amdgpu_acpi_enumerate_xcc(void)
 
                list_add_tail(&xcc_info->list, &dev_info->xcc_list);
        }
+#endif
 
        return 0;
-#endif
 }
 
 int amdgpu_acpi_get_tmr_info(struct amdgpu_device *adev, u64 *tmr_offset,
index 289c6e2..57d34ac 100644 (file)
@@ -51,4 +51,6 @@ struct pci_device_id {
        unsigned long driver_data;
 };
 
+#define ACPI_ID_LEN    16
+
 #endif
index 21ab76b..c41a5fd 100644 (file)
@@ -176,4 +176,10 @@ xa_empty(const struct xarray *xa)
        return SPLAY_EMPTY(&xa->xa_tree);
 }
 
+static inline void
+xa_init(struct xarray *xa)
+{
+       xa_init_flags(xa, 0);
+}
+
 #endif