writeq() is not present on all 32-bit architectures.

When 32-bit, use writel()

Signed-off-by: Dick Kennedy <dick.kenn...@broadcom.com>
Signed-off-by: James Smart <james.sm...@broadcom.com>
---
 drivers/scsi/lpfc/lpfc_sli.c | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/drivers/scsi/lpfc/lpfc_sli.c b/drivers/scsi/lpfc/lpfc_sli.c
index 4ce3ca6f4b79..f2bf3bf93aa6 100644
--- a/drivers/scsi/lpfc/lpfc_sli.c
+++ b/drivers/scsi/lpfc/lpfc_sli.c
@@ -141,8 +141,13 @@ lpfc_sli4_wq_put(struct lpfc_queue *q, union lpfc_wqe *wqe)
        if (q->dpp_enable && q->phba->cfg_enable_dpp) {
                /* write to DPP aperture taking advatage of Combined Writes */
                tmp = (uint8_t *)wqe;
+#ifdef CONFIG_64BIT
                for (i = 0; i < q->entry_size; i += sizeof(uint64_t))
                        writeq(*((uint64_t *)(tmp + i)), q->dpp_regaddr + i);
+#else
+               for (i = 0; i < q->entry_size; i += sizeof(uint32_t))
+                       writel(*((uint32_t *)(tmp + i)), q->dpp_regaddr + i);
+#endif
        }
        /* ensure WQE bcopy and DPP flushed before doorbell write */
        wmb();
-- 
2.13.1

Reply via email to