Merge branch 'linus' into irq/core, to fix conflict
authorIngo Molnar <mingo@kernel.org>
Sat, 8 Jan 2022 09:53:57 +0000 (10:53 +0100)
committerIngo Molnar <mingo@kernel.org>
Sat, 8 Jan 2022 09:53:57 +0000 (10:53 +0100)
Conflicts:
drivers/net/ethernet/mellanox/mlx5/core/pci_irq.c

Signed-off-by: Ingo Molnar <mingo@kernel.org>
17 files changed:
drivers/infiniband/hw/irdma/hw.c
drivers/mailbox/bcm-flexrm-mailbox.c
drivers/net/ethernet/cisco/enic/enic_main.c
drivers/net/ethernet/emulex/benet/be_main.c
drivers/net/ethernet/huawei/hinic/hinic_rx.c
drivers/net/ethernet/intel/i40e/i40e_main.c
drivers/net/ethernet/intel/iavf/iavf_main.c
drivers/net/ethernet/intel/ixgbe/ixgbe_main.c
drivers/net/ethernet/mellanox/mlx4/eq.c
drivers/net/ethernet/mellanox/mlx5/core/pci_irq.c
drivers/scsi/lpfc/lpfc_init.c
drivers/scsi/megaraid/megaraid_sas_base.c
drivers/scsi/mpt3sas/mpt3sas_base.c
include/linux/interrupt.h
include/linux/irqdomain.h
kernel/irq/generic-chip.c
kernel/irq/manage.c

index b4c657f5f2f95cb6d0c2c681e51d5d9579133717..4b1b16e7a75b076fba5da4a7c9c8499fb089a1a1 100644 (file)
@@ -550,7 +550,7 @@ static void irdma_destroy_irq(struct irdma_pci_f *rf,
        struct irdma_sc_dev *dev = &rf->sc_dev;
 
        dev->irq_ops->irdma_dis_irq(dev, msix_vec->idx);
-       irq_set_affinity_hint(msix_vec->irq, NULL);
+       irq_update_affinity_hint(msix_vec->irq, NULL);
        free_irq(msix_vec->irq, dev_id);
 }
 
@@ -1100,7 +1100,7 @@ irdma_cfg_ceq_vector(struct irdma_pci_f *rf, struct irdma_ceq *iwceq,
        }
        cpumask_clear(&msix_vec->mask);
        cpumask_set_cpu(msix_vec->cpu_affinity, &msix_vec->mask);
