From owner-svn-src-head@FreeBSD.ORG Fri Oct 24 21:08:37 2014 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 42349CBB; Fri, 24 Oct 2014 21:08:37 +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 2EBDDD7C; Fri, 24 Oct 2014 21:08:37 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s9OL8bes047526; Fri, 24 Oct 2014 21:08:37 GMT (envelope-from rpaulo@FreeBSD.org) Received: (from rpaulo@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s9OL8bgt047525; Fri, 24 Oct 2014 21:08:37 GMT (envelope-from rpaulo@FreeBSD.org) Message-Id: <201410242108.s9OL8bgt047525@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: rpaulo set sender to rpaulo@FreeBSD.org using -f From: Rui Paulo Date: Fri, 24 Oct 2014 21:08:37 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r273607 - head/sys/dev/acpica 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-1 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: Fri, 24 Oct 2014 21:08:37 -0000 Author: rpaulo Date: Fri Oct 24 21:08:36 2014 New Revision: 273607 URL: https://svnweb.freebsd.org/changeset/base/273607 Log: Add a sysctl to control the HPET allow_write behaviour. Requested by: kib Modified: head/sys/dev/acpica/acpi_hpet.c Modified: head/sys/dev/acpica/acpi_hpet.c ============================================================================== --- head/sys/dev/acpica/acpi_hpet.c Fri Oct 24 21:08:02 2014 (r273606) +++ head/sys/dev/acpica/acpi_hpet.c Fri Oct 24 21:08:36 2014 (r273607) @@ -760,6 +760,11 @@ hpet_attach(device_t dev) OID_AUTO, "mmap_allow", CTLFLAG_RW, &sc->mmap_allow, 0, "Allow userland to memory map HPET"); + SYSCTL_ADD_INT(device_get_sysctl_ctx(dev), + SYSCTL_CHILDREN(device_get_sysctl_tree(dev)), + OID_AUTO, "mmap_allow_write", + CTLFLAG_RW, &sc->mmap_allow_write, 0, + "Allow userland write to the HPET register space"); } else device_printf(dev, "could not create /dev/hpet%d\n", device_get_unit(dev));