OSDN Git Service

vfio-pci: use 32-bit comparisons for register address for gcc-4.5
authorArnd Bergmann <arnd@arndb.de>
Fri, 30 Dec 2016 15:13:47 +0000 (08:13 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 7 Aug 2017 02:19:44 +0000 (19:19 -0700)
commit1704a969506259e6e363b6416f16e93a89e472fd
treec9a1a23df9d884c54316c4dadda681e94b098432
parent7de922c14e838c46b3ce3ff4719bbb82ee307e8d
vfio-pci: use 32-bit comparisons for register address for gcc-4.5

[ Upstream commit 45e869714489431625c569d21fc952428d761476 ]

Using ancient compilers (gcc-4.5 or older) on ARM, we get a link
failure with the vfio-pci driver:

ERROR: "__aeabi_lcmp" [drivers/vfio/pci/vfio-pci.ko] undefined!

The reason is that the compiler tries to do a comparison of
a 64-bit range. This changes it to convert to a 32-bit number
explicitly first, as newer compilers do for themselves.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Alex Williamson <alex.williamson@redhat.com>
Signed-off-by: Sasha Levin <alexander.levin@verizon.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/vfio/pci/vfio_pci_rdwr.c