aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/scsi
diff options
context:
space:
mode:
authorChristoph Hellwig <hch@lst.de>2017-01-11 11:55:46 -0500
committerMartin K. Petersen <martin.petersen@oracle.com>2017-01-11 22:49:54 -0500
commit98624c4fed0abd848b291fbd3da18c2251b79429 (patch)
tree1ae53edbd55fc8873140b7a444f04f63ce1690f1 /drivers/scsi
parent17e5fc58588b5e3df8220c90a9d8af55201d6b45 (diff)
scsi: qla2xxx: remove irq_affinity_notifier
Now that qla2xxx uses the IRQ layer affinity assignment, affinity won't change over the life time of a device and the notifiers are useless. Signed-off-by: Christoph Hellwig <hch@lst.de> Acked-by: Himanshu Madhani <himanshu.madhani@cavium.com> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Diffstat (limited to 'drivers/scsi')
-rw-r--r--drivers/scsi/qla2xxx/qla_def.h1
-rw-r--r--drivers/scsi/qla2xxx/qla_isr.c73
2 files changed, 0 insertions, 74 deletions
diff --git a/drivers/scsi/qla2xxx/qla_def.h b/drivers/scsi/qla2xxx/qla_def.h
index 69587a21cb06..1549aace296a 100644
--- a/drivers/scsi/qla2xxx/qla_def.h
+++ b/drivers/scsi/qla2xxx/qla_def.h
@@ -2754,7 +2754,6 @@ struct qla_msix_entry {
2754 uint16_t entry; 2754 uint16_t entry;
2755 char name[30]; 2755 char name[30];
2756 void *handle; 2756 void *handle;
2757 struct irq_affinity_notify irq_notify;
2758 int cpuid; 2757 int cpuid;
2759}; 2758};
2760 2759
diff --git a/drivers/scsi/qla2xxx/qla_isr.c b/drivers/scsi/qla2xxx/qla_isr.c
index e2ef303b2bcf..5815403d1d65 100644
--- a/drivers/scsi/qla2xxx/qla_isr.c
+++ b/drivers/scsi/qla2xxx/qla_isr.c
@@ -18,10 +18,6 @@ static void qla2x00_status_entry(scsi_qla_host_t *, struct rsp_que *, void *);
18static void qla2x00_status_cont_entry(struct rsp_que *, sts_cont_entry_t *); 18static void qla2x00_status_cont_entry(struct rsp_que *, sts_cont_entry_t *);
19static void qla2x00_error_entry(scsi_qla_host_t *, struct rsp_que *, 19static void qla2x00_error_entry(scsi_qla_host_t *, struct rsp_que *,
20 sts_entry_t *); 20 sts_entry_t *);
21static void qla_irq_affinity_notify(struct irq_affinity_notify *,
22 const cpumask_t *);
23static void qla_irq_affinity_release(struct kref *);
24
25 21
26/** 22/**
27 * qla2100_intr_handler() - Process interrupts for the ISP2100 and ISP2200. 23 * qla2100_intr_handler() - Process interrupts for the ISP2100 and ISP2200.
@@ -2571,14 +2567,6 @@ void qla24xx_process_response_queue(struct scsi_qla_host *vha,
2571 if (!vha->flags.online) 2567 if (!vha->flags.online)
2572 return; 2568 return;
2573 2569
2574 if (rsp->msix && rsp->msix->cpuid != smp_processor_id()) {
2575 /* if kernel does not notify qla of IRQ's CPU change,
2576 * then set it here.
2577 */
2578 rsp->msix->cpuid = smp_processor_id();
2579 ha->tgt.rspq_vector_cpuid = rsp->msix->cpuid;
2580 }
2581
2582 while (rsp->ring_ptr->signature != RESPONSE_PROCESSED) { 2570 while (rsp->ring_ptr->signature != RESPONSE_PROCESSED) {
2583 pkt = (struct sts_entry_24xx *)rsp->ring_ptr; 2571 pkt = (struct sts_entry_24xx *)rsp->ring_ptr;
2584 2572
@@ -3075,9 +3063,6 @@ qla24xx_enable_msix(struct qla_hw_data *ha, struct rsp_que *rsp)
3075 qentry->have_irq = 0; 3063 qentry->have_irq = 0;
3076 qentry->in_use = 0; 3064 qentry->in_use = 0;
3077 qentry->handle = NULL; 3065 qentry->handle = NULL;
3078 qentry->irq_notify.notify = qla_irq_affinity_notify;
3079 qentry->irq_notify.release = qla_irq_affinity_release;
3080 qentry->cpuid = -1;
3081 } 3066 }
3082 3067
3083 /* Enable MSI-X vectors for the base queue */ 3068 /* Enable MSI-X vectors for the base queue */
@@ -3099,18 +3084,6 @@ qla24xx_enable_msix(struct qla_hw_data *ha, struct rsp_que *rsp)
3099 goto msix_register_fail; 3084 goto msix_register_fail;
3100 qentry->have_irq = 1; 3085 qentry->have_irq = 1;
3101 qentry->in_use = 1; 3086 qentry->in_use = 1;
3102
3103 /* Register for CPU affinity notification. */
3104 irq_set_affinity_notifier(qentry->vector, &qentry->irq_notify);
3105
3106 /* Schedule work (ie. trigger a notification) to read cpu
3107 * mask for this specific irq.
3108 * kref_get is required because
3109 * irq_affinity_notify() will do
3110 * kref_put().
3111 */
3112 kref_get(&qentry->irq_notify.kref);
3113 schedule_work(&qentry->irq_notify.work);
3114 } 3087 }
3115 3088
3116 /* 3089 /*
@@ -3307,49 +3280,3 @@ int qla25xx_request_irq(struct qla_hw_data *ha, struct qla_qpair *qpair,
3307 msix->handle = qpair; 3280 msix->handle = qpair;
3308 return ret; 3281 return ret;
3309} 3282}
3310
3311
3312/* irq_set_affinity/irqbalance will trigger notification of cpu mask update */
3313static void qla_irq_affinity_notify(struct irq_affinity_notify *notify,
3314 const cpumask_t *mask)
3315{
3316 struct qla_msix_entry *e =
3317 container_of(notify, struct qla_msix_entry, irq_notify);
3318 struct qla_hw_data *ha;
3319 struct scsi_qla_host *base_vha;
3320 struct rsp_que *rsp = e->handle;
3321
3322 /* user is recommended to set mask to just 1 cpu */
3323 e->cpuid = cpumask_first(mask);
3324
3325 ha = rsp->hw;
3326 base_vha = pci_get_drvdata(ha->pdev);
3327
3328 ql_dbg(ql_dbg_init, base_vha, 0xffff,
3329 "%s: host %ld : vector %d cpu %d \n", __func__,
3330 base_vha->host_no, e->vector, e->cpuid);
3331
3332 if (e->have_irq) {
3333 if ((IS_QLA83XX(ha) || IS_QLA27XX(ha)) &&
3334 (e->entry == QLA83XX_RSPQ_MSIX_ENTRY_NUMBER)) {
3335 ha->tgt.rspq_vector_cpuid = e->cpuid;
3336 ql_dbg(ql_dbg_init, base_vha, 0xffff,
3337 "%s: host%ld: rspq vector %d cpu %d runtime change\n",
3338 __func__, base_vha->host_no, e->vector, e->cpuid);
3339 }
3340 }
3341}
3342
3343static void qla_irq_affinity_release(struct kref *ref)
3344{
3345 struct irq_affinity_notify *notify =
3346 container_of(ref, struct irq_affinity_notify, kref);
3347 struct qla_msix_entry *e =
3348 container_of(notify, struct qla_msix_entry, irq_notify);
3349 struct rsp_que *rsp = e->handle;
3350 struct scsi_qla_host *base_vha = pci_get_drvdata(rsp->hw->pdev);
3351
3352 ql_dbg(ql_dbg_init, base_vha, 0xffff,
3353 "%s: host%ld: vector %d cpu %d\n", __func__,
3354 base_vha->host_no, e->vector, e->cpuid);
3355}