// SPDX-License-Identifier: GPL-2.0 /* * Generic cpu hotunplug interrupt migration code copied from the * arch/arm implementation * * Copyright (C) Russell King * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License version 2 as * published by the Free Software Foundation. */ #include <linux/interrupt.h> #include <linux/ratelimit.h> #include <linux/irq.h> #include <linux/sched/isolation.h> #include "internals.h" /* For !GENERIC_IRQ_EFFECTIVE_AFF_MASK this looks at general affinity mask */ static inline bool irq_needs_fixup(struct irq_data *d) { … } static bool migrate_one_irq(struct irq_desc *desc) { … } /** * irq_migrate_all_off_this_cpu - Migrate irqs away from offline cpu * * 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 irq_migrate_all_off_this_cpu(void) { … } static bool hk_should_isolate(struct irq_data *data, unsigned int cpu) { … } static void irq_restore_affinity_of_irq(struct irq_desc *desc, unsigned int cpu) { … } /** * irq_affinity_online_cpu - Restore affinity for managed interrupts * @cpu: Upcoming CPU for which interrupts should be restored */ int irq_affinity_online_cpu(unsigned int cpu) { … }