Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/arch/sgimips/sgimips mips3_* functions aren't available ...
details: https://anonhg.NetBSD.org/src/rev/16e19ace0465
branches: trunk
changeset: 557577:16e19ace0465
user: sekiya <sekiya%NetBSD.org@localhost>
date: Mon Jan 12 12:12:24 2004 +0000
description:
mips3_* functions aren't available when MIPS3 is not defined, so provide
MIPS1 workalikes (which, for the _8 routines, discard the top 32 bits).
diffstat:
sys/arch/sgimips/sgimips/bus.c | 12 ++++++++++--
1 files changed, 10 insertions(+), 2 deletions(-)
diffs (53 lines):
diff -r 501c02bfac87 -r 16e19ace0465 sys/arch/sgimips/sgimips/bus.c
--- a/sys/arch/sgimips/sgimips/bus.c Mon Jan 12 12:07:06 2004 +0000
+++ b/sys/arch/sgimips/sgimips/bus.c Mon Jan 12 12:12:24 2004 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: bus.c,v 1.23 2004/01/12 03:30:51 sekiya Exp $ */
+/* $NetBSD: bus.c,v 1.24 2004/01/12 12:12:24 sekiya Exp $ */
/*
* Copyright (c) 1998 The NetBSD Foundation, Inc.
@@ -38,7 +38,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: bus.c,v 1.23 2004/01/12 03:30:51 sekiya Exp $");
+__KERNEL_RCSID(0, "$NetBSD: bus.c,v 1.24 2004/01/12 12:12:24 sekiya Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@@ -224,6 +224,7 @@
bus_space_read_8(bus_space_tag_t tag, bus_space_handle_t bsh, bus_size_t o)
{
u_int64_t reg;
+#if defined(MIPS3)
int s;
switch (tag) {
@@ -238,12 +239,16 @@
reg = mips3_ld( (u_int64_t *)(bsh + o));
break;
}
+#else
+ reg = (*(volatile u_int64_t *)(bsh + o));
+#endif
return reg;
}
void
bus_space_write_8(bus_space_tag_t tag, bus_space_handle_t bsh, bus_size_t o, u_int64_t v)
{
+#if defined(MIPS3)
int s;
switch (tag) {
@@ -258,6 +263,9 @@
mips3_sd( (u_int64_t *)(bsh + o), v);
break;
}
+#else
+ *(volatile u_int64_t *)(bsh + o) = v;
+#endif
}
int
Home |
Main Index |
Thread Index |
Old Index