From owner-svn-src-head@FreeBSD.ORG Tue Jul 23 03:03:18 2013 Return-Path: Delivered-To: svn-src-head@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 4182DEC0; Tue, 23 Jul 2013 03:03:18 +0000 (UTC) (envelope-from marcel@FreeBSD.org) 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)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 32FE52237; Tue, 23 Jul 2013 03:03:18 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r6N33IJi030661; Tue, 23 Jul 2013 03:03:18 GMT (envelope-from marcel@svn.freebsd.org) Received: (from marcel@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r6N33Hi1030660; Tue, 23 Jul 2013 03:03:17 GMT (envelope-from marcel@svn.freebsd.org) Message-Id: <201307230303.r6N33Hi1030660@svn.freebsd.org> From: Marcel Moolenaar Date: Tue, 23 Jul 2013 03:03:17 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r253560 - head/sys/ia64/pci 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.14 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: Tue, 23 Jul 2013 03:03:18 -0000 Author: marcel Date: Tue Jul 23 03:03:17 2013 New Revision: 253560 URL: http://svnweb.freebsd.org/changeset/base/253560 Log: In pci_cfgregread() and pci_cfgregwrite(), multiplex the domain and bus number into the bus argument. The bus number occupies the least significant 8 bits. The PCI domain occupies the most significant 24 bits. On the Altix 350, the PCI domain is a required parameter, but changing the prototype of the pci_cfgreg*() functions to include a separate domain argument has wide-spread consequences across the supported architectures. We'd be changing a known interface. Multiplexing is an acceptable kluge to give us what we need with manageable impact. Note that the PCI bus number fits in 8 bits, so the multiplexing of the domain is a backward compatible change. Modified: head/sys/ia64/pci/pci_cfgreg.c Modified: head/sys/ia64/pci/pci_cfgreg.c ============================================================================== --- head/sys/ia64/pci/pci_cfgreg.c Tue Jul 23 02:38:23 2013 (r253559) +++ head/sys/ia64/pci/pci_cfgreg.c Tue Jul 23 03:03:17 2013 (r253560) @@ -70,7 +70,7 @@ pci_cfgregread(int bus, int slot, int fu register_t is; u_long addr; - addr = pci_sal_address(0, bus, slot, func, reg); + addr = pci_sal_address(bus >> 8, bus & 0xff, slot, func, reg); if (addr == ~0ul) return (~0); @@ -91,7 +91,7 @@ pci_cfgregwrite(int bus, int slot, int f register_t is; u_long addr; - addr = pci_sal_address(0, bus, slot, func, reg); + addr = pci_sal_address(bus >> 8, bus & 0xff, slot, func, reg); if (addr == ~0ul) return;