From owner-svn-src-all@FreeBSD.ORG Sat Jun 22 05:25:13 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by hub.freebsd.org (Postfix) with ESMTP id 637CC6CA; Sat, 22 Jun 2013 05:25:13 +0000 (UTC) (envelope-from markj@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id 3B7341CC8; Sat, 22 Jun 2013 05:25:13 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r5M5PDk0088246; Sat, 22 Jun 2013 05:25:13 GMT (envelope-from markj@svn.freebsd.org) Received: (from markj@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r5M5PDDG088245; Sat, 22 Jun 2013 05:25:13 GMT (envelope-from markj@svn.freebsd.org) Message-Id: <201306220525.r5M5PDDG088245@svn.freebsd.org> From: Mark Johnston Date: Sat, 22 Jun 2013 05:25:13 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org Subject: svn commit: r252092 - stable/8/sys/dev/coretemp X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 22 Jun 2013 05:25:13 -0000 Author: markj Date: Sat Jun 22 05:25:12 2013 New Revision: 252092 URL: http://svnweb.freebsd.org/changeset/base/252092 Log: MFC r246951: Mark the coretemp(4) sysctls as MPSAFE, ensuring that Giant won't be held unnecessarily by a user thread waiting to run on a specific CPU after calling sched_bind(). Modified: stable/8/sys/dev/coretemp/coretemp.c Directory Properties: stable/8/sys/ (props changed) stable/8/sys/dev/ (props changed) stable/8/sys/dev/coretemp/ (props changed) Modified: stable/8/sys/dev/coretemp/coretemp.c ============================================================================== --- stable/8/sys/dev/coretemp/coretemp.c Sat Jun 22 05:24:29 2013 (r252091) +++ stable/8/sys/dev/coretemp/coretemp.c Sat Jun 22 05:25:12 2013 (r252092) @@ -274,23 +274,23 @@ coretemp_attach(device_t dev) * Add the MIBs to dev.cpu.N and dev.cpu.N.coretemp. */ SYSCTL_ADD_PROC(ctx, SYSCTL_CHILDREN(device_get_sysctl_tree(pdev)), - OID_AUTO, "temperature", CTLTYPE_INT | CTLFLAG_RD, dev, - CORETEMP_TEMP, coretemp_get_val_sysctl, "IK", + OID_AUTO, "temperature", CTLTYPE_INT | CTLFLAG_RD | CTLFLAG_MPSAFE, + dev, CORETEMP_TEMP, coretemp_get_val_sysctl, "IK", "Current temperature"); SYSCTL_ADD_PROC(ctx, SYSCTL_CHILDREN(oid), OID_AUTO, "delta", - CTLTYPE_INT | CTLFLAG_RD, dev, CORETEMP_DELTA, + CTLTYPE_INT | CTLFLAG_RD | CTLFLAG_MPSAFE, dev, CORETEMP_DELTA, coretemp_get_val_sysctl, "I", "Delta between TCC activation and current temperature"); SYSCTL_ADD_PROC(ctx, SYSCTL_CHILDREN(oid), OID_AUTO, "resolution", - CTLTYPE_INT | CTLFLAG_RD, dev, CORETEMP_RESOLUTION, + CTLTYPE_INT | CTLFLAG_RD | CTLFLAG_MPSAFE, dev, CORETEMP_RESOLUTION, coretemp_get_val_sysctl, "I", "Resolution of CPU thermal sensor"); SYSCTL_ADD_PROC(ctx, SYSCTL_CHILDREN(oid), OID_AUTO, "tjmax", - CTLTYPE_INT | CTLFLAG_RD, dev, CORETEMP_TJMAX, + CTLTYPE_INT | CTLFLAG_RD | CTLFLAG_MPSAFE, dev, CORETEMP_TJMAX, coretemp_get_val_sysctl, "IK", "TCC activation temperature"); SYSCTL_ADD_PROC(ctx, SYSCTL_CHILDREN(oid), OID_AUTO, - "throttle_log", CTLTYPE_INT | CTLFLAG_RW, dev, 0, + "throttle_log", CTLTYPE_INT | CTLFLAG_RW | CTLFLAG_MPSAFE, dev, 0, coretemp_throttle_log_sysctl, "I", "Set to 1 if the thermal sensor has tripped");