aboutsummaryrefslogtreecommitdiff
path: root/linux-core/ati_pcigart.c
diff options
context:
space:
mode:
authorAlan Hourihane <alanh@fairlite.demon.co.uk>2001-09-25 09:32:16 +0000
committerAlan Hourihane <alanh@fairlite.demon.co.uk>2001-09-25 09:32:16 +0000
commitca820fca877faf4776be142417795a5945c606e6 (patch)
tree3b43fba2476fcbd4f81fa26b400549ad1df766f7 /linux-core/ati_pcigart.c
parent390440c9399a3c01811f3b37c2628d6e905656e8 (diff)
merge with 2.4.10 kernel
Diffstat (limited to 'linux-core/ati_pcigart.c')
-rw-r--r--linux-core/ati_pcigart.c14
1 files changed, 2 insertions, 12 deletions
diff --git a/linux-core/ati_pcigart.c b/linux-core/ati_pcigart.c
index d5d7c0ad..8b486c10 100644
--- a/linux-core/ati_pcigart.c
+++ b/linux-core/ati_pcigart.c
@@ -103,7 +103,6 @@ int DRM(ati_pcigart_init)( drm_device_t *dev,
goto done;
}
-#if defined(__alpha__)
if ( !dev->pdev ) {
DRM_ERROR( "PCI device unknown!\n" );
goto done;
@@ -118,9 +117,6 @@ int DRM(ati_pcigart_init)( drm_device_t *dev,
address = 0;
goto done;
}
-#else
- bus_address = virt_to_bus( (void *)address );
-#endif
pci_gart = (u32 *)address;
@@ -130,7 +126,6 @@ int DRM(ati_pcigart_init)( drm_device_t *dev,
memset( pci_gart, 0, ATI_MAX_PCIGART_PAGES * sizeof(u32) );
for ( i = 0 ; i < pages ; i++ ) {
-#if defined(__alpha__)
/* we need to support large memory configurations */
entry->busaddr[i] = pci_map_single(dev->pdev,
page_address( entry->pagelist[i] ),
@@ -144,9 +139,7 @@ int DRM(ati_pcigart_init)( drm_device_t *dev,
goto done;
}
page_base = (u32) entry->busaddr[i];
-#else
- page_base = page_to_bus( entry->pagelist[i] );
-#endif
+
for (j = 0; j < (PAGE_SIZE / ATI_PCIGART_PAGE_SIZE); j++) {
*pci_gart++ = cpu_to_le32( page_base );
page_base += ATI_PCIGART_PAGE_SIZE;
@@ -155,7 +148,7 @@ int DRM(ati_pcigart_init)( drm_device_t *dev,
ret = 1;
-#if __i386__
+#if defined(__i386__) || defined(__x86_64__)
asm volatile ( "wbinvd" ::: "memory" );
#else
mb();
@@ -171,7 +164,6 @@ int DRM(ati_pcigart_cleanup)( drm_device_t *dev,
unsigned long addr,
dma_addr_t bus_addr)
{
-#if defined(__alpha__)
drm_sg_mem_t *entry = dev->sg;
unsigned long pages;
int i;
@@ -197,8 +189,6 @@ int DRM(ati_pcigart_cleanup)( drm_device_t *dev,
}
}
-#endif
-
if ( addr ) {
DRM(ati_free_pcigart_table)( addr );
}