From owner-svn-src-head@FreeBSD.ORG Sat Jun 28 17:36:20 2014 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id DDE0BEA0; Sat, 28 Jun 2014 17:36:20 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id C90852843; Sat, 28 Jun 2014 17:36:20 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s5SHaKRx078860; Sat, 28 Jun 2014 17:36:20 GMT (envelope-from hselasky@svn.freebsd.org) Received: (from hselasky@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s5SHaJY8078852; Sat, 28 Jun 2014 17:36:19 GMT (envelope-from hselasky@svn.freebsd.org) Message-Id: <201406281736.s5SHaJY8078852@svn.freebsd.org> From: Hans Petter Selasky Date: Sat, 28 Jun 2014 17:36:19 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r268005 - in head/sys: kern ofed/drivers/infiniband/ulp/sdp ofed/drivers/net/mlx4 ofed/include/linux pc98/pc98 sys X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 28 Jun 2014 17:36:21 -0000 Author: hselasky Date: Sat Jun 28 17:36:18 2014 New Revision: 268005 URL: http://svnweb.freebsd.org/changeset/base/268005 Log: Compile fixes: Remove duplicate "debug_ktr.mask" sysctl definition. Remove now unused variable from "kern_ktr.c". This fixes build of "ktr" which was broken by r267961. Let the default value for "vm_kmem_size_scale" be zero. It is setup after that the sysctl has been initialized from "getenv()" in the "kmeminit()" function to equal the "VM_KMEM_SIZE_MAX" value, if zero. On Sparc64 the "VM_KMEM_SIZE_MAX" macro is not a constant. This fixes build of Sparc64 which was broken by r267961. Add a special macro to dynamically create SYSCTL root nodes, because root nodes have a special parent. This fixes build of existing OFED module and CANBUS module for pc98 which was broken by r267961. Add missing "sysctl.h" includes to get the needed sysctl header file declarations. This is needed after r267961. MFC after: 2 weeks Modified: head/sys/kern/kern_ktr.c head/sys/kern/kern_malloc.c head/sys/ofed/drivers/infiniband/ulp/sdp/sdp_main.c head/sys/ofed/drivers/net/mlx4/en_netdev.c head/sys/ofed/include/linux/linux_compat.c head/sys/pc98/pc98/canbus.c head/sys/sys/sysctl.h Modified: head/sys/kern/kern_ktr.c ============================================================================== --- head/sys/kern/kern_ktr.c Sat Jun 28 15:53:28 2014 (r268004) +++ head/sys/kern/kern_ktr.c Sat Jun 28 17:36:18 2014 (r268005) @@ -102,13 +102,9 @@ int ktr_version = KTR_VERSION; struct ktr_entry ktr_buf_init[KTR_BOOT_ENTRIES]; struct ktr_entry *ktr_buf = ktr_buf_init; cpuset_t ktr_cpumask = CPUSET_T_INITIALIZER(KTR_CPUMASK); -static char ktr_cpumask_str[CPUSETBUFSIZ]; static SYSCTL_NODE(_debug, OID_AUTO, ktr, CTLFLAG_RD, 0, "KTR options"); -SYSCTL_INT(_debug_ktr, OID_AUTO, mask, CTLFLAG_RDTUN, - &ktr_mask, 0, "KTR mask"); - SYSCTL_INT(_debug_ktr, OID_AUTO, version, CTLFLAG_RD, &ktr_version, 0, "Version of the KTR interface"); @@ -175,7 +171,7 @@ sysctl_debug_ktr_mask(SYSCTL_HANDLER_ARG return (error); } -SYSCTL_PROC(_debug_ktr, OID_AUTO, mask, CTLTYPE_UINT|CTLFLAG_RW, 0, 0, +SYSCTL_PROC(_debug_ktr, OID_AUTO, mask, CTLTYPE_UINT|CTLFLAG_RWTUN, 0, 0, sysctl_debug_ktr_mask, "IU", "Bitmask of KTR event classes for which logging is enabled"); Modified: head/sys/kern/kern_malloc.c ============================================================================== --- head/sys/kern/kern_malloc.c Sat Jun 28 15:53:28 2014 (r268004) +++ head/sys/kern/kern_malloc.c Sat Jun 28 17:36:18 2014 (r268005) @@ -191,7 +191,7 @@ static u_long vm_kmem_size_max; SYSCTL_ULONG(_vm, OID_AUTO, kmem_size_max, CTLFLAG_RDTUN, &vm_kmem_size_max, 0, "Maximum size of kernel memory"); -static u_int vm_kmem_size_scale = VM_KMEM_SIZE_SCALE; +static u_int vm_kmem_size_scale; SYSCTL_UINT(_vm, OID_AUTO, kmem_size_scale, CTLFLAG_RDTUN, &vm_kmem_size_scale, 0, "Scale factor for kernel memory size"); Modified: head/sys/ofed/drivers/infiniband/ulp/sdp/sdp_main.c ============================================================================== --- head/sys/ofed/drivers/infiniband/ulp/sdp/sdp_main.c Sat Jun 28 15:53:28 2014 (r268004) +++ head/sys/ofed/drivers/infiniband/ulp/sdp/sdp_main.c Sat Jun 28 17:36:18 2014 (r268005) @@ -69,6 +69,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include uma_zone_t sdp_zone; struct rwlock sdp_lock; Modified: head/sys/ofed/drivers/net/mlx4/en_netdev.c ============================================================================== --- head/sys/ofed/drivers/net/mlx4/en_netdev.c Sat Jun 28 15:53:28 2014 (r268004) +++ head/sys/ofed/drivers/net/mlx4/en_netdev.c Sat Jun 28 17:36:18 2014 (r268005) @@ -42,6 +42,7 @@ #include #include #include +#include static void mlx4_en_init_locked(struct mlx4_en_priv *priv); static void mlx4_en_sysctl_stat(struct mlx4_en_priv *priv); Modified: head/sys/ofed/include/linux/linux_compat.c ============================================================================== --- head/sys/ofed/include/linux/linux_compat.c Sat Jun 28 15:53:28 2014 (r268004) +++ head/sys/ofed/include/linux/linux_compat.c Sat Jun 28 17:36:18 2014 (r268005) @@ -678,7 +678,7 @@ linux_compat_init(void) struct sysctl_oid *rootoid; int i; - rootoid = SYSCTL_ADD_NODE(NULL, SYSCTL_STATIC_CHILDREN(), + rootoid = SYSCTL_ADD_ROOT_NODE(NULL, OID_AUTO, "sys", CTLFLAG_RD|CTLFLAG_MPSAFE, NULL, "sys"); kobject_init(&class_root, &class_ktype); kobject_set_name(&class_root, "class"); Modified: head/sys/pc98/pc98/canbus.c ============================================================================== --- head/sys/pc98/pc98/canbus.c Sat Jun 28 15:53:28 2014 (r268004) +++ head/sys/pc98/pc98/canbus.c Sat Jun 28 17:36:18 2014 (r268005) @@ -188,9 +188,8 @@ canbus_attach(device_t dev) /* Dynamic sysctl tree setup */ sysctl_ctx_init(&sc->canbus_sysctl_ctx); - canbus_sysctl_tree = SYSCTL_ADD_NODE(&sc->canbus_sysctl_ctx, - SYSCTL_STATIC_CHILDREN(/* tree top */), OID_AUTO, - "canbus", CTLFLAG_RD, 0, "CanBe I/O Bus"); + canbus_sysctl_tree = SYSCTL_ADD_ROOT_NODE(&sc->canbus_sysctl_ctx, + OID_AUTO, "canbus", CTLFLAG_RD, 0, "CanBe I/O Bus"); SYSCTL_ADD_INT(&sc->canbus_sysctl_ctx, SYSCTL_CHILDREN(canbus_sysctl_tree), OID_AUTO, "io_delay_time", CTLFLAG_RW, &sc->io_delay_time, 0, "CanBe Bus I/O delay time"); Modified: head/sys/sys/sysctl.h ============================================================================== --- head/sys/sys/sysctl.h Sat Jun 28 15:53:28 2014 (r268004) +++ head/sys/sys/sysctl.h Sat Jun 28 17:36:18 2014 (r268005) @@ -325,6 +325,10 @@ SYSCTL_ALLOWED_TYPES(UINT64, uint64_t *a sysctl_add_oid(ctx, parent, nbr, name, CTLTYPE_NODE|(access), \ NULL, 0, handler, "N", __DESCR(descr)) +#define SYSCTL_ADD_ROOT_NODE(ctx, nbr, name, access, handler, descr) \ + sysctl_add_oid(ctx, &sysctl__children, nbr, name, \ + CTLTYPE_NODE|(access), NULL, 0, handler, "N", __DESCR(descr)) + /* Oid for a string. len can be 0 to indicate '\0' termination. */ #define SYSCTL_STRING(parent, nbr, name, access, arg, len, descr) \ SYSCTL_OID(parent, nbr, name, CTLTYPE_STRING|(access), \