]> git.ipfire.org Git - thirdparty/kernel/stable.git/commitdiff
acpi/hmat: Remove now unused hmat_update_target_coordinates()
authorDave Jiang <dave.jiang@intel.com>
Fri, 29 Aug 2025 22:29:07 +0000 (15:29 -0700)
committerDave Jiang <dave.jiang@intel.com>
Tue, 2 Sep 2025 21:46:47 +0000 (14:46 -0700)
Remove deadcode since CXL no longer calls hmat_update_target_coordinates().

Reviewed-by: Jonathan Cameron <jonathan.cameron@huawei.com>
Link: https://patch.msgid.link/20250829222907.1290912-5-dave.jiang@intel.com
Signed-off-by: Dave Jiang <dave.jiang@intel.com>
drivers/acpi/numa/hmat.c
drivers/cxl/core/cdat.c
drivers/cxl/core/core.h
include/linux/acpi.h

index 5d32490dc4abecb132ebb0a58c16344e7de45033..5a36d57289b43d3c20a2ed23abadb759ffa96f0b 100644 (file)
@@ -367,34 +367,6 @@ static void hmat_update_target_access(struct memory_target *target,
        }
 }
 
-int hmat_update_target_coordinates(int nid, struct access_coordinate *coord,
-                                  enum access_coordinate_class access)
-{
-       struct memory_target *target;
-       int pxm;
-
-       if (nid == NUMA_NO_NODE)
-               return -EINVAL;
-
-       pxm = node_to_pxm(nid);
-       guard(mutex)(&target_lock);
-       target = find_mem_target(pxm);
-       if (!target)
-               return -ENODEV;
-
-       hmat_update_target_access(target, ACPI_HMAT_READ_LATENCY,
-                                 coord->read_latency, access);
-       hmat_update_target_access(target, ACPI_HMAT_WRITE_LATENCY,
-                                 coord->write_latency, access);
-       hmat_update_target_access(target, ACPI_HMAT_READ_BANDWIDTH,
-                                 coord->read_bandwidth, access);
-       hmat_update_target_access(target, ACPI_HMAT_WRITE_BANDWIDTH,
-                                 coord->write_bandwidth, access);
-
-       return 0;
-}
-EXPORT_SYMBOL_GPL(hmat_update_target_coordinates);
-
 static __init void hmat_add_locality(struct acpi_hmat_locality *hmat_loc)
 {
        struct memory_locality *loc;
index c891fd618cfdae05a9953734b81e63f2082d08b6..bca1ec279651d4c897b0869e82344316b4e23743 100644 (file)
@@ -1075,9 +1075,3 @@ void cxl_region_perf_data_calculate(struct cxl_region *cxlr,
                cxlr->coord[i].write_bandwidth += perf->coord[i].write_bandwidth;
        }
 }
-
-int cxl_update_hmat_access_coordinates(int nid, struct cxl_region *cxlr,
-                                      enum access_coordinate_class access)
-{
-       return hmat_update_target_coordinates(nid, &cxlr->coord[access], access);
-}
index a253d308f3c9499ebccd3208eb0db90f55b3a405..0476c3b648de583befc1d33019da852e15ab9a1a 100644 (file)
@@ -137,8 +137,6 @@ enum cxl_poison_trace_type {
 
 long cxl_pci_get_latency(struct pci_dev *pdev);
 int cxl_pci_get_bandwidth(struct pci_dev *pdev, struct access_coordinate *c);
-int cxl_update_hmat_access_coordinates(int nid, struct cxl_region *cxlr,
-                                      enum access_coordinate_class access);
 int cxl_port_get_switch_dport_bandwidth(struct cxl_port *port,
                                        struct access_coordinate *c);
 
index 1c5bb1e887cd16b17a325f8a264fe4e4db0fe0c1..5ff5d99f6ead50e821db4e543c4566c3deb4b573 100644 (file)
@@ -1595,18 +1595,6 @@ static inline void acpi_use_parent_companion(struct device *dev)
        ACPI_COMPANION_SET(dev, ACPI_COMPANION(dev->parent));
 }
 
-#ifdef CONFIG_ACPI_HMAT
-int hmat_update_target_coordinates(int nid, struct access_coordinate *coord,
-                                  enum access_coordinate_class access);
-#else
-static inline int hmat_update_target_coordinates(int nid,
-                                                struct access_coordinate *coord,
-                                                enum access_coordinate_class access)
-{
-       return -EOPNOTSUPP;
-}
-#endif
-
 #ifdef CONFIG_ACPI_NUMA
 bool acpi_node_backed_by_real_pxm(int nid);
 #else