Date: Wed, 15 Nov 2006 21:40:53 GMT From: John Baldwin <jhb@FreeBSD.org> To: Perforce Change Reviews <perforce@freebsd.org> Subject: PERFORCE change 110061 for review Message-ID: <200611152140.kAFLerK2087024@repoman.freebsd.org>
next in thread | raw e-mail | index | archive | help
http://perforce.freebsd.org/chv.cgi?CH=110061 Change 110061 by jhb@jhb_mutex on 2006/11/15 21:39:52 IFC @110060. Affected files ... .. //depot/projects/smpng/sys/amd64/amd64/db_trace.c#21 integrate .. //depot/projects/smpng/sys/amd64/amd64/machdep.c#60 integrate .. //depot/projects/smpng/sys/amd64/amd64/msi.c#2 integrate .. //depot/projects/smpng/sys/amd64/include/reg.h#6 integrate .. //depot/projects/smpng/sys/compat/linux/linux_emul.c#4 integrate .. //depot/projects/smpng/sys/compat/linux/linux_misc.c#75 integrate .. //depot/projects/smpng/sys/conf/NOTES#131 integrate .. //depot/projects/smpng/sys/conf/files#191 integrate .. //depot/projects/smpng/sys/dev/bce/if_bce.c#8 integrate .. //depot/projects/smpng/sys/dev/em/if_em.c#77 integrate .. //depot/projects/smpng/sys/dev/em/if_em.h#38 integrate .. //depot/projects/smpng/sys/dev/fxp/if_fxp.c#77 integrate .. //depot/projects/smpng/sys/dev/mpt/mpt.h#17 integrate .. //depot/projects/smpng/sys/dev/mpt/mpt_pci.c#25 integrate .. //depot/projects/smpng/sys/dev/pci/pcivar.h#22 integrate .. //depot/projects/smpng/sys/dev/usb/uark.c#1 branch .. //depot/projects/smpng/sys/dev/usb/usbdevs#97 integrate .. //depot/projects/smpng/sys/i386/i386/db_trace.c#33 integrate .. //depot/projects/smpng/sys/i386/i386/machdep.c#119 integrate .. //depot/projects/smpng/sys/i386/i386/msi.c#2 integrate .. //depot/projects/smpng/sys/i386/include/reg.h#10 integrate .. //depot/projects/smpng/sys/kern/kern_synch.c#106 integrate .. //depot/projects/smpng/sys/modules/Makefile#130 integrate .. //depot/projects/smpng/sys/modules/uark/Makefile#1 branch .. //depot/projects/smpng/sys/sun4v/include/asmacros.h#2 integrate .. //depot/projects/smpng/sys/sun4v/include/tte_hash.h#2 integrate .. //depot/projects/smpng/sys/sun4v/sun4v/exception.S#3 integrate .. //depot/projects/smpng/sys/sun4v/sun4v/interrupt.S#3 integrate .. //depot/projects/smpng/sys/sun4v/sun4v/tte_hash.c#2 integrate Differences ... ==== //depot/projects/smpng/sys/amd64/amd64/db_trace.c#21 (text+ko) ==== @@ -25,7 +25,7 @@ */ #include <sys/cdefs.h> -__FBSDID("$FreeBSD: src/sys/amd64/amd64/db_trace.c,v 1.76 2006/10/20 09:44:20 bde Exp $"); +__FBSDID("$FreeBSD: src/sys/amd64/amd64/db_trace.c,v 1.77 2006/11/15 19:53:47 jhb Exp $"); #include <sys/param.h> #include <sys/systm.h> @@ -202,8 +202,8 @@ static char * watchtype_str(int type); int amd64_set_watch(int watchnum, unsigned long watchaddr, int size, - int access, struct dbreg * d); -int amd64_clr_watch(int watchnum, struct dbreg * d); + int access, struct dbreg *d); +int amd64_clr_watch(int watchnum, struct dbreg *d); /* * Figure out how many arguments were passed into the frame at "fp". @@ -536,11 +536,11 @@ unsigned long watchaddr; int size; int access; - struct dbreg * d; + struct dbreg *d; { int i; unsigned int mask; - + if (watchnum == -1) { for (i = 0, mask = 0x3; i < 4; i++, mask <<= 2) if ((d->dr[7] & mask) == 0) @@ -550,7 +550,7 @@ else return (-1); } - + switch (access) { case DBREG_DR7_EXEC: size = 1; /* size must be 1 for an execution breakpoint */ @@ -558,9 +558,10 @@ case DBREG_DR7_WRONLY: case DBREG_DR7_RDWR: break; - default : return (-1); + default: + return (-1); } - + /* * we can watch a 1, 2, or 4 byte sized location */ @@ -577,7 +578,7 @@ d->dr[7] &= ~((0x3 << (watchnum*2)) | (0x0f << (watchnum*4+16))); /* set drN register to the address, N=watchnum */ - DBREG_DRX(d,watchnum) = watchaddr; + DBREG_DRX(d, watchnum) = watchaddr; /* enable the watchpoint */ d->dr[7] |= (0x2 << (watchnum*2)) | (mask << (watchnum*4+16)); @@ -589,15 +590,15 @@ int amd64_clr_watch(watchnum, d) int watchnum; - struct dbreg * d; + struct dbreg *d; { if (watchnum < 0 || watchnum >= 4) return (-1); - + d->dr[7] = d->dr[7] & ~((0x3 << (watchnum*2)) | (0x0f << (watchnum*4+16))); - DBREG_DRX(d,watchnum) = 0; - + DBREG_DRX(d, watchnum) = 0; + return (0); } @@ -607,22 +608,21 @@ db_expr_t addr; db_expr_t size; { - int avail, wsize; - int i; struct dbreg d; - + int avail, i, wsize; + fill_dbregs(NULL, &d); - + avail = 0; - for(i=0; i<4; i++) { + for(i = 0; i < 4; i++) { if ((d.dr[7] & (3 << (i*2))) == 0) avail++; } - - if (avail*4 < size) + + if (avail * 4 < size) return (-1); - - for (i=0; i<4 && (size != 0); i++) { + + for (i = 0; i < 4 && (size != 0); i++) { if ((d.dr[7] & (3<<(i*2))) == 0) { if (size > 4) wsize = 4; @@ -630,15 +630,15 @@ wsize = size; if (wsize == 3) wsize++; - amd64_set_watch(i, addr, wsize, + amd64_set_watch(i, addr, wsize, DBREG_DR7_WRONLY, &d); addr += wsize; size -= wsize; } } - + set_dbregs(NULL, &d); - + return(0); } @@ -653,22 +653,22 @@ fill_dbregs(NULL, &d); - for(i=0; i<4; i++) { + for(i = 0; i < 4; i++) { if (d.dr[7] & (3 << (i*2))) { - if ((DBREG_DRX((&d), i) >= addr) && + if ((DBREG_DRX((&d), i) >= addr) && (DBREG_DRX((&d), i) < addr+size)) amd64_clr_watch(i, &d); - + } } - + set_dbregs(NULL, &d); - + return(0); } -static +static char * watchtype_str(type) int type; @@ -685,30 +685,29 @@ void db_md_list_watchpoints() { - int i; struct dbreg d; + int i, len, type; fill_dbregs(NULL, &d); db_printf("\nhardware watchpoints:\n"); db_printf(" watch status type len address\n"); db_printf(" ----- -------- ---------- --- ----------\n"); - for (i=0; i<4; i++) { + for (i = 0; i < 4; i++) { if (d.dr[7] & (0x03 << (i*2))) { - unsigned type, len; type = (d.dr[7] >> (16+(i*4))) & 3; len = (d.dr[7] >> (16+(i*4)+2)) & 3; db_printf(" %-5d %-8s %10s %3d 0x%016lx\n", - i, "enabled", watchtype_str(type), + i, "enabled", watchtype_str(type), len + 1, DBREG_DRX((&d), i)); } else { db_printf(" %-5d disabled\n", i); } } - + db_printf("\ndebug register values:\n"); - for (i=0; i<8; i++) { + for (i = 0; i < 8; i++) { db_printf(" dr%d 0x%016lx\n", i, DBREG_DRX((&d), i)); } db_printf("\n"); ==== //depot/projects/smpng/sys/amd64/amd64/machdep.c#60 (text+ko) ==== @@ -39,7 +39,7 @@ */ #include <sys/cdefs.h> -__FBSDID("$FreeBSD: src/sys/amd64/amd64/machdep.c,v 1.660 2006/11/07 21:57:18 ru Exp $"); +__FBSDID("$FreeBSD: src/sys/amd64/amd64/machdep.c,v 1.661 2006/11/15 19:53:47 jhb Exp $"); #include "opt_atalk.h" #include "opt_atpic.h" @@ -1832,9 +1832,8 @@ addr[nbp++] = (caddr_t)rdr3(); } - for (i=0; i<nbp; i++) { - if (addr[i] < - (caddr_t)VM_MAXUSER_ADDRESS) { + for (i = 0; i < nbp; i++) { + if (addr[i] < (caddr_t)VM_MAXUSER_ADDRESS) { /* * addr[i] is in user space */ ==== //depot/projects/smpng/sys/amd64/amd64/msi.c#2 (text+ko) ==== @@ -34,7 +34,7 @@ */ #include <sys/cdefs.h> -__FBSDID("$FreeBSD: src/sys/amd64/amd64/msi.c,v 1.1 2006/11/13 22:23:32 jhb Exp $"); +__FBSDID("$FreeBSD: src/sys/amd64/amd64/msi.c,v 1.2 2006/11/15 18:40:00 jhb Exp $"); #include <sys/param.h> #include <sys/bus.h> @@ -315,7 +315,7 @@ /* We need count - cnt more sources starting at index 'cnt'. */ *newirq = cnt; *newcount = count - cnt; - for (j = 0; j < *newirq; j++) { + for (j = 0; j < *newcount; j++) { /* Create a new MSI source. */ msi = malloc(sizeof(struct msi_intsrc), M_MSI, ==== //depot/projects/smpng/sys/amd64/include/reg.h#6 (text+ko) ==== @@ -31,7 +31,7 @@ * SUCH DAMAGE. * * from: @(#)reg.h 5.5 (Berkeley) 1/18/91 - * $FreeBSD: src/sys/amd64/include/reg.h,v 1.35 2004/04/05 23:55:14 imp Exp $ + * $FreeBSD: src/sys/amd64/include/reg.h,v 1.36 2006/11/15 19:53:48 jhb Exp $ */ #ifndef _MACHINE_REG_H_ @@ -92,11 +92,13 @@ /* Index 8-15: reserved */ }; -#define DBREG_DR7_EXEC 0x00 /* break on execute */ -#define DBREG_DR7_WRONLY 0x01 /* break on write */ -#define DBREG_DR7_RDWR 0x03 /* break on read or write */ -#define DBREG_DRX(d,x) ((d)->dr[(x)]) /* reference dr0 - dr15 by - register number */ +#define DBREG_DR7_EXEC 0x00 /* break on execute */ +#define DBREG_DR7_WRONLY 0x01 /* break on write */ +#define DBREG_DR7_RDWR 0x03 /* break on read or write */ + +#define DBREG_DRX(d,x) ((d)->dr[(x)]) /* reference dr0 - dr15 by + register number */ + #ifdef _KERNEL /* * XXX these interfaces are MI, so they should be declared in a MI place. ==== //depot/projects/smpng/sys/compat/linux/linux_emul.c#4 (text+ko) ==== @@ -27,7 +27,7 @@ */ #include <sys/cdefs.h> -__FBSDID("$FreeBSD: src/sys/compat/linux/linux_emul.c,v 1.8 2006/10/28 10:59:59 netchild Exp $"); +__FBSDID("$FreeBSD: src/sys/compat/linux/linux_emul.c,v 1.9 2006/11/15 11:04:37 kib Exp $"); #include "opt_compat.h" @@ -85,7 +85,7 @@ em = malloc(sizeof *em, M_LINUX, M_WAITOK | M_ZERO); em->pid = child; em->pdeath_signal = 0; - if (flags & CLONE_VM) { + if (flags & CLONE_THREAD) { /* handled later in the code */ } else { struct linux_emuldata_shared *s; @@ -117,10 +117,10 @@ * the newly created proc */ if (child != 0) { - if (flags & CLONE_VM) { + if (flags & CLONE_THREAD) { /* lookup the parent */ p_em = em_find(td->td_proc, EMUL_LOCKED); - KASSERT(p_em != NULL, ("proc_init: parent emuldata not found for CLONE_VM\n")); + KASSERT(p_em != NULL, ("proc_init: parent emuldata not found for CLONE_THREAD\n")); em->shared = p_em->shared; em->shared->refs++; } else { ==== //depot/projects/smpng/sys/compat/linux/linux_misc.c#75 (text+ko) ==== @@ -28,7 +28,7 @@ */ #include <sys/cdefs.h> -__FBSDID("$FreeBSD: src/sys/compat/linux/linux_misc.c,v 1.193 2006/11/11 16:26:55 trhodes Exp $"); +__FBSDID("$FreeBSD: src/sys/compat/linux/linux_misc.c,v 1.194 2006/11/15 10:01:06 kib Exp $"); #include "opt_compat.h" #include "opt_mac.h" @@ -802,7 +802,7 @@ * this is necessary because the test in kern_wait doesnt * work because we mess with the options here */ - if (args->options &~ (WUNTRACED|WNOHANG|WCONTINUED)) + if (args->options &~ (WUNTRACED|WNOHANG|WCONTINUED|__WCLONE)) return (EINVAL); options = (args->options & (WNOHANG | WUNTRACED)); ==== //depot/projects/smpng/sys/conf/NOTES#131 (text+ko) ==== @@ -1,4 +1,4 @@ -# $FreeBSD: src/sys/conf/NOTES,v 1.1399 2006/11/11 23:37:52 ru Exp $ +# $FreeBSD: src/sys/conf/NOTES,v 1.1400 2006/11/15 09:13:24 maxim Exp $ # # NOTES -- Lines that can be cut/pasted into kernel and hints configs. # @@ -2397,6 +2397,8 @@ # # USB serial support device ucom +# USB support for Technologies ARK3116 based serial adapters +device uark # USB support for Belkin F5U103 and compatible serial adapters device ubsa # USB support for BWCT console serial adapters ==== //depot/projects/smpng/sys/conf/files#191 (text+ko) ==== @@ -1,4 +1,4 @@ -# $FreeBSD: src/sys/conf/files,v 1.1161 2006/11/11 16:26:56 trhodes Exp $ +# $FreeBSD: src/sys/conf/files,v 1.1162 2006/11/15 09:13:24 maxim Exp $ # # The long compile-with and dependency lines are required because of # limitations in config: backslash-newline doesn't work in strings, and @@ -1037,6 +1037,7 @@ dev/usb/ohci_pci.c optional ohci pci dev/usb/sl811hs.c optional slhci dev/usb/slhci_pccard.c optional slhci pccard +dev/usb/uark.c optional uark dev/usb/ubsa.c optional ubsa dev/usb/ubser.c optional ubser dev/usb/ucom.c optional ucom ==== //depot/projects/smpng/sys/dev/bce/if_bce.c#8 (text) ==== @@ -29,7 +29,7 @@ */ #include <sys/cdefs.h> -__FBSDID("$FreeBSD: src/sys/dev/bce/if_bce.c,v 1.18 2006/10/31 03:28:25 scottl Exp $"); +__FBSDID("$FreeBSD: src/sys/dev/bce/if_bce.c,v 1.19 2006/11/15 20:04:56 jhb Exp $"); /* * The following controllers are supported by this driver: @@ -452,7 +452,7 @@ struct bce_softc *sc; struct ifnet *ifp; u32 val; - int mbuf, rid, rc = 0; + int count, mbuf, rid, rc = 0; sc = device_get_softc(dev); sc->bce_dev = dev; @@ -485,7 +485,12 @@ sc->bce_vhandle = (vm_offset_t) rman_get_virtual(sc->bce_res); /* Allocate PCI IRQ resources. */ - rid = 0; + count = pci_msi_count(dev); + if (count == 1 && pci_alloc_msi(dev, &count) == 0) { + rid = 1; + sc->bce_flags |= BCE_USING_MSI_FLAG; + } else + rid = 0; sc->bce_irq = bus_alloc_resource_any(dev, SYS_RES_IRQ, &rid, RF_SHAREABLE | RF_ACTIVE); @@ -2539,9 +2544,12 @@ if (sc->bce_irq != NULL) bus_release_resource(dev, SYS_RES_IRQ, - 0, + sc->bce_flags & BCE_USING_MSI_FLAG ? 1 : 0, sc->bce_irq); + if (sc->bce_flags & BCE_USING_MSI_FLAG) + pci_release_msi(dev); + if (sc->bce_res != NULL) bus_release_resource(dev, SYS_RES_MEMORY, ==== //depot/projects/smpng/sys/dev/em/if_em.c#77 (text+ko) ==== @@ -31,7 +31,7 @@ ***************************************************************************/ -/*$FreeBSD: src/sys/dev/em/if_em.c,v 1.163 2006/11/09 16:00:18 glebius Exp $*/ +/*$FreeBSD: src/sys/dev/em/if_em.c,v 1.164 2006/11/15 20:04:56 jhb Exp $*/ #ifdef HAVE_KERNEL_OPTION_HEADERS #include "opt_device_polling.h" @@ -2200,7 +2200,12 @@ rman_get_bushandle(adapter->flash_mem); } - rid = 0x0; + val = pci_msi_count(dev); + if (val == 1 && pci_alloc_msi(dev, &val) == 0) { + rid = 1; + adapter->msi = 1; + } else + rid = 0; adapter->res_interrupt = bus_alloc_resource_any(dev, SYS_RES_IRQ, &rid, RF_SHAREABLE | RF_ACTIVE); if (adapter->res_interrupt == NULL) { @@ -2279,7 +2284,11 @@ device_t dev = adapter->dev; if (adapter->res_interrupt != NULL) - bus_release_resource(dev, SYS_RES_IRQ, 0, adapter->res_interrupt); + bus_release_resource(dev, SYS_RES_IRQ, adapter->msi ? 1 : 0, + adapter->res_interrupt); + + if (adapter->msi) + pci_release_msi(dev); if (adapter->res_memory != NULL) bus_release_resource(dev, SYS_RES_MEMORY, PCIR_BAR(0), ==== //depot/projects/smpng/sys/dev/em/if_em.h#38 (text+ko) ==== @@ -31,7 +31,7 @@ ***************************************************************************/ -/*$FreeBSD: src/sys/dev/em/if_em.h,v 1.55 2006/11/09 16:00:18 glebius Exp $*/ +/*$FreeBSD: src/sys/dev/em/if_em.h,v 1.56 2006/11/15 20:04:56 jhb Exp $*/ #ifndef _EM_H_DEFINED_ #define _EM_H_DEFINED_ @@ -288,6 +288,7 @@ struct callout tx_fifo_timer; int watchdog_timer; int io_rid; + int msi; int if_flags; struct mtx mtx; int em_insert_vlan_header; ==== //depot/projects/smpng/sys/dev/fxp/if_fxp.c#77 (text+ko) ==== @@ -28,7 +28,7 @@ */ #include <sys/cdefs.h> -__FBSDID("$FreeBSD: src/sys/dev/fxp/if_fxp.c,v 1.259 2006/11/06 12:19:43 rink Exp $"); +__FBSDID("$FreeBSD: src/sys/dev/fxp/if_fxp.c,v 1.260 2006/11/14 18:54:31 rink Exp $"); /* * Intel EtherExpress Pro/100B PCI Fast Ethernet driver @@ -179,6 +179,7 @@ { 0x1068, -1, "Intel 82801FBM (ICH6-M) Pro/100 VE Ethernet" }, { 0x1069, -1, "Intel 82562EM/EX/GX Pro/100 Ethernet" }, { 0x1092, -1, "Intel Pro/100 VE Network Connection" }, + { 0x1093, -1, "Intel Pro/100 VM Network Connection" }, { 0x1094, -1, "Intel Pro/100 946GZ (ICH7) Network Connection" }, { 0x1209, -1, "Intel 82559ER Embedded 10/100 Ethernet" }, { 0x1229, 0x01, "Intel 82557 Pro/100 Ethernet" }, ==== //depot/projects/smpng/sys/dev/mpt/mpt.h#17 (text+ko) ==== @@ -1,4 +1,4 @@ -/* $FreeBSD: src/sys/dev/mpt/mpt.h,v 1.30 2006/09/07 23:08:21 mjacob Exp $ */ +/* $FreeBSD: src/sys/dev/mpt/mpt.h,v 1.31 2006/11/15 20:04:57 jhb Exp $ */ /*- * Generic defines for LSI '909 FC adapters. * FreeBSD Version. @@ -599,6 +599,7 @@ /* * PCI Hardware info */ + int pci_msi_count; struct resource * pci_irq; /* Interrupt map for chip */ void * ih; /* Interupt handle */ struct mpt_pci_cfg pci_cfg; /* saved PCI conf registers */ ==== //depot/projects/smpng/sys/dev/mpt/mpt_pci.c#25 (text+ko) ==== @@ -99,7 +99,7 @@ */ #include <sys/cdefs.h> -__FBSDID("$FreeBSD: src/sys/dev/mpt/mpt_pci.c,v 1.38 2006/09/08 05:27:04 mjacob Exp $"); +__FBSDID("$FreeBSD: src/sys/dev/mpt/mpt_pci.c,v 1.40 2006/11/15 20:18:09 mjacob Exp $"); #include <dev/mpt/mpt.h> #include <dev/mpt/mpt_cam.h> @@ -512,6 +512,15 @@ /* Get a handle to the interrupt */ iqd = 0; +#if 0 + if (pci_msi_count(dev) == 1) { + mpt->pci_msi_count = 1; + if (pci_alloc_msi(dev, &mpt->pci_msi_count) == 0) + iqd = 1; + else + mpt->pci_msi_count = 0; + } +#endif mpt->pci_irq = bus_alloc_resource_any(dev, SYS_RES_IRQ, &iqd, RF_ACTIVE | RF_SHAREABLE); if (mpt->pci_irq == NULL) { @@ -608,10 +617,16 @@ } if (mpt->pci_irq) { - bus_release_resource(mpt->dev, SYS_RES_IRQ, 0, mpt->pci_irq); + bus_release_resource(mpt->dev, SYS_RES_IRQ, + mpt->pci_msi_count ? 1 : 0, mpt->pci_irq); mpt->pci_irq = 0; } + if (mpt->pci_msi_count) { + pci_release_msi(mpt->dev); + mpt->pci_msi_count = 0; + } + if (mpt->pci_pio_reg) { bus_release_resource(mpt->dev, SYS_RES_IOPORT, mpt->pci_pio_rid, mpt->pci_pio_reg); ==== //depot/projects/smpng/sys/dev/pci/pcivar.h#22 (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/pci/pcivar.h,v 1.73 2006/11/13 21:47:30 jhb Exp $ + * $FreeBSD: src/sys/dev/pci/pcivar.h,v 1.74 2006/11/14 17:54:55 jhb Exp $ * */ @@ -84,10 +84,10 @@ uint16_t msi_data; /* Contents of data register. */ }; -/* Interesting values for PCI MSI */ +/* Interesting values for PCI MSI-X */ struct pcicfg_msix { uint16_t msix_ctrl; /* Message Control */ - uint8_t msix_location; /* Offset of MSI capability registers. */ + uint8_t msix_location; /* Offset of MSI-X capability registers. */ uint16_t msix_msgnum; /* Number of messages */ int msix_alloc; /* Number of allocated messages. */ uint8_t msix_table_bar; /* BAR containing vector table. */ ==== //depot/projects/smpng/sys/dev/usb/usbdevs#97 (text+ko) ==== @@ -1,4 +1,4 @@ -$FreeBSD: src/sys/dev/usb/usbdevs,v 1.277 2006/11/11 23:53:25 flz Exp $ +$FreeBSD: src/sys/dev/usb/usbdevs,v 1.278 2006/11/15 09:13:24 maxim Exp $ /* $NetBSD: usbdevs,v 1.392 2004/12/29 08:38:44 imp Exp $ */ /*- @@ -545,6 +545,7 @@ vendor ONSPEC2 0x55aa OnSpec vendor ZINWELL 0x5a57 Zinwell vendor SITECOM 0x6189 Sitecom +vendor ARKMICRO 0x6547 Arkmicro Technologies vendor INTEL 0x8086 Intel vendor HP2 0xf003 Hewlett Packard @@ -676,6 +677,9 @@ product APPLE IPODVIDEO 0x1209 iPod Video product APPLE IPODNANO 0x120a iPod Nano +/* Arkmicro Technologies */ +product ARKMICRO ARK3116 0x0232 ARK3116 Serial + /* Asahi Optical products */ product ASAHIOPTICAL OPTIO230 0x0004 Digital camera product ASAHIOPTICAL OPTIO330 0x0006 Digital camera ==== //depot/projects/smpng/sys/i386/i386/db_trace.c#33 (text+ko) ==== @@ -25,7 +25,7 @@ */ #include <sys/cdefs.h> -__FBSDID("$FreeBSD: src/sys/i386/i386/db_trace.c,v 1.75 2006/10/20 09:44:21 bde Exp $"); +__FBSDID("$FreeBSD: src/sys/i386/i386/db_trace.c,v 1.76 2006/11/15 19:53:48 jhb Exp $"); #include <sys/param.h> #include <sys/systm.h> @@ -192,8 +192,8 @@ static char * watchtype_str(int type); int i386_set_watch(int watchnum, unsigned int watchaddr, int size, int access, - struct dbreg * d); -int i386_clr_watch(int watchnum, struct dbreg * d); + struct dbreg *d); +int i386_clr_watch(int watchnum, struct dbreg *d); /* * Figure out how many arguments were passed into the frame at "fp". @@ -569,11 +569,11 @@ unsigned int watchaddr; int size; int access; - struct dbreg * d; + struct dbreg *d; { int i; unsigned int mask; - + if (watchnum == -1) { for (i = 0, mask = 0x3; i < 4; i++, mask <<= 2) if ((d->dr[7] & mask) == 0) @@ -583,7 +583,7 @@ else return (-1); } - + switch (access) { case DBREG_DR7_EXEC: size = 1; /* size must be 1 for an execution breakpoint */ @@ -591,9 +591,10 @@ case DBREG_DR7_WRONLY: case DBREG_DR7_RDWR: break; - default : return (-1); + default: + return (-1); } - + /* * we can watch a 1, 2, or 4 byte sized location */ @@ -610,7 +611,7 @@ d->dr[7] &= ~((0x3 << (watchnum*2)) | (0x0f << (watchnum*4+16))); /* set drN register to the address, N=watchnum */ - DBREG_DRX(d,watchnum) = watchaddr; + DBREG_DRX(d, watchnum) = watchaddr; /* enable the watchpoint */ d->dr[7] |= (0x2 << (watchnum*2)) | (mask << (watchnum*4+16)); @@ -622,15 +623,15 @@ int i386_clr_watch(watchnum, d) int watchnum; - struct dbreg * d; + struct dbreg *d; { if (watchnum < 0 || watchnum >= 4) return (-1); - + d->dr[7] = d->dr[7] & ~((0x3 << (watchnum*2)) | (0x0f << (watchnum*4+16))); - DBREG_DRX(d,watchnum) = 0; - + DBREG_DRX(d, watchnum) = 0; + return (0); } @@ -640,22 +641,21 @@ db_expr_t addr; db_expr_t size; { - int avail, wsize; - int i; struct dbreg d; - + int avail, i, wsize; + fill_dbregs(NULL, &d); - + avail = 0; - for(i=0; i<4; i++) { + for(i = 0; i < 4; i++) { if ((d.dr[7] & (3 << (i*2))) == 0) avail++; } - - if (avail*4 < size) + + if (avail * 4 < size) return (-1); - - for (i=0; i<4 && (size != 0); i++) { + + for (i = 0; i < 4 && (size != 0); i++) { if ((d.dr[7] & (3<<(i*2))) == 0) { if (size > 4) wsize = 4; @@ -663,15 +663,15 @@ wsize = size; if (wsize == 3) wsize++; - i386_set_watch(i, addr, wsize, + i386_set_watch(i, addr, wsize, DBREG_DR7_WRONLY, &d); addr += wsize; size -= wsize; } } - + set_dbregs(NULL, &d); - + return(0); } @@ -686,22 +686,22 @@ fill_dbregs(NULL, &d); - for(i=0; i<4; i++) { + for(i = 0; i < 4; i++) { if (d.dr[7] & (3 << (i*2))) { - if ((DBREG_DRX((&d), i) >= addr) && + if ((DBREG_DRX((&d), i) >= addr) && (DBREG_DRX((&d), i) < addr+size)) i386_clr_watch(i, &d); - + } } - + set_dbregs(NULL, &d); - + return(0); } -static +static char * watchtype_str(type) int type; @@ -718,30 +718,29 @@ void db_md_list_watchpoints() { - int i; struct dbreg d; + int i, len, type; fill_dbregs(NULL, &d); db_printf("\nhardware watchpoints:\n"); db_printf(" watch status type len address\n"); db_printf(" ----- -------- ---------- --- ----------\n"); - for (i=0; i<4; i++) { + for (i = 0; i < 4; i++) { if (d.dr[7] & (0x03 << (i*2))) { - unsigned type, len; type = (d.dr[7] >> (16+(i*4))) & 3; len = (d.dr[7] >> (16+(i*4)+2)) & 3; db_printf(" %-5d %-8s %10s %3d 0x%08x\n", - i, "enabled", watchtype_str(type), + i, "enabled", watchtype_str(type), len+1, DBREG_DRX((&d),i)); } else { db_printf(" %-5d disabled\n", i); } } - + db_printf("\ndebug register values:\n"); - for (i=0; i<8; i++) { + for (i = 0; i < 8; i++) { db_printf(" dr%d 0x%08x\n", i, DBREG_DRX((&d),i)); } db_printf("\n"); ==== //depot/projects/smpng/sys/i386/i386/machdep.c#119 (text+ko) ==== @@ -38,7 +38,7 @@ */ #include <sys/cdefs.h> -__FBSDID("$FreeBSD: src/sys/i386/i386/machdep.c,v 1.640 2006/11/07 21:57:18 ru Exp $"); +__FBSDID("$FreeBSD: src/sys/i386/i386/machdep.c,v 1.641 2006/11/15 19:53:48 jhb Exp $"); #include "opt_apic.h" #include "opt_atalk.h" @@ -2904,9 +2904,8 @@ addr[nbp++] = (caddr_t)rdr3(); } - for (i=0; i<nbp; i++) { - if (addr[i] < - (caddr_t)VM_MAXUSER_ADDRESS) { + for (i = 0; i < nbp; i++) { + if (addr[i] < (caddr_t)VM_MAXUSER_ADDRESS) { /* * addr[i] is in user space */ ==== //depot/projects/smpng/sys/i386/i386/msi.c#2 (text+ko) ==== @@ -34,7 +34,7 @@ */ #include <sys/cdefs.h> -__FBSDID("$FreeBSD: src/sys/i386/i386/msi.c,v 1.1 2006/11/13 22:23:33 jhb Exp $"); +__FBSDID("$FreeBSD: src/sys/i386/i386/msi.c,v 1.2 2006/11/15 18:40:00 jhb Exp $"); #include <sys/param.h> #include <sys/bus.h> @@ -315,7 +315,7 @@ /* We need count - cnt more sources starting at index 'cnt'. */ *newirq = cnt; *newcount = count - cnt; - for (j = 0; j < *newirq; j++) { + for (j = 0; j < *newcount; j++) { /* Create a new MSI source. */ msi = malloc(sizeof(struct msi_intsrc), M_MSI, ==== //depot/projects/smpng/sys/i386/include/reg.h#10 (text+ko) ==== @@ -30,7 +30,7 @@ * SUCH DAMAGE. * * from: @(#)reg.h 5.5 (Berkeley) 1/18/91 - * $FreeBSD: src/sys/i386/include/reg.h,v 1.31 2005/05/31 09:43:04 dfr Exp $ + * $FreeBSD: src/sys/i386/include/reg.h,v 1.32 2006/11/15 19:53:48 jhb Exp $ */ #ifndef _MACHINE_REG_H_ @@ -137,12 +137,12 @@ /* Index 7: debug control */ }; -#define DBREG_DR7_EXEC 0x00 /* break on execute */ -#define DBREG_DR7_WRONLY 0x01 /* break on write */ -#define DBREG_DR7_RDWR 0x03 /* break on read or write */ -#define DBREG_DRX(d,x) ((d)->dr[(x)]) /* reference dr0 - dr7 by - register number */ +#define DBREG_DR7_EXEC 0x00 /* break on execute */ +#define DBREG_DR7_WRONLY 0x01 /* break on write */ +#define DBREG_DR7_RDWR 0x03 /* break on read or write */ +#define DBREG_DRX(d,x) ((d)->dr[(x)]) /* reference dr0 - dr7 by + register number */ #ifdef _KERNEL /* ==== //depot/projects/smpng/sys/kern/kern_synch.c#106 (text+ko) ==== @@ -35,7 +35,7 @@ */ #include <sys/cdefs.h> -__FBSDID("$FreeBSD: src/sys/kern/kern_synch.c,v 1.282 2006/10/26 21:42:20 jb Exp $"); +__FBSDID("$FreeBSD: src/sys/kern/kern_synch.c,v 1.283 2006/11/15 20:44:07 jhb Exp $"); #include "opt_ktrace.h" @@ -135,8 +135,8 @@ #endif WITNESS_WARN(WARN_GIANTOK | WARN_SLEEPOK, mtx == NULL ? NULL : &mtx->mtx_object, "Sleeping on \"%s\"", wmesg); - KASSERT(timo != 0 || mtx_owned(&Giant) || mtx != NULL, - ("sleeping without a mutex")); + KASSERT(timo != 0 || mtx_owned(&Giant) || mtx != NULL || + ident == &lbolt, ("sleeping without a mutex")); KASSERT(p != NULL, ("msleep1")); KASSERT(ident != NULL && TD_IS_RUNNING(td), ("msleep")); @@ -188,7 +188,7 @@ * stopped, then td will no longer be on a sleep queue upon * return from cursig(). */ - sleepq_add(ident, mtx, wmesg, flags); + sleepq_add(ident, ident == &lbolt ? NULL : mtx, wmesg, flags); if (timo) sleepq_set_timeout(ident, timo); ==== //depot/projects/smpng/sys/modules/Makefile#130 (text+ko) ==== @@ -1,4 +1,4 @@ -# $FreeBSD: src/sys/modules/Makefile,v 1.511 2006/11/11 16:49:29 trhodes Exp $ +# $FreeBSD: src/sys/modules/Makefile,v 1.512 2006/11/15 09:13:25 maxim Exp $ .include <bsd.own.mk> @@ -247,6 +247,7 @@ twe \ tx \ txp \ + uark \ uart \ ubsa \ ubsec \ ==== //depot/projects/smpng/sys/sun4v/include/asmacros.h#2 (text+ko) ==== @@ -24,7 +24,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $FreeBSD: src/sys/sun4v/include/asmacros.h,v 1.1 2006/10/05 06:14:25 kmacy Exp $ + * $FreeBSD: src/sys/sun4v/include/asmacros.h,v 1.2 2006/11/15 03:16:30 kmacy Exp $ */ #ifndef _MACHINE_ASMACROS_H_ @@ -302,6 +302,37 @@ ldxa [SBP + (6*8)]%asi, %l6; \ ldxa [SBP + (7*8)]%asi, %l7; +#define SAVE_OUTS_ASI(SBP) \ + stxa %o0, [SBP + (0*8)]%asi; \ + stxa %o1, [SBP + (1*8)]%asi; \ + stxa %o2, [SBP + (2*8)]%asi; \ + stxa %o3, [SBP + (3*8)]%asi; \ + stxa %o4, [SBP + (4*8)]%asi; \ + stxa %o5, [SBP + (5*8)]%asi; \ + stxa %o6, [SBP + (6*8)]%asi; \ >>> TRUNCATED FOR MAIL (1000 lines) <<<
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200611152140.kAFLerK2087024>