]> git.baikalelectronics.ru Git - kernel.git/commit
powerpc/io: Add __raw_writeq_be() __raw_rm_writeq_be()
authorMichael Ellerman <mpe@ellerman.id.au>
Mon, 14 May 2018 12:50:31 +0000 (22:50 +1000)
committerMichael Ellerman <mpe@ellerman.id.au>
Fri, 18 May 2018 11:59:56 +0000 (21:59 +1000)
commitaa2d6687a4bd9a055757468f8350ba8bd60185b0
tree04aa8f233d676a8925d27356c942b3d92adbfb4d
parent497bee0e0aba25a5ac0a3e6c7d2ffeb092442165
powerpc/io: Add __raw_writeq_be() __raw_rm_writeq_be()

Add byte-swapping versions of __raw_writeq() and __raw_rm_writeq().

This allows us to avoid sparse warnings caused by passing __be64 to
__raw_writeq(), which takes unsigned long:

  arch/powerpc/platforms/powernv/pci-ioda.c:1981:38:
  warning: incorrect type in argument 1 (different base types)
      expected unsigned long [unsigned] v
      got restricted __be64 [usertype] <noident>

It's also generally preferable to use a byte-swapping accessor rather
than doing it by hand in the code, which is more bug prone.

Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Reviewed-by: Samuel Mendoza-Jonas <sam@mendozajonas.com>
arch/powerpc/include/asm/io.h