From f64e800c72f7a67ad88503693b7932cd94bea3c1554c3405c26054e92743f8f2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Adrian=20Schr=C3=B6ter?= Date: Thu, 28 Nov 2024 17:45:33 +0100 Subject: [PATCH] Sync from SUSE:SLFO:Main powerpc-utils revision a7538321d8f190c196916ed56ef7f51d --- ...m-get_node_by_name-if-matched-DRC-in.patch | 35 --- ...-in-kernel-functionality-to-update-d.patch | 99 -------- ...ernel-interface-support-for-device-t.patch | 72 ------ ...parstat-Fix-Idle-and-busy-PURR-SPURR.patch | 236 ----------------- ...rnel-interface-support-for-device-tr.patch | 79 ------ ...-pic-value-at-boot-for-accurate-boot.patch | 87 ------- ...rnel-interface-support-for-device-tr.patch | 142 ----------- ...CK_BOOTTIME-for-get_time-interface-a.patch | 238 ------------------ ...devices-with-no-devspec-when-coorela.patch | 63 ----- ...es-returned-from-configure_connector.patch | 46 ---- powerpc-utils-1.3.12.tar.gz | 3 - powerpc-utils-1.3.13.tar.gz | 3 + powerpc-utils.changes | 215 ++++++++-------- powerpc-utils.spec | 14 +- ...-up-sysfs-smt-control-error-handling.patch | 65 ----- ...t-partial-SMT-level-through-SYS-FS-s.patch | 71 ------ 16 files changed, 121 insertions(+), 1347 deletions(-) delete mode 100644 0001-drmgr-Return-from-get_node_by_name-if-matched-DRC-in.patch delete mode 100644 0001-drmgr-pci-Enable-in-kernel-functionality-to-update-d.patch delete mode 100644 0002-drmgr-SLOT-Add-kernel-interface-support-for-device-t.patch delete mode 100644 0002-lparstat-Fix-Idle-and-busy-PURR-SPURR.patch delete mode 100644 0003-drmgr-pci-Add-kernel-interface-support-for-device-tr.patch delete mode 100644 0003-lparstat-app-Use-pic-value-at-boot-for-accurate-boot.patch delete mode 100644 0004-drmgr-phb-Add-kernel-interface-support-for-device-tr.patch delete mode 100644 0004-lparstat-Use-CLOCK_BOOTTIME-for-get_time-interface-a.patch delete mode 100644 0005-ofpathname-skip-devices-with-no-devspec-when-coorela.patch delete mode 100644 0006-drmgr-Free-nodes-returned-from-configure_connector.patch delete mode 100644 powerpc-utils-1.3.12.tar.gz create mode 100644 powerpc-utils-1.3.13.tar.gz delete mode 100644 ppc64_cpu-Clean-up-sysfs-smt-control-error-handling.patch delete mode 100644 ppc64_cpu-Support-partial-SMT-level-through-SYS-FS-s.patch diff --git a/0001-drmgr-Return-from-get_node_by_name-if-matched-DRC-in.patch b/0001-drmgr-Return-from-get_node_by_name-if-matched-DRC-in.patch deleted file mode 100644 index 1536976..0000000 --- a/0001-drmgr-Return-from-get_node_by_name-if-matched-DRC-in.patch +++ /dev/null @@ -1,35 +0,0 @@ -From 1dc1ecf7dce7825d352b045c98aa51711b58aaca Mon Sep 17 00:00:00 2001 -From: Haren Myneni -Date: Fri, 21 Jun 2024 15:39:42 -0700 -Subject: [PATCH] drmgr: Return from get_node_by_name() if matched DRC index - -Upstream: merged, expected in v1.3.13 -Git-commit: 1dc1ecf7dce7825d352b045c98aa51711b58aaca - -get_node_by_name() should return dr_node if the DRC name or DRC -index is matched. But the current code returns only if the DRC -name is matched. This patch fixes this issue and returns dr_node -if the index is matched. - -Signed-off-by: Haren Myneni -Signed-off-by: Tyrel Datwyler ---- - src/drmgr/common_pci.c | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/src/drmgr/common_pci.c b/src/drmgr/common_pci.c -index c6dcfdf..2e0e5fb 100644 ---- a/src/drmgr/common_pci.c -+++ b/src/drmgr/common_pci.c -@@ -969,7 +969,7 @@ get_node_by_name(const char *drc_name, uint32_t node_type) - /* See if the drc index was specified */ - drc_index = strtoul(drc_name, NULL, 0); - if (node->drc_index == drc_index) -- continue; -+ break; - - for (child = node->children; child; child = child->next) { - if (strcmp(drc_name, child->drc_name) == 0) --- -2.45.2 - diff --git a/0001-drmgr-pci-Enable-in-kernel-functionality-to-update-d.patch b/0001-drmgr-pci-Enable-in-kernel-functionality-to-update-d.patch deleted file mode 100644 index 3146091..0000000 --- a/0001-drmgr-pci-Enable-in-kernel-functionality-to-update-d.patch +++ /dev/null @@ -1,99 +0,0 @@ -From a6a7d375d38823a08d358b50866a95f6f326907e Mon Sep 17 00:00:00 2001 -From: Haren Myneni -Date: Tue, 13 Aug 2024 14:40:23 -0700 -Subject: [PATCH 1/4] drmgr/pci: Enable in-kernel functionality to update - device tree - -drmgr updates the device tree by writing to /proc/ppc64/ofdt. Also -invokes configure_connector RTAS call to retrieve new device nodes -for IO ADD. But this functionality need /dev/mem access which is -restricted under system lockdown. - -The kernel updates provided a sysfs file (/sys/kernel/dlpar) that -will allow drmgr command invoke the following interfaces to update -the device tree. - -dt add index ---> To add new device nodes to the device -tree which is used for IO ADD. - -dt remove index ---> To remove device nodes for IO -REMOVE - -This patch checks the kernel interface for the availability of -device tree update feature and adds do_dt_kernel_dlpar() to invoke -the above kernel interfaces. - -Signed-off-by: Haren Myneni ---- - src/drmgr/common.c | 6 ++++++ - src/drmgr/common_pci.c | 29 +++++++++++++++++++++++++++++ - src/drmgr/dr.h | 1 + - 3 files changed, 36 insertions(+) - -diff --git a/src/drmgr/common.c b/src/drmgr/common.c -index bfec0b9bb966..70f4dfda92a5 100644 ---- a/src/drmgr/common.c -+++ b/src/drmgr/common.c -@@ -1504,6 +1504,12 @@ int kernel_dlpar_exists(void) - if (strstr(buf, "cpu")) - return 1; - break; -+ case DRC_TYPE_PCI: -+ case DRC_TYPE_PHB: -+ case DRC_TYPE_SLOT: -+ if (strstr(buf, "dt")) -+ return 1; -+ break; - default: - return 0; - } -diff --git a/src/drmgr/common_pci.c b/src/drmgr/common_pci.c -index 1ef4ec9653b0..374129cf33e0 100644 ---- a/src/drmgr/common_pci.c -+++ b/src/drmgr/common_pci.c -@@ -1619,3 +1619,32 @@ int disable_hp_children(char *drc_name) - } - return 0; - } -+ -+/* -+ * kernel interface to update device tree nodes. -+ * dlpar dt [add|remove] index <#drc index> -+ */ -+int do_dt_kernel_dlpar(uint32_t index, int action) -+{ -+ char cmdbuf[256]; -+ int offset; -+ -+ offset = sprintf(cmdbuf, "%s ", "dt"); -+ -+ switch (action) { -+ case ADD: -+ offset += sprintf(cmdbuf + offset, "add "); -+ break; -+ case REMOVE: -+ offset += sprintf(cmdbuf + offset, "remove "); -+ break; -+ default: -+ /* Should not happen */ -+ say(ERROR, "Invalid action type specified\n"); -+ return -EINVAL; -+ } -+ -+ offset += sprintf(cmdbuf + offset, "index 0x%x", index); -+ -+ return do_kernel_dlpar(cmdbuf, offset); -+} -diff --git a/src/drmgr/dr.h b/src/drmgr/dr.h -index 60c31c44b7e3..72ede55547a3 100644 ---- a/src/drmgr/dr.h -+++ b/src/drmgr/dr.h -@@ -188,4 +188,5 @@ static inline int do_kernel_dlpar(const char *cmd, int len) - { - return do_kernel_dlpar_common(cmd, len, 0); - } -+int do_dt_kernel_dlpar(uint32_t, int); - #endif --- -2.46.0 - diff --git a/0002-drmgr-SLOT-Add-kernel-interface-support-for-device-t.patch b/0002-drmgr-SLOT-Add-kernel-interface-support-for-device-t.patch deleted file mode 100644 index 51fb709..0000000 --- a/0002-drmgr-SLOT-Add-kernel-interface-support-for-device-t.patch +++ /dev/null @@ -1,72 +0,0 @@ -From e2388681df4aec97ab9a3f883baf37f51a710a00 Mon Sep 17 00:00:00 2001 -From: Haren Myneni -Date: Tue, 13 Aug 2024 14:40:26 -0700 -Subject: [PATCH 2/4] drmgr/SLOT: Add kernel interface support for device tree - update - -Use the following kernel interfaces for SLOT device type to update -the device tree if this feature is enabled in the kernel. - -dt add index --> for IO add -dt remove index --> for IO remove - -Signed-off-by: Haren Myneni ---- - src/drmgr/drslot_chrp_slot.c | 25 +++++++++++++++++-------- - 1 file changed, 17 insertions(+), 8 deletions(-) - -diff --git a/src/drmgr/drslot_chrp_slot.c b/src/drmgr/drslot_chrp_slot.c -index 0966c256aa01..180b10857add 100644 ---- a/src/drmgr/drslot_chrp_slot.c -+++ b/src/drmgr/drslot_chrp_slot.c -@@ -71,7 +71,10 @@ release_slot(struct dr_node *slot) - if (rc) - return rc; - -- rc = remove_device_tree_nodes(slot->ofdt_path); -+ if (kernel_dlpar_exists()) -+ rc = do_dt_kernel_dlpar(slot->drc_index, REMOVE); -+ else -+ rc = remove_device_tree_nodes(slot->ofdt_path); - if (rc) { - acquire_drc(slot->drc_index); - return rc; -@@ -160,7 +163,6 @@ static int - acquire_slot(char *drc_name, struct dr_node **slot) - { - struct dr_connector drc; -- struct of_node *of_nodes; - char path[DR_PATH_MAX]; - int rc; - -@@ -180,14 +182,21 @@ acquire_slot(char *drc_name, struct dr_node **slot) - if (rc) - return rc; - -- of_nodes = configure_connector(drc.index); -- if (of_nodes == NULL) { -- release_drc(drc.index, PCI_DLPAR_DEV); -- return -1; -+ if (kernel_dlpar_exists()) { -+ rc = do_dt_kernel_dlpar(drc.index, ADD); -+ } else { -+ struct of_node *of_nodes; -+ -+ of_nodes = configure_connector(drc.index); -+ if (of_nodes == NULL) { -+ release_drc(drc.index, PCI_DLPAR_DEV); -+ return -1; -+ } -+ -+ rc = add_device_tree_nodes(path, of_nodes); -+ free_of_node(of_nodes); - } - -- rc = add_device_tree_nodes(path, of_nodes); -- free_of_node(of_nodes); - if (rc) { - say(ERROR, "add_device_tree_nodes failed at %s\n", path); - release_drc(drc.index, PCI_DLPAR_DEV); --- -2.46.0 - diff --git a/0002-lparstat-Fix-Idle-and-busy-PURR-SPURR.patch b/0002-lparstat-Fix-Idle-and-busy-PURR-SPURR.patch deleted file mode 100644 index 9a6623c..0000000 --- a/0002-lparstat-Fix-Idle-and-busy-PURR-SPURR.patch +++ /dev/null @@ -1,236 +0,0 @@ -From 2af8c0b9a285e8a6104560d0f482819e56060443 Mon Sep 17 00:00:00 2001 -From: Saket Kumar Bhaskar -Date: Thu, 18 Jul 2024 00:39:24 +0530 -Subject: [PATCH] lparstat: Fix Idle and busy PURR/SPURR - -Upstream: merged, expected in v1.3.13 -Git-commit: 2af8c0b9a285e8a6104560d0f482819e56060443 - -lparstat -E gives %busy and %idle for actual(PURR based) and normalized -(SPURR based).Idle and busy PURR/SPURR values are not adding upto 100% -in case of dedicated-donate and shared partitions, with the present -formula. Because of this, users might get a false impression of resource -utilisation. This is expected because a core can be in either -idle or busy state out of total of 100(core's shared resource can -either be consumed or be left idle). When lpar is in dedicated-donate -or shared,the purr values are not being counted when the CPU is ceded. -The idle_purr is calculated by taking snapshots of purr values at -every idle entry and idle exit. So, when a CPU is ceded, the calculation -for idle_purr will be wrong as purr is not being counted. - -Before Change: -|-----------------------------------------------------------------| -| Dedicated-donate (8 cores) : | -|----------------------|---------------------|--------------------| -| | Actual | Normalized | -| Stress-ng threads |---------------------|--------------------| -| | %busy | %idle | %busy | %idle | -|----------------------|----------|----------|---------|----------| -| 0 threads | 0.02 | 0.05 | 0.02 | 0.05 | -|----------------------|----------|----------|---------|----------| -| 8 threads | 32.64 | 17.37 | 35.25 | 18.77 | -|----------------------|----------|----------|---------|----------| -| 16 threads | 58.61 | 16.42 | 63.29 | 17.74 | -|----------------------|----------|----------|---------|----------| -| 24 threads | 78.14 | 21.86 | 84.39 | 23.61 | -|----------------------|----------|----------|---------|----------| -| 32 threads | 83.60 | 16.40 | 90.30 | 17.71 | -|----------------------|----------|----------|---------|----------| -| 40 threads | 91.90 | 6.94 | 98.31 | 7.46 | -|----------------------|----------|----------|---------|----------| -| 48 threads | 96.08 | 3.92 | 102.79 | 4.21 | -|----------------------|----------|----------|---------|----------| -| 56 threads | 98.42 | 1.57 | 105.31 | 1.69 | -|----------------------|----------|----------|---------|----------| -| 64 threads | 100.00 | 0.00 | 106.00 | 0.00 | -|----------------------|----------|----------|---------|----------| - -|-----------------------------------------------------------------| -| Shared Capped (8 VP / 4 EC) : | -|----------------------|---------------------|--------------------| -| | Actual | Normalized | -| Stress-ng threads |---------------------|--------------------| -| | %busy | %idle | %busy | %idle | -|----------------------|----------|----------|---------|----------| -| 0 threads | 0.04 | 0.18 | 0.03 | 0.19 | -|----------------------|----------|----------|---------|----------| -| 8 threads | 35.90 | 14.09 | 38.77 | 15.21 | -|----------------------|----------|----------|---------|----------| -| 16 threads | 35.25 | 14.84 | 38.08 | 16.02 | -|----------------------|----------|----------|---------|----------| -| 24 threads | 40.13 | 9.73 | 42.93 | 10.43 | -|----------------------|----------|----------|---------|----------| -| 32 threads | 44.13 | 5.73 | 47.22 | 6.14 | -|----------------------|----------|----------|---------|----------| -| 40 threads | 46.47 | 3.42 | 50.18 | 3.69 | -|----------------------|----------|----------|---------|----------| -| 48 threads | 48.03 | 1.83 | 51.39 | 1.96 | -|----------------------|----------|----------|---------|----------| -| 56 threads | 49.04 | 0.86 | 52.47 | 0.93 | -|----------------------|----------|----------|---------|----------| -| 64 threads | 49.87 | 0.00 | 53.36 | 0.00 | -|----------------------|----------|----------|---------|----------| - -This commit, rather than considering delta_idle_purr for calculation of -idle ticks, takes (delta_tb - delta_purr + delta_idle_purr) as total -ticks for which the CPUs were idle. Here, since delta_idle_purr will -also contain some idle ticks, thats why it is added to the formula. -Since, the output was correct for dedicated capped mode, changes has -been made only for shared and dedicated-donate mode. -Further, no changes has been made for calculation of %busy. - -Similar changes has been done for SPURR. - -After Change: - -|-----------------------------------------------------------------| -| Dedicated-donate (8 cores) : | -|----------------------|---------------------|--------------------| -| | Actual | Normalized | -| Stress-ng threads |---------------------|--------------------| -| | %busy | %idle | %busy | %idle | -|----------------------|----------|----------|---------|----------| -| 0 threads | 0.02 | 99.98 | 0.02 | 100.04 | -|----------------------|----------|----------|---------|----------| -| 8 threads | 35.97 | 64.03 | 38.84 | 61.51 | -|----------------------|----------|----------|---------|----------| -| 16 threads | 58.60 | 41.40 | 63.28 | 37.08 | -|----------------------|----------|----------|---------|----------| -| 24 threads | 78.14 | 21.86 | 84.39 | 23.61 | -|----------------------|----------|----------|---------|----------| -| 32 threads | 83.60 | 16.41 | 90.29 | 17.71 | -|----------------------|----------|----------|---------|----------| -| 40 threads | 92.96 | 7.04 | 100.39 | 7.61 | -|----------------------|----------|----------|---------|----------| -| 48 threads | 96.08 | 3.92 | 103.77 | 4.24 | -|----------------------|----------|----------|---------|----------| -| 56 threads | 98.42 | 1.58 | 105.31 | 1.68 | -|----------------------|----------|----------|---------|----------| -| 64 threads | 100.00 | 0.00 | 107.00 | 0.00 | -|----------------------|----------|----------|---------|----------| - -|-----------------------------------------------------------------| -| Shared Capped (8 VP / 4 EC) : | -|----------------------|---------------------|--------------------| -| | Actual | Normalized | -| Stress-ng threads |---------------------|--------------------| -| | %busy | %idle | %busy | %idle | -|----------------------|----------|----------|---------|----------| -| 0 threads | 0.03 | 99.97 | 0.19 | 99.44 | -|----------------------|----------|----------|---------|----------| -| 8 threads | 35.91 | 64.09 | 38.78 | 61.58 | -|----------------------|----------|----------|---------|----------| -| 16 threads | 36.83 | 63.17 | 39.78 | 60.55 | -|----------------------|----------|----------|---------|----------| -| 24 threads | 40.16 | 59.84 | 43.37 | 56.95 | -|----------------------|----------|----------|---------|----------| -| 32 threads | 44.47 | 55.53 | 48.02 | 52.38 | -|----------------------|----------|----------|---------|----------| -| 40 threads | 46.55 | 53.45 | 50.27 | 50.04 | -|----------------------|----------|----------|---------|----------| -| 48 threads | 48.13 | 51.87 | 52.48 | 47.82 | -|----------------------|----------|----------|---------|----------| -| 56 threads | 49.01 | 50.99 | 52.93 | 47.41 | -|----------------------|----------|----------|---------|----------| -| 64 threads | 49.90 | 50.10 | 53.40 | 46.19 | -|----------------------|----------|----------|---------|----------| - -Before Change: -%idle = delta_idle_purr / delta_tb * 100 - -After Change: -%idle = (delta_tb - delta_purr + delta_idle_purr) / delta_tb * 100 - -Signed-off-by: Saket Kumar Bhaskar -Signed-off-by: Tyrel Datwyler ---- - src/lparstat.c | 49 ++++++++++++++++++++++++++++++++++++++++++------- - 1 file changed, 42 insertions(+), 7 deletions(-) - -diff --git a/src/lparstat.c b/src/lparstat.c -index d2fdb3f..9d9ba1b 100644 ---- a/src/lparstat.c -+++ b/src/lparstat.c -@@ -515,11 +515,17 @@ void get_cpu_idle_purr(struct sysentry *unused_se, char *buf) - { - double delta_tb, delta_purr, delta_idle_purr; - double physc, idle; -+ char *descr; -+ char mode[32]; - - delta_tb = get_scaled_tb(); - delta_purr = get_delta_value("purr"); - delta_idle_purr = get_delta_value("idle_purr"); - -+ get_sysdata("shared_processor_mode", &descr, mode); -+ if (!strcmp(mode, "Dedicated")) -+ get_sysdata("DedDonMode", &descr, mode); -+ - /* - * Given that these values are read from different - * sources (purr from lparcfg and idle_purr from sysfs), -@@ -528,10 +534,23 @@ void get_cpu_idle_purr(struct sysentry *unused_se, char *buf) - */ - if (delta_idle_purr > delta_purr) - delta_idle_purr = delta_purr; -- -- physc = (delta_purr - delta_idle_purr) / delta_tb; -- idle = (delta_purr / delta_tb) - physc; -- idle *= 100.00; -+ /* -+ * Round down delta_purr to delta_tb if delta_tb - delta_purr -+ * error is under -1%. -+ */ -+ if (((delta_tb - delta_purr + delta_idle_purr) / delta_tb * 100) > -1 && ((delta_tb - delta_purr + delta_idle_purr) / delta_tb * 100) < 0) -+ delta_purr = delta_tb; -+ -+ if (!strcmp(mode, "Capped")) { -+ /* For dedicated - capped mode */ -+ physc = (delta_purr - delta_idle_purr) / delta_tb; -+ idle = (delta_purr / delta_tb) - physc; -+ idle *= 100.00; -+ } else { -+ /* For shared and dedicated - donate mode */ -+ idle = (delta_tb - delta_purr + delta_idle_purr) / delta_tb; -+ idle *= 100.00; -+ } - - sprintf(buf, "%.2f", idle); - } -@@ -559,14 +578,30 @@ void get_cpu_idle_spurr(struct sysentry *unused_se, char *buf) - double delta_tb, delta_spurr, delta_idle_spurr; - double physc, idle; - double rfreq; -+ char *descr; -+ char mode[32]; - - delta_tb = get_scaled_tb(); - delta_spurr = get_delta_value("spurr"); - delta_idle_spurr = get_delta_value("idle_spurr"); - -- physc = (delta_spurr - delta_idle_spurr) / delta_tb; -- idle = (delta_spurr / delta_tb) - physc; -- idle *= 100.00; -+ get_sysdata("shared_processor_mode", &descr, mode); -+ if (!strcmp(mode, "Dedicated")) -+ get_sysdata("DedDonMode", &descr, mode); -+ -+ if (delta_spurr > delta_tb) -+ delta_spurr = delta_tb; -+ -+ if (!strcmp(mode, "Capped")) { -+ /* For dedicated - capped mode */ -+ physc = (delta_spurr - delta_idle_spurr) / delta_tb; -+ idle = (delta_spurr / delta_tb) - physc; -+ idle *= 100.00; -+ } else { -+ /* For shared and dedicated - donate mode */ -+ idle = (delta_tb - delta_spurr + delta_idle_spurr) / delta_tb; -+ idle *= 100.00; -+ } - - rfreq = round_off_freq(); - idle += ((idle * rfreq) / 100); --- -2.45.2 - diff --git a/0003-drmgr-pci-Add-kernel-interface-support-for-device-tr.patch b/0003-drmgr-pci-Add-kernel-interface-support-for-device-tr.patch deleted file mode 100644 index f8d5451..0000000 --- a/0003-drmgr-pci-Add-kernel-interface-support-for-device-tr.patch +++ /dev/null @@ -1,79 +0,0 @@ -From 7038756642711fa53143906b3b3f29900eb4a4ea Mon Sep 17 00:00:00 2001 -From: Haren Myneni -Date: Tue, 13 Aug 2024 14:40:25 -0700 -Subject: [PATCH 3/4] drmgr/pci: Add kernel interface support for device tree - update - -Use the following kernel interfaces for PCI device type to update -the device tree if this feature is enabled in the kernel. - -dt add index --> for IO add -dt remove index --> for IO remove - -Signed-off-by: Haren Myneni ---- - src/drmgr/drslot_chrp_pci.c | 32 ++++++++++++++++++++++---------- - 1 file changed, 22 insertions(+), 10 deletions(-) - -diff --git a/src/drmgr/drslot_chrp_pci.c b/src/drmgr/drslot_chrp_pci.c -index 3b48de30be66..56f8bb397e67 100644 ---- a/src/drmgr/drslot_chrp_pci.c -+++ b/src/drmgr/drslot_chrp_pci.c -@@ -366,7 +366,6 @@ static int add_work(struct dr_node *node) - int pow_state; /* Tells us if power was turned on when */ - int iso_state; /* Tells us isolation state after */ - int rc; -- struct of_node *new_nodes;/* nodes returned from configure_connector */ - - /* if we're continuing, set LED_ON and see if a card is really there. */ - if (process_led(node, LED_ON)) -@@ -425,16 +424,26 @@ static int add_work(struct dr_node *node) - * the return status requires a message, print it out - * and exit, otherwise, add the nodes to the OF tree. - */ -- new_nodes = configure_connector(node->drc_index); -- if (new_nodes == NULL) { -- rtas_set_indicator(ISOLATION_STATE, node->drc_index, ISOLATE); -- set_power(node->drc_power, POWER_OFF); -- return -1; -+ if (kernel_dlpar_exists()) { -+ rc = do_dt_kernel_dlpar(node->drc_index, ADD); -+ } else { -+ struct of_node *new_nodes; /* nodes returned from */ -+ /* configure_connector */ -+ -+ new_nodes = configure_connector(node->drc_index); -+ if (new_nodes == NULL) { -+ rtas_set_indicator(ISOLATION_STATE, node->drc_index, -+ ISOLATE); -+ set_power(node->drc_power, POWER_OFF); -+ return -1; -+ } -+ -+ say(DEBUG, "Adding %s to %s\n", new_nodes->name, -+ node->ofdt_path); -+ rc = add_device_tree_nodes(node->ofdt_path, new_nodes); -+ free_of_node(new_nodes); - } - -- say(DEBUG, "Adding %s to %s\n", new_nodes->name, node->ofdt_path); -- rc = add_device_tree_nodes(node->ofdt_path, new_nodes); -- free_of_node(new_nodes); - if (rc) { - say(DEBUG, "add_device_tree_nodes failed at %s\n", - node->ofdt_path); -@@ -692,7 +701,10 @@ static struct dr_node *remove_work(struct dr_node *all_nodes) - * the device tree. - */ - for (child = node->children; child; child = child->next) { -- rc = remove_device_tree_nodes(child->ofdt_path); -+ if (kernel_dlpar_exists()) -+ rc = do_dt_kernel_dlpar(child->drc_index, REMOVE); -+ else -+ rc = remove_device_tree_nodes(child->ofdt_path); - if (rc) { - say(ERROR, "%s", sw_error); - rtas_set_indicator(ISOLATION_STATE, node->drc_index, --- -2.46.0 - diff --git a/0003-lparstat-app-Use-pic-value-at-boot-for-accurate-boot.patch b/0003-lparstat-app-Use-pic-value-at-boot-for-accurate-boot.patch deleted file mode 100644 index 63e3890..0000000 --- a/0003-lparstat-app-Use-pic-value-at-boot-for-accurate-boot.patch +++ /dev/null @@ -1,87 +0,0 @@ -From 81c51b59aacaa66d90d571ee19a2deeda1d45271 Mon Sep 17 00:00:00 2001 -From: Shrikanth Hegde -Date: Tue, 14 May 2024 20:46:43 +0530 -Subject: [PATCH] lparstat: app: Use pic value at boot for accurate boot time - reporting - -Upstream: merged, expected in v1.3.13 -Git-commit: 81c51b59aacaa66d90d571ee19a2deeda1d45271 - -When there are no options specified for lparstat, it is expected to -give reports since LPAR(Logical Partition) boot. APP(Available Physical -Processors) is an indicator for available cores in an Shared Processor -LPAR(SPLPAR). APP is derived using pool_idle_time which is obtained -using H_PIC call. - -The interval based reports show correct APP value while since boot -report shows very high APP values. This happens because in that case APP -is obtained by dividing pool idle time by LPAR uptime. Since pool idle -time is reported by the PowerVM hypervisor since its boot, it need not -align with LPAR boot. - -To fix that use the boot pool idle time added newly in the lparcfg as -below. - -APP = (pool idle time - boot pool idle time) / (uptime * timebase) - -*This depends on "powerpc/pseries: Add pool idle time at LPAR boot" be -merged into kernel* - -Results: (Observe APP values) -======================================================================== -lparstat -System Configuration -type=Shared mode=Uncapped smt=8 lcpu=12 mem=15573440 kB cpus=37 ent=12.00 - -reboot -stress-ng --cpu=$(nproc) -t 600 -sleep 600 -So in this case app is expected to close to 37-6=31. - -====== 6.9-rc1 and lparstat 1.3.10 ============= -%user %sys %wait %idle physc %entc lbusy app vcsw phint ------ ----- ----- ----- ----- ----- ----- ----- ----- ----- -47.48 0.01 0.00 52.51 0.00 0.00 47.49 69099.72 541547 21 - -=== With this patch and this patch to do the above equation === -%user %sys %wait %idle physc %entc lbusy app vcsw phint ------ ----- ----- ----- ----- ----- ----- ----- ----- ----- -47.48 0.01 0.00 52.51 5.73 47.75 47.49 31.21 541753 21 - -Signed-off-by: Shrikanth Hegde -Signed-off-by: Tyrel Datwyler ---- - src/lparstat.c | 3 ++- - src/lparstat.h | 2 ++ - 2 files changed, 4 insertions(+), 1 deletion(-) - -diff --git a/src/lparstat.c b/src/lparstat.c -index 9d9ba1b..30889b2 100644 ---- a/src/lparstat.c -+++ b/src/lparstat.c -@@ -460,7 +460,8 @@ void get_cpu_app(struct sysentry *unused_se, char *buf) - se = get_sysentry("pool_idle_time"); - new_app = strtoll(se->value, NULL, 0); - if (se->old_value[0] == '\0') { -- old_app = 0; -+ se = get_sysentry("boot_pool_idle_time"); -+ old_app = strtoll(se->value, NULL, 0); - } else { - old_app = strtoll(se->old_value, NULL, 0); - } -diff --git a/src/lparstat.h b/src/lparstat.h -index b7c88e9..77203e1 100644 ---- a/src/lparstat.h -+++ b/src/lparstat.h -@@ -124,6 +124,8 @@ struct sysentry system_data[] = { - .get = &get_percent_entry}, - {.name = "pool_idle_time", - .descr = "Shared Processor Pool Idle Time"}, -+ {.name = "boot_pool_idle_time", -+ .descr = "Shared Processor Pool Idle Time"}, - {.name = "pool_num_procs", - .descr = "Shared Processor Pool Processors"}, - {.name = "unallocated_capacity_weight", --- -2.45.2 - diff --git a/0004-drmgr-phb-Add-kernel-interface-support-for-device-tr.patch b/0004-drmgr-phb-Add-kernel-interface-support-for-device-tr.patch deleted file mode 100644 index cd4a4e5..0000000 --- a/0004-drmgr-phb-Add-kernel-interface-support-for-device-tr.patch +++ /dev/null @@ -1,142 +0,0 @@ -From b8ab373035984dd8aba29f1a0c03dcef6546f004 Mon Sep 17 00:00:00 2001 -From: Haren Myneni -Date: Tue, 13 Aug 2024 14:40:24 -0700 -Subject: [PATCH 4/4] drmgr/phb: Add kernel interface support for device tree - update - -Use the following kernel interfaces for PHB device type to update -the device tree if this feature is enabled in the kernel. - -dt add index --> for IO add -dt remove index --> for IO remove - -Signed-off-by: Haren Myneni ---- - src/drmgr/common_pci.c | 29 +++++++++++++++++++++------- - src/drmgr/drslot_chrp_phb.c | 38 ++++++++++++++++++++----------------- - 2 files changed, 43 insertions(+), 24 deletions(-) - -diff --git a/src/drmgr/common_pci.c b/src/drmgr/common_pci.c -index 374129cf33e0..540864574569 100644 ---- a/src/drmgr/common_pci.c -+++ b/src/drmgr/common_pci.c -@@ -1390,7 +1390,6 @@ print_node_list(struct dr_node *first_node) - static int - acquire_hp_resource(struct dr_connector *drc, char *of_path) - { -- struct of_node *new_nodes; - int state; - int rc; - -@@ -1429,12 +1428,21 @@ acquire_hp_resource(struct dr_connector *drc, char *of_path) - } - - if (state == PRESENT) { -- new_nodes = configure_connector(drc->index); -- if (new_nodes == NULL) -- return -1; -+ /* -+ * Use kernel DLPAR interface if it is enabled -+ */ -+ if (kernel_dlpar_exists()) { -+ rc = do_dt_kernel_dlpar(drc->index, ADD); -+ } else { -+ struct of_node *new_nodes; -+ -+ new_nodes = configure_connector(drc->index); -+ if (new_nodes == NULL) -+ return -1; - -- rc = add_device_tree_nodes(of_path, new_nodes); -- free_of_node(new_nodes); -+ rc = add_device_tree_nodes(of_path, new_nodes); -+ free_of_node(new_nodes); -+ } - if (rc) { - say(ERROR, "add nodes failed for 0x%x\n", drc->index); - return rc; -@@ -1490,7 +1498,14 @@ release_hp_resource(struct dr_node *node) - { - int rc; - -- rc = remove_device_tree_nodes(node->ofdt_path); -+ /* -+ * Use kernel DLPAR interface if it is enabled -+ */ -+ if (kernel_dlpar_exists()) -+ rc = do_dt_kernel_dlpar(node->drc_index, REMOVE); -+ else -+ rc = remove_device_tree_nodes(node->ofdt_path); -+ - if (rc) { - say(ERROR, "failed to remove kernel nodes for index 0x%x\n", - node->drc_index); -diff --git a/src/drmgr/drslot_chrp_phb.c b/src/drmgr/drslot_chrp_phb.c -index f59baa4f9e27..ffa17d8f6b7d 100644 ---- a/src/drmgr/drslot_chrp_phb.c -+++ b/src/drmgr/drslot_chrp_phb.c -@@ -108,17 +108,16 @@ release_phb(struct dr_node *phb) - { - int rc; - -- rc = remove_device_tree_nodes(phb->ofdt_path); -- if (rc) -- return rc; -- -- if (phb->phb_ic_ofdt_path[0] != '\0') { -- rc = remove_device_tree_nodes(phb->phb_ic_ofdt_path); -- if (rc) -- return rc; -+ if (kernel_dlpar_exists()) -+ rc = do_dt_kernel_dlpar(phb->drc_index, REMOVE); -+ else { -+ rc = remove_device_tree_nodes(phb->ofdt_path); -+ if (!rc && (phb->phb_ic_ofdt_path[0] != '\0')) -+ rc = remove_device_tree_nodes(phb->phb_ic_ofdt_path); - } - -- rc = release_drc(phb->drc_index, PHB_DEV); -+ if (!rc) -+ rc = release_drc(phb->drc_index, PHB_DEV); - - return rc; - } -@@ -371,7 +370,6 @@ phb_remove_error: - static int acquire_phb(char *drc_name, struct dr_node **phb) - { - struct dr_connector drc; -- struct of_node *of_nodes; - char path[DR_PATH_MAX]; - int rc; - -@@ -386,14 +384,20 @@ static int acquire_phb(char *drc_name, struct dr_node **phb) - if (rc) - return rc; - -- of_nodes = configure_connector(drc.index); -- if (of_nodes == NULL) { -- release_drc(drc.index, PHB_DEV); -- return -1; -- } -+ if (kernel_dlpar_exists()) { -+ rc = do_dt_kernel_dlpar(drc.index, ADD); -+ } else { -+ struct of_node *of_nodes; - -- rc = add_device_tree_nodes(path, of_nodes); -- free_of_node(of_nodes); -+ of_nodes = configure_connector(drc.index); -+ if (of_nodes == NULL) { -+ release_drc(drc.index, PHB_DEV); -+ return -1; -+ } -+ -+ rc = add_device_tree_nodes(path, of_nodes); -+ free_of_node(of_nodes); -+ } - if (rc) { - say(ERROR, "add_device_tree_nodes failed at %s\n", path); - release_drc(drc.index, PHB_DEV); --- -2.46.0 - diff --git a/0004-lparstat-Use-CLOCK_BOOTTIME-for-get_time-interface-a.patch b/0004-lparstat-Use-CLOCK_BOOTTIME-for-get_time-interface-a.patch deleted file mode 100644 index eb92018..0000000 --- a/0004-lparstat-Use-CLOCK_BOOTTIME-for-get_time-interface-a.patch +++ /dev/null @@ -1,238 +0,0 @@ -From 9572f8c2022fed9783f0f606cbe778ffe0d93fef Mon Sep 17 00:00:00 2001 -From: Shrikanth Hegde -Date: Tue, 14 May 2024 20:46:44 +0530 -Subject: [PATCH] lparstat: Use CLOCK_BOOTTIME for get_time interface and - Deprecate get_sys_upttime - -Upstream: merged, expected in v1.3.13 -Git-commit: 9572f8c2022fed9783f0f606cbe778ffe0d93fef - -"time" is used in lparstat.c to find the time elapsed either since boot -or between two intervals. But it is using gettimeofday which returns the -time elapsed since Epoch. This works for intervals calculations but it -doesn't work for since boot reports. - -Instead use the CLOCK_BOOTTIME interface to get the elapsed time. This -fixes physc, utilization based on purr being wrong since boot. - -Remove "uptime" interface since there are no users of it. One can get -the system uptime by calling "time" itself. - -=============================== ::Test:: ========================== -reboot -stress-ng --cpu=$(nproc) -t 600 -sleep 600 - -Results:: -==================== Shared LPAR ================================== -System Configuration -type=Shared mode=Uncapped smt=8 lcpu=12 mem=15573440 kB cpus=37 ent=12.00 - -lparstat -E <-- Observe utilization values -====== 6.9-rc1 and lparstat 1.3.10 ============= ----Actual--- -Normalized- -%busy %idle Frequency %busy %idle ------- ------ ------------- ------ ------ - 0.00 0.00 3.87GHz[106%] 0.00 0.00 - -==== With this patch and patch 2/3 ============= ----Actual--- -Normalized- -%busy %idle Frequency %busy %idle ------- ------ ------------- ------ ------ - 38.72 0.11 3.87GHz[106%] 41.04 0.12 - -lparstat <-- Observe physc values -====== 6.9-rc1 and lparstat 1.3.10 =================================== -%user %sys %wait %idle physc %entc lbusy app vcsw phint ------ ----- ----- ----- ----- ----- ----- ----- ----- ----- -47.48 0.01 0.00 52.51 0.00 0.00 47.49 69099.72 541547 21 - -=== With this patch and this patch ================================ === -%user %sys %wait %idle physc %entc lbusy app vcsw phint ------ ----- ----- ----- ----- ----- ----- ----- ----- ----- -47.48 0.01 0.00 52.51 5.73 47.75 47.49 31.21 541753 21 - -==================== Dedicated LPAR ================================== -System Configuration -type=Dedicated mode=Capped smt=8 lcpu=12 mem=15573248 kB cpus=0 ent=12.00 - -::lparstat -E:: <-- Observe utilization values. -======= 6.9-rc1 and lparstat 1.3.10 ============= ----Actual--- -Normalized- -%busy %idle Frequency %busy %idle ------- ------ ------------- ------ ------ - 0.00 0.00 3.87GHz[106%] 0.00 0.00 - -=== With this patch and powerpc-utils patch to do the above equation === ----Actual--- -Normalized- -%busy %idle Frequency %busy %idle ------- ------ ------------- ------ ------ - 48.87 51.51 3.87GHz[106%] 51.81 54.60 - -::lparstat:: <-- Observe physc values. -======= 6.9-rc1 and lparstat 1.3.10 ============= -%user %sys %wait %idle physc %entc lbusy app vcsw phint ------ ----- ----- ----- ----- ----- ----- ----- ----- ----- -48.38 0.01 0.00 51.61 0.03 0.25 48.39 0.00 344661 8 - -=== With this patch and powerpc-utils patch to do the above equation === -%user %sys %wait %idle physc %entc lbusy app vcsw phint ------ ----- ----- ----- ----- ----- ----- ----- ----- ----- -48.38 0.01 0.00 51.61 12.05 100.42 48.39 0.00 344877 8 - -============================================================================= - -Interval based lparstat values are same. With this patch the physc and -busy purr/idle purr values show correctly for since boot reports. - -Note: this patch doesn't fix the idle purr being incorrect. That is -currently being investigated. - -Signed-off-by: Shrikanth Hegde -Signed-off-by: Tyrel Datwyler ---- - src/lparstat.c | 57 +++++++++----------------------------------------- - src/lparstat.h | 6 ------ - 2 files changed, 10 insertions(+), 53 deletions(-) - -diff --git a/src/lparstat.c b/src/lparstat.c -index 30889b2..3e9169d 100644 ---- a/src/lparstat.c -+++ b/src/lparstat.c -@@ -36,6 +36,7 @@ - #include "lparstat.h" - #include "pseries_platform.h" - #include "cpu_info_helpers.h" -+#include - - #define LPARCFG_FILE "/proc/ppc64/lparcfg" - #define SE_NOT_FOUND "???" -@@ -255,14 +256,17 @@ long long get_delta_value(char *se_name) - - void get_time() - { -- struct timeval t; - struct sysentry *se; -+ struct timespec ts; -+ int err; - -- gettimeofday(&t, 0); -+ err = clock_gettime(CLOCK_BOOTTIME, &ts); -+ if (err) -+ return; - - se = get_sysentry("time"); - sprintf(se->value, "%lld", -- (long long)t.tv_sec * 1000000LL + (long long)t.tv_usec); -+ (long long)ts.tv_sec); - } - - int get_time_base() -@@ -304,7 +308,6 @@ double get_scaled_tb(void) - online_cores = atoi(se->value); - - elapsed = get_delta_value("time"); -- elapsed = elapsed / 1000000.0; - - se = get_sysentry("timebase"); - timebase = atoi(se->value); -@@ -312,31 +315,6 @@ double get_scaled_tb(void) - return (timebase * elapsed) * online_cores; - } - --void get_sys_uptime(struct sysentry *unused_se, char *uptime) --{ -- FILE *f; -- char buf[80]; -- -- f = fopen("/proc/uptime", "r"); -- if (!f) { -- fprintf(stderr, "Could not open /proc/uptime\n"); -- sprintf(uptime, SE_NOT_VALID); -- return; -- } -- -- if ((fgets(buf, 80, f)) != NULL) { -- char *value; -- -- value = strchr(buf, ' '); -- *value = '\0'; -- sprintf(uptime, "%s", buf); -- } else { -- sprintf(uptime, SE_NOT_VALID); -- } -- -- fclose(f); --} -- - int get_nominal_frequency(void) - { - FILE *f; -@@ -403,13 +381,12 @@ void get_cpu_physc(struct sysentry *unused_se, char *buf) - delta_purr = get_delta_value("purr"); - - se = get_sysentry("tbr"); -- if (se->value[0] != '\0') { -+ if (se->old_value[0] != '\0') { - delta_tb = get_delta_value("tbr"); - - physc = delta_purr / delta_tb; - } else { - elapsed = get_delta_value("time"); -- elapsed = elapsed / 1000000.0; - - se = get_sysentry("timebase"); - timebase = atoi(se->value); -@@ -436,23 +413,9 @@ void get_cpu_app(struct sysentry *unused_se, char *buf) - { - struct sysentry *se; - float timebase, app, elapsed_time; -- long long new_app, old_app, delta_time; -- char *descr, uptime[32]; -+ long long new_app, old_app; - -- se = get_sysentry("time"); -- if (se->old_value[0] == '\0') { -- /* Single report since boot */ -- get_sysdata("uptime", &descr, uptime); -- -- if (!strcmp(uptime, SE_NOT_VALID)) { -- sprintf(buf, "-"); -- return; -- } -- elapsed_time = atof(uptime); -- } else { -- delta_time = get_delta_value("time"); -- elapsed_time = delta_time / 1000000.0; -- } -+ elapsed_time = get_delta_value("time"); - - se = get_sysentry("timebase"); - timebase = atof(se->value); -diff --git a/src/lparstat.h b/src/lparstat.h -index 77203e1..86e45e4 100644 ---- a/src/lparstat.h -+++ b/src/lparstat.h -@@ -60,7 +60,6 @@ extern void get_cpu_stat(struct sysentry *, char *); - extern void get_cpu_physc(struct sysentry *, char *); - extern void get_per_entc(struct sysentry *, char *); - extern void get_cpu_app(struct sysentry *, char *); --extern void get_sys_uptime(struct sysentry *, char *); - extern void get_cpu_util_purr(struct sysentry *unused_se, char *buf); - extern void get_cpu_idle_purr(struct sysentry *unused_se, char *buf); - extern void get_cpu_util_spurr(struct sysentry *unused_se, char *buf); -@@ -272,11 +271,6 @@ struct sysentry system_data[] = { - {.name = "phint", - .descr = "Phantom Interrupts"}, - -- /* /proc/uptime */ -- {.name = "uptime", -- .descr = "System Uptime", -- .get = &get_sys_uptime}, -- - /* /sys/devices/system/cpu/cpu/ */ - /* Sum of per CPU SPURR registers */ - {.name = "spurr", --- -2.45.2 - diff --git a/0005-ofpathname-skip-devices-with-no-devspec-when-coorela.patch b/0005-ofpathname-skip-devices-with-no-devspec-when-coorela.patch deleted file mode 100644 index c9321b9..0000000 --- a/0005-ofpathname-skip-devices-with-no-devspec-when-coorela.patch +++ /dev/null @@ -1,63 +0,0 @@ -From a56028561ad9c01b5d3a767e50455c561e09191c Mon Sep 17 00:00:00 2001 -From: Tyrel Datwyler -Date: Fri, 26 Jul 2024 16:17:47 -0700 -Subject: [PATCH] ofpathname: skip devices with no devspec when coorelating FC - OF paths - -Upstream: merged, expected in v1.3.13 -Git-commit: a56028561ad9c01b5d3a767e50455c561e09191c - -When using ofpathname to find the logical device associated to a Fibre -Channel or Virtual Fibre Channel OF path an ERR_NO_SYSFS_DEVINFO error -can be returned if a device with no devspec attribute is in the list of -devices to cross reference. - -If a device with no devspec is found simply skip it an continue the -for-loop device search. - -Signed-off-by: Tyrel Datwyler ---- - scripts/ofpathname | 16 ++++++++++++---- - 1 file changed, 12 insertions(+), 4 deletions(-) - -diff --git a/scripts/ofpathname b/scripts/ofpathname -index 833d03f..711ab62 100755 ---- a/scripts/ofpathname -+++ b/scripts/ofpathname -@@ -1649,10 +1649,14 @@ of2l_vfc() - link=$PWD - - local device_dir=${PWD##/*/} -- goto_dir $PWD "devspec" -+ goto_dir $PWD "devspec" 0 -+ if [[ $? -eq 1 ]]; then -+ continue; -+ fi - OF_PATH=`$CAT $PWD/devspec` -+ - if [[ -z $OF_PATH ]]; then -- err $ERR_NO_LOGDEV -+ err $ERR_NO_LOGDEV - fi - - # Skip if this is not the correct FC port -@@ -1727,10 +1731,14 @@ of2l_fc() - - cd $link - local device_dir=${PWD##/*/} -- goto_dir $PWD "devspec" -+ goto_dir $PWD "devspec" 0 -+ if [[ $? -eq 1 ]]; then -+ continue; -+ fi - OF_PATH=`$CAT devspec` -+ - if [[ -z $OF_PATH ]]; then -- err $ERR_NO_LOGDEV -+ err $ERR_NO_LOGDEV; - fi - - # Skip if this is not the correct FC port --- -2.45.2 - diff --git a/0006-drmgr-Free-nodes-returned-from-configure_connector.patch b/0006-drmgr-Free-nodes-returned-from-configure_connector.patch deleted file mode 100644 index d0b006a..0000000 --- a/0006-drmgr-Free-nodes-returned-from-configure_connector.patch +++ /dev/null @@ -1,46 +0,0 @@ -From 5db2df531f9c242b13ef6520814c99685144c6d4 Mon Sep 17 00:00:00 2001 -From: Haren Myneni -Date: Sat, 29 Jun 2024 14:14:10 -0700 -Subject: [PATCH] drmgr: Free nodes returned from configure_connector - -Upstream: merged, expected in v1.3.13 -Git-commit: 5db2df531f9c242b13ef6520814c99685144c6d4 - -of_nodes returned from configure_connector should be freed after -updating the device tree and is missing in acquire_hp_resource() -and add_work(). This patch calls free_of_node() in these functions. - -Signed-off-by: Haren Myneni -Signed-off-by: Tyrel Datwyler ---- - src/drmgr/common_pci.c | 1 + - src/drmgr/drslot_chrp_pci.c | 1 + - 2 files changed, 2 insertions(+) - -diff --git a/src/drmgr/common_pci.c b/src/drmgr/common_pci.c -index 2411641..759589a 100644 ---- a/src/drmgr/common_pci.c -+++ b/src/drmgr/common_pci.c -@@ -1434,6 +1434,7 @@ acquire_hp_resource(struct dr_connector *drc, char *of_path) - return -1; - - rc = add_device_tree_nodes(of_path, new_nodes); -+ free_of_node(new_nodes); - if (rc) { - say(ERROR, "add nodes failed for 0x%x\n", drc->index); - return rc; -diff --git a/src/drmgr/drslot_chrp_pci.c b/src/drmgr/drslot_chrp_pci.c -index ac078db..ec3c77c 100644 ---- a/src/drmgr/drslot_chrp_pci.c -+++ b/src/drmgr/drslot_chrp_pci.c -@@ -454,6 +454,7 @@ static int add_work(struct dr_node *node, bool partner_device) - - say(DEBUG, "Adding %s to %s\n", new_nodes->name, node->ofdt_path); - rc = add_device_tree_nodes(node->ofdt_path, new_nodes); -+ free_of_node(new_nodes); - if (rc) { - say(DEBUG, "add_device_tree_nodes failed at %s\n", - node->ofdt_path); --- -2.45.2 - diff --git a/powerpc-utils-1.3.12.tar.gz b/powerpc-utils-1.3.12.tar.gz deleted file mode 100644 index 9f715b2..0000000 --- a/powerpc-utils-1.3.12.tar.gz +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:c3f62f63fb856bbd70eee997ecd3d870eca2220103fbf00d8e3d7ee414f5c7e7 -size 404431 diff --git a/powerpc-utils-1.3.13.tar.gz b/powerpc-utils-1.3.13.tar.gz new file mode 100644 index 0000000..bd08e8e --- /dev/null +++ b/powerpc-utils-1.3.13.tar.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:35efb04063f1b7bd9d715f1d8d3ab75352b595b1fd12349d7570a7ba19ba6d86 +size 413796 diff --git a/powerpc-utils.changes b/powerpc-utils.changes index ebb3c4e..7a79a6d 100644 --- a/powerpc-utils.changes +++ b/powerpc-utils.changes @@ -1,3 +1,22 @@ +------------------------------------------------------------------- +Thu Nov 21 08:10:24 UTC 2024 - Michal Suchanek + +- Update to version 1.3.13 (jsc#PED-9917) + * multipath - drmgr support (jsc#PED-9914) +- Remove upstreamed patches + * ppc64_cpu-Clean-up-sysfs-smt-control-error-handling.patch + * ppc64_cpu-Support-partial-SMT-level-through-SYS-FS-s.patch + * 0005-ofpathname-skip-devices-with-no-devspec-when-coorela.patch + * 0002-lparstat-Fix-Idle-and-busy-PURR-SPURR.patch + * 0003-lparstat-app-Use-pic-value-at-boot-for-accurate-boot.patch + * 0004-lparstat-Use-CLOCK_BOOTTIME-for-get_time-interface-a.patch + * 0001-drmgr-Return-from-get_node_by_name-if-matched-DRC-in.patch + * 0006-drmgr-Free-nodes-returned-from-configure_connector.patch + * 0001-drmgr-pci-Enable-in-kernel-functionality-to-update-d.patch + * 0002-drmgr-SLOT-Add-kernel-interface-support-for-device-t.patch + * 0004-drmgr-phb-Add-kernel-interface-support-for-device-tr.patch + * 0003-drmgr-pci-Add-kernel-interface-support-for-device-tr.patch + ------------------------------------------------------------------- Fri Sep 20 06:15:46 UTC 2024 - Michal Suchanek @@ -56,7 +75,7 @@ Thu Feb 8 09:43:47 UTC 2024 - Michal Suchanek Mon Feb 5 15:30:16 UTC 2024 - Michal Suchanek - Use separate hcn-init service for wicked and NM (bsc#1200731 ltc#198485) - * hcn-init-Split-services-per-connection-manager.patch + * hcn-init-Split-services-per-connection-manager.patch ------------------------------------------------------------------- Thu Feb 1 09:17:33 UTC 2024 - Michal Suchanek @@ -779,12 +798,12 @@ Tue Jun 7 12:23:15 UTC 2016 - jloeser@suse.com ------------------------------------------------------------------- Tue May 24 23:17:02 UTC 2016 - dvaleev@suse.com -- Adjust dependant libvirt service name (libvirt-service-dep.patch) +- Adjust dependant libvirt service name (libvirt-service-dep.patch) ------------------------------------------------------------------- Tue May 24 23:01:49 UTC 2016 - dvaleev@suse.com -- package smt-off.service (systemd-dir.patch) +- package smt-off.service (systemd-dir.patch) ------------------------------------------------------------------- Thu Apr 14 11:38:50 UTC 2016 - jloeser@suse.com @@ -878,7 +897,7 @@ Mon Jun 8 20:36:48 UTC 2015 - dvlaeev@suse.com - ofpathname_powernv.patch (boo#933651) If ofpathname is not supported on a platform, exit with 0. - This will pevent grub2-install fail on PowerNV platform + This will pevent grub2-install fail on PowerNV platform ------------------------------------------------------------------- Mon Jun 8 20:28:51 UTC 2015 - dvlaeev@suse.com @@ -887,26 +906,26 @@ Mon Jun 8 20:28:51 UTC 2015 - dvlaeev@suse.com ofpathname: Convert logical path to OF device path for virtio-scsi devices Add support to convert logical device path to Open firmware device path for virtio-scsi devices. - + lsslot/drmgr: little endian support for memory This patch adds some support for memory slot listing and memory hotplugging on little endian systems. - + drmgr: Correct -s option handling The usage statement for drmgr claims that we can add/remove memory and cpus by drc name or drc index. The current code though assumes that any use of the -s flag to specify this defaults to drc name. - + This patch updates the option checking for memory and cpu operations to allow users to specify a drc index with the -s option. This will be handled the same way the -s option for pci devices is handled, assume it is a drc name unless it starts with '0x', indicating the string is really a hex value, and switching it to a drc index. - + drmgr: Correct null pointer usage We can't de-reference NULL pointers, it's not a nice thing to do. I found these during some debugging, correcting to avoid future bugs. - + ofpathname: Fix checking for hbtl Fix checking for hbtl in of2l_scsi (). @@ -916,60 +935,60 @@ Mon Jun 8 20:28:51 UTC 2015 - dvlaeev@suse.com a warning about reviewing this archive to detect included passwords, which might allow remote attackers to obtain sensitive information by leveraging access to a technical-support data stream. - + Solution: print a warning that confidential data may be collected via snap - + lparstat: using get_smt_mode when showing SMT info get_smt_state is used in the system_data structure to display both the shared_processor_mode and the smt_state members. After reviewing code and documentation, it seems that the information in smt_state is meant to be acquired from ppc64_cpu instead of lparcfg. With this change, the SMT listin will be determined by the output of ppc64_cpu --smt. - + ppc64_cpu: Allow builds without librtas Currently, --without-librtas disables ppc64_cpu. - + However, we only need librtas for the run-mode determination; other functions will work fine without it. - + This change allows ppc64_cpu to be built without librtas, by conditionally enabling run-mode, and restoring ppc64_cpu to be built when --without-librtas is given. - + We need to re-work src/Makefile.am a little here - we use the += operator to include rtas-specific functionality, which means the with-librtas cases need to be listed before the without ones. - + We also need to #include stdint.h, as ppc64_cpu.c uses inttypes from here. - + drmgr: Correct the -s option handling correction In response to my earlier patch that attempted to correct the -s option hand for drmgr I introduced a bug in which the usr_drc_name could be NULL causing a segfault when attempting to use it. - + This patch adds a check to make sure it is not NULL. - + lparstat: using get_smt_mode when showing SMT info get_smt_state is used in the system_data structure to display both the shared_processor_mode and the smt_state members. After reviewing code and documentation, it seems that the information in smt_state is meant to be acquired from ppc64_cpu instead of lparcfg. With this change, the SMT listin will be determined by the output of ppc64_cpu --smt. - + drmgr: Correct the -s option handling correction In response to my earlier patch that attempted to correct the -s option hand for drmgr I introduced a bug in which the usr_drc_name could be NULL causing a segfault when attempting to use it. - + This patch adds a check to make sure it is not NULL. lparstat: remove "On" from possible smt output The SMT row will only display the number of enabled SMT threads if SMT is enabled. - + ppc64_cpu: output only the number of SMT threads when smt is on This patch removes "SMT is on" as a possible output when the smt option is used. Instead, only the number of SMT threads will be displayed. @@ -998,7 +1017,7 @@ Tue Oct 28 10:42:23 UTC 2014 - jloeser@suse.com - add a warning that confidential data may be collected via snap (bnc#883174, CVE-2014-4040) - added patches: - * powerpc-utils.snap-confidential_config_files_warning.patch + * powerpc-utils.snap-confidential_config_files_warning.patch ------------------------------------------------------------------- Fri Sep 19 09:55:35 UTC 2014 - stefan.fent@suse.com @@ -1006,7 +1025,7 @@ Fri Sep 19 09:55:35 UTC 2014 - stefan.fent@suse.com - Fix OF Patchnames with vscsi (bnc #886123) - added patches: powerpc-utils-bug-886123_01-l2of_scsi.patch - powerpc-utils-bug-886123_02-of2l_scsi.patch + powerpc-utils-bug-886123_02-of2l_scsi.patch ------------------------------------------------------------------- Thu Sep 4 13:06:31 UTC 2014 - jloeser@suse.com @@ -1026,8 +1045,8 @@ Wed Jul 16 13:58:42 UTC 2014 - jloeser@suse.com - fix for nvram --unzip option to handle endianness (BNC#887275) - added patch: - * powerpc-utils.endianness_for_unzip_option.patch - + * powerpc-utils.endianness_for_unzip_option.patch + ------------------------------------------------------------------- Thu Jul 3 13:35:14 CEST 2014 - pth@suse.de @@ -1065,18 +1084,18 @@ Thu Jul 3 13:35:14 CEST 2014 - pth@suse.de Tue Mar 25 12:23:19 UTC 2014 - jloeser@suse.com - version update to 1.2.20 (BNC#869852) - see changelog for changes + see changelog for changes ------------------------------------------------------------------- Tue Mar 4 12:28:16 UTC 2014 - jloeser@suse.com -- version update to 1.2.19 (BNC#866675) +- version update to 1.2.19 (BNC#866675) see changelog for changes ------------------------------------------------------------------- Tue Feb 11 15:14:39 UTC 2014 - dvlaeev@suse.com -- Change license to CPL-1.0 +- Change license to CPL-1.0 ------------------------------------------------------------------- Fri Jan 10 16:58:09 UTC 2014 - jloeser@suse.com @@ -1087,40 +1106,40 @@ Fri Jan 10 16:58:09 UTC 2014 - jloeser@suse.com ------------------------------------------------------------------- Mon Dec 9 15:04:48 UTC 2013 - dvaleev@suse.com -- add ppc64le +- add ppc64le ------------------------------------------------------------------- Fri Jul 12 14:48:28 UTC 2013 - dvaleev@suse.com - update to 1.2.17 - See changelog for changes + See changelog for changes ------------------------------------------------------------------- Mon Jul 1 13:41:54 UTC 2013 - dvaleev@suse.com -- Recommend powerpc-utils-python instead of Requireing it. The +- Recommend powerpc-utils-python instead of Requireing it. The pacakge is not mandatory ------------------------------------------------------------------- Sun Feb 24 16:37:47 UTC 2013 - dvaleev@suse.com - Update to 1.2.16 - * The drmgr command does not currently allow users to specify the - drc index of the resource they wish to add/remove. This patch - updates the drmgr command so that users can specify either a + * The drmgr command does not currently allow users to specify the + drc index of the resource they wish to add/remove. This patch + updates the drmgr command so that users can specify either a drc name or a drc index with the -s option. - - * This functionality is needed for the upcoming userspace handling - of PRRN RTAS events. The rtas_errd will already have the drc - index for the resources it needs, adding the capability to - parse drc names from the device tree is not supported in + + * This functionality is needed for the upcoming userspace handling + of PRRN RTAS events. The rtas_errd will already have the drc + index for the resources it needs, adding the capability to + parse drc names from the device tree is not supported in rtas_errd though. - * Update the man page for update_flash which had an out of date link + * Update the man page for update_flash which had an out of date link to instructions for resetting a managed system to a non-partitioned configuration. - * The upstream kernel has a feature in the pseries PCI code called DDW + * The upstream kernel has a feature in the pseries PCI code called DDW that inserts TCEs transparently to device drivers. The upstream kernel was recently sent a fix for DLPAR that ensured those TCEs would get cleared upon DLPAR remove (http://patchwork.ozlabs.org/patch/213735/), @@ -1129,55 +1148,55 @@ Sun Feb 24 16:37:47 UTC 2013 - dvaleev@suse.com into the slot isolate code. Without such a change, there is no way to ensure the DDW TCEs are cleared, and the DLPAR will always fail. - * Add and use dt_swap_int() to byte swap on little endian. - - * Also declare buf as unsigned char, so that we don't sign extend when + * Add and use dt_swap_int() to byte swap on little endian. + + * Also declare buf as unsigned char, so that we don't sign extend when printing values from it. - + ------------------------------------------------------------------- Thu Dec 20 09:59:34 UTC 2012 - dvaleev@suse.com - Update to 1.2.15 - * The frequency determination for a system can fail if we can not - open enough files to make the determination. This patch - pre-emptively updates the rlimit to ensure we can open all the + * The frequency determination for a system can fail if we can not + open enough files to make the determination. This patch + pre-emptively updates the rlimit to ensure we can open all the files necessary. - * The latest firmware levels allow for setting different power - savings modes. This updates the ppc64_cpu command to display - the power savings mode that is currently set for the partition, - or for the partition and the system if they are different, + * The latest firmware levels allow for setting different power + savings modes. This updates the ppc64_cpu command to display + the power savings mode that is currently set for the partition, + or for the partition and the system if they are different, when displaying the results for the --frequency option. - * Add support to convert device-mapper multipath device names to + * Add support to convert device-mapper multipath device names to OFW device path. - As multipath devices are seen by the OFW as multiple - (equivalent) devices, only one of them is printed so we don't - break user scripts expecting one line output. We can add an + As multipath devices are seen by the OFW as multiple + (equivalent) devices, only one of them is printed so we don't + break user scripts expecting one line output. We can add an option later to print all the paths to the multipath device. - + * We have introduced full fledged Light Path Diagnostics support on PowerLinux. To bring all Light Path Diagnostics related code into common tree and re-use common functionalities across - tools, we have re-implemented usysident/usysattn commands. - Light Path Diagnostics including new implentation of - usysident/usysattn will be hosted in PowerLinux diagnostic + tools, we have re-implemented usysident/usysattn commands. + Light Path Diagnostics including new implentation of + usysident/usysattn will be hosted in PowerLinux diagnostic package (ppc64-diag). - + ppc64-diag source: http://sourceforge.net/projects/linux-diag/files/ppc64-diag - + This will introduce package conflict between ppc64-diag and powerpc-utils. To avoid the conflict we need to deprecate the usysident/usysattn commands from powerpc-utils. - + This patch deprecates usysident/usysattn commands. * Update the values reported in the ppc64_cpu --frequency output to be displayed to three digits of precision instead of two. - - This update to help with test teams that are making this update - to their code base already so as to get this precision in + + This update to help with test teams that are making this update + to their code base already so as to get this precision in the reporting. - Comment Obsoletes/Provides for now, there is no such packages for @@ -1195,7 +1214,7 @@ Tue Dec 18 18:02:04 UTC 2012 - dvaleev@suse.com by using the ptrace peekuser capabilites in the kernel and simply doing a ptrace attach and peek from the ppc64_cpu command. Note: this does not actua stop the process we are attaching to while under ptrace control. - + The patch does a little more than just adding this functionality since the --dscr commad now takes an optional -p option. This required an updated to the command parsing code to allow this. @@ -1209,17 +1228,17 @@ Tue Dec 18 18:02:04 UTC 2012 - dvaleev@suse.com - There are two parameters on lparstat, count and interval, that were undocumented on the man page. This patch adds these parameters to the - option section in the lparstat manpage. + option section in the lparstat manpage. - snap uses temporary directory to gather system data (files and command output), and finally creates compressed output file in tar or tar.gz format. We do not need to keep the temporary directory. - + snap now deletes the temprory directory it used. - Currently by default snap output is stored in snap.tar.gz file. This makes difficult to identify when the snap output was collected. - + This patch introduces new option -t which adds hostname adds and system time to output filename. With -t output filename will be snap--.tar.gz. This patch also creates @@ -1236,7 +1255,7 @@ Tue Dec 18 18:02:04 UTC 2012 - dvaleev@suse.com ------------------------------------------------------------------- Fri Aug 10 22:30:28 UTC 2012 - dvaleev@suse.com -- add wrapper for nvsetenv which just wraps nvram +- add wrapper for nvsetenv which just wraps nvram ------------------------------------------------------------------- Sun Jun 10 12:28:53 UTC 2012 - dvaleev@suse.com @@ -1253,16 +1272,16 @@ Wed Nov 2 16:31:36 UTC 2011 - dvaleev@suse.com Drop powerpc-utils.insserv-ibmvscsis.patch as script no longer shipped with tarball -- Adds support to the bootlist script to be able to supply a - multipath device as a parameter. The script will now - properly handle setting up the bootlist for all paths to +- Adds support to the bootlist script to be able to supply a + multipath device as a parameter. The script will now + properly handle setting up the bootlist for all paths to a multipath device. -- Fixes ofpathname OF to logical conversion for LUN zero +- Fixes ofpathname OF to logical conversion for LUN zero for VFC devices. -- Add --unzip and --ascii options to nvram command, for - examination of oops/panic reports captured in lnx,oops-log +- Add --unzip and --ascii options to nvram command, for + examination of oops/panic reports captured in lnx,oops-log or ibm,rtas-log. - On newer kernels the dscr value is a per-process value and a new @@ -1280,7 +1299,7 @@ Thu Aug 4 13:31:54 UTC 2011 - dvaleev@novell.com - Adds support to ofpathname for HFI network devices. Since the current driver does not attach to any bus and there is no way to correlate between the devi - ce tree and the hf device in sysfs, we have to make some assumptions in how + ce tree and the hf device in sysfs, we have to make some assumptions in how the two are related. - Adds support for some new ipr SAS adapters which have a new device path @@ -1293,16 +1312,16 @@ Thu Aug 4 13:31:54 UTC 2011 - dvaleev@novell.com active because LMBs that are not marked 'is_removable' could still be removed if the balloon driver owns that memory. Therefore the check comparing the user-specified quanity of LMBs to add/remove is invalid. - + If AMS ballooning is active, skip the check for how many LMBs are removable and try the operation. - + - The snap man page indicates that the file /var/log/platform is collected. This is not always true and can cause some confusion since the file does not exist on newer systems. To avoid confusing users who might think the file should be collected, remove it from the man page listing of files. - + The /var/log/platform file is where the rtas_errd daemon used to write its data before the advent of servicelog. On older systems that may still be running an older rtas_errd daemon (diagela package) this @@ -1314,15 +1333,15 @@ Thu Aug 4 13:31:54 UTC 2011 - dvaleev@novell.com code. Without this patch the comparison only considers the characters up to the length of the input location which can cause a false match. For example, the following to would match. - + Input location: U5877.001.00H4031-P1 False match: U5877.001.00H4031-P10 ^ Comparison stops here - + The length of the input is 23 characters and the first 23 characters are compared, this leaves off the last '0' on the string to compare and erroneously returns the wrong bus. - + In the case of a PHB remove operation, this can cause the incorrect slot (and associated devices) to be powered off. @@ -1335,7 +1354,7 @@ Changes in 1.2.6 version: - Introduce the lsdevinfo utility. This command is used to provide the HMC or IVM with name information for virtual devices so they can be - matched against the VIOS names. + matched against the VIOS names. - The OpenFirmware binding for Fibre Channel devices permits any leading zeros in the LUN field to be stripped, but does not require it. Fix @@ -1375,7 +1394,7 @@ Changes in 1.2.6 version: be treated as such. this fixes a bug where the sysfs_dev_path is treated as a char * and returning invalid info when the buffer is actually empty. - + - Cpu add failures need to return 1 instead of -1. A return code of -1 causes the IVM to think there has been a really bad error and the IVM will wait 15 minutes prior to re-trying the operation. @@ -1388,7 +1407,7 @@ Changes in 1.2.6 version: - The logic in get_node_by_name() currently does not return when it finds a child with the name being search for. This would mean that a command - such as `drmgr -Q -c port -s "Port 1" -w 0 -d 3` would always return: + such as `drmgr -Q -c port -s "Port 1" -w 0 -d 3` would always return: drmgr: Port 1 not owned by partition - DR commands shouldn't take long to complete, but having both an entry and @@ -1398,12 +1417,12 @@ Changes in 1.2.6 version: ------------------------------------------------------------------- Mon Jan 3 12:05:22 UTC 2011 - dvaleev@novell.com -- move %post to %install +- move %post to %install ------------------------------------------------------------------- Wed Dec 29 18:18:59 UTC 2010 - dvaleev@novell.com -- as-needed fix +- as-needed fix ------------------------------------------------------------------- Thu Dec 23 17:12:21 UTC 2010 - dvaleev@novell.com @@ -1412,7 +1431,7 @@ Thu Dec 23 17:12:21 UTC 2010 - dvaleev@novell.com - drop unneeded patches -- papr sources merged to main tree upstream +- papr sources merged to main tree upstream ------------------------------------------------------------------- Tue Dec 16 09:19:22 CET 2008 - olh@suse.de @@ -1452,8 +1471,8 @@ Mon Oct 6 08:59:00 CEST 2008 - sassmann@suse.de - update powerpc-utils-papr to 1.1.3 (bnc#430790) * Corrected string length calculation in of_to_full_path() - * Removed call to release_lmb() during recovery of memory add. - In certain cases this can leead to an oops becasue we try to + * Removed call to release_lmb() during recovery of memory add. + In certain cases this can leead to an oops becasue we try to remove non-existant lmbs. - remove patch powerpc-utils-papr.lsslot.patch (upstream) @@ -1482,7 +1501,7 @@ Thu Aug 28 11:37:03 CEST 2008 - olh@suse.de ------------------------------------------------------------------- Thu Aug 7 01:14:05 CEST 2008 - ro@suse.de -- add exclusivearch to specfile +- add exclusivearch to specfile ------------------------------------------------------------------- Thu Jun 26 10:14:17 CEST 2008 - olh@suse.de @@ -1496,7 +1515,7 @@ Thu Jun 26 10:14:17 CEST 2008 - olh@suse.de Fri May 9 17:04:45 CEST 2008 - olh@suse.de - sysfs layout changed once again - look for directories when searching for kernel device names to + look for directories when searching for kernel device names to avoid multiple matches ------------------------------------------------------------------- @@ -1544,7 +1563,7 @@ Fri Jan 4 14:36:33 CET 2008 - sassmann@suse.de - add sixaxis joypad support to petitboot - enable joystick support in kernel config - split petitboot patches into small components -- patch libtwin to latest b9b2acf28d1ebad52de372a181dadf73455ad4de +- patch libtwin to latest b9b2acf28d1ebad52de372a181dadf73455ad4de snapshot from git://anongit.freedesktop.org/git/twin ------------------------------------------------------------------- @@ -1594,7 +1613,7 @@ Thu Aug 23 14:41:53 CEST 2007 - sassmann@suse.de ------------------------------------------------------------------- Wed Aug 22 16:07:38 CEST 2007 - sassmann@suse.de -- changed ps3fb size from 18 to 9MB to save RAM in ps3config +- changed ps3fb size from 18 to 9MB to save RAM in ps3config ------------------------------------------------------------------- Mon Aug 20 10:37:56 CEST 2007 - sassmann@suse.de @@ -1697,7 +1716,7 @@ Fri May 11 11:11:47 CEST 2007 - sassmann@suse.de ------------------------------------------------------------------- Mon May 7 16:35:35 CEST 2007 - sassmann@suse.de -- generate otheros.bld from kernel source 2.6.16 +- generate otheros.bld from kernel source 2.6.16 added libtwin added petitboot added ps3pf-utils diff --git a/powerpc-utils.spec b/powerpc-utils.spec index ce324d4..d431703 100644 --- a/powerpc-utils.spec +++ b/powerpc-utils.spec @@ -17,7 +17,7 @@ Name: powerpc-utils -Version: 1.3.12 +Version: 1.3.13 Release: 0 Summary: Utilities for PowerPC Hardware License: GPL-2.0-or-later @@ -29,18 +29,6 @@ Patch1: powerpc-utils-lsprop.patch Patch2: ofpathname_powernv.patch Patch3: fix_kexec_service_name_for_suse.patch Patch4: libvirt-service-dep.patch -Patch5: 0001-drmgr-Return-from-get_node_by_name-if-matched-DRC-in.patch -Patch6: 0006-drmgr-Free-nodes-returned-from-configure_connector.patch -Patch7: 0005-ofpathname-skip-devices-with-no-devspec-when-coorela.patch -Patch8: ppc64_cpu-Support-partial-SMT-level-through-SYS-FS-s.patch -Patch9: ppc64_cpu-Clean-up-sysfs-smt-control-error-handling.patch -Patch10: 0002-lparstat-Fix-Idle-and-busy-PURR-SPURR.patch -Patch11: 0003-lparstat-app-Use-pic-value-at-boot-for-accurate-boot.patch -Patch12: 0004-lparstat-Use-CLOCK_BOOTTIME-for-get_time-interface-a.patch -Patch13: 0001-drmgr-pci-Enable-in-kernel-functionality-to-update-d.patch -Patch14: 0002-drmgr-SLOT-Add-kernel-interface-support-for-device-t.patch -Patch15: 0003-drmgr-pci-Add-kernel-interface-support-for-device-tr.patch -Patch16: 0004-drmgr-phb-Add-kernel-interface-support-for-device-tr.patch BuildRequires: autoconf BuildRequires: automake BuildRequires: libnuma-devel diff --git a/ppc64_cpu-Clean-up-sysfs-smt-control-error-handling.patch b/ppc64_cpu-Clean-up-sysfs-smt-control-error-handling.patch deleted file mode 100644 index 4bac15d..0000000 --- a/ppc64_cpu-Clean-up-sysfs-smt-control-error-handling.patch +++ /dev/null @@ -1,65 +0,0 @@ -From 8d613e0e81561ce0b1d6ea834b07c73f5f9251a1 Mon Sep 17 00:00:00 2001 -From: Michal Suchanek -Date: Fri, 9 Feb 2024 13:12:33 +0100 -Subject: [PATCH] ppc64_cpu: Clean up sysfs smt/control error handling - -When the kernel does not support the sysfs intercface do not report an -arror, fall back to the old method silently. - -Suggested-by: Nathan Lynch -Signed-off-by: Michal Suchanek ---- -v3: retry is needed on ENODEV to support powernv ---- - src/ppc64_cpu.c | 24 +++++++++++++++++++----- - 1 file changed, 19 insertions(+), 5 deletions(-) - -diff --git a/src/ppc64_cpu.c b/src/ppc64_cpu.c -index c318928..688152b 100644 ---- a/src/ppc64_cpu.c -+++ b/src/ppc64_cpu.c -@@ -364,14 +364,28 @@ static int is_dscr_capable(void) - - /* - * Depends on kernel's CONFIG_HOTPLUG_CPU -+ * Return -1 for fatal error, -2 to retry. - */ - static int set_smt_control(int smt_state) - { - if (set_attribute(SYS_SMT_CONTROL, "%d", smt_state)) { -- /* Silently ignore kernel not supporting this feature */ -- if (errno != ENODEV) -- perror(SYS_SMT_CONTROL); -- return -1; -+ switch (errno) { -+ case ENOENT: -+ /* -+ * The kernel does not have the interface. -+ * Try the old method. -+ */ -+ return -2; -+ case ENODEV: -+ /* -+ * Setting SMT state not supported by this interface. -+ * eg. powernv -+ */ -+ return -2; -+ default: -+ perror(SYS_SMT_CONTROL); -+ return -1; -+ } - } - return 0; - } -@@ -405,7 +419,7 @@ static int do_smt(char *state, bool numeric) - } - - /* Try using smt/control if failing, fall back to the legacy way */ -- if (set_smt_control(smt_state)) -+ if ((rc = set_smt_control(smt_state)) == -2) - rc = set_smt_state(smt_state); - } - --- -2.44.0 - diff --git a/ppc64_cpu-Support-partial-SMT-level-through-SYS-FS-s.patch b/ppc64_cpu-Support-partial-SMT-level-through-SYS-FS-s.patch deleted file mode 100644 index 17306e1..0000000 --- a/ppc64_cpu-Support-partial-SMT-level-through-SYS-FS-s.patch +++ /dev/null @@ -1,71 +0,0 @@ -From 46c524be975a108d2b8d1cadb95003b9c2670c8e Mon Sep 17 00:00:00 2001 -From: Laurent Dufour -Date: Thu, 29 Jun 2023 16:41:37 +0200 -Subject: [PATCH] ppc64_cpu: Support partial SMT level through SYS FS - smt/control files - -The next kernel release will support partial SMT level [1] though the SYS -FS file "devices/system/cpu/smt/control". This allows the SMT level to be -recorded in the kernel. With the current SMT level stored in the kernel, -when a new CPU is added, only the necessary threads are brought online. - -The legacy way to active threads through the SYS FS files -'devices/system/cpu/cpu/online', is still used in the case the new SYS -FS API is not available. This allows compatibility with the previous kernel -versions. - -[1] https://lore.kernel.org/linuxppc-dev/20230705145143.40545-1-ldufour@linux.ibm.com/ - -Signed-off-by: Laurent Dufour ---- - src/ppc64_cpu.c | 20 +++++++++++++++++++- - 1 file changed, 19 insertions(+), 1 deletion(-) - -diff --git a/src/ppc64_cpu.c b/src/ppc64_cpu.c -index 5fdf86a..c33a293 100644 ---- a/src/ppc64_cpu.c -+++ b/src/ppc64_cpu.c -@@ -56,6 +56,8 @@ - #define DIAGNOSTICS_RUN_MODE 42 - #define CPU_OFFLINE -1 - -+#define SYS_SMT_CONTROL "/sys/devices/system/cpu/smt/control" -+ - #ifdef HAVE_LINUX_PERF_EVENT_H - struct cpu_freq { - int offline; -@@ -360,6 +362,20 @@ static int is_dscr_capable(void) - return 0; - } - -+/* -+ * Depends on kernel's CONFIG_HOTPLUG_CPU -+ */ -+static int set_smt_control(int smt_state) -+{ -+ if (set_attribute(SYS_SMT_CONTROL, "%d", smt_state)) { -+ /* Silently ignore kernel not supporting this feature */ -+ if (errno != ENODEV) -+ perror(SYS_SMT_CONTROL); -+ return -1; -+ } -+ return 0; -+} -+ - static int do_smt(char *state, bool numeric) - { - int rc = 0; -@@ -388,7 +404,9 @@ static int do_smt(char *state, bool numeric) - return -1; - } - -- rc = set_smt_state(smt_state); -+ /* Try using smt/control if failing, fall back to the legacy way */ -+ if (set_smt_control(smt_state)) -+ rc = set_smt_state(smt_state); - } - - return rc; --- -2.41.0 -