From 0d6ed42e5d195f6a00d2f000ce8da11e89cb3010 Mon Sep 17 00:00:00 2001 From: caihongda Date: Fri, 1 Nov 2019 10:06:03 +0800 Subject: [PATCH] irqbalance: bufix in banned irq delete reason: The banned irq will not be added int interrupts_db, so we need to additionaly delete it if it is no_existing. To test this in llt, we add a stub for function is_banned_irq. Signed-off-by: caihongda diff --git a/classify.c b/classify.c index 9f72ae8..585f2dc 100644 --- a/classify.c +++ b/classify.c @@ -331,6 +331,13 @@ static int is_banned_irq(int irq) return entry ? 1:0; } +#ifdef TEST +int stub_is_banned_irq(int irq) +{ + return is_banned_irq(irq); +} +#endif + gint substr_find(gconstpointer a, gconstpointer b) { if (strstr(b, a)) @@ -853,6 +860,9 @@ static void remove_no_existing_irq(struct irq_info *info, void *data __attribute void clear_no_existing_irqs(void) { for_each_irq(NULL, remove_no_existing_irq, NULL); + if (banned_irqs){ + for_each_irq(banned_irqs, remove_no_existing_irq, NULL); + } } void free_irq_db(void) -- 2.19.1