Date: Tue, 10 Jul 2018 09:49:28 +0000 (UTC) From: Wojciech Macek <wma@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r336166 - head/sys/dev/pci Message-ID: <201807100949.w6A9nShj054146@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201807100949.w6A9nShj054146>