-       irq_set_affinity_hint(msix_vec->irq, &msix_vec->mask);
+       irq_update_affinity_hint(msix_vec->irq, &msix_vec->mask);
        if (status) {
                ibdev_dbg(&rf->iwdev->ibdev, "ERR: ceq irq config fail\n");
                return IRDMA_ERR_CFG;
index 78073ad1f2f1f54ecdcb32aa33723e4f521d2679..16982c13d323163192c4d8079349b00b9199c904 100644 (file)
@@ -1298,7 +1298,7 @@ static int flexrm_startup(struct mbox_chan *chan)
        val = (num_online_cpus() < val) ? val / num_online_cpus() : 1;
        cpumask_set_cpu((ring->num / val) % num_online_cpus(),
                        &ring->irq_aff_hint);
-       ret = irq_set_affinity_hint(ring->irq, &ring->irq_aff_hint);
+       ret = irq_update_affinity_hint(ring->irq, &ring->irq_aff_hint);
        if (ret) {
                dev_err(ring->mbox->dev,
                        "failed to set IRQ affinity hint for ring%d\n",
@@ -1425,7 +1425,7 @@ static void flexrm_shutdown(struct mbox_chan *chan)
 
        /* Release IRQ */
        if (ring->irq_requested) {
-               irq_set_affinity_hint(ring->irq, NULL);
+               irq_update_affinity_hint(ring->irq, NULL);
                free_irq(ring->irq, ring);
                ring->irq_requested = false;
        }
index aacf141986d55cdee2683619ef91d62135cbdff7..2faba079b4fbc9ef0cf5a65886ed590791dcac3c 100644 (file)
@@ -150,10 +150,10 @@ static void enic_set_affinity_hint(struct enic *enic)
                    !cpumask_available(enic->msix[i].affinity_mask) ||
                    cpumask_empty(enic->msix[i].affinity_mask))
                        continue;
-               err = irq_set_affinity_hint(enic->msix_entry[i].vector,
-                                           enic->msix[i].affinity_mask);
+               err = irq_update_affinity_hint(enic->msix_entry[i].vector,
+                                              enic->msix[i].affinity_mask);
                if (err)
-                       netdev_warn(enic->netdev, "irq_set_affinity_hint failed, err %d\n",
+                       netdev_warn(enic->netdev, "irq_update_affinity_hint failed, err %d\n",
                                    err);
        }
 
@@ -173,7 +173,7 @@ static void enic_unset_affinity_hint(struct enic *enic)
        int i;
 
        for (i = 0; i < enic->intr_count; i++)
-               irq_set_affinity_hint(enic->msix_entry[i].vector, NULL);
+               irq_update_affinity_hint(enic->msix_entry[i].vector, NULL);
 }
 
 static int enic_udp_tunnel_set_port(struct net_device *netdev,
index d51f24c9e1b804953c0874473de1d00d65aefd56..84b3ba9bdb18ada54039958da2368f9a318b871b 100644 (file)
@@ -3491,7 +3491,7 @@ static int be_msix_register(struct be_adapter *adapter)
                if (status)
                        goto err_msix;
 
-               irq_set_affinity_hint(vec, eqo->affinity_mask);
+               irq_update_affinity_hint(vec, eqo->affinity_mask);
        }
 
        return 0;
@@ -3552,7 +3552,7 @@ static void be_irq_unregister(struct be_adapter *adapter)
        /* MSIx */
        for_all_evt_queues(adapter, eqo, i) {
                vec = be_msix_vec_get(adapter, eqo);
-               irq_set_affinity_hint(vec, NULL);
+               irq_update_affinity_hint(vec, NULL);
                free_irq(vec, eqo);
        }
 
index fed3b6bc0d763ac03967593f64994e2a122627d2..b33ed4d92b71bd82473b22df02600af1381a505d 100644 (file)
@@ -548,7 +548,7 @@ static int rx_request_irq(struct hinic_rxq *rxq)
                goto err_req_irq;
 
        cpumask_set_cpu(qp->q_id % num_online_cpus(), &rq->affinity_mask);
-       err = irq_set_affinity_hint(rq->irq, &rq->affinity_mask);
+       err = irq_set_affinity_and_hint(rq->irq, &rq->affinity_mask);
        if (err)
                goto err_irq_affinity;
 
@@ -565,7 +565,7 @@ static void rx_free_irq(struct hinic_rxq *rxq)
 {
        struct hinic_rq *rq = rxq->rq;
 
-       irq_set_affinity_hint(rq->irq, NULL);
+       irq_update_affinity_hint(rq->irq, NULL);
        free_irq(rq->irq, rxq);
        rx_del_napi(rxq);
 }
index 61afc220fc6cd1a39578eb203d4c0d39ad99db84..2a3d8aef7f4e85a82c11e976804f03efe38741f1 100644 (file)
@@ -3915,10 +3915,10 @@ static int i40e_vsi_request_irq_msix(struct i40e_vsi *vsi, char *basename)
                 *
                 * get_cpu_mask returns a static constant mask with
                 * a permanent lifetime so it's ok to pass to
-                * irq_set_affinity_hint without making a copy.
+                * irq_update_affinity_hint without making a copy.
                 */
                cpu = cpumask_local_spread(q_vector->v_idx, -1);
-               irq_set_affinity_hint(irq_num, get_cpu_mask(cpu));
+               irq_update_affinity_hint(irq_num, get_cpu_mask(cpu));
        }
 
        vsi->irqs_ready = true;
