powerpc-utils/powerpc-utils-1.3.12.drmgr-support-03.patch
Than Ngo dd69abbd9a - Add, multipath - drmgr support
- Fix, SMT state is not honored when new CPUs are added dynamically
Resolves: RHEL-62938
2024-11-18 15:25:58 +01:00

58 lines
1.8 KiB
Diff

commit aa5feef7c7657fb764d732e831c9f7c7b9820498
Author: Haren Myneni <haren@linux.ibm.com>
Date: Fri Jun 21 15:41:46 2024 -0700
drmgr: Introduce get_my_partner_drc_index()
get_my_partner_drc_index() is called to retrieve DRC index from the
"ibm,multipath-partner-drc" property. This property is available
in the parent device node if the device has miltipath partner device.
"ibm,multipath-partner-drc" has the DRC index of the partner device.
Signed-off-by: Haren Myneni <haren@linux.ibm.com>
Signed-off-by: Tyrel Datwyler <tyreld@linux.ibm.com>
diff --git a/src/drmgr/common_ofdt.c b/src/drmgr/common_ofdt.c
index 655c9d2..1e5fe53 100644
--- a/src/drmgr/common_ofdt.c
+++ b/src/drmgr/common_ofdt.c
@@ -609,6 +609,26 @@ get_my_drc_index(char *of_path, uint32_t *index)
return rc;
}
+/**
+ * get_my_partner_drc_index
+ *
+ * @param of_full_path
+ * @param index
+ * @returns 0 on success, !0 otherwise
+ */
+int get_my_partner_drc_index(struct dr_node *node, uint32_t *index)
+{
+ int rc;
+
+ if (node == NULL)
+ return -1;
+
+ rc = get_ofdt_uint_property(node->ofdt_path,
+ "ibm,multipath-partner-drc", index);
+
+ return rc;
+}
+
/**
* drc_name_to_index
* @brief Find the drc index for the given name
diff --git a/src/drmgr/ofdt.h b/src/drmgr/ofdt.h
index 6c1b961..08d34e1 100644
--- a/src/drmgr/ofdt.h
+++ b/src/drmgr/ofdt.h
@@ -174,6 +174,7 @@ struct dr_connector *search_drc_list(struct dr_connector *,
struct dr_connector *, int, void *);
int get_my_drc_index(char *, uint32_t *);
+int get_my_partner_drc_index(struct dr_node *, uint32_t *);
int drc_name_to_index(const char *, struct dr_connector *);
char * drc_index_to_name(uint32_t, struct dr_connector *);
int get_drc_by_name(char *, struct dr_connector *, char *, char *);