From owner-svn-src-head@freebsd.org Tue Jul 21 17:14:25 2015 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 63E0C9A722F; Tue, 21 Jul 2015 17:14:25 +0000 (UTC) (envelope-from zbb@FreeBSD.org) Received: from repo.freebsd.org (repo.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 53E5E1B21; Tue, 21 Jul 2015 17:14:25 +0000 (UTC) (envelope-from zbb@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.70]) by repo.freebsd.org (8.14.9/8.14.9) with ESMTP id t6LHEPWL058748; Tue, 21 Jul 2015 17:14:25 GMT (envelope-from zbb@FreeBSD.org) Received: (from zbb@localhost) by repo.freebsd.org (8.14.9/8.14.9/Submit) id t6LHEP04058747; Tue, 21 Jul 2015 17:14:25 GMT (envelope-from zbb@FreeBSD.org) Message-Id: <201507211714.t6LHEP04058747@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: zbb set sender to zbb@FreeBSD.org using -f From: Zbigniew Bodek Date: Tue, 21 Jul 2015 17:14:25 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r285758 - head/sys/arm64/arm64 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.20 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, 21 Jul 2015 17:14:25 -0000 Author: zbb Date: Tue Jul 21 17:14:24 2015 New Revision: 285758 URL: https://svnweb.freebsd.org/changeset/base/285758 Log: Add some more explanation to r285752 Add brief commentary to vendor-specific devid function in ITS and remove redundant spaces by the way. Obtained from: Semihalf Sponsored by: The FreeBSD Foundation Modified: head/sys/arm64/arm64/gic_v3_its.c Modified: head/sys/arm64/arm64/gic_v3_its.c ============================================================================== --- head/sys/arm64/arm64/gic_v3_its.c Tue Jul 21 16:53:45 2015 (r285757) +++ head/sys/arm64/arm64/gic_v3_its.c Tue Jul 21 17:14:24 2015 (r285758) @@ -1423,20 +1423,24 @@ its_get_devid_thunder(device_t pci_dev) bsf); /* PEM otherwise */ } else { - /* PEM number is equal to domain */ + /* PEM (PCIe MAC/root complex) number is equal to domain */ pem = pci_get_domain(pci_dev); - /* Hardcode appropriate PEM numbers */ - if (pem < 3 ) + /* + * Set appropriate device ID (passed by the HW along with + * the transaction to memory) for different root complex + * numbers using hard-coded domain portion for each group. + */ + if (pem < 3) return ((0x1 << PCI_RID_DOMAIN_SHIFT) | bsf); - if (pem < 6 ) + if (pem < 6) return ((0x3 << PCI_RID_DOMAIN_SHIFT) | bsf); - if (pem < 9 ) + if (pem < 9) return ((0x9 << PCI_RID_DOMAIN_SHIFT) | bsf); - if (pem < 12 ) + if (pem < 12) return ((0xB << PCI_RID_DOMAIN_SHIFT) | bsf); }