From owner-svn-src-user@FreeBSD.ORG Tue Nov 15 23:37:16 2011 Return-Path: Delivered-To: svn-src-user@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 1E722106566B; Tue, 15 Nov 2011 23:37:16 +0000 (UTC) (envelope-from attilio@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 0EFE98FC14; Tue, 15 Nov 2011 23:37:16 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id pAFNbFgh021746; Tue, 15 Nov 2011 23:37:15 GMT (envelope-from attilio@svn.freebsd.org) Received: (from attilio@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id pAFNbF0L021744; Tue, 15 Nov 2011 23:37:15 GMT (envelope-from attilio@svn.freebsd.org) Message-Id: <201111152337.pAFNbF0L021744@svn.freebsd.org> From: Attilio Rao Date: Tue, 15 Nov 2011 23:37:15 +0000 (UTC) To: src-committers@freebsd.org, svn-src-user@freebsd.org X-SVN-Group: user MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r227544 - user/attilio/vmcontention/sys/vm X-BeenThere: svn-src-user@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the experimental " user" src tree" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 15 Nov 2011 23:37:16 -0000 Author: attilio Date: Tue Nov 15 23:37:15 2011 New Revision: 227544 URL: http://svn.freebsd.org/changeset/base/227544 Log: Fix compilation for userland: - Use CTASSERT() only in the kernel. - the root pointer is required by struct vm_object which is accessible (maybe incorrectly?) by userland. Modified: user/attilio/vmcontention/sys/vm/vm_radix.h Modified: user/attilio/vmcontention/sys/vm/vm_radix.h ============================================================================== --- user/attilio/vmcontention/sys/vm/vm_radix.h Tue Nov 15 23:35:43 2011 (r227543) +++ user/attilio/vmcontention/sys/vm/vm_radix.h Tue Nov 15 23:37:15 2011 (r227544) @@ -44,20 +44,11 @@ #define VM_RADIX_HEIGHT 0xf /* Bits of height in root */ #define VM_RADIX_STACK 8 /* Nodes to store on stack. */ -CTASSERT(VM_RADIX_HEIGHT >= VM_RADIX_LIMIT); - /* Calculates maximum value for a tree of height h. */ #define VM_RADIX_MAX(h) \ ((h) == VM_RADIX_LIMIT ? ((vm_pindex_t)-1) : \ (((vm_pindex_t)1 << ((h) * VM_RADIX_WIDTH)) - 1)) -#ifdef _KERNEL - -struct vm_radix_node { - void *rn_child[VM_RADIX_COUNT]; /* child nodes. */ - uint16_t rn_count; /* Valid children. */ -}; - /* * Radix tree root. The height and pointer are set together to permit * coherent lookups while the root is modified. @@ -66,6 +57,14 @@ struct vm_radix { uintptr_t rt_root; /* root + height */ }; +#ifdef _KERNEL +CTASSERT(VM_RADIX_HEIGHT >= VM_RADIX_LIMIT); + +struct vm_radix_node { + void *rn_child[VM_RADIX_COUNT]; /* child nodes. */ + uint16_t rn_count; /* Valid children. */ +}; + void vm_radix_init(void); /*