summaryrefslogtreecommitdiff
path: root/sys/dev/pci/drm/radeon/radeon_gart.c
diff options
context:
space:
mode:
authorJonathan Gray <jsg@cvs.openbsd.org>2019-08-19 09:34:14 +0000
committerJonathan Gray <jsg@cvs.openbsd.org>2019-08-19 09:34:14 +0000
commit937a18e8463f71f2f1ad3eef4cfc337348216ebd (patch)
tree0a5b53f83b6515a6e712f92140f85d1124567715 /sys/dev/pci/drm/radeon/radeon_gart.c
parent989d35587d7e6ae294456a47b51285a48d9380a2 (diff)
define CONFIG_X86* in autoconf.h as needed and reduce diff to linux
ok kettenis@
Diffstat (limited to 'sys/dev/pci/drm/radeon/radeon_gart.c')
-rw-r--r--sys/dev/pci/drm/radeon/radeon_gart.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/sys/dev/pci/drm/radeon/radeon_gart.c b/sys/dev/pci/drm/radeon/radeon_gart.c
index 3c1a6191d72..ae6202eadfa 100644
--- a/sys/dev/pci/drm/radeon/radeon_gart.c
+++ b/sys/dev/pci/drm/radeon/radeon_gart.c
@@ -70,7 +70,7 @@ int radeon_gart_table_ram_alloc(struct radeon_device *rdev)
struct drm_dmamem *dmah;
int flags = 0;
-#if defined(__amd64__) || defined(__i386__)
+#ifdef CONFIG_X86
if (rdev->family == CHIP_RS400 || rdev->family == CHIP_RS480 ||
rdev->family == CHIP_RS690 || rdev->family == CHIP_RS740) {
flags |= BUS_DMA_NOCACHE;
@@ -102,7 +102,7 @@ void radeon_gart_table_ram_free(struct radeon_device *rdev)
if (rdev->gart.ptr == NULL) {
return;
}
-#ifdef CONFIG_X86
+#if defined (CONFIG_X86) && defined(__linux__)
if (rdev->family == CHIP_RS400 || rdev->family == CHIP_RS480 ||
rdev->family == CHIP_RS690 || rdev->family == CHIP_RS740) {
set_memory_wb((unsigned long)rdev->gart.ptr,