irqbalance: procinterrupts: Fix IRQ name parsing on certain arm64 SoC
procinterrupts: Fix IRQ name parsing on certain arm64 SoC Signed-off-by: qinyu <qinyu32@huawei.com>
This commit is contained in:
parent
654999b7f1
commit
84b2c01879
@ -0,0 +1,76 @@
|
||||
From bbcd9a42c3cec0935b960b7f2046f1fdfab4f7ef Mon Sep 17 00:00:00 2001
|
||||
From: Vignesh Raghavendra <vigneshr@ti.com>
|
||||
Date: Wed, 7 Dec 2022 19:46:19 +0530
|
||||
Subject: [PATCH] procinterrupts: Fix IRQ name parsing on certain arm64 SoC
|
||||
|
||||
Reference: https://github.com/Irqbalance/irqbalance/commit/bbcd9a42c3cec0935b960b7f2046f1fdfab4f7ef
|
||||
Conflict: NA
|
||||
|
||||
On arm64 SoCs like TI's K3 SoC and few other SoCs, IRQ names don't get
|
||||
parsed correct due to which they end up being classified into wrong
|
||||
class. Fix this by considering last token to contain IRQ name always.
|
||||
|
||||
Eg.: /proc/interrupt
|
||||
|
||||
cat /proc/interrupts
|
||||
CPU0 CPU1 CPU2 CPU3
|
||||
11: 7155 8882 7235 7791 GICv3 30 Level arch_timer
|
||||
14: 0 0 0 0 GICv3 23 Level arm-pmu
|
||||
15: 0 0 0 0 GICv3 208 Level 4b00000.spi
|
||||
16: 0 0 0 0 GICv3 209 Level 4b10000.spi
|
||||
116: 0 0 0 0 MSI-INTA 1716234 Level 485c0100.dma-controller chan6
|
||||
134: 166 0 0 0 MSI-INTA 1970707 Level 8000000.ethernet-tx0
|
||||
224: 149 0 0 0 MSI-INTA 1971731 Level 8000000.ethernet
|
||||
|
||||
W/o patch irqbalance -d
|
||||
IRQ (11) guessed as class 0
|
||||
IRQ (14) guessed as class 0
|
||||
IRQ (15) guessed as class 0
|
||||
IRQ (16) guessed as class 0
|
||||
IRQ 485c0100.dma-controller chan6(116) guessed as class 0
|
||||
IRQ (134) guessed as class 0
|
||||
IRQ (224) guessed as class 0
|
||||
|
||||
W/ this patch
|
||||
IRQ arch_timer(11) guessed as class 0
|
||||
IRQ arm-pmu(14) guessed as class 0
|
||||
IRQ 4b00000.spi(15) guessed as class 0
|
||||
IRQ 4b10000.spi(16) guessed as class 0
|
||||
IRQ 485c0100.dma-controller chan6(116) guessed as class 0
|
||||
IRQ 8000000.ethernet-tx0(134) guessed as class 5
|
||||
IRQ 8000000.ethernet(224) guessed as class 5
|
||||
IRQ 8000000.ethernet(257) guessed as class 5
|
||||
IRQ -davinci_gpio wl18xx(362) guessed as class
|
||||
|
||||
Signed-off-by: Vignesh Raghavendra <vigneshr@ti.com>
|
||||
---
|
||||
procinterrupts.c | 12 +++++++-----
|
||||
1 file changed, 7 insertions(+), 5 deletions(-)
|
||||
|
||||
diff --git a/procinterrupts.c b/procinterrupts.c
|
||||
index e91b203..ec7a52b 100644
|
||||
--- a/procinterrupts.c
|
||||
+++ b/procinterrupts.c
|
||||
@@ -178,12 +178,14 @@ void init_irq_class_and_type(char *savedline, struct irq_info *info, int irq)
|
||||
}
|
||||
|
||||
#ifdef AARCH64
|
||||
- if (savedptr && 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)
|
||||
- *tmp = 0;
|
||||
- }
|
||||
+ else
|
||||
+ snprintf(irq_fullname, PATH_MAX, "%s", last_token);
|
||||
+
|
||||
+ tmp = strchr(irq_fullname, '\n');
|
||||
+ if (tmp)
|
||||
+ *tmp = 0;
|
||||
#else
|
||||
snprintf(irq_fullname, PATH_MAX, "%s", last_token);
|
||||
#endif
|
||||
--
|
||||
2.33.0
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
Summary: A dynamic adaptive IRQ balancing daemon
|
||||
Name: irqbalance
|
||||
Version: 1.7.0
|
||||
Release: 19
|
||||
Release: 20
|
||||
Epoch: 3
|
||||
License: GPLv2
|
||||
Source0: https://github.com/Irqbalance/irqbalance/archive/irqbalance-%{version}.tar.gz
|
||||
@ -38,6 +38,7 @@ Patch6013: backport-Fix-parse_proc_interrupts-fix-parsing-interrupt-counts.patch
|
||||
Patch6014: backport-Fix-add-keep_going-check-to-prevent-irqbalance-from-failing-to-exit-after-SIGTERM.patch
|
||||
Patch6015: backport-fix-opendir-fails-in-check_platform_device.patch
|
||||
Patch6016: backport-check-whether-savedptr-is-NULL-before-invoking-strle.patch
|
||||
Patch6017: backport-procinterrupts-Fix-IRQ-name-parsing-on-certain-arm64.patch
|
||||
|
||||
%description
|
||||
Irqbalance is a daemon to help balance the cpu load generated by
|
||||
@ -95,6 +96,12 @@ fi
|
||||
/sbin/chkconfig --del %{name} >/dev/null 2>&1 || :
|
||||
|
||||
%changelog
|
||||
* Thu Jan 5 2023 qinyu <qinyu32@huawei.com> - 3:1.7.0-20
|
||||
- Type:bugfix
|
||||
- ID:NA
|
||||
- SUG:restart
|
||||
- DESC: procinterrupts: Fix IRQ name parsing on certain arm64 SoC
|
||||
|
||||
* Thu Jan 5 2023 qinyu <qinyu32@huawei.com> - 3:1.7.0-19
|
||||
- Type:bugfix
|
||||
- ID:NA
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user