Module Name: src
Committed By: christos
Date: Wed Mar 27 19:01:44 UTC 2019
Modified Files:
src/sys/arch/sparc/include: vmparam.h
Log Message:
provide the max page size for userland
To generate a diff of this commit:
cvs rdiff -u -r1.43 -r1.44 src/sys/arch/sparc/include/vmparam.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/arch/sparc/include/vmparam.h
diff -u src/sys/arch/sparc/include/vmparam.h:1.43 src/sys/arch/sparc/include/vmparam.h:1.44
--- src/sys/arch/sparc/include/vmparam.h:1.43 Mon Jan 7 11:59:18 2013
+++ src/sys/arch/sparc/include/vmparam.h Wed Mar 27 15:01:44 2019
@@ -1,4 +1,4 @@
-/* $NetBSD: vmparam.h,v 1.43 2013/01/07 16:59:18 chs Exp $ */
+/* $NetBSD: vmparam.h,v 1.44 2019/03/27 19:01:44 christos Exp $ */
/*
* Copyright (c) 1992, 1993
@@ -62,18 +62,25 @@
#define PAGE_SHIFT_SUN4 13
#define PAGE_SHIFT_SUN4CM 12
-#define MIN_PAGE_SIZE (1 << PAGE_SHIFT_SUN4CM)
-#define MAX_PAGE_SIZE (1 << PAGE_SHIFT_SUN4)
+#define MAX_PAGE_SHIFT PAGE_SHIFT_SUN4
+#define MIN_PAGE_SHIFT PAGE_SHIFT_SUN4CM
+
+#define MIN_PAGE_SIZE (1 << MIN_PAGE_SHIFT)
+#define MAX_PAGE_SIZE (1 << MAX_PAGE_SHIFT)
#if CPU_NTYPES != 0 && !defined(SUN4)
#define PAGE_SHIFT PAGE_SHIFT_SUN4CM
-#define PAGE_SIZE (1 << PAGE_SHIFT)
-#define PAGE_MASK (PAGE_SIZE - 1)
#elif CPU_NTYPES == 1 && defined(SUN4)
#define PAGE_SHIFT PAGE_SHIFT_SUN4
+#elif defined(_KERNEL)
+#error "Cannot determine page size"
+#else
+/* Default to max for userland */
+#define PAGE_SHIFT MAX_PAGE_SHIFT
+#endif
+
#define PAGE_SIZE (1 << PAGE_SHIFT)
#define PAGE_MASK (PAGE_SIZE - 1)
-#endif
/*
* USRSTACK is the top (end) of the user stack.