Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

Merge tag 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/rdma/rdma

Pull rdma fixes from Jason Gunthorpe:
"Fix two build warnings on 32 bit platforms

It seems the linux-next CI and 0-day bot are not testing enough 32 bit
configurations, as soon as you merged the rdma pull request there were
two instant reports of warnings on these sytems that I would have
thought should have been covered by time in linux-next

Anyhow, here are the fixes so people don't hit problems with -Werror"

* tag 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/rdma/rdma:
RDMA/siw: Fix pointer cast warning
RDMA/rxe: Fix compile warnings on 32-bit

+46 -38
+45 -37
drivers/infiniband/sw/rxe/rxe_resp.c
··· 785 785 return ret; 786 786 } 787 787 788 - static enum resp_states atomic_write_reply(struct rxe_qp *qp, 789 - struct rxe_pkt_info *pkt) 788 + #ifdef CONFIG_64BIT 789 + static enum resp_states do_atomic_write(struct rxe_qp *qp, 790 + struct rxe_pkt_info *pkt) 790 791 { 791 - u64 src, *dst; 792 - struct resp_res *res = qp->resp.res; 793 792 struct rxe_mr *mr = qp->resp.mr; 794 793 int payload = payload_size(pkt); 794 + u64 src, *dst; 795 + 796 + if (mr->state != RXE_MR_STATE_VALID) 797 + return RESPST_ERR_RKEY_VIOLATION; 798 + 799 + memcpy(&src, payload_addr(pkt), payload); 800 + 801 + dst = iova_to_vaddr(mr, qp->resp.va + qp->resp.offset, payload); 802 + /* check vaddr is 8 bytes aligned. */ 803 + if (!dst || (uintptr_t)dst & 7) 804 + return RESPST_ERR_MISALIGNED_ATOMIC; 805 + 806 + /* Do atomic write after all prior operations have completed */ 807 + smp_store_release(dst, src); 808 + 809 + /* decrease resp.resid to zero */ 810 + qp->resp.resid -= sizeof(payload); 811 + 812 + qp->resp.msn++; 813 + 814 + /* next expected psn, read handles this separately */ 815 + qp->resp.psn = (pkt->psn + 1) & BTH_PSN_MASK; 816 + qp->resp.ack_psn = qp->resp.psn; 817 + 818 + qp->resp.opcode = pkt->opcode; 819 + qp->resp.status = IB_WC_SUCCESS; 820 + return RESPST_ACKNOWLEDGE; 821 + } 822 + #else 823 + static enum resp_states do_atomic_write(struct rxe_qp *qp, 824 + struct rxe_pkt_info *pkt) 825 + { 826 + return RESPST_ERR_UNSUPPORTED_OPCODE; 827 + } 828 + #endif /* CONFIG_64BIT */ 829 + 830 + static enum resp_states atomic_write_reply(struct rxe_qp *qp, 831 + struct rxe_pkt_info *pkt) 832 + { 833 + struct resp_res *res = qp->resp.res; 795 834 796 835 if (!res) { 797 836 res = rxe_prepare_res(qp, pkt, RXE_ATOMIC_WRITE_MASK); 798 837 qp->resp.res = res; 799 838 } 800 839 801 - if (!res->replay) { 802 - #ifdef CONFIG_64BIT 803 - if (mr->state != RXE_MR_STATE_VALID) 804 - return RESPST_ERR_RKEY_VIOLATION; 805 - 806 - memcpy(&src, payload_addr(pkt), payload); 807 - 808 - dst = iova_to_vaddr(mr, qp->resp.va + qp->resp.offset, payload); 809 - /* check vaddr is 8 bytes aligned. */ 810 - if (!dst || (uintptr_t)dst & 7) 811 - return RESPST_ERR_MISALIGNED_ATOMIC; 812 - 813 - /* Do atomic write after all prior operations have completed */ 814 - smp_store_release(dst, src); 815 - 816 - /* decrease resp.resid to zero */ 817 - qp->resp.resid -= sizeof(payload); 818 - 819 - qp->resp.msn++; 820 - 821 - /* next expected psn, read handles this separately */ 822 - qp->resp.psn = (pkt->psn + 1) & BTH_PSN_MASK; 823 - qp->resp.ack_psn = qp->resp.psn; 824 - 825 - qp->resp.opcode = pkt->opcode; 826 - qp->resp.status = IB_WC_SUCCESS; 827 - 840 + if (res->replay) 828 841 return RESPST_ACKNOWLEDGE; 829 - #else 830 - return RESPST_ERR_UNSUPPORTED_OPCODE; 831 - #endif /* CONFIG_64BIT */ 832 - } 833 - 834 - return RESPST_ACKNOWLEDGE; 842 + return do_atomic_write(qp, pkt); 835 843 } 836 844 837 845 static struct sk_buff *prepare_ack_packet(struct rxe_qp *qp,
+1 -1
drivers/infiniband/sw/siw/siw_qp_tx.c
··· 29 29 dma_addr_t paddr = siw_pbl_get_buffer(pbl, offset, NULL, idx); 30 30 31 31 if (paddr) 32 - return virt_to_page((void *)paddr); 32 + return virt_to_page((void *)(uintptr_t)paddr); 33 33 34 34 return NULL; 35 35 }