aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/savage/savage_bci.c
diff options
context:
space:
mode:
authorBenjamin Herrenschmidt <benh@kernel.crashing.org>2009-02-02 00:55:45 -0500
committerDave Airlie <airlied@redhat.com>2009-03-13 00:23:56 -0400
commitd883f7f1b75c8dcafa891f7b9e69c5a2f0ff6d66 (patch)
tree765a9bf6d3322ecfa42819622981baea2480ba41 /drivers/gpu/drm/savage/savage_bci.c
parent041b62374c7fedc11a8a1eeda2868612d3d1436c (diff)
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 <benh@kernel.crashing.org> Signed-off-by: Dave Airlie <airlied@linux.ie>
Diffstat (limited to 'drivers/gpu/drm/savage/savage_bci.c')
-rw-r--r--drivers/gpu/drm/savage/savage_bci.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/drivers/gpu/drm/savage/savage_bci.c b/drivers/gpu/drm/savage/savage_bci.c
index d465b2f9c1cd..456cd040f31a 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)
599 drm_mtrr_add(dev_priv->mtrr[2].base, 599 drm_mtrr_add(dev_priv->mtrr[2].base,
600 dev_priv->mtrr[2].size, DRM_MTRR_WC); 600 dev_priv->mtrr[2].size, DRM_MTRR_WC);
601 } else { 601 } else {
602 DRM_ERROR("strange pci_resource_len %08lx\n", 602 DRM_ERROR("strange pci_resource_len %08llx\n",
603 drm_get_resource_len(dev, 0)); 603 (unsigned long long)drm_get_resource_len(dev, 0));
604 } 604 }
605 } else if (dev_priv->chipset != S3_SUPERSAVAGE && 605 } else if (dev_priv->chipset != S3_SUPERSAVAGE &&
606 dev_priv->chipset != S3_SAVAGE2000) { 606 dev_priv->chipset != S3_SAVAGE2000) {
@@ -620,8 +620,8 @@ int savage_driver_firstopen(struct drm_device *dev)
620 drm_mtrr_add(dev_priv->mtrr[0].base, 620 drm_mtrr_add(dev_priv->mtrr[0].base,
621 dev_priv->mtrr[0].size, DRM_MTRR_WC); 621 dev_priv->mtrr[0].size, DRM_MTRR_WC);
622 } else { 622 } else {
623 DRM_ERROR("strange pci_resource_len %08lx\n", 623 DRM_ERROR("strange pci_resource_len %08llx\n",
624 drm_get_resource_len(dev, 1)); 624 (unsigned long long)drm_get_resource_len(dev, 1));
625 } 625 }
626 } else { 626 } else {
627 mmio_base = drm_get_resource_start(dev, 0); 627 mmio_base = drm_get_resource_start(dev, 0);