From owner-svn-src-all@freebsd.org Sun Oct 25 23:27:09 2015 Return-Path: Delivered-To: svn-src-all@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 A74FAA18148; Sun, 25 Oct 2015 23:27:09 +0000 (UTC) (envelope-from zbb@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::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 7232E1A74; Sun, 25 Oct 2015 23:27:09 +0000 (UTC) (envelope-from zbb@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t9PNR87E032563; Sun, 25 Oct 2015 23:27:08 GMT (envelope-from zbb@FreeBSD.org) Received: (from zbb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t9PNR8oC032562; Sun, 25 Oct 2015 23:27:08 GMT (envelope-from zbb@FreeBSD.org) Message-Id: <201510252327.t9PNR8oC032562@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: zbb set sender to zbb@FreeBSD.org using -f From: Zbigniew Bodek Date: Sun, 25 Oct 2015 23:27:08 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r289967 - 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-all@freebsd.org X-Mailman-Version: 2.1.20 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: Sun, 25 Oct 2015 23:27:09 -0000 Author: zbb Date: Sun Oct 25 23:27:08 2015 New Revision: 289967 URL: https://svnweb.freebsd.org/changeset/base/289967 Log: Fix bus numbering in ThunderX ITS quirk Internal busses (thus ECAM access) should be mapped to all values from 0 to 143. Obtained from: Semihalf Sponsored by: The FreeBSD Foundation Differential revision: https://reviews.freebsd.org/D3753 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 Sun Oct 25 23:22:40 2015 (r289966) +++ head/sys/arm64/arm64/gic_v3_its.c Sun Oct 25 23:27:08 2015 (r289967) @@ -59,6 +59,8 @@ __FBSDID("$FreeBSD$"); #include "gic_v3_reg.h" #include "gic_v3_var.h" +#define GIC_V3_ITS_QUIRK_THUNDERX_PEM_BUS_OFFSET 144 + #include "pic_if.h" /* Device and PIC methods */ @@ -1475,8 +1477,8 @@ its_get_devid_thunder(device_t pci_dev) bsf = PCI_RID(pci_get_bus(pci_dev), pci_get_slot(pci_dev), pci_get_function(pci_dev)); - /* ECAM is on bus=0 */ - if (bus == 0) { + /* Check if accessing internal PCIe (low bus numbers) */ + if (bus < GIC_V3_ITS_QUIRK_THUNDERX_PEM_BUS_OFFSET) { return ((pci_get_domain(pci_dev) << PCI_RID_DOMAIN_SHIFT) | bsf); /* PEM otherwise */