On Mon, Jul 10, 2023 at 9:42 AM HAGIO KAZUHITO(萩尾 一仁) <k-hagio-ab(a)nec.com>
wrote:
From: Kazuhito Hagio <k-hagio-ab(a)nec.com>
Kernel commit f0dd891dd5a1d ("lib/cpumask: move some one-line wrappers
to header file"), which is contained in Linux 6.0 and later kernels,
inlined alloc_cpumask_var() function. As a result, the "irq -a" option
fails to determine whether cpumask_var_t is a pointer, and displays
wrong CPU affinity for IRQs:
Looks good to me. So: Ack
Thanks
Lianbo
crash> irq -a
IRQ NAME AFFINITY
1 i8042 3
4 ttyS0
8 rtc0
9 acpi 3
12 i8042 3
...
Use alloc_cpumask_var_node() function symbol instead to fix it.
Signed-off-by: Kazuhito Hagio <k-hagio-ab(a)nec.com>
---
kernel.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/kernel.c b/kernel.c
index 0d72eaeeb79b..546eed95eebd 100644
--- a/kernel.c
+++ b/kernel.c
@@ -7343,7 +7343,8 @@ generic_get_irq_affinity(int irq)
tmp_addr = irq_desc_addr + \
OFFSET(irq_desc_t_affinity);
- if (symbol_exists("alloc_cpumask_var")) /* pointer member */
+ if (symbol_exists("alloc_cpumask_var_node") ||
+ symbol_exists("alloc_cpumask_var")) /* pointer member */
readmem(tmp_addr,KVADDR, &affinity_ptr, sizeof(ulong),
"irq_desc affinity", FAULT_ON_ERROR);
else /* array member */
--
2.31.1