Date: Sat, 28 Jun 2014 17:36:19 +0000 (UTC) From: Hans Petter Selasky <hselasky@FreeBSD.org> 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 Message-ID: <201406281736.s5SHaJY8078852@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
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 <net/if.h> #include <net/route.h> #include <net/vnet.h> +#include <sys/sysctl.h> 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 <net/ethernet.h> #include <net/if_vlan_var.h> #include <sys/sockio.h> +#include <sys/sysctl.h> 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), \
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201406281736.s5SHaJY8078852>