summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorscottl <scottl@FreeBSD.org>2001-04-01 08:33:01 +0000
committerscottl <scottl@FreeBSD.org>2001-04-01 08:33:01 +0000
commitee99514290d0b872945b39139ef67e4f426da459 (patch)
tree1340cdec014559fa122c8f928467a997b3968ab1
parent2b9c29467dbaa8502fe34679f7b6e456b867b23c (diff)
downloadFreeBSD-src-ee99514290d0b872945b39139ef67e4f426da459.zip
FreeBSD-src-ee99514290d0b872945b39139ef67e4f426da459.tar.gz
Make an attempt to get the asr driver to compile on Alpha by fixing some i386
specific bogons. Compile with -O0, as anything higher gives the compiler a fit. No idea if this driver will actually work on Alpha, though.
-rw-r--r--sys/dev/asr/asr.c12
-rw-r--r--sys/modules/asr/Makefile4
2 files changed, 15 insertions, 1 deletions
diff --git a/sys/dev/asr/asr.c b/sys/dev/asr/asr.c
index 5fa8e08..5ccc737 100644
--- a/sys/dev/asr/asr.c
+++ b/sys/dev/asr/asr.c
@@ -200,8 +200,13 @@ static dpt_sig_S ASR_sig = {
#include <vm/vm.h>
#include <vm/pmap.h>
-#include <machine/cputypes.h>
+
+#if defined (__i386__)
+#include <i386/include/cputypes.h>
#include <i386/include/vmparam.h>
+#elif defined (__alpha__)
+#include <alpha/include/pmap.h>
+#endif
#include <pci/pcivar.h>
#include <pci/pcireg.h>
@@ -4158,6 +4163,7 @@ asr_ioctl(
Info.numDrives = *((char *)ptok(0x475));
Info.processorFamily = ASR_sig.dsProcessorFamily;
+#if defined (__i386__)
switch (cpu) {
case CPU_386SX: case CPU_386:
Info.processorType = PROC_386; break;
@@ -4168,6 +4174,10 @@ asr_ioctl(
case CPU_686:
Info.processorType = PROC_SEXIUM; break;
}
+#elif defined (__alpha__)
+ Info.processorType = PROC_ALPHA;
+#endif
+
Info.osType = OS_BSDI_UNIX;
Info.osMajorVersion = osrelease[0] - '0';
Info.osMinorVersion = osrelease[2] - '0';
diff --git a/sys/modules/asr/Makefile b/sys/modules/asr/Makefile
index ca2b098..399ef3e 100644
--- a/sys/modules/asr/Makefile
+++ b/sys/modules/asr/Makefile
@@ -7,4 +7,8 @@ SRCS= asr.c
SRCS+= opt_scsi.h opt_cam.h opt_asr.h
SRCS+= device_if.h bus_if.h pci_if.h
+.if ${MACHINE_ARCH} == "alpha"
+CFLAGS+= -O0
+.endif
+
.include <bsd.kmod.mk>
OpenPOWER on IntegriCloud