From a8551f48c9e5ce5cadfdc97490bc40f94ef72099 Mon Sep 17 00:00:00 2001 From: jsg Date: Fri, 26 Jan 2024 11:36:26 +0000 Subject: [PATCH] remove stub printf from amdgpu_acpi_enumerate_xcc() the loop that looks for AMD* hid objects remains disabled --- sys/dev/pci/drm/amd/amdgpu/amdgpu_acpi.c | 6 ++---- sys/dev/pci/drm/include/linux/mod_devicetable.h | 2 ++ sys/dev/pci/drm/include/linux/xarray.h | 6 ++++++ 3 files changed, 10 insertions(+), 4 deletions(-) diff --git a/sys/dev/pci/drm/amd/amdgpu/amdgpu_acpi.c b/sys/dev/pci/drm/amd/amdgpu/amdgpu_acpi.c index 852890064bc..f2124826dc5 100644 --- a/sys/dev/pci/drm/amd/amdgpu/amdgpu_acpi.c +++ b/sys/dev/pci/drm/amd/amdgpu/amdgpu_acpi.c @@ -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, diff --git a/sys/dev/pci/drm/include/linux/mod_devicetable.h b/sys/dev/pci/drm/include/linux/mod_devicetable.h index 289c6e2245d..57d34ac20ce 100644 --- a/sys/dev/pci/drm/include/linux/mod_devicetable.h +++ b/sys/dev/pci/drm/include/linux/mod_devicetable.h @@ -51,4 +51,6 @@ struct pci_device_id { unsigned long driver_data; }; +#define ACPI_ID_LEN 16 + #endif diff --git a/sys/dev/pci/drm/include/linux/xarray.h b/sys/dev/pci/drm/include/linux/xarray.h index 21ab76bf464..c41a5fda6f2 100644 --- a/sys/dev/pci/drm/include/linux/xarray.h +++ b/sys/dev/pci/drm/include/linux/xarray.h @@ -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 -- 2.20.1