diff options
author | Alan Hourihane <alanh@fairlite.demon.co.uk> | 2003-09-12 20:00:59 +0000 |
---|---|---|
committer | Alan Hourihane <alanh@fairlite.demon.co.uk> | 2003-09-12 20:00:59 +0000 |
commit | c5168016cc028f59b417df77f1f169bf06e40271 (patch) | |
tree | 98372dc0025cded55ddeddf15fb665203ea8c0de /linux | |
parent | 85c16d962d8f6011b670d74d0669402ec4708f6f (diff) |
linux drm fixes
Diffstat (limited to 'linux')
-rw-r--r-- | linux/Makefile.kernel | 2 | ||||
-rw-r--r-- | linux/Makefile.linux | 9 | ||||
-rw-r--r-- | linux/ati_pcigart.h | 2 | ||||
-rw-r--r-- | linux/drm_vm.h | 4 |
4 files changed, 12 insertions, 5 deletions
diff --git a/linux/Makefile.kernel b/linux/Makefile.kernel index e5abd4d3..fb39e636 100644 --- a/linux/Makefile.kernel +++ b/linux/Makefile.kernel @@ -4,7 +4,7 @@ # # Based on David Woodhouse's mtd build. # -# $XFree86: xc/programs/Xserver/hw/xfree86/os-support/linux/drm/kernel/Makefile.kernel,v 1.17 2003/04/12 17:18:17 dawes Exp $ +# $XFree86: xc/programs/Xserver/hw/xfree86/os-support/linux/drm/kernel/Makefile.kernel,v 1.18 2003/08/16 17:59:17 dawes Exp $ # gamma-objs := gamma_drv.o gamma_dma.o diff --git a/linux/Makefile.linux b/linux/Makefile.linux index 9de67667..12e0e8c8 100644 --- a/linux/Makefile.linux +++ b/linux/Makefile.linux @@ -11,7 +11,7 @@ # everything required for in-kernel source builds. It is included into # this file, so none of that should be duplicated here. # -# $XFree86: xc/programs/Xserver/hw/xfree86/os-support/linux/drm/kernel/Makefile.linux,v 1.37 2003/04/23 01:48:57 dawes Exp $ +# $XFree86: xc/programs/Xserver/hw/xfree86/os-support/linux/drm/kernel/Makefile.linux,v 1.40 2003/08/17 17:12:25 dawes Exp $ # # @@ -48,6 +48,7 @@ MODULE_LIST := gamma.o tdfx.o r128.o radeon.o mga.o sis.o # Modules only for ix86 architectures ifneq (,$(findstring 86,$(MACHINE))) +ARCHX86 := 1 MODULE_LIST += i830.o i810.o endif @@ -258,6 +259,12 @@ $(error Only 2.4.x and later kernels are supported \ ($(VERSION).$(PATCHLEVEL).$(SUBLEVEL))) endif +ifdef ARCHX86 +ifndef CONFIG_X86_CMPXCHG +$(error CONFIG_X86_CMPXCHG needs to be enabled in the kernel) +endif +endif + # This needs to go before all other include paths. CC += -I$(DRMSRCDIR) diff --git a/linux/ati_pcigart.h b/linux/ati_pcigart.h index 42233ff9..221ceb6d 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(__x86_64__) +#if defined(__i386__) || defined(__AMD64__) asm volatile ( "wbinvd" ::: "memory" ); #else mb(); diff --git a/linux/drm_vm.h b/linux/drm_vm.h index 29cad56d..8f4679f9 100644 --- a/linux/drm_vm.h +++ b/linux/drm_vm.h @@ -511,7 +511,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(__x86_64__) +#if defined(__i386__) || defined(__AMD64__) pgprot_val(vma->vm_page_prot) &= ~_PAGE_RW; #else /* Ye gads this is ugly. With more thought @@ -542,7 +542,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(__x86_64__) +#if defined(__i386__) || defined(__AMD64__) 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; |