Module Name: src Committed By: skrll Date: Sun Aug 7 10:45:20 UTC 2016
Modified Files: src/sys/arch/evbmips/malta/dev: mainbus.c Log Message: Fix compile for PCI_NETBSD_CONFIGURE To generate a diff of this commit: cvs rdiff -u -r1.12 -r1.13 src/sys/arch/evbmips/malta/dev/mainbus.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
Modified files: Index: src/sys/arch/evbmips/malta/dev/mainbus.c diff -u src/sys/arch/evbmips/malta/dev/mainbus.c:1.12 src/sys/arch/evbmips/malta/dev/mainbus.c:1.13 --- src/sys/arch/evbmips/malta/dev/mainbus.c:1.12 Mon Jun 6 17:13:05 2011 +++ src/sys/arch/evbmips/malta/dev/mainbus.c Sun Aug 7 10:45:19 2016 @@ -1,4 +1,4 @@ -/* $NetBSD: mainbus.c,v 1.12 2011/06/06 17:13:05 matt Exp $ */ +/* $NetBSD: mainbus.c,v 1.13 2016/08/07 10:45:19 skrll Exp $ */ /* * Copyright 2002 Wasabi Systems, Inc. @@ -36,7 +36,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: mainbus.c,v 1.12 2011/06/06 17:13:05 matt Exp $"); +__KERNEL_RCSID(0, "$NetBSD: mainbus.c,v 1.13 2016/08/07 10:45:19 skrll Exp $"); #include "opt_pci.h" @@ -108,12 +108,11 @@ mainbus_attach(device_t parent, device_t { struct mainbus_attach_args ma; const struct mainbusdev *md; -#if defined(PCI_NETBSD_CONFIGURE) - struct extent *ioext, *memext; -#endif -#if defined(PCI_NETBSD_ENABLE_IDE) +#if defined(PCI_NETBSD_ENABLE_IDE) || defined(PCI_NETBSD_CONFIGURE) struct malta_config *mcp = &malta_configuration; pci_chipset_tag_t pc = &mcp->mc_pc; +#endif +#if defined(PCI_NETBSD_ENABLE_IDE) pcitag_t idetag; pcireg_t idetim; #endif @@ -122,13 +121,15 @@ mainbus_attach(device_t parent, device_t printf("\n"); #if defined(PCI_NETBSD_CONFIGURE) - ioext = extent_create("pciio", 0x00001000, 0x0000efff, - M_DEVBUF, NULL, 0, EX_NOWAIT); - memext = extent_create("pcimem", MALTA_PCIMEM1_BASE, + struct mips_cache_info * const mci = &mips_cache_info; + + struct extent *ioext = extent_create("pciio", 0x00001000, 0x0000efff, + NULL, 0, EX_NOWAIT); + struct extent *memext = extent_create("pcimem", MALTA_PCIMEM1_BASE, MALTA_PCIMEM1_BASE + MALTA_PCIMEM1_SIZE, - M_DEVBUF, NULL, 0, EX_NOWAIT); + NULL, 0, EX_NOWAIT); - pci_configure_bus(pc, ioext, memext, NULL, 0, mips_dcache_align); + pci_configure_bus(pc, ioext, memext, NULL, 0, mci->mci_dcache_align); extent_destroy(ioext); extent_destroy(memext); #endif /* PCI_NETBSD_CONFIGURE */