From d883f7f1b75c8dcafa891f7b9e69c5a2f0ff6d66 Mon Sep 17 00:00:00 2001 From: Benjamin Herrenschmidt Date: Mon, 2 Feb 2009 16:55:45 +1100 Subject: drm: Use resource_size_t for drm_get_resource_{start, len} The DRM uses its own wrappers to obtain resources from PCI devices, which currently convert the resource_size_t into an unsigned long. This is broken on 32-bit platforms with >32-bit physical address space. This fixes them, along with a few occurences of unsigned long used to store such a resource in drivers. Signed-off-by: Benjamin Herrenschmidt Signed-off-by: Dave Airlie --- drivers/gpu/drm/savage/savage_bci.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'drivers/gpu/drm/savage') diff --git a/drivers/gpu/drm/savage/savage_bci.c b/drivers/gpu/drm/savage/savage_bci.c index d465b2f9c1c..456cd040f31 100644 --- a/drivers/gpu/drm/savage/savage_bci.c +++ b/drivers/gpu/drm/savage/savage_bci.c @@ -599,8 +599,8 @@ int savage_driver_firstopen(struct drm_device *dev) drm_mtrr_add(dev_priv->mtrr[2].base, dev_priv->mtrr[2].size, DRM_MTRR_WC); } else { - DRM_ERROR("strange pci_resource_len %08lx\n", - drm_get_resource_len(dev, 0)); + DRM_ERROR("strange pci_resource_len %08llx\n", + (unsigned long long)drm_get_resource_len(dev, 0)); } } else if (dev_priv->chipset != S3_SUPERSAVAGE && dev_priv->chipset != S3_SAVAGE2000) { @@ -620,8 +620,8 @@ int savage_driver_firstopen(struct drm_device *dev) drm_mtrr_add(dev_priv->mtrr[0].base, dev_priv->mtrr[0].size, DRM_MTRR_WC); } else { - DRM_ERROR("strange pci_resource_len %08lx\n", - drm_get_resource_len(dev, 1)); + DRM_ERROR("strange pci_resource_len %08llx\n", + (unsigned long long)drm_get_resource_len(dev, 1)); } } else { mmio_base = drm_get_resource_start(dev, 0); -- cgit v1.2.3