From owner-svn-src-head@freebsd.org Tue Jul 10 09:49:28 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id CB3291039A1B; Tue, 10 Jul 2018 09:49:28 +0000 (UTC) (envelope-from wma@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 7D47B8D109; Tue, 10 Jul 2018 09:49:28 +0000 (UTC) (envelope-from wma@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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4055222530; Tue, 10 Jul 2018 09:49:28 +0000 (UTC) (envelope-from wma@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w6A9nSeh054147; Tue, 10 Jul 2018 09:49:28 GMT (envelope-from wma@FreeBSD.org) Received: (from wma@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w6A9nShj054146; Tue, 10 Jul 2018 09:49:28 GMT (envelope-from wma@FreeBSD.org) Message-Id: <201807100949.w6A9nShj054146@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: wma set sender to wma@FreeBSD.org using -f From: Wojciech Macek Date: Tue, 10 Jul 2018 09:49:28 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r336166 - head/sys/dev/pci X-SVN-Group: head X-SVN-Commit-Author: wma X-SVN-Commit-Paths: head/sys/dev/pci X-SVN-Commit-Revision: 336166 X-SVN-Commit-Repository: base 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.27 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, 10 Jul 2018 09:49:29 -0000 Author: wma Date: Tue Jul 10 09:49:27 2018 New Revision: 336166 URL: https://svnweb.freebsd.org/changeset/base/336166 Log: Fix build broken by r336130 Add ifdef's to compile parts of pci_host_generic only on armv8 Modified: head/sys/dev/pci/pci_host_generic.c Modified: head/sys/dev/pci/pci_host_generic.c ============================================================================== --- head/sys/dev/pci/pci_host_generic.c Tue Jul 10 08:05:32 2018 (r336165) +++ head/sys/dev/pci/pci_host_generic.c Tue Jul 10 09:49:27 2018 (r336166) @@ -99,6 +99,8 @@ static int generic_pcie_read_ivar(device_t dev, device uintptr_t *result); static int generic_pcie_write_ivar(device_t dev, device_t child, int index, uintptr_t value); + +#if defined(__aarch64__) static void pci_host_generic_apply_quirks(device_t); static void thunderx2_ahci_bar_quirk(device_t); @@ -114,6 +116,7 @@ struct pci_host_generic_block_entry pci_host_generic_b {CPU_IMPL_CAVIUM, CPU_PART_THUNDERX2, 0, 0, 0x80, 0x10}, {0, 0, 0, 0, 0, 0} }; +#endif int pci_host_generic_core_attach(device_t dev) @@ -168,11 +171,14 @@ pci_host_generic_core_attach(device_t dev) return (error); } +#if defined(__aarch64__) pci_host_generic_apply_quirks(dev); +#endif return (0); } +#if defined(__aarch64__) static void pci_host_generic_apply_quirks(device_t dev) { @@ -191,6 +197,7 @@ pci_host_generic_apply_quirks(device_t dev) quirk++; } } +#endif static uint32_t generic_pcie_read_config(device_t dev, u_int bus, u_int slot, @@ -201,12 +208,15 @@ generic_pcie_read_config(device_t dev, u_int bus, u_in bus_space_tag_t t; uint64_t offset; uint32_t data; +#if defined(__aarch64__) struct pci_host_generic_block_entry *block; +#endif if ((bus > PCI_BUSMAX) || (slot > PCI_SLOTMAX) || (func > PCI_FUNCMAX) || (reg > PCIE_REGMAX)) return (~0U); +#if defined(__aarch64__) block = pci_host_generic_blocked; while (1) { if (block->impl == 0) @@ -219,6 +229,7 @@ generic_pcie_read_config(device_t dev, u_int bus, u_in block++; } +#endif sc = device_get_softc(dev); @@ -462,6 +473,7 @@ static device_method_t generic_pcie_methods[] = { DEFINE_CLASS_0(pcib, generic_pcie_core_driver, generic_pcie_methods, sizeof(struct generic_pcie_core_softc)); +#if defined(__aarch64__) static void thunderx2_ahci_bar_quirk(device_t dev) { @@ -478,3 +490,4 @@ static void thunderx2_ahci_bar_quirk(device_t dev) PCIB_WRITE_CONFIG(dev, 0, 16, 1, 0x1c, 0x40, 4); } } +#endif