diff options
author | Dave Airlie <airlied@linux.ie> | 2004-09-05 02:36:48 +0000 |
---|---|---|
committer | Dave Airlie <airlied@linux.ie> | 2004-09-05 02:36:48 +0000 |
commit | 3dcbc1f4a13e2f8d5ddb2a9ae8bc83c48a30a2b7 (patch) | |
tree | e1c41a598fe225d1f10d62d8802e454de2390fbc | |
parent | 4499ea42eae887c45403cd9ea364fccf311fee8e (diff) |
make the AMD64 check a compat thing
-rw-r--r-- | linux-core/ati_pcigart.c | 2 | ||||
-rw-r--r-- | linux-core/drm_compat.h | 5 | ||||
-rw-r--r-- | linux-core/drm_vm.c | 4 | ||||
-rw-r--r-- | linux/ati_pcigart.h | 2 | ||||
-rw-r--r-- | linux/drm_compat.h | 5 | ||||
-rw-r--r-- | linux/drm_vm.h | 4 |
6 files changed, 16 insertions, 6 deletions
diff --git a/linux-core/ati_pcigart.c b/linux-core/ati_pcigart.c index bf599e42..0d7df0f3 100644 --- a/linux-core/ati_pcigart.c +++ b/linux-core/ati_pcigart.c @@ -157,7 +157,7 @@ int DRM(ati_pcigart_init)( drm_device_t *dev, ret = 1; -#if defined(__i386__) || defined(__AMD64__) || defined(__x86_64__) +#if defined(__i386__) || defined(__x86_64__) asm volatile ( "wbinvd" ::: "memory" ); #else mb(); diff --git a/linux-core/drm_compat.h b/linux-core/drm_compat.h index f6c113a9..f5d5824f 100644 --- a/linux-core/drm_compat.h +++ b/linux-core/drm_compat.h @@ -152,6 +152,11 @@ static inline void class_simple_set_hotplug(struct class_simple *cs, void (*fn)( #define VM_OFFSET(vma) ((vma)->vm_pgoff << PAGE_SHIFT) +/* old architectures */ +#ifdef __AMD64__ +#define __x86_64__ +#endif + /*@}*/ #endif diff --git a/linux-core/drm_vm.c b/linux-core/drm_vm.c index b5b5e2ea..d8c35ee6 100644 --- a/linux-core/drm_vm.c +++ b/linux-core/drm_vm.c @@ -573,7 +573,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__) || defined(__x86_64__) +#if defined(__i386__) || defined(__x86_64__) pgprot_val(vma->vm_page_prot) &= ~_PAGE_RW; #else /* Ye gads this is ugly. With more thought @@ -602,7 +602,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__) || defined(__x86_64__) +#if defined(__i386__) || 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 bf599e42..0d7df0f3 100644 --- a/linux/ati_pcigart.h +++ b/linux/ati_pcigart.h @@ -157,7 +157,7 @@ int DRM(ati_pcigart_init)( drm_device_t *dev, ret = 1; -#if defined(__i386__) || defined(__AMD64__) || defined(__x86_64__) +#if defined(__i386__) || defined(__x86_64__) asm volatile ( "wbinvd" ::: "memory" ); #else mb(); diff --git a/linux/drm_compat.h b/linux/drm_compat.h index f6c113a9..f5d5824f 100644 --- a/linux/drm_compat.h +++ b/linux/drm_compat.h @@ -152,6 +152,11 @@ static inline void class_simple_set_hotplug(struct class_simple *cs, void (*fn)( #define VM_OFFSET(vma) ((vma)->vm_pgoff << PAGE_SHIFT) +/* old architectures */ +#ifdef __AMD64__ +#define __x86_64__ +#endif + /*@}*/ #endif diff --git a/linux/drm_vm.h b/linux/drm_vm.h index b5b5e2ea..d8c35ee6 100644 --- a/linux/drm_vm.h +++ b/linux/drm_vm.h @@ -573,7 +573,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__) || defined(__x86_64__) +#if defined(__i386__) || defined(__x86_64__) pgprot_val(vma->vm_page_prot) &= ~_PAGE_RW; #else /* Ye gads this is ugly. With more thought @@ -602,7 +602,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__) || defined(__x86_64__) +#if defined(__i386__) || 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; |