Commit 1c003146 authored by John Garry's avatar John Garry Committed by Martin K. Petersen

scsi: hisi_sas: Drop kmap_atomic() in SMP command completion

The call to kmap_atomic() in the SMP command completion code is
unnecessary, since kmap() is only really concerned with highmem, which is
not relevant on arm64. The controller only finds itself in arm64 systems.
Signed-off-by: default avatarJohn Garry <john.garry@huawei.com>
Signed-off-by: default avatarMartin K. Petersen <martin.petersen@oracle.com>
parent 599aefc8
...@@ -1275,11 +1275,10 @@ static int slot_complete_v1_hw(struct hisi_hba *hisi_hba, ...@@ -1275,11 +1275,10 @@ static int slot_complete_v1_hw(struct hisi_hba *hisi_hba,
} }
case SAS_PROTOCOL_SMP: case SAS_PROTOCOL_SMP:
{ {
void *to;
struct scatterlist *sg_resp = &task->smp_task.smp_resp; struct scatterlist *sg_resp = &task->smp_task.smp_resp;
void *to = page_address(sg_page(sg_resp));
ts->stat = SAM_STAT_GOOD; ts->stat = SAM_STAT_GOOD;
to = kmap_atomic(sg_page(sg_resp));
dma_unmap_sg(dev, &task->smp_task.smp_resp, 1, dma_unmap_sg(dev, &task->smp_task.smp_resp, 1,
DMA_FROM_DEVICE); DMA_FROM_DEVICE);
...@@ -1289,7 +1288,6 @@ static int slot_complete_v1_hw(struct hisi_hba *hisi_hba, ...@@ -1289,7 +1288,6 @@ static int slot_complete_v1_hw(struct hisi_hba *hisi_hba,
hisi_sas_status_buf_addr_mem(slot) + hisi_sas_status_buf_addr_mem(slot) +
sizeof(struct hisi_sas_err_record), sizeof(struct hisi_sas_err_record),
sg_dma_len(sg_resp)); sg_dma_len(sg_resp));
kunmap_atomic(to);
break; break;
} }
case SAS_PROTOCOL_SATA: case SAS_PROTOCOL_SATA:
......
...@@ -2419,10 +2419,9 @@ slot_complete_v2_hw(struct hisi_hba *hisi_hba, struct hisi_sas_slot *slot) ...@@ -2419,10 +2419,9 @@ slot_complete_v2_hw(struct hisi_hba *hisi_hba, struct hisi_sas_slot *slot)
case SAS_PROTOCOL_SMP: case SAS_PROTOCOL_SMP:
{ {
struct scatterlist *sg_resp = &task->smp_task.smp_resp; struct scatterlist *sg_resp = &task->smp_task.smp_resp;
void *to; void *to = page_address(sg_page(sg_resp));
ts->stat = SAM_STAT_GOOD; ts->stat = SAM_STAT_GOOD;
to = kmap_atomic(sg_page(sg_resp));
dma_unmap_sg(dev, &task->smp_task.smp_resp, 1, dma_unmap_sg(dev, &task->smp_task.smp_resp, 1,
DMA_FROM_DEVICE); DMA_FROM_DEVICE);
...@@ -2432,7 +2431,6 @@ slot_complete_v2_hw(struct hisi_hba *hisi_hba, struct hisi_sas_slot *slot) ...@@ -2432,7 +2431,6 @@ slot_complete_v2_hw(struct hisi_hba *hisi_hba, struct hisi_sas_slot *slot)
hisi_sas_status_buf_addr_mem(slot) + hisi_sas_status_buf_addr_mem(slot) +
sizeof(struct hisi_sas_err_record), sizeof(struct hisi_sas_err_record),
sg_dma_len(sg_resp)); sg_dma_len(sg_resp));
kunmap_atomic(to);
break; break;
} }
case SAS_PROTOCOL_SATA: case SAS_PROTOCOL_SATA:
......
...@@ -2211,10 +2211,9 @@ slot_complete_v3_hw(struct hisi_hba *hisi_hba, struct hisi_sas_slot *slot) ...@@ -2211,10 +2211,9 @@ slot_complete_v3_hw(struct hisi_hba *hisi_hba, struct hisi_sas_slot *slot)
} }
case SAS_PROTOCOL_SMP: { case SAS_PROTOCOL_SMP: {
struct scatterlist *sg_resp = &task->smp_task.smp_resp; struct scatterlist *sg_resp = &task->smp_task.smp_resp;
void *to; void *to = page_address(sg_page(sg_resp));
ts->stat = SAM_STAT_GOOD; ts->stat = SAM_STAT_GOOD;
to = kmap_atomic(sg_page(sg_resp));
dma_unmap_sg(dev, &task->smp_task.smp_resp, 1, dma_unmap_sg(dev, &task->smp_task.smp_resp, 1,
DMA_FROM_DEVICE); DMA_FROM_DEVICE);
...@@ -2224,7 +2223,6 @@ slot_complete_v3_hw(struct hisi_hba *hisi_hba, struct hisi_sas_slot *slot) ...@@ -2224,7 +2223,6 @@ slot_complete_v3_hw(struct hisi_hba *hisi_hba, struct hisi_sas_slot *slot)
hisi_sas_status_buf_addr_mem(slot) + hisi_sas_status_buf_addr_mem(slot) +
sizeof(struct hisi_sas_err_record), sizeof(struct hisi_sas_err_record),
sg_dma_len(sg_resp)); sg_dma_len(sg_resp));
kunmap_atomic(to);
break; break;
} }
case SAS_PROTOCOL_SATA: case SAS_PROTOCOL_SATA:
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment