aboutsummaryrefslogtreecommitdiff
path: root/utils/irqbalance
diff options
context:
space:
mode:
authorHannu Nyman <hannu.nyman@iki.fi>2022-10-18 17:57:16 +0300
committerHannu Nyman <hannu.nyman@iki.fi>2022-10-18 17:57:16 +0300
commitc1582e1ad085297790eaa7fba9b6da520205c35d (patch)
tree72afa0478d48589acab3a4a716aadb11556bbb39 /utils/irqbalance
parentb1651c5d5444b990b58180a26d6e76779cbb88a9 (diff)
irqbalance: update to 1.9.1
Update irqbalance version to 1.9.1 Signed-off-by: Hannu Nyman <hannu.nyman@iki.fi>
Diffstat (limited to 'utils/irqbalance')
-rw-r--r--utils/irqbalance/Makefile4
-rw-r--r--utils/irqbalance/patches/0001-post-190-fix-get-irq-module.patch66
-rw-r--r--utils/irqbalance/patches/0002-post-190-fix-check-saveptr-NULL.patch23
-rw-r--r--utils/irqbalance/patches/100-remove-libncursesw-dependency.patch2
4 files changed, 3 insertions, 92 deletions
diff --git a/utils/irqbalance/Makefile b/utils/irqbalance/Makefile
index 09a744a6e..c1fe01150 100644
--- a/utils/irqbalance/Makefile
+++ b/utils/irqbalance/Makefile
@@ -5,13 +5,13 @@
include $(TOPDIR)/rules.mk
PKG_NAME:=irqbalance
-PKG_VERSION:=1.9.0
+PKG_VERSION:=1.9.1
PKG_RELEASE:=$(AUTORELEASE)
PKG_SOURCE_PROTO:=git
PKG_SOURCE_URL:=https://github.com/Irqbalance/irqbalance.git
PKG_SOURCE_VERSION:=v$(PKG_VERSION)
-PKG_MIRROR_HASH:=9af2e51d2696bc51400223dee2009071bee5f12b3a5050f18c7de23632e2190d
+PKG_MIRROR_HASH:=89aaf4ebd717f991396f22cd214bad83d62c8e615fcb3cc7b4d513c1c05ea0e6
PKG_MAINTAINER:=Hannu Nyman <hannu.nyman@iki.fi>
PKG_LICENSE:=GPL-2.0-or-later
diff --git a/utils/irqbalance/patches/0001-post-190-fix-get-irq-module.patch b/utils/irqbalance/patches/0001-post-190-fix-get-irq-module.patch
deleted file mode 100644
index 5c6cb4ec6..000000000
--- a/utils/irqbalance/patches/0001-post-190-fix-get-irq-module.patch
+++ /dev/null
@@ -1,66 +0,0 @@
-From ff48ac9c84f0b318dfce665605d72e86dfcfe008 Mon Sep 17 00:00:00 2001
-From: Chao Liu <liuchao173@huawei.com>
-Date: Tue, 7 Jun 2022 15:15:15 +0800
-Subject: [PATCH] get irq->module relationship from /sys/bus/pci/*/driver
-
-Signed-off-by: Chao Liu <liuchao173@huawei.com>
----
- classify.c | 19 +++++++++++++++++--
- 1 file changed, 17 insertions(+), 2 deletions(-)
-
---- a/classify.c
-+++ b/classify.c
-@@ -7,6 +7,7 @@
- #include <dirent.h>
- #include <assert.h>
- #include <errno.h>
-+#include <libgen.h>
-
- #include "irqbalance.h"
- #include "types.h"
-@@ -578,7 +579,7 @@ static int check_for_module_ban(char *na
- return 0;
- }
-
--static int check_for_irq_ban(int irq, GList *proc_interrupts)
-+static int check_for_irq_ban(int irq, char *mod, GList *proc_interrupts)
- {
- struct irq_info find, *res;
- GList *entry;
-@@ -594,6 +595,9 @@ static int check_for_irq_ban(int irq, GL
- /*
- * Check to see if we banned module which the irq belongs to.
- */
-+ if (mod != NULL && strlen(mod) > 0 && check_for_module_ban(mod))
-+ return 1;
-+
- entry = g_list_find_custom(proc_interrupts, &find, compare_ints);
- if (entry) {
- res = entry->data;
-@@ -609,14 +613,25 @@ static void add_new_irq(char *path, stru
- struct irq_info *new;
- struct user_irq_policy pol;
- int irq = hint->irq;
-+ char buf[PATH_MAX], drvpath[PATH_MAX];
-+ char *mod = NULL;
-+ int ret;
-
- new = get_irq_info(irq);
- if (new)
- return;
-
-+ if (path) {
-+ sprintf(buf, "%s/driver", path);
-+ ret = readlink(buf, drvpath, PATH_MAX);
-+ if (ret > 0 && ret < PATH_MAX) {
-+ drvpath[ret] = '\0';
-+ mod = basename(drvpath);
-+ }
-+ }
- /* Set NULL devpath for the irq has no sysfs entries */
- get_irq_user_policy(path, irq, &pol);
-- if ((pol.ban == 1) || check_for_irq_ban(irq, proc_interrupts)) { /*FIXME*/
-+ if ((pol.ban == 1) || check_for_irq_ban(irq, mod, proc_interrupts)) { /*FIXME*/
- __add_banned_irq(irq, &banned_irqs);
- new = get_irq_info(irq);
- } else
diff --git a/utils/irqbalance/patches/0002-post-190-fix-check-saveptr-NULL.patch b/utils/irqbalance/patches/0002-post-190-fix-check-saveptr-NULL.patch
deleted file mode 100644
index 637c96bbd..000000000
--- a/utils/irqbalance/patches/0002-post-190-fix-check-saveptr-NULL.patch
+++ /dev/null
@@ -1,23 +0,0 @@
-From 522883505d3b02e3294f045f49007b61c00e2c31 Mon Sep 17 00:00:00 2001
-From: Chao Liu <liuchao173@huawei.com>
-Date: Wed, 8 Jun 2022 10:04:02 +0800
-Subject: [PATCH] check whether savedptr is NULL before invoking strlen
-
-savedptr can be null in musl libc, so the strlen(NULL) will segfault
-
-Signed-off-by: Chao Liu <liuchao173@huawei.com>
----
- procinterrupts.c | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
---- a/procinterrupts.c
-+++ b/procinterrupts.c
-@@ -178,7 +178,7 @@ void init_irq_class_and_type(char *saved
- }
-
- #ifdef AARCH64
-- if (strlen(savedptr) > 0) {
-+ if (savedptr && strlen(savedptr) > 0) {
- snprintf(irq_fullname, PATH_MAX, "%s %s", last_token, savedptr);
- tmp = strchr(irq_fullname, '\n');
- if (tmp)
diff --git a/utils/irqbalance/patches/100-remove-libncursesw-dependency.patch b/utils/irqbalance/patches/100-remove-libncursesw-dependency.patch
index 46fc4bd40..917a46dac 100644
--- a/utils/irqbalance/patches/100-remove-libncursesw-dependency.patch
+++ b/utils/irqbalance/patches/100-remove-libncursesw-dependency.patch
@@ -1,6 +1,6 @@
--- a/configure.ac
+++ b/configure.ac
-@@ -32,7 +32,7 @@ PKG_CHECK_MODULES([NCURSESW], [ncursesw]
+@@ -41,7 +41,7 @@ PKG_CHECK_MODULES([NCURSESW], [ncursesw]
AS_IF([test "x$has_ncursesw" = "xyes"], [
AC_SUBST([NCURSESW_CFLAGS])
AC_SUBST([NCURSESW_LIBS])