From c375fa9880bbd8b0f937d92f0403766d082661d1 Mon Sep 17 00:00:00 2001 From: Packit Service Date: Dec 09 2020 17:29:44 +0000 Subject: Apply patch irqbalance-1.4.0-procinterrupts-check-xen-dyn-event-more-flexible.patch patch_name: irqbalance-1.4.0-procinterrupts-check-xen-dyn-event-more-flexible.patch present_in_specfile: true --- diff --git a/procinterrupts.c b/procinterrupts.c index eb84a1c..ca9533b 100644 --- a/procinterrupts.c +++ b/procinterrupts.c @@ -167,6 +167,7 @@ GList* collect_full_irq_list() while (!feof(file)) { int number; + int is_xen_dyn = 0; struct irq_info *info; char *c; char savedline[1024]; @@ -187,9 +188,13 @@ GList* collect_full_irq_list() strncpy(savedline, line, sizeof(savedline)); irq_name = strtok_r(savedline, " ", &savedptr); + if (strstr(irq_name, "xen-dyn") != NULL) + is_xen_dyn = 1; last_token = strtok_r(NULL, " ", &savedptr); while ((p = strtok_r(NULL, " ", &savedptr))) { irq_name = last_token; + if (strstr(irq_name, "xen-dyn") != NULL) + is_xen_dyn = 1; last_token = p; } @@ -209,7 +214,7 @@ GList* collect_full_irq_list() info = calloc(sizeof(struct irq_info), 1); if (info) { info->irq = number; - if (strstr(irq_name, "xen-dyn-event") != NULL) { + if (strstr(irq_name, "-event") != NULL && is_xen_dyn == 1) { info->type = IRQ_TYPE_VIRT_EVENT; info->class = IRQ_VIRT_EVENT; } else {