Module Name: src
Committed By: martin
Date: Fri Oct 25 14:30:21 UTC 2013
Modified Files:
src/sys/uvm: uvm_page.h
Log Message:
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).
To generate a diff of this commit:
cvs rdiff -u -r1.75 -r1.76 src/sys/uvm/uvm_page.h
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: src/sys/uvm/uvm_page.h
diff -u src/sys/uvm/uvm_page.h:1.75 src/sys/uvm/uvm_page.h:1.76
--- src/sys/uvm/uvm_page.h:1.75 Sat May 5 20:45:35 2012
+++ src/sys/uvm/uvm_page.h Fri Oct 25 14:30:21 2013
@@ -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 @@ extern bool vm_page_zero_enable;
*/
#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;