diff options
| author | LorDClockaN <davor@losinj.com> | 2019-03-27 18:32:24 +0100 |
|---|---|---|
| committer | LorDClockaN <davor@losinj.com> | 2019-03-27 18:32:24 +0100 |
| commit | a8e12a51a8c22de9f1281b06f3cd85de5d0ab564 (patch) | |
| tree | 45230cd53d8092c346bd00810e3046fcea43666a /arch/arm/kernel/irq.c | |
| parent | 92857b007d911bfff7e65465694d28bf8fe96fc7 (diff) | |
| parent | b96e2451dc7dc8df5b5b330af0e96a8ae0e5a421 (diff) | |
Merge branch 'p9x' of https://github.com/DirtyUnicorns/android_kernel_google_bluecross.git into HEADHEADp9.0
Diffstat (limited to 'arch/arm/kernel/irq.c')
| -rw-r--r-- | arch/arm/kernel/irq.c | 75 |
1 files changed, 0 insertions, 75 deletions
diff --git a/arch/arm/kernel/irq.c b/arch/arm/kernel/irq.c index 42d3974671d9..f4c5a29bebca 100644 --- a/arch/arm/kernel/irq.c +++ b/arch/arm/kernel/irq.c @@ -31,7 +31,6 @@ #include <linux/smp.h> #include <linux/init.h> #include <linux/seq_file.h> -#include <linux/ratelimit.h> #include <linux/errno.h> #include <linux/list.h> #include <linux/kallsyms.h> @@ -120,77 +119,3 @@ int __init arch_probe_nr_irqs(void) return nr_irqs; } #endif - -#ifdef CONFIG_HOTPLUG_CPU -static bool migrate_one_irq(struct irq_desc *desc) -{ - struct irq_data *d = irq_desc_get_irq_data(desc); - const struct cpumask *affinity = irq_data_get_affinity_mask(d); - struct irq_chip *c; - bool ret = false; - struct cpumask available_cpus; - - /* - * If this is a per-CPU interrupt, or the affinity does not - * include this CPU, then we have nothing to do. - */ - if (irqd_is_per_cpu(d) || !cpumask_test_cpu(smp_processor_id(), affinity)) - return false; - - cpumask_copy(&available_cpus, affinity); - cpumask_andnot(&available_cpus, &available_cpus, cpu_isolated_mask); - affinity = &available_cpus; - - if (cpumask_any_and(affinity, cpu_online_mask) >= nr_cpu_ids) { - cpumask_andnot(&available_cpus, cpu_online_mask, - cpu_isolated_mask); - if (cpumask_empty(affinity)) - affinity = cpu_online_mask; - ret = true; - } - - c = irq_data_get_irq_chip(d); - if (!c->irq_set_affinity) { - pr_debug("IRQ%u: unable to set affinity\n", d->irq); - } else { - int r = irq_set_affinity_locked(d, affinity, false); - - if (r) - pr_warn_ratelimited("IRQ%u: set affinity failed(%d).\n", - d->irq, r); - } - - return ret; -} - -/* - * The current CPU has been marked offline. Migrate IRQs off this CPU. - * If the affinity settings do not allow other CPUs, force them onto any - * available CPU. - * - * Note: we must iterate over all IRQs, whether they have an attached - * action structure or not, as we need to get chained interrupts too. - */ -void migrate_irqs(void) -{ - unsigned int i; - struct irq_desc *desc; - unsigned long flags; - - local_irq_save(flags); - - for_each_irq_desc(i, desc) { - bool affinity_broken; - - raw_spin_lock(&desc->lock); - affinity_broken = migrate_one_irq(desc); - raw_spin_unlock(&desc->lock); - - if (affinity_broken) - pr_warn_ratelimited("IRQ%u no longer affine to CPU%u\n", - i, smp_processor_id()); - } - - local_irq_restore(flags); -} -#endif /* CONFIG_HOTPLUG_CPU */ |
