Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/uvm Optimize out VM_PHYSMEM_PTR_SWAP on architectures th...
details: https://anonhg.NetBSD.org/src/rev/8f05de5194a7
branches: trunk
changeset: 790856:8f05de5194a7
user: martin <martin%NetBSD.org@localhost>
date: Fri Oct 25 14:30:21 2013 +0000
description:
Optimize out VM_PHYSMEM_PTR_SWAP on architectures that have VM_PHYSSEG_MAX = 1
(hard to address two different array entries there w/o invoking undefined
behaviour, and newer compilers complain about it).
diffstat:
sys/uvm/uvm_page.h | 6 +++++-
1 files changed, 5 insertions(+), 1 deletions(-)
diffs (22 lines):
diff -r ae676c354f1a -r 8f05de5194a7 sys/uvm/uvm_page.h
--- a/sys/uvm/uvm_page.h Fri Oct 25 14:28:28 2013 +0000
+++ b/sys/uvm/uvm_page.h Fri Oct 25 14:30:21 2013 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: uvm_page.h,v 1.75 2012/05/05 20:45:35 rmind Exp $ */
+/* $NetBSD: uvm_page.h,v 1.76 2013/10/25 14:30:21 martin Exp $ */
/*
* Copyright (c) 1997 Charles D. Cranor and Washington University.
@@ -290,8 +290,12 @@
*/
#define VM_PHYSMEM_PTR(i) (&vm_physmem[i])
+#if VM_PHYSSEG_MAX == 1
+#define VM_PHYSMEM_PTR_SWAP(i, j) /* impossible */
+#else
#define VM_PHYSMEM_PTR_SWAP(i, j) \
do { vm_physmem[(i)] = vm_physmem[(j)]; } while (0)
+#endif
extern struct vm_physseg vm_physmem[VM_PHYSSEG_MAX];
extern int vm_nphysseg;
Home |
Main Index |
Thread Index |
Old Index