aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEric Anholt <anholt@FreeBSD.org>2003-02-14 06:33:52 +0000
committerEric Anholt <anholt@FreeBSD.org>2003-02-14 06:33:52 +0000
commit05d1e23aa7784d8f2f4b7e5a2fbcb1d52bddee04 (patch)
tree15c6acae66f1380af036f5e4697f34c2531b44f7
parent11c6a5f80da70171ae26cb574bb16d84ed86e2b1 (diff)
downloadsrc-05d1e23aa7784d8f2f4b7e5a2fbcb1d52bddee04.tar.gz
src-05d1e23aa7784d8f2f4b7e5a2fbcb1d52bddee04.zip
Split the arch-specific AGP files into the appropriate files.* and do the same
for the agp module, and add agp to the list of modules to compile for alpha. Add an alpha_mb() to agp_flush_cache for alpha -- it's not correct but may improve the situation, and it's what linux and NetBSD do.
Notes
Notes: svn path=/head/; revision=110844
-rw-r--r--sys/conf/files6
-rw-r--r--sys/conf/files.alpha1
-rw-r--r--sys/conf/files.i3866
-rw-r--r--sys/conf/files.pc986
-rw-r--r--sys/dev/agp/agp.c6
-rw-r--r--sys/modules/Makefile3
-rw-r--r--sys/modules/agp/Makefile9
-rw-r--r--sys/pci/agp.c6
8 files changed, 34 insertions, 9 deletions
diff --git a/sys/conf/files b/sys/conf/files
index f324c5891f63..c9bbe9a8087a 100644
--- a/sys/conf/files
+++ b/sys/conf/files
@@ -1479,12 +1479,6 @@ pccard/pcic_isa.c optional pcic card isa
pccard/pcic_pci.c optional pcic card pci
pci/agp.c optional agp
pci/agp_if.m optional agp
-pci/agp_intel.c optional agp
-pci/agp_via.c optional agp
-pci/agp_sis.c optional agp
-pci/agp_ali.c optional agp
-pci/agp_amd.c optional agp
-pci/agp_i810.c optional agp
pci/alpm.c optional alpm
pci/amdpm.c optional amdpm
pci/amdpm.c optional nfpm
diff --git a/sys/conf/files.alpha b/sys/conf/files.alpha
index 187c3fc4a40f..9f38b0d6db95 100644
--- a/sys/conf/files.alpha
+++ b/sys/conf/files.alpha
@@ -211,3 +211,4 @@ dev/tga/tga_pci.c optional tga
dev/fb/fb.c optional tga
dev/fb/gfb.c optional tga
dev/gfb/gfb_pci.c optional tga
+pci/agp_amd.c optional agp
diff --git a/sys/conf/files.i386 b/sys/conf/files.i386
index 97bec63758e7..6e5f92d0b960 100644
--- a/sys/conf/files.i386
+++ b/sys/conf/files.i386
@@ -418,3 +418,9 @@ libkern/ucmpdi2.c standard
libkern/udivdi3.c standard
libkern/umoddi3.c standard
pci/cy_pci.c optional cy pci
+pci/agp_intel.c optional agp
+pci/agp_via.c optional agp
+pci/agp_sis.c optional agp
+pci/agp_ali.c optional agp
+pci/agp_amd.c optional agp
+pci/agp_i810.c optional agp
diff --git a/sys/conf/files.pc98 b/sys/conf/files.pc98
index 79dd01dc25a6..daa2f1fd97ca 100644
--- a/sys/conf/files.pc98
+++ b/sys/conf/files.pc98
@@ -391,3 +391,9 @@ pc98/pc98/wd.c count wdc
pc98/pc98/wd_cd.c count wcd wdc
pccard/mecia.c optional mecia card
pci/cy_pci.c optional cy pci
+pci/agp_intel.c optional agp
+pci/agp_via.c optional agp
+pci/agp_sis.c optional agp
+pci/agp_ali.c optional agp
+pci/agp_amd.c optional agp
+pci/agp_i810.c optional agp
diff --git a/sys/dev/agp/agp.c b/sys/dev/agp/agp.c
index ddd29b96daa5..293011c26245 100644
--- a/sys/dev/agp/agp.c
+++ b/sys/dev/agp/agp.c
@@ -96,6 +96,12 @@ agp_flush_cache()
#ifdef __i386__
wbinvd();
#endif
+#ifdef __alpha__
+ /* FIXME: This is most likely not correct as it doesn't flush CPU
+ * write caches, but we don't have a facility to do that and
+ * this is all linux does, too */
+ alpha_mb();
+#endif
}
u_int8_t
diff --git a/sys/modules/Makefile b/sys/modules/Makefile
index ab15cbab41ca..d48fa8b47620 100644
--- a/sys/modules/Makefile
+++ b/sys/modules/Makefile
@@ -263,7 +263,8 @@ SUBDIR+=aic \
.endif
.if ${MACHINE_ARCH} == "alpha"
-SUBDIR+=linprocfs \
+SUBDIR+=agp \
+ linprocfs \
linux \
osf1 \
sound \
diff --git a/sys/modules/agp/Makefile b/sys/modules/agp/Makefile
index 67c46d0390bf..b17be3a7c9a4 100644
--- a/sys/modules/agp/Makefile
+++ b/sys/modules/agp/Makefile
@@ -3,8 +3,13 @@
.PATH: ${.CURDIR}/../../pci
KMOD= agp
-SRCS= agp.c agp_intel.c agp_via.c agp_sis.c agp_ali.c agp_amd.c
-SRCS+= agp_i810.c agp_if.c
+SRCS= agp.c agp_if.c
+.if ${MACHINE_ARCH} == "i386"
+SRCS+= agp_i810.c agp_intel.c agp_via.c agp_sis.c agp_ali.c agp_amd.c
+.endif
+.if ${MACHINE_ARCH} == "alpha"
+SRCS+= agp_amd.c
+.endif
SRCS+= device_if.h bus_if.h agp_if.h pci_if.h
SRCS+= opt_bdg.h opt_bus.h
MFILES= kern/device_if.m kern/bus_if.m pci/agp_if.m dev/pci/pci_if.m
diff --git a/sys/pci/agp.c b/sys/pci/agp.c
index ddd29b96daa5..293011c26245 100644
--- a/sys/pci/agp.c
+++ b/sys/pci/agp.c
@@ -96,6 +96,12 @@ agp_flush_cache()
#ifdef __i386__
wbinvd();
#endif
+#ifdef __alpha__
+ /* FIXME: This is most likely not correct as it doesn't flush CPU
+ * write caches, but we don't have a facility to do that and
+ * this is all linux does, too */
+ alpha_mb();
+#endif
}
u_int8_t