|
@@ -726,8 +726,21 @@ void lapic_offline(void)
|
|
static int apic_set_affinity(struct irq_data *irqd,
|
|
static int apic_set_affinity(struct irq_data *irqd,
|
|
const struct cpumask *dest, bool force)
|
|
const struct cpumask *dest, bool force)
|
|
{
|
|
{
|
|
|
|
+ struct apic_chip_data *apicd = apic_chip_data(irqd);
|
|
int err;
|
|
int err;
|
|
|
|
|
|
|
|
+ /*
|
|
|
|
+ * Core code can call here for inactive interrupts. For inactive
|
|
|
|
+ * interrupts which use managed or reservation mode there is no
|
|
|
|
+ * point in going through the vector assignment right now as the
|
|
|
|
+ * activation will assign a vector which fits the destination
|
|
|
|
+ * cpumask. Let the core code store the destination mask and be
|
|
|
|
+ * done with it.
|
|
|
|
+ */
|
|
|
|
+ if (!irqd_is_activated(irqd) &&
|
|
|
|
+ (apicd->is_managed || apicd->can_reserve))
|
|
|
|
+ return IRQ_SET_MASK_OK;
|
|
|
|
+
|
|
raw_spin_lock(&vector_lock);
|
|
raw_spin_lock(&vector_lock);
|
|
cpumask_and(vector_searchmask, dest, cpu_online_mask);
|
|
cpumask_and(vector_searchmask, dest, cpu_online_mask);
|
|
if (irqd_affinity_is_managed(irqd))
|
|
if (irqd_affinity_is_managed(irqd))
|