Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/arch/mips/mips Since the RAS lock stubs are the default, ...
details: https://anonhg.NetBSD.org/src/rev/007be72c115b
branches: trunk
changeset: 764642:007be72c115b
user: matt <matt%NetBSD.org@localhost>
date: Fri Apr 29 22:04:42 2011 +0000
description:
Since the RAS lock stubs are the default, don't bother assigning them just
make the default.
diffstat:
sys/arch/mips/mips/lock_stubs_ras.S | 6 +++---
sys/arch/mips/mips/mips_machdep.c | 21 +++++++++------------
2 files changed, 12 insertions(+), 15 deletions(-)
diffs (88 lines):
diff -r 5b59993e9e9c -r 007be72c115b sys/arch/mips/mips/lock_stubs_ras.S
--- a/sys/arch/mips/mips/lock_stubs_ras.S Fri Apr 29 22:00:54 2011 +0000
+++ b/sys/arch/mips/mips/lock_stubs_ras.S Fri Apr 29 22:04:42 2011 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: lock_stubs_ras.S,v 1.2 2011/03/08 15:01:02 tsutsui Exp $ */
+/* $NetBSD: lock_stubs_ras.S,v 1.3 2011/04/29 22:04:42 matt Exp $ */
/*-
* Copyright (c) 2007 The NetBSD Foundation, Inc.
@@ -446,8 +446,8 @@
END(ras_mutex_spin_exit)
#endif /* !LOCKDEBUG */
- .rdata
-EXPORT(mips_ras_locore_atomicvec)
+ .data
+EXPORT(mips_locore_atomicvec)
PTR_WORD ras_atomic_cas_uint
PTR_WORD ras_atomic_cas_ulong
PTR_WORD ras_ucas_uint
diff -r 5b59993e9e9c -r 007be72c115b sys/arch/mips/mips/mips_machdep.c
--- a/sys/arch/mips/mips/mips_machdep.c Fri Apr 29 22:00:54 2011 +0000
+++ b/sys/arch/mips/mips/mips_machdep.c Fri Apr 29 22:04:42 2011 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: mips_machdep.c,v 1.239 2011/04/14 05:10:04 cliff Exp $ */
+/* $NetBSD: mips_machdep.c,v 1.240 2011/04/29 22:04:42 matt Exp $ */
/*
* Copyright 2002 Wasabi Systems, Inc.
@@ -112,7 +112,7 @@
#include <sys/cdefs.h> /* RCS ID & Copyright macro defns */
-__KERNEL_RCSID(0, "$NetBSD: mips_machdep.c,v 1.239 2011/04/14 05:10:04 cliff Exp $");
+__KERNEL_RCSID(0, "$NetBSD: mips_machdep.c,v 1.240 2011/04/29 22:04:42 matt Exp $");
#define __INTR_PRIVATE
#include "opt_cputype.h"
@@ -250,7 +250,6 @@
mips_locore_jumpvec_t mips_locore_jumpvec;
struct locoresw mips_locoresw;
-mips_locore_atomicvec_t mips_locore_atomicvec;
extern const struct splsw std_splsw;
struct splsw mips_splsw;
@@ -1141,9 +1140,8 @@
mips_config_cache();
/*
- * Default to RAS atomic ops since they are the lowest overhead.
+ * We default to RAS atomic ops since they are the lowest overhead.
*/
- mips_locore_atomicvec = mips_ras_locore_atomicvec;
#ifdef MULTIPROCESSOR
if (multicpu_p) {
/*
@@ -1844,14 +1842,13 @@
{
vsize_t sz = (vsize_t)round_page(MSGBUFSIZE);
vsize_t reqsz = sz;
- struct vm_physseg *vps;
-
- vps = VM_PHYSMEM_PTR(vm_nphysseg - 1);
+ u_int bank = vm_nphysseg - 1;
+ struct vm_physseg *vps = VM_PHYSMEM_PTR(bank);
#ifndef _LP64
/*
* Fist the physical segment that can be mapped to KSEG0
*/
- for (; vps >= vm_physmem; vps--) {
+ for (; vps >= vm_physmem; vps--, bank--) {
if (vps->avail_start + atop(sz) <= atop(MIPS_PHYS_MASK))
break;
}
@@ -1872,9 +1869,9 @@
/* Remove the [last] segment if it now has no pages. */
if (vps->start == vps->end) {
- for (; vps != &vm_physmem[vm_nphysseg - 1]; vps++)
- vps[0] = vps[1];
- vm_nphysseg--;
+ for (vm_nphysseg--; bank < vm_nphysseg - 1; bank++) {
+ VM_PHYSMEM_PTR_SWAP(bank, bank + 1);
+ }
}
/* warn if the message buffer had to be shrunk */
Home |
Main Index |
Thread Index |
Old Index