@@ -3929,7 +3929,7 @@ free_queue_irqs:
                vector--;
                irq_num = pf->msix_entries[base + vector].vector;
                irq_set_affinity_notifier(irq_num, NULL);
-               irq_set_affinity_hint(irq_num, NULL);
+               irq_update_affinity_hint(irq_num, NULL);
                free_irq(irq_num, &vsi->q_vectors[vector]);
        }
        return err;
@@ -4750,7 +4750,7 @@ static void i40e_vsi_free_irq(struct i40e_vsi *vsi)
                        /* clear the affinity notifier in the IRQ descriptor */
                        irq_set_affinity_notifier(irq_num, NULL);
                        /* remove our suggested affinity mask for this IRQ */
-                       irq_set_affinity_hint(irq_num, NULL);
+                       irq_update_affinity_hint(irq_num, NULL);
                        synchronize_irq(irq_num);
                        free_irq(irq_num, vsi->q_vectors[i]);
 
index e4439b095533881b8a9d915d5d8347a85987d125..b1c161f9d706a7ec5eba7845d164d359e257b3ee 100644 (file)
@@ -492,10 +492,10 @@ iavf_request_traffic_irqs(struct iavf_adapter *adapter, char *basename)
                irq_set_affinity_notifier(irq_num, &q_vector->affinity_notify);
                /* Spread the IRQ affinity hints across online CPUs. Note that
                 * get_cpu_mask returns a mask with a permanent lifetime so
-                * it's safe to use as a hint for irq_set_affinity_hint.
+                * it's safe to use as a hint for irq_update_affinity_hint.
                 */
                cpu = cpumask_local_spread(q_vector->v_idx, -1);
-               irq_set_affinity_hint(irq_num, get_cpu_mask(cpu));
+               irq_update_affinity_hint(irq_num, get_cpu_mask(cpu));
        }
 
        return 0;
@@ -505,7 +505,7 @@ free_queue_irqs:
                vector--;
                irq_num = adapter->msix_entries[vector + NONQ_VECS].vector;
                irq_set_affinity_notifier(irq_num, NULL);
-               irq_set_affinity_hint(irq_num, NULL);
+               irq_update_affinity_hint(irq_num, NULL);
                free_irq(irq_num, &adapter->q_vectors[vector]);
        }
        return err;
@@ -557,7 +557,7 @@ static void iavf_free_traffic_irqs(struct iavf_adapter *adapter)
        for (vector = 0; vector < q_vectors; vector++) {
                irq_num = adapter->msix_entries[vector + NONQ_VECS].vector;
                irq_set_affinity_notifier(irq_num, NULL);
-               irq_set_affinity_hint(irq_num, NULL);
+               irq_update_affinity_hint(irq_num, NULL);
                free_irq(irq_num, &adapter->q_vectors[vector]);
        }
 }
index 45e2ec4d264d9aa2b300e14429b857271a9ef14c..7068ecb289f310e7271a6fde7e0c038911da3ee9 100644 (file)
@@ -3247,8 +3247,8 @@ static int ixgbe_request_msix_irqs(struct ixgbe_adapter *adapter)
                /* If Flow Director is enabled, set interrupt affinity */
                if (adapter->flags & IXGBE_FLAG_FDIR_HASH_CAPABLE) {
                        /* assign the mask for this irq */
-                       irq_set_affinity_hint(entry->vector,
-                                             &q_vector->affinity_mask);
+                       irq_update_affinity_hint(entry->vector,
+                                                &q_vector->affinity_mask);
                }
        }
 
@@ -3264,8 +3264,8 @@ static int ixgbe_request_msix_irqs(struct ixgbe_adapter *adapter)
 free_queue_irqs:
        while (vector) {
                vector--;
-               irq_set_affinity_hint(adapter->msix_entries[vector].vector,
-                                     NULL);
+               irq_update_affinity_hint(adapter->msix_entries[vector].vector,
+                                        NULL);
                free_irq(adapter->msix_entries[vector].vector,
                         adapter->q_vector[vector]);
        }
