1*97a077a0SMatthew Dillon /* 2*97a077a0SMatthew Dillon * Copyright (c) 2016 The DragonFly Project. All rights reserved. 3*97a077a0SMatthew Dillon * 4*97a077a0SMatthew Dillon * This code is derived from software contributed to The DragonFly Project 5*97a077a0SMatthew Dillon * by Matthew Dillon <dillon@backplane.com> 6*97a077a0SMatthew Dillon * 7*97a077a0SMatthew Dillon * Redistribution and use in source and binary forms, with or without 8*97a077a0SMatthew Dillon * modification, are permitted provided that the following conditions 9*97a077a0SMatthew Dillon * are met: 10*97a077a0SMatthew Dillon * 11*97a077a0SMatthew Dillon * 1. Redistributions of source code must retain the above copyright 12*97a077a0SMatthew Dillon * notice, this list of conditions and the following disclaimer. 13*97a077a0SMatthew Dillon * 2. Redistributions in binary form must reproduce the above copyright 14*97a077a0SMatthew Dillon * notice, this list of conditions and the following disclaimer in 15*97a077a0SMatthew Dillon * the documentation and/or other materials provided with the 16*97a077a0SMatthew Dillon * distribution. 17*97a077a0SMatthew Dillon * 3. Neither the name of The DragonFly Project nor the names of its 18*97a077a0SMatthew Dillon * contributors may be used to endorse or promote products derived 19*97a077a0SMatthew Dillon * from this software without specific, prior written permission. 20*97a077a0SMatthew Dillon * 21*97a077a0SMatthew Dillon * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 22*97a077a0SMatthew Dillon * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 23*97a077a0SMatthew Dillon * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS 24*97a077a0SMatthew Dillon * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE 25*97a077a0SMatthew Dillon * COPYRIGHT HOLDERS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, 26*97a077a0SMatthew Dillon * INCIDENTAL, SPECIAL, EXEMPLARY OR CONSEQUENTIAL DAMAGES (INCLUDING, 27*97a077a0SMatthew Dillon * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 28*97a077a0SMatthew Dillon * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED 29*97a077a0SMatthew Dillon * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, 30*97a077a0SMatthew Dillon * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT 31*97a077a0SMatthew Dillon * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 32*97a077a0SMatthew Dillon * SUCH DAMAGE. 33*97a077a0SMatthew Dillon */ 34*97a077a0SMatthew Dillon 35*97a077a0SMatthew Dillon #include <sys/param.h> 36*97a077a0SMatthew Dillon #include <sys/systm.h> 37*97a077a0SMatthew Dillon #include <sys/malloc.h> 38*97a077a0SMatthew Dillon #include <sys/kernel.h> 39*97a077a0SMatthew Dillon #include <sys/conf.h> 40*97a077a0SMatthew Dillon #include <sys/bus.h> 41*97a077a0SMatthew Dillon #include <sys/device.h> 42*97a077a0SMatthew Dillon #include <sys/disk.h> 43*97a077a0SMatthew Dillon #include <sys/devicestat.h> 44*97a077a0SMatthew Dillon #include <sys/stat.h> 45*97a077a0SMatthew Dillon #include <sys/buf.h> 46*97a077a0SMatthew Dillon #include <sys/proc.h> 47*97a077a0SMatthew Dillon #include <sys/queue.h> 48*97a077a0SMatthew Dillon #include <sys/rman.h> 49*97a077a0SMatthew Dillon #include <sys/endian.h> 50*97a077a0SMatthew Dillon #include <sys/sysctl.h> 51*97a077a0SMatthew Dillon #include <sys/kthread.h> 52*97a077a0SMatthew Dillon 53*97a077a0SMatthew Dillon #include <sys/buf2.h> 54*97a077a0SMatthew Dillon 55*97a077a0SMatthew Dillon #include <machine/clock.h> 56*97a077a0SMatthew Dillon #include <machine/pmap.h> 57*97a077a0SMatthew Dillon 58*97a077a0SMatthew Dillon #include <vm/vm.h> 59*97a077a0SMatthew Dillon 60*97a077a0SMatthew Dillon #include <bus/pci/pcireg.h> 61*97a077a0SMatthew Dillon #include <bus/pci/pcivar.h> 62*97a077a0SMatthew Dillon #include "pcidevs.h" 63*97a077a0SMatthew Dillon 64*97a077a0SMatthew Dillon #include <sys/mplock2.h> 65