summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDave Airlie <airlied@linux.ie>2004-07-20 11:26:13 +0000
committerDave Airlie <airlied@linux.ie>2004-07-20 11:26:13 +0000
commitb20b00d4bc49534ba6e3695fb05cfc240bd3f0af (patch)
treece1660ffc1c2cab39d66eb71431ee188a238ccc6
parentfdb6ae31cb721a928d058d7419444f55eb60a542 (diff)
add x86_64 architecture defines from kernel (leave AMD64 defines in for
backwards compat)
-rw-r--r--linux-core/ati_pcigart.c2
-rw-r--r--linux-core/drm_vm.c6
-rw-r--r--linux/ati_pcigart.h2
-rw-r--r--linux/drm_vm.h6
4 files changed, 8 insertions, 8 deletions
diff --git a/linux-core/ati_pcigart.c b/linux-core/ati_pcigart.c
index 9ad49c06..b930683e 100644
--- a/linux-core/ati_pcigart.c
+++ b/linux-core/ati_pcigart.c
@@ -158,7 +158,7 @@ int DRM(ati_pcigart_init)( drm_device_t *dev,
ret = 1;
-#if defined(__i386__) || defined(__AMD64__)
+#if defined(__i386__) || defined(__AMD64__) || defined(__x86_64__)
asm volatile ( "wbinvd" ::: "memory" );
#else
mb();
diff --git a/linux-core/drm_vm.c b/linux-core/drm_vm.c
index c661d203..7ab7d5ac 100644
--- a/linux-core/drm_vm.c
+++ b/linux-core/drm_vm.c
@@ -76,7 +76,7 @@ static __inline__ struct page *DRM(do_vm_nopage)(struct vm_area_struct *vma,
struct drm_agp_mem *agpmem;
struct page *page;
-#if __alpha__
+#ifdef __alpha__
/*
* Adjust to a bus-relative address
*/
@@ -568,7 +568,7 @@ int DRM(mmap)(struct file *filp, struct vm_area_struct *vma)
if (!capable(CAP_SYS_ADMIN) && (map->flags & _DRM_READ_ONLY)) {
vma->vm_flags &= ~(VM_WRITE | VM_MAYWRITE);
-#if defined(__i386__) || defined(__AMD64__)
+#if defined(__i386__) || defined(__AMD64__) || defined(__x86_64__)
pgprot_val(vma->vm_page_prot) &= ~_PAGE_RW;
#else
/* Ye gads this is ugly. With more thought
@@ -599,7 +599,7 @@ int DRM(mmap)(struct file *filp, struct vm_area_struct *vma)
case _DRM_FRAME_BUFFER:
case _DRM_REGISTERS:
if (VM_OFFSET(vma) >= __pa(high_memory)) {
-#if defined(__i386__) || defined(__AMD64__)
+#if defined(__i386__) || defined(__AMD64__) || defined(__x86_64__)
if (boot_cpu_data.x86 > 3 && map->type != _DRM_AGP) {
pgprot_val(vma->vm_page_prot) |= _PAGE_PCD;
pgprot_val(vma->vm_page_prot) &= ~_PAGE_PWT;
diff --git a/linux/ati_pcigart.h b/linux/ati_pcigart.h
index 9ad49c06..b930683e 100644
--- a/linux/ati_pcigart.h
+++ b/linux/ati_pcigart.h
@@ -158,7 +158,7 @@ int DRM(ati_pcigart_init)( drm_device_t *dev,
ret = 1;
-#if defined(__i386__) || defined(__AMD64__)
+#if defined(__i386__) || defined(__AMD64__) || defined(__x86_64__)
asm volatile ( "wbinvd" ::: "memory" );
#else
mb();
diff --git a/linux/drm_vm.h b/linux/drm_vm.h
index c661d203..7ab7d5ac 100644
--- a/linux/drm_vm.h
+++ b/linux/drm_vm.h
@@ -76,7 +76,7 @@ static __inline__ struct page *DRM(do_vm_nopage)(struct vm_area_struct *vma,
struct drm_agp_mem *agpmem;
struct page *page;
-#if __alpha__
+#ifdef __alpha__
/*
* Adjust to a bus-relative address
*/
@@ -568,7 +568,7 @@ int DRM(mmap)(struct file *filp, struct vm_area_struct *vma)
if (!capable(CAP_SYS_ADMIN) && (map->flags & _DRM_READ_ONLY)) {
vma->vm_flags &= ~(VM_WRITE | VM_MAYWRITE);
-#if defined(__i386__) || defined(__AMD64__)
+#if defined(__i386__) || defined(__AMD64__) || defined(__x86_64__)
pgprot_val(vma->vm_page_prot) &= ~_PAGE_RW;
#else
/* Ye gads this is ugly. With more thought
@@ -599,7 +599,7 @@ int DRM(mmap)(struct file *filp, struct vm_area_struct *vma)
case _DRM_FRAME_BUFFER:
case _DRM_REGISTERS:
if (VM_OFFSET(vma) >= __pa(high_memory)) {
-#if defined(__i386__) || defined(__AMD64__)
+#if defined(__i386__) || defined(__AMD64__) || defined(__x86_64__)
if (boot_cpu_data.x86 > 3 && map->type != _DRM_AGP) {
pgprot_val(vma->vm_page_prot) |= _PAGE_PCD;
pgprot_val(vma->vm_page_prot) &= ~_PAGE_PWT;