s390/scm: use new address translation helpers
Use virt_to_dma64() and friends to properly convert virtual to physical and physical to virtual addresses so that "make C=1" does not generate any warnings anymore. Signed-off-by: Heiko Carstens <hca@linux.ibm.com>
This commit is contained in:
parent
9ff91a33c0
commit
850ae345cc
@ -131,7 +131,7 @@ static void scm_request_done(struct scm_request *scmrq)
|
|||||||
|
|
||||||
for (i = 0; i < nr_requests_per_io && scmrq->request[i]; i++) {
|
for (i = 0; i < nr_requests_per_io && scmrq->request[i]; i++) {
|
||||||
msb = &scmrq->aob->msb[i];
|
msb = &scmrq->aob->msb[i];
|
||||||
aidaw = (u64)phys_to_virt(msb->data_addr);
|
aidaw = (u64)dma64_to_virt(msb->data_addr);
|
||||||
|
|
||||||
if ((msb->flags & MSB_FLAG_IDA) && aidaw &&
|
if ((msb->flags & MSB_FLAG_IDA) && aidaw &&
|
||||||
IS_ALIGNED(aidaw, PAGE_SIZE))
|
IS_ALIGNED(aidaw, PAGE_SIZE))
|
||||||
@ -196,12 +196,12 @@ static int scm_request_prepare(struct scm_request *scmrq)
|
|||||||
msb->scm_addr = scmdev->address + ((u64) blk_rq_pos(req) << 9);
|
msb->scm_addr = scmdev->address + ((u64) blk_rq_pos(req) << 9);
|
||||||
msb->oc = (rq_data_dir(req) == READ) ? MSB_OC_READ : MSB_OC_WRITE;
|
msb->oc = (rq_data_dir(req) == READ) ? MSB_OC_READ : MSB_OC_WRITE;
|
||||||
msb->flags |= MSB_FLAG_IDA;
|
msb->flags |= MSB_FLAG_IDA;
|
||||||
msb->data_addr = (u64)virt_to_phys(aidaw);
|
msb->data_addr = virt_to_dma64(aidaw);
|
||||||
|
|
||||||
rq_for_each_segment(bv, req, iter) {
|
rq_for_each_segment(bv, req, iter) {
|
||||||
WARN_ON(bv.bv_offset);
|
WARN_ON(bv.bv_offset);
|
||||||
msb->blk_count += bv.bv_len >> 12;
|
msb->blk_count += bv.bv_len >> 12;
|
||||||
aidaw->data_addr = virt_to_phys(page_address(bv.bv_page));
|
aidaw->data_addr = virt_to_dma64(page_address(bv.bv_page));
|
||||||
aidaw++;
|
aidaw++;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user