@@ -3398,7 +3398,7 @@ static void ixgbe_free_irq(struct ixgbe_adapter *adapter)
                        continue;
 
                /* clear the affinity_mask in the IRQ descriptor */
-               irq_set_affinity_hint(entry->vector, NULL);
+               irq_update_affinity_hint(entry->vector, NULL);
 
                free_irq(entry->vector, q_vector);
        }
index 9e48509ed3b2328da7f4f752e5542fd3f8e5d971..414e390e6b48c122ea4ae8b54b6cf9eca59a5740 100644 (file)
@@ -244,9 +244,9 @@ static void mlx4_set_eq_affinity_hint(struct mlx4_priv *priv, int vec)
            cpumask_empty(eq->affinity_mask))
                return;
 
-       hint_err = irq_set_affinity_hint(eq->irq, eq->affinity_mask);
+       hint_err = irq_update_affinity_hint(eq->irq, eq->affinity_mask);
        if (hint_err)
-               mlx4_warn(dev, "irq_set_affinity_hint failed, err %d\n", hint_err);
+               mlx4_warn(dev, "irq_update_affinity_hint failed, err %d\n", hint_err);
 }
 #endif
 
@@ -1123,9 +1123,7 @@ static void mlx4_free_irqs(struct mlx4_dev *dev)
        for (i = 0; i < dev->caps.num_comp_vectors + 1; ++i)
                if (eq_table->eq[i].have_irq) {
                        free_cpumask_var(eq_table->eq[i].affinity_mask);
-#if defined(CONFIG_SMP)
-                       irq_set_affinity_hint(eq_table->eq[i].irq, NULL);
-#endif
+                       irq_update_affinity_hint(eq_table->eq[i].irq, NULL);
                        free_irq(eq_table->eq[i].irq, eq_table->eq + i);
                        eq_table->eq[i].have_irq = 0;
                }
index bcee30f5de0a9fbcfb4c4c58bcda3187dc32d9de..fd7a671eda33ba3407c9518fe8b2e69ef2cc9b74 100644 (file)
@@ -143,11 +143,11 @@ static void irq_release(struct mlx5_irq *irq)
        struct mlx5_irq_pool *pool = irq->pool;
 
        xa_erase(&pool->irqs, irq->index);
-       /* free_irq requires that affinity and rmap will be cleared
+       /* free_irq requires that affinity_hint and rmap will be cleared
         * before calling it. This is why there is asymmetry with set_rmap
         * which should be called after alloc_irq but before request_irq.
         */
-       irq_set_affinity_hint(irq->irqn, NULL);
+       irq_update_affinity_hint(irq->irqn, NULL);
        free_cpumask_var(irq->mask);
        free_irq(irq->irqn, &irq->nh);
        kfree(irq);
@@ -316,7 +316,7 @@ static struct mlx5_irq *irq_pool_create_irq(struct mlx5_irq_pool *pool,
        if (IS_ERR(irq))
                return irq;
        cpumask_copy(irq->mask, affinity);
-       irq_set_affinity_hint(irq->irqn, irq->mask);
+       irq_set_affinity_and_hint(irq->irqn, irq->mask);
        return irq;
 }
 
