44 lines
1.5 KiB
Diff
44 lines
1.5 KiB
Diff
|
|
From 6ae114f8719a6a49cef73a32d820a77e900ddf08 Mon Sep 17 00:00:00 2001
|
||
|
|
From: hejingxian 00273181 <hejingxian@huawei.com>
|
||
|
|
Date: Thu, 17 Dec 2020 17:47:45 +0800
|
||
|
|
Subject: [PATCH] Add log for hotplug appropriately
|
||
|
|
|
||
|
|
Conflict:NA
|
||
|
|
Reference:https://github.com/Irqbalance/irqbalance/commit/6ae114f8719a6a49cef73a32d820a77e900ddf08
|
||
|
|
---
|
||
|
|
classify.c | 7 +++++--
|
||
|
|
1 file changed, 5 insertions(+), 2 deletions(-)
|
||
|
|
|
||
|
|
diff --git a/classify.c b/classify.c
|
||
|
|
index 0d556e9..4b6ffa8 100644
|
||
|
|
--- a/classify.c
|
||
|
|
+++ b/classify.c
|
||
|
|
@@ -644,12 +644,13 @@ static void build_one_dev_entry(const char *dirname, GList *tmp_irqs, int build_
|
||
|
|
irqnum = strtol(entry->d_name, NULL, 10);
|
||
|
|
/* If build_irq is valid, only add irq when it's number equals to build_irq */
|
||
|
|
if (irqnum && ((build_irq < 0) || (irqnum == build_irq))) {
|
||
|
|
- printf("add irq:%d %d for %s\n", irqnum, build_irq, path);
|
||
|
|
hint.irq = irqnum;
|
||
|
|
hint.type = IRQ_TYPE_MSIX;
|
||
|
|
add_new_irq(devpath, &hint, tmp_irqs);
|
||
|
|
- if (build_irq >= 0)
|
||
|
|
+ if (build_irq >= 0) {
|
||
|
|
+ log(TO_CONSOLE, LOG_INFO, "Hotplug dev irq: %d finished.\n", irqnum);
|
||
|
|
break;
|
||
|
|
+ }
|
||
|
|
}
|
||
|
|
} while (entry != NULL);
|
||
|
|
closedir(msidir);
|
||
|
|
@@ -674,6 +675,8 @@ static void build_one_dev_entry(const char *dirname, GList *tmp_irqs, int build_
|
||
|
|
hint.irq = irqnum;
|
||
|
|
hint.type = IRQ_TYPE_LEGACY;
|
||
|
|
add_new_irq(devpath, &hint, tmp_irqs);
|
||
|
|
+ if (build_irq >= 0)
|
||
|
|
+ log(TO_CONSOLE, LOG_INFO, "Hotplug dev irq: %d finished.\n", irqnum);
|
||
|
|
}
|
||
|
|
}
|
||
|
|
|
||
|
|
--
|
||
|
|
2.23.0
|
||
|
|
|