Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/arch/sparc64/sparc64 sun4v: Avoid using ASI_PHYS_NON_CAC...
details: https://anonhg.NetBSD.org/src/rev/b91cbdeae315
branches: trunk
changeset: 808997:b91cbdeae315
user: palle <palle%NetBSD.org@localhost>
date: Thu Jun 11 21:00:05 2015 +0000
description:
sun4v: Avoid using ASI_PHYS_NON_CACHED/ASI_PHYS_NON_CACHED_LITTLE in sparc_bus_map() since they are deprecated according to the UA2005 docs. Using the ASI_PRIMARY/ASI_PRIMARY_LITTLE seems to work. ok
martin@
diffstat:
sys/arch/sparc64/sparc64/machdep.c | 24 +++++++++++++-----------
1 files changed, 13 insertions(+), 11 deletions(-)
diffs (45 lines):
diff -r 5e4e3719b138 -r b91cbdeae315 sys/arch/sparc64/sparc64/machdep.c
--- a/sys/arch/sparc64/sparc64/machdep.c Thu Jun 11 18:12:00 2015 +0000
+++ b/sys/arch/sparc64/sparc64/machdep.c Thu Jun 11 21:00:05 2015 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: machdep.c,v 1.281 2015/03/15 10:38:58 nakayama Exp $ */
+/* $NetBSD: machdep.c,v 1.282 2015/06/11 21:00:05 palle Exp $ */
/*-
* Copyright (c) 1996, 1997, 1998 The NetBSD Foundation, Inc.
@@ -71,7 +71,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.281 2015/03/15 10:38:58 nakayama Exp $");
+__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.282 2015/06/11 21:00:05 palle Exp $");
#include "opt_ddb.h"
#include "opt_multiprocessor.h"
@@ -2273,15 +2273,17 @@
}
#ifdef _LP64
- /* If it's not LINEAR don't bother to map it. Use phys accesses. */
- if ((flags & BUS_SPACE_MAP_LINEAR) == 0) {
- hp->_ptr = addr;
- if (map_little)
- hp->_asi = ASI_PHYS_NON_CACHED_LITTLE;
- else
- hp->_asi = ASI_PHYS_NON_CACHED;
- hp->_sasi = ASI_PHYS_NON_CACHED;
- return (0);
+ if (!CPU_ISSUN4V) {
+ /* If it's not LINEAR don't bother to map it. Use phys accesses. */
+ if ((flags & BUS_SPACE_MAP_LINEAR) == 0) {
+ hp->_ptr = addr;
+ if (map_little)
+ hp->_asi = ASI_PHYS_NON_CACHED_LITTLE;
+ else
+ hp->_asi = ASI_PHYS_NON_CACHED;
+ hp->_sasi = ASI_PHYS_NON_CACHED;
+ return (0);
+ }
}
#endif
Home |
Main Index |
Thread Index |
Old Index