Date: Mon, 11 Sep 2006 20:12:17 GMT From: Warner Losh <imp@FreeBSD.org> To: Perforce Change Reviews <perforce@freebsd.org> Subject: PERFORCE change 105986 for review Message-ID: <200609112012.k8BKCHba092428@repoman.freebsd.org>
next in thread | raw e-mail | index | archive | help
http://perforce.freebsd.org/chv.cgi?CH=105986 Change 105986 by imp@imp_paco-paco on 2006/09/11 20:12:01 IFC @105684 Affected files ... .. //depot/projects/arm/src/gnu/usr.bin/binutils/as/Makefile#3 integrate .. //depot/projects/arm/src/sys/amd64/amd64/nexus.c#4 integrate .. //depot/projects/arm/src/sys/cam/cam_xpt.c#8 integrate .. //depot/projects/arm/src/sys/dev/acpica/acpi.c#13 integrate .. //depot/projects/arm/src/sys/dev/ata/ata-all.c#12 integrate .. //depot/projects/arm/src/sys/dev/ata/ata-chipset.c#27 integrate .. //depot/projects/arm/src/sys/dev/ata/ata-pci.h#16 integrate .. //depot/projects/arm/src/sys/dev/ata/ata-usb.c#4 integrate .. //depot/projects/arm/src/sys/i386/i386/nexus.c#4 integrate .. //depot/projects/arm/src/sys/kern/bus_if.m#6 integrate .. //depot/projects/arm/src/sys/kern/subr_bus.c#18 integrate .. //depot/projects/arm/src/sys/kern/subr_rman.c#10 integrate .. //depot/projects/arm/src/sys/netinet/ip_output.c#15 integrate .. //depot/projects/arm/src/sys/sys/bus.h#9 integrate Differences ... ==== //depot/projects/arm/src/gnu/usr.bin/binutils/as/Makefile#3 (text+ko) ==== @@ -1,4 +1,4 @@ -# $FreeBSD: src/gnu/usr.bin/binutils/as/Makefile,v 1.16 2004/12/21 09:59:40 ru Exp $ +# $FreeBSD: src/gnu/usr.bin/binutils/as/Makefile,v 1.17 2006/09/11 18:07:09 obrien Exp $ # BINDIR @@ -35,11 +35,9 @@ .else CFLAGS+= -DDEFAULT_ARCH=\"${BINUTILS_ARCH}\" .endif - -.if ${TARGET_ARCH} == "arm" && defined(ARM_BIG_ENDIAN) +.if defined(TARGET_BIG_ENDIAN) CFLAGS+= -DTARGET_BYTES_BIG_ENDIAN=1 .endif - CFLAGS+= -DTARGET_CPU=\"${BINUTILS_ARCH}\" CFLAGS+= -DTARGET_CANONICAL=\"${TARGET_TUPLE}\" CFLAGS+= -DTARGET_ALIAS=\"${TARGET_TUPLE}\" ==== //depot/projects/arm/src/sys/amd64/amd64/nexus.c#4 (text+ko) ==== @@ -28,7 +28,7 @@ */ #include <sys/cdefs.h> -__FBSDID("$FreeBSD: src/sys/amd64/amd64/nexus.c,v 1.68 2006/04/20 04:16:34 imp Exp $"); +__FBSDID("$FreeBSD: src/sys/amd64/amd64/nexus.c,v 1.69 2006/09/11 19:31:51 jhb Exp $"); /* * This code implements a `root nexus' for Intel Architecture @@ -140,7 +140,7 @@ static int nexus_probe(device_t dev) { - int irq, last; + int irq; device_quiet(dev); /* suppress attach message for neatness */ @@ -173,18 +173,10 @@ * We search for regions of existing IRQs and add those to the IRQ * resource manager. */ - last = -1; for (irq = 0; irq < NUM_IO_INTS; irq++) - if (intr_lookup_source(irq) != NULL) { - if (last == -1) - last = irq; - } else if (last != -1) { - if (rman_manage_region(&irq_rman, last, irq - 1) != 0) + if (intr_lookup_source(irq) != NULL) + if (rman_manage_region(&irq_rman, irq, irq) != 0) panic("nexus_probe irq_rman add"); - last = -1; - } - if (last != -1 && rman_manage_region(&irq_rman, last, irq - 1) != 0) - panic("nexus_probe irq_rman add"); /* * ISA DMA on PCI systems is implemented in the ISA part of each ==== //depot/projects/arm/src/sys/cam/cam_xpt.c#8 (text+ko) ==== @@ -28,7 +28,7 @@ */ #include <sys/cdefs.h> -__FBSDID("$FreeBSD: src/sys/cam/cam_xpt.c,v 1.162 2006/06/26 05:41:11 mjacob Exp $"); +__FBSDID("$FreeBSD: src/sys/cam/cam_xpt.c,v 1.164 2006/09/11 17:57:23 mjacob Exp $"); #include <sys/param.h> #include <sys/bus.h> @@ -387,9 +387,9 @@ /*quirks*/0, /*mintags*/0, /*maxtags*/0 }, { - /* Does not support other than LUN 0 */ + /* This does not support other than LUN 0 */ { T_DIRECT, SIP_MEDIA_FIXED, "VMware*", "*", "*" }, - CAM_QUIRK_NOLUNS, /*mintags*/0, /*maxtags*/0 + CAM_QUIRK_NOLUNS, /*mintags*/2, /*maxtags*/255 }, { /* ==== //depot/projects/arm/src/sys/dev/acpica/acpi.c#13 (text+ko) ==== @@ -28,7 +28,7 @@ */ #include <sys/cdefs.h> -__FBSDID("$FreeBSD: src/sys/dev/acpica/acpi.c,v 1.227 2006/07/29 21:46:16 njl Exp $"); +__FBSDID("$FreeBSD: src/sys/dev/acpica/acpi.c,v 1.228 2006/09/11 19:32:54 jhb Exp $"); #include "opt_acpi.h" #include <sys/param.h> @@ -417,13 +417,13 @@ acpi_rman_io.rm_type = RMAN_ARRAY; acpi_rman_io.rm_start = 0; acpi_rman_io.rm_end = 0xffff; - acpi_rman_io.rm_descr = "I/O ports"; + acpi_rman_io.rm_descr = "ACPI I/O ports"; if (rman_init(&acpi_rman_io) != 0) panic("acpi rman_init IO ports failed"); acpi_rman_mem.rm_type = RMAN_ARRAY; acpi_rman_mem.rm_start = 0; acpi_rman_mem.rm_end = ~0ul; - acpi_rman_mem.rm_descr = "I/O memory addresses"; + acpi_rman_mem.rm_descr = "ACPI I/O memory addresses"; if (rman_init(&acpi_rman_mem) != 0) panic("acpi rman_init memory failed"); ==== //depot/projects/arm/src/sys/dev/ata/ata-all.c#12 (text+ko) ==== @@ -25,7 +25,7 @@ */ #include <sys/cdefs.h> -__FBSDID("$FreeBSD: src/sys/dev/ata/ata-all.c,v 1.273 2006/05/12 05:04:40 jhb Exp $"); +__FBSDID("$FreeBSD: src/sys/dev/ata/ata-all.c,v 1.274 2006/09/11 18:33:59 sos Exp $"); #include "opt_ata.h" #include <sys/param.h> @@ -636,7 +636,9 @@ if (init) { sprintf(buffer, "%.40s/%.8s", atacap->model, atacap->revision); device_set_desc_copy(atadev->dev, buffer); - if (atadev->param.config & ATA_PROTO_ATAPI) { + if ((atadev->param.config & ATA_PROTO_ATAPI) && + (atadev->param.config != ATA_CFA_MAGIC1) && + (atadev->param.config != ATA_CFA_MAGIC2)) { if (atapi_dma && ch->dma && (atadev->param.config & ATA_DRQ_MASK) != ATA_DRQ_INTR && ata_umode(&atadev->param) >= ATA_UDMA2) ==== //depot/projects/arm/src/sys/dev/ata/ata-chipset.c#27 (text+ko) ==== @@ -25,7 +25,7 @@ */ #include <sys/cdefs.h> -__FBSDID("$FreeBSD: src/sys/dev/ata/ata-chipset.c,v 1.173 2006/09/02 12:55:42 sos Exp $"); +__FBSDID("$FreeBSD: src/sys/dev/ata/ata-chipset.c,v 1.174 2006/09/11 19:48:30 sos Exp $"); #include "opt_ata.h" #include <sys/param.h> @@ -3952,14 +3952,17 @@ struct ata_pci_controller *ctlr = device_get_softc(dev); struct ata_chip_id *idx; static struct ata_chip_id ids[] = - {{ ATA_ROSB4, 0x00, SWKS33, 0x00, ATA_UDMA2, "ROSB4" }, - { ATA_CSB5, 0x92, SWKS100, 0x00, ATA_UDMA5, "CSB5" }, - { ATA_CSB5, 0x00, SWKS66, 0x00, ATA_UDMA4, "CSB5" }, - { ATA_CSB6, 0x00, SWKS100, 0x00, ATA_UDMA5, "CSB6" }, - { ATA_CSB6_1, 0x00, SWKS66, 0x00, ATA_UDMA4, "CSB6" }, - { ATA_HT1000, 0x00, SWKS100, 0x00, ATA_UDMA5, "HT1000" }, - { ATA_HT1000_S1, 0x00, SWKS100, 0x00, ATA_SA150, "HT1000 SATA" }, - { ATA_HT1000_S2, 0x00, SWKSMIO, 0x00, ATA_SA150, "HT1000 SATA mmio" }, + {{ ATA_ROSB4, 0x00, SWKS33, 0, ATA_UDMA2, "ROSB4" }, + { ATA_CSB5, 0x92, SWKS100, 0, ATA_UDMA5, "CSB5" }, + { ATA_CSB5, 0x00, SWKS66, 0, ATA_UDMA4, "CSB5" }, + { ATA_CSB6, 0x00, SWKS100, 0, ATA_UDMA5, "CSB6" }, + { ATA_CSB6_1, 0x00, SWKS66, 0, ATA_UDMA4, "CSB6" }, + { ATA_HT1000, 0x00, SWKS100, 0, ATA_UDMA5, "HT1000" }, + { ATA_HT1000_S1, 0x00, SWKS100, 4, ATA_SA150, "HT1000" }, + { ATA_HT1000_S2, 0x00, SWKSMIO, 4, ATA_SA150, "HT1000" }, + { ATA_K2, 0x00, SWKSMIO, 4, ATA_SA150, "K2" }, + { ATA_FRODO4, 0x00, SWKSMIO, 4, ATA_SA150, "Frodo4" }, + { ATA_FRODO8, 0x00, SWKSMIO, 8, ATA_SA150, "Frodo8" }, { 0, 0, 0, 0, 0, 0}}; char buffer[64]; @@ -3989,7 +3992,7 @@ &ctlr->r_rid2, RF_ACTIVE))) return ENXIO; - ctlr->channels = 4; + ctlr->channels = ctlr->chip->cfg2; ctlr->allocate = ata_serverworks_allocate; ctlr->setmode = ata_sata_setmode; return 0; ==== //depot/projects/arm/src/sys/dev/ata/ata-pci.h#16 (text+ko) ==== @@ -23,7 +23,7 @@ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * - * $FreeBSD: src/sys/dev/ata/ata-pci.h,v 1.70 2006/09/02 12:55:42 sos Exp $ + * $FreeBSD: src/sys/dev/ata/ata-pci.h,v 1.71 2006/09/11 19:48:30 sos Exp $ */ /* structure holding chipset config info */ @@ -266,6 +266,9 @@ #define ATA_HT1000 0x02141166 #define ATA_HT1000_S1 0x024b1166 #define ATA_HT1000_S2 0x024a1166 +#define ATA_K2 0x02401166 +#define ATA_FRODO4 0x02411166 +#define ATA_FRODO8 0x02421166 #define ATA_SILICON_IMAGE_ID 0x1095 #define ATA_SII3114 0x31141095 ==== //depot/projects/arm/src/sys/dev/ata/ata-usb.c#4 (text) ==== @@ -25,7 +25,7 @@ */ #include <sys/cdefs.h> -__FBSDID("$FreeBSD: src/sys/dev/ata/ata-usb.c,v 1.4 2006/03/31 08:09:05 sos Exp $"); +__FBSDID("$FreeBSD: src/sys/dev/ata/ata-usb.c,v 1.5 2006/09/11 19:47:53 sos Exp $"); #include "opt_ata.h" #include <sys/param.h> @@ -85,7 +85,7 @@ /* USB-ATA 'controller' softc */ struct atausb_softc { - USBBASEDEVICE dev; /* base device */ + device_t dev; /* base device */ usbd_interface_handle iface; /* interface */ int ifaceno; /* interface number */ u_int8_t bulkin; /* endpoint address's */ @@ -349,7 +349,7 @@ } static int -atausb_detach(device_ptr_t dev) +atausb_detach(device_t dev) { struct atausb_softc *sc = device_get_softc(dev); usbd_device_handle udev; ==== //depot/projects/arm/src/sys/i386/i386/nexus.c#4 (text+ko) ==== @@ -28,7 +28,7 @@ */ #include <sys/cdefs.h> -__FBSDID("$FreeBSD: src/sys/i386/i386/nexus.c,v 1.63 2006/04/20 04:10:27 imp Exp $"); +__FBSDID("$FreeBSD: src/sys/i386/i386/nexus.c,v 1.64 2006/09/11 19:31:51 jhb Exp $"); /* * This code implements a `root nexus' for Intel Architecture @@ -144,7 +144,7 @@ static int nexus_probe(device_t dev) { - int irq, last; + int irq; device_quiet(dev); /* suppress attach message for neatness */ @@ -177,18 +177,10 @@ * We search for regions of existing IRQs and add those to the IRQ * resource manager. */ - last = -1; for (irq = 0; irq < NUM_IO_INTS; irq++) - if (intr_lookup_source(irq) != NULL) { - if (last == -1) - last = irq; - } else if (last != -1) { - if (rman_manage_region(&irq_rman, last, irq - 1) != 0) + if (intr_lookup_source(irq) != NULL) + if (rman_manage_region(&irq_rman, irq, irq) != 0) panic("nexus_probe irq_rman add"); - last = -1; - } - if (last != -1 && rman_manage_region(&irq_rman, last, irq - 1) != 0) - panic("nexus_probe irq_rman add"); /* * ISA DMA on PCI systems is implemented in the ISA part of each ==== //depot/projects/arm/src/sys/kern/bus_if.m#6 (text+ko) ==== @@ -23,7 +23,7 @@ # OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF # SUCH DAMAGE. # -# $FreeBSD: src/sys/kern/bus_if.m,v 1.31 2006/09/03 00:27:42 jmg Exp $ +# $FreeBSD: src/sys/kern/bus_if.m,v 1.32 2006/09/11 19:41:31 jhb Exp $ # #include <sys/bus.h> @@ -194,7 +194,7 @@ int _order; const char *_name; int _unit; -}; +} DEFAULT bus_generic_add_child; /** * @brief Allocate a system resource ==== //depot/projects/arm/src/sys/kern/subr_bus.c#18 (text+ko) ==== @@ -25,7 +25,7 @@ */ #include <sys/cdefs.h> -__FBSDID("$FreeBSD: src/sys/kern/subr_bus.c,v 1.196 2006/09/03 00:27:42 jmg Exp $"); +__FBSDID("$FreeBSD: src/sys/kern/subr_bus.c,v 1.197 2006/09/11 19:41:31 jhb Exp $"); #include "opt_bus.h" @@ -2846,6 +2846,13 @@ } } +device_t +bus_generic_add_child(device_t dev, int order, const char *name, int unit) +{ + + return (device_add_child_ordered(dev, order, name, unit)); +} + /** * @brief Helper function for implementing DEVICE_PROBE() * ==== //depot/projects/arm/src/sys/kern/subr_rman.c#10 (text+ko) ==== @@ -56,7 +56,7 @@ */ #include <sys/cdefs.h> -__FBSDID("$FreeBSD: src/sys/kern/subr_rman.c,v 1.52 2006/08/03 21:19:13 jb Exp $"); +__FBSDID("$FreeBSD: src/sys/kern/subr_rman.c,v 1.53 2006/09/11 19:31:52 jhb Exp $"); #include <sys/param.h> #include <sys/systm.h> @@ -155,7 +155,7 @@ int rman_manage_region(struct rman *rm, u_long start, u_long end) { - struct resource_i *r, *s; + struct resource_i *r, *s, *t; DPRINTF(("rman_manage_region: <%s> request: start %#lx, end %#lx\n", rm->rm_descr, start, end)); @@ -167,15 +167,53 @@ r->r_rm = rm; mtx_lock(rm->rm_mtx); + + /* Skip entries before us. */ for (s = TAILQ_FIRST(&rm->rm_list); - s && s->r_end < r->r_start; + s && s->r_end + 1 < r->r_start; s = TAILQ_NEXT(s, r_link)) ; + /* If we ran off the end of the list, insert at the tail. */ if (s == NULL) { TAILQ_INSERT_TAIL(&rm->rm_list, r, r_link); } else { - TAILQ_INSERT_BEFORE(s, r, r_link); + /* Check for any overlap with the current region. */ + if (r->r_start <= s->r_end && r->r_end >= s->r_start) + return EBUSY; + + /* Check for any overlap with the next region. */ + t = TAILQ_NEXT(s, r_link); + if (t && r->r_start <= t->r_end && r->r_end >= t->r_start) + return EBUSY; + + /* + * See if this region can be merged with the next region. If + * not, clear the pointer. + */ + if (t && (r->r_end + 1 != t->r_start || t->r_flags != 0)) + t = NULL; + + /* See if we can merge with the current region. */ + if (s->r_end + 1 == r->r_start && s->r_flags == 0) { + /* Can we merge all 3 regions? */ + if (t != NULL) { + s->r_end = t->r_end; + TAILQ_REMOVE(&rm->rm_list, t, r_link); + free(r, M_RMAN); + free(t, M_RMAN); + } else { + s->r_end = r->r_end; + free(r, M_RMAN); + } + } else { + /* Can we merge with just the next region? */ + if (t != NULL) { + t->r_start = r->r_start; + free(r, M_RMAN); + } else + TAILQ_INSERT_BEFORE(s, r, r_link); + } } mtx_unlock(rm->rm_mtx); ==== //depot/projects/arm/src/sys/netinet/ip_output.c#15 (text+ko) ==== @@ -27,7 +27,7 @@ * SUCH DAMAGE. * * @(#)ip_output.c 8.3 (Berkeley) 1/21/94 - * $FreeBSD: src/sys/netinet/ip_output.c,v 1.262 2006/09/10 17:49:09 jmg Exp $ + * $FreeBSD: src/sys/netinet/ip_output.c,v 1.263 2006/09/11 19:56:10 andre Exp $ */ #include "opt_ipfw.h" @@ -246,7 +246,7 @@ * Calculate MTU. If we have a route that is up, use that, * otherwise use the interface's MTU. */ - if (ro->ro_rt->rt_flags & (RTF_UP | RTF_HOST)) { + if (ro->ro_rt != NULL && (ro->ro_rt->rt_flags & (RTF_UP|RTF_HOST))) { /* * This case can happen if the user changed the MTU * of an interface after enabling IP on it. Because ==== //depot/projects/arm/src/sys/sys/bus.h#9 (text+ko) ==== @@ -23,7 +23,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $FreeBSD: src/sys/sys/bus.h,v 1.76 2006/09/03 00:27:42 jmg Exp $ + * $FreeBSD: src/sys/sys/bus.h,v 1.77 2006/09/11 19:42:27 jhb Exp $ */ #ifndef _SYS_BUS_H_ @@ -242,6 +242,9 @@ int bus_generic_activate_resource(device_t dev, device_t child, int type, int rid, struct resource *r); +device_t + bus_generic_add_child(device_t dev, int order, const char *name, + int unit); struct resource * bus_generic_alloc_resource(device_t bus, device_t child, int type, int *rid, u_long start, u_long end,
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200609112012.k8BKCHba092428>