On Mon, Mar 5, 2018 at 7:29 PM, James Smart <jsmart2021@xxxxxxxxx> wrote: > This patch replaces: > https://www.spinics.net/lists/linux-scsi/msg117838.html > > A prior lpfc patch: > scsi: lpfc: Add push-to-adapter support to sli4 > commitid=1351e69fc6db30e186295f1c9495d03cef6a01a2 > > Fails compilation on some 32-bit systems as writeq() is not supported > on all architectures. Additionally, it was pointed out that as writeX() > does byteswapping if necessary for pci vs the cpu endianness, the code > was broken on BE PPC. > > After discussions with Arnd Bergmann, we've resolved the issue > to the following: > Instead of writeX(), use __raw_writeX() - which writes to io > space while preserving byte order. To use this, the code > was changed to use a different buffer that lpfc prepped > via sli_pcimem_bcopy() that was set to the bytestream to > be written. > On platforms with __raw_writeq support, use the routine, otherwise > use __raw_writel() > > Signed-off-by: Dick Kennedy <dick.kennedy@xxxxxxxxxxxx> > Signed-off-by: James Smart <james.smart@xxxxxxxxxxxx> Reviewed-by: Arnd Bergmann <arnd@xxxxxxxx> It would be interesting to try this version on powerpc64 as well (with a patch to use ioremap_wc() an d set dpp_enable), the lack of "sync" style barriers in __raw_writel should make it much faster than the old version. Arnd