powerpc/powernv: Use __raw_[rm_]writeq_be() in npu-dma.c
authorMichael Ellerman <mpe@ellerman.id.au>
Mon, 14 May 2018 12:50:33 +0000 (22:50 +1000)
committerMichael Ellerman <mpe@ellerman.id.au>
Fri, 18 May 2018 12:00:04 +0000 (22:00 +1000)
This allows us to squash some sparse warnings and also avoids having
to do explicity endian conversions in the code.

Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Reviewed-by: Samuel Mendoza-Jonas <sam@mendozajonas.com>
arch/powerpc/platforms/powernv/npu-dma.c

index 525e966dce3418cef4a82f494da331793b628668..8cdf91f5d3a4ec30d279924e1722d480b4c655d9 100644 (file)
@@ -459,10 +459,9 @@ static void mmio_launch_invalidate(struct mmio_atsd_reg *mmio_atsd_reg,
        struct npu *npu = mmio_atsd_reg->npu;
        int reg = mmio_atsd_reg->reg;
 
-       __raw_writeq(cpu_to_be64(va),
-               npu->mmio_atsd_regs[reg] + XTS_ATSD_AVA);
+       __raw_writeq_be(va, npu->mmio_atsd_regs[reg] + XTS_ATSD_AVA);
        eieio();
-       __raw_writeq(cpu_to_be64(launch), npu->mmio_atsd_regs[reg]);
+       __raw_writeq_be(launch, npu->mmio_atsd_regs[reg]);
 }
 
 static void mmio_invalidate_pid(struct mmio_atsd_reg mmio_atsd_reg[NV_MAX_NPUS],