Fix support for build on 32bit systems. Include linux/io-64-nonatomic-hi-lo.h to provide non-atomic readq()/writeq()/ioread64()/iowrite64() accessors, and use __ffs64() instead of plain ffs() on 64bit number SZ_1T.
This allows this driver to bind on Renesas R-Car H2 which contains Rogue G6400 BVNC 1.39.4.1 . Signed-off-by: Marek Vasut <[email protected]> --- Cc: David Airlie <[email protected]> Cc: Frank Binns <[email protected]> Cc: Maarten Lankhorst <[email protected]> Cc: Matt Coster <[email protected]> Cc: Maxime Ripard <[email protected]> Cc: Simona Vetter <[email protected]> Cc: Thomas Zimmermann <[email protected]> Cc: [email protected] Cc: [email protected] --- drivers/gpu/drm/imagination/Kconfig | 2 +- drivers/gpu/drm/imagination/pvr_device.h | 1 + drivers/gpu/drm/imagination/pvr_mmu.h | 2 +- 3 files changed, 3 insertions(+), 2 deletions(-) diff --git a/drivers/gpu/drm/imagination/Kconfig b/drivers/gpu/drm/imagination/Kconfig index 0482bfcefdde..6d177f0568cd 100644 --- a/drivers/gpu/drm/imagination/Kconfig +++ b/drivers/gpu/drm/imagination/Kconfig @@ -3,7 +3,7 @@ config DRM_POWERVR tristate "Imagination Technologies PowerVR (Series 6 and later) & IMG Graphics" - depends on (ARM64 || RISCV && 64BIT) + depends on ARM || ARM64 || RISCV depends on DRM depends on MMU depends on PM diff --git a/drivers/gpu/drm/imagination/pvr_device.h b/drivers/gpu/drm/imagination/pvr_device.h index ab8f56ae15df..efdd355005c0 100644 --- a/drivers/gpu/drm/imagination/pvr_device.h +++ b/drivers/gpu/drm/imagination/pvr_device.h @@ -20,6 +20,7 @@ #include <linux/compiler_types.h> #include <linux/device.h> #include <linux/io.h> +#include <linux/io-64-nonatomic-hi-lo.h> #include <linux/iopoll.h> #include <linux/kernel.h> #include <linux/math.h> diff --git a/drivers/gpu/drm/imagination/pvr_mmu.h b/drivers/gpu/drm/imagination/pvr_mmu.h index a8ecd460168d..6431e4314735 100644 --- a/drivers/gpu/drm/imagination/pvr_mmu.h +++ b/drivers/gpu/drm/imagination/pvr_mmu.h @@ -85,7 +85,7 @@ struct sg_table; * notes on that constant apply here. */ #define PVR_PAGE_TABLE_ADDR_SPACE_SIZE SZ_1T -#define PVR_PAGE_TABLE_ADDR_BITS __ffs(PVR_PAGE_TABLE_ADDR_SPACE_SIZE) +#define PVR_PAGE_TABLE_ADDR_BITS __ffs64(PVR_PAGE_TABLE_ADDR_SPACE_SIZE) #define PVR_PAGE_TABLE_ADDR_MASK (PVR_PAGE_TABLE_ADDR_SPACE_SIZE - 1) void pvr_mmu_flush_request_all(struct pvr_device *pvr_dev); -- 2.51.0