@@ -399,7 +399,7 @@ irq_pool_request_vector(struct mlx5_irq_pool *pool, int vecidx,
        if (!irq_pool_is_sf_pool(pool) && !pool->xa_num_irqs.max &&
            cpumask_empty(irq->mask))
                cpumask_set_cpu(cpumask_first(cpu_online_mask), irq->mask);
-       irq_set_affinity_hint(irq->irqn, irq->mask);
+       irq_set_affinity_and_hint(irq->irqn, irq->mask);
 unlock:
        mutex_unlock(&pool->lock);
        return irq;
index ba17a8f740a95d43b67d5f39a517a4d73180744b..945755266c49f3fe89e7e948d65839b1076f497e 100644 (file)
@@ -12709,7 +12709,7 @@ lpfc_irq_set_aff(struct lpfc_hba_eq_hdl *eqhdl, unsigned int cpu)
        cpumask_clear(&eqhdl->aff_mask);
        cpumask_set_cpu(cpu, &eqhdl->aff_mask);
        irq_set_status_flags(eqhdl->irq, IRQ_NO_BALANCING);
-       irq_set_affinity_hint(eqhdl->irq, &eqhdl->aff_mask);
+       irq_set_affinity(eqhdl->irq, &eqhdl->aff_mask);
 }
 
 /**
@@ -12998,7 +12998,6 @@ cfg_fail_out:
        for (--index; index >= 0; index--) {
                eqhdl = lpfc_get_eq_hdl(index);
                lpfc_irq_clear_aff(eqhdl);
-               irq_set_affinity_hint(eqhdl->irq, NULL);
                free_irq(eqhdl->irq, eqhdl);
        }
 
@@ -13159,7 +13158,6 @@ lpfc_sli4_disable_intr(struct lpfc_hba *phba)
                for (index = 0; index < phba->cfg_irq_chann; index++) {
                        eqhdl = lpfc_get_eq_hdl(index);
                        lpfc_irq_clear_aff(eqhdl);
-                       irq_set_affinity_hint(eqhdl->irq, NULL);
                        free_irq(eqhdl->irq, eqhdl);
                }
        } else {
index aeb95f409826a084d144537e100ad00e04a1633f..82e1e24257bcd4bbe4feb45bd296fbe4e6996936 100644 (file)
@@ -5720,7 +5720,7 @@ megasas_setup_irqs_msix(struct megasas_instance *instance, u8 is_probe)
                                "Failed to register IRQ for vector %d.\n", i);
                        for (j = 0; j < i; j++) {
                                if (j < instance->low_latency_index_start)
-                                       irq_set_affinity_hint(
+                                       irq_update_affinity_hint(
                                                pci_irq_vector(pdev, j), NULL);
                                free_irq(pci_irq_vector(pdev, j),
                                         &instance->irq_context[j]);
@@ -5763,7 +5763,7 @@ megasas_destroy_irqs(struct megasas_instance *instance) {
        if (instance->msix_vectors)
                for (i = 0; i < instance->msix_vectors; i++) {
                        if (i < instance->low_latency_index_start)
-                               irq_set_affinity_hint(
+                               irq_update_affinity_hint(
                                    pci_irq_vector(instance->pdev, i), NULL);
                        free_irq(pci_irq_vector(instance->pdev, i),
                                 &instance->irq_context[i]);
@@ -5894,22 +5894,25 @@ int megasas_get_device_list(struct megasas_instance *instance)
 }
 
 /**
- * megasas_set_high_iops_queue_affinity_hint - Set affinity hint for high IOPS queues
- * @instance:                                  Adapter soft state
- * return:                                     void
+ * megasas_set_high_iops_queue_affinity_and_hint -     Set affinity and hint
+ *                                                     for high IOPS queues
+ * @instance:                                          Adapter soft state
+ * return:                                             void
  */
 static inline void
-megasas_set_high_iops_queue_affinity_hint(struct megasas_instance *instance)
+megasas_set_high_iops_queue_affinity_and_hint(struct megasas_instance *instance)
 {
        int i;
-       int local_numa_node;
+       unsigned int irq;
+       const struct cpumask *mask;
 
        if (instance->perf_mode == MR_BALANCED_PERF_MODE) {
-               local_numa_node = dev_to_node(&instance->pdev->dev);
+               mask = cpumask_of_node(dev_to_node(&instance->pdev->dev));
 
-               for (i = 0; i < instance->low_latency_index_start; i++)
-                       irq_set_affinity_hint(pci_irq_vector(instance->pdev, i),
-                               cpumask_of_node(local_numa_node));
+               for (i = 0; i < instance->low_latency_index_start; i++) {
+                       irq = pci_irq_vector(instance->pdev, i);
+                       irq_set_affinity_and_hint(irq, mask);
+               }
        }
 }
 
@@ -5998,7 +6001,7 @@ megasas_alloc_irq_vectors(struct megasas_instance *instance)
                instance->msix_vectors = 0;
 
        if (instance->smp_affinity_enable)
