Date: Sat, 3 Apr 2004 16:58:23 -0800 (PST) From: Julian Elischer <julian@FreeBSD.org> To: Perforce Change Reviews <perforce@freebsd.org> Subject: PERFORCE change 50298 for review Message-ID: <200404040058.i340wNEq026782@repoman.freebsd.org>
next in thread | raw e-mail | index | archive | help
http://perforce.freebsd.org/chv.cgi?CH=50298 Change 50298 by julian@julian_jules1 on 2004/04/03 16:57:36 IFC Affected files ... .. //depot/projects/nsched/sys/alpha/alpha/vm_machdep.c#2 integrate .. //depot/projects/nsched/sys/alpha/include/pmap.h#2 integrate .. //depot/projects/nsched/sys/amd64/amd64/pmap.c#2 integrate .. //depot/projects/nsched/sys/amd64/amd64/support.S#2 integrate .. //depot/projects/nsched/sys/amd64/amd64/vm_machdep.c#2 integrate .. //depot/projects/nsched/sys/amd64/include/pmap.h#2 integrate .. //depot/projects/nsched/sys/boot/common/loader.8#2 integrate .. //depot/projects/nsched/sys/conf/files#3 integrate .. //depot/projects/nsched/sys/dev/ath/if_ath.c#2 integrate .. //depot/projects/nsched/sys/dev/ath/if_ath_pci.c#2 integrate .. //depot/projects/nsched/sys/dev/ath/if_athioctl.h#2 integrate .. //depot/projects/nsched/sys/dev/ath/if_athvar.h#2 integrate .. //depot/projects/nsched/sys/dev/fb/vga.c#2 integrate .. //depot/projects/nsched/sys/dev/md/md.c#2 integrate .. //depot/projects/nsched/sys/dev/uart/uart_bus_ebus.c#2 integrate .. //depot/projects/nsched/sys/i386/i386/db_interface.c#2 integrate .. //depot/projects/nsched/sys/i386/i386/elan-mmcr.c#2 integrate .. //depot/projects/nsched/sys/i386/i386/uio_machdep.c#2 integrate .. //depot/projects/nsched/sys/i386/i386/vm_machdep.c#2 integrate .. //depot/projects/nsched/sys/i386/include/cpufunc.h#2 integrate .. //depot/projects/nsched/sys/ia64/ia64/vm_machdep.c#2 integrate .. //depot/projects/nsched/sys/kern/imgact_elf.c#2 integrate .. //depot/projects/nsched/sys/kern/kern_fork.c#3 integrate .. //depot/projects/nsched/sys/kern/kern_thr.c#3 integrate .. //depot/projects/nsched/sys/kern/kern_thread.c#3 integrate .. //depot/projects/nsched/sys/kern/uipc_cow.c#2 integrate .. //depot/projects/nsched/sys/kern/uipc_syscalls.c#2 integrate .. //depot/projects/nsched/sys/net80211/ieee80211_input.c#2 integrate .. //depot/projects/nsched/sys/net80211/ieee80211_node.c#2 integrate .. //depot/projects/nsched/sys/net80211/ieee80211_node.h#2 integrate .. //depot/projects/nsched/sys/net80211/ieee80211_output.c#2 integrate .. //depot/projects/nsched/sys/net80211/ieee80211_var.h#2 integrate .. //depot/projects/nsched/sys/netipsec/xform_tcp.c#1 branch .. //depot/projects/nsched/sys/nfsclient/nfs_vnops.c#2 integrate .. //depot/projects/nsched/sys/pci/agp_ali.c#2 integrate .. //depot/projects/nsched/sys/pci/agp_amd.c#2 integrate .. //depot/projects/nsched/sys/pci/agp_i810.c#2 integrate .. //depot/projects/nsched/sys/pci/agp_intel.c#2 integrate .. //depot/projects/nsched/sys/pci/agp_nvidia.c#2 integrate .. //depot/projects/nsched/sys/pci/agp_sis.c#2 integrate .. //depot/projects/nsched/sys/pci/agp_via.c#2 integrate .. //depot/projects/nsched/sys/pci/if_rl.c#2 integrate .. //depot/projects/nsched/sys/pci/if_ste.c#2 integrate .. //depot/projects/nsched/sys/pci/if_stereg.h#2 integrate .. //depot/projects/nsched/sys/powerpc/powerpc/vm_machdep.c#2 integrate .. //depot/projects/nsched/sys/sparc64/sparc64/uio_machdep.c#2 integrate .. //depot/projects/nsched/sys/sparc64/sparc64/vm_machdep.c#2 integrate .. //depot/projects/nsched/sys/sys/proc.h#3 integrate .. //depot/projects/nsched/sys/sys/sf_buf.h#2 integrate .. //depot/projects/nsched/sys/ufs/ffs/fs.h#2 integrate Differences ... ==== //depot/projects/nsched/sys/alpha/alpha/vm_machdep.c#2 (text+ko) ==== @@ -67,7 +67,7 @@ */ #include <sys/cdefs.h> -__FBSDID("$FreeBSD: src/sys/alpha/alpha/vm_machdep.c,v 1.101 2004/03/29 02:01:42 kensmith Exp $"); +__FBSDID("$FreeBSD: src/sys/alpha/alpha/vm_machdep.c,v 1.102 2004/04/03 09:16:24 alc Exp $"); #include <sys/param.h> #include <sys/systm.h> @@ -405,7 +405,7 @@ * Get an sf_buf from the freelist. Will block if none are available. */ struct sf_buf * -sf_buf_alloc(struct vm_page *m) +sf_buf_alloc(struct vm_page *m, int pri) { struct sf_buf *sf; int error; @@ -414,7 +414,7 @@ while ((sf = SLIST_FIRST(&sf_freelist.sf_head)) == NULL) { sf_buf_alloc_want++; mbstat.sf_allocwait++; - error = msleep(&sf_freelist, &sf_freelist.sf_lock, PVM|PCATCH, + error = msleep(&sf_freelist, &sf_freelist.sf_lock, PVM | pri, "sfbufa", 0); sf_buf_alloc_want--; ==== //depot/projects/nsched/sys/alpha/include/pmap.h#2 (text+ko) ==== @@ -43,7 +43,7 @@ * from: hp300: @(#)pmap.h 7.2 (Berkeley) 12/16/90 * from: @(#)pmap.h 7.4 (Berkeley) 5/12/91 * from: i386 pmap.h,v 1.54 1997/11/20 19:30:35 bde Exp - * $FreeBSD: src/sys/alpha/include/pmap.h,v 1.25 2004/03/07 07:13:15 alc Exp $ + * $FreeBSD: src/sys/alpha/include/pmap.h,v 1.26 2004/04/03 21:38:20 alc Exp $ */ #ifndef _MACHINE_PMAP_H_ @@ -208,8 +208,6 @@ #ifdef _KERNEL -extern caddr_t CADDR1; -extern pt_entry_t *CMAP1; extern vm_offset_t avail_end; extern vm_offset_t avail_start; extern vm_offset_t phys_avail[]; ==== //depot/projects/nsched/sys/amd64/amd64/pmap.c#2 (text+ko) ==== @@ -75,7 +75,7 @@ */ #include <sys/cdefs.h> -__FBSDID("$FreeBSD: src/sys/amd64/amd64/pmap.c,v 1.454 2004/03/31 02:03:48 alc Exp $"); +__FBSDID("$FreeBSD: src/sys/amd64/amd64/pmap.c,v 1.455 2004/04/03 20:53:49 alc Exp $"); /* * Manages physical address maps. @@ -200,8 +200,7 @@ * All those kernel PT submaps that BSD is so fond of */ pt_entry_t *CMAP1 = 0; -static pt_entry_t *ptmmap; -caddr_t CADDR1 = 0, ptvmmap = 0; +caddr_t CADDR1 = 0; static pt_entry_t *msgbufmap; struct msgbuf *msgbufp = 0; @@ -507,12 +506,6 @@ SYSMAP(caddr_t, pt_crashdumpmap, crashdumpmap, MAXDUMPPGS); /* - * ptvmmap is used for reading arbitrary physical pages via /dev/mem. - * XXX ptmmap is not used. - */ - SYSMAP(caddr_t, ptmmap, ptvmmap, 1) - - /* * msgbufp is used to map the system message buffer. * XXX msgbufmap is not used. */ ==== //depot/projects/nsched/sys/amd64/amd64/support.S#2 (text+ko) ==== @@ -31,7 +31,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $FreeBSD: src/sys/amd64/amd64/support.S,v 1.106 2004/03/31 02:03:49 alc Exp $ + * $FreeBSD: src/sys/amd64/amd64/support.S,v 1.107 2004/04/03 05:33:10 alc Exp $ */ #include "opt_ddb.h" @@ -76,15 +76,15 @@ /* Address: %rdi */ ENTRY(pagezero) - lea 4096(%rdi),%rsi + movq $-PAGE_SIZE,%rdx + subq %rdx,%rdi xorq %rax,%rax 1: - movnti %rax,(%rdi) - movnti %rax,8(%rdi) - movnti %rax,16(%rdi) - movnti %rax,24(%rdi) - addq $32,%rdi - cmpq %rsi,%rdi + movnti %rax,(%rdi,%rdx) + movnti %rax,8(%rdi,%rdx) + movnti %rax,16(%rdi,%rdx) + movnti %rax,24(%rdi,%rdx) + addq $32,%rdx jne 1b sfence retq ==== //depot/projects/nsched/sys/amd64/amd64/vm_machdep.c#2 (text+ko) ==== @@ -41,7 +41,7 @@ */ #include <sys/cdefs.h> -__FBSDID("$FreeBSD: src/sys/amd64/amd64/vm_machdep.c,v 1.231 2004/03/29 19:38:05 peter Exp $"); +__FBSDID("$FreeBSD: src/sys/amd64/amd64/vm_machdep.c,v 1.232 2004/04/03 09:16:25 alc Exp $"); #include "opt_isa.h" #include "opt_cpu.h" @@ -460,7 +460,7 @@ * Get an sf_buf from the freelist. Will block if none are available. */ struct sf_buf * -sf_buf_alloc(struct vm_page *m) +sf_buf_alloc(struct vm_page *m, int pri) { struct sf_buf *sf; int error; @@ -469,7 +469,7 @@ while ((sf = SLIST_FIRST(&sf_freelist.sf_head)) == NULL) { sf_buf_alloc_want++; mbstat.sf_allocwait++; - error = msleep(&sf_freelist, &sf_freelist.sf_lock, PVM|PCATCH, + error = msleep(&sf_freelist, &sf_freelist.sf_lock, PVM | pri, "sfbufa", 0); sf_buf_alloc_want--; ==== //depot/projects/nsched/sys/amd64/include/pmap.h#2 (text+ko) ==== @@ -43,7 +43,7 @@ * * from: hp300: @(#)pmap.h 7.2 (Berkeley) 12/16/90 * from: @(#)pmap.h 7.4 (Berkeley) 5/12/91 - * $FreeBSD: src/sys/amd64/include/pmap.h,v 1.110 2004/03/07 07:13:15 alc Exp $ + * $FreeBSD: src/sys/amd64/include/pmap.h,v 1.111 2004/04/03 20:53:50 alc Exp $ */ #ifndef _MACHINE_PMAP_H_ @@ -263,7 +263,6 @@ extern vm_paddr_t avail_end; extern vm_paddr_t avail_start; extern vm_paddr_t phys_avail[]; -extern char *ptvmmap; /* poor name! */ extern vm_offset_t virtual_avail; extern vm_offset_t virtual_end; ==== //depot/projects/nsched/sys/boot/common/loader.8#2 (text+ko) ==== @@ -22,7 +22,7 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.\" $FreeBSD: src/sys/boot/common/loader.8,v 1.58 2004/01/27 15:59:38 des Exp $ +.\" $FreeBSD: src/sys/boot/common/loader.8,v 1.59 2004/04/03 12:14:30 le Exp $ .\" .\" Note: The date here should be updated whenever a non-trivial .\" change is made to the manual page. @@ -493,12 +493,12 @@ .Va TCBHASHSIZE or the preset default of 512. Must be a power of 2. -.El .It Va vm.kmem_size Sets the size of kernel memory (bytes). This overrides the value determined when the kernel was compiled. Modifies .Va VM_KMEM_SIZE . +.El .Ss BUILTIN PARSER When a builtin command is executed, the rest of the line is taken by it as arguments, and it is processed by a special parser which ==== //depot/projects/nsched/sys/conf/files#3 (text+ko) ==== @@ -1,4 +1,4 @@ -# $FreeBSD: src/sys/conf/files,v 1.880 2004/04/01 17:55:50 des Exp $ +# $FreeBSD: src/sys/conf/files,v 1.881 2004/04/03 18:42:05 phk Exp $ # # The long compile-with and dependency lines are required because of # limitations in config: backslash-newline doesn't work in strings, and @@ -499,7 +499,7 @@ dev/joy/joy.c optional joy dev/joy/joy_isa.c optional joy isa dev/joy/joy_pccard.c optional joy pccard -dev/led/led.c optional cpu_soekris +dev/led/led.c standard dev/lge/if_lge.c optional lge dev/lnc/if_lnc.c optional lnc dev/lnc/if_lnc_pci.c optional lnc pci ==== //depot/projects/nsched/sys/dev/ath/if_ath.c#2 (text+ko) ==== @@ -1,5 +1,5 @@ /*- - * Copyright (c) 2002, 2003 Sam Leffler, Errno Consulting + * Copyright (c) 2002-2004 Sam Leffler, Errno Consulting * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -35,7 +35,7 @@ */ #include <sys/cdefs.h> -__FBSDID("$FreeBSD: src/sys/dev/ath/if_ath.c,v 1.47 2004/04/01 00:38:45 sam Exp $"); +__FBSDID("$FreeBSD: src/sys/dev/ath/if_ath.c,v 1.53 2004/04/03 00:06:23 sam Exp $"); /* * Driver for the Atheros Wireless LAN controller. @@ -270,7 +270,6 @@ TASK_INIT(&sc->sc_txtask, 0, ath_tx_proc, sc); TASK_INIT(&sc->sc_rxtask, 0, ath_rx_proc, sc); - TASK_INIT(&sc->sc_swbatask, 0, ath_beacon_proc, sc); TASK_INIT(&sc->sc_rxorntask, 0, ath_rxorn_proc, sc); TASK_INIT(&sc->sc_fataltask, 0, ath_fatal_proc, sc); TASK_INIT(&sc->sc_bmisstask, 0, ath_bmiss_proc, sc); @@ -288,7 +287,7 @@ ); if (sc->sc_txhalq == (u_int) -1) { if_printf(ifp, "unable to setup a data xmit queue!\n"); - goto bad; + goto bad2; } sc->sc_bhalq = ath_hal_setuptxqueue(ah, HAL_TX_QUEUE_BEACON, @@ -296,7 +295,7 @@ ); if (sc->sc_bhalq == (u_int) -1) { if_printf(ifp, "unable to setup a beacon xmit queue!\n"); - goto bad; + goto bad2; } ifp->if_softc = sc; @@ -317,7 +316,7 @@ | IEEE80211_C_HOSTAP /* hostap mode */ | IEEE80211_C_MONITOR /* monitor mode */ | IEEE80211_C_SHPREAMBLE /* short preamble supported */ - | IEEE80211_C_RCVMGT; /* recv management frames */ + ; /* get mac address from hardware */ ath_hal_getmac(ah, ic->ic_myaddr); @@ -326,7 +325,9 @@ ieee80211_ifattach(ifp); /* override default methods */ ic->ic_node_alloc = ath_node_alloc; + sc->sc_node_free = ic->ic_node_free; ic->ic_node_free = ath_node_free; + sc->sc_node_copy = ic->ic_node_copy; ic->ic_node_copy = ath_node_copy; ic->ic_node_getrssi = ath_node_getrssi; sc->sc_newstate = ic->ic_newstate; @@ -355,6 +356,8 @@ sc->sc_rx_th.wr_ihdr.it_present = htole32(ATH_RX_RADIOTAP_PRESENT); return 0; +bad2: + ath_desc_free(sc); bad: if (ah) ath_hal_detach(ah); @@ -432,6 +435,8 @@ DPRINTF(ATH_DEBUG_ANY, ("%s: invalid; ignored\n", __func__)); return; } + if (!ath_hal_intrpend(ah)) /* shared irq, not for us */ + return; if ((ifp->if_flags & (IFF_RUNNING|IFF_UP)) != (IFF_RUNNING|IFF_UP)) { DPRINTF(ATH_DEBUG_ANY, ("%s: if_flags 0x%x\n", __func__, ifp->if_flags)); @@ -476,8 +481,14 @@ taskqueue_enqueue(taskqueue_swi, &sc->sc_rxtask); if (status & HAL_INT_TX) taskqueue_enqueue(taskqueue_swi, &sc->sc_txtask); - if (status & HAL_INT_SWBA) - taskqueue_enqueue(taskqueue_swi, &sc->sc_swbatask); + if (status & HAL_INT_SWBA) { + /* + * Handle beacon transmission directly; deferring + * this is too slow to meet timing constraints + * under load. + */ + ath_beacon_proc(sc, 0); + } if (status & HAL_INT_BMISS) { sc->sc_stats.ast_bmiss++; taskqueue_enqueue(taskqueue_swi, &sc->sc_bmisstask); @@ -1507,14 +1518,18 @@ if (bf->bf_node == ni) bf->bf_node = NULL; } - free(ni, M_DEVBUF); + (*sc->sc_node_free)(ic, ni); } static void ath_node_copy(struct ieee80211com *ic, struct ieee80211_node *dst, const struct ieee80211_node *src) { - *(struct ath_node *)dst = *(const struct ath_node *)src; + struct ath_softc *sc = ic->ic_if.if_softc; + + memcpy(&dst[1], &src[1], + sizeof(struct ath_node) - sizeof(struct ieee80211_node)); + (*sc->sc_node_copy)(ic, dst, src); } ==== //depot/projects/nsched/sys/dev/ath/if_ath_pci.c#2 (text+ko) ==== @@ -1,5 +1,5 @@ /*- - * Copyright (c) 2002, 2003 Sam Leffler, Errno Consulting + * Copyright (c) 2002-2004 Sam Leffler, Errno Consulting * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -35,7 +35,7 @@ */ #include <sys/cdefs.h> -__FBSDID("$FreeBSD: src/sys/dev/ath/if_ath_pci.c,v 1.7 2004/03/17 17:50:27 njl Exp $"); +__FBSDID("$FreeBSD: src/sys/dev/ath/if_ath_pci.c,v 1.8 2004/04/02 23:57:10 sam Exp $"); /* * PCI/Cardbus front-end for the Atheros Wireless LAN controller driver. ==== //depot/projects/nsched/sys/dev/ath/if_athioctl.h#2 (text+ko) ==== @@ -1,5 +1,5 @@ /*- - * Copyright (c) 2002, 2003 Sam Leffler, Errno Consulting + * Copyright (c) 2002-2004 Sam Leffler, Errno Consulting * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -33,7 +33,7 @@ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF * THE POSSIBILITY OF SUCH DAMAGES. * - * $FreeBSD: src/sys/dev/ath/if_athioctl.h,v 1.5 2003/12/28 07:00:32 sam Exp $ + * $FreeBSD: src/sys/dev/ath/if_athioctl.h,v 1.7 2004/04/02 23:57:10 sam Exp $ */ /* @@ -70,6 +70,8 @@ u_int32_t ast_tx_rts; /* tx frames with rts enabled */ u_int32_t ast_tx_cts; /* tx frames with cts enabled */ u_int32_t ast_tx_shortpre;/* tx frames with short preamble */ + u_int32_t ast_tx_altrate; /* tx frames with alternate rate */ + u_int32_t ast_tx_protect; /* tx frames with protection */ u_int32_t ast_rx_nombuf; /* rx setup failed 'cuz no mbuf */ u_int32_t ast_rx_busdma; /* rx setup failed for dma resrcs */ u_int32_t ast_rx_orn; /* rx failed 'cuz of desc overrun */ @@ -79,6 +81,7 @@ u_int32_t ast_rx_phyerr; /* rx failed 'cuz of PHY err */ u_int32_t ast_rx_phy[32]; /* rx PHY error per-code counts */ u_int32_t ast_rx_tooshort;/* rx discarded 'cuz frame too short */ + u_int32_t ast_rx_toobig; /* rx discarded 'cuz frame too large */ u_int32_t ast_rx_ctl; /* rx discarded 'cuz ctl frame */ u_int32_t ast_be_nombuf; /* beacon setup failed 'cuz no mbuf */ u_int32_t ast_per_cal; /* periodic calibration calls */ ==== //depot/projects/nsched/sys/dev/ath/if_athvar.h#2 (text+ko) ==== @@ -1,5 +1,5 @@ /*- - * Copyright (c) 2002, 2003 Sam Leffler, Errno Consulting + * Copyright (c) 2002-2004 Sam Leffler, Errno Consulting * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -33,7 +33,7 @@ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF * THE POSSIBILITY OF SUCH DAMAGES. * - * $FreeBSD: src/sys/dev/ath/if_athvar.h,v 1.11 2004/04/01 00:38:45 sam Exp $ + * $FreeBSD: src/sys/dev/ath/if_athvar.h,v 1.14 2004/04/03 03:33:02 sam Exp $ */ /* @@ -93,6 +93,11 @@ struct ieee80211com sc_ic; /* IEEE 802.11 common */ int (*sc_newstate)(struct ieee80211com *, enum ieee80211_state, int); + void (*sc_node_free)(struct ieee80211com *, + struct ieee80211_node *); + void (*sc_node_copy)(struct ieee80211com *, + struct ieee80211_node *, + const struct ieee80211_node *); device_t sc_dev; bus_space_tag_t sc_st; /* bus space tag */ bus_space_handle_t sc_sh; /* bus space handle */ @@ -147,7 +152,6 @@ u_int sc_bhalq; /* HAL q for outgoing beacons */ struct ath_buf *sc_bcbuf; /* beacon buffer */ struct ath_buf *sc_bufptr; /* allocated buffer ptr */ - struct task sc_swbatask; /* swba int processing */ struct task sc_bmisstask; /* bmiss int processing */ struct callout sc_cal_ch; /* callout handle for cals */ ==== //depot/projects/nsched/sys/dev/fb/vga.c#2 (text+ko) ==== @@ -29,7 +29,7 @@ */ #include <sys/cdefs.h> -__FBSDID("$FreeBSD: src/sys/dev/fb/vga.c,v 1.28 2003/08/24 17:46:06 obrien Exp $"); +__FBSDID("$FreeBSD: src/sys/dev/fb/vga.c,v 1.29 2004/04/03 15:28:25 nectar Exp $"); #include "opt_vga.h" #include "opt_fb.h" @@ -2854,7 +2854,8 @@ u_char *g; u_char *b; - if ((base < 0) || (base >= 256) || (base + count > 256)) + if (count < 0 || base < 0 || count > 256 || base > 256 || + base + count > 256) return EINVAL; r = malloc(count*3, M_DEVBUF, M_WAITOK); @@ -2885,7 +2886,8 @@ u_char *b; int err; - if ((base < 0) || (base >= 256) || (base + count > 256)) + if (count < 0 || base < 0 || count > 256 || base > 256 || + base + count > 256) return EINVAL; r = malloc(count*3, M_DEVBUF, M_WAITOK); ==== //depot/projects/nsched/sys/dev/md/md.c#2 (text+ko) ==== @@ -6,7 +6,7 @@ * this stuff is worth it, you can buy me a beer in return. Poul-Henning Kamp * ---------------------------------------------------------------------------- * - * $FreeBSD: src/sys/dev/md/md.c,v 1.119 2004/03/31 21:48:02 luigi Exp $ + * $FreeBSD: src/sys/dev/md/md.c,v 1.120 2004/04/03 09:16:25 alc Exp $ * */ @@ -546,7 +546,7 @@ m = vm_page_grab(sc->object, i, VM_ALLOC_NORMAL|VM_ALLOC_RETRY); VM_OBJECT_UNLOCK(sc->object); - sf = sf_buf_alloc(m); + sf = sf_buf_alloc(m, 0); VM_OBJECT_LOCK(sc->object); if (bp->bio_cmd == BIO_READ) { if (m->valid != VM_PAGE_BITS_ALL) ==== //depot/projects/nsched/sys/dev/uart/uart_bus_ebus.c#2 (text+ko) ==== @@ -25,7 +25,7 @@ */ #include <sys/cdefs.h> -__FBSDID("$FreeBSD: src/sys/dev/uart/uart_bus_ebus.c,v 1.2 2003/09/26 05:14:56 marcel Exp $"); +__FBSDID("$FreeBSD: src/sys/dev/uart/uart_bus_ebus.c,v 1.3 2004/04/03 23:02:02 marcel Exp $"); #include <sys/param.h> #include <sys/systm.h> @@ -61,7 +61,7 @@ static int uart_ebus_probe(device_t dev) { - const char *nm; + const char *nm, *cmpt; struct uart_softc *sc; int error; @@ -69,7 +69,9 @@ sc->sc_class = NULL; nm = ebus_get_name(dev); - if (!strcmp(nm, "su")) { + cmpt = ebus_get_compat(dev); + if (!strcmp(nm, "su") || !strcmp(nm, "su_pnp") || (cmpt != NULL && + (!strcmp(cmpt, "su") || !strcmp(cmpt, "su16550")))) { sc->sc_class = &uart_ns8250_class; return (uart_bus_probe(dev, 0, 0, 0, 0)); } ==== //depot/projects/nsched/sys/i386/i386/db_interface.c#2 (text+ko) ==== @@ -25,7 +25,7 @@ */ #include <sys/cdefs.h> -__FBSDID("$FreeBSD: src/sys/i386/i386/db_interface.c,v 1.80 2004/03/12 21:45:29 trhodes Exp $"); +__FBSDID("$FreeBSD: src/sys/i386/i386/db_interface.c,v 1.81 2004/04/03 22:23:36 marcel Exp $"); /* * Interface to new debugger. @@ -60,19 +60,6 @@ static jmp_buf db_global_jmpbuf; -static __inline u_short -rss(void) -{ - u_short ss; -#if defined(__GNUC__) || defined(__INTEL_COMPILER) - __asm __volatile("mov %%ss,%0" : "=r" (ss)); -#else -#error Function rss() needs to get ported to this compiler. - ss = 0; /* XXXX Fix for other compilers. */ -#endif - return ss; -} - /* * kdb_trap - field a TRACE or BPT trap */ ==== //depot/projects/nsched/sys/i386/i386/elan-mmcr.c#2 (text+ko) ==== @@ -39,7 +39,7 @@ */ #include <sys/cdefs.h> -__FBSDID("$FreeBSD: src/sys/i386/i386/elan-mmcr.c,v 1.26 2004/03/15 21:47:34 phk Exp $"); +__FBSDID("$FreeBSD: src/sys/i386/i386/elan-mmcr.c,v 1.27 2004/04/03 18:42:52 phk Exp $"); #include "opt_cpu.h" #include <sys/param.h> @@ -77,7 +77,6 @@ static u_int echo_a, echo_d; #endif /* CPU_ELAN_PPS */ -#ifdef CPU_SOEKRIS static u_int led_cookie[32]; static dev_t led_dev[32]; @@ -93,7 +92,6 @@ v ^= 0xc; mmcrptr[v / 2] = u; } -#endif static int sysctl_machdep_elan_gpio_config(SYSCTL_HANDLER_ARGS) @@ -117,7 +115,9 @@ /* Disallow any disabled pins and count pps and echo */ np = ne = 0; for (i = 0; i < 32; i++) { - if (gpio_config[i] == '-' && (buf[i] != '-' && buf[i] != '.')) + if (gpio_config[i] == '-' && buf[i] == '.') + buf[i] = gpio_config[i]; + if (gpio_config[i] == '-' && buf[i] != '-') return (EPERM); if (buf[i] == 'P') { np++; @@ -149,12 +149,15 @@ else v = 0; #ifdef CPU_SOEKRIS + if (i == 9) + ; + else +#endif if (buf[i] != 'l' && buf[i] != 'L' && led_dev[i] != NULL) { led_destroy(led_dev[i]); led_dev[i] = NULL; mmcrptr[(0xc2a + v) / 2] &= ~u; } -#endif switch (buf[i]) { #ifdef CPU_ELAN_PPS case 'P': @@ -177,7 +180,6 @@ gpio_config[i] = buf[i]; break; #endif /* CPU_ELAN_PPS */ -#ifdef CPU_SOEKRIS case 'l': case 'L': if (buf[i] == 'L') @@ -192,7 +194,6 @@ mmcrptr[(0xc2a + v) / 2] |= u; gpio_config[i] = buf[i]; break; -#endif case '.': gpio_config[i] = buf[i]; break; ==== //depot/projects/nsched/sys/i386/i386/uio_machdep.c#2 (text+ko) ==== @@ -40,7 +40,7 @@ */ #include <sys/cdefs.h> -__FBSDID("$FreeBSD: src/sys/i386/i386/uio_machdep.c,v 1.1 2004/03/21 20:28:36 alc Exp $"); +__FBSDID("$FreeBSD: src/sys/i386/i386/uio_machdep.c,v 1.2 2004/04/03 09:16:25 alc Exp $"); #include <sys/param.h> #include <sys/kernel.h> @@ -92,7 +92,7 @@ cnt = n; page_offset = offset & PAGE_MASK; cnt = min(cnt, PAGE_SIZE - page_offset); - sf = sf_buf_alloc(ma[offset >> PAGE_SHIFT]); + sf = sf_buf_alloc(ma[offset >> PAGE_SHIFT], 0); cp = (char *)sf_buf_kva(sf) + page_offset; switch (uio->uio_segflg) { case UIO_USERSPACE: ==== //depot/projects/nsched/sys/i386/i386/vm_machdep.c#2 (text+ko) ==== @@ -41,7 +41,7 @@ */ #include <sys/cdefs.h> -__FBSDID("$FreeBSD: src/sys/i386/i386/vm_machdep.c,v 1.234 2004/03/29 19:38:05 peter Exp $"); +__FBSDID("$FreeBSD: src/sys/i386/i386/vm_machdep.c,v 1.235 2004/04/03 09:16:25 alc Exp $"); #include "opt_isa.h" #include "opt_npx.h" @@ -606,7 +606,7 @@ * Get an sf_buf from the freelist. Will block if none are available. */ struct sf_buf * -sf_buf_alloc(struct vm_page *m) +sf_buf_alloc(struct vm_page *m, int pri) { struct sf_head *hash_list; struct sf_buf *sf; @@ -628,7 +628,7 @@ while ((sf = TAILQ_FIRST(&sf_buf_freelist)) == NULL) { sf_buf_alloc_want++; mbstat.sf_allocwait++; - error = msleep(&sf_buf_freelist, &sf_buf_lock, PVM|PCATCH, + error = msleep(&sf_buf_freelist, &sf_buf_lock, PVM | pri, "sfbufa", 0); sf_buf_alloc_want--; ==== //depot/projects/nsched/sys/i386/include/cpufunc.h#2 (text+ko) ==== @@ -30,7 +30,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $FreeBSD: src/sys/i386/include/cpufunc.h,v 1.140 2004/03/12 21:45:30 trhodes Exp $ + * $FreeBSD: src/sys/i386/include/cpufunc.h,v 1.141 2004/04/03 22:23:36 marcel Exp $ */ /* @@ -456,6 +456,14 @@ return (sel); } +static __inline u_int +rss(void) +{ + u_int sel; + __asm __volatile("movl %%ss,%0" : "=rm" (sel)); + return (sel); +} + static __inline void load_fs(u_int sel) { ==== //depot/projects/nsched/sys/ia64/ia64/vm_machdep.c#2 (text+ko) ==== @@ -38,7 +38,7 @@ * * from: @(#)vm_machdep.c 7.3 (Berkeley) 5/13/91 * Utah $Hdr: vm_machdep.c 1.16.1.1 89/06/23$ - * $FreeBSD: src/sys/ia64/ia64/vm_machdep.c,v 1.81 2004/03/27 17:44:25 marcel Exp $ + * $FreeBSD: src/sys/ia64/ia64/vm_machdep.c,v 1.82 2004/04/03 09:16:26 alc Exp $ */ /* * Copyright (c) 1994, 1995, 1996 Carnegie-Mellon University. @@ -344,7 +344,7 @@ * Get an sf_buf from the freelist. Will block if none are available. */ struct sf_buf * -sf_buf_alloc(struct vm_page *m) +sf_buf_alloc(struct vm_page *m, int pri) { struct sf_buf *sf; int error; @@ -353,7 +353,7 @@ while ((sf = SLIST_FIRST(&sf_freelist.sf_head)) == NULL) { sf_buf_alloc_want++; mbstat.sf_allocwait++; - error = msleep(&sf_freelist, &sf_freelist.sf_lock, PVM|PCATCH, + error = msleep(&sf_freelist, &sf_freelist.sf_lock, PVM | pri, "sfbufa", 0); sf_buf_alloc_want--; ==== //depot/projects/nsched/sys/kern/imgact_elf.c#2 (text+ko) ==== @@ -29,7 +29,7 @@ */ #include <sys/cdefs.h> -__FBSDID("$FreeBSD: src/sys/kern/imgact_elf.c,v 1.145 2004/03/18 16:33:05 nectar Exp $"); +__FBSDID("$FreeBSD: src/sys/kern/imgact_elf.c,v 1.146 2004/04/03 20:25:41 marcel Exp $"); #include <sys/param.h> #include <sys/exec.h> @@ -922,8 +922,7 @@ static void each_writable_segment(struct proc *, segment_callback, void *); static int __elfN(corehdr)(struct thread *, struct vnode *, struct ucred *, int, void *, size_t); -static void __elfN(puthdr)(struct proc *, void *, size_t *, - const prstatus_t *, const prfpregset_t *, const prpsinfo_t *, int); +static void __elfN(puthdr)(struct proc *, void *, size_t *, int); static void __elfN(putnote)(void *, size_t *, const char *, int, const void *, size_t); @@ -953,9 +952,7 @@ * size is calculated. */ hdrsize = 0; - __elfN(puthdr)((struct proc *)NULL, (void *)NULL, &hdrsize, - (const prstatus_t *)NULL, (const prfpregset_t *)NULL, - (const prpsinfo_t *)NULL, seginfo.count); + __elfN(puthdr)(p, (void *)NULL, &hdrsize, seginfo.count); if (hdrsize + seginfo.size >= limit) return (EFAULT); @@ -1115,48 +1112,14 @@ size_t hdrsize; void *hdr; { - struct { - prstatus_t status; - prfpregset_t fpregset; - prpsinfo_t psinfo; - } *tempdata; struct proc *p = td->td_proc; size_t off; - prstatus_t *status; - prfpregset_t *fpregset; - prpsinfo_t *psinfo; - - tempdata = malloc(sizeof(*tempdata), M_TEMP, M_ZERO | M_WAITOK); - status = &tempdata->status; - fpregset = &tempdata->fpregset; - psinfo = &tempdata->psinfo; - - /* Gather the information for the header. */ - status->pr_version = PRSTATUS_VERSION; - status->pr_statussz = sizeof(prstatus_t); - status->pr_gregsetsz = sizeof(gregset_t); - status->pr_fpregsetsz = sizeof(fpregset_t); - status->pr_osreldate = osreldate; - status->pr_cursig = p->p_sig; - status->pr_pid = p->p_pid; - fill_regs(td, &status->pr_reg); - - fill_fpregs(td, fpregset); - psinfo->pr_version = PRPSINFO_VERSION; - psinfo->pr_psinfosz = sizeof(prpsinfo_t); - strlcpy(psinfo->pr_fname, p->p_comm, sizeof(psinfo->pr_fname)); - - /* XXX - We don't fill in the command line arguments properly yet. */ - strlcpy(psinfo->pr_psargs, p->p_comm, sizeof(psinfo->pr_psargs)); - /* Fill in the header. */ bzero(hdr, hdrsize); off = 0; - __elfN(puthdr)(p, hdr, &off, status, fpregset, psinfo, numsegs); + __elfN(puthdr)(p, hdr, &off, numsegs); - free(tempdata, M_TEMP); - /* Write it to the core file. */ return (vn_rdwr_inchunks(UIO_WRITE, vp, hdr, hdrsize, (off_t)0, UIO_SYSSPACE, IO_UNIT | IO_DIRECT, cred, NOCRED, NULL, @@ -1164,13 +1127,18 @@ } static void -__elfN(puthdr)(struct proc *p, void *dst, size_t *off, const prstatus_t *status, - const prfpregset_t *fpregset, const prpsinfo_t *psinfo, int numsegs) +__elfN(puthdr)(struct proc *p, void *dst, size_t *off, int numsegs) { - size_t ehoff; - size_t phoff; - size_t noteoff; - size_t notesz; + struct { + prstatus_t status; + prfpregset_t fpregset; + prpsinfo_t psinfo; + } *tempdata; + prstatus_t *status; + prfpregset_t *fpregset; + prpsinfo_t *psinfo; + struct thread *first, *thr; + size_t ehoff, noteoff, notesz, phoff; ehoff = *off; *off += sizeof(Elf_Ehdr); @@ -1179,14 +1147,77 @@ *off += (numsegs + 1) * sizeof(Elf_Phdr); noteoff = *off; - __elfN(putnote)(dst, off, "FreeBSD", NT_PRSTATUS, status, - sizeof *status); - __elfN(putnote)(dst, off, "FreeBSD", NT_FPREGSET, fpregset, - sizeof *fpregset); + /* + * Don't allocate space for the notes if we're just calculating + * the size of the header. We also don't collect the data. + */ + if (dst != NULL) { + tempdata = malloc(sizeof(*tempdata), M_TEMP, M_ZERO|M_WAITOK); + status = &tempdata->status; + fpregset = &tempdata->fpregset; + psinfo = &tempdata->psinfo; + } else { + tempdata = NULL; + status = NULL; + fpregset = NULL; + psinfo = NULL; + } + + if (dst != NULL) { + psinfo->pr_version = PRPSINFO_VERSION; + psinfo->pr_psinfosz = sizeof(prpsinfo_t); + strlcpy(psinfo->pr_fname, p->p_comm, sizeof(psinfo->pr_fname)); + /* + * XXX - We don't fill in the command line arguments properly + * yet. + */ + strlcpy(psinfo->pr_psargs, p->p_comm, + sizeof(psinfo->pr_psargs)); + } __elfN(putnote)(dst, off, "FreeBSD", NT_PRPSINFO, psinfo, sizeof *psinfo); + + /* + * We want to start with the registers of the first thread in the + * process so that the .reg and .reg2 pseudo-sections created by bfd + * will be identical to the .reg/$PID and .reg2/$PID pseudo-sections. + * This makes sure that any tool that only looks for .reg and .reg2 + * and not for .reg/$PID and .reg2/$PID will behave the same as + * before. The first thread is the thread with an ID equal to the + * process' ID. + */ + first = TAILQ_FIRST(&p->p_threads); + while (first->td_tid > PID_MAX) + first = TAILQ_NEXT(first, td_plist); + thr = first; + do { + if (dst != NULL) { + status->pr_version = PRSTATUS_VERSION; + status->pr_statussz = sizeof(prstatus_t); + status->pr_gregsetsz = sizeof(gregset_t); + status->pr_fpregsetsz = sizeof(fpregset_t); + status->pr_osreldate = osreldate; + status->pr_cursig = p->p_sig; + status->pr_pid = thr->td_tid; + fill_regs(thr, &status->pr_reg); + fill_fpregs(thr, fpregset); + } + __elfN(putnote)(dst, off, "FreeBSD", NT_PRSTATUS, status, + sizeof *status); + __elfN(putnote)(dst, off, "FreeBSD", NT_FPREGSET, fpregset, + sizeof *fpregset); + /* XXX allow for MD specific notes. */ + thr = (thr == first) ? TAILQ_FIRST(&p->p_threads) : + TAILQ_NEXT(thr, td_plist); + if (thr == first) + thr = TAILQ_NEXT(thr, td_plist); + } while (thr != NULL); + notesz = *off - noteoff; + if (dst != NULL) + free(tempdata, M_TEMP); + /* Align up to a page boundary for the program segments. */ *off = round_page(*off); ==== //depot/projects/nsched/sys/kern/kern_fork.c#3 (text+ko) ==== @@ -39,7 +39,7 @@ */ #include <sys/cdefs.h> -__FBSDID("$FreeBSD: src/sys/kern/kern_fork.c,v 1.224 2004/03/14 02:06:27 peter Exp $"); +__FBSDID("$FreeBSD: src/sys/kern/kern_fork.c,v 1.225 2004/04/03 15:59:12 marcel Exp $"); #include "opt_ktrace.h" #include "opt_mac.h" @@ -493,6 +493,7 @@ (unsigned) RANGEOF(struct ksegrp, kg_startcopy, kg_endcopy)); #undef RANGEOF + td2->td_tid = p2->p_pid; td2->td_sigstk = td->td_sigstk; /* ==== //depot/projects/nsched/sys/kern/kern_thr.c#3 (text+ko) ==== @@ -25,7 +25,7 @@ */ >>> TRUNCATED FOR MAIL (1000 lines) <<<
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200404040058.i340wNEq026782>