mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git
synced 2024-12-29 09:12:07 +00:00
s390/ctcm: use new address translation helpers
Use virt_to_dma32() 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
9608142a87
commit
6b9875ae1b
@ -1325,7 +1325,7 @@ static void ctcmpc_chx_txdone(fsm_instance *fi, int event, void *arg)
|
||||
clear_normalized_cda(&ch->ccw[1]);
|
||||
|
||||
CTCM_PR_DBGDATA("ccwcda=0x%p data=0x%p\n",
|
||||
(void *)(unsigned long)ch->ccw[1].cda,
|
||||
(void *)(u64)dma32_to_u32(ch->ccw[1].cda),
|
||||
ch->trans_skb->data);
|
||||
ch->ccw[1].count = ch->max_bufsize;
|
||||
|
||||
@ -1340,7 +1340,7 @@ static void ctcmpc_chx_txdone(fsm_instance *fi, int event, void *arg)
|
||||
}
|
||||
|
||||
CTCM_PR_DBGDATA("ccwcda=0x%p data=0x%p\n",
|
||||
(void *)(unsigned long)ch->ccw[1].cda,
|
||||
(void *)(u64)dma32_to_u32(ch->ccw[1].cda),
|
||||
ch->trans_skb->data);
|
||||
|
||||
ch->ccw[1].count = ch->trans_skb->len;
|
||||
|
@ -1389,7 +1389,7 @@ static int add_channel(struct ccw_device *cdev, enum ctcm_channel_types type,
|
||||
ch->ccw[15].cmd_code = CCW_CMD_WRITE;
|
||||
ch->ccw[15].flags = CCW_FLAG_SLI | CCW_FLAG_CC;
|
||||
ch->ccw[15].count = TH_HEADER_LENGTH;
|
||||
ch->ccw[15].cda = virt_to_phys(ch->discontact_th);
|
||||
ch->ccw[15].cda = virt_to_dma32(ch->discontact_th);
|
||||
|
||||
ch->ccw[16].cmd_code = CCW_CMD_NOOP;
|
||||
ch->ccw[16].flags = CCW_FLAG_SLI;
|
||||
|
@ -1708,57 +1708,57 @@ static void mpc_action_side_xid(fsm_instance *fsm, void *arg, int side)
|
||||
ch->ccw[9].cmd_code = CCW_CMD_WRITE;
|
||||
ch->ccw[9].flags = CCW_FLAG_SLI | CCW_FLAG_CC;
|
||||
ch->ccw[9].count = TH_HEADER_LENGTH;
|
||||
ch->ccw[9].cda = virt_to_phys(ch->xid_th);
|
||||
ch->ccw[9].cda = virt_to_dma32(ch->xid_th);
|
||||
|
||||
if (ch->xid == NULL)
|
||||
goto done;
|
||||
ch->ccw[10].cmd_code = CCW_CMD_WRITE;
|
||||
ch->ccw[10].flags = CCW_FLAG_SLI | CCW_FLAG_CC;
|
||||
ch->ccw[10].count = XID2_LENGTH;
|
||||
ch->ccw[10].cda = virt_to_phys(ch->xid);
|
||||
ch->ccw[10].cda = virt_to_dma32(ch->xid);
|
||||
|
||||
ch->ccw[11].cmd_code = CCW_CMD_READ;
|
||||
ch->ccw[11].flags = CCW_FLAG_SLI | CCW_FLAG_CC;
|
||||
ch->ccw[11].count = TH_HEADER_LENGTH;
|
||||
ch->ccw[11].cda = virt_to_phys(ch->rcvd_xid_th);
|
||||
ch->ccw[11].cda = virt_to_dma32(ch->rcvd_xid_th);
|
||||
|
||||
ch->ccw[12].cmd_code = CCW_CMD_READ;
|
||||
ch->ccw[12].flags = CCW_FLAG_SLI | CCW_FLAG_CC;
|
||||
ch->ccw[12].count = XID2_LENGTH;
|
||||
ch->ccw[12].cda = virt_to_phys(ch->rcvd_xid);
|
||||
ch->ccw[12].cda = virt_to_dma32(ch->rcvd_xid);
|
||||
|
||||
ch->ccw[13].cmd_code = CCW_CMD_READ;
|
||||
ch->ccw[13].cda = virt_to_phys(ch->rcvd_xid_id);
|
||||
ch->ccw[13].cda = virt_to_dma32(ch->rcvd_xid_id);
|
||||
|
||||
} else { /* side == YSIDE : mpc_action_yside_xid */
|
||||
ch->ccw[9].cmd_code = CCW_CMD_READ;
|
||||
ch->ccw[9].flags = CCW_FLAG_SLI | CCW_FLAG_CC;
|
||||
ch->ccw[9].count = TH_HEADER_LENGTH;
|
||||
ch->ccw[9].cda = virt_to_phys(ch->rcvd_xid_th);
|
||||
ch->ccw[9].cda = virt_to_dma32(ch->rcvd_xid_th);
|
||||
|
||||
ch->ccw[10].cmd_code = CCW_CMD_READ;
|
||||
ch->ccw[10].flags = CCW_FLAG_SLI | CCW_FLAG_CC;
|
||||
ch->ccw[10].count = XID2_LENGTH;
|
||||
ch->ccw[10].cda = virt_to_phys(ch->rcvd_xid);
|
||||
ch->ccw[10].cda = virt_to_dma32(ch->rcvd_xid);
|
||||
|
||||
if (ch->xid_th == NULL)
|
||||
goto done;
|
||||
ch->ccw[11].cmd_code = CCW_CMD_WRITE;
|
||||
ch->ccw[11].flags = CCW_FLAG_SLI | CCW_FLAG_CC;
|
||||
ch->ccw[11].count = TH_HEADER_LENGTH;
|
||||
ch->ccw[11].cda = virt_to_phys(ch->xid_th);
|
||||
ch->ccw[11].cda = virt_to_dma32(ch->xid_th);
|
||||
|
||||
if (ch->xid == NULL)
|
||||
goto done;
|
||||
ch->ccw[12].cmd_code = CCW_CMD_WRITE;
|
||||
ch->ccw[12].flags = CCW_FLAG_SLI | CCW_FLAG_CC;
|
||||
ch->ccw[12].count = XID2_LENGTH;
|
||||
ch->ccw[12].cda = virt_to_phys(ch->xid);
|
||||
ch->ccw[12].cda = virt_to_dma32(ch->xid);
|
||||
|
||||
if (ch->xid_id == NULL)
|
||||
goto done;
|
||||
ch->ccw[13].cmd_code = CCW_CMD_WRITE;
|
||||
ch->ccw[13].cda = virt_to_phys(ch->xid_id);
|
||||
ch->ccw[13].cda = virt_to_dma32(ch->xid_id);
|
||||
|
||||
}
|
||||
ch->ccw[13].flags = CCW_FLAG_SLI | CCW_FLAG_CC;
|
||||
|
Loading…
Reference in New Issue
Block a user