-               megasas_set_high_iops_queue_affinity_hint(instance);
+               megasas_set_high_iops_queue_affinity_and_hint(instance);
 }
 
 /**
index 81dab9b82f79f98e8b14229647b3b70f6a2a983d..511726f92d9a5b768a748d5cc92b48b76b581bda 100644 (file)
@@ -3086,6 +3086,7 @@ _base_check_enable_msix(struct MPT3SAS_ADAPTER *ioc)
 void
 mpt3sas_base_free_irq(struct MPT3SAS_ADAPTER *ioc)
 {
+       unsigned int irq;
        struct adapter_reply_queue *reply_q, *next;
 
        if (list_empty(&ioc->reply_queue_list))
@@ -3098,9 +3099,10 @@ mpt3sas_base_free_irq(struct MPT3SAS_ADAPTER *ioc)
                        continue;
                }
 
-               if (ioc->smp_affinity_enable)
-                       irq_set_affinity_hint(pci_irq_vector(ioc->pdev,
-                           reply_q->msix_index), NULL);
+               if (ioc->smp_affinity_enable) {
+                       irq = pci_irq_vector(ioc->pdev, reply_q->msix_index);
+                       irq_update_affinity_hint(irq, NULL);
+               }
                free_irq(pci_irq_vector(ioc->pdev, reply_q->msix_index),
                         reply_q);
                kfree(reply_q);
@@ -3167,18 +3169,15 @@ out:
  * @ioc: per adapter object
  *
  * The enduser would need to set the affinity via /proc/irq/#/smp_affinity
- *
- * It would nice if we could call irq_set_affinity, however it is not
- * an exported symbol
  */
 static void
 _base_assign_reply_queues(struct MPT3SAS_ADAPTER *ioc)
 {
-       unsigned int cpu, nr_cpus, nr_msix, index = 0;
+       unsigned int cpu, nr_cpus, nr_msix, index = 0, irq;
        struct adapter_reply_queue *reply_q;
-       int local_numa_node;
        int iopoll_q_count = ioc->reply_queue_count -
            ioc->iopoll_q_start_index;
+       const struct cpumask *mask;
 
        if (!_base_is_controller_msix_enabled(ioc))
                return;
@@ -3201,11 +3200,11 @@ _base_assign_reply_queues(struct MPT3SAS_ADAPTER *ioc)
                 * corresponding to high iops queues.
                 */
                if (ioc->high_iops_queues) {
-                       local_numa_node = dev_to_node(&ioc->pdev->dev);
+                       mask = cpumask_of_node(dev_to_node(&ioc->pdev->dev));
                        for (index = 0; index < ioc->high_iops_queues;
                            index++) {
-                               irq_set_affinity_hint(pci_irq_vector(ioc->pdev,
-                                   index), cpumask_of_node(local_numa_node));
+                               irq = pci_irq_vector(ioc->pdev, index);
+                               irq_set_affinity_and_hint(irq, mask);
                        }
                }
 
index 1f22a30c09637bc1b6d15a6ca3d6f8163f8bdb66..9367f1cb2e3c4b0a271cbf60474b6381b91c0982 100644 (file)
@@ -329,7 +329,46 @@ extern int irq_force_affinity(unsigned int irq, const struct cpumask *cpumask);
 extern int irq_can_set_affinity(unsigned int irq);
 extern int irq_select_affinity(unsigned int irq);
 
-extern int irq_set_affinity_hint(unsigned int irq, const struct cpumask *m);
+extern int __irq_apply_affinity_hint(unsigned int irq, const struct cpumask *m,
+                                    bool setaffinity);
+
+/**
+ * irq_update_affinity_hint - Update the affinity hint
+ * @irq:       Interrupt to update
+ * @m:         cpumask pointer (NULL to clear the hint)
+ *
+ * Updates the affinity hint, but does not change the affinity of the interrupt.
+ */
+static inline int
+irq_update_affinity_hint(unsigned int irq, const struct cpumask *m)
+{
+       return __irq_apply_affinity_hint(irq, m, false);
+}
+
+/**
+ * irq_set_affinity_and_hint - Update the affinity hint and apply the provided
+ *                          cpumask to the interrupt
+ * @irq:       Interrupt to update
+ * @m:         cpumask pointer (NULL to clear the hint)
+ *
+ * Updates the affinity hint and if @m is not NULL it applies it as the
+ * affinity of that interrupt.
+ */
+static inline int
+irq_set_affinity_and_hint(unsigned int irq, const struct cpumask *m)
+{
+       return __irq_apply_affinity_hint(irq, m, true);
+}
+
+/*
+ * Deprecated. Use irq_update_affinity_hint() or irq_set_affinity_and_hint()
+ * instead.
+ */
+static inline int irq_set_affinity_hint(unsigned int irq, const struct cpumask *m)
+{
+       return irq_set_affinity_and_hint(irq, m);
+}
+
 extern int irq_update_affinity_desc(unsigned int irq,
                                    struct irq_affinity_desc *affinity);
 
@@ -361,6 +400,18 @@ static inline int irq_can_set_affinity(unsigned int irq)
 
 static inline int irq_select_affinity(unsigned int irq)  { return 0; }
 
+static inline int irq_update_affinity_hint(unsigned int irq,
+                                          const struct cpumask *m)
+{
+       return -EINVAL;
+}
+
+static inline int irq_set_affinity_and_hint(unsigned int irq,
+                                           const struct cpumask *m)
+{
+       return -EINVAL;
+}
+
 static inline int irq_set_affinity_hint(unsigned int irq,
                                        const struct cpumask *m)
 {
index 553da4899f5536570005c932786c055c7def5b90..d476405802e9772b437b24812b905fac77dcc38b 100644 (file)
@@ -131,7 +131,7 @@ struct irq_domain_ops {
 #endif
 };
 
-extern struct irq_domain_ops irq_generic_chip_ops;
+extern const struct irq_domain_ops irq_generic_chip_ops;
 
 struct irq_domain_chip_generic;
 
index 6f29bf4c85153ffaf55e2313be68a14ec729b481..f0862eb6b506ce1f665961a2f35a6451df902cef 100644 (file)
@@ -451,7 +451,7 @@ static void irq_unmap_generic_chip(struct irq_domain *d, unsigned int virq)
 
 }
 
-struct irq_domain_ops irq_generic_chip_ops = {
+const struct irq_domain_ops irq_generic_chip_ops = {
        .map    = irq_map_generic_chip,
        .unmap  = irq_unmap_generic_chip,
        .xlate  = irq_domain_xlate_onetwocell,
index 7405e384e5ed01501e672e77e928dbef0a96a16e..f23ffd30385b1e3f290e52ec3f05391df1056a3d 100644 (file)
@@ -486,7 +486,8 @@ int irq_force_affinity(unsigned int irq, const struct cpumask *cpumask)
 }
 EXPORT_SYMBOL_GPL(irq_force_affinity);
 
-int irq_set_affinity_hint(unsigned int irq, const struct cpumask *m)
+int __irq_apply_affinity_hint(unsigned int irq, const struct cpumask *m,
+                             bool setaffinity)
 {
        unsigned long flags;
        struct irq_desc *desc = irq_get_desc_lock(irq, &flags, IRQ_GET_DESC_CHECK_GLOBAL);
@@ -495,12 +496,11 @@ int irq_set_affinity_hint(unsigned int irq, const struct cpumask *m)
                return -EINVAL;
        desc->affinity_hint = m;
        irq_put_desc_unlock(desc, flags);
-       /* set the initial affinity to prevent every interrupt being on CPU0 */
-       if (m)
+       if (m && setaffinity)
                __irq_set_affinity(irq, m, false);
        return 0;
 }
-EXPORT_SYMBOL_GPL(irq_set_affinity_hint);
+EXPORT_SYMBOL_GPL(__irq_apply_affinity_hint);
 
 static void irq_affinity_notify(struct work_struct *work)
 {