From owner-svn-src-head@FreeBSD.ORG Mon May 18 21:47:32 2009 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 961821065692; Mon, 18 May 2009 21:47:32 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 6A9798FC1F; Mon, 18 May 2009 21:47:32 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n4ILlWhK075739; Mon, 18 May 2009 21:47:32 GMT (envelope-from jhb@svn.freebsd.org) Received: (from jhb@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n4ILlWxS075737; Mon, 18 May 2009 21:47:32 GMT (envelope-from jhb@svn.freebsd.org) Message-Id: <200905182147.n4ILlWxS075737@svn.freebsd.org> From: John Baldwin Date: Mon, 18 May 2009 21:47:32 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r192342 - in head/sys: amd64/pci i386/pci X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 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: Mon, 18 May 2009 21:47:33 -0000 Author: jhb Date: Mon May 18 21:47:32 2009 New Revision: 192342 URL: http://svn.freebsd.org/changeset/base/192342 Log: Add a read-only sysctl hw.pci.mcfg to mirror the tunable by the same name. MFC after: 1 week Modified: head/sys/amd64/pci/pci_cfgreg.c head/sys/i386/pci/pci_cfgreg.c Modified: head/sys/amd64/pci/pci_cfgreg.c ============================================================================== --- head/sys/amd64/pci/pci_cfgreg.c Mon May 18 21:46:46 2009 (r192341) +++ head/sys/amd64/pci/pci_cfgreg.c Mon May 18 21:47:32 2009 (r192342) @@ -35,6 +35,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include #include @@ -56,6 +57,8 @@ static void pciereg_cfgwrite(int bus, un static int pcireg_cfgread(int bus, int slot, int func, int reg, int bytes); static void pcireg_cfgwrite(int bus, int slot, int func, int reg, int data, int bytes); +SYSCTL_DECL(_hw_pci); + static int cfgmech; static vm_offset_t pcie_base; static int pcie_minbus, pcie_maxbus; @@ -63,6 +66,8 @@ static uint32_t pcie_badslots; static struct mtx pcicfg_mtx; static int mcfg_enable = 1; TUNABLE_INT("hw.pci.mcfg", &mcfg_enable); +SYSCTL_INT(_hw_pci, OID_AUTO, mcfg, CTLFLAG_RDTUN, &mcfg_enable, 0, + "Enable support for PCI-e memory mapped config access"); /* * Initialise access to PCI configuration space Modified: head/sys/i386/pci/pci_cfgreg.c ============================================================================== --- head/sys/i386/pci/pci_cfgreg.c Mon May 18 21:46:46 2009 (r192341) +++ head/sys/i386/pci/pci_cfgreg.c Mon May 18 21:47:32 2009 (r192342) @@ -40,6 +40,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include #include @@ -75,6 +76,8 @@ enum { CFGMECH_PCIE, }; +SYSCTL_DECL(_hw_pci); + static TAILQ_HEAD(pcie_cfg_list, pcie_cfg_elem) pcie_list[MAXCPU]; static uint64_t pcie_base; static int pcie_minbus, pcie_maxbus; @@ -84,6 +87,8 @@ static int devmax; static struct mtx pcicfg_mtx; static int mcfg_enable = 1; TUNABLE_INT("hw.pci.mcfg", &mcfg_enable); +SYSCTL_INT(_hw_pci, OID_AUTO, mcfg, CTLFLAG_RDTUN, &mcfg_enable, 0, + "Enable support for PCI-e memory mapped config access"); static uint32_t pci_docfgregread(int bus, int slot, int func, int reg, int bytes);