On Sat, Feb 24, 2018 at 11:30 PM, James Smart <jsmart2021@xxxxxxxxx> wrote: > writeq() is not present on all 32-bit architectures. > > When 32-bit, use writel() > > Signed-off-by: Dick Kennedy <dick.kennedy@xxxxxxxxxxxx> > Signed-off-by: James Smart <james.smart@xxxxxxxxxxxx> > --- > 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 > } Unfortunately, this is still broken on all big-endian architectures. You could use __raw_writeq() here to fix it, or change the if() clause at the beginning to include '!IS_ENABLED(CONFIG_CPU_BIG_ENDIAN)' to avoid that. Arnd