Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/arch/powerpc/include Restrict {MIN,MAX}_PAGE_SIZE for MO...



details:   https://anonhg.NetBSD.org/src/rev/95cce54c90b8
branches:  trunk
changeset: 935173:95cce54c90b8
user:      rin <rin%NetBSD.org@localhost>
date:      Sat Jun 27 02:51:23 2020 +0000

description:
Restrict {MIN,MAX}_PAGE_SIZE for MODULAR || _MODULE, which makes
non-MODULAR kernel a little bit efficient.

They are also exposed to userland for jemalloc.

diffstat:

 sys/arch/powerpc/include/vmparam.h |  5 ++++-
 1 files changed, 4 insertions(+), 1 deletions(-)

diffs (28 lines):

diff -r bd086f8d441b -r 95cce54c90b8 sys/arch/powerpc/include/vmparam.h
--- a/sys/arch/powerpc/include/vmparam.h        Sat Jun 27 02:49:42 2020 +0000
+++ b/sys/arch/powerpc/include/vmparam.h        Sat Jun 27 02:51:23 2020 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: vmparam.h,v 1.22 2019/03/29 12:51:15 christos Exp $    */
+/*     $NetBSD: vmparam.h,v 1.23 2020/06/27 02:51:23 rin Exp $ */
 
 #ifndef _POWERPC_VMPARAM_H_
 #define _POWERPC_VMPARAM_H_
@@ -28,15 +28,18 @@
 #define VM_DEFAULT_ADDRESS_BOTTOMUP(da, sz) \
     round_page((vaddr_t)(da) + (vsize_t)maxdmap)
 
+#if defined(MODULAR) || defined(_MODULE) || !defined(_KERNEL)
 /*
  * If we are a module or a modular kernel, then we need to defined the range
  * of our varible page sizes since BOOKE and OEA use 4KB pages while IBM4XX
  * use 16KB pages.
+ * This is also required for userland by jemalloc.
  */
 #define MIN_PAGE_SHIFT 12                      /* BOOKE/OEA */
 #define MAX_PAGE_SHIFT 14                      /* IBM4XX */
 #define        MIN_PAGE_SIZE   (1 << MIN_PAGE_SHIFT)
 #define        MAX_PAGE_SIZE   (1 << MAX_PAGE_SHIFT)
+#endif /* MODULAR || _MODULE || !_KERNEL */
 
 #if defined(_MODULE)
 #if defined(_RUMPKERNEL)



Home | Main Index | Thread Index | Old Index