From owner-p4-projects@FreeBSD.ORG Tue Jan 1 04:56:20 2008 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 5183216A419; Tue, 1 Jan 2008 04:56:20 +0000 (UTC) Delivered-To: perforce@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 1770716A417 for ; Tue, 1 Jan 2008 04:56:19 +0000 (UTC) (envelope-from jb@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id C53A113C457 for ; Tue, 1 Jan 2008 04:56:19 +0000 (UTC) (envelope-from jb@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.1/8.14.1) with ESMTP id m014uJY3077805 for ; Tue, 1 Jan 2008 04:56:19 GMT (envelope-from jb@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.1/8.14.1/Submit) id m014uJ1J077802 for perforce@freebsd.org; Tue, 1 Jan 2008 04:56:19 GMT (envelope-from jb@freebsd.org) Date: Tue, 1 Jan 2008 04:56:19 GMT Message-Id: <200801010456.m014uJ1J077802@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to jb@freebsd.org using -f From: John Birrell To: Perforce Change Reviews Cc: Subject: PERFORCE change 132219 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 01 Jan 2008 04:56:20 -0000 http://perforce.freebsd.org/chv.cgi?CH=132219 Change 132219 by jb@jb_freebsd1 on 2008/01/01 04:55:57 Add another boot menu option to boot to single user with the DTrace modules loaded (and anonymous enablings if defined). This gives me a chance to run dtrace(8) in a read-only environment on my development box without risking trashing disks when things go bump in the night. As they tend to do when messing with the affairs of wizards. Affected files ... .. //depot/projects/dtrace/src/sys/boot/forth/beastie.4th#6 edit Differences ... ==== //depot/projects/dtrace/src/sys/boot/forth/beastie.4th#6 (text+ko) ==== @@ -41,6 +41,7 @@ variable bootkey variable bootacpikey variable bootdtracekey +variable bootdtraceskey variable bootsafekey variable bootverbosekey variable bootsinglekey @@ -196,6 +197,7 @@ printmenuitem ." Boot FreeBSD in single user mode" bootsinglekey ! printmenuitem ." Boot FreeBSD with verbose logging" bootverbosekey ! printmenuitem ." Boot FreeBSD with DTrace enabled" bootdtracekey ! + printmenuitem ." Boot FreeBSD su with DTrace enabled" bootdtraceskey ! printmenuitem ." Escape to loader prompt" escapekey ! printmenuitem ." Reboot" rebootkey ! menuX @ 20 at-xy @@ -289,6 +291,11 @@ s" YES" s" dtrace_boot" setenv 0 boot then + dup bootdtraceskey @ = if + s" YES" s" dtrace_boot" setenv + s" YES" s" boot_single" setenv + 0 boot + then dup escapekey @ = if 2drop s" NO" s" autoboot_delay" setenv From owner-p4-projects@FreeBSD.ORG Tue Jan 1 04:58:22 2008 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id AB68A16A473; Tue, 1 Jan 2008 04:58:22 +0000 (UTC) Delivered-To: perforce@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 7137716A418 for ; Tue, 1 Jan 2008 04:58:22 +0000 (UTC) (envelope-from jb@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id 48D4A13C46A for ; Tue, 1 Jan 2008 04:58:22 +0000 (UTC) (envelope-from jb@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.1/8.14.1) with ESMTP id m014wLpY077873 for ; Tue, 1 Jan 2008 04:58:21 GMT (envelope-from jb@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.1/8.14.1/Submit) id m014wLQ5077870 for perforce@freebsd.org; Tue, 1 Jan 2008 04:58:21 GMT (envelope-from jb@freebsd.org) Date: Tue, 1 Jan 2008 04:58:21 GMT Message-Id: <200801010458.m014wLQ5077870@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to jb@freebsd.org using -f From: John Birrell To: Perforce Change Reviews Cc: Subject: PERFORCE change 132220 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 01 Jan 2008 04:58:22 -0000 http://perforce.freebsd.org/chv.cgi?CH=132220 Change 132220 by jb@jb_freebsd1 on 2008/01/01 04:57:36 Avoid a kernel warning about sign extension. Affected files ... .. //depot/projects/dtrace/src/contrib/opensolaris/lib/libdtrace/common/dt_subr.c#13 edit Differences ... ==== //depot/projects/dtrace/src/contrib/opensolaris/lib/libdtrace/common/dt_subr.c#13 (text) ==== @@ -479,8 +479,8 @@ { const dtrace_vector_t *v = dtp->dt_vector; -#if !defined(sun) && defined(DOODAD) - /* XXX Avoid sign extension. This shouldn't be necessary. */ +#if !defined(sun) + /* Avoid sign extension. */ val &= 0xffffffff; #endif From owner-p4-projects@FreeBSD.ORG Tue Jan 1 06:00:26 2008 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 6228716A4A6; Tue, 1 Jan 2008 06:00:26 +0000 (UTC) Delivered-To: perforce@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 27F3D16A4A0 for ; Tue, 1 Jan 2008 06:00:26 +0000 (UTC) (envelope-from jb@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id 1713A13C4D3 for ; Tue, 1 Jan 2008 06:00:26 +0000 (UTC) (envelope-from jb@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.1/8.14.1) with ESMTP id m0160PME001404 for ; Tue, 1 Jan 2008 06:00:25 GMT (envelope-from jb@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.1/8.14.1/Submit) id m0160PJu001399 for perforce@freebsd.org; Tue, 1 Jan 2008 06:00:25 GMT (envelope-from jb@freebsd.org) Date: Tue, 1 Jan 2008 06:00:25 GMT Message-Id: <200801010600.m0160PJu001399@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to jb@freebsd.org using -f From: John Birrell To: Perforce Change Reviews Cc: Subject: PERFORCE change 132221 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 01 Jan 2008 06:00:26 -0000 http://perforce.freebsd.org/chv.cgi?CH=132221 Change 132221 by jb@jb_freebsd1 on 2008/01/01 05:59:38 Move the DTrace test suite build directory over to a more conventional place. Affected files ... .. //depot/projects/dtrace/src/cddl/test/dtrace/Makefile#18 delete .. //depot/projects/dtrace/src/tools/test/README#4 edit .. //depot/projects/dtrace/src/tools/test/dtrace/Makefile#1 add Differences ... ==== //depot/projects/dtrace/src/tools/test/README#4 (text+ko) ==== @@ -8,5 +8,6 @@ Please make a subdir per program, and add a brief description to this file. devrandom Programs to test /dev/*random. +dtrace DTrace test suite malloc A program to test and benchmark malloc(). posixshm A program to test POSIX shared memory. From owner-p4-projects@FreeBSD.ORG Tue Jan 1 06:06:33 2008 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 1FB7516A41B; Tue, 1 Jan 2008 06:06:33 +0000 (UTC) Delivered-To: perforce@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id D7DCD16A41A for ; Tue, 1 Jan 2008 06:06:32 +0000 (UTC) (envelope-from jb@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id AF7DB13C457 for ; Tue, 1 Jan 2008 06:06:32 +0000 (UTC) (envelope-from jb@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.1/8.14.1) with ESMTP id m0166Wn8005940 for ; Tue, 1 Jan 2008 06:06:32 GMT (envelope-from jb@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.1/8.14.1/Submit) id m0166WxS005937 for perforce@freebsd.org; Tue, 1 Jan 2008 06:06:32 GMT (envelope-from jb@freebsd.org) Date: Tue, 1 Jan 2008 06:06:32 GMT Message-Id: <200801010606.m0166WxS005937@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to jb@freebsd.org using -f From: John Birrell To: Perforce Change Reviews Cc: Subject: PERFORCE change 132222 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 01 Jan 2008 06:06:33 -0000 http://perforce.freebsd.org/chv.cgi?CH=132222 Change 132222 by jb@jb_freebsd1 on 2008/01/01 06:05:56 Delete a hacks file I no longer use. Affected files ... .. //depot/projects/dtrace/src/sys/cddl/dev/dtrace/dtrace_hacks.h#17 delete Differences ... From owner-p4-projects@FreeBSD.ORG Tue Jan 1 06:28:56 2008 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 3A66C16A420; Tue, 1 Jan 2008 06:28:56 +0000 (UTC) Delivered-To: perforce@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 0017516A418 for ; Tue, 1 Jan 2008 06:28:55 +0000 (UTC) (envelope-from kmacy@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id E420C13C458 for ; Tue, 1 Jan 2008 06:28:55 +0000 (UTC) (envelope-from kmacy@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.1/8.14.1) with ESMTP id m016Stdk013512 for ; Tue, 1 Jan 2008 06:28:55 GMT (envelope-from kmacy@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.1/8.14.1/Submit) id m016Stcv013509 for perforce@freebsd.org; Tue, 1 Jan 2008 06:28:55 GMT (envelope-from kmacy@freebsd.org) Date: Tue, 1 Jan 2008 06:28:55 GMT Message-Id: <200801010628.m016Stcv013509@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to kmacy@freebsd.org using -f From: Kip Macy To: Perforce Change Reviews Cc: Subject: PERFORCE change 132223 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 01 Jan 2008 06:28:56 -0000 http://perforce.freebsd.org/chv.cgi?CH=132223 Change 132223 by kmacy@pandemonium:kmacy:xen31 on 2008/01/01 06:28:11 mark interrupts as masked when not enabled and unmasked when enabled Affected files ... .. //depot/projects/xen31/sys/xen/evtchn/evtchn.c#5 edit Differences ... ==== //depot/projects/xen31/sys/xen/evtchn/evtchn.c#5 (text+ko) ==== @@ -659,7 +659,11 @@ xenpic_dynirq_enable_intr(struct intsrc *isrc) { unsigned int irq; + struct xenpic_intsrc *xp; + + xp = (struct xenpic_intsrc *)isrc; mtx_lock_spin(&irq_mapping_update_lock); + xp->xp_masked = 0; irq = xenpic_vector(isrc); unmask_evtchn(evtchn_from_irq(irq)); mtx_unlock_spin(&irq_mapping_update_lock); @@ -669,7 +673,11 @@ xenpic_dynirq_disable_intr(struct intsrc *isrc) { unsigned int irq; + struct xenpic_intsrc *xp; + + xp = (struct xenpic_intsrc *)isrc; mtx_lock_spin(&irq_mapping_update_lock); + xp->xp_masked = 1; irq = xenpic_vector(isrc); mask_evtchn(evtchn_from_irq(irq)); mtx_unlock_spin(&irq_mapping_update_lock); @@ -679,8 +687,11 @@ xenpic_dynirq_eoi_source(struct intsrc *isrc) { unsigned int irq; - + struct xenpic_intsrc *xp; + + xp = (struct xenpic_intsrc *)isrc; mtx_lock_spin(&irq_mapping_update_lock); + xp->xp_masked = 0; irq = xenpic_vector(isrc); unmask_evtchn(evtchn_from_irq(irq)); mtx_unlock_spin(&irq_mapping_update_lock); @@ -703,7 +714,8 @@ struct xenpic_intsrc *pin = (struct xenpic_intsrc *)isrc; /* XXXEN: TODO */ - printf("xenpic_source_pending(): vector=%x,masked=%x\n", pin->xp_vector, pin->xp_masked); + printf("xenpic_source_pending(): vector=%x,masked=%x\n", + pin->xp_vector, pin->xp_masked); /* notify_remote_via_evtchn(pin->xp_vector); // XXX RS: Is this correct? */ return 0; From owner-p4-projects@FreeBSD.ORG Tue Jan 1 06:29:57 2008 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 814A416A419; Tue, 1 Jan 2008 06:29:57 +0000 (UTC) Delivered-To: perforce@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 2D9FA16A417 for ; Tue, 1 Jan 2008 06:29:57 +0000 (UTC) (envelope-from kmacy@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id 1CD4413C447 for ; Tue, 1 Jan 2008 06:29:57 +0000 (UTC) (envelope-from kmacy@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.1/8.14.1) with ESMTP id m016TvfI013535 for ; Tue, 1 Jan 2008 06:29:57 GMT (envelope-from kmacy@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.1/8.14.1/Submit) id m016TvZL013532 for perforce@freebsd.org; Tue, 1 Jan 2008 06:29:57 GMT (envelope-from kmacy@freebsd.org) Date: Tue, 1 Jan 2008 06:29:57 GMT Message-Id: <200801010629.m016TvZL013532@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to kmacy@freebsd.org using -f From: Kip Macy To: Perforce Change Reviews Cc: Subject: PERFORCE change 132224 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 01 Jan 2008 06:29:57 -0000 http://perforce.freebsd.org/chv.cgi?CH=132224 Change 132224 by kmacy@pandemonium:kmacy:xen31 on 2008/01/01 06:29:42 reduce the delta between i386/pmap.c and xen/pmap.c fix some whitespace issues this allows us to get part way in to single-user Affected files ... .. //depot/projects/xen31/sys/i386/xen/pmap.c#9 edit Differences ... ==== //depot/projects/xen31/sys/i386/xen/pmap.c#9 (text+ko) ==== @@ -166,7 +166,7 @@ #endif #if !defined(PMAP_DIAGNOSTIC) -#define PMAP_INLINE __inline +#define PMAP_INLINE __gnu89_inline #else #define PMAP_INLINE #endif @@ -295,7 +295,6 @@ static void pmap_pte_release(pt_entry_t *pte); static int pmap_unuse_pt(pmap_t, vm_offset_t, vm_page_t *); static vm_offset_t pmap_kmem_choose(vm_offset_t addr); - #ifdef PAE static void *pmap_pdpt_allocf(uma_zone_t zone, int bytes, u_int8_t *flags, int wait); #endif @@ -304,26 +303,26 @@ CTASSERT(1 << PTESHIFT == sizeof(pt_entry_t)); void -pd_set(struct pmap *pmap, vm_paddr_t *ptr, vm_paddr_t val, int type) +pd_set(struct pmap *pmap, int ptepindex, vm_paddr_t val, int type) { - vm_paddr_t shadow_pdir_ma = pmap->pm_pdir[PTDPTDI] & ~0xFFF; - vm_paddr_t shadow_offset = (vm_paddr_t)(ptr - pmap->pm_pdir)*sizeof(vm_paddr_t); + vm_paddr_t pdir_ma = vtomach(&pmap->pm_pdir[ptepindex]); + vm_paddr_t shadow_pdir_ma = vtomach(&pmap->pm_pdir_shadow[ptepindex]); switch (type) { case SH_PD_SET_VA: - xen_queue_pt_update(shadow_pdir_ma + shadow_offset, + xen_queue_pt_update(shadow_pdir_ma, xpmap_ptom(val & ~(PG_RW|PG_M))); - xen_queue_pt_update(vtomach(ptr), + xen_queue_pt_update(pdir_ma, xpmap_ptom(val)); break; case SH_PD_SET_VA_MA: - xen_queue_pt_update(shadow_pdir_ma + shadow_offset, + xen_queue_pt_update(shadow_pdir_ma, val & ~(PG_RW|PG_M)); - xen_queue_pt_update(vtomach(ptr), val); + xen_queue_pt_update(pdir_ma, val); break; case SH_PD_SET_VA_CLEAR: - xen_queue_pt_update(shadow_pdir_ma + shadow_offset, 0); - xen_queue_pt_update(vtomach(ptr), 0); + xen_queue_pt_update(shadow_pdir_ma, 0); + xen_queue_pt_update(pdir_ma, 0); break; } } @@ -926,22 +925,18 @@ { pd_entry_t newpf; pd_entry_t *pde; - pd_entry_t tmppf; - + pde = pmap_pde(pmap, va); - if (PT_GET(pde) & PG_PS) + if (*pde & PG_PS) return (pde); - if (PT_GET(pde) != 0) { + if (*pde != 0) { /* are we current address space or kernel? */ if (pmap_is_current(pmap)) return (vtopte(va)); mtx_lock(&PMAP2mutex); - newpf = PT_GET(pde) & PG_FRAME; - tmppf = PT_GET(PMAP2) & PG_FRAME; - - if (tmppf != newpf) { - PT_SET_VA(PMAP2, newpf | PG_V | PG_A | PG_M/* XXX does PG_M cause problems? */, TRUE); - + newpf = *pde & PG_FRAME; + if ((*PMAP2 & PG_FRAME) != newpf) { + PT_SET_VA_MA(PMAP2, newpf | PG_V | PG_A | PG_M, TRUE); pmap_invalidate_page(kernel_pmap, (vm_offset_t)PADDR2); } return (PADDR2 + (i386_btop(va) & (NPTEPG - 1))); @@ -984,8 +979,7 @@ { pd_entry_t newpf; pd_entry_t *pde; - pd_entry_t tmppf; - + pde = pmap_pde(pmap, va); if (*pde & PG_PS) return (pde); @@ -995,11 +989,9 @@ return (vtopte(va)); mtx_assert(&vm_page_queue_mtx, MA_OWNED); KASSERT(curthread->td_pinned > 0, ("curthread not pinned")); - - newpf = PT_GET(pde) & PG_FRAME; - tmppf = PT_GET(PMAP1) & PG_FRAME; - if (tmppf != newpf) { - PT_SET_VA(PMAP1, newpf | PG_V | PG_A | PG_M/* ??? */, TRUE); + newpf = *pde & PG_FRAME; + if ((PT_GET(PMAP1) & PG_FRAME) != newpf) { + PT_SET_VA_MA(PMAP1, newpf | PG_V | PG_A, TRUE); #ifdef SMP PMAP1cpu = PCPU_GET(cpuid); #endif @@ -1034,10 +1026,10 @@ rtval = 0; PMAP_LOCK(pmap); - pde = PT_GET(&pmap->pm_pdir[va >> PDRSHIFT]); + pde = pmap->pm_pdir[va >> PDRSHIFT]; if (pde != 0) { if ((pde & PG_PS) != 0) { - rtval = (pde & PG_PS_FRAME) | (va & PDRMASK); + rtval = xpmap_mtop(pde & PG_PS_FRAME) | (va & PDRMASK); PMAP_UNLOCK(pmap); return rtval; } @@ -1260,7 +1252,7 @@ /*************************************************** * Page table page management routines..... ***************************************************/ -static PMAP_INLINE void +static __inline void pmap_free_zero_pages(vm_page_t free) { vm_page_t m; @@ -1276,7 +1268,7 @@ * This routine unholds page table pages, and if the hold count * drops to zero, then it decrements the wire count. */ -static PMAP_INLINE int +static __inline int pmap_unwire_pte_hold(pmap_t pmap, vm_page_t m, vm_page_t *free) { @@ -1296,7 +1288,7 @@ * unmap the page table page */ xen_pt_unpin(pmap->pm_pdir[m->pindex]); - PD_CLEAR_VA(pmap, &pmap->pm_pdir[m->pindex], TRUE); + PD_CLEAR_VA(pmap, m->pindex, TRUE); --pmap->pm_stats.resident_count; /* @@ -1486,7 +1478,7 @@ static vm_page_t _pmap_allocpte(pmap_t pmap, unsigned ptepindex, int flags) { - vm_paddr_t ptepa; + vm_paddr_t ptema; vm_page_t m; KASSERT((flags & (M_NOWAIT | M_WAITOK)) == M_NOWAIT || @@ -1522,10 +1514,10 @@ pmap->pm_stats.resident_count++; - ptepa = VM_PAGE_TO_PHYS(m); - xen_pt_pin(xpmap_ptom(ptepa)); - PD_SET_VA(pmap, &pmap->pm_pdir[ptepindex], - (ptepa | PG_U | PG_RW | PG_V | PG_A | PG_M), TRUE); + ptema = xpmap_ptom(VM_PAGE_TO_PHYS(m)); + xen_pt_pin(ptema); + PD_SET_VA_MA(pmap, ptepindex, + (ptema | PG_U | PG_RW | PG_V | PG_A | PG_M), TRUE); return m; } @@ -1534,7 +1526,7 @@ pmap_allocpte(pmap_t pmap, vm_offset_t va, int flags) { unsigned ptepindex; - pd_entry_t ptepa; + pd_entry_t ptema; vm_page_t m; KASSERT((flags & (M_NOWAIT | M_WAITOK)) == M_NOWAIT || @@ -1549,15 +1541,18 @@ /* * Get the page directory entry */ - ptepa = PT_GET(&pmap->pm_pdir[ptepindex]); + ptema = pmap->pm_pdir[ptepindex]; /* * This supports switching from a 4MB page to a * normal 4K page. */ - if (ptepa & PG_PS) { + if (ptema & PG_PS) { + /* + * XXX + */ pmap->pm_pdir[ptepindex] = 0; - ptepa = 0; + ptema = 0; pmap->pm_stats.resident_count -= NBPDR / PAGE_SIZE; pmap_invalidate_all(kernel_pmap); } @@ -1566,8 +1561,8 @@ * If the page table page is mapped, we just increment the * hold count, and activate it. */ - if (ptepa) { - m = PHYS_TO_VM_PAGE(ptepa & PG_FRAME); + if (ptema) { + m = PHYS_TO_VM_PAGE(xpmap_mtop(ptema) & PG_FRAME); m->wire_count++; } else { /* @@ -1603,7 +1598,7 @@ u_int mymask = PCPU_GET(cpumask); #ifdef COUNT_IPIS - *ipi_lazypmap_counts[PCPU_GET(cpuid)]++; + (*ipi_lazypmap_counts[PCPU_GET(cpuid)])++; #endif if (rcr3() == lazyptd) load_cr3(PCPU_GET(curpcb)->pcb_cr3); @@ -1705,7 +1700,7 @@ ptdpg[NPGPTD] = PHYS_TO_VM_PAGE(vtophys(pmap->pm_pdir)); for (i = 0; i < nkpt + NPGPTD; i++) - PD_CLEAR_VA(pmap, &pmap->pm_pdir[PTDPTDI + i], FALSE); + PD_CLEAR_VA(pmap, PTDPTDI + i, FALSE); bzero(pmap->pm_pdir + PTDPTDI, (nkpt + NPGPTD) * @@ -1719,7 +1714,7 @@ /* unpinning L1 and L2 treated the same */ xen_pgd_unpin(ma); #ifdef PAE - KASSERT(VM_PAGE_TO_PHYS(m) == (pmap->pm_pdpt[i] & PG_FRAME), + KASSERT(xpmap_ptom(VM_PAGE_TO_PHYS(m)) == (pmap->pm_pdpt[i] & PG_FRAME), ("pmap_release: got wrong ptd page")); #endif m->wire_count--; @@ -1800,12 +1795,18 @@ pmap_zero_page(nkpg); ptppaddr = VM_PAGE_TO_PHYS(nkpg); newpdir = (pd_entry_t) (ptppaddr | PG_V | PG_RW | PG_A | PG_M); +#ifdef notyet PD_SET_VA(kernel_pmap, &pdir_pde(kernel_pmap->pm_pdir, kernel_vm_end), newpdir, TRUE); - +#else + panic("implement me"); +#endif + mtx_lock_spin(&allpmaps_lock); LIST_FOREACH(pmap, &allpmaps, pm_list) { pde = pmap_pde(pmap, kernel_vm_end); +#ifdef notyet PD_SET_VA(pmap, pde, newpdir, FALSE); +#endif } PT_UPDATES_FLUSH(); mtx_unlock_spin(&allpmaps_lock); @@ -1982,6 +1983,7 @@ static const struct timeval printinterval = { 60, 0 }; static struct timeval lastprint; static vm_pindex_t colour; + struct vpgqueues *pq; int bit, field; pv_entry_t pv; struct pv_chunk *pc; @@ -1996,6 +1998,8 @@ printf("Approaching the limit on PV entries, consider " "increasing either the vm.pmap.shpgperproc or the " "vm.pmap.pv_entry_max tunable.\n"); + pq = NULL; +retry: pc = TAILQ_FIRST(&pmap->pm_pvchunk); if (pc != NULL) { for (field = 0; field < _NPCM; field++) { @@ -2019,21 +2023,17 @@ return (pv); } } - pc = (struct pv_chunk *)pmap_ptelist_alloc(&pv_vafree); - m = vm_page_alloc(NULL, colour, VM_ALLOC_NORMAL | - VM_ALLOC_NOOBJ | VM_ALLOC_WIRED); - if (m == NULL || pc == NULL) { + /* + * Access to the ptelist "pv_vafree" is synchronized by the page + * queues lock. If "pv_vafree" is currently non-empty, it will + * remain non-empty until pmap_ptelist_alloc() completes. + */ + if (pv_vafree == 0 || (m = vm_page_alloc(NULL, colour, (pq == + &vm_page_queues[PQ_ACTIVE] ? VM_ALLOC_SYSTEM : VM_ALLOC_NORMAL) | + VM_ALLOC_NOOBJ | VM_ALLOC_WIRED)) == NULL) { if (try) { pv_entry_count--; PV_STAT(pc_chunk_tryfail++); - if (m) { - vm_page_lock_queues(); - vm_page_unwire(m, 0); - vm_page_free(m); - vm_page_unlock_queues(); - } - if (pc) - pmap_ptelist_free(&pv_vafree, (vm_offset_t)pc); return (NULL); } /* @@ -2041,30 +2041,21 @@ * inactive pages. After that, if a pv chunk entry * is still needed, destroy mappings to active pages. */ - PV_STAT(pmap_collect_inactive++); - pmap_collect(pmap, &vm_page_queues[PQ_INACTIVE]); - if (m == NULL) - m = vm_page_alloc(NULL, colour, VM_ALLOC_NORMAL | - VM_ALLOC_NOOBJ | VM_ALLOC_WIRED); - if (pc == NULL) - pc = (struct pv_chunk *)pmap_ptelist_alloc(&pv_vafree); - if (m == NULL || pc == NULL) { + if (pq == NULL) { + PV_STAT(pmap_collect_inactive++); + pq = &vm_page_queues[PQ_INACTIVE]; + } else if (pq == &vm_page_queues[PQ_INACTIVE]) { PV_STAT(pmap_collect_active++); - pmap_collect(pmap, &vm_page_queues[PQ_ACTIVE]); - if (m == NULL) - m = vm_page_alloc(NULL, colour, - VM_ALLOC_SYSTEM | VM_ALLOC_NOOBJ | - VM_ALLOC_WIRED); - if (pc == NULL) - pc = (struct pv_chunk *) - pmap_ptelist_alloc(&pv_vafree); - if (m == NULL || pc == NULL) - panic("get_pv_entry: increase vm.pmap.shpgperproc"); - } + pq = &vm_page_queues[PQ_ACTIVE]; + } else + panic("get_pv_entry: increase vm.pmap.shpgperproc"); + pmap_collect(pmap, pq); + goto retry; } PV_STAT(pc_chunk_count++); PV_STAT(pc_chunk_allocs++); colour++; + pc = (struct pv_chunk *)pmap_ptelist_alloc(&pv_vafree); pmap_qenter((vm_offset_t)pc, &m, 1); pc->pc_pmap = pmap; pc->pc_map[0] = pc_freemask[0] & ~1ul; /* preallocated bit 0 */ @@ -2251,7 +2242,7 @@ * Check for large page. */ if ((ptpaddr & PG_PS) != 0) { - PD_CLEAR_VA(pmap, &pmap->pm_pdir[pdirindex], TRUE); + PD_CLEAR_VA(pmap, pdirindex, TRUE); pmap->pm_stats.resident_count -= NBPDR / PAGE_SIZE; anyvalid = 1; continue; @@ -2438,7 +2429,7 @@ * size, PG_RW, PG_A, and PG_M are among the least * significant 32 bits. */ - obits = pbits = *pte; + obits = pbits = PT_GET(pte); if ((pbits & PG_V) == 0) continue; if (pbits & PG_MANAGED) { @@ -2548,12 +2539,10 @@ } } #endif - pde = pmap_pde(pmap, va); if ((*pde & PG_PS) != 0) panic("pmap_enter: attempted pmap_enter on 4MB page"); pte = pmap_pte_quick(pmap, va); - /* * Page Directory table entry not valid, we need a new PT page */ @@ -2564,9 +2553,13 @@ pa = VM_PAGE_TO_PHYS(m); om = NULL; - origpte = PT_GET(pte); - opa = origpte & PG_FRAME; - + opa = origpte = 0; + + if (*pte & PG_V) { + origpte = PT_GET(pte); + opa = origpte & PG_FRAME; + } + /* * Mapping has not changed, must be protection or wiring change. */ @@ -2766,7 +2759,7 @@ */ if (va < VM_MAXUSER_ADDRESS) { unsigned ptepindex; - pd_entry_t ptepa; + pd_entry_t ptema; /* * Calculate pagetable page index @@ -2778,16 +2771,16 @@ /* * Get the page directory entry */ - ptepa = pmap->pm_pdir[ptepindex]; + ptema = pmap->pm_pdir[ptepindex]; /* * If the page table page is mapped, we just increment * the hold count, and activate it. */ - if (ptepa) { - if (ptepa & PG_PS) + if (ptema) { + if (ptema & PG_PS) panic("pmap_enter_quick: unexpected mapping into 4MB page"); - mpte = PHYS_TO_VM_PAGE(ptepa & PG_FRAME); + mpte = PHYS_TO_VM_PAGE(xpmap_mtop(ptema) & PG_FRAME); mpte->wire_count++; } else { mpte = _pmap_allocpte(pmap, ptepindex, @@ -2807,7 +2800,7 @@ * But that isn't as quick as vtopte. */ pte = vtopte(va); - if (PT_GET(pte)) { + if (*pte) { if (mpte != NULL) { mpte->wire_count--; mpte = NULL; @@ -2929,7 +2922,7 @@ pmap->pm_stats.resident_count += size >> PAGE_SHIFT; npdes = size >> PDRSHIFT; for(i = 0; i < npdes; i++) { - PD_SET_VA(pmap, &pmap->pm_pdir[ptepindex], + PD_SET_VA(pmap, ptepindex, ptepa | PG_U | PG_RW | PG_V | PG_PS, FALSE); ptepa += NBPDR; ptepindex += 1; @@ -3025,7 +3018,7 @@ if (srcptepaddr & PG_PS) { if (dst_pmap->pm_pdir[ptepindex] == 0) { - PD_SET_VA(dst_pmap, &dst_pmap->pm_pdir[ptepindex], srcptepaddr & ~PG_W, TRUE); + PD_SET_VA(dst_pmap, ptepindex, srcptepaddr & ~PG_W, TRUE); dst_pmap->pm_stats.resident_count += NBPDR / PAGE_SIZE; } @@ -3042,7 +3035,7 @@ src_pte = vtopte(addr); while (addr < pdnxt) { pt_entry_t ptetemp; - ptetemp = *src_pte; + ptetemp = PT_GET(src_pte); /* * we only virtual copy managed pages */ @@ -3238,36 +3231,36 @@ return (FALSE); } -/* - * pmap_page_wired_mappings: - * - * Return the number of managed mappings to the given physical page - * that are wired. - */ -int -pmap_page_wired_mappings(vm_page_t m) -{ - pv_entry_t pv; - pt_entry_t *pte; - pmap_t pmap; - int count; - - count = 0; - if ((m->flags & PG_FICTITIOUS) != 0) - return (count); - mtx_assert(&vm_page_queue_mtx, MA_OWNED); - sched_pin(); - TAILQ_FOREACH(pv, &m->md.pv_list, pv_list) { - pmap = PV_PMAP(pv); - PMAP_LOCK(pmap); - pte = pmap_pte_quick(pmap, pv->pv_va); - if ((*pte & PG_W) != 0) - count++; - PMAP_UNLOCK(pmap); - } - sched_unpin(); - return (count); -} +/* + * pmap_page_wired_mappings: + * + * Return the number of managed mappings to the given physical page + * that are wired. + */ +int +pmap_page_wired_mappings(vm_page_t m) +{ + pv_entry_t pv; + pt_entry_t *pte; + pmap_t pmap; + int count; + + count = 0; + if ((m->flags & PG_FICTITIOUS) != 0) + return (count); + mtx_assert(&vm_page_queue_mtx, MA_OWNED); + sched_pin(); + TAILQ_FOREACH(pv, &m->md.pv_list, pv_list) { + pmap = PV_PMAP(pv); + PMAP_LOCK(pmap); + pte = pmap_pte_quick(pmap, pv->pv_va); + if ((*pte & PG_W) != 0) + count++; + PMAP_UNLOCK(pmap); + } + sched_unpin(); + return (count); +} /* * Remove all pages from specified address space @@ -3826,7 +3819,7 @@ PMAP_LOCK(pmap); ptep = pmap_pte(pmap, addr); - pte = (ptep != NULL) ? *ptep : 0; + pte = (ptep != NULL) ? PT_GET(ptep) : 0; pmap_pte_release(ptep); PMAP_UNLOCK(pmap); if (PMAP2_inuse) { @@ -3960,7 +3953,7 @@ if (pte && pmap_pte_v(pte)) { pt_entry_t pa; vm_page_t m; - pa = *pte; + pa = PT_GET(pte); m = PHYS_TO_VM_PAGE(pa & PG_FRAME); printf("va: 0x%x, pt: 0x%x, h: %d, w: %d, f: 0x%x", va, pa, m->hold_count, m->wire_count, m->flags); @@ -3986,7 +3979,7 @@ #if defined(DEBUG) static void pads(pmap_t pm); -void pmap_pvdump(vm_offset_t pa); +void pmap_pvdump(vm_paddr_t pa); /* print address space of pmap*/ static void From owner-p4-projects@FreeBSD.ORG Tue Jan 1 06:32:00 2008 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id CC75D16A41B; Tue, 1 Jan 2008 06:31:59 +0000 (UTC) Delivered-To: perforce@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 7900516A417 for ; Tue, 1 Jan 2008 06:31:59 +0000 (UTC) (envelope-from kmacy@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id 6891C13C455 for ; Tue, 1 Jan 2008 06:31:59 +0000 (UTC) (envelope-from kmacy@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.1/8.14.1) with ESMTP id m016VxU3014499 for ; Tue, 1 Jan 2008 06:31:59 GMT (envelope-from kmacy@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.1/8.14.1/Submit) id m016VxLG014495 for perforce@freebsd.org; Tue, 1 Jan 2008 06:31:59 GMT (envelope-from kmacy@freebsd.org) Date: Tue, 1 Jan 2008 06:31:59 GMT Message-Id: <200801010631.m016VxLG014495@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to kmacy@freebsd.org using -f From: Kip Macy To: Perforce Change Reviews Cc: Subject: PERFORCE change 132225 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 01 Jan 2008 06:32:00 -0000 http://perforce.freebsd.org/chv.cgi?CH=132225 Change 132225 by kmacy@pandemonium:kmacy:xen31 on 2008/01/01 06:31:00 fix descriptor updates to work on xen Affected files ... .. //depot/projects/xen31/sys/i386/i386/sys_machdep.c#3 edit Differences ... ==== //depot/projects/xen31/sys/i386/i386/sys_machdep.c#3 (text+ko) ==== @@ -178,7 +178,11 @@ */ sd.sd_lobase = base & 0xffffff; sd.sd_hibase = (base >> 24) & 0xff; +#ifdef XEN + sd.sd_lolimit = 0x0; /* need to do nosegneg like Linux */ +#else sd.sd_lolimit = 0xffff; /* 4GB limit, wraps around */ +#endif sd.sd_hilimit = 0xf; sd.sd_type = SDT_MEMRWA; sd.sd_dpl = SEL_UPL; @@ -188,7 +192,11 @@ sd.sd_gran = 1; critical_enter(); td->td_pcb->pcb_fsd = sd; +#ifdef XEN + HYPERVISOR_update_descriptor(vtomach(&PCPU_GET(fsgs_gdt)[0]), *(uint64_t *)&sd); +#else PCPU_GET(fsgs_gdt)[0] = sd; +#endif critical_exit(); td->td_frame->tf_fs = GSEL(GUFS_SEL, SEL_UPL); } @@ -208,7 +216,11 @@ */ sd.sd_lobase = base & 0xffffff; sd.sd_hibase = (base >> 24) & 0xff; +#ifdef XEN + sd.sd_lolimit = 0x0; /* need nosegneg */ +#else sd.sd_lolimit = 0xffff; /* 4GB limit, wraps around */ +#endif sd.sd_hilimit = 0xf; sd.sd_type = SDT_MEMRWA; sd.sd_dpl = SEL_UPL; @@ -218,7 +230,11 @@ sd.sd_gran = 1; critical_enter(); td->td_pcb->pcb_gsd = sd; +#ifdef XEN + HYPERVISOR_update_descriptor(vtomach(&PCPU_GET(fsgs_gdt)[1]), *(uint64_t *)&sd); +#else PCPU_GET(fsgs_gdt)[1] = sd; +#endif critical_exit(); load_gs(GSEL(GUGS_SEL, SEL_UPL)); } @@ -377,6 +393,10 @@ } pldt = mdp->md_ldt; +#ifdef XEN + i386_reset_ldt(pldt); + PCPU_SET(currentldt, (int)pldt); +#else #ifdef SMP gdt[PCPU_GET(cpuid) * NGDT + GUSERLDT_SEL].sd = pldt->ldt_sd; #else @@ -384,6 +404,7 @@ #endif lldt(GSEL(GUSERLDT_SEL, SEL_KPL)); PCPU_SET(currentldt, GSEL(GUSERLDT_SEL, SEL_KPL)); +#endif if (dtlocked) mtx_unlock_spin(&dt_lock); } @@ -402,6 +423,44 @@ } #endif +#ifdef XEN + +/* + * dt_lock must be held. Returns with dt_lock held. + */ +struct proc_ldt * +user_ldt_alloc(struct mdproc *mdp, int len) +{ + struct proc_ldt *pldt, *new_ldt; + + mtx_assert(&dt_lock, MA_OWNED); + mtx_unlock_spin(&dt_lock); + MALLOC(new_ldt, struct proc_ldt *, sizeof(struct proc_ldt), + M_SUBPROC, M_WAITOK); + + new_ldt->ldt_len = len = NEW_MAX_LD(len); + new_ldt->ldt_base = (caddr_t)kmem_alloc(kernel_map, + round_page(len * sizeof(union descriptor))); + if (new_ldt->ldt_base == NULL) { + FREE(new_ldt, M_SUBPROC); + return NULL; + } + new_ldt->ldt_refcnt = 1; + new_ldt->ldt_active = 0; + + if ((pldt = mdp->md_ldt)) { + if (len > pldt->ldt_len) + len = pldt->ldt_len; + bcopy(pldt->ldt_base, new_ldt->ldt_base, + len * sizeof(union descriptor)); + } else { + bcopy(ldt, new_ldt->ldt_base, PAGE_SIZE); + } + pmap_map_readonly(kernel_pmap, (vm_offset_t)new_ldt->ldt_base, + new_ldt->ldt_len*sizeof(union descriptor)); + return new_ldt; +} +#else /* * dt_lock must be held. Returns with dt_lock held. */ @@ -440,7 +499,7 @@ return (new_ldt); } - +#endif /* * Must be called with dt_lock held. Returns with dt_lock unheld. */ @@ -455,10 +514,12 @@ return; if (td == PCPU_GET(curthread)) { +#ifndef XEN lldt(_default_ldt); +#endif PCPU_SET(currentldt, _default_ldt); + i386_reset_ldt((struct proc_ldt *)_default_ldt); } - mdp->md_ldt = NULL; if (--pldt->ldt_refcnt == 0) { mtx_unlock_spin(&dt_lock); @@ -643,6 +704,9 @@ if (uap->start == LDT_AUTO_ALLOC && uap->num == 1) { /* Allocate a free slot */ mtx_lock_spin(&dt_lock); +#ifdef XEN + load_gs(0); /* XXX check if we really still need this */ +#endif if ((pldt = mdp->md_ldt) == NULL) { if ((error = i386_ldt_grow(td, NLDT + 1))) { mtx_unlock_spin(&dt_lock); @@ -685,6 +749,25 @@ return (error); } +#ifdef XEN +static int +i386_set_ldt_data(struct thread *td, int start, int num, + union descriptor *descs) +{ + struct mdproc *mdp = &td->td_proc->p_md; + struct proc_ldt *pldt = mdp->md_ldt; + int i, error; + + mtx_assert(&dt_lock, MA_OWNED); + for (i = 0; i < num; i++) { + error = HYPERVISOR_update_descriptor(vtomach(&((union descriptor *)(pldt->ldt_base))[start + i]), *(uint64_t *)(descs + i)); + if (error) + panic("failed to update ldt: %d", error); + } + return (0); +} + +#else static int i386_set_ldt_data(struct thread *td, int start, int num, union descriptor *descs) @@ -700,7 +783,7 @@ num * sizeof(union descriptor)); return (0); } - +#endif static int i386_ldt_grow(struct thread *td, int len) { From owner-p4-projects@FreeBSD.ORG Tue Jan 1 06:32:00 2008 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 32C1116A511; Tue, 1 Jan 2008 06:32:00 +0000 (UTC) Delivered-To: perforce@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 9D6D116A418 for ; Tue, 1 Jan 2008 06:31:59 +0000 (UTC) (envelope-from kmacy@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id 8CC0013C459 for ; Tue, 1 Jan 2008 06:31:59 +0000 (UTC) (envelope-from kmacy@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.1/8.14.1) with ESMTP id m016VxjT014505 for ; Tue, 1 Jan 2008 06:31:59 GMT (envelope-from kmacy@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.1/8.14.1/Submit) id m016VxDe014502 for perforce@freebsd.org; Tue, 1 Jan 2008 06:31:59 GMT (envelope-from kmacy@freebsd.org) Date: Tue, 1 Jan 2008 06:31:59 GMT Message-Id: <200801010631.m016VxDe014502@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to kmacy@freebsd.org using -f From: Kip Macy To: Perforce Change Reviews Cc: Subject: PERFORCE change 132226 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 01 Jan 2008 06:32:00 -0000 http://perforce.freebsd.org/chv.cgi?CH=132226 Change 132226 by kmacy@pandemonium:kmacy:xen31 on 2008/01/01 06:31:39 make sf_buf work on xen Affected files ... .. //depot/projects/xen31/sys/i386/i386/vm_machdep.c#3 edit Differences ... ==== //depot/projects/xen31/sys/i386/i386/vm_machdep.c#3 (text+ko) ==== @@ -265,7 +265,7 @@ /* Setup to release spin count in fork_exit(). */ td2->td_md.md_spinlock_count = 1; - td2->td_md.md_saved_flags = PSL_KERNEL | PSL_I; + td2->td_md.md_saved_flags = PSL_USER; /* * Now, cpu_switch() can schedule the new process. @@ -446,7 +446,7 @@ /* Setup to release spin count in fork_exit(). */ td->td_md.md_spinlock_count = 1; - td->td_md.md_saved_flags = PSL_KERNEL | PSL_I; + td->td_md.md_saved_flags = PSL_USER; } /* @@ -772,8 +772,11 @@ */ ptep = vtopte(sf->kva); opte = *ptep; +#ifdef XEN + PT_SET_MA(sf->kva, xpmap_ptom(VM_PAGE_TO_PHYS(m)) | pgeflag | PG_RW | PG_V); +#else *ptep = VM_PAGE_TO_PHYS(m) | pgeflag | PG_RW | PG_V; - +#endif /* * Avoid unnecessary TLB invalidations: If the sf_buf's old * virtual-to-physical mapping was not used, then any processor @@ -822,6 +825,14 @@ if (sf->ref_count == 0) { TAILQ_INSERT_TAIL(&sf_buf_freelist, sf, free_entry); nsfbufsused--; +#ifdef XEN + /* + * Xen doesn't like having dangling R/W mappings + */ + pmap_qremove(sf->kva, 1); + sf->m = NULL; + LIST_REMOVE(sf, list_entry); +#endif if (sf_buf_alloc_want > 0) wakeup_one(&sf_buf_freelist); } From owner-p4-projects@FreeBSD.ORG Tue Jan 1 06:32:00 2008 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id B93AA16A560; Tue, 1 Jan 2008 06:32:00 +0000 (UTC) Delivered-To: perforce@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id E96B016A49C for ; Tue, 1 Jan 2008 06:31:59 +0000 (UTC) (envelope-from jb@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id B159A13C45A for ; Tue, 1 Jan 2008 06:31:59 +0000 (UTC) (envelope-from jb@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.1/8.14.1) with ESMTP id m016VxPW014511 for ; Tue, 1 Jan 2008 06:31:59 GMT (envelope-from jb@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.1/8.14.1/Submit) id m016VxYn014508 for perforce@freebsd.org; Tue, 1 Jan 2008 06:31:59 GMT (envelope-from jb@freebsd.org) Date: Tue, 1 Jan 2008 06:31:59 GMT Message-Id: <200801010631.m016VxYn014508@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to jb@freebsd.org using -f From: John Birrell To: Perforce Change Reviews Cc: Subject: PERFORCE change 132227 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 01 Jan 2008 06:32:01 -0000 http://perforce.freebsd.org/chv.cgi?CH=132227 Change 132227 by jb@jb_freebsd1 on 2008/01/01 06:31:59 Add another header. Affected files ... .. //depot/projects/dtrace/src/sys/cddl/kern/vmem.c#6 edit Differences ... ==== //depot/projects/dtrace/src/sys/cddl/kern/vmem.c#6 (text+ko) ==== @@ -26,6 +26,7 @@ #include #include +#include #include #include #include From owner-p4-projects@FreeBSD.ORG Tue Jan 1 06:33:01 2008 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 5490316A41B; Tue, 1 Jan 2008 06:33:01 +0000 (UTC) Delivered-To: perforce@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 1A60516A418 for ; Tue, 1 Jan 2008 06:33:01 +0000 (UTC) (envelope-from kmacy@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id 0940413C457 for ; Tue, 1 Jan 2008 06:33:01 +0000 (UTC) (envelope-from kmacy@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.1/8.14.1) with ESMTP id m016X0Jm015407 for ; Tue, 1 Jan 2008 06:33:00 GMT (envelope-from kmacy@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.1/8.14.1/Submit) id m016X0mx015402 for perforce@freebsd.org; Tue, 1 Jan 2008 06:33:00 GMT (envelope-from kmacy@freebsd.org) Date: Tue, 1 Jan 2008 06:33:00 GMT Message-Id: <200801010633.m016X0mx015402@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to kmacy@freebsd.org using -f From: Kip Macy To: Perforce Change Reviews Cc: Subject: PERFORCE change 132228 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 01 Jan 2008 06:33:01 -0000 http://perforce.freebsd.org/chv.cgi?CH=132228 Change 132228 by kmacy@pandemonium:kmacy:xen31 on 2008/01/01 06:32:35 update interface for replicating page directory updates to the shadow page directory Affected files ... .. //depot/projects/xen31/sys/i386/include/xen/xenpmap.h#5 edit Differences ... ==== //depot/projects/xen31/sys/i386/include/xen/xenpmap.h#5 (text+ko) ==== @@ -82,7 +82,7 @@ #define SH_PD_SET_VA_CLEAR 3 struct pmap; -void pd_set(struct pmap *pmap, vm_paddr_t *ptr, vm_paddr_t val, int type); +void pd_set(struct pmap *pmap, int ptepindex, vm_paddr_t val, int type); #ifdef notyet static vm_paddr_t vptetomachpte(vm_paddr_t *pte) @@ -158,19 +158,19 @@ xen_flush_queue(); \ } while (/*CONSTCOND*/0) -#define PD_SET_VA(_pmap, _ptp,_npte,sync) do { \ +#define PD_SET_VA(_pmap, _ptepindex,_npte,sync) do { \ PMAP_REF((_ptp), xpmap_ptom(_npte)); \ - pd_set((_pmap),(_ptp),(_npte), SH_PD_SET_VA); \ + pd_set((_pmap),(_ptepindex),(_npte), SH_PD_SET_VA); \ if (sync || ALWAYS_SYNC) xen_flush_queue(); \ } while (/*CONSTCOND*/0) -#define PD_SET_VA_MA(_pmap, _ptp,_npte,sync) do { \ +#define PD_SET_VA_MA(_pmap, _ptepindex,_npte,sync) do { \ PMAP_REF((_ptp), (_npte)); \ - pd_set((_pmap),(_ptp),(_npte), SH_PD_SET_VA_MA); \ + pd_set((_pmap),(_ptepindex),(_npte), SH_PD_SET_VA_MA); \ if (sync || ALWAYS_SYNC) xen_flush_queue(); \ } while (/*CONSTCOND*/0) -#define PD_CLEAR_VA(_pmap, _ptp, sync) do { \ +#define PD_CLEAR_VA(_pmap, _ptepindex, sync) do { \ PMAP_REF((pt_entry_t *)(_ptp), 0); \ - pd_set((_pmap),(_ptp), 0, SH_PD_SET_VA_CLEAR); \ + pd_set((_pmap),(_ptepindex), 0, SH_PD_SET_VA_CLEAR); \ if (sync || ALWAYS_SYNC) xen_flush_queue(); \ } while (/*CONSTCOND*/0) @@ -207,13 +207,13 @@ static __inline vm_paddr_t xpmap_mtop(vm_paddr_t mpa) { - return machtophys(mpa) | (mpa & ~PG_FRAME); + return machtophys(mpa) | (mpa & PAGE_MASK); } static __inline vm_paddr_t xpmap_ptom(vm_paddr_t ppa) { - return phystomach(ppa) | (ppa & ~PG_FRAME); + return phystomach(ppa) | (ppa & PAGE_MASK); } #endif /* _XEN_XENPMAP_H_ */ From owner-p4-projects@FreeBSD.ORG Tue Jan 1 06:34:02 2008 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 819A916A420; Tue, 1 Jan 2008 06:34:02 +0000 (UTC) Delivered-To: perforce@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 4756F16A418 for ; Tue, 1 Jan 2008 06:34:02 +0000 (UTC) (envelope-from kmacy@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id 36EEF13C447 for ; Tue, 1 Jan 2008 06:34:02 +0000 (UTC) (envelope-from kmacy@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.1/8.14.1) with ESMTP id m016Y2R6016673 for ; Tue, 1 Jan 2008 06:34:02 GMT (envelope-from kmacy@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.1/8.14.1/Submit) id m016Y2RV016670 for perforce@freebsd.org; Tue, 1 Jan 2008 06:34:02 GMT (envelope-from kmacy@freebsd.org) Date: Tue, 1 Jan 2008 06:34:02 GMT Message-Id: <200801010634.m016Y2RV016670@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to kmacy@freebsd.org using -f From: Kip Macy To: Perforce Change Reviews Cc: Subject: PERFORCE change 132229 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 01 Jan 2008 06:34:02 -0000 http://perforce.freebsd.org/chv.cgi?CH=132229 Change 132229 by kmacy@pandemonium:kmacy:xen31 on 2008/01/01 06:33:36 allocate zeroed memory for initial structures we still only get interrupts on some of the boots :-( Affected files ... .. //depot/projects/xen31/sys/dev/xen/blkfront/blkfront.c#6 edit Differences ... ==== //depot/projects/xen31/sys/dev/xen/blkfront/blkfront.c#6 (text+ko) ==== @@ -143,7 +143,7 @@ struct xb_softc *sc; int error = 0; - sc = (struct xb_softc *)malloc(sizeof(*sc), M_DEVBUF, M_WAITOK); + sc = (struct xb_softc *)malloc(sizeof(*sc), M_DEVBUF, M_WAITOK|M_ZERO); sc->xb_unit = unit; sc->xb_info = info; info->sc = sc; @@ -352,7 +352,7 @@ info->ring_ref = GRANT_INVALID_REF; - sring = (blkif_sring_t *)malloc(PAGE_SIZE, M_DEVBUF, M_NOWAIT); + sring = (blkif_sring_t *)malloc(PAGE_SIZE, M_DEVBUF, M_NOWAIT|M_ZERO); if (sring == NULL) { xenbus_dev_fatal(dev, ENOMEM, "allocating shared ring"); return ENOMEM; @@ -909,7 +909,7 @@ struct blk_shadow *copy; /* Stage 1: Make a safe copy of the shadow state. */ - copy = (struct blk_shadow *)malloc(sizeof(info->shadow), M_DEVBUF, M_NOWAIT); + copy = (struct blk_shadow *)malloc(sizeof(info->shadow), M_DEVBUF, M_NOWAIT|M_ZERO); PANIC_IF(copy == NULL); memcpy(copy, info->shadow, sizeof(info->shadow)); From owner-p4-projects@FreeBSD.ORG Tue Jan 1 06:35:03 2008 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id B175516A41A; Tue, 1 Jan 2008 06:35:03 +0000 (UTC) Delivered-To: perforce@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 745B316A417 for ; Tue, 1 Jan 2008 06:35:03 +0000 (UTC) (envelope-from kmacy@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id 647F213C442 for ; Tue, 1 Jan 2008 06:35:03 +0000 (UTC) (envelope-from kmacy@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.1/8.14.1) with ESMTP id m016Z3QH017199 for ; Tue, 1 Jan 2008 06:35:03 GMT (envelope-from kmacy@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.1/8.14.1/Submit) id m016Z3PQ017196 for perforce@freebsd.org; Tue, 1 Jan 2008 06:35:03 GMT (envelope-from kmacy@freebsd.org) Date: Tue, 1 Jan 2008 06:35:03 GMT Message-Id: <200801010635.m016Z3PQ017196@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to kmacy@freebsd.org using -f From: Kip Macy To: Perforce Change Reviews Cc: Subject: PERFORCE change 132230 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 01 Jan 2008 06:35:04 -0000 http://perforce.freebsd.org/chv.cgi?CH=132230 Change 132230 by kmacy@pandemonium:kmacy:xen31 on 2008/01/01 06:34:15 don't use inline assembly so long as we're maintaining a separate ptom mappping Affected files ... .. //depot/projects/xen31/sys/i386/include/cpufunc.h#5 edit Differences ... ==== //depot/projects/xen31/sys/i386/include/cpufunc.h#5 (text+ko) ==== @@ -417,8 +417,15 @@ static __inline void load_cr3(u_int data) { - +#ifdef XEN + xen_load_cr3(data); +#else + /* + * Xen will actually trap the cr3 load - but we need to + * pass it a machine address + */ __asm __volatile("movl %0,%%cr3" : : "r" (data) : "memory"); +#endif } static __inline u_int From owner-p4-projects@FreeBSD.ORG Tue Jan 1 06:35:04 2008 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 1B26216A529; Tue, 1 Jan 2008 06:35:03 +0000 (UTC) Delivered-To: perforce@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id B035F16A418 for ; Tue, 1 Jan 2008 06:35:03 +0000 (UTC) (envelope-from kmacy@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id 885A013C447 for ; Tue, 1 Jan 2008 06:35:03 +0000 (UTC) (envelope-from kmacy@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.1/8.14.1) with ESMTP id m016Z38O017205 for ; Tue, 1 Jan 2008 06:35:03 GMT (envelope-from kmacy@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.1/8.14.1/Submit) id m016Z39u017202 for perforce@freebsd.org; Tue, 1 Jan 2008 06:35:03 GMT (envelope-from kmacy@freebsd.org) Date: Tue, 1 Jan 2008 06:35:03 GMT Message-Id: <200801010635.m016Z39u017202@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to kmacy@freebsd.org using -f From: Kip Macy To: Perforce Change Reviews Cc: Subject: PERFORCE change 132231 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 01 Jan 2008 06:35:04 -0000 http://perforce.freebsd.org/chv.cgi?CH=132231 Change 132231 by kmacy@pandemonium:kmacy:xen31 on 2008/01/01 06:35:03 re-disable interrupts for servicing pending events Affected files ... .. //depot/projects/xen31/sys/i386/xen/exception.s#3 edit Differences ... ==== //depot/projects/xen31/sys/i386/xen/exception.s#3 (text+ko) ==== @@ -136,6 +136,8 @@ pushl %eax; TRAP(T_HYPCALLBACK) hypervisor_callback_pending: + movl HYPERVISOR_shared_info,%esi + XEN_BLOCK_EVENTS(%esi) /* cli */ movl $T_HYPCALLBACK,TF_TRAPNO(%esp) movl $T_HYPCALLBACK,TF_ERR(%esp) jmp 11f From owner-p4-projects@FreeBSD.ORG Tue Jan 1 06:36:05 2008 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 0DB2816A421; Tue, 1 Jan 2008 06:36:05 +0000 (UTC) Delivered-To: perforce@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id C719916A41B for ; Tue, 1 Jan 2008 06:36:04 +0000 (UTC) (envelope-from kmacy@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id B667913C43E for ; Tue, 1 Jan 2008 06:36:04 +0000 (UTC) (envelope-from kmacy@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.1/8.14.1) with ESMTP id m016a4bR017267 for ; Tue, 1 Jan 2008 06:36:04 GMT (envelope-from kmacy@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.1/8.14.1/Submit) id m016a4dL017264 for perforce@freebsd.org; Tue, 1 Jan 2008 06:36:04 GMT (envelope-from kmacy@freebsd.org) Date: Tue, 1 Jan 2008 06:36:04 GMT Message-Id: <200801010636.m016a4dL017264@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to kmacy@freebsd.org using -f From: Kip Macy To: Perforce Change Reviews Cc: Subject: PERFORCE change 132232 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 01 Jan 2008 06:36:05 -0000 http://perforce.freebsd.org/chv.cgi?CH=132232 Change 132232 by kmacy@pandemonium:kmacy:xen31 on 2008/01/01 06:36:00 this is a bit of an abomination but for the moment this allows us to store the interrupt masked bit in eflags Affected files ... .. //depot/projects/xen31/sys/i386/include/psl.h#2 edit Differences ... ==== //depot/projects/xen31/sys/i386/include/psl.h#2 (text+ko) ==== @@ -68,9 +68,13 @@ * Initial flags for kernel and user mode. The kernel later inherits * PSL_I and some other flags from user mode. */ +#ifdef XEN +#define PSL_KERNEL 1 +#define PSL_USER 0 +#else #define PSL_KERNEL PSL_RESERVED_DEFAULT #define PSL_USER (PSL_RESERVED_DEFAULT | PSL_I) - +#endif /* * Bits that can be changed in user mode on 486's. We allow these bits * to be changed using ptrace(), sigreturn() and procfs. Setting PS_NT From owner-p4-projects@FreeBSD.ORG Tue Jan 1 09:02:39 2008 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 9DFD016A421; Tue, 1 Jan 2008 09:02:39 +0000 (UTC) Delivered-To: perforce@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 62C2816A419 for ; Tue, 1 Jan 2008 09:02:39 +0000 (UTC) (envelope-from jb@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id C39AC13C442 for ; Tue, 1 Jan 2008 09:02:37 +0000 (UTC) (envelope-from jb@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.1/8.14.1) with ESMTP id m0192bPi083403 for ; Tue, 1 Jan 2008 09:02:37 GMT (envelope-from jb@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.1/8.14.1/Submit) id m0192bv8083398 for perforce@freebsd.org; Tue, 1 Jan 2008 09:02:37 GMT (envelope-from jb@freebsd.org) Date: Tue, 1 Jan 2008 09:02:37 GMT Message-Id: <200801010902.m0192bv8083398@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to jb@freebsd.org using -f From: John Birrell To: Perforce Change Reviews Cc: Subject: PERFORCE change 132235 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 01 Jan 2008 09:02:39 -0000 http://perforce.freebsd.org/chv.cgi?CH=132235 Change 132235 by jb@jb_freebsd1 on 2008/01/01 09:01:36 Revise the trap hook function. Add an external variable definition for the hook and a prototype of the function that is in the dtrace module. Affected files ... .. //depot/projects/dtrace/src/sys/sys/dtrace_bsd.h#9 edit Differences ... ==== //depot/projects/dtrace/src/sys/sys/dtrace_bsd.h#9 (text+ko) ==== @@ -53,7 +53,11 @@ * This type definition is used in the trap handler to provide a * hook for the dtrace module to register it's handler with. */ -typedef int (*dtrace_trap_func_t)(struct trapframe *); +typedef int (*dtrace_trap_func_t)(struct trapframe *, u_int); + +int dtrace_trap(struct trapframe *, u_int); + +extern dtrace_trap_func_t dtrace_trap_func; /* Used by the machine dependent trap() code. */ typedef int (*dtrace_invop_func_t)(uintptr_t, uintptr_t *, uintptr_t); From owner-p4-projects@FreeBSD.ORG Tue Jan 1 09:02:40 2008 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id E2A1D16A51E; Tue, 1 Jan 2008 09:02:39 +0000 (UTC) Delivered-To: perforce@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 9C67116A41B for ; Tue, 1 Jan 2008 09:02:39 +0000 (UTC) (envelope-from jb@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id E820C13C447 for ; Tue, 1 Jan 2008 09:02:37 +0000 (UTC) (envelope-from jb@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.1/8.14.1) with ESMTP id m0192bmU083413 for ; Tue, 1 Jan 2008 09:02:37 GMT (envelope-from jb@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.1/8.14.1/Submit) id m0192bUR083409 for perforce@freebsd.org; Tue, 1 Jan 2008 09:02:37 GMT (envelope-from jb@freebsd.org) Date: Tue, 1 Jan 2008 09:02:37 GMT Message-Id: <200801010902.m0192bUR083409@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to jb@freebsd.org using -f From: John Birrell To: Perforce Change Reviews Cc: Subject: PERFORCE change 132236 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 01 Jan 2008 09:02:40 -0000 http://perforce.freebsd.org/chv.cgi?CH=132236 Change 132236 by jb@jb_freebsd1 on 2008/01/01 09:02:21 Build in the instruction size code like on i386. Affected files ... .. //depot/projects/dtrace/src/sys/modules/dtrace/dtrace/Makefile#11 edit Differences ... ==== //depot/projects/dtrace/src/sys/modules/dtrace/dtrace/Makefile#11 (text+ko) ==== @@ -13,7 +13,7 @@ dtrace_asm.S \ dtrace_subr.c -.if ${MACHINE_ARCH} == "i386" +.if ${MACHINE_ARCH} == "amd64" || ${MACHINE_ARCH} == "i386" SRCS+= dis_tables.c \ instr_size.c .endif From owner-p4-projects@FreeBSD.ORG Tue Jan 1 09:04:44 2008 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id D0D4916A468; Tue, 1 Jan 2008 09:04:43 +0000 (UTC) Delivered-To: perforce@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 9663316A420 for ; Tue, 1 Jan 2008 09:04:43 +0000 (UTC) (envelope-from jb@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id 8656A13C455 for ; Tue, 1 Jan 2008 09:04:43 +0000 (UTC) (envelope-from jb@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.1/8.14.1) with ESMTP id m0194e28086464 for ; Tue, 1 Jan 2008 09:04:40 GMT (envelope-from jb@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.1/8.14.1/Submit) id m0194eoY086461 for perforce@freebsd.org; Tue, 1 Jan 2008 09:04:40 GMT (envelope-from jb@freebsd.org) Date: Tue, 1 Jan 2008 09:04:40 GMT Message-Id: <200801010904.m0194eoY086461@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to jb@freebsd.org using -f From: John Birrell To: Perforce Change Reviews Cc: Subject: PERFORCE change 132237 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 01 Jan 2008 09:04:44 -0000 http://perforce.freebsd.org/chv.cgi?CH=132237 Change 132237 by jb@jb_freebsd1 on 2008/01/01 09:03:56 Remove the M_DTRACE memory type references. Add the dtrace_trap() function which is hooked into the trap handler to deal with traps that occur during DTrace probe execution. Affected files ... .. //depot/projects/dtrace/src/sys/cddl/dev/dtrace/amd64/dtrace_subr.c#2 edit .. //depot/projects/dtrace/src/sys/cddl/dev/dtrace/i386/dtrace_subr.c#5 edit Differences ... ==== //depot/projects/dtrace/src/sys/cddl/dev/dtrace/amd64/dtrace_subr.c#2 (text+ko) ==== @@ -35,14 +35,14 @@ #include #include #include +#include extern uintptr_t kernelbase; extern uintptr_t dtrace_in_probe_addr; extern int dtrace_in_probe; int dtrace_invop(uintptr_t, uintptr_t *, uintptr_t); - -MALLOC_DECLARE(M_DTRACE); +int dtrace_trap(struct trapframe *, u_int); typedef struct dtrace_invop_hdlr { int (*dtih_func)(uintptr_t, uintptr_t *, uintptr_t); @@ -96,7 +96,7 @@ { dtrace_invop_hdlr_t *hdlr; - hdlr = malloc(sizeof (dtrace_invop_hdlr_t), M_DTRACE, M_WAITOK); + hdlr = kmem_alloc(sizeof (dtrace_invop_hdlr_t), KM_SLEEP); hdlr->dtih_func = func; hdlr->dtih_next = dtrace_invop_hdlr; dtrace_invop_hdlr = hdlr; @@ -130,7 +130,7 @@ prev->dtih_next = hdlr->dtih_next; } - free(hdlr, M_DTRACE); + kmem_free(hdlr, 0); #ifdef DOODAD if (dtrace_invop_hdlr == NULL) @@ -438,3 +438,56 @@ printf("%s(%d): XXX\n",__func__,__LINE__); return (0); } + +/* Function to handle DTrace traps during probes. See amd64/amd64/trap.c */ +int +dtrace_trap(struct trapframe *frame, u_int type) +{ + /* + * A trap can occur while DTrace executes a probe. Before + * executing the probe, DTrace blocks re-scheduling and sets + * a flag in it's per-cpu flags to indicate that it doesn't + * want to fault. On returning from the the probe, the no-fault + * flag is cleared and finally re-scheduling is enabled. + * + * Check if DTrace has enabled 'no-fault' mode: + * + */ + if ((cpu_core[curcpu].cpuc_dtrace_flags & CPU_DTRACE_NOFAULT) != 0) { + /* + * There are only a couple of trap types that are expected. + * All the rest will be handled in the usual way. + */ + switch (type) { + /* General protection fault. */ + case T_PROTFLT: + /* Flag an illegal operation. */ + cpu_core[curcpu].cpuc_dtrace_flags |= CPU_DTRACE_ILLOP; + + /* + * Offset the instruction pointer to the instruction + * following the one causing the fault. + */ + frame->tf_rip += dtrace_instr_size((u_char *) frame->tf_rip); + return (1); + /* Page fault. */ + case T_PAGEFLT: + /* Flag a bad address. */ + cpu_core[curcpu].cpuc_dtrace_flags |= CPU_DTRACE_BADADDR; + cpu_core[curcpu].cpuc_dtrace_illval = frame->tf_addr; + + /* + * Offset the instruction pointer to the instruction + * following the one causing the fault. + */ + frame->tf_rip += dtrace_instr_size((u_char *) frame->tf_rip); + return (1); + default: + /* Handle all other traps in the usual way. */ + break; + } + } + + /* Handle the trap in the usual way. */ + return (0); +} ==== //depot/projects/dtrace/src/sys/cddl/dev/dtrace/i386/dtrace_subr.c#5 (text+ko) ==== @@ -42,8 +42,6 @@ int dtrace_invop(uintptr_t, uintptr_t *, uintptr_t); -MALLOC_DECLARE(M_DTRACE); - typedef struct dtrace_invop_hdlr { int (*dtih_func)(uintptr_t, uintptr_t *, uintptr_t); struct dtrace_invop_hdlr *dtih_next; @@ -96,7 +94,7 @@ { dtrace_invop_hdlr_t *hdlr; - hdlr = malloc(sizeof (dtrace_invop_hdlr_t), M_DTRACE, M_WAITOK); + hdlr = kmem_alloc(sizeof (dtrace_invop_hdlr_t), KM_SLEEP); hdlr->dtih_func = func; hdlr->dtih_next = dtrace_invop_hdlr; dtrace_invop_hdlr = hdlr; @@ -128,7 +126,7 @@ prev->dtih_next = hdlr->dtih_next; } - free(hdlr, M_DTRACE); + kmem_free(hdlr, 0); if (dtrace_invop_hdlr == NULL) dtrace_invop_func = NULL; @@ -427,3 +425,56 @@ return (1); } #endif + +/* Function to handle DTrace traps during probes. See i386/i386/trap.c */ +int +dtrace_trap(struct trapframe *frame) +{ + /* + * A trap can occur while DTrace executes a probe. Before + * executing the probe, DTrace blocks re-scheduling and sets + * a flag in it's per-cpu flags to indicate that it doesn't + * want to fault. On returning from the the probe, the no-fault + * flag is cleared and finally re-scheduling is enabled. + * + * Check if DTrace has enabled 'no-fault' mode: + * + */ + if ((cpu_core[curcpu].cpuc_dtrace_flags & CPU_DTRACE_NOFAULT) != 0) { + /* + * There are only a couple of trap types that are expected. + * All the rest will be handled in the usual way. + */ + switch (type) { + /* General protection fault. */ + case T_PROTFLT: + /* Flag an illegal operation. */ + cpu_core[curcpu].cpuc_dtrace_flags |= CPU_DTRACE_ILLOP; + + /* + * Offset the instruction pointer to the instruction + * following the one causing the fault. + */ + frame->tf_eip += dtrace_instr_size((u_char *) frame->tf_eip); + return (1); + /* Page fault. */ + case T_PAGEFLT: + /* Flag a bad address. */ + cpu_core[curcpu].cpuc_dtrace_flags |= CPU_DTRACE_BADADDR; + cpu_core[curcpu].cpuc_dtrace_illval = rcr2(); + + /* + * Offset the instruction pointer to the instruction + * following the one causing the fault. + */ + frame->tf_eip += dtrace_instr_size((u_char *) frame->tf_eip); + return (1); + default: + /* Handle all other traps in the usual way. */ + break; + } + } + + /* Handle the trap in the usual way. */ + return (0); +} From owner-p4-projects@FreeBSD.ORG Tue Jan 1 09:06:43 2008 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 330D716A419; Tue, 1 Jan 2008 09:06:43 +0000 (UTC) Delivered-To: perforce@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id ED26C16A421 for ; Tue, 1 Jan 2008 09:06:42 +0000 (UTC) (envelope-from jb@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id C5C1513C461 for ; Tue, 1 Jan 2008 09:06:42 +0000 (UTC) (envelope-from jb@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.1/8.14.1) with ESMTP id m0196g7D086599 for ; Tue, 1 Jan 2008 09:06:42 GMT (envelope-from jb@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.1/8.14.1/Submit) id m0196gbo086596 for perforce@freebsd.org; Tue, 1 Jan 2008 09:06:42 GMT (envelope-from jb@freebsd.org) Date: Tue, 1 Jan 2008 09:06:42 GMT Message-Id: <200801010906.m0196gbo086596@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to jb@freebsd.org using -f From: John Birrell To: Perforce Change Reviews Cc: Subject: PERFORCE change 132238 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 01 Jan 2008 09:06:43 -0000 http://perforce.freebsd.org/chv.cgi?CH=132238 Change 132238 by jb@jb_freebsd1 on 2008/01/01 09:05:50 Add the instruction code for amd64. This should be shared with i386 like on OpenSolaris. I'll revise that later if/when I find a way to build directly from OpenSolaris code. Affected files ... .. //depot/projects/dtrace/src/sys/cddl/dev/dtrace/amd64/dis_tables.c#1 add .. //depot/projects/dtrace/src/sys/cddl/dev/dtrace/amd64/dis_tables.h#1 add .. //depot/projects/dtrace/src/sys/cddl/dev/dtrace/amd64/instr_size.c#1 add Differences ... From owner-p4-projects@FreeBSD.ORG Tue Jan 1 09:06:43 2008 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 977B416A521; Tue, 1 Jan 2008 09:06:43 +0000 (UTC) Delivered-To: perforce@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 13E1416A417 for ; Tue, 1 Jan 2008 09:06:43 +0000 (UTC) (envelope-from jb@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id 047F413C465 for ; Tue, 1 Jan 2008 09:06:43 +0000 (UTC) (envelope-from jb@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.1/8.14.1) with ESMTP id m0196g8P086605 for ; Tue, 1 Jan 2008 09:06:42 GMT (envelope-from jb@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.1/8.14.1/Submit) id m0196grI086602 for perforce@freebsd.org; Tue, 1 Jan 2008 09:06:42 GMT (envelope-from jb@freebsd.org) Date: Tue, 1 Jan 2008 09:06:42 GMT Message-Id: <200801010906.m0196grI086602@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to jb@freebsd.org using -f From: John Birrell To: Perforce Change Reviews Cc: Subject: PERFORCE change 132239 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 01 Jan 2008 09:06:44 -0000 http://perforce.freebsd.org/chv.cgi?CH=132239 Change 132239 by jb@jb_freebsd1 on 2008/01/01 09:06:34 Add the trap function to the hook on loading and NULL when unloading. Re-order some locks. Affected files ... .. //depot/projects/dtrace/src/sys/cddl/dev/dtrace/dtrace_load.c#22 edit .. //depot/projects/dtrace/src/sys/cddl/dev/dtrace/dtrace_unload.c#19 edit Differences ... ==== //depot/projects/dtrace/src/sys/cddl/dev/dtrace/dtrace_load.c#22 (text+ko) ==== @@ -27,10 +27,8 @@ { dtrace_provider_id_t id; -#if defined(__i386__) - /* Hang our hook for DTrace traps during probes. */ - dtrace_instr_size_func = dtrace_instr_size; -#endif + /* Hook into the trap handler. */ + dtrace_trap_func = dtrace_trap; #ifdef DOODAD /* Hang our hook for thread switches. */ @@ -56,9 +54,9 @@ mutex_init(&dtrace_meta_lock,"dtrace meta-provider state", MUTEX_DEFAULT, NULL); mutex_init(&dtrace_errlock,"dtrace error lock", MUTEX_DEFAULT, NULL); - mutex_enter(&cpu_lock); mutex_enter(&dtrace_provider_lock); mutex_enter(&dtrace_lock); + mutex_enter(&cpu_lock); #ifdef DOODAD dtrace_modload = dtrace_module_loaded; ==== //depot/projects/dtrace/src/sys/cddl/dev/dtrace/dtrace_unload.c#19 (text+ko) ==== @@ -41,23 +41,23 @@ clone_cleanup(&dtrace_clones); } - mutex_enter(&cpu_lock); mutex_enter(&dtrace_provider_lock); mutex_enter(&dtrace_lock); + mutex_enter(&cpu_lock); ASSERT(dtrace_opens == 0); if (dtrace_helpers > 0) { + mutex_exit(&cpu_lock); + mutex_exit(&dtrace_lock); mutex_exit(&dtrace_provider_lock); - mutex_exit(&dtrace_lock); - mutex_exit(&cpu_lock); return (EBUSY); } if (dtrace_unregister((dtrace_provider_id_t)dtrace_provider) != 0) { + mutex_exit(&cpu_lock); + mutex_exit(&dtrace_lock); mutex_exit(&dtrace_provider_lock); - mutex_exit(&dtrace_lock); - mutex_exit(&cpu_lock); return (EBUSY); } @@ -168,10 +168,8 @@ dtrace_vtime_switch_func = NULL; #endif -#if defined(__i386__) - /* Reset our hook for DTrace traps during probes. */ - dtrace_instr_size_func = NULL; -#endif + /* Unhook from the trap handler. */ + dtrace_trap_func = NULL; return (error); } From owner-p4-projects@FreeBSD.ORG Tue Jan 1 09:08:45 2008 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 9B0D916A420; Tue, 1 Jan 2008 09:08:45 +0000 (UTC) Delivered-To: perforce@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 60DBE16A419 for ; Tue, 1 Jan 2008 09:08:45 +0000 (UTC) (envelope-from jb@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id 3882913C45B for ; Tue, 1 Jan 2008 09:08:45 +0000 (UTC) (envelope-from jb@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.1/8.14.1) with ESMTP id m0198jrg086666 for ; Tue, 1 Jan 2008 09:08:45 GMT (envelope-from jb@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.1/8.14.1/Submit) id m0198jTJ086663 for perforce@freebsd.org; Tue, 1 Jan 2008 09:08:45 GMT (envelope-from jb@freebsd.org) Date: Tue, 1 Jan 2008 09:08:45 GMT Message-Id: <200801010908.m0198jTJ086663@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to jb@freebsd.org using -f From: John Birrell To: Perforce Change Reviews Cc: Subject: PERFORCE change 132240 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 01 Jan 2008 09:08:45 -0000 http://perforce.freebsd.org/chv.cgi?CH=132240 Change 132240 by jb@jb_freebsd1 on 2008/01/01 09:08:04 The dtrace_trap function prototype is in dtrace_bsd.h now. Affected files ... .. //depot/projects/dtrace/src/sys/cddl/dev/dtrace/amd64/dtrace_subr.c#3 edit Differences ... ==== //depot/projects/dtrace/src/sys/cddl/dev/dtrace/amd64/dtrace_subr.c#3 (text+ko) ==== @@ -42,7 +42,6 @@ extern int dtrace_in_probe; int dtrace_invop(uintptr_t, uintptr_t *, uintptr_t); -int dtrace_trap(struct trapframe *, u_int); typedef struct dtrace_invop_hdlr { int (*dtih_func)(uintptr_t, uintptr_t *, uintptr_t); From owner-p4-projects@FreeBSD.ORG Tue Jan 1 13:10:56 2008 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id C553B16A420; Tue, 1 Jan 2008 13:10:55 +0000 (UTC) Delivered-To: perforce@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 8991D16A41A for ; Tue, 1 Jan 2008 13:10:55 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id 76F8C13C467 for ; Tue, 1 Jan 2008 13:10:55 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.1/8.14.1) with ESMTP id m01DAtvA091878 for ; Tue, 1 Jan 2008 13:10:55 GMT (envelope-from hselasky@FreeBSD.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.1/8.14.1/Submit) id m01DAtNs091868 for perforce@freebsd.org; Tue, 1 Jan 2008 13:10:55 GMT (envelope-from hselasky@FreeBSD.org) Date: Tue, 1 Jan 2008 13:10:55 GMT Message-Id: <200801011310.m01DAtNs091868@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky To: Perforce Change Reviews Cc: Subject: PERFORCE change 132244 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 01 Jan 2008 13:10:56 -0000 http://perforce.freebsd.org/chv.cgi?CH=132244 Change 132244 by hselasky@hselasky_laptop001 on 2008/01/01 13:10:29 Get latest if_zyd header files and register definitions from FreeBSD head. Affected files ... .. //depot/projects/usb/src/sys/dev/usb/if_zydfw.h#5 edit .. //depot/projects/usb/src/sys/dev/usb/if_zydreg.h#9 edit Differences ... ==== //depot/projects/usb/src/sys/dev/usb/if_zydfw.h#5 (text+ko) ==== @@ -1,663 +1,1144 @@ /* - * Copyright (c) 2006 by Hans Petter Selasky + * Copyright (C) 2001, 2002, 2003,2004 ZyDAS Technology Corporation. + * All rights reserved. * - * Permission to use, copy, modify, and distribute this software for any - * purpose with or without fee is hereby granted, provided that the above - * copyright notice and this permission notice appear in all copies. + * Redistribution and use in source and binary forms are permitted provided + * that the following conditions are met: + * 1. Redistribution of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistribution in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission * - * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES - * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF - * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR - * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES - * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN - * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF - * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (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/usb/if_zydfw.h,v 1.2 2007/11/03 19:24:51 sam Exp $ */ + +uint8_t zd1211_firmware[] = { + 0x08, 0x91, 0xFF, 0xED, 0x09, 0x93, 0x1E, 0xEE, + 0xD1, 0x94, 0x11, 0xEE, 0x88, 0xD4, 0xD1, 0x96, + 0xD1, 0x98, 0x5C, 0x99, 0x5C, 0x99, 0x4C, 0x99, + 0x04, 0x9D, 0xD1, 0x98, 0xD1, 0x9A, 0x03, 0xEE, + 0xF4, 0x94, 0xD3, 0xD4, 0x41, 0x2A, 0x40, 0x4A, + 0x45, 0xBE, 0x88, 0x92, 0x41, 0x24, 0x40, 0x44, + 0x53, 0xBE, 0x40, 0xF0, 0x93, 0xEE, 0x41, 0xEE, + 0x98, 0x9A, 0xD4, 0xF7, 0x02, 0x00, 0x1F, 0xEC, + 0x00, 0x00, 0xB2, 0xF8, 0x4D, 0x00, 0xA1, 0xEC, + 0x00, 0x00, 0xA6, 0xF7, 0x21, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xA0, 0xD8, + 0xA0, 0x90, 0x98, 0x9A, 0x98, 0x9A, 0xA0, 0xD8, + 0x40, 0xF0, 0xB4, 0xF0, 0xA0, 0x90, 0x98, 0x9A, + 0xA0, 0xD8, 0x40, 0xF0, 0x64, 0xEF, 0xA0, 0x90, + 0x98, 0x9A, 0xA0, 0xD8, 0x40, 0xF0, 0xF6, 0xF0, + 0xA0, 0x90, 0x98, 0x9A, 0xA0, 0xD8, 0x40, 0xF0, + 0xF7, 0xF6, 0xA0, 0x90, 0x98, 0x9A, 0xA0, 0xD8, + 0x40, 0xF0, 0xF8, 0xF5, 0xA0, 0x90, 0x98, 0x9A, + 0xA0, 0xD8, 0x40, 0xF0, 0xF1, 0xF0, 0xA0, 0x90, + 0x98, 0x9A, 0x98, 0x9A, 0xA0, 0xD8, 0x40, 0xF0, + 0x97, 0xF7, 0xA0, 0x90, 0x98, 0x9A, 0x88, 0xDA, + 0x08, 0x0B, 0x01, 0x00, 0x0D, 0x03, 0x03, 0x00, + 0x09, 0x05, 0x01, 0x00, 0xC2, 0x94, 0x42, 0x02, + 0xC1, 0x92, 0x03, 0x96, 0x1B, 0xD7, 0x2A, 0x86, + 0x1A, 0xD5, 0x2B, 0x86, 0x09, 0xA3, 0x00, 0x80, + 0x19, 0xD3, 0x2C, 0x86, 0x00, 0xEE, 0x0A, 0x65, + 0xC0, 0x7A, 0x02, 0x97, 0xC3, 0x92, 0x09, 0xB3, + 0xFE, 0xFF, 0xC2, 0xD2, 0x88, 0x98, 0x90, 0x9A, + 0x88, 0xDA, 0x42, 0x20, 0x08, 0x0B, 0x01, 0x00, + 0x0D, 0x03, 0x05, 0x00, 0x05, 0x94, 0xC5, 0xD4, + 0x09, 0x05, 0x01, 0x00, 0xC2, 0x94, 0x01, 0xD4, + 0x42, 0x02, 0xC1, 0x96, 0x0A, 0x65, 0xC0, 0x7A, + 0x02, 0x99, 0xC4, 0x92, 0x41, 0xA2, 0xC4, 0xD2, + 0xC5, 0x98, 0x1C, 0xD9, 0x2A, 0x86, 0x01, 0x98, + 0x1C, 0xD9, 0x2B, 0x86, 0x1B, 0xD7, 0x2C, 0x86, + 0x00, 0xEE, 0x09, 0xB3, 0xFE, 0xFF, 0xC2, 0xD2, + 0x42, 0x00, 0x88, 0x98, 0x90, 0x9A, 0x88, 0xDA, + 0x41, 0x20, 0x08, 0x0B, 0x01, 0x00, 0x40, 0xF0, + 0xE5, 0xEE, 0x11, 0x93, 0xD8, 0xF7, 0x41, 0x42, + 0x02, 0x5E, 0x0F, 0x9F, 0xAE, 0xEE, 0x40, 0xF1, + 0x40, 0x92, 0x19, 0xD3, 0xD8, 0xF7, 0xC5, 0x92, + 0x41, 0x92, 0x19, 0xD3, 0x00, 0x83, 0x40, 0x92, + 0x19, 0xD3, 0x00, 0x83, 0x0F, 0x9F, 0x95, 0xF8, + 0x0F, 0x9F, 0x99, 0xEE, 0x42, 0x42, 0x02, 0x5E, + 0x0F, 0x9F, 0x99, 0xEE, 0x40, 0x92, 0x19, 0xD3, + 0xD8, 0xF7, 0x09, 0x93, 0xC7, 0xF7, 0x19, 0xD3, + 0x91, 0xEC, 0x40, 0xF0, 0x5F, 0xF2, 0x09, 0x63, + 0x00, 0x80, 0x19, 0xD3, 0xF2, 0xBD, 0x0F, 0x9F, + 0x99, 0xEE, 0x41, 0x00, 0x88, 0x98, 0x90, 0x9A, + 0x88, 0xDA, 0x08, 0x0B, 0x01, 0x00, 0x40, 0x92, + 0x19, 0xD3, 0x12, 0x95, 0x19, 0xD3, 0x10, 0x95, + 0x19, 0xD3, 0x02, 0x80, 0x19, 0xD3, 0x03, 0x82, + 0x09, 0x93, 0xC7, 0xF7, 0x19, 0xD3, 0x91, 0xEC, + 0x40, 0xF0, 0x5F, 0xF2, 0x40, 0xF0, 0xDE, 0xF3, + 0x11, 0x93, 0x04, 0xEC, 0x42, 0x42, 0x02, 0x5E, + 0x0F, 0x9F, 0xE3, 0xEE, 0x40, 0x92, 0x19, 0xD3, + 0x04, 0xEC, 0x40, 0xF0, 0x38, 0xF2, 0x88, 0x98, + 0x90, 0x9A, 0x88, 0xDA, 0x08, 0x0B, 0x01, 0x00, + 0x11, 0x93, 0x44, 0x96, 0x09, 0xB3, 0xFF, 0xFD, + 0x19, 0xD3, 0x44, 0x96, 0x40, 0xF0, 0x90, 0xF7, + 0x6E, 0x92, 0x19, 0xD3, 0x05, 0x84, 0x40, 0xF0, + 0xC4, 0xEE, 0x4B, 0x62, 0x0A, 0x95, 0x2E, 0xEE, + 0xD1, 0xD4, 0x0B, 0x97, 0x2B, 0xEE, 0xD1, 0xD6, + 0x0A, 0x95, 0x00, 0xEE, 0xD1, 0xD4, 0x0B, 0x97, + 0x2F, 0xEE, 0xD1, 0xD6, 0x0A, 0x95, 0x34, 0xEE, + 0xD1, 0xD4, 0x0B, 0x97, 0x39, 0xEE, 0xD1, 0xD6, + 0x0A, 0x95, 0x3E, 0xEE, 0xD1, 0xD4, 0x0B, 0x97, + 0x43, 0xEE, 0xD1, 0xD6, 0x0A, 0x95, 0x48, 0xEE, + 0xD1, 0xD4, 0x0B, 0x97, 0x4D, 0xEE, 0xD1, 0xD6, + 0x0A, 0x95, 0x4E, 0xEE, 0xC1, 0xD4, 0x0A, 0x65, + 0x00, 0x44, 0x02, 0x97, 0xC3, 0x92, 0x44, 0xA2, + 0xC2, 0xD2, 0x43, 0xF1, 0x09, 0x93, 0x01, 0x3F, + 0x19, 0xD3, 0xC0, 0x85, 0x11, 0x93, 0x44, 0x96, + 0x09, 0xB3, 0xFF, 0xFC, 0x19, 0xD3, 0x44, 0x96, + 0x88, 0x98, 0x90, 0x9A, 0x88, 0xDA, 0x08, 0x0B, + 0x01, 0x00, 0x0D, 0x03, 0x03, 0x00, 0x03, 0x96, + 0x41, 0x02, 0x03, 0x99, 0xC4, 0x94, 0x42, 0x04, + 0xC1, 0x04, 0xC2, 0x94, 0xC3, 0xD4, 0x88, 0x98, + 0x90, 0x9A, 0x88, 0xDA, 0x08, 0x0B, 0x01, 0x00, + 0x40, 0x92, 0x19, 0xD3, 0x94, 0xEC, 0x13, 0x97, + 0x95, 0xEC, 0x1B, 0xD7, 0x02, 0x80, 0x11, 0x93, + 0x99, 0xEC, 0x19, 0xD3, 0x7C, 0x96, 0x0B, 0x97, + 0xA0, 0x00, 0x1B, 0xD7, 0x6E, 0xEC, 0x0A, 0x65, + 0x0E, 0x42, 0x02, 0x97, 0xC3, 0x92, 0x09, 0xB3, + 0xFF, 0xBF, 0x11, 0xA3, 0x9A, 0xEC, 0xC2, 0xD2, + 0x0A, 0x65, 0xEB, 0x43, 0x02, 0x97, 0xC3, 0x92, + 0x09, 0xA3, 0xC0, 0x00, 0xC2, 0xD2, 0x0A, 0x65, + 0xE9, 0x43, 0x02, 0x97, 0xC3, 0x92, 0x09, 0xB3, + 0xBF, 0xFF, 0xC2, 0xD2, 0x88, 0x98, 0x90, 0x9A, + 0x88, 0xDA, 0x47, 0x20, 0x08, 0x0B, 0x01, 0x00, + 0x14, 0x99, 0x03, 0x80, 0x0C, 0xB3, 0x00, 0x10, + 0x40, 0x42, 0x02, 0x4E, 0x0F, 0x9F, 0x97, 0xF0, + 0x11, 0x93, 0x9F, 0xEC, 0x41, 0x02, 0x19, 0xD3, + 0x9F, 0xEC, 0x11, 0x93, 0xD6, 0xF7, 0x40, 0x42, + 0x02, 0x4E, 0x0F, 0x9F, 0x84, 0xEF, 0x0A, 0x65, + 0xFE, 0x7F, 0x02, 0x97, 0xC3, 0x92, 0x09, 0xA3, + 0x00, 0x04, 0xC2, 0xD2, 0x0F, 0x9F, 0xB1, 0xF0, + 0x11, 0x93, 0x94, 0xEC, 0x02, 0xD2, 0x40, 0x42, + 0x02, 0x5E, 0x0F, 0x9F, 0xD0, 0xEF, 0x41, 0x92, + 0x19, 0xD3, 0x94, 0xEC, 0x19, 0xD3, 0x9F, 0xEC, + 0x12, 0x95, 0x02, 0x80, 0x1A, 0xD5, 0x95, 0xEC, + 0x13, 0x97, 0x7C, 0x96, 0x1B, 0xD7, 0x99, 0xEC, + 0x0A, 0x65, 0x0E, 0x42, 0x02, 0x97, 0xC3, 0x92, + 0x09, 0xB3, 0x00, 0x40, 0x19, 0xD3, 0x9A, 0xEC, + 0x09, 0x63, 0x00, 0x40, 0xC2, 0xD2, 0x02, 0x94, + 0x1A, 0xD5, 0x7C, 0x96, 0x0C, 0xB3, 0x00, 0x08, + 0x40, 0x42, 0x02, 0x5E, 0x0F, 0x9F, 0xB0, 0xEF, + 0x0C, 0xB3, 0xFF, 0x07, 0x0F, 0x9F, 0xB4, 0xEF, + 0x11, 0x93, 0x06, 0x80, 0x09, 0xB3, 0xFF, 0x07, + 0x09, 0x03, 0x00, 0xA0, 0x19, 0xD3, 0x97, 0xEC, + 0x40, 0x98, 0x0B, 0x97, 0x9C, 0xEC, 0x04, 0x95, + 0x03, 0x05, 0x14, 0x03, 0x97, 0xEC, 0x46, 0x02, + 0xC1, 0x92, 0xC2, 0xD2, 0x41, 0x08, 0x42, 0x48, + 0x02, 0x9E, 0x0F, 0x9F, 0xBB, 0xEF, 0x11, 0x93, + 0x97, 0xEC, 0xC1, 0x92, 0xC5, 0xD2, 0x5F, 0xB2, + 0x19, 0xD3, 0x9B, 0xEC, 0x0F, 0x9F, 0xD3, 0xEF, + 0x13, 0x97, 0x98, 0xEC, 0xC5, 0xD6, 0x11, 0x93, + 0x03, 0x80, 0x09, 0xB3, 0x00, 0x08, 0x40, 0x42, + 0x02, 0x4E, 0x0F, 0x9F, 0xE9, 0xEF, 0x11, 0x93, + 0xDC, 0xF7, 0x41, 0x02, 0x19, 0xD3, 0xDC, 0xF7, + 0x11, 0x93, 0xDB, 0xF7, 0x09, 0xA3, 0x00, 0x10, + 0x19, 0xD3, 0xDB, 0xF7, 0x40, 0x98, 0x1C, 0xD9, + 0x9B, 0xEC, 0x12, 0x95, 0x9B, 0xEC, 0x40, 0x44, + 0x02, 0x4E, 0x0F, 0x9F, 0x86, 0xF0, 0x0A, 0xB3, + 0x08, 0x00, 0x40, 0x42, 0x02, 0x4E, 0x0F, 0x9F, + 0x07, 0xF0, 0x0A, 0xB3, 0x07, 0x00, 0x09, 0x05, + 0xA9, 0xEC, 0xC2, 0x94, 0x01, 0xD4, 0x09, 0x03, + 0xA1, 0xEC, 0xC1, 0x92, 0x19, 0xD3, 0x9B, 0xEC, + 0xC5, 0x94, 0x0A, 0xB5, 0x00, 0xFF, 0x01, 0xA5, + 0xC5, 0xD4, 0x0F, 0x9F, 0x13, 0xF0, 0x0A, 0x05, + 0xFF, 0xFF, 0x0A, 0x03, 0xB1, 0xEC, 0xC1, 0x92, + 0x01, 0xD2, 0x1A, 0xD5, 0x9B, 0xEC, 0xC5, 0x96, + 0x0B, 0x07, 0xFF, 0xFF, 0xC5, 0xD6, 0x11, 0x93, + 0x97, 0xEC, 0xC5, 0x98, 0xC1, 0xD8, 0x11, 0x93, + 0x97, 0xEC, 0x09, 0x05, 0x0B, 0x00, 0x03, 0xD4, + 0xC2, 0x96, 0x06, 0xD6, 0x7B, 0x95, 0x7A, 0x95, + 0x4C, 0x02, 0xC1, 0x92, 0x59, 0x93, 0x59, 0x93, + 0x01, 0xA5, 0x01, 0x98, 0x0C, 0xF5, 0x7B, 0x93, + 0x09, 0x09, 0x01, 0x00, 0x06, 0x92, 0x09, 0xB3, + 0xFF, 0x00, 0x04, 0xD2, 0x5C, 0x93, 0x59, 0x93, + 0x04, 0x94, 0x01, 0xA5, 0x03, 0x96, 0xC3, 0xD4, + 0x11, 0x93, 0x97, 0xEC, 0x4C, 0x02, 0x05, 0xD2, + 0xC1, 0x92, 0x09, 0xB3, 0x00, 0xFF, 0x7C, 0x95, + 0x7A, 0x95, 0x02, 0xA3, 0x05, 0x98, 0xC4, 0xD2, + 0x12, 0x95, 0x97, 0xEC, 0x45, 0x04, 0x02, 0x97, + 0xC3, 0x92, 0x09, 0xA3, 0x00, 0x01, 0xC2, 0xD2, + 0x12, 0x95, 0x9B, 0xEC, 0x0A, 0xB3, 0x08, 0x00, + 0x40, 0x42, 0x02, 0x4E, 0x0F, 0x9F, 0x5B, 0xF0, + 0x12, 0x95, 0x97, 0xEC, 0x4A, 0x04, 0x02, 0x99, + 0xC4, 0x92, 0x01, 0x98, 0x0C, 0xF3, 0x7B, 0x93, + 0x41, 0x02, 0x0F, 0x9F, 0x7C, 0xF0, 0x43, 0x44, + 0x02, 0x8E, 0x0F, 0x9F, 0x7D, 0xF0, 0x11, 0x93, + 0x97, 0xEC, 0x42, 0x02, 0x0A, 0x05, 0xFF, 0xFF, + 0xC1, 0xD4, 0x11, 0x93, 0x97, 0xEC, 0x4A, 0x02, + 0x12, 0x95, 0x60, 0x96, 0xC1, 0xD4, 0x12, 0x95, + 0x97, 0xEC, 0x4B, 0x04, 0x02, 0x97, 0xC3, 0x92, + 0x09, 0xB3, 0x1F, 0xFF, 0xC2, 0xD2, 0x12, 0x95, + 0x97, 0xEC, 0x4B, 0x04, 0x11, 0x93, 0x62, 0x96, + 0x41, 0x93, 0x59, 0x93, 0x02, 0x99, 0xC4, 0xA2, + 0xC2, 0xD2, 0xC5, 0x92, 0x19, 0xD3, 0x98, 0xEC, + 0x0A, 0x95, 0x0C, 0x02, 0x1A, 0xD5, 0x02, 0x80, + 0x0F, 0x9F, 0xB1, 0xF0, 0x09, 0x63, 0xFE, 0x7F, + 0x01, 0x97, 0xC3, 0x94, 0x0A, 0xA5, 0x00, 0x04, + 0xC1, 0xD4, 0x11, 0x93, 0x9F, 0xEC, 0x09, 0xA3, + 0x00, 0x01, 0x19, 0xD3, 0x9F, 0xEC, 0x40, 0xF0, + 0x39, 0xEF, 0x0F, 0x9F, 0xB1, 0xF0, 0x11, 0x93, + 0x94, 0xEC, 0x41, 0x42, 0x02, 0x5E, 0x0F, 0x9F, + 0xA6, 0xF0, 0x40, 0xF0, 0x39, 0xEF, 0x11, 0x93, + 0x95, 0xEC, 0x44, 0xB2, 0x40, 0x42, 0x02, 0x4E, + 0x0F, 0x9F, 0xB1, 0xF0, 0x48, 0x98, 0x1C, 0xD9, + 0x02, 0x80, 0x11, 0x93, 0x91, 0xEC, 0x41, 0x22, + 0x0A, 0x95, 0xB1, 0xF0, 0x88, 0xD4, 0x88, 0xDC, + 0x91, 0x9A, 0x47, 0x00, 0x88, 0x98, 0x90, 0x9A, + 0x88, 0xDA, 0x08, 0x0B, 0x01, 0x00, 0x11, 0x93, + 0x04, 0x82, 0x48, 0xB2, 0x40, 0x42, 0x02, 0x4E, + 0x0F, 0x9F, 0xC8, 0xF0, 0x0A, 0x65, 0xFD, 0x7D, + 0x02, 0x97, 0xC3, 0x92, 0x09, 0xB3, 0xFF, 0xFE, + 0xC2, 0xD2, 0x41, 0x92, 0x19, 0xD3, 0xBF, 0xEC, + 0x11, 0x93, 0x04, 0x82, 0x43, 0xB2, 0x12, 0x95, + 0x03, 0x82, 0x02, 0xB3, 0x40, 0x42, 0x02, 0x4E, + 0x0F, 0x9F, 0xEF, 0xF0, 0x0A, 0xB3, 0x00, 0xFF, + 0x48, 0xA2, 0x19, 0xD3, 0x03, 0x82, 0x40, 0xF0, + 0xEB, 0xF3, 0x11, 0x93, 0xBF, 0xEC, 0x41, 0x42, + 0x02, 0x5E, 0x0F, 0x9F, 0xEF, 0xF0, 0x11, 0x93, + 0x07, 0x82, 0x11, 0x43, 0x03, 0xEC, 0x02, 0x0E, + 0x0F, 0x9F, 0xEF, 0xF0, 0x11, 0x93, 0x03, 0x82, + 0x09, 0xA3, 0x00, 0x01, 0x19, 0xD3, 0x03, 0x82, + 0x40, 0x96, 0x1B, 0xD7, 0xBF, 0xEC, 0x88, 0x98, + 0x90, 0x9A, 0x88, 0xDA, 0x08, 0x0B, 0x01, 0x00, + 0x88, 0x98, 0x90, 0x9A, 0x88, 0xDA, 0x08, 0x0B, + 0x01, 0x00, 0x11, 0x93, 0x20, 0xBC, 0xC8, 0xD2, + 0x40, 0xF0, 0x48, 0xF1, 0x41, 0x00, 0x88, 0x98, + 0x90, 0x9A, 0x88, 0xDA, 0x42, 0x20, 0x08, 0x0B, + 0x01, 0x00, 0x0D, 0x03, 0x05, 0x00, 0x05, 0x94, + 0x41, 0x02, 0xC1, 0x92, 0x01, 0x97, 0xC3, 0x96, + 0xC2, 0xD6, 0x0A, 0x45, 0x00, 0x95, 0x02, 0x5E, + 0x0F, 0x9F, 0x45, 0xF1, 0xC1, 0x92, 0x41, 0xB2, + 0x40, 0x42, 0x02, 0x4E, 0x0F, 0x9F, 0x45, 0xF1, + 0x11, 0x93, 0xC0, 0xEC, 0x40, 0x42, 0x02, 0x5E, + 0x0F, 0x9F, 0x45, 0xF1, 0x41, 0x98, 0x1C, 0xD9, + 0xC0, 0xEC, 0x12, 0x95, 0x02, 0x80, 0x01, 0xD4, + 0x40, 0xF0, 0x56, 0xF2, 0x0B, 0x67, 0xFD, 0x7D, + 0x03, 0x99, 0xC4, 0x92, 0x0C, 0x99, 0x96, 0x03, + 0x1C, 0xD9, 0x06, 0x82, 0x41, 0x98, 0x1C, 0xD9, + 0x02, 0x82, 0x42, 0x98, 0x1C, 0xD9, 0x05, 0x82, + 0x0C, 0x69, 0x80, 0x7F, 0x1C, 0xD9, 0x00, 0xB0, + 0x09, 0xA3, 0x00, 0x01, 0xC3, 0xD2, 0x01, 0x94, + 0x0A, 0xB3, 0x04, 0x00, 0x40, 0x42, 0x02, 0x4E, + 0x0F, 0x9F, 0x43, 0xF1, 0x42, 0xA4, 0x1A, 0xD5, + 0x02, 0x80, 0x42, 0x00, 0x88, 0x98, 0x90, 0x9A, + 0x88, 0xDA, 0x42, 0x20, 0x08, 0x0B, 0x01, 0x00, + 0x05, 0x92, 0xC5, 0xD2, 0x60, 0xB2, 0x40, 0x42, + 0x02, 0x4E, 0x0F, 0x9F, 0x55, 0xF1, 0x40, 0xF0, + 0x35, 0xF7, 0xC5, 0x94, 0x0A, 0xB3, 0x10, 0x00, + 0x40, 0x42, 0x02, 0x4E, 0x0F, 0x9F, 0x5E, 0xF1, + 0x40, 0xF0, 0x23, 0xF6, 0xC5, 0x96, 0x0B, 0xB3, + 0x40, 0x00, 0x40, 0x42, 0x02, 0x4E, 0x0F, 0x9F, + 0x67, 0xF1, 0x40, 0xF0, 0x5D, 0xF5, 0xC5, 0x94, + 0x0A, 0xB3, 0x01, 0x00, 0x40, 0x42, 0x02, 0x4E, + 0x0F, 0x9F, 0xC8, 0xF1, 0x13, 0x97, 0x21, 0xBC, + 0x01, 0xD6, 0x0B, 0xB3, 0x02, 0x00, 0x40, 0x42, + 0x02, 0x4E, 0x0F, 0x9F, 0x79, 0xF1, 0x40, 0xF0, + 0x62, 0xFB, 0x01, 0x94, 0x0A, 0xB3, 0x04, 0x00, + 0x40, 0x42, 0x02, 0x4E, 0x0F, 0x9F, 0x82, 0xF1, + 0x40, 0xF0, 0x6C, 0xFB, 0x01, 0x96, 0x0B, 0xB3, + 0x01, 0x00, 0x40, 0x42, 0x02, 0x4E, 0x0F, 0x9F, + 0xA2, 0xF1, 0x40, 0xF0, 0xB0, 0xFA, 0x41, 0x92, + 0x19, 0xD3, 0xD5, 0xF7, 0x11, 0x93, 0x03, 0xEC, + 0x09, 0x43, 0x40, 0x00, 0x02, 0x5E, 0x0F, 0x9F, + 0x98, 0xF1, 0x40, 0x94, 0x1A, 0xD5, 0xD5, 0xF7, + 0x11, 0x93, 0x00, 0xEC, 0x40, 0x42, 0x02, 0x4E, + 0x0F, 0x9F, 0xAB, 0xF1, 0x40, 0xF0, 0x38, 0xF2, + 0x0F, 0x9F, 0xAB, 0xF1, 0x01, 0x96, 0x0B, 0xB3, + 0x08, 0x00, 0x40, 0x42, 0x02, 0x4E, 0x0F, 0x9F, + 0xAB, 0xF1, 0x40, 0xF0, 0x7C, 0xFB, 0x01, 0x94, + 0x0A, 0xB3, 0x10, 0x00, 0x40, 0x42, 0x02, 0x4E, + 0x0F, 0x9F, 0xB4, 0xF1, 0x40, 0xF0, 0x87, 0xFB, + 0x11, 0x93, 0x10, 0xEC, 0x42, 0x42, 0x02, 0x5E, + 0x0F, 0x9F, 0xBF, 0xF1, 0x44, 0x96, 0x1B, 0xD7, + 0x0B, 0xBC, 0x0F, 0x9F, 0xC5, 0xF1, 0x41, 0x42, + 0x02, 0x5E, 0x0F, 0x9F, 0xC5, 0xF1, 0x19, 0xD3, + 0x0B, 0xBC, 0x40, 0x92, 0x19, 0xD3, 0x10, 0xEC, + 0xC5, 0x94, 0x0A, 0xB3, 0x80, 0x00, 0x40, 0x42, + 0x02, 0x4E, 0x0F, 0x9F, 0x12, 0xF2, 0x13, 0x97, + 0x28, 0xBC, 0x01, 0xD6, 0x0B, 0xB3, 0x40, 0x00, + 0x40, 0x42, 0x02, 0x4E, 0x0F, 0x9F, 0xDA, 0xF1, + 0x40, 0xF0, 0x18, 0xF7, 0x01, 0x94, 0x0A, 0xB3, + 0x02, 0x00, 0x40, 0x42, 0x02, 0x4E, 0x0F, 0x9F, + 0xED, 0xF1, 0x40, 0xF0, 0xC4, 0xEE, 0x40, 0xF0, + 0x8F, 0xFB, 0x40, 0xF0, 0x1B, 0xF2, 0x40, 0x96, + 0x1B, 0xD7, 0x00, 0xEC, 0x41, 0x92, 0x19, 0xD3, + 0xD8, 0xF7, 0x01, 0x94, 0x0A, 0xB3, 0x04, 0x00, + 0x40, 0x42, 0x02, 0x4E, 0x0F, 0x9F, 0x09, 0xF2, + 0x40, 0xF0, 0x9E, 0xFB, 0x09, 0x63, 0x00, 0x44, + 0x01, 0x97, 0xC3, 0x94, 0x48, 0xA4, 0xC1, 0xD4, + 0x00, 0xEE, 0x40, 0x92, 0x19, 0xD3, 0x12, 0x95, + 0x19, 0xD3, 0x10, 0x95, 0x19, 0xD3, 0x02, 0x80, + 0x19, 0xD3, 0x03, 0x82, 0x41, 0x92, 0x19, 0xD3, + 0xD8, 0xF7, 0x01, 0x94, 0x0A, 0xB3, 0x08, 0x00, + 0x40, 0x42, 0x02, 0x4E, 0x0F, 0x9F, 0x12, 0xF2, + 0x40, 0xF0, 0xAE, 0xFB, 0x0A, 0x65, 0x00, 0x44, + 0x02, 0x97, 0xC3, 0x92, 0x44, 0xA2, 0xC2, 0xD2, + 0x42, 0x00, 0x88, 0x98, 0x90, 0x9A, 0x88, 0xDA, + 0x08, 0x0B, 0x01, 0x00, 0x09, 0x63, 0x00, 0x40, + 0x19, 0xD3, 0xF2, 0xBD, 0x0A, 0x65, 0xEA, 0x43, + 0x02, 0x97, 0xC3, 0x92, 0x44, 0xA2, 0xC2, 0xD2, + 0x0A, 0x65, 0xE9, 0x43, 0x02, 0x97, 0xC3, 0x92, + 0x09, 0xA3, 0x40, 0x00, 0xC2, 0xD2, 0x0A, 0x65, + 0xEB, 0x43, 0x02, 0x97, 0xC3, 0x92, 0x09, 0xA3, + 0xC0, 0x00, 0xC2, 0xD2, 0x88, 0x98, 0x90, 0x9A, + 0x88, 0xDA, 0x08, 0x0B, 0x01, 0x00, 0x09, 0x63, + 0x00, 0x80, 0x19, 0xD3, 0xF2, 0xBD, 0x0A, 0x65, + 0xE8, 0x43, 0x02, 0x97, 0xC3, 0x92, 0x09, 0xA3, + 0xC0, 0x00, 0xC2, 0xD2, 0x0A, 0x65, 0xEB, 0x43, + 0x02, 0x97, 0xC3, 0x92, 0x09, 0xB3, 0xBF, 0xFF, + 0xC2, 0xD2, 0x0A, 0x65, 0xEA, 0x43, 0x02, 0x97, + 0xC3, 0x92, 0x09, 0xB3, 0xFB, 0xFF, 0xC2, 0xD2, + 0x88, 0x98, 0x90, 0x9A, 0x88, 0xDA, 0x08, 0x0B, + 0x01, 0x00, 0x09, 0x93, 0x00, 0x01, 0x19, 0xD3, + 0x02, 0x80, 0x88, 0x98, 0x90, 0x9A, 0x88, 0xDA, + 0x08, 0x0B, 0x01, 0x00, 0x09, 0x93, 0x00, 0x09, + 0x19, 0xD3, 0x02, 0x80, 0x40, 0xF0, 0x56, 0xF2, + 0x40, 0x92, 0x19, 0xD3, 0x94, 0xEC, 0xC8, 0xD2, + 0x09, 0x93, 0x91, 0xEC, 0xC8, 0xD2, 0x40, 0xF0, + 0x2A, 0xEF, 0x42, 0x00, 0x88, 0x98, 0x90, 0x9A, + 0x88, 0xDA, 0x08, 0x0B, 0x01, 0x00, 0x40, 0xF0, + 0x3B, 0xF5, 0x40, 0x42, 0x02, 0x4E, 0x0F, 0x9F, + 0x85, 0xF2, 0x0A, 0x65, 0xFE, 0x7F, 0x02, 0x97, + 0xC3, 0x92, 0x44, 0xA2, 0xC2, 0xD2, 0x0F, 0x9F, + 0x92, 0xF2, 0x40, 0xF0, 0x94, 0xF2, 0x40, 0x42, + 0x02, 0x5E, 0x0F, 0x9F, 0x92, 0xF2, 0xC8, 0xD2, + 0x09, 0x93, 0x91, 0xEC, 0xC8, 0xD2, 0x40, 0xF0, + 0x2A, 0xEF, 0x42, 0x00, 0x88, 0x98, 0x90, 0x9A, + 0x88, 0xDA, 0x08, 0x0B, 0x01, 0x00, 0x11, 0x93, + 0xF1, 0xBD, 0x19, 0xD3, 0xB6, 0xEC, 0x11, 0x93, + 0xB4, 0xEC, 0x40, 0x42, 0x02, 0x5E, 0x0F, 0x9F, + 0xAC, 0xF2, 0x09, 0x63, 0x00, 0x80, 0x01, 0x97, + 0xC3, 0x94, 0x0A, 0x07, 0x07, 0x00, 0xC1, 0xD6, + 0x0A, 0x05, 0x00, 0xA0, 0x1A, 0xD5, 0x96, 0xEC, + 0x11, 0x93, 0xB6, 0xEC, 0x19, 0xD3, 0x01, 0x80, + 0x0A, 0x65, 0xFE, 0x7F, 0x02, 0x97, 0xC3, 0x92, + 0x41, 0xA2, 0xC2, 0xD2, 0x40, 0x92, 0x88, 0x98, + 0x90, 0x9A, 0x88, 0xDA, 0x41, 0x20, 0x08, 0x0B, + 0x01, 0x00, 0x13, 0x97, 0xB4, 0xEC, 0x40, 0x46, + 0x02, 0x5E, 0x0F, 0x9F, 0x2C, 0xF3, 0x12, 0x95, + 0x96, 0xEC, 0x0A, 0x03, 0x07, 0x00, 0xC1, 0x92, + 0xC2, 0xD2, 0x11, 0x93, 0x96, 0xEC, 0x09, 0x05, + 0x01, 0x00, 0x48, 0x02, 0xC1, 0x92, 0xC2, 0xD2, + 0x11, 0x93, 0x96, 0xEC, 0x4E, 0x02, 0xC1, 0x94, + 0xC5, 0xD6, 0xC5, 0x92, 0x11, 0x07, 0x96, 0xEC, + 0x0B, 0x03, 0x0F, 0x00, 0xC1, 0x98, 0x46, 0x06, + 0x7A, 0x93, 0x79, 0x93, 0x5C, 0x95, 0x5A, 0x95, + 0x02, 0xA3, 0xC3, 0xD2, 0x04, 0x95, 0xC5, 0x96, + 0x41, 0x06, 0xC5, 0xD6, 0x42, 0x46, 0x02, 0x9E, + 0x0F, 0x9F, 0xD5, 0xF2, 0x11, 0x93, 0x96, 0xEC, + 0x09, 0x05, 0x05, 0x00, 0x41, 0x02, 0xC1, 0x92, + 0xC2, 0xD2, 0x11, 0x93, 0x96, 0xEC, 0xC1, 0x92, + 0x09, 0xB5, 0x1F, 0x00, 0x43, 0x44, 0x02, 0x8E, + 0x0F, 0x9F, 0x02, 0xF3, 0x40, 0x44, 0x02, 0x4E, + 0x0F, 0x9F, 0x03, 0xF3, 0x0A, 0x05, 0xFF, 0xFF, + 0x0F, 0x9F, 0x03, 0xF3, 0x43, 0x94, 0x11, 0x93, + 0x96, 0xEC, 0x42, 0x02, 0xC1, 0xD4, 0x11, 0x93, + 0x96, 0xEC, 0x49, 0x02, 0xC1, 0x92, 0x19, 0xD3, + 0xB4, 0xEC, 0x09, 0x05, 0xF2, 0xFF, 0x1A, 0xD5, + 0x92, 0xEC, 0x09, 0x43, 0xD0, 0x07, 0x02, 0x9E, + 0x0F, 0x9F, 0x2C, 0xF3, 0x11, 0x93, 0xDC, 0xF7, + 0x41, 0x02, 0x19, 0xD3, 0xDC, 0xF7, 0x11, 0x93, + 0xDB, 0xF7, 0x09, 0xA3, 0x40, 0x00, 0x19, 0xD3, + 0xDB, 0xF7, 0x09, 0x63, 0x00, 0x80, 0x01, 0x95, + 0xC2, 0x94, 0x1A, 0xD5, 0xB5, 0xEC, 0x40, 0x96, + 0x1B, 0xD7, 0xB4, 0xEC, 0x0F, 0x9F, 0x92, 0xF3, + 0x11, 0x93, 0x92, 0xEC, 0x12, 0x95, 0xB6, 0xEC, + 0x02, 0x43, 0x02, 0x8E, 0x0F, 0x9F, 0x7A, 0xF3, + 0x02, 0x0E, 0x0F, 0x9F, 0x4D, 0xF3, 0x11, 0x93, + 0xDC, 0xF7, 0x41, 0x02, 0x19, 0xD3, 0xDC, 0xF7, + 0x11, 0x93, 0xDB, 0xF7, 0x09, 0xA3, 0x80, 0x00, + 0x19, 0xD3, 0xDB, 0xF7, 0x09, 0x63, 0x00, 0x80, + 0x01, 0x95, 0xC2, 0x94, 0x1A, 0xD5, 0xB5, 0xEC, + 0x40, 0x96, 0x1B, 0xD7, 0xB4, 0xEC, 0x0F, 0x9F, + 0x92, 0xF3, 0x11, 0x93, 0x03, 0x80, 0x09, 0xB3, + 0x00, 0x40, 0x40, 0x42, 0x02, 0x4E, 0x0F, 0x9F, + 0x5F, 0xF3, 0x11, 0x93, 0xC0, 0xEC, 0x40, 0x42, + 0x02, 0x5E, 0x0F, 0x9F, 0x5F, 0xF3, 0x40, 0xF0, + 0xA6, 0xF3, 0x0F, 0x9F, 0x94, 0xF3, 0x41, 0x92, + 0xC8, 0xD2, 0x0A, 0x95, 0x91, 0xEC, 0xC8, 0xD4, + 0x40, 0xF0, 0x2A, 0xEF, 0x42, 0x00, 0x11, 0x93, + 0xC0, 0xEC, 0x40, 0x42, 0x02, 0x4E, 0x0F, 0x9F, + 0x72, 0xF3, 0x42, 0x96, 0x1B, 0xD7, 0xC0, 0xEC, + 0x0F, 0x9F, 0x94, 0xF3, 0x0A, 0x65, 0xFE, 0x7F, + 0x02, 0x97, 0xC3, 0x92, 0x42, 0xA2, 0xC2, 0xD2, + 0x0F, 0x9F, 0x94, 0xF3, 0x12, 0x45, 0x03, 0xEC, + 0x02, 0x4E, 0x0F, 0x9F, 0x8C, 0xF3, 0x11, 0x93, + 0xDC, 0xF7, 0x41, 0x02, 0x19, 0xD3, 0xDC, 0xF7, + 0x11, 0x93, 0xDB, 0xF7, 0x09, 0xA3, 0x00, 0x08, + 0x19, 0xD3, 0xDB, 0xF7, 0x1A, 0xD5, 0x92, 0xEC, + 0x11, 0x93, 0x92, 0xEC, 0x19, 0x25, 0x92, 0xEC, + 0x09, 0x63, 0x00, 0x80, 0x19, 0xD3, 0xF2, 0xBD, + 0x41, 0x00, 0x88, 0x98, 0x90, 0x9A, 0x88, 0xDA, + 0x08, 0x0B, 0x01, 0x00, 0x40, 0xF0, 0xA6, 0xF3, + 0x40, 0x92, 0xC8, 0xD2, 0x09, 0x93, 0x91, 0xEC, + 0xC8, 0xD2, 0x40, 0xF0, 0x2A, 0xEF, 0x42, 0x00, + 0x88, 0x98, 0x90, 0x9A, 0x88, 0xDA, 0x08, 0x0B, + 0x01, 0x00, 0x11, 0x93, 0xD7, 0xF7, 0x40, 0x42, + 0x02, 0x4E, 0x0F, 0x9F, 0xB6, 0xF3, 0x0A, 0x65, + 0xBC, 0x69, 0x02, 0x97, 0xC3, 0x92, 0x09, 0x83, + 0x00, 0x02, 0xC2, 0xD2, 0x11, 0x93, 0x03, 0x80, + 0x09, 0xB3, 0x00, 0x40, 0x40, 0x42, 0x02, 0x5E, + 0x0F, 0x9F, 0xC9, 0xF3, 0x11, 0x93, 0xDC, 0xF7, + 0x41, 0x02, 0x19, 0xD3, 0xDC, 0xF7, 0x11, 0x93, + 0xDB, 0xF7, 0x09, 0xA3, 0x00, 0x20, 0x19, 0xD3, + 0xDB, 0xF7, 0x11, 0x93, 0xB5, 0xEC, 0x19, 0xD3, + 0x04, 0x80, 0x12, 0x95, 0xB4, 0xEC, 0x1A, 0xD5, + 0x05, 0x80, 0x09, 0x63, 0x00, 0x80, 0x01, 0x97, + 0xC3, 0x96, 0x1B, 0xD7, 0xB5, 0xEC, 0x40, 0x94, + 0x1A, 0xD5, 0xB4, 0xEC, 0x19, 0xD3, 0xF2, 0xBD, + 0x88, 0x98, 0x90, 0x9A, 0x88, 0xDA, 0x08, 0x0B, + 0x01, 0x00, 0x09, 0x93, 0x96, 0x03, 0x19, 0xD3, + 0x06, 0x82, 0x09, 0x93, 0x00, 0x01, 0x19, 0xD3, + 0x03, 0x82, 0x88, 0x98, 0x90, 0x9A, 0x88, 0xDA, + 0x47, 0x20, 0x08, 0x0B, 0x01, 0x00, 0x11, 0x93, + 0x01, 0x82, 0xC5, 0xD2, 0x40, 0x94, 0x01, 0xD4, + 0x13, 0x97, 0xB8, 0xEC, 0x02, 0xD6, 0x03, 0x95, + 0x0C, 0x99, 0xBB, 0xEC, 0x04, 0x05, 0x13, 0x97, + 0x03, 0xEC, 0x01, 0x27, 0x02, 0x99, 0xC4, 0x92, + 0x03, 0x03, 0xC2, 0xD2, 0x14, 0x99, 0xBA, 0xEC, + 0x03, 0x09, 0x1C, 0xD9, 0xBA, 0xEC, 0x12, 0x95, + 0x04, 0x82, 0x0A, 0xB3, 0x02, 0x00, 0x40, 0x42, + 0x02, 0x4E, 0x0F, 0x9F, 0x29, 0xF5, 0x01, 0x92, + 0x03, 0xD2, 0x0A, 0xA3, 0x02, 0x00, 0x19, 0xD3, + 0x04, 0x82, 0x02, 0x96, 0x0B, 0x05, 0x01, 0x00, + 0x1A, 0xD5, 0xB8, 0xEC, 0xC5, 0x92, 0x43, 0x42, + 0x02, 0x9E, 0x0F, 0x9F, 0x37, 0xF4, 0x42, 0x44, + 0x02, 0x8E, 0x0F, 0x9F, 0x37, 0xF4, 0x11, 0x93, + 0xBF, 0xEC, 0x40, 0x42, 0x02, 0x5E, 0x0F, 0x9F, + 0x37, 0xF4, 0x0C, 0x49, 0xD3, 0x08, 0x02, 0x8E, + 0x0F, 0x9F, 0x37, 0xF4, 0x11, 0x63, 0x07, 0x82, + 0x11, 0xA3, 0x07, 0x82, 0x71, 0x93, 0x79, 0x93, + 0x79, 0x93, 0x79, 0x93, 0x03, 0xD2, 0xC5, 0x94, + 0x0A, 0xB5, 0xFC, 0xFF, 0x04, 0xD4, 0x03, 0x96, + 0x40, 0x46, 0x02, 0x5E, 0x0F, 0x9F, 0x46, 0xF4, + 0x11, 0x93, 0xB8, 0xEC, 0x41, 0x42, 0x02, 0x8E, + 0x0F, 0x9F, 0x4D, 0xF4, 0xC5, 0x98, 0x0C, 0x03, + 0xFF, 0xFF, 0x42, 0x42, 0x02, 0x8E, 0x0F, 0x9F, + 0x74, 0xF4, 0x0A, 0x95, 0xBB, 0xEC, 0x42, 0x92, + 0x19, 0xD3, 0xB9, 0xEC, 0xC5, 0x96, 0x43, 0x46, + 0x02, 0x9E, 0x0F, 0x9F, 0x66, 0xF4, 0x0B, 0x07, + 0xFC, 0xFF, 0xC5, 0xD6, 0xD2, 0x98, 0x1C, 0xD9, + 0xC8, 0xBC, 0xD2, 0x96, 0x1B, 0xD7, 0xCA, 0xBC, + 0x09, 0x03, 0xFF, 0xFF, 0x40, 0x42, 0x02, 0x5E, + 0x0F, 0x9F, 0x52, 0xF4, 0x19, 0xD3, 0xB9, 0xEC, + 0x40, 0x42, 0x02, 0x5E, 0x0F, 0x9F, 0x72, 0xF4, + 0x0A, 0x05, 0xFE, 0xFF, 0xCA, 0xD2, 0xC2, 0xD2, + 0x0F, 0x9F, 0x74, 0xF4, 0x1A, 0xD5, 0x93, 0xEC, + 0x03, 0x98, 0x40, 0x48, 0x02, 0x5E, 0x0F, 0x9F, + 0xA1, 0xF4, 0x11, 0x93, 0xB8, 0xEC, 0x41, 0x42, + 0x02, 0x9E, 0x0F, 0x9F, 0x84, 0xF4, 0x04, 0x94, + 0x48, 0x44, 0x02, 0x4E, 0x0F, 0x9F, 0x8F, 0xF4, + 0x41, 0x42, 0x02, 0x5E, 0x0F, 0x9F, 0xA1, 0xF4, + 0x11, 0x93, 0x04, 0x82, 0x41, 0xB2, 0x40, 0x42, + 0x02, 0x4E, 0x0F, 0x9F, 0xA1, 0xF4, 0x41, 0x96, + 0x01, 0xD6, 0x0A, 0x65, 0xBD, 0x43, 0x02, 0x99, + 0xC4, 0x92, 0x09, 0xA3, 0x80, 0x00, 0xC2, 0xD2, + 0x0A, 0x65, 0xE8, 0x43, 0x02, 0x97, 0xC3, 0x92, + 0x09, 0xB3, 0xBF, 0xFF, 0xC2, 0xD2, 0x0F, 0x9F, + 0xFA, 0xF4, 0xC5, 0x98, 0x43, 0x48, 0x02, 0x9E, + 0x0F, 0x9F, 0xFA, 0xF4, 0x4F, 0x96, 0x0C, 0xB3, + 0x01, 0x00, 0x40, 0x42, 0x02, 0x4E, 0x0F, 0x9F, + 0xAE, 0xF4, 0x47, 0x96, 0x11, 0x93, 0xB7, 0xEC, + 0x40, 0x42, 0x02, 0x4E, 0x0F, 0x9F, 0xD6, 0xF4, + 0x11, 0x93, 0xB8, 0xEC, 0x41, 0x42, 0x02, 0x5E, + 0x0F, 0x9F, 0xD6, 0xF4, 0x12, 0x95, 0x00, 0x82, + 0x0A, 0x05, 0xFF, 0xAF, 0x05, 0xD4, 0xC8, 0xD6, + 0xC8, 0xD2, 0x40, 0xF0, 0x7B, 0xF7, 0x42, 0x00, + 0x05, 0x96, 0xC3, 0x94, 0x01, 0xB5, 0x40, 0x44, + 0x02, 0x4E, 0x0F, 0x9F, 0xD6, 0xF4, 0x06, 0x98, + 0x50, 0x98, 0x1C, 0xD9, 0xA2, 0xBC, 0x40, 0x98, + 0x1C, 0xD9, 0xA2, 0xBC, 0x40, 0x92, 0x03, 0xD2, + 0x0F, 0x9F, 0xFF, 0xF4, 0x03, 0x94, 0x40, 0x44, + 0x02, 0x5E, 0x0F, 0x9F, 0xE3, 0xF4, 0x0A, 0x65, + 0x5E, 0x43, 0x02, 0x97, 0xC3, 0x92, 0x48, 0xA2, + 0xC2, 0xD2, 0x0F, 0x9F, 0xFF, 0xF4, 0x11, 0x93, + 0xB8, 0xEC, 0x0C, 0x99, 0xBB, 0xEC, 0x04, 0x03, + 0x04, 0x96, 0x13, 0x25, 0x03, 0xEC, 0xC1, 0xD4, + 0x11, 0x93, 0xBA, 0xEC, 0x19, 0x05, 0xBA, 0xEC, + 0x1B, 0xD7, 0x01, 0x82, 0x0A, 0x65, 0xFD, 0x7D, + 0x02, 0x99, 0xC4, 0x92, 0x43, 0xA2, 0xC2, 0xD2, + 0x41, 0x92, 0x01, 0xD2, 0x03, 0x94, 0x40, 0x44, + 0x02, 0x5E, 0x0F, 0x9F, 0x13, 0xF5, 0x11, 0x93, + 0xB9, 0xEC, 0x40, 0x42, 0x02, 0x5E, 0x0F, 0x9F, + 0x0B, 0xF5, 0x19, 0xD3, 0xB8, 0xEC, 0x19, 0xD3, + 0xBA, 0xEC, 0x19, 0xD3, 0xBB, 0xEC, 0x03, 0x96, + 0x40, 0x46, 0x02, 0x5E, 0x0F, 0x9F, 0x13, 0xF5, + 0x41, 0x98, 0x1C, 0xD9, 0xB7, 0xEC, 0x11, 0x93, + 0xBF, 0xEC, 0x41, 0x42, 0x02, 0x5E, 0x0F, 0x9F, + 0x24, 0xF5, 0x11, 0x93, 0x00, 0x82, 0x19, 0xD3, + 0x02, 0x82, 0x0A, 0x65, 0xFD, 0x7D, 0x02, 0x97, + 0xC3, 0x92, 0x09, 0xA3, 0x00, 0x01, 0xC2, 0xD2, + 0x40, 0x98, 0x1C, 0xD9, 0xBF, 0xEC, 0x0F, 0x9F, + 0x2C, 0xF5, 0x01, 0x92, 0x19, 0xD3, 0xB7, 0xEC, + 0x01, 0x94, 0x40, 0x44, 0x02, 0x5E, 0x0F, 0x9F, + 0x38, 0xF5, 0x0A, 0x65, 0xEA, 0x43, 0x02, 0x97, + 0xC3, 0x92, 0x09, 0xB3, 0xFB, 0xFF, 0xC2, 0xD2, + 0x47, 0x00, 0x88, 0x98, 0x90, 0x9A, 0x88, 0xDA, + 0x08, 0x0B, 0x01, 0x00, 0x12, 0x95, 0x03, 0x80, + 0x0A, 0xB3, 0x00, 0x40, 0x40, 0x42, 0x02, 0x4E, + 0x0F, 0x9F, 0x57, 0xF5, 0x0A, 0xB7, 0x00, 0x08, + 0x40, 0x46, 0x02, 0x5E, 0x0F, 0x9F, 0x5A, 0xF5, + 0x11, 0x93, 0x03, 0xEC, 0x41, 0x02, 0x09, 0xB3, + 0xFE, 0xFF, 0x12, 0x95, 0x07, 0x80, 0x01, 0x45, + 0x02, 0x8E, 0x0F, 0x9F, 0x5A, 0xF5, 0x41, 0x92, + 0x0F, 0x9F, 0x5B, 0xF5, 0x40, 0x92, 0x88, 0x98, + 0x90, 0x9A, 0x88, 0xDA, 0x41, 0x20, 0x08, 0x0B, + 0x01, 0x00, 0x0A, 0x65, 0xE9, 0x43, 0x02, 0x97, + 0xC3, 0x92, 0x09, 0xA3, 0x40, 0x00, 0xC2, 0xD2, + 0x13, 0x97, 0x6E, 0xEC, 0x0B, 0x47, 0xA0, 0x00, + 0x02, 0x5E, 0x0F, 0x9F, 0x86, 0xF5, 0x09, 0x63, + 0x08, 0x43, 0x0A, 0x65, 0xFF, 0x5F, 0x01, 0x99, + 0xC4, 0xD4, 0x0A, 0x95, 0x9B, 0xEC, 0xD2, 0x96, + 0x1B, 0xD7, 0xFA, 0xBC, 0xD2, 0x96, 0xC4, 0xD6, + 0xD2, 0x98, 0x1C, 0xD9, 0xFA, 0xBC, 0xD2, 0x96, + 0xC1, 0xD6, 0xC2, 0x94, 0x1A, 0xD5, 0xFA, 0xBC, + 0x0F, 0x9F, 0xC4, 0xF5, 0x0C, 0x69, 0xFF, 0x6F, + 0x1C, 0xD9, 0xF8, 0xBC, 0x0B, 0x47, 0x10, 0x95, + 0x02, 0x5E, 0x0F, 0x9F, 0x9E, 0xF5, 0x0A, 0x95, + 0x6F, 0xEC, 0x09, 0x63, 0x06, 0x43, 0x01, 0x99, + 0xC4, 0xD6, 0xD2, 0x96, 0x1B, 0xD7, 0xF8, 0xBC, + 0x0C, 0x69, 0xEE, 0x6A, 0xC1, 0xD8, 0xC2, 0x94, + 0x1A, 0xD5, 0xF8, 0xBC, 0x40, 0x92, 0xC5, 0xD2, + 0x11, 0x43, 0xC1, 0xEC, 0x02, 0x0E, 0x0F, 0x9F, + 0xC1, 0xF5, 0xC5, 0x94, 0x0A, 0x03, 0x71, 0xEC, + 0xC1, 0x94, 0x1A, 0xD5, 0xFA, 0xBC, 0x11, 0x93, + 0xC0, 0xEC, 0x40, 0x42, 0x02, 0x4E, 0x0F, 0x9F, + 0xB3, 0xF5, 0x0A, 0x95, 0x6F, 0xEC, 0xC8, 0xD4, + 0x40, 0xF0, 0x9C, 0xF7, 0x19, 0xD3, 0xF8, 0xBC, + 0x41, 0x00, 0xC5, 0x96, 0x41, 0x06, 0xC5, 0xD6, + 0x13, 0x47, 0xC1, 0xEC, 0x02, 0x1E, 0x0F, 0x9F, + 0xA5, 0xF5, 0x40, 0x98, 0x1C, 0xD9, 0xFA, 0xBC, + 0x40, 0x92, 0x19, 0xD3, 0x6E, 0xEC, 0x19, 0xD3, + 0xC1, 0xEC, 0x0A, 0x65, 0x52, 0x43, 0x02, 0x97, + 0xC3, 0x92, 0x48, 0xA2, 0xC2, 0xD2, 0x0A, 0x65, + 0xEB, 0x43, 0x02, 0x99, 0xC4, 0x92, 0x09, 0xB3, + 0xBF, 0xFF, 0xC2, 0xD2, 0x41, 0x00, 0x88, 0x98, + 0x90, 0x9A, 0x88, 0xDA, 0x43, 0x20, 0x08, 0x0B, + 0x01, 0x00, 0x06, 0x92, 0x01, 0xD2, 0x0A, 0x65, + 0xF0, 0x6A, 0x0B, 0x97, 0x6F, 0xEC, 0x02, 0x99, + 0xC4, 0x98, 0xD3, 0xD8, 0x02, 0xD6, 0x0A, 0x03, + 0x02, 0x00, 0x01, 0x97, 0xC3, 0x98, 0x02, 0x96, + 0xC3, 0xD8, 0x01, 0x96, 0xC1, 0xD6, 0x1A, 0xD5, + 0x6E, 0xEC, 0xC5, 0x98, 0x14, 0x99, 0x6F, 0xEC, + 0xC2, 0xD8, 0x43, 0x00, 0x88, 0x98, 0x90, 0x9A, + 0x88, 0xDA, 0x08, 0x0B, 0x01, 0x00, 0x40, 0x92, + 0xC8, 0xD2, 0x40, 0xF0, 0xD9, 0xF5, 0x41, 0x00, + 0x11, 0x93, 0xC0, 0xEC, 0x40, 0x42, 0x02, 0x4E, + 0x0F, 0x9F, 0x13, 0xF6, 0x42, 0x42, 0x02, 0x5E, + 0x0F, 0x9F, 0x10, 0xF6, 0x0A, 0x65, 0xFE, 0x7F, + 0x02, 0x97, 0xC3, 0x92, 0x42, 0xA2, 0xC2, 0xD2, + 0x40, 0x92, 0x19, 0xD3, 0xC0, 0xEC, 0x0A, 0x65, + 0xEB, 0x43, 0x02, 0x97, 0xC3, 0x92, 0x09, 0xA3, + 0xC0, 0x00, 0xC2, 0xD2, 0x0A, 0x65, 0xE9, 0x43, + 0x02, 0x97, 0xC3, 0x92, 0x09, 0xB3, 0xBF, 0xFF, + 0xC2, 0xD2, 0x88, 0x98, 0x90, 0x9A, 0x88, 0xDA, + 0x63, 0x20, 0x08, 0x0B, 0x01, 0x00, 0x11, 0x93, + 0xAF, 0xBC, 0x47, 0xB2, 0x59, 0x95, 0x5A, 0x95, + 0x12, 0xA5, 0xBF, 0xBC, 0x0A, 0xB3, 0x01, 0x00, + 0x40, 0x42, 0x02, 0x4E, 0x0F, 0x9F, 0x35, 0xF6, + 0x41, 0x04, 0x05, 0x93, 0x40, 0x96, 0x20, 0xD6, + 0x62, 0x97, 0x0F, 0x9F, 0x44, 0xF6, 0x14, 0x99, + 0xFC, 0xBC, 0xD1, 0xD8, 0x14, 0x99, 0xFE, 0xBC, + 0xD1, 0xD8, 0x20, 0x98, 0x42, 0x08, 0x20, 0xD8, + 0x20, 0x98, 0x03, 0x49, 0x02, 0x1E, 0x0F, 0x9F, + 0x3B, 0xF6, 0xC5, 0x92, 0x62, 0x42, 0x02, 0x4E, + 0x0F, 0x9F, 0x5D, 0xF6, 0x02, 0x8E, 0x0F, 0x9F, + 0x57, 0xF6, 0x61, 0x42, 0x02, 0x4E, 0x0F, 0x9F, + 0x81, 0xF6, 0x0F, 0x9F, 0xAE, 0xF6, 0x63, 0x42, + 0x02, 0x4E, 0x0F, 0x9F, 0xA4, 0xF6, 0x0F, 0x9F, + 0xAE, 0xF6, 0x0D, 0x03, 0x01, 0x00, 0x0C, 0x99, + 0x71, 0xEC, 0x0B, 0x05, 0xFF, 0xFF, 0x40, 0x96, + 0x0F, 0x9F, 0x6A, 0xF6, 0xD1, 0x96, 0xD4, 0xD6, + 0x20, 0x96, 0x41, 0x06, 0x20, 0xD6, 0x02, 0x47, + 0x02, 0x1E, 0x0F, 0x9F, 0x66, 0xF6, 0x1A, 0xD5, + 0xC1, 0xEC, 0x0A, 0x65, 0xEB, 0x43, 0x02, 0x99, + 0xC4, 0x92, 0x09, 0xA3, 0xC0, 0x00, 0xC2, 0xD2, + 0x0A, 0x65, 0xE9, 0x43, 0x02, 0x97, 0xC3, 0x92, + 0x09, 0xB3, 0xBF, 0xFF, 0xC2, 0xD2, 0x0F, 0x9F, + 0xAE, 0xF6, 0x0A, 0x03, 0xFE, 0xFF, 0x61, 0x95, + 0x40, 0x98, 0x20, 0xD8, 0x02, 0x49, 0x02, 0x0E, + 0x0F, 0x9F, 0xAE, 0xF6, 0x0D, 0x03, 0x01, 0x00, + 0x21, 0xD2, 0x20, 0x92, 0x05, 0x03, 0x42, 0x02, + 0xC8, 0xD2, 0x21, 0x96, 0xC3, 0x92, 0x42, 0x06, + 0x21, 0xD6, 0xC8, 0xD2, 0x22, 0xD4, 0x40, 0xF0, + 0x01, 0xF1, 0x42, 0x00, 0x20, 0x98, 0x42, 0x08, + 0x20, 0xD8, 0x22, 0x94, 0x02, 0x49, 0x02, 0x1E, + 0x0F, 0x9F, 0x8D, 0xF6, 0x0F, 0x9F, 0xAE, 0xF6, + 0x0D, 0x03, 0x03, 0x00, 0xC8, 0xD2, 0x02, 0x92, + 0xC8, 0xD2, 0x01, 0x96, 0xC8, 0xD6, 0x40, 0xF0, + 0xB1, 0xF6, 0x43, 0x00, 0x63, 0x00, 0x88, 0x98, + 0x90, 0x9A, 0x88, 0xDA, 0x45, 0x20, 0x08, 0x0B, + 0x01, 0x00, 0x0D, 0x03, 0x08, 0x00, 0x08, 0x94, + 0xC5, 0xD4, 0x09, 0x05, 0x01, 0x00, 0xC2, 0x94, + 0x03, 0xD4, 0x42, 0x02, 0xC1, 0x92, 0x01, 0xD2, + 0x02, 0x97, 0xC5, 0x94, 0x0A, 0x83, 0xFF, 0xFF, + 0x11, 0xB3, 0x2C, 0x93, 0x09, 0xB3, 0xFB, 0xFF, + 0x19, 0xD3, 0x2C, 0x93, 0x03, 0x92, 0x40, 0x42, + 0x02, 0x4E, 0x0F, 0x9F, 0xE4, 0xF6, 0x01, 0x94, + 0xD2, 0x92, 0x19, 0xD3, 0x2C, 0x93, 0x01, 0xD4, + 0x02, 0x94, 0x12, 0x95, 0x2C, 0x93, 0x44, 0xA4, + 0x1A, 0xD5, 0x2C, 0x93, 0x0A, 0xB5, 0xFB, 0xFF, + 0x1A, 0xD5, 0x2C, 0x93, 0x0B, 0x07, 0xFF, 0xFF, + 0x40, 0x46, 0x02, 0x5E, 0x0F, 0x9F, 0xCF, 0xF6, + 0x09, 0x63, 0xD4, 0x6C, 0x01, 0x95, 0xC2, 0x96, + 0xC5, 0x94, 0x02, 0xA7, 0xC1, 0xD6, 0x03, 0x92, + 0x54, 0x42, 0x02, 0x5E, 0x0F, 0x9F, 0xF4, 0xF6, + 0x0A, 0x83, 0xFF, 0xFF, 0x1B, 0xB3, 0x2C, 0x93, + 0x45, 0x00, 0x88, 0x98, 0x90, 0x9A, 0x88, 0xDA, + 0x08, 0x0B, 0x01, 0x00, 0x09, 0x63, 0x00, 0x40, + 0x19, 0xD3, 0xF2, 0xBD, 0x40, 0xF0, 0x3B, 0xF5, + 0x40, 0x42, 0x02, 0x5E, 0x0F, 0x9F, 0x08, 0xF7, + 0x40, 0xF0, 0x94, 0xF2, 0x0F, 0x9F, 0x16, 0xF7, + 0x40, 0x96, 0xC8, 0xD6, 0x09, 0x93, 0x91, 0xEC, + 0xC8, 0xD2, 0x40, 0xF0, 0x2A, 0xEF, 0x0A, 0x65, + 0xFE, 0x7F, 0x02, 0x97, 0xC3, 0x92, 0x44, 0xA2, + 0xC2, 0xD2, 0x42, 0x00, 0x88, 0x98, 0x90, 0x9A, + 0x88, 0xDA, 0x08, 0x0B, 0x01, 0x00, 0x0A, 0x65, + 0xE8, 0x43, 0x02, 0x97, 0xC3, 0x92, 0x09, 0xA3, + 0x40, 0x00, 0xC2, 0xD2, 0x0A, 0x65, 0xEA, 0x43, + 0x02, 0x97, 0xC3, 0x92, 0x09, 0xB3, 0xFB, 0xFF, + 0xC2, 0xD2, 0x40, 0x92, 0x19, 0xD3, 0x2D, 0xBC, + 0x0A, 0x65, 0xD8, 0x43, 0x02, 0x97, 0xC3, 0x92, + 0x09, 0xB3, 0xBF, 0xFF, 0xC2, 0xD2, 0x88, 0x98, + 0x90, 0x9A, 0x88, 0xDA, 0x08, 0x0B, 0x01, 0x00, + 0x09, 0x63, 0xEA, 0x43, 0x01, 0x97, 0xC3, 0x94, + 0x44, 0xA4, 0xC1, 0xD4, 0x11, 0x93, 0xB9, 0xEC, + 0x40, 0x42, 0x02, 0x4E, 0x0F, 0x9F, 0x6F, 0xF7, + 0x12, 0x95, 0x93, 0xEC, 0x0B, 0x67, 0x36, 0x43, + 0xD2, 0x98, 0x1C, 0xD9, 0xC8, 0xBC, 0xD2, 0x98, + 0x03, 0x93, 0xC1, 0xD8, 0x11, 0x93, 0xB9, 0xEC, + 0x09, 0x03, 0xFF, 0xFF, 0x19, 0xD3, 0xB9, 0xEC, + 0x40, 0x42, 0x02, 0x5E, 0x0F, 0x9F, 0x48, 0xF7, + 0x19, 0xD3, 0xB8, 0xEC, 0x19, 0xD3, 0xBA, 0xEC, + 0x0A, 0x05, 0xFE, 0xFF, 0xCA, 0xD2, 0xCA, 0xD2, + 0xC2, 0xD2, 0x0A, 0x65, 0x5E, 0x43, 0x02, 0x97, + 0xC3, 0x92, 0x48, 0xA2, 0xC2, 0xD2, 0x0A, 0x65, + 0xEA, 0x43, 0x02, 0x99, 0xC4, 0x92, 0x09, 0xB3, + 0xFB, 0xFF, 0x0F, 0x9F, 0x78, 0xF7, 0x11, 0x93, + 0x03, 0xEC, 0x19, 0xD3, 0x01, 0x82, 0x0A, 0x65, + 0xFD, 0x7D, 0x02, 0x97, 0xC3, 0x92, 0x43, 0xA2, + 0xC2, 0xD2, 0x88, 0x98, 0x90, 0x9A, 0x88, 0xDA, + 0x08, 0x0B, 0x01, 0x00, 0x03, 0x92, 0x04, 0x96, + 0x0D, 0x5E, 0x50, 0x46, 0x02, 0x0E, 0x40, 0x92, + 0x09, 0xEE, 0x44, 0x46, 0x04, 0x0E, 0x59, 0x93, + 0x44, 0x26, 0x04, 0x5E, 0x46, 0xEE, 0x41, 0x93, + 0x41, 0x26, 0x43, 0x4E, 0x88, 0x98, 0x90, 0x9A, + 0x88, 0xDA, 0x08, 0x0B, 0x01, 0x00, 0x40, 0xF0, + 0xB1, 0xFE, 0x88, 0x98, 0x90, 0x9A, 0x88, 0xDA, + 0x08, 0x0B, 0x01, 0x00, 0x88, 0x98, 0x90, 0x9A, + 0x88, 0xDA, 0x08, 0x0B, 0x01, 0x00, 0x03, 0x94, + 0x1A, 0xD5, 0xA3, 0xF7, 0x11, 0x93, 0x00, 0x90, + 0x88, 0x98, 0x90, 0x9A, 0x1D, 0x00, 0x1A, 0x00, + 0x03, 0x00, 0x03, 0x00, 0x18, 0x00, 0x19, 0x00, + 0x1A, 0x00, 0x1B, 0x00, 0x16, 0x00, 0x21, 0x00, + 0x12, 0x00, 0x09, 0x00, 0x13, 0x00, 0x19, 0x00, + 0x19, 0x00, 0x19, 0x00, 0x21, 0x00, 0x2D, 0x00, + 0x21, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x7E, 0x69, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x5F, 0xF2, 0xCD, 0xF7, 0x00, 0x00, 0x74, 0xF2, + 0xCD, 0xF7, 0x00, 0x00, 0xB9, 0xF2, 0xCA, 0xF7, + 0xD1, 0xF7, 0x00, 0x00, 0x97, 0xF3, 0xCD, 0xF7, + 0x05, 0x46, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 +}; + /* - * This file contains firmware for the Zydas 1211 chip. - * The current firware version is v2.13.0.0: + * current zd1211b firmware version. */ +#define ZD1211B_FIRMWARE_VER 4705 -static const uint8_t zyd_firmware[] = { - 0x08, 0x91, 0xff, 0xed, 0x09, 0x93, 0x1e, 0xee, /* 0x0000 */ - 0xd1, 0x94, 0x11, 0xee, 0x88, 0xd4, 0xd1, 0x96, /* 0x0008 */ - 0xd1, 0x98, 0x5c, 0x99, 0x5c, 0x99, 0x4c, 0x99, /* 0x0010 */ - 0x04, 0x9d, 0xd1, 0x98, 0xd1, 0x9a, 0x03, 0xee, /* 0x0018 */ - 0xf4, 0x94, 0xd3, 0xd4, 0x41, 0x2a, 0x40, 0x4a, /* 0x0020 */ - 0x45, 0xbe, 0x88, 0x92, 0x41, 0x24, 0x40, 0x44, /* 0x0028 */ - 0x53, 0xbe, 0x40, 0xf0, 0x93, 0xee, 0x41, 0xee, /* 0x0030 */ - 0x98, 0x9a, 0xd4, 0xf7, 0x02, 0x00, 0x1f, 0xec, /* 0x0038 */ - 0x00, 0x00, 0xb2, 0xf8, 0x4d, 0x00, 0xa1, 0xec, /* 0x0040 */ - 0x00, 0x00, 0xa6, 0xf7, 0x21, 0x00, 0x00, 0x00, /* 0x0048 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xa0, 0xd8, /* 0x0050 */ - 0xa0, 0x90, 0x98, 0x9a, 0x98, 0x9a, 0xa0, 0xd8, /* 0x0058 */ - 0x40, 0xf0, 0xb4, 0xf0, 0xa0, 0x90, 0x98, 0x9a, /* 0x0060 */ - 0xa0, 0xd8, 0x40, 0xf0, 0x64, 0xef, 0xa0, 0x90, /* 0x0068 */ - 0x98, 0x9a, 0xa0, 0xd8, 0x40, 0xf0, 0xf6, 0xf0, /* 0x0070 */ - 0xa0, 0x90, 0x98, 0x9a, 0xa0, 0xd8, 0x40, 0xf0, /* 0x0078 */ - 0xf7, 0xf6, 0xa0, 0x90, 0x98, 0x9a, 0xa0, 0xd8, /* 0x0080 */ - 0x40, 0xf0, 0xf8, 0xf5, 0xa0, 0x90, 0x98, 0x9a, /* 0x0088 */ - 0xa0, 0xd8, 0x40, 0xf0, 0xf1, 0xf0, 0xa0, 0x90, /* 0x0090 */ - 0x98, 0x9a, 0x98, 0x9a, 0xa0, 0xd8, 0x40, 0xf0, /* 0x0098 */ - 0x97, 0xf7, 0xa0, 0x90, 0x98, 0x9a, 0x88, 0xda, /* 0x00a0 */ - 0x08, 0x0b, 0x01, 0x00, 0x0d, 0x03, 0x03, 0x00, /* 0x00a8 */ - 0x09, 0x05, 0x01, 0x00, 0xc2, 0x94, 0x42, 0x02, /* 0x00b0 */ - 0xc1, 0x92, 0x03, 0x96, 0x1b, 0xd7, 0x2a, 0x86, /* 0x00b8 */ - 0x1a, 0xd5, 0x2b, 0x86, 0x09, 0xa3, 0x00, 0x80, /* 0x00c0 */ - 0x19, 0xd3, 0x2c, 0x86, 0x00, 0xee, 0x0a, 0x65, /* 0x00c8 */ - 0xc0, 0x7a, 0x02, 0x97, 0xc3, 0x92, 0x09, 0xb3, /* 0x00d0 */ - 0xfe, 0xff, 0xc2, 0xd2, 0x88, 0x98, 0x90, 0x9a, /* 0x00d8 */ - 0x88, 0xda, 0x42, 0x20, 0x08, 0x0b, 0x01, 0x00, /* 0x00e0 */ - 0x0d, 0x03, 0x05, 0x00, 0x05, 0x94, 0xc5, 0xd4, /* 0x00e8 */ - 0x09, 0x05, 0x01, 0x00, 0xc2, 0x94, 0x01, 0xd4, /* 0x00f0 */ - 0x42, 0x02, 0xc1, 0x96, 0x0a, 0x65, 0xc0, 0x7a, /* 0x00f8 */ - 0x02, 0x99, 0xc4, 0x92, 0x41, 0xa2, 0xc4, 0xd2, /* 0x0100 */ - 0xc5, 0x98, 0x1c, 0xd9, 0x2a, 0x86, 0x01, 0x98, /* 0x0108 */ - 0x1c, 0xd9, 0x2b, 0x86, 0x1b, 0xd7, 0x2c, 0x86, /* 0x0110 */ - 0x00, 0xee, 0x09, 0xb3, 0xfe, 0xff, 0xc2, 0xd2, /* 0x0118 */ - 0x42, 0x00, 0x88, 0x98, 0x90, 0x9a, 0x88, 0xda, /* 0x0120 */ - 0x41, 0x20, 0x08, 0x0b, 0x01, 0x00, 0x40, 0xf0, /* 0x0128 */ - 0xe5, 0xee, 0x11, 0x93, 0xd8, 0xf7, 0x41, 0x42, /* 0x0130 */ - 0x02, 0x5e, 0x0f, 0x9f, 0xae, 0xee, 0x40, 0xf1, /* 0x0138 */ - 0x40, 0x92, 0x19, 0xd3, 0xd8, 0xf7, 0xc5, 0x92, /* 0x0140 */ - 0x41, 0x92, 0x19, 0xd3, 0x00, 0x83, 0x40, 0x92, /* 0x0148 */ - 0x19, 0xd3, 0x00, 0x83, 0x0f, 0x9f, 0x95, 0xf8, /* 0x0150 */ - 0x0f, 0x9f, 0x99, 0xee, 0x42, 0x42, 0x02, 0x5e, /* 0x0158 */ - 0x0f, 0x9f, 0x99, 0xee, 0x40, 0x92, 0x19, 0xd3, /* 0x0160 */ - 0xd8, 0xf7, 0x09, 0x93, 0xc7, 0xf7, 0x19, 0xd3, /* 0x0168 */ - 0x91, 0xec, 0x40, 0xf0, 0x5f, 0xf2, 0x09, 0x63, /* 0x0170 */ - 0x00, 0x80, 0x19, 0xd3, 0xf2, 0xbd, 0x0f, 0x9f, /* 0x0178 */ - 0x99, 0xee, 0x41, 0x00, 0x88, 0x98, 0x90, 0x9a, /* 0x0180 */ - 0x88, 0xda, 0x08, 0x0b, 0x01, 0x00, 0x40, 0x92, /* 0x0188 */ - 0x19, 0xd3, 0x12, 0x95, 0x19, 0xd3, 0x10, 0x95, /* 0x0190 */ - 0x19, 0xd3, 0x02, 0x80, 0x19, 0xd3, 0x03, 0x82, /* 0x0198 */ - 0x09, 0x93, 0xc7, 0xf7, 0x19, 0xd3, 0x91, 0xec, /* 0x01a0 */ - 0x40, 0xf0, 0x5f, 0xf2, 0x40, 0xf0, 0xde, 0xf3, /* 0x01a8 */ - 0x11, 0x93, 0x04, 0xec, 0x42, 0x42, 0x02, 0x5e, /* 0x01b0 */ - 0x0f, 0x9f, 0xe3, 0xee, 0x40, 0x92, 0x19, 0xd3, /* 0x01b8 */ - 0x04, 0xec, 0x40, 0xf0, 0x38, 0xf2, 0x88, 0x98, /* 0x01c0 */ - 0x90, 0x9a, 0x88, 0xda, 0x08, 0x0b, 0x01, 0x00, /* 0x01c8 */ - 0x11, 0x93, 0x44, 0x96, 0x09, 0xb3, 0xff, 0xfd, /* 0x01d0 */ - 0x19, 0xd3, 0x44, 0x96, 0x40, 0xf0, 0x90, 0xf7, /* 0x01d8 */ - 0x6e, 0x92, 0x19, 0xd3, 0x05, 0x84, 0x40, 0xf0, /* 0x01e0 */ - 0xc4, 0xee, 0x4b, 0x62, 0x0a, 0x95, 0x2e, 0xee, /* 0x01e8 */ - 0xd1, 0xd4, 0x0b, 0x97, 0x2b, 0xee, 0xd1, 0xd6, /* 0x01f0 */ - 0x0a, 0x95, 0x00, 0xee, 0xd1, 0xd4, 0x0b, 0x97, /* 0x01f8 */ - 0x2f, 0xee, 0xd1, 0xd6, 0x0a, 0x95, 0x34, 0xee, /* 0x0200 */ - 0xd1, 0xd4, 0x0b, 0x97, 0x39, 0xee, 0xd1, 0xd6, /* 0x0208 */ - 0x0a, 0x95, 0x3e, 0xee, 0xd1, 0xd4, 0x0b, 0x97, /* 0x0210 */ - 0x43, 0xee, 0xd1, 0xd6, 0x0a, 0x95, 0x48, 0xee, /* 0x0218 */ - 0xd1, 0xd4, 0x0b, 0x97, 0x4d, 0xee, 0xd1, 0xd6, /* 0x0220 */ - 0x0a, 0x95, 0x4e, 0xee, 0xc1, 0xd4, 0x0a, 0x65, /* 0x0228 */ - 0x00, 0x44, 0x02, 0x97, 0xc3, 0x92, 0x44, 0xa2, /* 0x0230 */ - 0xc2, 0xd2, 0x43, 0xf1, 0x09, 0x93, 0x01, 0x3f, /* 0x0238 */ - 0x19, 0xd3, 0xc0, 0x85, 0x11, 0x93, 0x44, 0x96, /* 0x0240 */ - 0x09, 0xb3, 0xff, 0xfc, 0x19, 0xd3, 0x44, 0x96, /* 0x0248 */ - 0x88, 0x98, 0x90, 0x9a, 0x88, 0xda, 0x08, 0x0b, /* 0x0250 */ - 0x01, 0x00, 0x0d, 0x03, 0x03, 0x00, 0x03, 0x96, /* 0x0258 */ - 0x41, 0x02, 0x03, 0x99, 0xc4, 0x94, 0x42, 0x04, /* 0x0260 */ - 0xc1, 0x04, 0xc2, 0x94, 0xc3, 0xd4, 0x88, 0x98, /* 0x0268 */ - 0x90, 0x9a, 0x88, 0xda, 0x08, 0x0b, 0x01, 0x00, /* 0x0270 */ - 0x40, 0x92, 0x19, 0xd3, 0x94, 0xec, 0x13, 0x97, /* 0x0278 */ - 0x95, 0xec, 0x1b, 0xd7, 0x02, 0x80, 0x11, 0x93, /* 0x0280 */ - 0x99, 0xec, 0x19, 0xd3, 0x7c, 0x96, 0x0b, 0x97, /* 0x0288 */ - 0xa0, 0x00, 0x1b, 0xd7, 0x6e, 0xec, 0x0a, 0x65, /* 0x0290 */ - 0x0e, 0x42, 0x02, 0x97, 0xc3, 0x92, 0x09, 0xb3, /* 0x0298 */ - 0xff, 0xbf, 0x11, 0xa3, 0x9a, 0xec, 0xc2, 0xd2, /* 0x02a0 */ - 0x0a, 0x65, 0xeb, 0x43, 0x02, 0x97, 0xc3, 0x92, /* 0x02a8 */ - 0x09, 0xa3, 0xc0, 0x00, 0xc2, 0xd2, 0x0a, 0x65, /* 0x02b0 */ - 0xe9, 0x43, 0x02, 0x97, 0xc3, 0x92, 0x09, 0xb3, /* 0x02b8 */ - 0xbf, 0xff, 0xc2, 0xd2, 0x88, 0x98, 0x90, 0x9a, /* 0x02c0 */ - 0x88, 0xda, 0x47, 0x20, 0x08, 0x0b, 0x01, 0x00, /* 0x02c8 */ - 0x14, 0x99, 0x03, 0x80, 0x0c, 0xb3, 0x00, 0x10, /* 0x02d0 */ - 0x40, 0x42, 0x02, 0x4e, 0x0f, 0x9f, 0x97, 0xf0, /* 0x02d8 */ - 0x11, 0x93, 0x9f, 0xec, 0x41, 0x02, 0x19, 0xd3, /* 0x02e0 */ - 0x9f, 0xec, 0x11, 0x93, 0xd6, 0xf7, 0x40, 0x42, /* 0x02e8 */ - 0x02, 0x4e, 0x0f, 0x9f, 0x84, 0xef, 0x0a, 0x65, /* 0x02f0 */ - 0xfe, 0x7f, 0x02, 0x97, 0xc3, 0x92, 0x09, 0xa3, /* 0x02f8 */ - 0x00, 0x04, 0xc2, 0xd2, 0x0f, 0x9f, 0xb1, 0xf0, /* 0x0300 */ - 0x11, 0x93, 0x94, 0xec, 0x02, 0xd2, 0x40, 0x42, /* 0x0308 */ - 0x02, 0x5e, 0x0f, 0x9f, 0xd0, 0xef, 0x41, 0x92, /* 0x0310 */ - 0x19, 0xd3, 0x94, 0xec, 0x19, 0xd3, 0x9f, 0xec, /* 0x0318 */ - 0x12, 0x95, 0x02, 0x80, 0x1a, 0xd5, 0x95, 0xec, /* 0x0320 */ - 0x13, 0x97, 0x7c, 0x96, 0x1b, 0xd7, 0x99, 0xec, /* 0x0328 */ - 0x0a, 0x65, 0x0e, 0x42, 0x02, 0x97, 0xc3, 0x92, /* 0x0330 */ - 0x09, 0xb3, 0x00, 0x40, 0x19, 0xd3, 0x9a, 0xec, /* 0x0338 */ - 0x09, 0x63, 0x00, 0x40, 0xc2, 0xd2, 0x02, 0x94, /* 0x0340 */ - 0x1a, 0xd5, 0x7c, 0x96, 0x0c, 0xb3, 0x00, 0x08, /* 0x0348 */ - 0x40, 0x42, 0x02, 0x5e, 0x0f, 0x9f, 0xb0, 0xef, /* 0x0350 */ - 0x0c, 0xb3, 0xff, 0x07, 0x0f, 0x9f, 0xb4, 0xef, /* 0x0358 */ - 0x11, 0x93, 0x06, 0x80, 0x09, 0xb3, 0xff, 0x07, /* 0x0360 */ - 0x09, 0x03, 0x00, 0xa0, 0x19, 0xd3, 0x97, 0xec, /* 0x0368 */ - 0x40, 0x98, 0x0b, 0x97, 0x9c, 0xec, 0x04, 0x95, /* 0x0370 */ - 0x03, 0x05, 0x14, 0x03, 0x97, 0xec, 0x46, 0x02, /* 0x0378 */ - 0xc1, 0x92, 0xc2, 0xd2, 0x41, 0x08, 0x42, 0x48, /* 0x0380 */ - 0x02, 0x9e, 0x0f, 0x9f, 0xbb, 0xef, 0x11, 0x93, /* 0x0388 */ - 0x97, 0xec, 0xc1, 0x92, 0xc5, 0xd2, 0x5f, 0xb2, /* 0x0390 */ - 0x19, 0xd3, 0x9b, 0xec, 0x0f, 0x9f, 0xd3, 0xef, /* 0x0398 */ - 0x13, 0x97, 0x98, 0xec, 0xc5, 0xd6, 0x11, 0x93, /* 0x03a0 */ - 0x03, 0x80, 0x09, 0xb3, 0x00, 0x08, 0x40, 0x42, /* 0x03a8 */ - 0x02, 0x4e, 0x0f, 0x9f, 0xe9, 0xef, 0x11, 0x93, /* 0x03b0 */ - 0xdc, 0xf7, 0x41, 0x02, 0x19, 0xd3, 0xdc, 0xf7, /* 0x03b8 */ - 0x11, 0x93, 0xdb, 0xf7, 0x09, 0xa3, 0x00, 0x10, /* 0x03c0 */ - 0x19, 0xd3, 0xdb, 0xf7, 0x40, 0x98, 0x1c, 0xd9, /* 0x03c8 */ - 0x9b, 0xec, 0x12, 0x95, 0x9b, 0xec, 0x40, 0x44, /* 0x03d0 */ - 0x02, 0x4e, 0x0f, 0x9f, 0x86, 0xf0, 0x0a, 0xb3, /* 0x03d8 */ - 0x08, 0x00, 0x40, 0x42, 0x02, 0x4e, 0x0f, 0x9f, /* 0x03e0 */ - 0x07, 0xf0, 0x0a, 0xb3, 0x07, 0x00, 0x09, 0x05, /* 0x03e8 */ - 0xa9, 0xec, 0xc2, 0x94, 0x01, 0xd4, 0x09, 0x03, /* 0x03f0 */ - 0xa1, 0xec, 0xc1, 0x92, 0x19, 0xd3, 0x9b, 0xec, /* 0x03f8 */ - 0xc5, 0x94, 0x0a, 0xb5, 0x00, 0xff, 0x01, 0xa5, /* 0x0400 */ - 0xc5, 0xd4, 0x0f, 0x9f, 0x13, 0xf0, 0x0a, 0x05, /* 0x0408 */ - 0xff, 0xff, 0x0a, 0x03, 0xb1, 0xec, 0xc1, 0x92, /* 0x0410 */ - 0x01, 0xd2, 0x1a, 0xd5, 0x9b, 0xec, 0xc5, 0x96, /* 0x0418 */ - 0x0b, 0x07, 0xff, 0xff, 0xc5, 0xd6, 0x11, 0x93, /* 0x0420 */ - 0x97, 0xec, 0xc5, 0x98, 0xc1, 0xd8, 0x11, 0x93, /* 0x0428 */ - 0x97, 0xec, 0x09, 0x05, 0x0b, 0x00, 0x03, 0xd4, /* 0x0430 */ - 0xc2, 0x96, 0x06, 0xd6, 0x7b, 0x95, 0x7a, 0x95, /* 0x0438 */ - 0x4c, 0x02, 0xc1, 0x92, 0x59, 0x93, 0x59, 0x93, /* 0x0440 */ - 0x01, 0xa5, 0x01, 0x98, 0x0c, 0xf5, 0x7b, 0x93, /* 0x0448 */ - 0x09, 0x09, 0x01, 0x00, 0x06, 0x92, 0x09, 0xb3, /* 0x0450 */ - 0xff, 0x00, 0x04, 0xd2, 0x5c, 0x93, 0x59, 0x93, /* 0x0458 */ - 0x04, 0x94, 0x01, 0xa5, 0x03, 0x96, 0xc3, 0xd4, /* 0x0460 */ - 0x11, 0x93, 0x97, 0xec, 0x4c, 0x02, 0x05, 0xd2, /* 0x0468 */ - 0xc1, 0x92, 0x09, 0xb3, 0x00, 0xff, 0x7c, 0x95, /* 0x0470 */ - 0x7a, 0x95, 0x02, 0xa3, 0x05, 0x98, 0xc4, 0xd2, /* 0x0478 */ - 0x12, 0x95, 0x97, 0xec, 0x45, 0x04, 0x02, 0x97, /* 0x0480 */ - 0xc3, 0x92, 0x09, 0xa3, 0x00, 0x01, 0xc2, 0xd2, /* 0x0488 */ - 0x12, 0x95, 0x9b, 0xec, 0x0a, 0xb3, 0x08, 0x00, /* 0x0490 */ - 0x40, 0x42, 0x02, 0x4e, 0x0f, 0x9f, 0x5b, 0xf0, /* 0x0498 */ - 0x12, 0x95, 0x97, 0xec, 0x4a, 0x04, 0x02, 0x99, /* 0x04a0 */ - 0xc4, 0x92, 0x01, 0x98, 0x0c, 0xf3, 0x7b, 0x93, /* 0x04a8 */ - 0x41, 0x02, 0x0f, 0x9f, 0x7c, 0xf0, 0x43, 0x44, /* 0x04b0 */ - 0x02, 0x8e, 0x0f, 0x9f, 0x7d, 0xf0, 0x11, 0x93, /* 0x04b8 */ - 0x97, 0xec, 0x42, 0x02, 0x0a, 0x05, 0xff, 0xff, /* 0x04c0 */ - 0xc1, 0xd4, 0x11, 0x93, 0x97, 0xec, 0x4a, 0x02, /* 0x04c8 */ - 0x12, 0x95, 0x60, 0x96, 0xc1, 0xd4, 0x12, 0x95, /* 0x04d0 */ - 0x97, 0xec, 0x4b, 0x04, 0x02, 0x97, 0xc3, 0x92, /* 0x04d8 */ - 0x09, 0xb3, 0x1f, 0xff, 0xc2, 0xd2, 0x12, 0x95, /* 0x04e0 */ - 0x97, 0xec, 0x4b, 0x04, 0x11, 0x93, 0x62, 0x96, /* 0x04e8 */ - 0x41, 0x93, 0x59, 0x93, 0x02, 0x99, 0xc4, 0xa2, /* 0x04f0 */ - 0xc2, 0xd2, 0xc5, 0x92, 0x19, 0xd3, 0x98, 0xec, /* 0x04f8 */ - 0x0a, 0x95, 0x0c, 0x02, 0x1a, 0xd5, 0x02, 0x80, /* 0x0500 */ - 0x0f, 0x9f, 0xb1, 0xf0, 0x09, 0x63, 0xfe, 0x7f, /* 0x0508 */ - 0x01, 0x97, 0xc3, 0x94, 0x0a, 0xa5, 0x00, 0x04, /* 0x0510 */ - 0xc1, 0xd4, 0x11, 0x93, 0x9f, 0xec, 0x09, 0xa3, /* 0x0518 */ - 0x00, 0x01, 0x19, 0xd3, 0x9f, 0xec, 0x40, 0xf0, /* 0x0520 */ - 0x39, 0xef, 0x0f, 0x9f, 0xb1, 0xf0, 0x11, 0x93, /* 0x0528 */ - 0x94, 0xec, 0x41, 0x42, 0x02, 0x5e, 0x0f, 0x9f, /* 0x0530 */ - 0xa6, 0xf0, 0x40, 0xf0, 0x39, 0xef, 0x11, 0x93, /* 0x0538 */ - 0x95, 0xec, 0x44, 0xb2, 0x40, 0x42, 0x02, 0x4e, /* 0x0540 */ - 0x0f, 0x9f, 0xb1, 0xf0, 0x48, 0x98, 0x1c, 0xd9, /* 0x0548 */ - 0x02, 0x80, 0x11, 0x93, 0x91, 0xec, 0x41, 0x22, /* 0x0550 */ - 0x0a, 0x95, 0xb1, 0xf0, 0x88, 0xd4, 0x88, 0xdc, /* 0x0558 */ - 0x91, 0x9a, 0x47, 0x00, 0x88, 0x98, 0x90, 0x9a, /* 0x0560 */ - 0x88, 0xda, 0x08, 0x0b, 0x01, 0x00, 0x11, 0x93, /* 0x0568 */ - 0x04, 0x82, 0x48, 0xb2, 0x40, 0x42, 0x02, 0x4e, /* 0x0570 */ - 0x0f, 0x9f, 0xc8, 0xf0, 0x0a, 0x65, 0xfd, 0x7d, /* 0x0578 */ - 0x02, 0x97, 0xc3, 0x92, 0x09, 0xb3, 0xff, 0xfe, /* 0x0580 */ - 0xc2, 0xd2, 0x41, 0x92, 0x19, 0xd3, 0xbf, 0xec, /* 0x0588 */ - 0x11, 0x93, 0x04, 0x82, 0x43, 0xb2, 0x12, 0x95, /* 0x0590 */ - 0x03, 0x82, 0x02, 0xb3, 0x40, 0x42, 0x02, 0x4e, /* 0x0598 */ - 0x0f, 0x9f, 0xef, 0xf0, 0x0a, 0xb3, 0x00, 0xff, /* 0x05a0 */ - 0x48, 0xa2, 0x19, 0xd3, 0x03, 0x82, 0x40, 0xf0, /* 0x05a8 */ - 0xeb, 0xf3, 0x11, 0x93, 0xbf, 0xec, 0x41, 0x42, /* 0x05b0 */ - 0x02, 0x5e, 0x0f, 0x9f, 0xef, 0xf0, 0x11, 0x93, /* 0x05b8 */ - 0x07, 0x82, 0x11, 0x43, 0x03, 0xec, 0x02, 0x0e, /* 0x05c0 */ - 0x0f, 0x9f, 0xef, 0xf0, 0x11, 0x93, 0x03, 0x82, /* 0x05c8 */ - 0x09, 0xa3, 0x00, 0x01, 0x19, 0xd3, 0x03, 0x82, /* 0x05d0 */ - 0x40, 0x96, 0x1b, 0xd7, 0xbf, 0xec, 0x88, 0x98, /* 0x05d8 */ - 0x90, 0x9a, 0x88, 0xda, 0x08, 0x0b, 0x01, 0x00, /* 0x05e0 */ - 0x88, 0x98, 0x90, 0x9a, 0x88, 0xda, 0x08, 0x0b, /* 0x05e8 */ - 0x01, 0x00, 0x11, 0x93, 0x20, 0xbc, 0xc8, 0xd2, /* 0x05f0 */ - 0x40, 0xf0, 0x48, 0xf1, 0x41, 0x00, 0x88, 0x98, /* 0x05f8 */ - 0x90, 0x9a, 0x88, 0xda, 0x42, 0x20, 0x08, 0x0b, /* 0x0600 */ - 0x01, 0x00, 0x0d, 0x03, 0x05, 0x00, 0x05, 0x94, /* 0x0608 */ - 0x41, 0x02, 0xc1, 0x92, 0x01, 0x97, 0xc3, 0x96, /* 0x0610 */ - 0xc2, 0xd6, 0x0a, 0x45, 0x00, 0x95, 0x02, 0x5e, /* 0x0618 */ - 0x0f, 0x9f, 0x45, 0xf1, 0xc1, 0x92, 0x41, 0xb2, /* 0x0620 */ - 0x40, 0x42, 0x02, 0x4e, 0x0f, 0x9f, 0x45, 0xf1, /* 0x0628 */ - 0x11, 0x93, 0xc0, 0xec, 0x40, 0x42, 0x02, 0x5e, /* 0x0630 */ - 0x0f, 0x9f, 0x45, 0xf1, 0x41, 0x98, 0x1c, 0xd9, /* 0x0638 */ - 0xc0, 0xec, 0x12, 0x95, 0x02, 0x80, 0x01, 0xd4, /* 0x0640 */ - 0x40, 0xf0, 0x56, 0xf2, 0x0b, 0x67, 0xfd, 0x7d, /* 0x0648 */ - 0x03, 0x99, 0xc4, 0x92, 0x0c, 0x99, 0x96, 0x03, /* 0x0650 */ - 0x1c, 0xd9, 0x06, 0x82, 0x41, 0x98, 0x1c, 0xd9, /* 0x0658 */ - 0x02, 0x82, 0x42, 0x98, 0x1c, 0xd9, 0x05, 0x82, /* 0x0660 */ - 0x0c, 0x69, 0x80, 0x7f, 0x1c, 0xd9, 0x00, 0xb0, /* 0x0668 */ - 0x09, 0xa3, 0x00, 0x01, 0xc3, 0xd2, 0x01, 0x94, /* 0x0670 */ - 0x0a, 0xb3, 0x04, 0x00, 0x40, 0x42, 0x02, 0x4e, /* 0x0678 */ - 0x0f, 0x9f, 0x43, 0xf1, 0x42, 0xa4, 0x1a, 0xd5, /* 0x0680 */ - 0x02, 0x80, 0x42, 0x00, 0x88, 0x98, 0x90, 0x9a, /* 0x0688 */ - 0x88, 0xda, 0x42, 0x20, 0x08, 0x0b, 0x01, 0x00, /* 0x0690 */ - 0x05, 0x92, 0xc5, 0xd2, 0x60, 0xb2, 0x40, 0x42, /* 0x0698 */ - 0x02, 0x4e, 0x0f, 0x9f, 0x55, 0xf1, 0x40, 0xf0, /* 0x06a0 */ - 0x35, 0xf7, 0xc5, 0x94, 0x0a, 0xb3, 0x10, 0x00, /* 0x06a8 */ - 0x40, 0x42, 0x02, 0x4e, 0x0f, 0x9f, 0x5e, 0xf1, /* 0x06b0 */ - 0x40, 0xf0, 0x23, 0xf6, 0xc5, 0x96, 0x0b, 0xb3, /* 0x06b8 */ - 0x40, 0x00, 0x40, 0x42, 0x02, 0x4e, 0x0f, 0x9f, /* 0x06c0 */ - 0x67, 0xf1, 0x40, 0xf0, 0x5d, 0xf5, 0xc5, 0x94, /* 0x06c8 */ - 0x0a, 0xb3, 0x01, 0x00, 0x40, 0x42, 0x02, 0x4e, /* 0x06d0 */ - 0x0f, 0x9f, 0xc8, 0xf1, 0x13, 0x97, 0x21, 0xbc, /* 0x06d8 */ - 0x01, 0xd6, 0x0b, 0xb3, 0x02, 0x00, 0x40, 0x42, /* 0x06e0 */ - 0x02, 0x4e, 0x0f, 0x9f, 0x79, 0xf1, 0x40, 0xf0, /* 0x06e8 */ - 0x62, 0xfb, 0x01, 0x94, 0x0a, 0xb3, 0x04, 0x00, /* 0x06f0 */ - 0x40, 0x42, 0x02, 0x4e, 0x0f, 0x9f, 0x82, 0xf1, /* 0x06f8 */ - 0x40, 0xf0, 0x6c, 0xfb, 0x01, 0x96, 0x0b, 0xb3, /* 0x0700 */ - 0x01, 0x00, 0x40, 0x42, 0x02, 0x4e, 0x0f, 0x9f, /* 0x0708 */ - 0xa2, 0xf1, 0x40, 0xf0, 0xb0, 0xfa, 0x41, 0x92, /* 0x0710 */ - 0x19, 0xd3, 0xd5, 0xf7, 0x11, 0x93, 0x03, 0xec, /* 0x0718 */ - 0x09, 0x43, 0x40, 0x00, 0x02, 0x5e, 0x0f, 0x9f, /* 0x0720 */ - 0x98, 0xf1, 0x40, 0x94, 0x1a, 0xd5, 0xd5, 0xf7, /* 0x0728 */ - 0x11, 0x93, 0x00, 0xec, 0x40, 0x42, 0x02, 0x4e, /* 0x0730 */ - 0x0f, 0x9f, 0xab, 0xf1, 0x40, 0xf0, 0x38, 0xf2, /* 0x0738 */ - 0x0f, 0x9f, 0xab, 0xf1, 0x01, 0x96, 0x0b, 0xb3, /* 0x0740 */ - 0x08, 0x00, 0x40, 0x42, 0x02, 0x4e, 0x0f, 0x9f, /* 0x0748 */ - 0xab, 0xf1, 0x40, 0xf0, 0x7c, 0xfb, 0x01, 0x94, /* 0x0750 */ - 0x0a, 0xb3, 0x10, 0x00, 0x40, 0x42, 0x02, 0x4e, /* 0x0758 */ - 0x0f, 0x9f, 0xb4, 0xf1, 0x40, 0xf0, 0x87, 0xfb, /* 0x0760 */ - 0x11, 0x93, 0x10, 0xec, 0x42, 0x42, 0x02, 0x5e, /* 0x0768 */ - 0x0f, 0x9f, 0xbf, 0xf1, 0x44, 0x96, 0x1b, 0xd7, /* 0x0770 */ - 0x0b, 0xbc, 0x0f, 0x9f, 0xc5, 0xf1, 0x41, 0x42, /* 0x0778 */ - 0x02, 0x5e, 0x0f, 0x9f, 0xc5, 0xf1, 0x19, 0xd3, /* 0x0780 */ - 0x0b, 0xbc, 0x40, 0x92, 0x19, 0xd3, 0x10, 0xec, /* 0x0788 */ - 0xc5, 0x94, 0x0a, 0xb3, 0x80, 0x00, 0x40, 0x42, /* 0x0790 */ - 0x02, 0x4e, 0x0f, 0x9f, 0x12, 0xf2, 0x13, 0x97, /* 0x0798 */ - 0x28, 0xbc, 0x01, 0xd6, 0x0b, 0xb3, 0x40, 0x00, /* 0x07a0 */ - 0x40, 0x42, 0x02, 0x4e, 0x0f, 0x9f, 0xda, 0xf1, /* 0x07a8 */ - 0x40, 0xf0, 0x18, 0xf7, 0x01, 0x94, 0x0a, 0xb3, /* 0x07b0 */ - 0x02, 0x00, 0x40, 0x42, 0x02, 0x4e, 0x0f, 0x9f, /* 0x07b8 */ - 0xed, 0xf1, 0x40, 0xf0, 0xc4, 0xee, 0x40, 0xf0, /* 0x07c0 */ - 0x8f, 0xfb, 0x40, 0xf0, 0x1b, 0xf2, 0x40, 0x96, /* 0x07c8 */ - 0x1b, 0xd7, 0x00, 0xec, 0x41, 0x92, 0x19, 0xd3, /* 0x07d0 */ - 0xd8, 0xf7, 0x01, 0x94, 0x0a, 0xb3, 0x04, 0x00, /* 0x07d8 */ - 0x40, 0x42, 0x02, 0x4e, 0x0f, 0x9f, 0x09, 0xf2, /* 0x07e0 */ - 0x40, 0xf0, 0x9e, 0xfb, 0x09, 0x63, 0x00, 0x44, /* 0x07e8 */ - 0x01, 0x97, 0xc3, 0x94, 0x48, 0xa4, 0xc1, 0xd4, /* 0x07f0 */ - 0x00, 0xee, 0x40, 0x92, 0x19, 0xd3, 0x12, 0x95, /* 0x07f8 */ - 0x19, 0xd3, 0x10, 0x95, 0x19, 0xd3, 0x02, 0x80, /* 0x0800 */ - 0x19, 0xd3, 0x03, 0x82, 0x41, 0x92, 0x19, 0xd3, /* 0x0808 */ - 0xd8, 0xf7, 0x01, 0x94, 0x0a, 0xb3, 0x08, 0x00, /* 0x0810 */ - 0x40, 0x42, 0x02, 0x4e, 0x0f, 0x9f, 0x12, 0xf2, /* 0x0818 */ - 0x40, 0xf0, 0xae, 0xfb, 0x0a, 0x65, 0x00, 0x44, /* 0x0820 */ - 0x02, 0x97, 0xc3, 0x92, 0x44, 0xa2, 0xc2, 0xd2, /* 0x0828 */ - 0x42, 0x00, 0x88, 0x98, 0x90, 0x9a, 0x88, 0xda, /* 0x0830 */ - 0x08, 0x0b, 0x01, 0x00, 0x09, 0x63, 0x00, 0x40, /* 0x0838 */ - 0x19, 0xd3, 0xf2, 0xbd, 0x0a, 0x65, 0xea, 0x43, /* 0x0840 */ - 0x02, 0x97, 0xc3, 0x92, 0x44, 0xa2, 0xc2, 0xd2, /* 0x0848 */ - 0x0a, 0x65, 0xe9, 0x43, 0x02, 0x97, 0xc3, 0x92, /* 0x0850 */ - 0x09, 0xa3, 0x40, 0x00, 0xc2, 0xd2, 0x0a, 0x65, /* 0x0858 */ - 0xeb, 0x43, 0x02, 0x97, 0xc3, 0x92, 0x09, 0xa3, /* 0x0860 */ - 0xc0, 0x00, 0xc2, 0xd2, 0x88, 0x98, 0x90, 0x9a, /* 0x0868 */ - 0x88, 0xda, 0x08, 0x0b, 0x01, 0x00, 0x09, 0x63, /* 0x0870 */ - 0x00, 0x80, 0x19, 0xd3, 0xf2, 0xbd, 0x0a, 0x65, /* 0x0878 */ - 0xe8, 0x43, 0x02, 0x97, 0xc3, 0x92, 0x09, 0xa3, /* 0x0880 */ - 0xc0, 0x00, 0xc2, 0xd2, 0x0a, 0x65, 0xeb, 0x43, /* 0x0888 */ - 0x02, 0x97, 0xc3, 0x92, 0x09, 0xb3, 0xbf, 0xff, /* 0x0890 */ - 0xc2, 0xd2, 0x0a, 0x65, 0xea, 0x43, 0x02, 0x97, /* 0x0898 */ - 0xc3, 0x92, 0x09, 0xb3, 0xfb, 0xff, 0xc2, 0xd2, /* 0x08a0 */ - 0x88, 0x98, 0x90, 0x9a, 0x88, 0xda, 0x08, 0x0b, /* 0x08a8 */ - 0x01, 0x00, 0x09, 0x93, 0x00, 0x01, 0x19, 0xd3, /* 0x08b0 */ - 0x02, 0x80, 0x88, 0x98, 0x90, 0x9a, 0x88, 0xda, /* 0x08b8 */ - 0x08, 0x0b, 0x01, 0x00, 0x09, 0x93, 0x00, 0x09, /* 0x08c0 */ - 0x19, 0xd3, 0x02, 0x80, 0x40, 0xf0, 0x56, 0xf2, /* 0x08c8 */ - 0x40, 0x92, 0x19, 0xd3, 0x94, 0xec, 0xc8, 0xd2, /* 0x08d0 */ - 0x09, 0x93, 0x91, 0xec, 0xc8, 0xd2, 0x40, 0xf0, /* 0x08d8 */ - 0x2a, 0xef, 0x42, 0x00, 0x88, 0x98, 0x90, 0x9a, /* 0x08e0 */ - 0x88, 0xda, 0x08, 0x0b, 0x01, 0x00, 0x40, 0xf0, /* 0x08e8 */ - 0x3b, 0xf5, 0x40, 0x42, 0x02, 0x4e, 0x0f, 0x9f, /* 0x08f0 */ - 0x85, 0xf2, 0x0a, 0x65, 0xfe, 0x7f, 0x02, 0x97, /* 0x08f8 */ - 0xc3, 0x92, 0x44, 0xa2, 0xc2, 0xd2, 0x0f, 0x9f, /* 0x0900 */ - 0x92, 0xf2, 0x40, 0xf0, 0x94, 0xf2, 0x40, 0x42, /* 0x0908 */ - 0x02, 0x5e, 0x0f, 0x9f, 0x92, 0xf2, 0xc8, 0xd2, /* 0x0910 */ - 0x09, 0x93, 0x91, 0xec, 0xc8, 0xd2, 0x40, 0xf0, /* 0x0918 */ - 0x2a, 0xef, 0x42, 0x00, 0x88, 0x98, 0x90, 0x9a, /* 0x0920 */ - 0x88, 0xda, 0x08, 0x0b, 0x01, 0x00, 0x11, 0x93, /* 0x0928 */ - 0xf1, 0xbd, 0x19, 0xd3, 0xb6, 0xec, 0x11, 0x93, /* 0x0930 */ >>> TRUNCATED FOR MAIL (1000 lines) <<< From owner-p4-projects@FreeBSD.ORG Tue Jan 1 13:15:00 2008 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 16B1C16A420; Tue, 1 Jan 2008 13:15:00 +0000 (UTC) Delivered-To: perforce@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id CF9A216A41A for ; Tue, 1 Jan 2008 13:14:59 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id BF0AB13C457 for ; Tue, 1 Jan 2008 13:14:59 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.1/8.14.1) with ESMTP id m01DExIv095120 for ; Tue, 1 Jan 2008 13:14:59 GMT (envelope-from hselasky@FreeBSD.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.1/8.14.1/Submit) id m01DExYS095117 for perforce@freebsd.org; Tue, 1 Jan 2008 13:14:59 GMT (envelope-from hselasky@FreeBSD.org) Date: Tue, 1 Jan 2008 13:14:59 GMT Message-Id: <200801011314.m01DExYS095117@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky To: Perforce Change Reviews Cc: Subject: PERFORCE change 132245 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 01 Jan 2008 13:15:00 -0000 http://perforce.freebsd.org/chv.cgi?CH=132245 Change 132245 by hselasky@hselasky_laptop001 on 2008/01/01 13:14:31 Style "if_zydreg.h" by "usb_style.sh". Affected files ... .. //depot/projects/usb/src/sys/dev/usb/if_zydreg.h#10 edit Differences ... ==== //depot/projects/usb/src/sys/dev/usb/if_zydreg.h#10 (text+ko) ==== @@ -23,405 +23,405 @@ * ZyDAS ZD1211/ZD1211B USB WLAN driver. */ -#define ZYD_CR_GPI_EN 0x9418 -#define ZYD_CR_RADIO_PD 0x942c -#define ZYD_CR_RF2948_PD 0x942c -#define ZYD_CR_EN_PS_MANUAL_AGC 0x943c -#define ZYD_CR_CONFIG_PHILIPS 0x9440 -#define ZYD_CR_I2C_WRITE 0x9444 -#define ZYD_CR_SA2400_SER_RP 0x9448 -#define ZYD_CR_RADIO_PE 0x9458 -#define ZYD_CR_RST_BUS_MASTER 0x945c -#define ZYD_CR_RFCFG 0x9464 -#define ZYD_CR_HSTSCHG 0x946c -#define ZYD_CR_PHY_ON 0x9474 -#define ZYD_CR_RX_DELAY 0x9478 -#define ZYD_CR_RX_PE_DELAY 0x947c -#define ZYD_CR_GPIO_1 0x9490 -#define ZYD_CR_GPIO_2 0x9494 -#define ZYD_CR_EnZYD_CRyBufMux 0x94a8 -#define ZYD_CR_PS_CTRL 0x9500 -#define ZYD_CR_ADDA_PWR_DWN 0x9504 -#define ZYD_CR_ADDA_MBIAS_WT 0x9508 -#define ZYD_CR_INTERRUPT 0x9510 -#define ZYD_CR_MAC_PS_STATE 0x950c -#define ZYD_CR_ATIM_WND_PERIOD 0x951c -#define ZYD_CR_BCN_INTERVAL 0x9520 -#define ZYD_CR_PRE_TBTT 0x9524 +#define ZYD_CR_GPI_EN 0x9418 +#define ZYD_CR_RADIO_PD 0x942c +#define ZYD_CR_RF2948_PD 0x942c +#define ZYD_CR_EN_PS_MANUAL_AGC 0x943c +#define ZYD_CR_CONFIG_PHILIPS 0x9440 +#define ZYD_CR_I2C_WRITE 0x9444 +#define ZYD_CR_SA2400_SER_RP 0x9448 +#define ZYD_CR_RADIO_PE 0x9458 +#define ZYD_CR_RST_BUS_MASTER 0x945c +#define ZYD_CR_RFCFG 0x9464 +#define ZYD_CR_HSTSCHG 0x946c +#define ZYD_CR_PHY_ON 0x9474 +#define ZYD_CR_RX_DELAY 0x9478 +#define ZYD_CR_RX_PE_DELAY 0x947c +#define ZYD_CR_GPIO_1 0x9490 +#define ZYD_CR_GPIO_2 0x9494 +#define ZYD_CR_EnZYD_CRyBufMux 0x94a8 +#define ZYD_CR_PS_CTRL 0x9500 +#define ZYD_CR_ADDA_PWR_DWN 0x9504 +#define ZYD_CR_ADDA_MBIAS_WT 0x9508 +#define ZYD_CR_INTERRUPT 0x9510 +#define ZYD_CR_MAC_PS_STATE 0x950c +#define ZYD_CR_ATIM_WND_PERIOD 0x951c +#define ZYD_CR_BCN_INTERVAL 0x9520 +#define ZYD_CR_PRE_TBTT 0x9524 /* * MAC registers. */ -#define ZYD_MAC_MACADRL 0x9610 /* MAC address (low) */ -#define ZYD_MAC_MACADRH 0x9614 /* MAC address (high) */ -#define ZYD_MAC_BSSADRL 0x9618 /* BSS address (low) */ -#define ZYD_MAC_BSSADRH 0x961c /* BSS address (high) */ -#define ZYD_MAC_BCNCFG 0x9620 /* BCN configuration */ -#define ZYD_MAC_GHTBL 0x9624 /* Group hash table (low) */ -#define ZYD_MAC_GHTBH 0x9628 /* Group hash table (high) */ -#define ZYD_MAC_RX_TIMEOUT 0x962c /* Rx timeout value */ -#define ZYD_MAC_BAS_RATE 0x9630 /* Basic rate setting */ -#define ZYD_MAC_MAN_RATE 0x9634 /* Mandatory rate setting */ -#define ZYD_MAC_RTSCTSRATE 0x9638 /* RTS CTS rate */ -#define ZYD_MAC_BACKOFF_PROTECT 0x963c /* Backoff protection */ -#define ZYD_MAC_RX_THRESHOLD 0x9640 /* Rx threshold */ -#define ZYD_MAC_TX_PE_CONTROL 0x9644 /* Tx_PE control */ -#define ZYD_MAC_AFTER_PNP 0x9648 /* After PnP */ -#define ZYD_MAC_RX_PE_DELAY 0x964c /* Rx_pe delay */ -#define ZYD_MAC_RX_ADDR2_L 0x9650 /* RX address2 (low) */ -#define ZYD_MAC_RX_ADDR2_H 0x9654 /* RX address2 (high) */ -#define ZYD_MAC_SIFS_ACK_TIME 0x9658 /* Dynamic SIFS ack time */ -#define ZYD_MAC_PHY_DELAY 0x9660 /* PHY delay */ -#define ZYD_MAC_PHY_DELAY2 0x966c /* PHY delay */ -#define ZYD_MAC_BCNFIFO 0x9670 /* Beacon FIFO I/O port */ -#define ZYD_MAC_SNIFFER 0x9674 /* Sniffer on/off */ -#define ZYD_MAC_ENCRYPTION_TYPE 0x9678 /* Encryption type */ -#define ZYD_MAC_RETRY 0x967c /* Retry time */ -#define ZYD_MAC_MISC 0x9680 /* Misc */ -#define ZYD_MAC_STMACHINESTAT 0x9684 /* State machine status */ -#define ZYD_MAC_TX_UNDERRUN_CNT 0x9688 /* TX underrun counter */ -#define ZYD_MAC_RXFILTER 0x968c /* Send to host settings */ -#define ZYD_MAC_ACK_EXT 0x9690 /* Acknowledge extension */ -#define ZYD_MAC_BCNFIFOST 0x9694 /* BCN FIFO set and status */ -#define ZYD_MAC_DIFS_EIFS_SIFS 0x9698 /* DIFS, EIFS & SIFS settings */ -#define ZYD_MAC_RX_TIMEOUT_CNT 0x969c /* RX timeout count */ -#define ZYD_MAC_RX_TOTAL_FRAME 0x96a0 /* RX total frame count */ -#define ZYD_MAC_RX_CRC32_CNT 0x96a4 /* RX CRC32 frame count */ -#define ZYD_MAC_RX_CRC16_CNT 0x96a8 /* RX CRC16 frame count */ -#define ZYD_MAC_RX_UDEC 0x96ac /* RX unicast decr. error count */ -#define ZYD_MAC_RX_OVERRUN_CNT 0x96b0 /* RX FIFO overrun count */ -#define ZYD_MAC_RX_MDEC 0x96bc /* RX multicast decr. err. cnt. */ -#define ZYD_MAC_NAV_TCR 0x96c4 /* NAV timer count read */ -#define ZYD_MAC_BACKOFF_ST_RD 0x96c8 /* Backoff status read */ -#define ZYD_MAC_DM_RETRY_CNT_RD 0x96cc /* DM retry count read */ -#define ZYD_MAC_RX_ACR 0x96d0 /* RX arbitration count read */ -#define ZYD_MAC_TX_CCR 0x96d4 /* Tx complete count read */ -#define ZYD_MAC_TCB_ADDR 0x96e8 /* Current PCI process TCP addr */ -#define ZYD_MAC_RCB_ADDR 0x96ec /* Next RCB address */ -#define ZYD_MAC_CONT_WIN_LIMIT 0x96f0 /* Contention window limit */ -#define ZYD_MAC_TX_PKT 0x96f4 /* Tx total packet count read */ -#define ZYD_MAC_DL_CTRL 0x96f8 /* Download control */ -#define ZYD_MACB_TXPWR_CTL1 0x9b00 -#define ZYD_MACB_TXPWR_CTL2 0x9b04 -#define ZYD_MACB_TXPWR_CTL3 0x9b08 -#define ZYD_MACB_TXPWR_CTL4 0x9b0c -#define ZYD_MACB_AIFS_CTL1 0x9b10 -#define ZYD_MACB_AIFS_CTL2 0x9b14 -#define ZYD_MACB_TXOP 0x9b20 -#define ZYD_MACB_MAX_RETRY 0x9b28 +#define ZYD_MAC_MACADRL 0x9610 /* MAC address (low) */ +#define ZYD_MAC_MACADRH 0x9614 /* MAC address (high) */ +#define ZYD_MAC_BSSADRL 0x9618 /* BSS address (low) */ +#define ZYD_MAC_BSSADRH 0x961c /* BSS address (high) */ +#define ZYD_MAC_BCNCFG 0x9620 /* BCN configuration */ +#define ZYD_MAC_GHTBL 0x9624 /* Group hash table (low) */ +#define ZYD_MAC_GHTBH 0x9628 /* Group hash table (high) */ +#define ZYD_MAC_RX_TIMEOUT 0x962c /* Rx timeout value */ +#define ZYD_MAC_BAS_RATE 0x9630 /* Basic rate setting */ +#define ZYD_MAC_MAN_RATE 0x9634 /* Mandatory rate setting */ +#define ZYD_MAC_RTSCTSRATE 0x9638 /* RTS CTS rate */ +#define ZYD_MAC_BACKOFF_PROTECT 0x963c /* Backoff protection */ +#define ZYD_MAC_RX_THRESHOLD 0x9640 /* Rx threshold */ +#define ZYD_MAC_TX_PE_CONTROL 0x9644 /* Tx_PE control */ +#define ZYD_MAC_AFTER_PNP 0x9648 /* After PnP */ +#define ZYD_MAC_RX_PE_DELAY 0x964c /* Rx_pe delay */ +#define ZYD_MAC_RX_ADDR2_L 0x9650 /* RX address2 (low) */ +#define ZYD_MAC_RX_ADDR2_H 0x9654 /* RX address2 (high) */ +#define ZYD_MAC_SIFS_ACK_TIME 0x9658 /* Dynamic SIFS ack time */ +#define ZYD_MAC_PHY_DELAY 0x9660 /* PHY delay */ +#define ZYD_MAC_PHY_DELAY2 0x966c /* PHY delay */ +#define ZYD_MAC_BCNFIFO 0x9670 /* Beacon FIFO I/O port */ +#define ZYD_MAC_SNIFFER 0x9674 /* Sniffer on/off */ +#define ZYD_MAC_ENCRYPTION_TYPE 0x9678 /* Encryption type */ +#define ZYD_MAC_RETRY 0x967c /* Retry time */ +#define ZYD_MAC_MISC 0x9680 /* Misc */ +#define ZYD_MAC_STMACHINESTAT 0x9684 /* State machine status */ +#define ZYD_MAC_TX_UNDERRUN_CNT 0x9688 /* TX underrun counter */ +#define ZYD_MAC_RXFILTER 0x968c /* Send to host settings */ +#define ZYD_MAC_ACK_EXT 0x9690 /* Acknowledge extension */ +#define ZYD_MAC_BCNFIFOST 0x9694 /* BCN FIFO set and status */ +#define ZYD_MAC_DIFS_EIFS_SIFS 0x9698 /* DIFS, EIFS & SIFS settings */ +#define ZYD_MAC_RX_TIMEOUT_CNT 0x969c /* RX timeout count */ +#define ZYD_MAC_RX_TOTAL_FRAME 0x96a0 /* RX total frame count */ +#define ZYD_MAC_RX_CRC32_CNT 0x96a4 /* RX CRC32 frame count */ +#define ZYD_MAC_RX_CRC16_CNT 0x96a8 /* RX CRC16 frame count */ +#define ZYD_MAC_RX_UDEC 0x96ac /* RX unicast decr. error count */ +#define ZYD_MAC_RX_OVERRUN_CNT 0x96b0 /* RX FIFO overrun count */ +#define ZYD_MAC_RX_MDEC 0x96bc /* RX multicast decr. err. cnt. */ +#define ZYD_MAC_NAV_TCR 0x96c4 /* NAV timer count read */ +#define ZYD_MAC_BACKOFF_ST_RD 0x96c8 /* Backoff status read */ +#define ZYD_MAC_DM_RETRY_CNT_RD 0x96cc /* DM retry count read */ +#define ZYD_MAC_RX_ACR 0x96d0 /* RX arbitration count read */ +#define ZYD_MAC_TX_CCR 0x96d4 /* Tx complete count read */ +#define ZYD_MAC_TCB_ADDR 0x96e8 /* Current PCI process TCP addr */ +#define ZYD_MAC_RCB_ADDR 0x96ec /* Next RCB address */ +#define ZYD_MAC_CONT_WIN_LIMIT 0x96f0 /* Contention window limit */ +#define ZYD_MAC_TX_PKT 0x96f4 /* Tx total packet count read */ +#define ZYD_MAC_DL_CTRL 0x96f8 /* Download control */ +#define ZYD_MACB_TXPWR_CTL1 0x9b00 +#define ZYD_MACB_TXPWR_CTL2 0x9b04 +#define ZYD_MACB_TXPWR_CTL3 0x9b08 +#define ZYD_MACB_TXPWR_CTL4 0x9b0c +#define ZYD_MACB_AIFS_CTL1 0x9b10 +#define ZYD_MACB_AIFS_CTL2 0x9b14 +#define ZYD_MACB_TXOP 0x9b20 +#define ZYD_MACB_MAX_RETRY 0x9b28 /* * Miscellanous registers. */ -#define ZYD_FIRMWARE_START_ADDR 0xee00 -#define ZYD_FIRMWARE_BASE_ADDR 0xee1d /* Firmware base address */ +#define ZYD_FIRMWARE_START_ADDR 0xee00 +#define ZYD_FIRMWARE_BASE_ADDR 0xee1d /* Firmware base address */ /* * EEPROM registers. */ -#define ZYD_EEPROM_START_HEAD 0xf800 /* EEPROM start */ -#define ZYD_EEPROM_SUBID 0xf817 -#define ZYD_EEPROM_POD 0xf819 -#define ZYD_EEPROM_MAC_ADDR_P1 0xf81b /* Part 1 of the MAC address */ -#define ZYD_EEPROM_MAC_ADDR_P2 0xf81d /* Part 2 of the MAC address */ -#define ZYD_EEPROM_PWR_CAL 0xf81f /* Calibration */ -#define ZYD_EEPROM_PWR_INT 0xf827 /* Calibration */ -#define ZYD_EEPROM_ALLOWEDCHAN 0xf82f /* Allowed CH mask, 1 bit each */ -#define ZYD_EEPROM_PHY_REG 0xf831 /* PHY registers */ -#define ZYD_EEPROM_DEVICE_VER 0xf837 /* Device version */ -#define ZYD_EEPROM_36M_CAL 0xf83f /* Calibration */ -#define ZYD_EEPROM_11A_INT 0xf847 /* Interpolation */ -#define ZYD_EEPROM_48M_CAL 0xf84f /* Calibration */ -#define ZYD_EEPROM_48M_INT 0xf857 /* Interpolation */ -#define ZYD_EEPROM_54M_CAL 0xf85f /* Calibration */ -#define ZYD_EEPROM_54M_INT 0xf867 /* Interpolation */ +#define ZYD_EEPROM_START_HEAD 0xf800 /* EEPROM start */ +#define ZYD_EEPROM_SUBID 0xf817 +#define ZYD_EEPROM_POD 0xf819 +#define ZYD_EEPROM_MAC_ADDR_P1 0xf81b /* Part 1 of the MAC address */ +#define ZYD_EEPROM_MAC_ADDR_P2 0xf81d /* Part 2 of the MAC address */ +#define ZYD_EEPROM_PWR_CAL 0xf81f /* Calibration */ +#define ZYD_EEPROM_PWR_INT 0xf827 /* Calibration */ +#define ZYD_EEPROM_ALLOWEDCHAN 0xf82f /* Allowed CH mask, 1 bit each */ +#define ZYD_EEPROM_PHY_REG 0xf831 /* PHY registers */ +#define ZYD_EEPROM_DEVICE_VER 0xf837 /* Device version */ +#define ZYD_EEPROM_36M_CAL 0xf83f /* Calibration */ +#define ZYD_EEPROM_11A_INT 0xf847 /* Interpolation */ +#define ZYD_EEPROM_48M_CAL 0xf84f /* Calibration */ +#define ZYD_EEPROM_48M_INT 0xf857 /* Interpolation */ +#define ZYD_EEPROM_54M_CAL 0xf85f /* Calibration */ +#define ZYD_EEPROM_54M_INT 0xf867 /* Interpolation */ /* * Firmware registers offsets (relative to fwbase). */ -#define ZYD_FW_FIRMWARE_REV 0x0000 /* Firmware version */ -#define ZYD_FW_USB_SPEED 0x0001 /* USB speed (!=0 if highspeed) */ -#define ZYD_FW_FIX_TX_RATE 0x0002 /* Fixed TX rate */ -#define ZYD_FW_LINK_STATUS 0x0003 -#define ZYD_FW_SOFT_RESET 0x0004 -#define ZYD_FW_FLASH_CHK 0x0005 +#define ZYD_FW_FIRMWARE_REV 0x0000 /* Firmware version */ +#define ZYD_FW_USB_SPEED 0x0001 /* USB speed (!=0 if highspeed) */ +#define ZYD_FW_FIX_TX_RATE 0x0002 /* Fixed TX rate */ +#define ZYD_FW_LINK_STATUS 0x0003 +#define ZYD_FW_SOFT_RESET 0x0004 +#define ZYD_FW_FLASH_CHK 0x0005 /* possible flags for register ZYD_FW_LINK_STATUS */ -#define ZYD_LED1 (1 << 8) -#define ZYD_LED2 (1 << 9) +#define ZYD_LED1 (1 << 8) +#define ZYD_LED2 (1 << 9) /* * RF IDs. */ -#define ZYD_RF_UW2451 0x2 /* not supported yet */ -#define ZYD_RF_UCHIP 0x3 /* not supported yet */ -#define ZYD_RF_AL2230 0x4 -#define ZYD_RF_AL7230B 0x5 -#define ZYD_RF_THETA 0x6 /* not supported yet */ -#define ZYD_RF_AL2210 0x7 -#define ZYD_RF_MAXIM_NEW 0x8 -#define ZYD_RF_GCT 0x9 -#define ZYD_RF_PV2000 0xa /* not supported yet */ -#define ZYD_RF_RALINK 0xb /* not supported yet */ -#define ZYD_RF_INTERSIL 0xc /* not supported yet */ -#define ZYD_RF_RFMD 0xd -#define ZYD_RF_MAXIM_NEW2 0xe -#define ZYD_RF_PHILIPS 0xf /* not supported yet */ +#define ZYD_RF_UW2451 0x2 /* not supported yet */ +#define ZYD_RF_UCHIP 0x3 /* not supported yet */ +#define ZYD_RF_AL2230 0x4 +#define ZYD_RF_AL7230B 0x5 +#define ZYD_RF_THETA 0x6 /* not supported yet */ +#define ZYD_RF_AL2210 0x7 +#define ZYD_RF_MAXIM_NEW 0x8 +#define ZYD_RF_GCT 0x9 +#define ZYD_RF_PV2000 0xa /* not supported yet */ +#define ZYD_RF_RALINK 0xb /* not supported yet */ +#define ZYD_RF_INTERSIL 0xc /* not supported yet */ +#define ZYD_RF_RFMD 0xd +#define ZYD_RF_MAXIM_NEW2 0xe +#define ZYD_RF_PHILIPS 0xf /* not supported yet */ /* * PHY registers (8 bits, not documented). */ -#define ZYD_CR0 0x9000 -#define ZYD_CR1 0x9004 -#define ZYD_CR2 0x9008 -#define ZYD_CR3 0x900c -#define ZYD_CR5 0x9010 -#define ZYD_CR6 0x9014 -#define ZYD_CR7 0x9018 -#define ZYD_CR8 0x901c -#define ZYD_CR4 0x9020 -#define ZYD_CR9 0x9024 -#define ZYD_CR10 0x9028 -#define ZYD_CR11 0x902c -#define ZYD_CR12 0x9030 -#define ZYD_CR13 0x9034 -#define ZYD_CR14 0x9038 -#define ZYD_CR15 0x903c -#define ZYD_CR16 0x9040 -#define ZYD_CR17 0x9044 -#define ZYD_CR18 0x9048 -#define ZYD_CR19 0x904c -#define ZYD_CR20 0x9050 -#define ZYD_CR21 0x9054 -#define ZYD_CR22 0x9058 -#define ZYD_CR23 0x905c -#define ZYD_CR24 0x9060 -#define ZYD_CR25 0x9064 -#define ZYD_CR26 0x9068 -#define ZYD_CR27 0x906c -#define ZYD_CR28 0x9070 -#define ZYD_CR29 0x9074 -#define ZYD_CR30 0x9078 -#define ZYD_CR31 0x907c -#define ZYD_CR32 0x9080 -#define ZYD_CR33 0x9084 -#define ZYD_CR34 0x9088 -#define ZYD_CR35 0x908c -#define ZYD_CR36 0x9090 -#define ZYD_CR37 0x9094 -#define ZYD_CR38 0x9098 -#define ZYD_CR39 0x909c -#define ZYD_CR40 0x90a0 -#define ZYD_CR41 0x90a4 -#define ZYD_CR42 0x90a8 -#define ZYD_CR43 0x90ac -#define ZYD_CR44 0x90b0 -#define ZYD_CR45 0x90b4 -#define ZYD_CR46 0x90b8 -#define ZYD_CR47 0x90bc -#define ZYD_CR48 0x90c0 -#define ZYD_CR49 0x90c4 -#define ZYD_CR50 0x90c8 -#define ZYD_CR51 0x90cc -#define ZYD_CR52 0x90d0 -#define ZYD_CR53 0x90d4 -#define ZYD_CR54 0x90d8 -#define ZYD_CR55 0x90dc -#define ZYD_CR56 0x90e0 -#define ZYD_CR57 0x90e4 -#define ZYD_CR58 0x90e8 -#define ZYD_CR59 0x90ec -#define ZYD_CR60 0x90f0 -#define ZYD_CR61 0x90f4 -#define ZYD_CR62 0x90f8 -#define ZYD_CR63 0x90fc -#define ZYD_CR64 0x9100 -#define ZYD_CR65 0x9104 -#define ZYD_CR66 0x9108 -#define ZYD_CR67 0x910c -#define ZYD_CR68 0x9110 -#define ZYD_CR69 0x9114 -#define ZYD_CR70 0x9118 -#define ZYD_CR71 0x911c -#define ZYD_CR72 0x9120 -#define ZYD_CR73 0x9124 -#define ZYD_CR74 0x9128 -#define ZYD_CR75 0x912c -#define ZYD_CR76 0x9130 -#define ZYD_CR77 0x9134 -#define ZYD_CR78 0x9138 -#define ZYD_CR79 0x913c -#define ZYD_CR80 0x9140 -#define ZYD_CR81 0x9144 -#define ZYD_CR82 0x9148 -#define ZYD_CR83 0x914c -#define ZYD_CR84 0x9150 -#define ZYD_CR85 0x9154 -#define ZYD_CR86 0x9158 -#define ZYD_CR87 0x915c -#define ZYD_CR88 0x9160 -#define ZYD_CR89 0x9164 -#define ZYD_CR90 0x9168 -#define ZYD_CR91 0x916c -#define ZYD_CR92 0x9170 -#define ZYD_CR93 0x9174 -#define ZYD_CR94 0x9178 -#define ZYD_CR95 0x917c -#define ZYD_CR96 0x9180 -#define ZYD_CR97 0x9184 -#define ZYD_CR98 0x9188 -#define ZYD_CR99 0x918c -#define ZYD_CR100 0x9190 -#define ZYD_CR101 0x9194 -#define ZYD_CR102 0x9198 -#define ZYD_CR103 0x919c -#define ZYD_CR104 0x91a0 -#define ZYD_CR105 0x91a4 -#define ZYD_CR106 0x91a8 -#define ZYD_CR107 0x91ac -#define ZYD_CR108 0x91b0 -#define ZYD_CR109 0x91b4 -#define ZYD_CR110 0x91b8 -#define ZYD_CR111 0x91bc -#define ZYD_CR112 0x91c0 -#define ZYD_CR113 0x91c4 -#define ZYD_CR114 0x91c8 -#define ZYD_CR115 0x91cc -#define ZYD_CR116 0x91d0 -#define ZYD_CR117 0x91d4 -#define ZYD_CR118 0x91d8 -#define ZYD_CR119 0x91dc -#define ZYD_CR120 0x91e0 -#define ZYD_CR121 0x91e4 -#define ZYD_CR122 0x91e8 -#define ZYD_CR123 0x91ec -#define ZYD_CR124 0x91f0 -#define ZYD_CR125 0x91f4 -#define ZYD_CR126 0x91f8 -#define ZYD_CR127 0x91fc -#define ZYD_CR128 0x9200 -#define ZYD_CR129 0x9204 -#define ZYD_CR130 0x9208 -#define ZYD_CR131 0x920c -#define ZYD_CR132 0x9210 -#define ZYD_CR133 0x9214 -#define ZYD_CR134 0x9218 -#define ZYD_CR135 0x921c -#define ZYD_CR136 0x9220 -#define ZYD_CR137 0x9224 -#define ZYD_CR138 0x9228 -#define ZYD_CR139 0x922c -#define ZYD_CR140 0x9230 -#define ZYD_CR141 0x9234 -#define ZYD_CR142 0x9238 -#define ZYD_CR143 0x923c -#define ZYD_CR144 0x9240 -#define ZYD_CR145 0x9244 -#define ZYD_CR146 0x9248 -#define ZYD_CR147 0x924c -#define ZYD_CR148 0x9250 -#define ZYD_CR149 0x9254 -#define ZYD_CR150 0x9258 -#define ZYD_CR151 0x925c -#define ZYD_CR152 0x9260 -#define ZYD_CR153 0x9264 -#define ZYD_CR154 0x9268 -#define ZYD_CR155 0x926c -#define ZYD_CR156 0x9270 -#define ZYD_CR157 0x9274 -#define ZYD_CR158 0x9278 -#define ZYD_CR159 0x927c -#define ZYD_CR160 0x9280 -#define ZYD_CR161 0x9284 -#define ZYD_CR162 0x9288 -#define ZYD_CR163 0x928c -#define ZYD_CR164 0x9290 -#define ZYD_CR165 0x9294 -#define ZYD_CR166 0x9298 -#define ZYD_CR167 0x929c -#define ZYD_CR168 0x92a0 -#define ZYD_CR169 0x92a4 -#define ZYD_CR170 0x92a8 -#define ZYD_CR171 0x92ac -#define ZYD_CR172 0x92b0 -#define ZYD_CR173 0x92b4 -#define ZYD_CR174 0x92b8 -#define ZYD_CR175 0x92bc -#define ZYD_CR176 0x92c0 -#define ZYD_CR177 0x92c4 -#define ZYD_CR178 0x92c8 -#define ZYD_CR179 0x92cc -#define ZYD_CR180 0x92d0 -#define ZYD_CR181 0x92d4 -#define ZYD_CR182 0x92d8 -#define ZYD_CR183 0x92dc -#define ZYD_CR184 0x92e0 -#define ZYD_CR185 0x92e4 -#define ZYD_CR186 0x92e8 -#define ZYD_CR187 0x92ec -#define ZYD_CR188 0x92f0 -#define ZYD_CR189 0x92f4 -#define ZYD_CR190 0x92f8 -#define ZYD_CR191 0x92fc -#define ZYD_CR192 0x9300 -#define ZYD_CR193 0x9304 -#define ZYD_CR194 0x9308 -#define ZYD_CR195 0x930c -#define ZYD_CR196 0x9310 -#define ZYD_CR197 0x9314 -#define ZYD_CR198 0x9318 -#define ZYD_CR199 0x931c -#define ZYD_CR200 0x9320 -#define ZYD_CR201 0x9324 -#define ZYD_CR202 0x9328 -#define ZYD_CR203 0x932c -#define ZYD_CR204 0x9330 -#define ZYD_CR205 0x9334 -#define ZYD_CR206 0x9338 -#define ZYD_CR207 0x933c -#define ZYD_CR208 0x9340 -#define ZYD_CR209 0x9344 -#define ZYD_CR210 0x9348 -#define ZYD_CR211 0x934c -#define ZYD_CR212 0x9350 -#define ZYD_CR213 0x9354 -#define ZYD_CR214 0x9358 -#define ZYD_CR215 0x935c -#define ZYD_CR216 0x9360 -#define ZYD_CR217 0x9364 -#define ZYD_CR218 0x9368 -#define ZYD_CR219 0x936c -#define ZYD_CR220 0x9370 -#define ZYD_CR221 0x9374 -#define ZYD_CR222 0x9378 -#define ZYD_CR223 0x937c -#define ZYD_CR224 0x9380 -#define ZYD_CR225 0x9384 -#define ZYD_CR226 0x9388 -#define ZYD_CR227 0x938c -#define ZYD_CR228 0x9390 -#define ZYD_CR229 0x9394 -#define ZYD_CR230 0x9398 -#define ZYD_CR231 0x939c -#define ZYD_CR232 0x93a0 -#define ZYD_CR233 0x93a4 -#define ZYD_CR234 0x93a8 -#define ZYD_CR235 0x93ac -#define ZYD_CR236 0x93b0 -#define ZYD_CR240 0x93c0 -#define ZYD_CR241 0x93c4 -#define ZYD_CR242 0x93c8 -#define ZYD_CR243 0x93cc -#define ZYD_CR244 0x93d0 -#define ZYD_CR245 0x93d4 -#define ZYD_CR251 0x93ec -#define ZYD_CR252 0x93f0 -#define ZYD_CR253 0x93f4 -#define ZYD_CR254 0x93f8 -#define ZYD_CR255 0x93fc +#define ZYD_CR0 0x9000 +#define ZYD_CR1 0x9004 +#define ZYD_CR2 0x9008 +#define ZYD_CR3 0x900c +#define ZYD_CR5 0x9010 +#define ZYD_CR6 0x9014 +#define ZYD_CR7 0x9018 +#define ZYD_CR8 0x901c +#define ZYD_CR4 0x9020 +#define ZYD_CR9 0x9024 +#define ZYD_CR10 0x9028 +#define ZYD_CR11 0x902c +#define ZYD_CR12 0x9030 +#define ZYD_CR13 0x9034 +#define ZYD_CR14 0x9038 +#define ZYD_CR15 0x903c +#define ZYD_CR16 0x9040 +#define ZYD_CR17 0x9044 +#define ZYD_CR18 0x9048 +#define ZYD_CR19 0x904c +#define ZYD_CR20 0x9050 +#define ZYD_CR21 0x9054 +#define ZYD_CR22 0x9058 +#define ZYD_CR23 0x905c +#define ZYD_CR24 0x9060 +#define ZYD_CR25 0x9064 +#define ZYD_CR26 0x9068 +#define ZYD_CR27 0x906c +#define ZYD_CR28 0x9070 +#define ZYD_CR29 0x9074 +#define ZYD_CR30 0x9078 +#define ZYD_CR31 0x907c +#define ZYD_CR32 0x9080 +#define ZYD_CR33 0x9084 +#define ZYD_CR34 0x9088 +#define ZYD_CR35 0x908c +#define ZYD_CR36 0x9090 +#define ZYD_CR37 0x9094 +#define ZYD_CR38 0x9098 +#define ZYD_CR39 0x909c +#define ZYD_CR40 0x90a0 +#define ZYD_CR41 0x90a4 +#define ZYD_CR42 0x90a8 +#define ZYD_CR43 0x90ac +#define ZYD_CR44 0x90b0 +#define ZYD_CR45 0x90b4 +#define ZYD_CR46 0x90b8 +#define ZYD_CR47 0x90bc +#define ZYD_CR48 0x90c0 +#define ZYD_CR49 0x90c4 +#define ZYD_CR50 0x90c8 +#define ZYD_CR51 0x90cc +#define ZYD_CR52 0x90d0 +#define ZYD_CR53 0x90d4 +#define ZYD_CR54 0x90d8 +#define ZYD_CR55 0x90dc +#define ZYD_CR56 0x90e0 +#define ZYD_CR57 0x90e4 +#define ZYD_CR58 0x90e8 +#define ZYD_CR59 0x90ec +#define ZYD_CR60 0x90f0 +#define ZYD_CR61 0x90f4 +#define ZYD_CR62 0x90f8 +#define ZYD_CR63 0x90fc +#define ZYD_CR64 0x9100 +#define ZYD_CR65 0x9104 +#define ZYD_CR66 0x9108 +#define ZYD_CR67 0x910c +#define ZYD_CR68 0x9110 +#define ZYD_CR69 0x9114 +#define ZYD_CR70 0x9118 +#define ZYD_CR71 0x911c +#define ZYD_CR72 0x9120 +#define ZYD_CR73 0x9124 +#define ZYD_CR74 0x9128 +#define ZYD_CR75 0x912c +#define ZYD_CR76 0x9130 +#define ZYD_CR77 0x9134 +#define ZYD_CR78 0x9138 +#define ZYD_CR79 0x913c +#define ZYD_CR80 0x9140 +#define ZYD_CR81 0x9144 +#define ZYD_CR82 0x9148 +#define ZYD_CR83 0x914c +#define ZYD_CR84 0x9150 +#define ZYD_CR85 0x9154 +#define ZYD_CR86 0x9158 +#define ZYD_CR87 0x915c +#define ZYD_CR88 0x9160 +#define ZYD_CR89 0x9164 +#define ZYD_CR90 0x9168 +#define ZYD_CR91 0x916c +#define ZYD_CR92 0x9170 +#define ZYD_CR93 0x9174 +#define ZYD_CR94 0x9178 +#define ZYD_CR95 0x917c +#define ZYD_CR96 0x9180 +#define ZYD_CR97 0x9184 +#define ZYD_CR98 0x9188 +#define ZYD_CR99 0x918c +#define ZYD_CR100 0x9190 +#define ZYD_CR101 0x9194 +#define ZYD_CR102 0x9198 +#define ZYD_CR103 0x919c +#define ZYD_CR104 0x91a0 +#define ZYD_CR105 0x91a4 +#define ZYD_CR106 0x91a8 +#define ZYD_CR107 0x91ac +#define ZYD_CR108 0x91b0 +#define ZYD_CR109 0x91b4 +#define ZYD_CR110 0x91b8 +#define ZYD_CR111 0x91bc +#define ZYD_CR112 0x91c0 +#define ZYD_CR113 0x91c4 +#define ZYD_CR114 0x91c8 +#define ZYD_CR115 0x91cc +#define ZYD_CR116 0x91d0 +#define ZYD_CR117 0x91d4 +#define ZYD_CR118 0x91d8 +#define ZYD_CR119 0x91dc +#define ZYD_CR120 0x91e0 +#define ZYD_CR121 0x91e4 +#define ZYD_CR122 0x91e8 +#define ZYD_CR123 0x91ec +#define ZYD_CR124 0x91f0 +#define ZYD_CR125 0x91f4 +#define ZYD_CR126 0x91f8 +#define ZYD_CR127 0x91fc +#define ZYD_CR128 0x9200 +#define ZYD_CR129 0x9204 +#define ZYD_CR130 0x9208 +#define ZYD_CR131 0x920c +#define ZYD_CR132 0x9210 +#define ZYD_CR133 0x9214 +#define ZYD_CR134 0x9218 +#define ZYD_CR135 0x921c +#define ZYD_CR136 0x9220 +#define ZYD_CR137 0x9224 +#define ZYD_CR138 0x9228 +#define ZYD_CR139 0x922c +#define ZYD_CR140 0x9230 +#define ZYD_CR141 0x9234 +#define ZYD_CR142 0x9238 +#define ZYD_CR143 0x923c +#define ZYD_CR144 0x9240 +#define ZYD_CR145 0x9244 +#define ZYD_CR146 0x9248 +#define ZYD_CR147 0x924c +#define ZYD_CR148 0x9250 +#define ZYD_CR149 0x9254 +#define ZYD_CR150 0x9258 +#define ZYD_CR151 0x925c +#define ZYD_CR152 0x9260 +#define ZYD_CR153 0x9264 +#define ZYD_CR154 0x9268 +#define ZYD_CR155 0x926c +#define ZYD_CR156 0x9270 +#define ZYD_CR157 0x9274 +#define ZYD_CR158 0x9278 +#define ZYD_CR159 0x927c +#define ZYD_CR160 0x9280 +#define ZYD_CR161 0x9284 +#define ZYD_CR162 0x9288 +#define ZYD_CR163 0x928c +#define ZYD_CR164 0x9290 +#define ZYD_CR165 0x9294 +#define ZYD_CR166 0x9298 +#define ZYD_CR167 0x929c +#define ZYD_CR168 0x92a0 +#define ZYD_CR169 0x92a4 +#define ZYD_CR170 0x92a8 +#define ZYD_CR171 0x92ac +#define ZYD_CR172 0x92b0 +#define ZYD_CR173 0x92b4 +#define ZYD_CR174 0x92b8 +#define ZYD_CR175 0x92bc +#define ZYD_CR176 0x92c0 +#define ZYD_CR177 0x92c4 +#define ZYD_CR178 0x92c8 +#define ZYD_CR179 0x92cc +#define ZYD_CR180 0x92d0 +#define ZYD_CR181 0x92d4 +#define ZYD_CR182 0x92d8 +#define ZYD_CR183 0x92dc +#define ZYD_CR184 0x92e0 +#define ZYD_CR185 0x92e4 +#define ZYD_CR186 0x92e8 +#define ZYD_CR187 0x92ec +#define ZYD_CR188 0x92f0 +#define ZYD_CR189 0x92f4 +#define ZYD_CR190 0x92f8 +#define ZYD_CR191 0x92fc +#define ZYD_CR192 0x9300 +#define ZYD_CR193 0x9304 +#define ZYD_CR194 0x9308 +#define ZYD_CR195 0x930c +#define ZYD_CR196 0x9310 +#define ZYD_CR197 0x9314 +#define ZYD_CR198 0x9318 +#define ZYD_CR199 0x931c +#define ZYD_CR200 0x9320 +#define ZYD_CR201 0x9324 +#define ZYD_CR202 0x9328 +#define ZYD_CR203 0x932c +#define ZYD_CR204 0x9330 +#define ZYD_CR205 0x9334 +#define ZYD_CR206 0x9338 +#define ZYD_CR207 0x933c +#define ZYD_CR208 0x9340 +#define ZYD_CR209 0x9344 +#define ZYD_CR210 0x9348 +#define ZYD_CR211 0x934c +#define ZYD_CR212 0x9350 +#define ZYD_CR213 0x9354 +#define ZYD_CR214 0x9358 +#define ZYD_CR215 0x935c +#define ZYD_CR216 0x9360 +#define ZYD_CR217 0x9364 +#define ZYD_CR218 0x9368 +#define ZYD_CR219 0x936c +#define ZYD_CR220 0x9370 +#define ZYD_CR221 0x9374 +#define ZYD_CR222 0x9378 +#define ZYD_CR223 0x937c +#define ZYD_CR224 0x9380 +#define ZYD_CR225 0x9384 +#define ZYD_CR226 0x9388 +#define ZYD_CR227 0x938c +#define ZYD_CR228 0x9390 +#define ZYD_CR229 0x9394 +#define ZYD_CR230 0x9398 +#define ZYD_CR231 0x939c +#define ZYD_CR232 0x93a0 +#define ZYD_CR233 0x93a4 +#define ZYD_CR234 0x93a8 +#define ZYD_CR235 0x93ac +#define ZYD_CR236 0x93b0 +#define ZYD_CR240 0x93c0 +#define ZYD_CR241 0x93c4 +#define ZYD_CR242 0x93c8 +#define ZYD_CR243 0x93cc +#define ZYD_CR244 0x93d0 +#define ZYD_CR245 0x93d4 +#define ZYD_CR251 0x93ec +#define ZYD_CR252 0x93f0 +#define ZYD_CR253 0x93f4 +#define ZYD_CR254 0x93f8 +#define ZYD_CR255 0x93fc /* copied nearly verbatim from the Linux driver rewrite */ -#define ZYD_DEF_PHY \ +#define ZYD_DEF_PHY \ { \ { ZYD_CR0, 0x0a }, { ZYD_CR1, 0x06 }, { ZYD_CR2, 0x26 }, \ { ZYD_CR3, 0x38 }, { ZYD_CR4, 0x80 }, { ZYD_CR9, 0xa0 }, \ @@ -485,7 +485,7 @@ { 0, 0 } \ } -#define ZYD_DEF_PHYB \ +#define ZYD_DEF_PHYB \ { \ { ZYD_CR0, 0x14 }, { ZYD_CR1, 0x06 }, { ZYD_CR2, 0x26 }, \ { ZYD_CR3, 0x38 }, { ZYD_CR4, 0x80 }, { ZYD_CR9, 0xe0 }, \ @@ -536,7 +536,7 @@ { 0, 0 } \ } -#define ZYD_RFMD_PHY \ +#define ZYD_RFMD_PHY \ { \ { ZYD_CR2, 0x1e }, { ZYD_CR9, 0x20 }, { ZYD_CR10, 0x89 }, \ { ZYD_CR11, 0x00 }, { ZYD_CR15, 0xd0 }, { ZYD_CR17, 0x68 }, \ @@ -565,14 +565,14 @@ { ZYD_CR150, 0x10 }, { ZYD_CR169, 0xbb }, { ZYD_CR170, 0xbb } \ } -#define ZYD_RFMD_RF \ +#define ZYD_RFMD_RF \ { \ 0x000007, 0x07dd43, 0x080959, 0x0e6666, 0x116a57, 0x17dd43, \ 0x1819f9, 0x1e6666, 0x214554, 0x25e7fa, 0x27fffa, 0x294128, \ 0x2c0000, 0x300000, 0x340000, 0x381e0f, 0x6c180f \ } -#define ZYD_RFMD_CHANTABLE \ +#define ZYD_RFMD_CHANTABLE \ { \ { 0x181979, 0x1e6666 }, \ { 0x181989, 0x1e6666 }, \ @@ -592,7 +592,7 @@ -#define ZYD_AL2230_PHY \ +#define ZYD_AL2230_PHY \ { \ { ZYD_CR15, 0x20 }, { ZYD_CR23, 0x40 }, { ZYD_CR24, 0x20 }, \ { ZYD_CR26, 0x11 }, { ZYD_CR28, 0x3e }, { ZYD_CR29, 0x00 }, \ @@ -615,7 +615,7 @@ { ZYD_CR138, 0x28 }, { ZYD_CR203, 0x06 } \ } -#define ZYD_AL2230_PHY_B \ +#define ZYD_AL2230_PHY_B \ { \ { ZYD_CR10, 0x89 }, { ZYD_CR15, 0x20 }, { ZYD_CR17, 0x2b }, \ { ZYD_CR23, 0x40 }, { ZYD_CR24, 0x20 }, { ZYD_CR26, 0x93 }, \ @@ -639,7 +639,7 @@ { ZYD_CR252, 0x00 }, { ZYD_CR253, 0x00 } \ } -#define ZYD_AL2230_RF \ +#define ZYD_AL2230_RF \ { \ 0x03f790, 0x033331, 0x00000d, 0x0b3331, 0x03b812, 0x00fff3, \ 0x000da4, 0x0f4dc5, 0x0805b6, 0x011687, 0x000688, 0x0403b9, \ @@ -647,14 +647,14 @@ 0x004c0f, 0x00540f, 0x00700f, 0x00500f \ } -#define ZYD_AL2230_RF_B \ +#define ZYD_AL2230_RF_B \ { \ 0x03f790, 0x033331, 0x00000d, 0x0b3331, 0x03b812, 0x00fff3, \ 0x0005a4, 0x0f4dc5, 0x0805b6, 0x0146c7, 0x000688, 0x0403b9, \ 0x00dbba, 0x00099b, 0x0bdffc, 0x00000d, 0x00580f \ } -#define ZYD_AL2230_CHANTABLE \ +#define ZYD_AL2230_CHANTABLE \ { \ { 0x03f790, 0x033331, 0x00000d }, \ { 0x03f790, 0x0b3331, 0x00000d }, \ @@ -674,7 +674,7 @@ -#define ZYD_AL7230B_PHY_1 \ +#define ZYD_AL7230B_PHY_1 \ { \ { ZYD_CR240, 0x57 }, { ZYD_CR15, 0x20 }, { ZYD_CR23, 0x40 }, \ { ZYD_CR24, 0x20 }, { ZYD_CR26, 0x11 }, { ZYD_CR28, 0x3e }, \ @@ -697,36 +697,36 @@ { ZYD_CR251, 0x2f } \ } -#define ZYD_AL7230B_PHY_2 \ +#define ZYD_AL7230B_PHY_2 \ { \ { ZYD_CR251, 0x3f }, { ZYD_CR128, 0x14 }, { ZYD_CR129, 0x12 }, \ { ZYD_CR130, 0x10 }, { ZYD_CR38, 0x38 }, { ZYD_CR136, 0xdf } \ } -#define ZYD_AL7230B_PHY_3 \ +#define ZYD_AL7230B_PHY_3 \ { \ { ZYD_CR203, 0x06 }, { ZYD_CR240, 0x80 } \ } -#define ZYD_AL7230B_RF_1 \ +#define ZYD_AL7230B_RF_1 \ { \ 0x09ec04, 0x8cccc8, 0x4ff821, 0xc5fbfc, 0x21ebfe, 0xafd401, \ 0x6cf56a, 0xe04073, 0x193d76, 0x9dd844, 0x500007, 0xd8c010, \ 0x3c9000, 0xbfffff, 0x700000, 0xf15d58 \ } -#define ZYD_AL7230B_RF_2 \ +#define ZYD_AL7230B_RF_2 \ { \ 0xf15d59, 0xf15d5c, 0xf15d58 \ } -#define ZYD_AL7230B_RF_SETCHANNEL \ +#define ZYD_AL7230B_RF_SETCHANNEL \ { \ 0x4ff821, 0xc5fbfc, 0x21ebfe, 0xafd401, 0x6cf56a, 0xe04073, \ 0x193d76, 0x9dd844, 0x500007, 0xd8c010, 0x3c9000, 0xf15d58 \ } -#define ZYD_AL7230B_CHANTABLE \ +#define ZYD_AL7230B_CHANTABLE \ { \ { 0x09ec00, 0x8cccc8 }, \ { 0x09ec00, 0x8cccd8 }, \ @@ -746,7 +746,7 @@ -#define ZYD_AL2210_PHY \ +#define ZYD_AL2210_PHY \ { \ { ZYD_CR9, 0xe0 }, { ZYD_CR10, 0x91 }, { ZYD_CR12, 0x90 }, \ { ZYD_CR15, 0xd0 }, { ZYD_CR16, 0x40 }, { ZYD_CR17, 0x58 }, \ @@ -758,13 +758,13 @@ { ZYD_CR127, 0x03 } \ } -#define ZYD_AL2210_RF \ +#define ZYD_AL2210_RF \ { \ 0x2396c0, 0x00fcb1, 0x358132, 0x0108b3, 0xc77804, 0x456415, \ 0xff2226, 0x806667, 0x7860f8, 0xbb01c9, 0x00000a, 0x00000b \ } -#define ZYD_AL2210_CHANTABLE \ +#define ZYD_AL2210_CHANTABLE \ { \ 0x0196c0, 0x019710, 0x019760, 0x0197b0, 0x019800, 0x019850, \ 0x0198a0, 0x0198f0, 0x019940, 0x019990, 0x0199e0, 0x019a30, \ @@ -773,7 +773,7 @@ -#define ZYD_GCT_PHY \ +#define ZYD_GCT_PHY \ { \ { ZYD_CR47, 0x1e }, { ZYD_CR15, 0xdc }, { ZYD_CR113, 0xc0 }, \ { ZYD_CR20, 0x0c }, { ZYD_CR17, 0x65 }, { ZYD_CR34, 0x04 }, \ @@ -783,7 +783,7 @@ { ZYD_CR64, 0x80 }, { ZYD_CR33, 0x28 }, { ZYD_CR38, 0x30 } \ } -#define ZYD_GCT_RF \ +#define ZYD_GCT_RF \ { \ 0x1f0000, 0x1f0000, 0x1f0200, 0x1f0600, 0x1f8600, 0x1f8600, \ 0x002050, 0x1f8000, 0x1f8200, 0x1f8600, 0x1c0000, 0x10c458, \ @@ -794,7 +794,7 @@ 0x150000, 0x0c7000, 0x150800, 0x150000 \ } -#define ZYD_GCT_CHANTABLE \ +#define ZYD_GCT_CHANTABLE \ { \ 0x1a0000, 0x1a8000, 0x1a4000, 0x1ac000, 0x1a2000, 0x1aa000, \ 0x1a6000, 0x1ae000, 0x1a1000, 0x1a9000, 0x1a5000, 0x1ad000, \ @@ -803,7 +803,7 @@ -#define ZYD_MAXIM_PHY \ +#define ZYD_MAXIM_PHY \ { \ { ZYD_CR23, 0x40 }, { ZYD_CR15, 0x20 }, { ZYD_CR28, 0x3e }, \ { ZYD_CR29, 0x00 }, { ZYD_CR26, 0x11 }, { ZYD_CR44, 0x33 }, \ @@ -830,14 +830,14 @@ { ZYD_CR150, 0x0d } \ } -#define ZYD_MAXIM_RF \ +#define ZYD_MAXIM_RF \ { \ 0x00ccd4, 0x030a03, 0x000400, 0x000ca1, 0x010072, 0x018645, \ 0x004006, 0x0000a7, 0x008258, 0x003fc9, 0x00040a, 0x00000b, \ 0x00026c \ } -#define ZYD_MAXIM_CHANTABLE \ +#define ZYD_MAXIM_CHANTABLE \ { \ { 0x0ccd4, 0x30a03 }, \ { 0x22224, 0x00a13 }, \ @@ -857,7 +857,7 @@ >>> TRUNCATED FOR MAIL (1000 lines) <<< From owner-p4-projects@FreeBSD.ORG Tue Jan 1 13:41:27 2008 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id C2F8516A420; Tue, 1 Jan 2008 13:41:27 +0000 (UTC) Delivered-To: perforce@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 88D7D16A418 for ; Tue, 1 Jan 2008 13:41:27 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id 78DA813C45D for ; Tue, 1 Jan 2008 13:41:27 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.1/8.14.1) with ESMTP id m01DfRrJ003795 for ; Tue, 1 Jan 2008 13:41:27 GMT (envelope-from hselasky@FreeBSD.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.1/8.14.1/Submit) id m01DfR7q003790 for perforce@freebsd.org; Tue, 1 Jan 2008 13:41:27 GMT (envelope-from hselasky@FreeBSD.org) Date: Tue, 1 Jan 2008 13:41:27 GMT Message-Id: <200801011341.m01DfR7q003790@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky To: Perforce Change Reviews Cc: Subject: PERFORCE change 132247 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 01 Jan 2008 13:41:28 -0000 http://perforce.freebsd.org/chv.cgi?CH=132247 Change 132247 by hselasky@hselasky_laptop001 on 2008/01/01 13:40:51 Update "zyd_softc" and remove some unused structures. Affected files ... .. //depot/projects/usb/src/sys/dev/usb/if_zydreg.h#11 edit Differences ... ==== //depot/projects/usb/src/sys/dev/usb/if_zydreg.h#11 (text+ko) ==== @@ -1067,10 +1067,7 @@ } __packed; -#define ZYD_RX_LIST_CNT 1 -#define ZYD_TX_LIST_CNT 1 - -#define ZYD_CONFIG_NO 1 +#define ZYD_CONFIG_INDEX 0 #define ZYD_IFACE_INDEX 0 #define ZYD_INTR_TIMEOUT 1000 @@ -1104,20 +1101,6 @@ uint32_t val; }; -struct zyd_tx_data { - struct zyd_softc *sc; - usbd_xfer_handle xfer; - uint8_t *buf; - struct ieee80211_node *ni; - struct mbuf *m; -}; - -struct zyd_rx_data { - struct zyd_softc *sc; - usbd_xfer_handle xfer; - const uint8_t *buf; -}; - struct zyd_node { struct ieee80211_node ni; /* must be the first */ struct ieee80211_amrr_node amn; @@ -1166,7 +1149,7 @@ int width; }; -struct rq { +struct zyd_rq { const uint16_t *idata; struct zyd_pair *odata; int len; @@ -1174,78 +1157,60 @@ }; struct zyd_softc { - device_t sc_dev; - struct ifnet *sc_ifp; + void *sc_evilhack; /* XXX this pointer must be first */ + struct ieee80211com sc_ic; - int (*sc_newstate) (struct ieee80211com *, - enum ieee80211_state, int); struct zyd_rf sc_rf; - - struct usb_task sc_task; - struct usb_task sc_scantask; - int sc_scan_action; -#define ZYD_SCAN_START 0 -#define ZYD_SCAN_END 1 -#define ZYD_SET_CHANNEL 2 - usbd_device_handle sc_udev; - usbd_interface_handle sc_iface; - int sc_flags; - int sc_if_flags; -#define ZD1211_FWLOADED (1 << 0) - - - enum ieee80211_state sc_state; - int sc_arg; - + struct usb_callout sc_watchdog; struct mtx sc_mtx; - struct callout sc_amrr_ch; - struct callout sc_watchdog_ch; + struct usbd_config_td sc_config_td; + struct ieee80211_beacon_offsets sc_bo; + struct zyd_rx_radiotap_header sc_rxtap; + struct zyd_tx_radiotap_header sc_txtap; + struct zyd_rf sc_rf; + STAILQ_HEAD(rqh, zyd_rq) sc_rqh; - struct ieee80211_amrr amrr; + struct ifnet *sc_ifp; + int (*sc_newstate) (struct ieee80211com *, + enum ieee80211_state, int); + struct usbd_device *sc_udev; + struct usbd_xfer *sc_xfer[ZYD_N_TRANSFER]; + struct bpf_if *sc_drvbpf; - STAILQ_HEAD(rqh, rq) sc_rqh; + uint32_t sc_rxtap_len; + uint32_t sc_txtap_len; - uint16_t fwbase; - uint8_t regdomain; - uint8_t mac_rev; - uint16_t fw_rev; - uint8_t rf_rev; - uint8_t pa_rev; - uint8_t fix_cr47; - uint8_t fix_cr157; - uint8_t pwr_cal[14]; - uint8_t pwr_int[14]; - uint8_t ofdm36_cal[14]; - uint8_t ofdm48_cal[14]; - uint8_t ofdm54_cal[14]; + uint16_t sc_firmware_base; + uint16_t sc_fw_ver; + uint16_t sc_fwbase; + uint16_t sc_fw_rev; -#define ZYD_ENDPT_BOUT 0 -#define ZYD_ENDPT_BIN 1 -#define ZYD_ENDPT_IIN 2 -#define ZYD_ENDPT_IOUT 3 -#define ZYD_ENDPT_CNT 4 - usbd_pipe_handle zyd_ep[ZYD_ENDPT_CNT]; - uint8_t *ibuf; + uint8_t sc_intr_obuf[ZYD_INTR_BUF_SIZE]; + uint8_t sc_intr_ibuf[ZYD_INTR_BUF_SIZE]; + uint8_t sc_intr_iwakeup; + uint8_t sc_intr_owakeup; + uint8_t sc_intr_olen; + uint8_t sc_regdomain; + uint8_t sc_mac_rev; + uint8_t sc_rf_rev; + uint8_t sc_pa_rev; + uint8_t sc_fix_cr47; + uint8_t sc_fix_cr157; + uint8_t sc_pwr_cal[14]; + uint8_t sc_pwr_int[14]; + uint8_t sc_ofdm36_cal[14]; + uint8_t sc_ofdm48_cal[14]; + uint8_t sc_ofdm54_cal[14]; - struct zyd_rx_data rx_data[ZYD_RX_LIST_CNT]; - struct zyd_tx_data tx_data[ZYD_TX_LIST_CNT]; - int tx_queued; + uint8_t sc_flags; +#define ZYD_FLAG_INTR_READ_STALL 0x01 +#define ZYD_FLAG_INTR_WRITE_STALL 0x02 +#define ZYD_FLAG_BULK_READ_STALL 0x04 +#define ZYD_FLAG_BULK_WRITE_STALL 0x08 +#define ZYD_FLAG_TX_BEACON 0x10 +#define ZYD_FLAG_HL_READY 0x20 +#define ZYD_FLAG_LL_READY 0x40 +#define ZYD_FLAG_WAIT_COMMAND 0x80 - int tx_timer; - - struct bpf_if *sc_drvbpf; - - struct zyd_rx_radiotap_header sc_rxtap; - int sc_rxtap_len; - - struct zyd_tx_radiotap_header sc_txtap; - int sc_txtap_len; + uint8_t sc_name[16]; }; - -#if 0 -#define ZYD_LOCK(sc) mtx_lock(&(sc)->sc_mtx) -#define ZYD_UNLOCK(sc) mtx_unlock(&(sc)->sc_mtx) -#else -#define ZYD_LOCK(sc) do { ((sc) = (sc)); mtx_lock(&Giant); } while (0) -#define ZYD_UNLOCK(sc) mtx_unlock(&Giant) -#endif From owner-p4-projects@FreeBSD.ORG Tue Jan 1 13:42:29 2008 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 02E5C16A421; Tue, 1 Jan 2008 13:42:29 +0000 (UTC) Delivered-To: perforce@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id BB9AB16A417 for ; Tue, 1 Jan 2008 13:42:28 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id AB4DF13C45D for ; Tue, 1 Jan 2008 13:42:28 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.1/8.14.1) with ESMTP id m01DgStX004078 for ; Tue, 1 Jan 2008 13:42:28 GMT (envelope-from hselasky@FreeBSD.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.1/8.14.1/Submit) id m01DgS6M004075 for perforce@freebsd.org; Tue, 1 Jan 2008 13:42:28 GMT (envelope-from hselasky@FreeBSD.org) Date: Tue, 1 Jan 2008 13:42:28 GMT Message-Id: <200801011342.m01DgS6M004075@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky To: Perforce Change Reviews Cc: Subject: PERFORCE change 132248 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 01 Jan 2008 13:42:29 -0000 http://perforce.freebsd.org/chv.cgi?CH=132248 Change 132248 by hselasky@hselasky_laptop001 on 2008/01/01 13:42:01 Update style script. Affected files ... .. //depot/projects/usb/src/sys/dev/usb/usb_style.sh#4 edit Differences ... ==== //depot/projects/usb/src/sys/dev/usb/usb_style.sh#4 (text+ko) ==== @@ -16,6 +16,7 @@ (cat $1 | indent -Toss_mixerinfo -TFILE -Tu_char -Tu_int -Tu_long \ -TTAILQ_HEAD -TLIST_HEAD -TTAILQ_ENTRY -TLIST_ENTRY \ + -TSTAILQ_HEAD -TSTAILQ_ENTRY \ -Tu_short -Tfd_set -ta -st -bad -bap -nbbb -nbc -br -nbs \ -c41 -cd41 -cdb -ce -ci4 -cli0 -d0 -di8 -ndj -ei -nfc1 \ -nfcb -i8 -ip8 -l79 -lc77 -ldi0 -nlp -npcs -psl -sc \ @@ -23,7 +24,8 @@ sed -e "s/_HEAD [(]/_HEAD(/g" | sed -e "s/_ENTRY [(]/_ENTRY(/g" | sed -e "s/ __packed/ __packed/g" | - sed -e "s/ __aligned/ __aligned/g" ) > temp + sed -e "s/ __aligned/ __aligned/g" | + sed -e "s/^#define /#define /g") > temp (diff temp $1 > /dev/null) || (cp temp $1) From owner-p4-projects@FreeBSD.ORG Tue Jan 1 13:42:29 2008 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 6013B16A52C; Tue, 1 Jan 2008 13:42:29 +0000 (UTC) Delivered-To: perforce@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 05D0816A468 for ; Tue, 1 Jan 2008 13:42:29 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id D132013C469 for ; Tue, 1 Jan 2008 13:42:28 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.1/8.14.1) with ESMTP id m01DgSG0004088 for ; Tue, 1 Jan 2008 13:42:28 GMT (envelope-from hselasky@FreeBSD.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.1/8.14.1/Submit) id m01DgSED004083 for perforce@freebsd.org; Tue, 1 Jan 2008 13:42:28 GMT (envelope-from hselasky@FreeBSD.org) Date: Tue, 1 Jan 2008 13:42:28 GMT Message-Id: <200801011342.m01DgSED004083@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky To: Perforce Change Reviews Cc: Subject: PERFORCE change 132249 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 01 Jan 2008 13:42:29 -0000 http://perforce.freebsd.org/chv.cgi?CH=132249 Change 132249 by hselasky@hselasky_laptop001 on 2008/01/01 13:42:27 Style change by "usb_style.sh". Affected files ... .. //depot/projects/usb/src/sys/dev/usb/if_zydreg.h#12 edit Differences ... ==== //depot/projects/usb/src/sys/dev/usb/if_zydreg.h#12 (text+ko) ==== @@ -1153,7 +1153,7 @@ const uint16_t *idata; struct zyd_pair *odata; int len; - STAILQ_ENTRY(rq) rq; + STAILQ_ENTRY(rq) rq; }; struct zyd_softc { From owner-p4-projects@FreeBSD.ORG Tue Jan 1 19:08:25 2008 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 03B1916A474; Tue, 1 Jan 2008 19:08:25 +0000 (UTC) Delivered-To: perforce@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id A8C4D16A417; Tue, 1 Jan 2008 19:08:24 +0000 (UTC) (envelope-from imp@bsdimp.com) Received: from harmony.bsdimp.com (bsdimp.com [199.45.160.85]) by mx1.freebsd.org (Postfix) with ESMTP id 6B54F13C455; Tue, 1 Jan 2008 19:08:24 +0000 (UTC) (envelope-from imp@bsdimp.com) Received: from localhost (localhost [127.0.0.1]) by harmony.bsdimp.com (8.14.1/8.14.1) with ESMTP id m01J5rod036494; Tue, 1 Jan 2008 12:05:53 -0700 (MST) (envelope-from imp@bsdimp.com) Date: Tue, 01 Jan 2008 12:06:01 -0700 (MST) Message-Id: <20080101.120601.106977236.imp@bsdimp.com> To: jb@FreeBSD.org From: "M. Warner Losh" In-Reply-To: <200712310531.lBV5VvH3092205@repoman.freebsd.org> References: <200712310531.lBV5VvH3092205@repoman.freebsd.org> X-Mailer: Mew version 5.2 on Emacs 21.3 / Mule 5.0 (SAKAKI) Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit Cc: perforce@FreeBSD.org Subject: Re: PERFORCE change 132153 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 01 Jan 2008 19:08:25 -0000 In message: <200712310531.lBV5VvH3092205@repoman.freebsd.org> John Birrell writes: : http://perforce.freebsd.org/chv.cgi?CH=132153 : : Change 132153 by jb@jb_freebsd1 on 2007/12/31 05:31:02 : : amd64 doesn't seem to have a program header in the kernel modules : like i386 does. I don't know enough about amd64 to know if that's a : problem or not. I have a feeling I'm not far off learning that. :-P I believe that amd64 is the only one that doesn't... Warner : Affected files ... : : .. //depot/projects/dtrace/src/contrib/opensolaris/lib/libdtrace/common/dt_module.c#14 edit : : Differences ... : : ==== //depot/projects/dtrace/src/contrib/opensolaris/lib/libdtrace/common/dt_module.c#14 (text) ==== : : @@ -927,6 +927,7 @@ : #if defined(sun) : dmp->dm_modid = (int)OBJFS_MODID(st.st_ino); : #else : +#if defined(__i386__) : /* : * Find the first load section and figure out the relocation : * offset for the symbols. The kernel module will not need : @@ -939,6 +940,7 @@ : } : } : #endif : +#endif From owner-p4-projects@FreeBSD.ORG Tue Jan 1 19:49:46 2008 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id A1E6A16A46E; Tue, 1 Jan 2008 19:49:46 +0000 (UTC) Delivered-To: perforce@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 6747916A421 for ; Tue, 1 Jan 2008 19:49:46 +0000 (UTC) (envelope-from jb@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id 55E6013C4FA for ; Tue, 1 Jan 2008 19:49:46 +0000 (UTC) (envelope-from jb@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.1/8.14.1) with ESMTP id m01JnkVJ056150 for ; Tue, 1 Jan 2008 19:49:46 GMT (envelope-from jb@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.1/8.14.1/Submit) id m01Jnk7m056147 for perforce@freebsd.org; Tue, 1 Jan 2008 19:49:46 GMT (envelope-from jb@freebsd.org) Date: Tue, 1 Jan 2008 19:49:46 GMT Message-Id: <200801011949.m01Jnk7m056147@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to jb@freebsd.org using -f From: John Birrell To: Perforce Change Reviews Cc: Subject: PERFORCE change 132251 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 01 Jan 2008 19:49:47 -0000 http://perforce.freebsd.org/chv.cgi?CH=132251 Change 132251 by jb@jb_freebsd1 on 2008/01/01 19:49:03 Change the path to perl on FreeBSD. Make these files executable. Affected files ... .. //depot/projects/dtrace/src/contrib/opensolaris/cmd/dtrace/test/cmd/scripts/dstyle.pl#3 edit .. //depot/projects/dtrace/src/contrib/opensolaris/cmd/dtrace/test/cmd/scripts/dtest.pl#4 edit Differences ... ==== //depot/projects/dtrace/src/contrib/opensolaris/cmd/dtrace/test/cmd/scripts/dstyle.pl#3 (text+kox/text+ko) ==== @@ -1,4 +1,4 @@ -#!/usr/perl5/bin/perl +#!/usr/local/bin/perl # # CDDL HEADER START # ==== //depot/projects/dtrace/src/contrib/opensolaris/cmd/dtrace/test/cmd/scripts/dtest.pl#4 (text+kox/text+ko) ==== @@ -1,4 +1,4 @@ -#!/usr/perl5/bin/perl +#!/usr/local/bin/perl # # CDDL HEADER START # From owner-p4-projects@FreeBSD.ORG Tue Jan 1 20:05:03 2008 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 119F916A420; Tue, 1 Jan 2008 20:05:03 +0000 (UTC) Delivered-To: perforce@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id CB8F616A419 for ; Tue, 1 Jan 2008 20:05:02 +0000 (UTC) (envelope-from jb@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id BA15813C45D for ; Tue, 1 Jan 2008 20:05:02 +0000 (UTC) (envelope-from jb@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.1/8.14.1) with ESMTP id m01K52bI064235 for ; Tue, 1 Jan 2008 20:05:02 GMT (envelope-from jb@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.1/8.14.1/Submit) id m01K52xG064227 for perforce@freebsd.org; Tue, 1 Jan 2008 20:05:02 GMT (envelope-from jb@freebsd.org) Date: Tue, 1 Jan 2008 20:05:02 GMT Message-Id: <200801012005.m01K52xG064227@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to jb@freebsd.org using -f From: John Birrell To: Perforce Change Reviews Cc: Subject: PERFORCE change 132252 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 01 Jan 2008 20:05:03 -0000 http://perforce.freebsd.org/chv.cgi?CH=132252 Change 132252 by jb@jb_freebsd1 on 2008/01/01 20:04:59 Set the path to the perl test script in it's new location now that it is distributed as part of OpenSolaris. Affected files ... .. //depot/projects/dtrace/src/tools/test/dtrace/Makefile#2 edit Differences ... ==== //depot/projects/dtrace/src/tools/test/dtrace/Makefile#2 (text+ko) ==== @@ -1,6 +1,7 @@ # $FreeBSD$ TESTSRCDIR= ${.CURDIR}/../../../contrib/opensolaris/cmd/dtrace/test +DTEST= ${TESTSRCDIR}/cmd/scripts/dtest.pl # Tests that should work: @@ -1149,116 +1150,116 @@ all : test -test : ${TESTSRCDIR}/bin/dtest ${TESTFILES} - @${TESTSRCDIR}/bin/dtest ${TESTFILES} +test : ${DTEST} ${TESTFILES} + @${DTEST} ${TESTFILES} # -------------------------------------------------------------------------------- # Convenience build targets: -testaggs : ${TESTSRCDIR}/bin/dtest ${TESTAGGS} - @${TESTSRCDIR}/bin/dtest ${TESTAGGS} +testaggs : ${DTEST} ${TESTAGGS} + @${DTEST} ${TESTAGGS} -testarithmetic : ${TESTSRCDIR}/bin/dtest ${TESTARITHMETIC} - @${TESTSRCDIR}/bin/dtest ${TESTARITHMETIC} +testarithmetic : ${DTEST} ${TESTARITHMETIC} + @${DTEST} ${TESTARITHMETIC} -testarrays : ${TESTSRCDIR}/bin/dtest ${TESTARRAYS} - @${TESTSRCDIR}/bin/dtest ${TESTARRAYS} +testarrays : ${DTEST} ${TESTARRAYS} + @${DTEST} ${TESTARRAYS} -testassocs : ${TESTSRCDIR}/bin/dtest ${TESTASSOCS} - @${TESTSRCDIR}/bin/dtest ${TESTASSOCS} +testassocs : ${DTEST} ${TESTASSOCS} + @${DTEST} ${TESTASSOCS} -testbuiltinvar : ${TESTSRCDIR}/bin/dtest ${TESTBUILTINVAR} - @${TESTSRCDIR}/bin/dtest ${TESTBUILTINVAR} +testbuiltinvar : ${DTEST} ${TESTBUILTINVAR} + @${DTEST} ${TESTBUILTINVAR} -testfuncs : ${TESTSRCDIR}/bin/dtest ${TESTFUNCS} - @${TESTSRCDIR}/bin/dtest ${TESTFUNCS} +testfuncs : ${DTEST} ${TESTFUNCS} + @${DTEST} ${TESTFUNCS} -testgrammar : ${TESTSRCDIR}/bin/dtest ${TESTGRAMMAR} - @${TESTSRCDIR}/bin/dtest ${TESTGRAMMAR} +testgrammar : ${DTEST} ${TESTGRAMMAR} + @${DTEST} ${TESTGRAMMAR} -testinline : ${TESTSRCDIR}/bin/dtest ${TESTINLINE} - @${TESTSRCDIR}/bin/dtest ${TESTINLINE} +testinline : ${DTEST} ${TESTINLINE} + @${DTEST} ${TESTINLINE} -testmultiaggs : ${TESTSRCDIR}/bin/dtest ${TESTMULTIAGGS} - @${TESTSRCDIR}/bin/dtest ${TESTMULTIAGGS} +testmultiaggs : ${DTEST} ${TESTMULTIAGGS} + @${DTEST} ${TESTMULTIAGGS} -testlexer : ${TESTSRCDIR}/bin/dtest ${TESTLEXER} - @${TESTSRCDIR}/bin/dtest ${TESTLEXER} +testlexer : ${DTEST} ${TESTLEXER} + @${DTEST} ${TESTLEXER} -testoffsetof : ${TESTSRCDIR}/bin/dtest ${TESTOFFSETOF} - @${TESTSRCDIR}/bin/dtest ${TESTOFFSETOF} +testoffsetof : ${DTEST} ${TESTOFFSETOF} + @${DTEST} ${TESTOFFSETOF} -testoperators : ${TESTSRCDIR}/bin/dtest ${TESTOPERATORS} - @${TESTSRCDIR}/bin/dtest ${TESTOPERATORS} +testoperators : ${DTEST} ${TESTOPERATORS} + @${DTEST} ${TESTOPERATORS} -testpointers : ${TESTSRCDIR}/bin/dtest ${TESTPOINTERS} - @${TESTSRCDIR}/bin/dtest ${TESTPOINTERS} +testpointers : ${DTEST} ${TESTPOINTERS} + @${DTEST} ${TESTPOINTERS} -testpragma : ${TESTSRCDIR}/bin/dtest ${TESTPRAGMA} - @${TESTSRCDIR}/bin/dtest ${TESTPRAGMA} +testpragma : ${DTEST} ${TESTPRAGMA} + @${DTEST} ${TESTPRAGMA} -testpredicates : ${TESTSRCDIR}/bin/dtest ${TESTPREDICATES} - @${TESTSRCDIR}/bin/dtest ${TESTPREDICATES} +testpredicates : ${DTEST} ${TESTPREDICATES} + @${DTEST} ${TESTPREDICATES} -testpreprocessor: ${TESTSRCDIR}/bin/dtest ${TESTPREPROCESSOR} - @${TESTSRCDIR}/bin/dtest ${TESTPREPROCESSOR} +testpreprocessor: ${DTEST} ${TESTPREPROCESSOR} + @${DTEST} ${TESTPREPROCESSOR} -testprinta : ${TESTSRCDIR}/bin/dtest ${TESTPRINTA} - @${TESTSRCDIR}/bin/dtest ${TESTPRINTA} +testprinta : ${DTEST} ${TESTPRINTA} + @${DTEST} ${TESTPRINTA} -testprintf : ${TESTSRCDIR}/bin/dtest ${TESTPRINTF} - @${TESTSRCDIR}/bin/dtest ${TESTPRINTF} +testprintf : ${DTEST} ${TESTPRINTF} + @${DTEST} ${TESTPRINTF} -testprobes : ${TESTSRCDIR}/bin/dtest ${TESTPROBES} - @${TESTSRCDIR}/bin/dtest ${TESTPROBES} +testprobes : ${DTEST} ${TESTPROBES} + @${DTEST} ${TESTPROBES} -testproviders : ${TESTSRCDIR}/bin/dtest ${TESTPROVIDERS} - @${TESTSRCDIR}/bin/dtest ${TESTPROVIDERS} +testproviders : ${DTEST} ${TESTPROVIDERS} + @${DTEST} ${TESTPROVIDERS} -testsafety : ${TESTSRCDIR}/bin/dtest ${TESTSAFETY} - @${TESTSRCDIR}/bin/dtest ${TESTSAFETY} +testsafety : ${DTEST} ${TESTSAFETY} + @${DTEST} ${TESTSAFETY} -testscalars : ${TESTSRCDIR}/bin/dtest ${TESTSCALARS} - @${TESTSRCDIR}/bin/dtest ${TESTSCALARS} +testscalars : ${DTEST} ${TESTSCALARS} + @${DTEST} ${TESTSCALARS} -testsizeof : ${TESTSRCDIR}/bin/dtest ${TESTSIZEOF} - @${TESTSRCDIR}/bin/dtest ${TESTSIZEOF} +testsizeof : ${DTEST} ${TESTSIZEOF} + @${DTEST} ${TESTSIZEOF} -testspeculation : ${TESTSRCDIR}/bin/dtest ${TESTSPECULATION} - @${TESTSRCDIR}/bin/dtest ${TESTSPECULATION} +testspeculation : ${DTEST} ${TESTSPECULATION} + @${DTEST} ${TESTSPECULATION} -teststability : ${TESTSRCDIR}/bin/dtest ${TESTSTABILITY} - @${TESTSRCDIR}/bin/dtest ${TESTSTABILITY} +teststability : ${DTEST} ${TESTSTABILITY} + @${DTEST} ${TESTSTABILITY} -teststrlen : ${TESTSRCDIR}/bin/dtest ${TESTSTRLEN} - @${TESTSRCDIR}/bin/dtest ${TESTSTRLEN} +teststrlen : ${DTEST} ${TESTSTRLEN} + @${DTEST} ${TESTSTRLEN} -teststruct : ${TESTSRCDIR}/bin/dtest ${TESTSTRUCT} - @${TESTSRCDIR}/bin/dtest ${TESTSTRUCT} +teststruct : ${DTEST} ${TESTSTRUCT} + @${DTEST} ${TESTSTRUCT} -testtrace : ${TESTSRCDIR}/bin/dtest ${TESTTRACE} - @${TESTSRCDIR}/bin/dtest ${TESTTRACE} +testtrace : ${DTEST} ${TESTTRACE} + @${DTEST} ${TESTTRACE} -testtracemem : ${TESTSRCDIR}/bin/dtest ${TESTTRACEMEM} - @${TESTSRCDIR}/bin/dtest ${TESTTRACEMEM} +testtracemem : ${DTEST} ${TESTTRACEMEM} + @${DTEST} ${TESTTRACEMEM} -testtranslators : ${TESTSRCDIR}/bin/dtest ${TESTTRANSLATORS} - @${TESTSRCDIR}/bin/dtest ${TESTTRANSLATORS} +testtranslators : ${DTEST} ${TESTTRANSLATORS} + @${DTEST} ${TESTTRANSLATORS} -testtypedef : ${TESTSRCDIR}/bin/dtest ${TESTTYPEDEF} - @${TESTSRCDIR}/bin/dtest ${TESTTYPEDEF} +testtypedef : ${DTEST} ${TESTTYPEDEF} + @${DTEST} ${TESTTYPEDEF} -testtypes : ${TESTSRCDIR}/bin/dtest ${TESTTYPES} - @${TESTSRCDIR}/bin/dtest ${TESTTYPES} +testtypes : ${DTEST} ${TESTTYPES} + @${DTEST} ${TESTTYPES} -testunion : ${TESTSRCDIR}/bin/dtest ${TESTUNION} - @${TESTSRCDIR}/bin/dtest ${TESTUNION} +testunion : ${DTEST} ${TESTUNION} + @${DTEST} ${TESTUNION} -testvars : ${TESTSRCDIR}/bin/dtest ${TESTVARS} - @${TESTSRCDIR}/bin/dtest ${TESTVARS} +testvars : ${DTEST} ${TESTVARS} + @${DTEST} ${TESTVARS} -testversion : ${TESTSRCDIR}/bin/dtest ${TESTVERSION} - @${TESTSRCDIR}/bin/dtest ${TESTVERSION} +testversion : ${DTEST} ${TESTVERSION} + @${DTEST} ${TESTVERSION} # -------------------------------------------------------------------------------- # Tests that currently fail (but don't make the system go kaboom): @@ -1314,8 +1315,8 @@ ${TESTSRCDIR}/tst/common/speculation/err.D_ACT_SPEC.SpeculateWithStop.d \ ${TESTSRCDIR}/tst/common/tracemem/err.D_TRACEMEM_ADDR.badaddr.d \ -notwork : ${TESTSRCDIR}/bin/dtest ${NOTWORK} - @${TESTSRCDIR}/bin/dtest ${NOTWORK} +notwork : ${DTEST} ${NOTWORK} + @${DTEST} ${NOTWORK} REQUIRES_LIBPROC= \ ${TESTSRCDIR}/tst/common/vars/tst.ucaller.ksh \ @@ -1381,15 +1382,15 @@ ${TESTSRCDIR}/tst/common/inline/tst.InlineKinds.d \ ${TESTSRCDIR}/tst/common/printa/tst.stack.d \ -testhang : ${TESTSRCDIR}/bin/dtest ${TESTHANG} - @${TESTSRCDIR}/bin/dtest ${TESTHANG} +testhang : ${DTEST} ${TESTHANG} + @${DTEST} ${TESTHANG} # -------------------------------------------------------------------------------- # Tests currently trying to fix... TESTTRY= \ -testtry : ${TESTSRCDIR}/bin/dtest ${TESTTRY} - @${TESTSRCDIR}/bin/dtest ${TESTTRY} +testtry : ${DTEST} ${TESTTRY} + @${DTEST} ${TESTTRY} .include From owner-p4-projects@FreeBSD.ORG Tue Jan 1 20:30:29 2008 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 5BA6816A41A; Tue, 1 Jan 2008 20:30:29 +0000 (UTC) Delivered-To: perforce@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 2153816A419 for ; Tue, 1 Jan 2008 20:30:29 +0000 (UTC) (envelope-from jb@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id 0FB7213C44B for ; Tue, 1 Jan 2008 20:30:29 +0000 (UTC) (envelope-from jb@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.1/8.14.1) with ESMTP id m01KUSPt072300 for ; Tue, 1 Jan 2008 20:30:28 GMT (envelope-from jb@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.1/8.14.1/Submit) id m01KUS90072297 for perforce@freebsd.org; Tue, 1 Jan 2008 20:30:28 GMT (envelope-from jb@freebsd.org) Date: Tue, 1 Jan 2008 20:30:28 GMT Message-Id: <200801012030.m01KUS90072297@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to jb@freebsd.org using -f From: John Birrell To: Perforce Change Reviews Cc: Subject: PERFORCE change 132253 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 01 Jan 2008 20:30:29 -0000 http://perforce.freebsd.org/chv.cgi?CH=132253 Change 132253 by jb@jb_freebsd1 on 2008/01/01 20:29:35 Get a list of failure directories so that 'make clean' works. Insist on using an object directory. Affected files ... .. //depot/projects/dtrace/src/tools/test/dtrace/Makefile#3 edit Differences ... ==== //depot/projects/dtrace/src/tools/test/dtrace/Makefile#3 (text+ko) ==== @@ -1393,4 +1393,20 @@ testtry : ${DTEST} ${TESTTRY} @${DTEST} ${TESTTRY} +# -------------------------------------------------------------------------------- +# Test failures are written to failure.N directories in the object tree. +# Get a list of directories in the object tree for 'make clean'. + +.if ${.OBJDIR} != ${.CURDIR} && !empty(${.OBJDIR}) +CLEANDIRS!= cd ${.OBJDIR} && ls -d * +.endif + +# -------------------------------------------------------------------------------- +# Insist on using an object directory. Things get messy otherwsie. + +.if ${.OBJDIR} == ${.CURDIR} && !make(obj) && !make(clean) && !make(cleandir) +.error ERROR: You must run 'make obj' first! +.endif + .include + From owner-p4-projects@FreeBSD.ORG Tue Jan 1 21:41:45 2008 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 80F8116A419; Tue, 1 Jan 2008 21:41:45 +0000 (UTC) Delivered-To: perforce@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id B9AC716A5CD for ; Tue, 1 Jan 2008 21:41:44 +0000 (UTC) (envelope-from jb@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id A844413C45B for ; Tue, 1 Jan 2008 21:41:44 +0000 (UTC) (envelope-from jb@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.1/8.14.1) with ESMTP id m01LfiLr024305 for ; Tue, 1 Jan 2008 21:41:44 GMT (envelope-from jb@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.1/8.14.1/Submit) id m01Lfini024302 for perforce@freebsd.org; Tue, 1 Jan 2008 21:41:44 GMT (envelope-from jb@freebsd.org) Date: Tue, 1 Jan 2008 21:41:44 GMT Message-Id: <200801012141.m01Lfini024302@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to jb@freebsd.org using -f From: John Birrell To: Perforce Change Reviews Cc: Subject: PERFORCE change 132256 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 01 Jan 2008 21:41:45 -0000 http://perforce.freebsd.org/chv.cgi?CH=132256 Change 132256 by jb@jb_freebsd1 on 2008/01/01 21:40:56 Use the new rendezvous function to execute the specified function on just the required CPU. Affected files ... .. //depot/projects/dtrace/src/sys/cddl/amd64/cyclic_machdep.c#6 edit Differences ... ==== //depot/projects/dtrace/src/sys/cddl/amd64/cyclic_machdep.c#6 (text+ko) ==== @@ -198,7 +198,8 @@ if (c == &solaris_cpu[curcpu]) (*func)(param); else - printf("%s:%s(%d): Need to have a way to execute the function on another CPU\n",__FUNCTION__,__FILE__,__LINE__); + smp_rendezvous_cpus((cpumask_t) (1 << c->cpuid), NULL, + func, NULL, param); } static void suspend(cyb_arg_t arg) From owner-p4-projects@FreeBSD.ORG Tue Jan 1 22:20:25 2008 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 294F716A50A; Tue, 1 Jan 2008 22:20:25 +0000 (UTC) Delivered-To: perforce@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id E269216A507 for ; Tue, 1 Jan 2008 22:20:24 +0000 (UTC) (envelope-from jb@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id D05C213C465 for ; Tue, 1 Jan 2008 22:20:24 +0000 (UTC) (envelope-from jb@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.1/8.14.1) with ESMTP id m01MKOxQ042707 for ; Tue, 1 Jan 2008 22:20:24 GMT (envelope-from jb@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.1/8.14.1/Submit) id m01MKOU5042704 for perforce@freebsd.org; Tue, 1 Jan 2008 22:20:24 GMT (envelope-from jb@freebsd.org) Date: Tue, 1 Jan 2008 22:20:24 GMT Message-Id: <200801012220.m01MKOU5042704@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to jb@freebsd.org using -f From: John Birrell To: Perforce Change Reviews Cc: Subject: PERFORCE change 132258 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 01 Jan 2008 22:20:25 -0000 http://perforce.freebsd.org/chv.cgi?CH=132258 Change 132258 by jb@jb_freebsd1 on 2008/01/01 22:19:46 Update the prototype provider: - Add a SYSUNINIT. - Move code out of modevent to load/unload. - Add a dependency on the opensolaris module. Note that the prototype provider does no more than register itself as a provider. It's just a template for writing a new DTrace provider for FreeBSD to give a starting set of functions and include files in the absense of a DTrace provider writer's guide. Affected files ... .. //depot/projects/dtrace/src/sys/cddl/dev/prototype.c#5 edit Differences ... ==== //depot/projects/dtrace/src/sys/cddl/dev/prototype.c#5 (text+ko) ==== @@ -18,7 +18,7 @@ * * CDDL HEADER END * - * Portions Copyright 2006 John Birrell jb@freebsd.org + * Portions Copyright 2006-2008 John Birrell jb@freebsd.org * * $FreeBSD$ * @@ -32,7 +32,6 @@ #include #include #include -#include #include #include #include @@ -59,7 +58,7 @@ #include #include -#include +#include #include static d_open_t prototype_open; @@ -129,6 +128,10 @@ static void prototype_load(void *dummy) { + /* Create the /dev/dtrace/prototype entry. */ + prototype_cdev = make_dev(&prototype_cdevsw, 0, UID_ROOT, GID_WHEEL, 0600, + "dtrace/prototype"); + if (dtrace_register("prototype", &prototype_attr, DTRACE_PRIV_USER, NULL, &prototype_pops, NULL, &prototype_id) != 0) return; @@ -156,13 +159,9 @@ switch (type) { case MOD_LOAD: - /* Create the /dev/dtrace/prototype entry. */ - prototype_cdev = make_dev(&prototype_cdevsw, 0, UID_ROOT, GID_WHEEL, 0600, - "dtrace/prototype"); break; case MOD_UNLOAD: - error = prototype_unload(); break; case MOD_SHUTDOWN: @@ -184,8 +183,10 @@ return (0); } -SYSINIT(prototype_load, SI_SUB_DTRACE_PROVIDER, SI_ORDER_ANY, prototype_load, NULL) +SYSINIT(prototype_load, SI_SUB_DTRACE_PROVIDER, SI_ORDER_ANY, prototype_load, NULL); +SYSUNINIT(prototype_load, SI_SUB_DTRACE_PROVIDER, SI_ORDER_ANY, prototype_unload, NULL); DEV_MODULE(prototype, prototype_modevent, NULL); MODULE_VERSION(prototype, 1); MODULE_DEPEND(prototype, dtrace, 1, 1, 1); +MODULE_DEPEND(prototype, opensolaris, 1, 1, 1); From owner-p4-projects@FreeBSD.ORG Tue Jan 1 22:22:27 2008 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 944FB16A421; Tue, 1 Jan 2008 22:22:27 +0000 (UTC) Delivered-To: perforce@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 5A08616A417 for ; Tue, 1 Jan 2008 22:22:27 +0000 (UTC) (envelope-from jb@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id 4899113C46B for ; Tue, 1 Jan 2008 22:22:27 +0000 (UTC) (envelope-from jb@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.1/8.14.1) with ESMTP id m01MMR65044280 for ; Tue, 1 Jan 2008 22:22:27 GMT (envelope-from jb@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.1/8.14.1/Submit) id m01MMR4F044277 for perforce@freebsd.org; Tue, 1 Jan 2008 22:22:27 GMT (envelope-from jb@freebsd.org) Date: Tue, 1 Jan 2008 22:22:27 GMT Message-Id: <200801012222.m01MMR4F044277@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to jb@freebsd.org using -f From: John Birrell To: Perforce Change Reviews Cc: Subject: PERFORCE change 132260 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 01 Jan 2008 22:22:27 -0000 http://perforce.freebsd.org/chv.cgi?CH=132260 Change 132260 by jb@jb_freebsd1 on 2008/01/01 22:21:36 Name the SYSUNINIT appropriately. Affected files ... .. //depot/projects/dtrace/src/sys/cddl/dev/prototype.c#6 edit Differences ... ==== //depot/projects/dtrace/src/sys/cddl/dev/prototype.c#6 (text+ko) ==== @@ -184,7 +184,7 @@ } SYSINIT(prototype_load, SI_SUB_DTRACE_PROVIDER, SI_ORDER_ANY, prototype_load, NULL); -SYSUNINIT(prototype_load, SI_SUB_DTRACE_PROVIDER, SI_ORDER_ANY, prototype_unload, NULL); +SYSUNINIT(prototype_unload, SI_SUB_DTRACE_PROVIDER, SI_ORDER_ANY, prototype_unload, NULL); DEV_MODULE(prototype, prototype_modevent, NULL); MODULE_VERSION(prototype, 1); From owner-p4-projects@FreeBSD.ORG Tue Jan 1 22:26:32 2008 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 356D216A41A; Tue, 1 Jan 2008 22:26:32 +0000 (UTC) Delivered-To: perforce@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id EF46C16A418 for ; Tue, 1 Jan 2008 22:26:31 +0000 (UTC) (envelope-from jb@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id C59BD13C44B for ; Tue, 1 Jan 2008 22:26:31 +0000 (UTC) (envelope-from jb@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.1/8.14.1) with ESMTP id m01MQVIN047596 for ; Tue, 1 Jan 2008 22:26:31 GMT (envelope-from jb@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.1/8.14.1/Submit) id m01MQVd4047590 for perforce@freebsd.org; Tue, 1 Jan 2008 22:26:31 GMT (envelope-from jb@freebsd.org) Date: Tue, 1 Jan 2008 22:26:31 GMT Message-Id: <200801012226.m01MQVd4047590@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to jb@freebsd.org using -f From: John Birrell To: Perforce Change Reviews Cc: Subject: PERFORCE change 132261 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 01 Jan 2008 22:26:32 -0000 http://perforce.freebsd.org/chv.cgi?CH=132261 Change 132261 by jb@jb_freebsd1 on 2008/01/01 22:25:49 Hook the profile, prototype and systrace providers back into the build. Affected files ... .. //depot/projects/dtrace/src/sys/modules/dtrace/Makefile#19 edit Differences ... ==== //depot/projects/dtrace/src/sys/modules/dtrace/Makefile#19 (text+ko) ==== @@ -3,14 +3,13 @@ .include .include "Makefile.inc" -SUBDIR= dtrace - -XXX= profile \ +SUBDIR= dtrace \ + profile \ + prototype \ systrace .if ${MACHINE_ARCH} == "i386" SUBDIR+= fbt \ - prototype \ sdt .endif From owner-p4-projects@FreeBSD.ORG Tue Jan 1 22:27:33 2008 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 5132C16A41A; Tue, 1 Jan 2008 22:27:33 +0000 (UTC) Delivered-To: perforce@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 1719816A418 for ; Tue, 1 Jan 2008 22:27:33 +0000 (UTC) (envelope-from jb@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id 058C213C442 for ; Tue, 1 Jan 2008 22:27:33 +0000 (UTC) (envelope-from jb@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.1/8.14.1) with ESMTP id m01MRWXD050418 for ; Tue, 1 Jan 2008 22:27:32 GMT (envelope-from jb@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.1/8.14.1/Submit) id m01MRWAS050415 for perforce@freebsd.org; Tue, 1 Jan 2008 22:27:32 GMT (envelope-from jb@freebsd.org) Date: Tue, 1 Jan 2008 22:27:32 GMT Message-Id: <200801012227.m01MRWAS050415@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to jb@freebsd.org using -f From: John Birrell To: Perforce Change Reviews Cc: Subject: PERFORCE change 132262 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 01 Jan 2008 22:27:33 -0000 http://perforce.freebsd.org/chv.cgi?CH=132262 Change 132262 by jb@jb_freebsd1 on 2008/01/01 22:26:45 Simplfy the systrace provider makefile. Affected files ... .. //depot/projects/dtrace/src/sys/modules/dtrace/systrace/Makefile#3 edit Differences ... ==== //depot/projects/dtrace/src/sys/modules/dtrace/systrace/Makefile#3 (text+ko) ==== @@ -4,12 +4,10 @@ KMOD= systrace SRCS= systrace.c -SRCS+= bus_if.h device_if.h vnode_if.h +SRCS+= vnode_if.h -CFLAGS+= -I${.CURDIR}/../../../cddl/dev/systrace \ +CFLAGS+= -I${.CURDIR}/../../../compat/opensolaris \ -I${.CURDIR}/../../../contrib/opensolaris/uts/common \ - -I${.CURDIR}/../../../contrib/opensolaris/compat \ - -I${.CURDIR}/../../../contrib \ -I${.CURDIR}/../../.. .include From owner-p4-projects@FreeBSD.ORG Tue Jan 1 22:28:35 2008 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id D4BED16A46E; Tue, 1 Jan 2008 22:28:34 +0000 (UTC) Delivered-To: perforce@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 9A69916A418 for ; Tue, 1 Jan 2008 22:28:34 +0000 (UTC) (envelope-from jb@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id 8766213C44B for ; Tue, 1 Jan 2008 22:28:34 +0000 (UTC) (envelope-from jb@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.1/8.14.1) with ESMTP id m01MSYUj050547 for ; Tue, 1 Jan 2008 22:28:34 GMT (envelope-from jb@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.1/8.14.1/Submit) id m01MSY1e050544 for perforce@freebsd.org; Tue, 1 Jan 2008 22:28:34 GMT (envelope-from jb@freebsd.org) Date: Tue, 1 Jan 2008 22:28:34 GMT Message-Id: <200801012228.m01MSY1e050544@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to jb@freebsd.org using -f From: John Birrell To: Perforce Change Reviews Cc: Subject: PERFORCE change 132263 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 01 Jan 2008 22:28:35 -0000 http://perforce.freebsd.org/chv.cgi?CH=132263 Change 132263 by jb@jb_freebsd1 on 2008/01/01 22:27:41 Simplfy the prototype provider makefile. Affected files ... .. //depot/projects/dtrace/src/sys/modules/dtrace/prototype/Makefile#3 edit Differences ... ==== //depot/projects/dtrace/src/sys/modules/dtrace/prototype/Makefile#3 (text+ko) ==== @@ -4,11 +4,10 @@ KMOD= prototype SRCS= prototype.c -SRCS+= bus_if.h device_if.h vnode_if.h +SRCS+= vnode_if.h -CFLAGS+= -I${.CURDIR}/../../../contrib/opensolaris/uts/common \ - -I${.CURDIR}/../../../contrib/opensolaris/compat \ - -I${.CURDIR}/../../../contrib \ +CFLAGS+= -I${.CURDIR}/../../../compat/opensolaris \ + -I${.CURDIR}/../../../contrib/opensolaris/uts/common \ -I${.CURDIR}/../../.. .include From owner-p4-projects@FreeBSD.ORG Tue Jan 1 22:33:40 2008 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 3E7C416A469; Tue, 1 Jan 2008 22:33:40 +0000 (UTC) Delivered-To: perforce@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 0397F16A418 for ; Tue, 1 Jan 2008 22:33:40 +0000 (UTC) (envelope-from jb@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id E667013C467 for ; Tue, 1 Jan 2008 22:33:39 +0000 (UTC) (envelope-from jb@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.1/8.14.1) with ESMTP id m01MXdNE053031 for ; Tue, 1 Jan 2008 22:33:39 GMT (envelope-from jb@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.1/8.14.1/Submit) id m01MXdVf053028 for perforce@freebsd.org; Tue, 1 Jan 2008 22:33:39 GMT (envelope-from jb@freebsd.org) Date: Tue, 1 Jan 2008 22:33:39 GMT Message-Id: <200801012233.m01MXdVf053028@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to jb@freebsd.org using -f From: John Birrell To: Perforce Change Reviews Cc: Subject: PERFORCE change 132264 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 01 Jan 2008 22:33:40 -0000 http://perforce.freebsd.org/chv.cgi?CH=132264 Change 132264 by jb@jb_freebsd1 on 2008/01/01 22:32:49 Simplify the profile provider makefile. Affected files ... .. //depot/projects/dtrace/src/sys/modules/dtrace/profile/Makefile#5 edit Differences ... ==== //depot/projects/dtrace/src/sys/modules/dtrace/profile/Makefile#5 (text+ko) ==== @@ -4,12 +4,10 @@ KMOD= profile SRCS= profile.c -SRCS+= bus_if.h device_if.h vnode_if.h +SRCS+= vnode_if.h -CFLAGS+= -I${.CURDIR}/../../../cddl/dev/profile \ +CFLAGS+= -I${.CURDIR}/../../../compat/opensolaris \ -I${.CURDIR}/../../../contrib/opensolaris/uts/common \ - -I${.CURDIR}/../../../contrib/opensolaris/compat \ - -I${.CURDIR}/../../../contrib \ -I${.CURDIR}/../../.. .include From owner-p4-projects@FreeBSD.ORG Tue Jan 1 22:35:42 2008 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 8D88016A421; Tue, 1 Jan 2008 22:35:42 +0000 (UTC) Delivered-To: perforce@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 519E616A418 for ; Tue, 1 Jan 2008 22:35:42 +0000 (UTC) (envelope-from jb@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id 276B713C43E for ; Tue, 1 Jan 2008 22:35:42 +0000 (UTC) (envelope-from jb@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.1/8.14.1) with ESMTP id m01MZgOX055116 for ; Tue, 1 Jan 2008 22:35:42 GMT (envelope-from jb@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.1/8.14.1/Submit) id m01MZg9b055113 for perforce@freebsd.org; Tue, 1 Jan 2008 22:35:42 GMT (envelope-from jb@freebsd.org) Date: Tue, 1 Jan 2008 22:35:42 GMT Message-Id: <200801012235.m01MZg9b055113@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to jb@freebsd.org using -f From: John Birrell To: Perforce Change Reviews Cc: Subject: PERFORCE change 132265 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 01 Jan 2008 22:35:42 -0000 http://perforce.freebsd.org/chv.cgi?CH=132265 Change 132265 by jb@jb_freebsd1 on 2008/01/01 22:34:48 Revise the profile provider: - Add a SYSUNINIT. - Move code from modevent to load/unload. - Remove memory type M_PROFILE as it isn't used. - Add a dependency on the opensolaris module. Affected files ... .. //depot/projects/dtrace/src/sys/cddl/dev/profile/profile.c#3 edit Differences ... ==== //depot/projects/dtrace/src/sys/cddl/dev/profile/profile.c#3 (text+ko) ==== @@ -18,7 +18,7 @@ * * CDDL HEADER END * - * Portions Copyright 2006 John Birrell jb@freebsd.org + * Portions Copyright 2006-2008 John Birrell jb@freebsd.org * * $FreeBSD$ * @@ -32,7 +32,6 @@ #include #include #include -#include #include #include #include @@ -55,12 +54,9 @@ #include #include -#include -#include - -MALLOC_DECLARE(M_PROFILE); -MALLOC_DEFINE(M_PROFILE, "profile", "Dynamic Interrupt Tracing"); -#define M_KMEM M_PROFILE +#include +#include +#include #define PROF_NAMELEN 15 @@ -479,6 +475,10 @@ static void profile_load(void *dummy) { + /* Create the /dev/dtrace/profile entry. */ + profile_cdev = make_dev(&profile_cdevsw, 0, UID_ROOT, GID_WHEEL, 0600, + "dtrace/profile"); + if (dtrace_register("profile", &profile_attr, DTRACE_PRIV_USER, NULL, &profile_pops, NULL, &profile_id) != 0) return; @@ -506,13 +506,9 @@ switch (type) { case MOD_LOAD: - /* Create the /dev/dtrace/profile entry. */ - profile_cdev = make_dev(&profile_cdevsw, 0, UID_ROOT, GID_WHEEL, 0600, - "dtrace/profile"); break; case MOD_UNLOAD: - error = profile_unload(); break; case MOD_SHUTDOWN: @@ -533,9 +529,11 @@ return (0); } -SYSINIT(profile_load, SI_SUB_DTRACE_PROVIDER, SI_ORDER_ANY, profile_load, NULL) +SYSINIT(profile_load, SI_SUB_DTRACE_PROVIDER, SI_ORDER_ANY, profile_load, NULL); +SYSUNINIT(profile_unload, SI_SUB_DTRACE_PROVIDER, SI_ORDER_ANY, profile_unload, NULL); DEV_MODULE(profile, profile_modevent, NULL); MODULE_VERSION(profile, 1); MODULE_DEPEND(profile, dtrace, 1, 1, 1); MODULE_DEPEND(profile, cyclic, 1, 1, 1); +MODULE_DEPEND(profile, opensolaris, 1, 1, 1); From owner-p4-projects@FreeBSD.ORG Tue Jan 1 22:50:59 2008 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 75BB516A418; Tue, 1 Jan 2008 22:50:59 +0000 (UTC) Delivered-To: perforce@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 3B1C416A41B for ; Tue, 1 Jan 2008 22:50:59 +0000 (UTC) (envelope-from jb@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id 29C9E13C468 for ; Tue, 1 Jan 2008 22:50:59 +0000 (UTC) (envelope-from jb@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.1/8.14.1) with ESMTP id m01MoxBr060153 for ; Tue, 1 Jan 2008 22:50:59 GMT (envelope-from jb@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.1/8.14.1/Submit) id m01MowSG060142 for perforce@freebsd.org; Tue, 1 Jan 2008 22:50:58 GMT (envelope-from jb@freebsd.org) Date: Tue, 1 Jan 2008 22:50:58 GMT Message-Id: <200801012250.m01MowSG060142@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to jb@freebsd.org using -f From: John Birrell To: Perforce Change Reviews Cc: Subject: PERFORCE change 132267 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 01 Jan 2008 22:50:59 -0000 http://perforce.freebsd.org/chv.cgi?CH=132267 Change 132267 by jb@jb_freebsd1 on 2008/01/01 22:50:45 Add a simple module which depends on all known DTrace modules. This is an easy way to get them all loaded. I'll make the boot loader use this rather than having to know the modules by name. Affected files ... .. //depot/projects/dtrace/src/sys/modules/dtrace/Makefile#20 edit .. //depot/projects/dtrace/src/sys/modules/dtrace/dtraceall/Makefile#1 add .. //depot/projects/dtrace/src/sys/modules/dtrace/dtraceall/dtraceall.c#1 add Differences ... ==== //depot/projects/dtrace/src/sys/modules/dtrace/Makefile#20 (text+ko) ==== @@ -4,6 +4,7 @@ .include "Makefile.inc" SUBDIR= dtrace \ + dtraceall \ profile \ prototype \ systrace From owner-p4-projects@FreeBSD.ORG Tue Jan 1 22:53:02 2008 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id B413616A41B; Tue, 1 Jan 2008 22:53:01 +0000 (UTC) Delivered-To: perforce@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 79FB716A417 for ; Tue, 1 Jan 2008 22:53:01 +0000 (UTC) (envelope-from jb@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id 68CEF13C4D9 for ; Tue, 1 Jan 2008 22:53:01 +0000 (UTC) (envelope-from jb@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.1/8.14.1) with ESMTP id m01Mr12W061007 for ; Tue, 1 Jan 2008 22:53:01 GMT (envelope-from jb@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.1/8.14.1/Submit) id m01Mr1El061003 for perforce@freebsd.org; Tue, 1 Jan 2008 22:53:01 GMT (envelope-from jb@freebsd.org) Date: Tue, 1 Jan 2008 22:53:01 GMT Message-Id: <200801012253.m01Mr1El061003@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to jb@freebsd.org using -f From: John Birrell To: Perforce Change Reviews Cc: Subject: PERFORCE change 132268 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 01 Jan 2008 22:53:02 -0000 http://perforce.freebsd.org/chv.cgi?CH=132268 Change 132268 by jb@jb_freebsd1 on 2008/01/01 22:52:36 Revise the systrace provider: - Add a SYSUNINIT - Move code from modevent to load/unload - Add a dependency on the opensolaris module. Affected files ... .. //depot/projects/dtrace/src/sys/cddl/dev/systrace/systrace.c#7 edit Differences ... ==== //depot/projects/dtrace/src/sys/cddl/dev/systrace/systrace.c#7 (text+ko) ==== @@ -18,7 +18,7 @@ * * CDDL HEADER END * - * Portions Copyright 2006 John Birrell jb@freebsd.org + * Portions Copyright 2006-2008 John Birrell jb@freebsd.org * * $FreeBSD$ * @@ -32,7 +32,6 @@ #include #include #include -#include #include #include #include @@ -58,7 +57,7 @@ #include #include -#include +#include #define SYSTRACE_ARTIFICIAL_FRAMES 1 @@ -232,6 +231,10 @@ static void systrace_load(void *dummy) { + /* Create the /dev/dtrace/systrace entry. */ + systrace_cdev = make_dev(&systrace_cdevsw, 0, UID_ROOT, GID_WHEEL, 0600, + "dtrace/systrace"); + if (dtrace_register("syscall", &systrace_attr, DTRACE_PRIV_USER, NULL, &systrace_pops, NULL, &systrace_id) != 0) return; @@ -263,13 +266,9 @@ switch (type) { case MOD_LOAD: - /* Create the /dev/dtrace/systrace entry. */ - systrace_cdev = make_dev(&systrace_cdevsw, 0, UID_ROOT, GID_WHEEL, 0600, - "dtrace/systrace"); break; case MOD_UNLOAD: - error = systrace_unload(); break; case MOD_SHUTDOWN: @@ -290,8 +289,10 @@ return (0); } -SYSINIT(systrace_load, SI_SUB_DTRACE_PROVIDER, SI_ORDER_ANY, systrace_load, NULL) +SYSINIT(systrace_load, SI_SUB_DTRACE_PROVIDER, SI_ORDER_ANY, systrace_load, NULL); +SYSUNINIT(systrace_unload, SI_SUB_DTRACE_PROVIDER, SI_ORDER_ANY, systrace_unload, NULL); DEV_MODULE(systrace, systrace_modevent, NULL); MODULE_VERSION(systrace, 1); MODULE_DEPEND(systrace, dtrace, 1, 1, 1); +MODULE_DEPEND(systrace, opensolaris, 1, 1, 1); From owner-p4-projects@FreeBSD.ORG Tue Jan 1 22:54:03 2008 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id E51C516A420; Tue, 1 Jan 2008 22:54:02 +0000 (UTC) Delivered-To: perforce@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id AAA5B16A418 for ; Tue, 1 Jan 2008 22:54:02 +0000 (UTC) (envelope-from jb@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id 9970313C455 for ; Tue, 1 Jan 2008 22:54:02 +0000 (UTC) (envelope-from jb@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.1/8.14.1) with ESMTP id m01Ms2KO062082 for ; Tue, 1 Jan 2008 22:54:02 GMT (envelope-from jb@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.1/8.14.1/Submit) id m01Ms2LM062077 for perforce@freebsd.org; Tue, 1 Jan 2008 22:54:02 GMT (envelope-from jb@freebsd.org) Date: Tue, 1 Jan 2008 22:54:02 GMT Message-Id: <200801012254.m01Ms2LM062077@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to jb@freebsd.org using -f From: John Birrell To: Perforce Change Reviews Cc: Subject: PERFORCE change 132269 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 01 Jan 2008 22:54:03 -0000 http://perforce.freebsd.org/chv.cgi?CH=132269 Change 132269 by jb@jb_freebsd1 on 2008/01/01 22:53:22 Watch out for a NULL pointer that can ruin one's day. Or part thereof. Affected files ... .. //depot/projects/dtrace/src/sys/contrib/opensolaris/uts/common/dtrace/dtrace.c#8 edit Differences ... ==== //depot/projects/dtrace/src/sys/contrib/opensolaris/uts/common/dtrace/dtrace.c#8 (text) ==== @@ -10660,7 +10660,8 @@ nsize = enab->dten_maxdesc * sizeof (dtrace_enabling_t *); ndesc = kmem_zalloc(nsize, KM_SLEEP); bcopy(enab->dten_desc, ndesc, osize); - kmem_free(enab->dten_desc, osize); + if (enab->dten_desc != NULL) + kmem_free(enab->dten_desc, osize); enab->dten_desc = ndesc; enab->dten_desc[enab->dten_ndesc++] = ecb; From owner-p4-projects@FreeBSD.ORG Tue Jan 1 22:55:04 2008 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 3EAD316A46C; Tue, 1 Jan 2008 22:55:04 +0000 (UTC) Delivered-To: perforce@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 03E4F16A419 for ; Tue, 1 Jan 2008 22:55:04 +0000 (UTC) (envelope-from jb@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id CE10513C459 for ; Tue, 1 Jan 2008 22:55:03 +0000 (UTC) (envelope-from jb@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.1/8.14.1) with ESMTP id m01Mt3hD063238 for ; Tue, 1 Jan 2008 22:55:03 GMT (envelope-from jb@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.1/8.14.1/Submit) id m01Mt3KN063234 for perforce@freebsd.org; Tue, 1 Jan 2008 22:55:03 GMT (envelope-from jb@freebsd.org) Date: Tue, 1 Jan 2008 22:55:03 GMT Message-Id: <200801012255.m01Mt3KN063234@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to jb@freebsd.org using -f From: John Birrell To: Perforce Change Reviews Cc: Subject: PERFORCE change 132270 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 01 Jan 2008 22:55:04 -0000 http://perforce.freebsd.org/chv.cgi?CH=132270 Change 132270 by jb@jb_freebsd1 on 2008/01/01 22:54:35 Add the extra argument for the dtrace_trap function. Affected files ... .. //depot/projects/dtrace/src/sys/amd64/amd64/trap.c#20 edit Differences ... ==== //depot/projects/dtrace/src/sys/amd64/amd64/trap.c#20 (text+ko) ==== @@ -232,7 +232,7 @@ * function can return normally. */ if (dtrace_trap_func != NULL) - if ((*dtrace_trap_func)(frame)) + if ((*dtrace_trap_func)(frame, type)) goto out; #endif From owner-p4-projects@FreeBSD.ORG Tue Jan 1 23:58:10 2008 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id F116716A420; Tue, 1 Jan 2008 23:58:09 +0000 (UTC) Delivered-To: perforce@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id B628C16A419 for ; Tue, 1 Jan 2008 23:58:09 +0000 (UTC) (envelope-from jb@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id A4F8D13C43E for ; Tue, 1 Jan 2008 23:58:09 +0000 (UTC) (envelope-from jb@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.1/8.14.1) with ESMTP id m01Nw9dL086772 for ; Tue, 1 Jan 2008 23:58:09 GMT (envelope-from jb@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.1/8.14.1/Submit) id m01Nw994086769 for perforce@freebsd.org; Tue, 1 Jan 2008 23:58:09 GMT (envelope-from jb@freebsd.org) Date: Tue, 1 Jan 2008 23:58:09 GMT Message-Id: <200801012358.m01Nw994086769@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to jb@freebsd.org using -f From: John Birrell To: Perforce Change Reviews Cc: Subject: PERFORCE change 132273 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 01 Jan 2008 23:58:10 -0000 http://perforce.freebsd.org/chv.cgi?CH=132273 Change 132273 by jb@jb_freebsd1 on 2008/01/01 23:57:55 Move the DTrace initialisation after devfs which needs to be initialised before make_dev is called. Affected files ... .. //depot/projects/dtrace/src/sys/sys/kernel.h#18 edit Differences ... ==== //depot/projects/dtrace/src/sys/sys/kernel.h#18 (text+ko) ==== @@ -124,9 +124,6 @@ SI_SUB_KTRACE = 0x2480000, /* ktrace */ SI_SUB_OPENSOLARIS = 0x2490000, /* OpenSolaris compatibility */ SI_SUB_CYCLIC = 0x24A0000, /* Cyclic timers */ - SI_SUB_DTRACE = 0x24B0000, /* DTrace subsystem */ - SI_SUB_DTRACE_PROVIDER = 0x24B8000, /* DTrace providers */ - SI_SUB_DTRACE_ANON = 0x24BC000, /* DTrace anon enabling */ SI_SUB_AUDIT = 0x24C0000, /* audit */ SI_SUB_CREATE_INIT = 0x2500000, /* create init process*/ SI_SUB_SCHED_IDLE = 0x2600000, /* required idle procs */ @@ -137,6 +134,9 @@ SI_SUB_DEVFS = 0x2F00000, /* devfs ready for devices */ SI_SUB_INIT_IF = 0x3000000, /* prep for net interfaces */ SI_SUB_NETGRAPH = 0x3010000, /* Let Netgraph initialize */ + SI_SUB_DTRACE = 0x3020000, /* DTrace subsystem */ + SI_SUB_DTRACE_PROVIDER = 0x3048000, /* DTrace providers */ + SI_SUB_DTRACE_ANON = 0x308C000, /* DTrace anon enabling */ SI_SUB_DRIVERS = 0x3100000, /* Let Drivers initialize */ SI_SUB_CONFIGURE = 0x3800000, /* Configure devices */ SI_SUB_VFS = 0x4000000, /* virtual filesystem*/ From owner-p4-projects@FreeBSD.ORG Wed Jan 2 00:01:13 2008 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 820E616A41B; Wed, 2 Jan 2008 00:01:13 +0000 (UTC) Delivered-To: perforce@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id B222816A419 for ; Wed, 2 Jan 2008 00:01:12 +0000 (UTC) (envelope-from jb@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id A060C13C448 for ; Wed, 2 Jan 2008 00:01:12 +0000 (UTC) (envelope-from jb@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.1/8.14.1) with ESMTP id m0201Cv7087486 for ; Wed, 2 Jan 2008 00:01:12 GMT (envelope-from jb@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.1/8.14.1/Submit) id m0201CCp087483 for perforce@freebsd.org; Wed, 2 Jan 2008 00:01:12 GMT (envelope-from jb@freebsd.org) Date: Wed, 2 Jan 2008 00:01:12 GMT Message-Id: <200801020001.m0201CCp087483@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to jb@freebsd.org using -f From: John Birrell To: Perforce Change Reviews Cc: Subject: PERFORCE change 132274 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 02 Jan 2008 00:01:13 -0000 http://perforce.freebsd.org/chv.cgi?CH=132274 Change 132274 by jb@jb_freebsd1 on 2008/01/02 00:00:35 When booting with DTrace enabled, just use the 'dtraceall' module. It's dependencies will cause the set of DTrace modules to be loaded. This means that the boot loader doesn't have to change as new providers are added. Affected files ... .. //depot/projects/dtrace/src/sys/boot/common/boot.c#7 edit Differences ... ==== //depot/projects/dtrace/src/sys/boot/common/boot.c#7 (text+ko) ==== @@ -107,27 +107,12 @@ /* Check if DTrace is to be loaded prior to boot. */ if (getenv("dtrace_boot")) { /* - * Load the DTrace modules. This would be better done - * in 4th so that extra providers can be added easily. + * Load the DTrace modules using the module that + * depends on all other modules -- dtraceall. */ - error = mod_load("cyclic", NULL, 0, NULL); + error = mod_load("dtraceall", NULL, 0, NULL); if (error != 0) - printf("cyclic autoload failed - %s\n", strerror(error)); - error = mod_load("dtrace", NULL, 0, NULL); - if (error != 0) - printf("dtrace autoload failed - %s\n", strerror(error)); - error = mod_load("profile", NULL, 0, NULL); - if (error != 0) - printf("profile autoload failed - %s\n", strerror(error)); - error = mod_load("systrace", NULL, 0, NULL); - if (error != 0) - printf("systrace autoload failed - %s\n", strerror(error)); - error = mod_load("fbt", NULL, 0, NULL); - if (error != 0) - printf("fbt autoload failed - %s\n", strerror(error)); - error = mod_load("sdt", NULL, 0, NULL); - if (error != 0) - printf("sdt autoload failed - %s\n", strerror(error)); + printf("dtraceall autoload failed - %s\n", strerror(error)); /* * Open the DTrace DOF file if it exists. Don't worry if From owner-p4-projects@FreeBSD.ORG Wed Jan 2 04:10:33 2008 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 8868116A41B; Wed, 2 Jan 2008 04:10:33 +0000 (UTC) Delivered-To: perforce@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 4DF9216A419 for ; Wed, 2 Jan 2008 04:10:33 +0000 (UTC) (envelope-from kmacy@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id 3DE8713C442 for ; Wed, 2 Jan 2008 04:10:32 +0000 (UTC) (envelope-from kmacy@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.1/8.14.1) with ESMTP id m024AWGR002346 for ; Wed, 2 Jan 2008 04:10:32 GMT (envelope-from kmacy@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.1/8.14.1/Submit) id m024AWB6002343 for perforce@freebsd.org; Wed, 2 Jan 2008 04:10:32 GMT (envelope-from kmacy@freebsd.org) Date: Wed, 2 Jan 2008 04:10:32 GMT Message-Id: <200801020410.m024AWB6002343@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to kmacy@freebsd.org using -f From: Kip Macy To: Perforce Change Reviews Cc: Subject: PERFORCE change 132281 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 02 Jan 2008 04:10:33 -0000 http://perforce.freebsd.org/chv.cgi?CH=132281 Change 132281 by kmacy@pandemonium:kmacy:xen31 on 2008/01/02 04:09:54 indicate to the rest of the system that it is safe to sleep Affected files ... .. //depot/projects/xen31/sys/kern/init_main.c#6 edit Differences ... ==== //depot/projects/xen31/sys/kern/init_main.c#6 (text+ko) ==== @@ -583,6 +583,8 @@ SYSCTL_INT(_kern, OID_AUTO, init_shutdown_timeout, CTLFLAG_RW, &init_shutdown_timeout, 0, ""); +int scheduler_running = 0; + /* * Start the initial user process; try exec'ing each pathname in init_path. * The program is invoked with one argument containing the boot flags. @@ -598,6 +600,7 @@ struct thread *td; struct proc *p; + scheduler_running = 1; mtx_lock(&Giant); GIANT_REQUIRED; From owner-p4-projects@FreeBSD.ORG Wed Jan 2 04:10:34 2008 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 29D4016A49C; Wed, 2 Jan 2008 04:10:33 +0000 (UTC) Delivered-To: perforce@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id A040716A4C5 for ; Wed, 2 Jan 2008 04:10:33 +0000 (UTC) (envelope-from kmacy@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id 4BAC113C44B for ; Wed, 2 Jan 2008 04:10:33 +0000 (UTC) (envelope-from kmacy@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.1/8.14.1) with ESMTP id m024AWai002352 for ; Wed, 2 Jan 2008 04:10:32 GMT (envelope-from kmacy@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.1/8.14.1/Submit) id m024AWfW002349 for perforce@freebsd.org; Wed, 2 Jan 2008 04:10:32 GMT (envelope-from kmacy@freebsd.org) Date: Wed, 2 Jan 2008 04:10:32 GMT Message-Id: <200801020410.m024AWfW002349@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to kmacy@freebsd.org using -f From: Kip Macy To: Perforce Change Reviews Cc: Subject: PERFORCE change 132282 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 02 Jan 2008 04:10:34 -0000 http://perforce.freebsd.org/chv.cgi?CH=132282 Change 132282 by kmacy@pandemonium:kmacy:xen31 on 2008/01/02 04:10:23 use HYPERVISOR_yield to wait for updates if init hasn't run yet Affected files ... .. //depot/projects/xen31/sys/xen/xenbus/xenbus_xs.c#8 edit Differences ... ==== //depot/projects/xen31/sys/xen/xenbus/xenbus_xs.c#8 (text+ko) ==== @@ -137,13 +137,15 @@ return xsd_errors[i].errnum; } +extern int scheduler_running; + static void *read_reply(enum xsd_sockmsg_type *type, unsigned int *len) { struct xs_stored_msg *msg; char *body; int i; - if (HYPERVISOR_shared_info->evtchn_mask[curcpu] & 0x2) { + if (scheduler_running == 0) { /* * Give other domain time to run :-/ */ From owner-p4-projects@FreeBSD.ORG Wed Jan 2 04:11:34 2008 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 8B6AD16A420; Wed, 2 Jan 2008 04:11:34 +0000 (UTC) Delivered-To: perforce@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 5124A16A41A for ; Wed, 2 Jan 2008 04:11:34 +0000 (UTC) (envelope-from kmacy@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id 4271313C447 for ; Wed, 2 Jan 2008 04:11:34 +0000 (UTC) (envelope-from kmacy@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.1/8.14.1) with ESMTP id m024BYV3002672 for ; Wed, 2 Jan 2008 04:11:34 GMT (envelope-from kmacy@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.1/8.14.1/Submit) id m024BYDP002669 for perforce@freebsd.org; Wed, 2 Jan 2008 04:11:34 GMT (envelope-from kmacy@freebsd.org) Date: Wed, 2 Jan 2008 04:11:34 GMT Message-Id: <200801020411.m024BYDP002669@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to kmacy@freebsd.org using -f From: Kip Macy To: Perforce Change Reviews Cc: Subject: PERFORCE change 132283 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 02 Jan 2008 04:11:34 -0000 http://perforce.freebsd.org/chv.cgi?CH=132283 Change 132283 by kmacy@pandemonium:kmacy:xen31 on 2008/01/02 04:11:14 allow console lock to be acquired recursively, locking is already such a mess here that this is ok for now Affected files ... .. //depot/projects/xen31/sys/dev/xen/console/console.c#5 edit Differences ... ==== //depot/projects/xen31/sys/dev/xen/console/console.c#5 (text+ko) ==== @@ -76,7 +76,7 @@ #define XCUNIT(x) (minor(x)) #define ISTTYOPEN(tp) ((tp) && ((tp)->t_state & TS_ISOPEN)) #define CN_LOCK_INIT(x, _name) \ - mtx_init(&x, _name, NULL, MTX_DEF) + mtx_init(&x, _name, NULL, MTX_DEF|MTX_RECURSE) #define CN_LOCK(l) mtx_lock(&(l)) #define CN_UNLOCK(l) mtx_unlock(&(l)) #define CN_LOCK_ASSERT(x) mtx_assert(&x, MA_OWNED) From owner-p4-projects@FreeBSD.ORG Wed Jan 2 04:12:35 2008 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id BB0C916A421; Wed, 2 Jan 2008 04:12:35 +0000 (UTC) Delivered-To: perforce@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 808DD16A41A for ; Wed, 2 Jan 2008 04:12:35 +0000 (UTC) (envelope-from kmacy@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id 7173A13C448 for ; Wed, 2 Jan 2008 04:12:35 +0000 (UTC) (envelope-from kmacy@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.1/8.14.1) with ESMTP id m024CZfe003006 for ; Wed, 2 Jan 2008 04:12:35 GMT (envelope-from kmacy@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.1/8.14.1/Submit) id m024CZ2B003003 for perforce@freebsd.org; Wed, 2 Jan 2008 04:12:35 GMT (envelope-from kmacy@freebsd.org) Date: Wed, 2 Jan 2008 04:12:35 GMT Message-Id: <200801020412.m024CZ2B003003@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to kmacy@freebsd.org using -f From: Kip Macy To: Perforce Change Reviews Cc: Subject: PERFORCE change 132284 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 02 Jan 2008 04:12:36 -0000 http://perforce.freebsd.org/chv.cgi?CH=132284 Change 132284 by kmacy@pandemonium:kmacy:xen31 on 2008/01/02 04:12:09 add sanity checks in initialization sequence Affected files ... .. //depot/projects/xen31/sys/dev/xen/blkfront/blkfront.c#7 edit Differences ... ==== //depot/projects/xen31/sys/dev/xen/blkfront/blkfront.c#7 (text+ko) ==== @@ -236,6 +236,7 @@ { int err, vdevice, i; struct blkfront_info *info; + /* FIXME: Use dynamic device id if this is not set. */ err = xenbus_scanf(XBT_NIL, dev->nodename, @@ -250,6 +251,15 @@ xenbus_dev_fatal(dev, ENOMEM, "allocating info structure"); return ENOMEM; } + + /* + * XXX debug only + */ + for (i = 0; i < sizeof(*info); i++) + if (((uint8_t *)info)[i] != 0) + panic("non-null memory"); + + info->shadow_free = 0; info->xbdev = dev; info->vdevice = vdevice; info->connected = BLKIF_STATE_DISCONNECTED; @@ -518,11 +528,12 @@ static inline int GET_ID_FROM_FREELIST(struct blkfront_info *info) { - unsigned long free = info->shadow_free; - KASSERT(free <= BLK_RING_SIZE, ("free %lu > RING_SIZE", free)); - info->shadow_free = info->shadow[free].req.id; - info->shadow[free].req.id = 0x0fffffee; /* debug */ - return free; + unsigned long nfree = info->shadow_free; + + KASSERT(nfree <= BLK_RING_SIZE, ("free %lu > RING_SIZE", nfree)); + info->shadow_free = info->shadow[nfree].req.id; + info->shadow[nfree].req.id = 0x0fffffee; /* debug */ + return nfree; } static inline void From owner-p4-projects@FreeBSD.ORG Wed Jan 2 04:16:40 2008 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 2BCFD16A420; Wed, 2 Jan 2008 04:16:40 +0000 (UTC) Delivered-To: perforce@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id E5FB816A41A for ; Wed, 2 Jan 2008 04:16:39 +0000 (UTC) (envelope-from kmacy@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id BF08C13C448 for ; Wed, 2 Jan 2008 04:16:39 +0000 (UTC) (envelope-from kmacy@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.1/8.14.1) with ESMTP id m024Gdib005913 for ; Wed, 2 Jan 2008 04:16:39 GMT (envelope-from kmacy@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.1/8.14.1/Submit) id m024GdVe005910 for perforce@freebsd.org; Wed, 2 Jan 2008 04:16:39 GMT (envelope-from kmacy@freebsd.org) Date: Wed, 2 Jan 2008 04:16:39 GMT Message-Id: <200801020416.m024GdVe005910@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to kmacy@freebsd.org using -f From: Kip Macy To: Perforce Change Reviews Cc: Subject: PERFORCE change 132285 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 02 Jan 2008 04:16:40 -0000 http://perforce.freebsd.org/chv.cgi?CH=132285 Change 132285 by kmacy@pandemonium:kmacy:xen31 on 2008/01/02 04:16:18 call in to xen to shutdown Affected files ... .. //depot/projects/xen31/sys/i386/i386/vm_machdep.c#4 edit Differences ... ==== //depot/projects/xen31/sys/i386/i386/vm_machdep.c#4 (text+ko) ==== @@ -607,6 +607,9 @@ #endif disable_intr(); +#ifdef XEN + HYPERVISOR_shutdown(SHUTDOWN_poweroff); +#endif #ifdef CPU_ELAN if (elan_mmcr != NULL) elan_mmcr->RESCFG = 1; From owner-p4-projects@FreeBSD.ORG Wed Jan 2 04:22:46 2008 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 8311816A419; Wed, 2 Jan 2008 04:22:46 +0000 (UTC) Delivered-To: perforce@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 48F7616A417 for ; Wed, 2 Jan 2008 04:22:46 +0000 (UTC) (envelope-from kmacy@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id 3A0EF13C44B for ; Wed, 2 Jan 2008 04:22:46 +0000 (UTC) (envelope-from kmacy@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.1/8.14.1) with ESMTP id m024MkE2007201 for ; Wed, 2 Jan 2008 04:22:46 GMT (envelope-from kmacy@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.1/8.14.1/Submit) id m024Mko5007195 for perforce@freebsd.org; Wed, 2 Jan 2008 04:22:46 GMT (envelope-from kmacy@freebsd.org) Date: Wed, 2 Jan 2008 04:22:46 GMT Message-Id: <200801020422.m024Mko5007195@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to kmacy@freebsd.org using -f From: Kip Macy To: Perforce Change Reviews Cc: Subject: PERFORCE change 132286 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 02 Jan 2008 04:22:46 -0000 http://perforce.freebsd.org/chv.cgi?CH=132286 Change 132286 by kmacy@pandemonium:kmacy:xen31 on 2008/01/02 04:22:34 make sure that page tables and pv entry pages are zeroed Affected files ... .. //depot/projects/xen31/sys/i386/xen/pmap.c#10 edit Differences ... ==== //depot/projects/xen31/sys/i386/xen/pmap.c#10 (text+ko) ==== @@ -1287,8 +1287,12 @@ /* * unmap the page table page */ - xen_pt_unpin(pmap->pm_pdir[m->pindex]); + xen_pt_unpin(pmap->pm_pdir[m->pindex]); + /* + * page *might* contain residual mapping :-/ + */ PD_CLEAR_VA(pmap, m->pindex, TRUE); + pmap_zero_page(m); --pmap->pm_stats.resident_count; /* @@ -1427,6 +1431,8 @@ #ifdef PAE #ifdef XEN pmap_qenter((vm_offset_t)pmap->pm_pdpt, &ptdpg[NPGPTD*2], 1); + if ((ptdpg[NPGPTD*2]->flags & PG_ZERO) == 0) + bzero(pmap->pm_pdpt, PAGE_SIZE); #endif for (i = 0; i < NPGPTD; i++) { vm_paddr_t ma; @@ -2057,6 +2063,8 @@ colour++; pc = (struct pv_chunk *)pmap_ptelist_alloc(&pv_vafree); pmap_qenter((vm_offset_t)pc, &m, 1); + if ((m->flags & PG_ZERO) == 0) + bzero(pc, PG_ZERO); pc->pc_pmap = pmap; pc->pc_map[0] = pc_freemask[0] & ~1ul; /* preallocated bit 0 */ for (field = 1; field < _NPCM; field++) @@ -3300,6 +3308,11 @@ pv = &pc->pc_pventry[idx]; inuse &= ~bitmask; + if (pmap->pm_pdir_shadow[pv->pv_va >> PDRSHIFT] == 0) { + printf("PDIR IS ZERO @ VA %08x\n", pv->pv_va); + panic("bad pte"); + } + pte = vtopte(pv->pv_va); tpte = PT_GET(pte); From owner-p4-projects@FreeBSD.ORG Wed Jan 2 04:23:47 2008 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id B06CB16A469; Wed, 2 Jan 2008 04:23:47 +0000 (UTC) Delivered-To: perforce@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 764FC16A41B for ; Wed, 2 Jan 2008 04:23:47 +0000 (UTC) (envelope-from kmacy@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id 67A5A13C448 for ; Wed, 2 Jan 2008 04:23:47 +0000 (UTC) (envelope-from kmacy@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.1/8.14.1) with ESMTP id m024Nlsi008086 for ; Wed, 2 Jan 2008 04:23:47 GMT (envelope-from kmacy@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.1/8.14.1/Submit) id m024Nlji008082 for perforce@freebsd.org; Wed, 2 Jan 2008 04:23:47 GMT (envelope-from kmacy@freebsd.org) Date: Wed, 2 Jan 2008 04:23:47 GMT Message-Id: <200801020423.m024Nlji008082@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to kmacy@freebsd.org using -f From: Kip Macy To: Perforce Change Reviews Cc: Subject: PERFORCE change 132287 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 02 Jan 2008 04:23:48 -0000 http://perforce.freebsd.org/chv.cgi?CH=132287 Change 132287 by kmacy@pandemonium:kmacy:xen31 on 2008/01/02 04:23:02 make sure to zero unused pages Affected files ... .. //depot/projects/xen31/sys/i386/xen/xen_machdep.c#11 edit Differences ... ==== //depot/projects/xen31/sys/i386/xen/xen_machdep.c#11 (text+ko) ==== @@ -822,8 +822,11 @@ xen_flush_queue(); #endif /* unmap remaining pages from initial 4MB chunk */ - for (tmpva = cur_space; (tmpva & ((1<<22)-1)) != 0; tmpva += PAGE_SIZE) + for (tmpva = cur_space; (tmpva & ((1<<22)-1)) != 0; tmpva += PAGE_SIZE) { + bzero((char *)tmpva, PAGE_SIZE); PT_SET_MA(tmpva, (vm_paddr_t)0); + } + #ifdef PAE offset = 0; #else From owner-p4-projects@FreeBSD.ORG Wed Jan 2 04:24:49 2008 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id DE47716A421; Wed, 2 Jan 2008 04:24:48 +0000 (UTC) Delivered-To: perforce@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id A3D5A16A419 for ; Wed, 2 Jan 2008 04:24:48 +0000 (UTC) (envelope-from kmacy@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id 9523F13C447 for ; Wed, 2 Jan 2008 04:24:48 +0000 (UTC) (envelope-from kmacy@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.1/8.14.1) with ESMTP id m024OmFG009219 for ; Wed, 2 Jan 2008 04:24:48 GMT (envelope-from kmacy@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.1/8.14.1/Submit) id m024OmEu009216 for perforce@freebsd.org; Wed, 2 Jan 2008 04:24:48 GMT (envelope-from kmacy@freebsd.org) Date: Wed, 2 Jan 2008 04:24:48 GMT Message-Id: <200801020424.m024OmEu009216@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to kmacy@freebsd.org using -f From: Kip Macy To: Perforce Change Reviews Cc: Subject: PERFORCE change 132288 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 02 Jan 2008 04:24:49 -0000 http://perforce.freebsd.org/chv.cgi?CH=132288 Change 132288 by kmacy@pandemonium:kmacy:xen31 on 2008/01/02 04:24:12 turn vfork in to fork until we understand why it causes problems Affected files ... .. //depot/projects/xen31/sys/kern/kern_fork.c#5 edit Differences ... ==== //depot/projects/xen31/sys/kern/kern_fork.c#5 (text+ko) ==== @@ -108,7 +108,14 @@ int error; struct proc *p2; +#ifdef XEN + /* + * Only need to take out one - and why doesn't thisk work on xen anyway? + */ + error = fork1(td, RFFDG | RFPROC, 0, &p2); +#else error = fork1(td, RFFDG | RFPROC | RFPPWAIT | RFMEM, 0, &p2); +#endif if (error == 0) { td->td_retval[0] = p2->p_pid; td->td_retval[1] = 0; From owner-p4-projects@FreeBSD.ORG Wed Jan 2 05:58:26 2008 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 0C5EF16A419; Wed, 2 Jan 2008 05:58:26 +0000 (UTC) Delivered-To: perforce@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id C2F6016A41A for ; Wed, 2 Jan 2008 05:58:25 +0000 (UTC) (envelope-from marcel@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id 9BFCF13C458 for ; Wed, 2 Jan 2008 05:58:25 +0000 (UTC) (envelope-from marcel@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.1/8.14.1) with ESMTP id m025wPmr052582 for ; Wed, 2 Jan 2008 05:58:25 GMT (envelope-from marcel@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.1/8.14.1/Submit) id m025wPtn052579 for perforce@freebsd.org; Wed, 2 Jan 2008 05:58:25 GMT (envelope-from marcel@freebsd.org) Date: Wed, 2 Jan 2008 05:58:25 GMT Message-Id: <200801020558.m025wPtn052579@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to marcel@freebsd.org using -f From: Marcel Moolenaar To: Perforce Change Reviews Cc: Subject: PERFORCE change 132291 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 02 Jan 2008 05:58:26 -0000 http://perforce.freebsd.org/chv.cgi?CH=132291 Change 132291 by marcel@marcel_jnpr on 2008/01/02 05:57:33 Catch up with e500 integration. Affected files ... .. //depot/projects/powerpc/sys/powerpc/conf/IMAC#2 edit .. //depot/projects/powerpc/sys/powerpc/conf/XSERVE#4 edit Differences ... ==== //depot/projects/powerpc/sys/powerpc/conf/IMAC#2 (text+ko) ==== @@ -1,4 +1,4 @@ -cpu OEA +cpu AIM ident IMAC makeoptions DEBUG=-g #Build kernel with gdb(1) debug symbols ==== //depot/projects/powerpc/sys/powerpc/conf/XSERVE#4 (text+ko) ==== @@ -1,4 +1,4 @@ -cpu OEA +cpu AIM ident XSERVE makeoptions DEBUG=-g From owner-p4-projects@FreeBSD.ORG Wed Jan 2 08:12:46 2008 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 2F1C616A46B; Wed, 2 Jan 2008 08:12:46 +0000 (UTC) Delivered-To: perforce@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id E803E16A419 for ; Wed, 2 Jan 2008 08:12:45 +0000 (UTC) (envelope-from zhouzhouyi@FreeBSD.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id D8B2213C448 for ; Wed, 2 Jan 2008 08:12:45 +0000 (UTC) (envelope-from zhouzhouyi@FreeBSD.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.1/8.14.1) with ESMTP id m028CjHp005619 for ; Wed, 2 Jan 2008 08:12:45 GMT (envelope-from zhouzhouyi@FreeBSD.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.1/8.14.1/Submit) id m028Cjj6005616 for perforce@freebsd.org; Wed, 2 Jan 2008 08:12:45 GMT (envelope-from zhouzhouyi@FreeBSD.org) Date: Wed, 2 Jan 2008 08:12:45 GMT Message-Id: <200801020812.m028Cjj6005616@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to zhouzhouyi@FreeBSD.org using -f From: Zhouyi ZHOU To: Perforce Change Reviews Cc: Subject: PERFORCE change 132294 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 02 Jan 2008 08:12:46 -0000 http://perforce.freebsd.org/chv.cgi?CH=132294 Change 132294 by zhouzhouyi@zhouzhouyi_mactest on 2008/01/02 08:12:18 Style Modification Affected files ... .. //depot/projects/soc2007/zhouzhouyi_mactest_soc/regression/mactest/tests/open/00.t#7 edit .. //depot/projects/soc2007/zhouzhouyi_mactest_soc/regression/mactest/tests/open/01.t#7 edit .. //depot/projects/soc2007/zhouzhouyi_mactest_soc/sys/security/mac_test/mac_test.c#16 edit Differences ... ==== //depot/projects/soc2007/zhouzhouyi_mactest_soc/regression/mactest/tests/open/00.t#7 (text+ko) ==== @@ -53,7 +53,7 @@ #associate the extattr of newly created vnode echo -n "pid = -1 vnode_create_extattr:" >> ${mactest_conf} - echo "biba/high(low-high),mls/8(low-high) ${dvplabel} biba/high,mls/low" >> ${mactest_conf} + echo "biba/high(low-high),mls/8(low-high) ${dvplabel} biba/high,mls/low biba/high,mls/8" >> ${mactest_conf} mactestexpect "" 0 -m "mls/8(low-high)" -f ${mactest_conf} mkdir ${n1} 0755 @@ -68,7 +68,7 @@ echo "pid = -1 vnode_init_label" >> ${mactest_conf} echo -n "pid = -1 vnode_create_extattr:" >> ${mactest_conf} - echo "biba/high(low-high),mls/9(low-high) biba/high,mls/low biba/high,mls/8" >> ${mactest_conf} + echo "biba/high(low-high),mls/9(low-high) biba/high,mls/low biba/high,mls/8 biba/high,mls/9" >> ${mactest_conf} echo -n "pid = -1 vnode_check_open#VWRITE :" >> ${mactest_conf} echo "biba/high(low-high),mls/9(low-high) biba/high,mls/9" >> ${mactest_conf} ==== //depot/projects/soc2007/zhouzhouyi_mactest_soc/regression/mactest/tests/open/01.t#7 (text+ko) ==== @@ -1,114 +1,127 @@ #!/bin/sh -# $FreeBSD: src/tools/regression/mactest/tests/open/01.t,v 1.2 2007/01/25 20:50:02 pjd Exp $ -# test of setfmac getfmac commands +# $FreeBSD$ + desc="open opens (and eventually creates) a file" + dir=`dirname $0` . ${dir}/../misc.sh -echo "1..5" +case "${os}" in +FreeBSD) -n0=`namegen` -n1=`namegen` + mac_mls_support=`sysctl -n security.mac.mls.enabled 2>/dev/null` + mac_biba_support=`sysctl -n security.mac.biba.enabled 2>/dev/null` + mac_test_support=`sysctl -n security.mac.test.pseudoinit 2>/dev/null` + if [ "${mac_mls_support}" != "" ] && [ "${mac_biba_support}" != "" ] && + [ "${mac_test_support}" != "" ]; then #turn off all the switches -for i in `sysctl security.mac | grep "\.enabled"| - sed 's/\([a-z\.]*\.enabled\)\(:\ \)\([01]\)/\1/`; do -sysctl ${i}=0 -done + for i in `sysctl security.mac | grep "\.enabled"| + sed 's/\([a-z\.]*\.enabled\)\(:\ \)\([01]\)/\1/`; do + sysctl ${i}=0 >/dev/null + done + + + if [ -f ${mactest_conf} ]; then + rm ${mactest_conf} + fi + touch ${mactest_conf} + setfmac "mls/equal,biba/equal" ${mactest_conf} + + echo "1..5" + + n0=`namegen` + n1=`namegen` + -mac_mls_support=`sysctl -n security.mac.mls.enabled 2>/dev/null` -mac_biba_support=`sysctl -n security.mac.biba.enabled 2>/dev/null` + dvplabel=`getfmac ".."| sed 's/\(\.\.:\ \)\([a-z\,\/]*\)/\2/`; -if [ "${mac_mls_support}" != "" ] && [ "${mac_biba_support}" != "" ] ; then - dvplabel=`getfmac ".."| sed 's/\(\.\.:\ \)\([a-z\,\/]*\)/\2/`; -############################################################# -#case mkdir: +#case 1 mkdir: #examine the label of its parent directory - echo -n "pid = -1 mac_test_check_vnode_lookup:" > ${mactest_conf} - echo "biba/high(low-high),mls/8(low-high) ${dvplabel}" >> ${mactest_conf} - + echo -n "pid = -1 vnode_check_lookup:" > ${mactest_conf} + echo "biba/high(low-high),mls/8(low-high) ${dvplabel}" >> ${mactest_conf} #check the label of its parent directory - echo -n "pid = -1 mac_test_check_vnode_create:" >> ${mactest_conf} - echo "biba/high(low-high),mls/8(low-high) ${dvplabel}" >> ${mactest_conf} - + echo -n "pid = -1 vnode_check_create:" >> ${mactest_conf} + echo "biba/high(low-high),mls/8(low-high) ${dvplabel}" >> ${mactest_conf} #init the label of currently created vnode - echo "pid = -1 mac_test_init_vnode_label" >> ${mactest_conf} - + echo "pid = -1 vnode_init_label" >> ${mactest_conf} #associate the extattr of newly created vnode - echo -n "pid = -1 mac_test_create_vnode_extattr:" >> ${mactest_conf} - echo "biba/high(low-high),mls/8(low-high) * ${dvplabel} biba/high,mls/8" >> ${mactest_conf} - mactestexpect "" 0 -m "mls/8(low-high)" -f ${mactest_conf} mkdir ${n1} 0755 + echo -n "pid = -1 vnode_create_extattr:" >> ${mactest_conf} + echo "biba/high(low-high),mls/8(low-high) * ${dvplabel} biba/high,mls/8" >> ${mactest_conf} + mactestexpect "" 0 -m "mls/8(low-high)" -f ${mactest_conf} mkdir ${n1} 0755 +#case 2 creative open: + cd ${n1} + echo -n "pid = -1 vnode_check_lookup:" > ${mactest_conf} + echo "biba/high(low-high),mls/9(low-high) biba/high,mls/8" >> ${mactest_conf} -############################################################# -#case creative open: - cd ${n1} - echo -n "pid = -1 mac_test_check_vnode_lookup:" > ${mactest_conf} - echo "biba/high(low-high),mls/9(low-high) biba/high,mls/8" >> ${mactest_conf} + echo -n "pid = -1 vnode_check_create:" >> ${mactest_conf} + echo "biba/high(low-high),mls/9(low-high) biba/high,mls/8" >> ${mactest_conf} - echo -n "pid = -1 mac_test_check_vnode_create:" >> ${mactest_conf} - echo "biba/high(low-high),mls/9(low-high) biba/high,mls/8" >> ${mactest_conf} + echo "pid = -1 vnode_init_label" >> ${mactest_conf} - echo "pid = -1 mac_test_init_vnode_label" >> ${mactest_conf} + echo -n "pid = -1 vnode_create_extattr:" >> ${mactest_conf} + echo "biba/high(low-high),mls/9(low-high) biba/high,mls/low biba/high,mls/8 biba/high,mls/9" >>${mactest_conf} - echo -n "pid = -1 mac_test_create_vnode_extattr:" >> ${mactest_conf} - echo "biba/high(low-high),mls/9(low-high) biba/high,mls/low biba/high,mls/8 biba/high,mls/9" >> ${mactest_conf} + echo -n "pid = -1 vnode_check_open#VWRITE:" >> ${mactest_conf} + echo "biba/high(low-high),mls/9(low-high) biba/high,mls/9" >> ${mactest_conf} - echo -n "pid = -1 mac_test_check_vnode_open#VWRITE:" >> ${mactest_conf} - echo "biba/high(low-high),mls/9(low-high) biba/high,mls/9" >> ${mactest_conf} + mactestexpect "" 0 -m "mls/9(low-high)" -f ${mactest_conf} open ${n0} O_CREAT,O_WRONLY 0755 - mactestexpect "" 0 -m "mls/9(low-high)" -f ${mactest_conf} open ${n0} O_CREAT,O_WRONLY 0755 - - - -############################################################# -#caes setfmac command: -#pid = -2 means matching any pid, because we use shell function system +#case 3 setfmac command: +#pid = -2 means matching any pid, because we use shell function system #init the vnode label - echo "pid = -2 mac_test_init_vnode_label" > ${mactest_conf} + echo "pid = -2 vnode_init_label" > ${mactest_conf} #lookup checking - echo -n "pid = -2 mac_test_check_vnode_lookup with cr_label and dvplabel:" >> ${mactest_conf} - echo "biba/high(low-high),mls/5(low-high) biba/high,mls/8" >> ${mactest_conf} + echo -n "pid = -2 vnode_check_lookup:" >> ${mactest_conf} + echo "biba/high(low-high),mls/5(low-high) biba/high,mls/8" >> ${mactest_conf} #vnode relabel checking - echo -n "pid = -2 mac_test_check_vnode_relabel with cr_label" >> ${mactest_conf} - echo -n " vplabel and newlabel:" >> ${mactest_conf} - echo "biba/high(low-high),mls/5(low-high) biba/high,mls/9 biba/,mls/7" >> ${mactest_conf} + echo -n "pid = -2 vnode_check_relabel:" >> ${mactest_conf} + echo "biba/high(low-high),mls/5(low-high) biba/high,mls/9 biba/,mls/7" >> ${mactest_conf} #associate extattr with the vnode - echo -n "pid = -2 mac_test_setlabel_vnode_extattr with cr_label vplabel and intlabel:" >> ${mactest_conf} - echo "biba/high(low-high),mls/5(low-high) biba/high,mls/9 biba/,mls/7" >> ${mactest_conf} + echo -n "pid = -2 vnode_setlabel_extattr:" >> ${mactest_conf} + echo "biba/high(low-high),mls/5(low-high) biba/high,mls/9 biba/,mls/7" >> ${mactest_conf} #relabel vnode - echo -n "pid = -2 mac_test_relabel_vnode with cr_label vplabel and label:" >> ${mactest_conf} - echo "biba/high(low-high),mls/5(low-high) biba/high,mls/7 biba/,mls/7" >> ${mactest_conf} + echo -n "pid = -2 vnode_relabel:" >> ${mactest_conf} + echo "biba/high(low-high),mls/5(low-high) biba/high,mls/7 biba/,mls/7" >> ${mactest_conf} #destroy old label - echo "pid = -2 mac_test_destroy_vnode_label" >> ${mactest_conf} - mactestexpect "" "" -m "mls/5(low-high)" -f ${mactest_conf} system setfmac "mls/7" ${n0} - -############################################################# -#case getfmac command: + echo "pid = -2 vnode_destroy_label" >> ${mactest_conf} + mactestexpect "" "" -m "mls/5(low-high)" -f ${mactest_conf} system setfmac "mls/7" ${n0} + + +#case 4 getfmac command: #It is strange that there are no mac_check respect to get the vnode label - echo -n "pid = -2 mac_test_copy_vnode_label with src label:" > ${mactest_conf} - echo "biba/high,mls/7" >> ${mactest_conf} - maclabelexpect "mls/7,biba/high" -f ${mactest_conf} system getfmac ${n0} + echo -n "pid = -2 vnode_copy_label:" > ${mactest_conf} + echo "biba/high,mls/7" >> ${mactest_conf} + maclabelexpect "mls/7,biba/high" -f ${mactest_conf} system getfmac ${n0} ############################################################# -#case ls -l -Z command: +#case 5 ls -l -Z command: #Why ls need -l to work with -Z, this is not correspond to the manual page of ls - echo -n "pid = -2 mac_test_copy_vnode_label with src label:" > ${mactest_conf} - echo "biba/high,mls/7" >> ${mactest_conf} - maclabelexpect "biba/high,mls/7" -f ${mactest_conf} system ls -l -Z ${n0} + echo -n "pid = -2 vnode_copy_label with src label:" > ${mactest_conf} + echo "biba/high,mls/7" >> ${mactest_conf} + maclabelexpect "biba/high,mls/7" -f ${mactest_conf} system ls -l -Z ${n0} + #cleanup: - cd .. - rm -fr ${n1} - rm ${mactest_conf} -fi - + sysctl security.mac.mls.enabled=0 >/dev/null + sysctl security.mac.biba.enabled=0 > /dev/null + cd .. + rm -fr ${n1} + rm ${mactest_conf} +#mac_mls mac_biba and mac_test support + fi + ;; +*) + quick_exit + ;; +esac ==== //depot/projects/soc2007/zhouzhouyi_mactest_soc/sys/security/mac_test/mac_test.c#16 (text+ko) ==== @@ -2908,6 +2908,7 @@ LABEL_CHECK(cred->cr_label, MAGIC_CRED); LABEL_CHECK(mplabel, MAGIC_MOUNT); LABEL_CHECK(dvplabel, MAGIC_VNODE); + LABEL_CHECK(vplabel, MAGIC_VNODE); COUNTER_INC(vnode_create_extattr); return (0); From owner-p4-projects@FreeBSD.ORG Wed Jan 2 08:34:08 2008 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 8D07216A41A; Wed, 2 Jan 2008 08:34:08 +0000 (UTC) Delivered-To: perforce@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 51B0F16A418 for ; Wed, 2 Jan 2008 08:34:08 +0000 (UTC) (envelope-from imp@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id 4251413C45A for ; Wed, 2 Jan 2008 08:34:08 +0000 (UTC) (envelope-from imp@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.1/8.14.1) with ESMTP id m028Y8Rq014852 for ; Wed, 2 Jan 2008 08:34:08 GMT (envelope-from imp@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.1/8.14.1/Submit) id m028Y89m014848 for perforce@freebsd.org; Wed, 2 Jan 2008 08:34:08 GMT (envelope-from imp@freebsd.org) Date: Wed, 2 Jan 2008 08:34:08 GMT Message-Id: <200801020834.m028Y89m014848@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to imp@freebsd.org using -f From: Warner Losh To: Perforce Change Reviews Cc: Subject: PERFORCE change 132295 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 02 Jan 2008 08:34:09 -0000 http://perforce.freebsd.org/chv.cgi?CH=132295 Change 132295 by imp@imp_paco-paco on 2008/01/02 08:33:34 Update for changes since 6.1. # I'm unsure about the inb/outb stuff that remains... Affected files ... .. //depot/projects/mips2-jnpr/src/sys/mips/include/bus.h#4 edit Differences ... ==== //depot/projects/mips2-jnpr/src/sys/mips/include/bus.h#4 (text+ko) ==== @@ -786,120 +786,108 @@ /* - * Flags used in various bus DMA methods. + * Bus read/write barrier methods. + * + * void bus_space_barrier(bus_space_tag_t tag, bus_space_handle_t bsh, + * bus_size_t offset, bus_size_t len, int flags); + * + * + * Note that BUS_SPACE_BARRIER_WRITE doesn't do anything other than + * prevent reordering by the compiler; all Intel x86 processors currently + * retire operations outside the CPU in program order. */ -#define BUS_DMA_WAITOK 0x00 /* safe to sleep (pseudo-flag) */ -#define BUS_DMA_NOWAIT 0x01 /* not safe to sleep */ -#define BUS_DMA_ALLOCNOW 0x02 /* perform resource allocation now */ -#define BUS_DMAMEM_NOSYNC 0x04 /* map memory to not require sync */ -#define BUS_DMA_ISA 0x10 /* map memory for ISA dma */ -#define BUS_DMA_BUS2 0x20 /* placeholders for bus functions... */ -#define BUS_DMA_BUS3 0x40 -#define BUS_DMA_BUS4 0x80 +#define BUS_SPACE_BARRIER_READ 0x01 /* force read barrier */ +#define BUS_SPACE_BARRIER_WRITE 0x02 /* force write barrier */ -/* Forwards needed by prototypes below. */ -struct mbuf; -struct uio; +static __inline void +bus_space_barrier(bus_space_tag_t tag __unused, bus_space_handle_t bsh __unused, + bus_size_t offset __unused, bus_size_t len __unused, int flags) +{ +#if 0 +#ifdef __GNUCLIKE_ASM + if (flags & BUS_SPACE_BARRIER_READ) + __asm __volatile("lock; addl $0,0(%%rsp)" : : : "memory"); + else + __asm __volatile("" : : : "memory"); +#endif +#endif +} -/* - * bus_dma_segment_t - * - * Describes a single contiguous DMA transaction. Values - * are suitable for programming into DMA registers. - */ -typedef struct bus_dma_segment { - bus_addr_t ds_addr; /* DMA address */ - bus_size_t ds_len; /* length of transfer */ -} bus_dma_segment_t; +#ifdef BUS_SPACE_NO_LEGACY +#undef inb +#undef outb +#define inb(a) compiler_error +#define inw(a) compiler_error +#define inl(a) compiler_error +#define outb(a, b) compiler_error +#define outw(a, b) compiler_error +#define outl(a, b) compiler_error +#endif -/* - * A function that returns 1 if the address cannot be accessed by - * a device and 0 if it can be. - */ -typedef int bus_dma_filter_t(void *, bus_addr_t); +#include /* - * Allocate a device specific dma_tag encapsulating the constraints of - * the parent tag in addition to other restrictions specified: - * - * alignment: alignment for segments. - * boundary: Boundary that segments cannot cross. - * lowaddr: Low restricted address that cannot appear in a mapping. - * highaddr: High restricted address that cannot appear in a mapping. - * filtfunc: An optional function to further test if an address - * within the range of lowaddr and highaddr cannot appear - * in a mapping. - * filtfuncarg: An argument that will be passed to filtfunc in addition - * to the address to test. - * maxsize: Maximum mapping size supported by this tag. - * nsegments: Number of discontinuities allowed in maps. - * maxsegsz: Maximum size of a segment in the map. - * flags: Bus DMA flags. - * dmat: A pointer to set to a valid dma tag should the return - * value of this function indicate success. + * Stream accesses are the same as normal accesses on amd64; there are no + * supported bus systems with an endianess different from the host one. */ -/* XXX Should probably allow specification of alignment */ -int bus_dma_tag_create(bus_dma_tag_t parent, bus_size_t alignemnt, - bus_size_t boundary, bus_addr_t lowaddr, - bus_addr_t highaddr, bus_dma_filter_t *filtfunc, - void *filtfuncarg, bus_size_t maxsize, int nsegments, - bus_size_t maxsegsz, int flags, bus_dma_tag_t *dmat); +#define bus_space_read_stream_1(t, h, o) bus_space_read_1((t), (h), (o)) +#define bus_space_read_stream_2(t, h, o) bus_space_read_2((t), (h), (o)) +#define bus_space_read_stream_4(t, h, o) bus_space_read_4((t), (h), (o)) -int bus_dma_tag_destroy(bus_dma_tag_t dmat); +#define bus_space_read_multi_stream_1(t, h, o, a, c) \ + bus_space_read_multi_1((t), (h), (o), (a), (c)) +#define bus_space_read_multi_stream_2(t, h, o, a, c) \ + bus_space_read_multi_2((t), (h), (o), (a), (c)) +#define bus_space_read_multi_stream_4(t, h, o, a, c) \ + bus_space_read_multi_4((t), (h), (o), (a), (c)) -/* - * Allocate a handle for mapping from kva/uva/physical - * address space into bus device space. - */ -int bus_dmamap_create(bus_dma_tag_t dmat, int flags, bus_dmamap_t *mapp); +#define bus_space_write_stream_1(t, h, o, v) \ + bus_space_write_1((t), (h), (o), (v)) +#define bus_space_write_stream_2(t, h, o, v) \ + bus_space_write_2((t), (h), (o), (v)) +#define bus_space_write_stream_4(t, h, o, v) \ + bus_space_write_4((t), (h), (o), (v)) -/* - * Destroy a handle for mapping from kva/uva/physical - * address space into bus device space. - */ -int bus_dmamap_destroy(bus_dma_tag_t dmat, bus_dmamap_t map); +#define bus_space_write_multi_stream_1(t, h, o, a, c) \ + bus_space_write_multi_1((t), (h), (o), (a), (c)) +#define bus_space_write_multi_stream_2(t, h, o, a, c) \ + bus_space_write_multi_2((t), (h), (o), (a), (c)) +#define bus_space_write_multi_stream_4(t, h, o, a, c) \ + bus_space_write_multi_4((t), (h), (o), (a), (c)) -/* - * Allocate a piece of memory that can be efficiently mapped into - * bus device space based on the constraints lited in the dma tag. - * A dmamap to for use with dmamap_load is also allocated. - */ -int bus_dmamem_alloc(bus_dma_tag_t dmat, void** vaddr, int flags, - bus_dmamap_t *mapp); +#define bus_space_set_multi_stream_1(t, h, o, v, c) \ + bus_space_set_multi_1((t), (h), (o), (v), (c)) +#define bus_space_set_multi_stream_2(t, h, o, v, c) \ + bus_space_set_multi_2((t), (h), (o), (v), (c)) +#define bus_space_set_multi_stream_4(t, h, o, v, c) \ + bus_space_set_multi_4((t), (h), (o), (v), (c)) -/* - * Free a piece of memory and it's allociated dmamap, that was allocated - * via bus_dmamem_alloc. - */ -void bus_dmamem_free(bus_dma_tag_t dmat, void *vaddr, bus_dmamap_t map); +#define bus_space_read_region_stream_1(t, h, o, a, c) \ + bus_space_read_region_1((t), (h), (o), (a), (c)) +#define bus_space_read_region_stream_2(t, h, o, a, c) \ + bus_space_read_region_2((t), (h), (o), (a), (c)) +#define bus_space_read_region_stream_4(t, h, o, a, c) \ + bus_space_read_region_4((t), (h), (o), (a), (c)) -/* - * A function that processes a successfully loaded dma map or an error - * from a delayed load map. - */ -typedef void bus_dmamap_callback_t(void *, bus_dma_segment_t *, int, int); +#define bus_space_write_region_stream_1(t, h, o, a, c) \ + bus_space_write_region_1((t), (h), (o), (a), (c)) +#define bus_space_write_region_stream_2(t, h, o, a, c) \ + bus_space_write_region_2((t), (h), (o), (a), (c)) +#define bus_space_write_region_stream_4(t, h, o, a, c) \ + bus_space_write_region_4((t), (h), (o), (a), (c)) -/* - * Map the buffer buf into bus space using the dmamap map. - */ -int bus_dmamap_load(bus_dma_tag_t dmat, bus_dmamap_t map, void *buf, - bus_size_t buflen, bus_dmamap_callback_t *callback, - void *callback_arg, int flags); +#define bus_space_set_region_stream_1(t, h, o, v, c) \ + bus_space_set_region_1((t), (h), (o), (v), (c)) +#define bus_space_set_region_stream_2(t, h, o, v, c) \ + bus_space_set_region_2((t), (h), (o), (v), (c)) +#define bus_space_set_region_stream_4(t, h, o, v, c) \ + bus_space_set_region_4((t), (h), (o), (v), (c)) -/* - * Perform a syncronization operation on the given map. - */ -void _bus_dmamap_sync(bus_dma_tag_t, bus_dmamap_t, bus_dmasync_op_t); -#define bus_dmamap_sync(dmat, dmamap, op) \ - if ((dmamap) != NULL) \ - _bus_dmamap_sync(dmat, dmamap, op) - -/* - * Release the mapping held by map. - */ -void _bus_dmamap_unload(bus_dma_tag_t dmat, bus_dmamap_t map); -#define bus_dmamap_unload(dmat, dmamap) \ - if ((dmamap) != NULL) \ - _bus_dmamap_unload(dmat, dmamap) +#define bus_space_copy_region_stream_1(t, h1, o1, h2, o2, c) \ + bus_space_copy_region_1((t), (h1), (o1), (h2), (o2), (c)) +#define bus_space_copy_region_stream_2(t, h1, o1, h2, o2, c) \ + bus_space_copy_region_2((t), (h1), (o1), (h2), (o2), (c)) +#define bus_space_copy_region_stream_4(t, h1, o1, h2, o2, c) \ + bus_space_copy_region_4((t), (h1), (o1), (h2), (o2), (c)) #endif /* !_MACHINE_BUS_H_ */ From owner-p4-projects@FreeBSD.ORG Wed Jan 2 08:46:38 2008 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 39F1A16A41B; Wed, 2 Jan 2008 08:46:38 +0000 (UTC) Delivered-To: perforce@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id DF22116A419 for ; Wed, 2 Jan 2008 08:46:37 +0000 (UTC) (envelope-from imp@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id D068513C459 for ; Wed, 2 Jan 2008 08:46:37 +0000 (UTC) (envelope-from imp@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.1/8.14.1) with ESMTP id m028kbIN019219 for ; Wed, 2 Jan 2008 08:46:37 GMT (envelope-from imp@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.1/8.14.1/Submit) id m028kbL9019216 for perforce@freebsd.org; Wed, 2 Jan 2008 08:46:37 GMT (envelope-from imp@freebsd.org) Date: Wed, 2 Jan 2008 08:46:37 GMT Message-Id: <200801020846.m028kbL9019216@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to imp@freebsd.org using -f From: Warner Losh To: Perforce Change Reviews Cc: Subject: PERFORCE change 132296 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 02 Jan 2008 08:46:38 -0000 http://perforce.freebsd.org/chv.cgi?CH=132296 Change 132296 by imp@imp_paco-paco on 2008/01/02 08:45:38 Resolve conflict between PG_CACHED in vm system and bits that are defined for the MIPS PTE that gets stuck into the tlb. Affected files ... .. //depot/projects/mips2-jnpr/src/sys/mips/include/pte.h#3 edit .. //depot/projects/mips2-jnpr/src/sys/mips/mips/pmap.c#3 edit Differences ... ==== //depot/projects/mips2-jnpr/src/sys/mips/include/pte.h#3 (text+ko) ==== @@ -107,7 +107,7 @@ #define PG_RW PG_M #define PG_ATTR 0x0000003f #define PG_UNCACHED 0x00000010 -#define PG_CACHED 0x00000018 +#define PG_CACHE 0x00000018 #define PG_CACHEMODE 0x00000038 #define PG_ROPAGE (PG_V | PG_RO | PG_CACHED) /* Write protected */ #define PG_RWPAGE (PG_V | PG_M | PG_CACHED) /* Not wr-prot not clean */ ==== //depot/projects/mips2-jnpr/src/sys/mips/mips/pmap.c#3 (text+ko) ==== @@ -584,7 +584,7 @@ npte = mips_paddr_to_tlbpfn(pa) | PG_RW | PG_V | PG_G | PG_W; if (is_cacheable_mem(pa)) - npte |= PG_CACHED; + npte |= PG_CACHE; else npte |= PG_UNCACHED; @@ -769,7 +769,7 @@ fp->state = TRUE; kva = fp->kva; - npte = mips_paddr_to_tlbpfn(pa) | PG_RW | PG_V | PG_G | PG_W | PG_CACHED; + npte = mips_paddr_to_tlbpfn(pa) | PG_RW | PG_V | PG_G | PG_W | PG_CACHE; pte = pmap_pte(kernel_pmap, kva); *pte = npte; @@ -1703,7 +1703,7 @@ newpte = mips_paddr_to_tlbpfn(pa) | rw | PG_V; if (is_cacheable_mem(pa)) - newpte |= PG_CACHED; + newpte |= PG_CACHE; else newpte |= PG_UNCACHED; @@ -1858,7 +1858,7 @@ *pte = mips_paddr_to_tlbpfn(pa) | PG_V; if (is_cacheable_mem(pa)) - *pte |= PG_CACHED; + *pte |= PG_CACHE; else *pte |= PG_UNCACHED; From owner-p4-projects@FreeBSD.ORG Wed Jan 2 16:58:07 2008 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 4806B16A468; Wed, 2 Jan 2008 16:58:07 +0000 (UTC) Delivered-To: perforce@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 0D88616A41B for ; Wed, 2 Jan 2008 16:58:07 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id D88FE13C448 for ; Wed, 2 Jan 2008 16:58:06 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.1/8.14.1) with ESMTP id m02Gw6Ef044252 for ; Wed, 2 Jan 2008 16:58:06 GMT (envelope-from jhb@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.1/8.14.1/Submit) id m02Gw6sd044244 for perforce@freebsd.org; Wed, 2 Jan 2008 16:58:06 GMT (envelope-from jhb@freebsd.org) Date: Wed, 2 Jan 2008 16:58:06 GMT Message-Id: <200801021658.m02Gw6sd044244@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to jhb@freebsd.org using -f From: John Baldwin To: Perforce Change Reviews Cc: Subject: PERFORCE change 132305 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 02 Jan 2008 16:58:07 -0000 http://perforce.freebsd.org/chv.cgi?CH=132305 Change 132305 by jhb@jhb_tool on 2008/01/02 16:57:28 Create a spin lock instead of abusing sched_lock. Affected files ... .. //depot/projects/smpng/sys/modules/crash/crash.c#39 edit Differences ... ==== //depot/projects/smpng/sys/modules/crash/crash.c#39 (text+ko) ==== @@ -830,7 +830,9 @@ { printf("Should panic\n"); - if (mtx_trylock(&sched_lock)) + bzero(&test1_mtx, sizeof(test1_mtx)); + mtx_init(&test1_mtx, "test1", NULL, MTX_SPIN | MTX_RECURSE); + if (mtx_trylock(&test1_mtx)) printf("Hmm, locked!\n"); else printf("Not locked\n"); From owner-p4-projects@FreeBSD.ORG Wed Jan 2 17:05:15 2008 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id F363116A419; Wed, 2 Jan 2008 17:05:14 +0000 (UTC) Delivered-To: perforce@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id B909516A417 for ; Wed, 2 Jan 2008 17:05:14 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id A830A13C442 for ; Wed, 2 Jan 2008 17:05:14 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.1/8.14.1) with ESMTP id m02H5EoI050272 for ; Wed, 2 Jan 2008 17:05:14 GMT (envelope-from jhb@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.1/8.14.1/Submit) id m02H5Ep9050265 for perforce@freebsd.org; Wed, 2 Jan 2008 17:05:14 GMT (envelope-from jhb@freebsd.org) Date: Wed, 2 Jan 2008 17:05:14 GMT Message-Id: <200801021705.m02H5Ep9050265@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to jhb@freebsd.org using -f From: John Baldwin To: Perforce Change Reviews Cc: Subject: PERFORCE change 132306 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 02 Jan 2008 17:05:15 -0000 http://perforce.freebsd.org/chv.cgi?CH=132306 Change 132306 by jhb@jhb_mutex on 2008/01/02 17:04:34 Create a test mutex instead of abusing Giant and sched_lock. Affected files ... .. //depot/projects/smpng/sys/modules/crash3/crash3.c#2 edit Differences ... ==== //depot/projects/smpng/sys/modules/crash3/crash3.c#2 (text+ko) ==== @@ -69,6 +69,7 @@ #define MAX_EVENT event_max static int event_max; +static struct mtx test1_mtx; static struct crash_event **event_start, **event_stop; static int mod_event(struct module *module, int cmd, void *arg); @@ -82,7 +83,9 @@ ret_spin_mtx_locked(void) { - mtx_lock_spin(&sched_lock); + bzero(&test1_mtx, sizeof(test1_mtx)); + mtx_init(&test1_mtx, "test1", NULL, MTX_SPIN); + mtx_lock_spin(&test1_mtx); } CRASH_EVENT("return with spin mutex locked", ret_spin_mtx_locked); @@ -90,7 +93,9 @@ ret_mtx_locked(void) { - mtx_lock(&Giant); + bzero(&test1_mtx, sizeof(test1_mtx)); + mtx_init(&test1_mtx, "test1", NULL, MTX_DEF); + mtx_lock(&test1_mtx); } CRASH_EVENT("return with mutex locked", ret_mtx_locked); From owner-p4-projects@FreeBSD.ORG Wed Jan 2 17:05:17 2008 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 209A916A421; Wed, 2 Jan 2008 17:05:17 +0000 (UTC) Delivered-To: perforce@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id D869916A537 for ; Wed, 2 Jan 2008 17:05:16 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id 66A8F13C44B for ; Wed, 2 Jan 2008 17:05:15 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.1/8.14.1) with ESMTP id m02H5FX8050279 for ; Wed, 2 Jan 2008 17:05:15 GMT (envelope-from jhb@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.1/8.14.1/Submit) id m02H5EfC050275 for perforce@freebsd.org; Wed, 2 Jan 2008 17:05:14 GMT (envelope-from jhb@freebsd.org) Date: Wed, 2 Jan 2008 17:05:14 GMT Message-Id: <200801021705.m02H5EfC050275@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to jhb@freebsd.org using -f From: John Baldwin To: Perforce Change Reviews Cc: Subject: PERFORCE change 132307 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 02 Jan 2008 17:05:17 -0000 http://perforce.freebsd.org/chv.cgi?CH=132307 Change 132307 by jhb@jhb_mutex on 2008/01/02 17:04:49 Catch up to kthread API changes. Affected files ... .. //depot/projects/smpng/sys/modules/crash/crash.c#40 edit .. //depot/projects/smpng/sys/modules/crash2/crash2.c#22 edit .. //depot/projects/smpng/sys/modules/evtest/evtest.c#24 edit Differences ... ==== //depot/projects/smpng/sys/modules/crash/crash.c#40 (text+ko) ==== @@ -75,7 +75,7 @@ static struct sx foo, bar, bar2, qux; static struct cv event_cv; static struct mtx event_mtx, test_mtx, test1_mtx, test2_mtx; -static struct proc *kthread; +static struct thread *kthread; static int event; static int mod_event(struct module *module, int cmd, void *arg); @@ -794,7 +794,7 @@ mtx_init(&test1_mtx, "test1", NULL, MTX_DEF); mtx_lock(&test1_mtx); printf("Locking test1 and then exiting, should get a witness panic.\n"); - kthread_exit(0); + kthread_exit(); } CRASH_EVENT("exit a thread while holding a mutex", test_thread_exit); @@ -900,7 +900,7 @@ event = 0; mtx_unlock(&event_mtx); if (ev == -1) { - kthread_exit(0); + kthread_exit(); break; } /* Give sysctl time to finish. */ @@ -919,10 +919,10 @@ load(void *arg) { struct thread *td; - struct proc *p; int error; - error = kthread_create(crash_thread, NULL, &p, RFSTOPPED, 0, "crash"); + error = kthread_add(crash_thread, NULL, NULL, &td, RFSTOPPED, 0, + "crash"); if (error) return (error); sx_init(&foo, "foo"); @@ -932,13 +932,12 @@ event = 0; mtx_init(&event_mtx, "crash event", NULL, MTX_DEF); cv_init(&event_cv, "crash"); - td = FIRST_THREAD_IN_PROC(p); - mtx_lock_spin(&sched_lock); + thread_lock(td); sched_prio(td, PRI_MIN_IDLE); TD_SET_CAN_RUN(td); sched_add(td, SRQ_BORING); - mtx_unlock_spin(&sched_lock); - kthread = p; + thread_unlock(td); + kthread = td; return (0); } ==== //depot/projects/smpng/sys/modules/crash2/crash2.c#22 (text+ko) ==== @@ -86,7 +86,8 @@ static struct crash2_event **event_start, **event_stop; static struct cv event_cv; static struct mtx event_mtx; -static struct proc *kthread[NTHREADS]; +static struct proc *kproc; +static struct thread *kthread[NTHREADS]; static int event[NTHREADS]; static struct rwlock foo; static struct mtx bar; @@ -467,7 +468,7 @@ mtx_unlock(&event_mtx); if (ev == -1) { printf("crash2[%d]: exiting\n", i); - kthread_exit(0); + kthread_exit(); break; } /* Give sysctl time to finish. */ @@ -522,18 +523,19 @@ mtx_init(&event_mtx, "crash2 event", NULL, MTX_DEF); cv_init(&event_cv, "crash2"); for (i = 0; i < NTHREADS; i++) { - error = kthread_create(crash_thread, (void *)(intptr_t)i, - &kthread[i], RFSTOPPED, 0, "crash2: %d", i); + error = kproc_kthread_add(crash_thread, (void *)(intptr_t)i, + &kproc, &kthread[i], RFSTOPPED, 0, "crash2", "crash2: %d", + i); if (error) { unload(NULL); return (error); } - td = FIRST_THREAD_IN_PROC(kthread[i]); - mtx_lock_spin(&sched_lock); + td = kthread[i]; + thread_lock(td); sched_prio(td, PRI_MIN_IDLE); TD_SET_CAN_RUN(td); sched_add(td, SRQ_BORING); - mtx_unlock_spin(&sched_lock); + thread_unlock(td); } return (0); } ==== //depot/projects/smpng/sys/modules/evtest/evtest.c#24 (text+ko) ==== @@ -67,10 +67,12 @@ static int event, broadcast_count, num_threads, sync_threads; struct thread_info { - struct proc *ti_p; + struct thread *ti_td; int ti_event; } threads[NUM_THREADS]; +struct proc *kproc; + struct event_info { const char *ei_help; int ei_flags; @@ -136,7 +138,7 @@ KASSERT(event == 0, ("event %d was unhandled", event)); if (ei->ei_flags & EVENT_TYPE_BROADCAST) { for (i = 0; i < NUM_THREADS; i++) { - if (threads[i].ti_p != NULL) + if (threads[i].ti_td != NULL) threads[i].ti_event = new_event; broadcast_count++; } @@ -170,7 +172,7 @@ int i; for (i = 0; i < NUM_THREADS; i++) - if (threads[i].ti_p == curthread->td_proc) + if (threads[i].ti_td == curthread) return (i); return (-1); } @@ -316,7 +318,7 @@ mtx_unlock(&event_mtx); printf("%s: thread %d dying\n", __func__, evtest_lookupthread()); - kthread_exit(0); + kthread_exit(); break; case 0: printf("%s: thread %d doing nothing\n", @@ -382,18 +384,18 @@ struct thread *td; int error; - if (i < 0 || i >= NUM_THREADS || threads[i].ti_p != NULL) + if (i < 0 || i >= NUM_THREADS || threads[i].ti_td != NULL) return (EINVAL); - error = kthread_create(event_thread, &threads[i].ti_event, - &threads[i].ti_p, RFSTOPPED, 0, name); + error = kproc_kthread_add(event_thread, &threads[i].ti_event, &kproc, + &threads[i].ti_td, RFSTOPPED, 0, "evtest", name); if (error) return (error); - td = FIRST_THREAD_IN_PROC(threads[i].ti_p); - mtx_lock_spin(&sched_lock); + td = threads[i].ti_td; + thread_lock(td); sched_prio(td, PRI_MIN_IDLE); TD_SET_CAN_RUN(td); sched_add(td, SRQ_BORING); - mtx_unlock_spin(&sched_lock); + thread_unlock(td); mtx_lock(&event_mtx); num_threads++; mtx_unlock(&event_mtx); @@ -404,7 +406,7 @@ thread_destroy(int i) { - if (i < 0 || i >= NUM_THREADS || threads[i].ti_p == NULL) + if (i < 0 || i >= NUM_THREADS || threads[i].ti_td == NULL) return; mtx_assert(&event_mtx, MA_OWNED); printf("%s: killing thread %d\n", __func__, i); @@ -412,8 +414,8 @@ broadcast_count = num_threads; event = -1; cv_broadcast(&event_cv); - msleep(threads[i].ti_p, &event_mtx, PWAIT, "evtstun", 0); - threads[i].ti_p = NULL; + msleep(threads[i].ti_td, &event_mtx, PWAIT, "evtstun", 0); + threads[i].ti_td = NULL; num_threads--; if (event != 0 && num_threads > 0) cv_wait(&event_recvd, &event_mtx); From owner-p4-projects@FreeBSD.ORG Wed Jan 2 17:08:20 2008 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 799B016A41A; Wed, 2 Jan 2008 17:08:20 +0000 (UTC) Delivered-To: perforce@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 2479116A418 for ; Wed, 2 Jan 2008 17:08:20 +0000 (UTC) (envelope-from imp@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id 118CB13C43E for ; Wed, 2 Jan 2008 17:08:20 +0000 (UTC) (envelope-from imp@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.1/8.14.1) with ESMTP id m02H8JFa050395 for ; Wed, 2 Jan 2008 17:08:19 GMT (envelope-from imp@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.1/8.14.1/Submit) id m02H8IMc050392 for perforce@freebsd.org; Wed, 2 Jan 2008 17:08:18 GMT (envelope-from imp@freebsd.org) Date: Wed, 2 Jan 2008 17:08:18 GMT Message-Id: <200801021708.m02H8IMc050392@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to imp@freebsd.org using -f From: Warner Losh To: Perforce Change Reviews Cc: Subject: PERFORCE change 132308 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 02 Jan 2008 17:08:21 -0000 http://perforce.freebsd.org/chv.cgi?CH=132308 Change 132308 by imp@imp_paco-paco on 2008/01/02 17:07:34 Merge david's stylistic changes. Only 15 conflicts, but I only had to think about one. Affected files ... .. //depot/projects/mips2-jnpr/src/sys/mips/conf/GENERIC#1 branch .. //depot/projects/mips2-jnpr/src/sys/mips/conf/GENERIC.hints#1 branch .. //depot/projects/mips2-jnpr/src/sys/mips/drivers/sio/ns16550.c#1 branch .. //depot/projects/mips2-jnpr/src/sys/mips/drivers/sio/sio.c#1 branch .. //depot/projects/mips2-jnpr/src/sys/mips/drivers/sio/sio_isa.c#1 branch .. //depot/projects/mips2-jnpr/src/sys/mips/include/_bus.h#3 integrate .. //depot/projects/mips2-jnpr/src/sys/mips/include/_inttypes.h#3 integrate .. //depot/projects/mips2-jnpr/src/sys/mips/include/_limits.h#4 integrate .. //depot/projects/mips2-jnpr/src/sys/mips/include/_stdint.h#3 integrate .. //depot/projects/mips2-jnpr/src/sys/mips/include/_types.h#3 integrate .. //depot/projects/mips2-jnpr/src/sys/mips/include/am29lv081b.h#2 integrate .. //depot/projects/mips2-jnpr/src/sys/mips/include/archtype.h#2 integrate .. //depot/projects/mips2-jnpr/src/sys/mips/include/asm.h#3 integrate .. //depot/projects/mips2-jnpr/src/sys/mips/include/atomic.h#3 integrate .. //depot/projects/mips2-jnpr/src/sys/mips/include/bootinfo.h#2 integrate .. //depot/projects/mips2-jnpr/src/sys/mips/include/bswap.h#2 integrate .. //depot/projects/mips2-jnpr/src/sys/mips/include/bus.h#5 integrate .. //depot/projects/mips2-jnpr/src/sys/mips/include/clock.h#3 integrate .. //depot/projects/mips2-jnpr/src/sys/mips/include/clockvar.h#2 integrate .. //depot/projects/mips2-jnpr/src/sys/mips/include/cp0.h#2 integrate .. //depot/projects/mips2-jnpr/src/sys/mips/include/cpu.h#3 integrate .. //depot/projects/mips2-jnpr/src/sys/mips/include/cpuconf.h#2 integrate .. //depot/projects/mips2-jnpr/src/sys/mips/include/cpufunc.h#3 integrate .. //depot/projects/mips2-jnpr/src/sys/mips/include/db_machdep.h#3 integrate .. //depot/projects/mips2-jnpr/src/sys/mips/include/defs.h#2 integrate .. //depot/projects/mips2-jnpr/src/sys/mips/include/defs_mips.h#2 integrate .. //depot/projects/mips2-jnpr/src/sys/mips/include/elf.h#3 integrate .. //depot/projects/mips2-jnpr/src/sys/mips/include/endian.h#3 integrate .. //depot/projects/mips2-jnpr/src/sys/mips/include/exec.h#3 integrate .. //depot/projects/mips2-jnpr/src/sys/mips/include/float.h#3 integrate .. //depot/projects/mips2-jnpr/src/sys/mips/include/frame.h#3 integrate .. //depot/projects/mips2-jnpr/src/sys/mips/include/gdb_machdep.h#3 integrate .. //depot/projects/mips2-jnpr/src/sys/mips/include/ieeefp.h#3 integrate .. //depot/projects/mips2-jnpr/src/sys/mips/include/in_cksum.h#3 integrate .. //depot/projects/mips2-jnpr/src/sys/mips/include/intr.h#2 integrate .. //depot/projects/mips2-jnpr/src/sys/mips/include/kdb.h#3 integrate .. //depot/projects/mips2-jnpr/src/sys/mips/include/limits.h#3 integrate .. //depot/projects/mips2-jnpr/src/sys/mips/include/md_var.h#3 integrate .. //depot/projects/mips2-jnpr/src/sys/mips/include/memdev.h#3 integrate .. //depot/projects/mips2-jnpr/src/sys/mips/include/mips_opcode.h#3 integrate .. //depot/projects/mips2-jnpr/src/sys/mips/include/ns16550.h#2 integrate .. //depot/projects/mips2-jnpr/src/sys/mips/include/param.h#4 integrate .. //depot/projects/mips2-jnpr/src/sys/mips/include/pcb.h#3 integrate .. //depot/projects/mips2-jnpr/src/sys/mips/include/pcpu.h#3 integrate .. //depot/projects/mips2-jnpr/src/sys/mips/include/pltfm.h#2 integrate .. //depot/projects/mips2-jnpr/src/sys/mips/include/pmap.h#3 integrate .. //depot/projects/mips2-jnpr/src/sys/mips/include/pmc_mdep.h#3 integrate .. //depot/projects/mips2-jnpr/src/sys/mips/include/proc.h#3 integrate .. //depot/projects/mips2-jnpr/src/sys/mips/include/profile.h#3 integrate .. //depot/projects/mips2-jnpr/src/sys/mips/include/psl.h#3 integrate .. //depot/projects/mips2-jnpr/src/sys/mips/include/pte.h#4 integrate .. //depot/projects/mips2-jnpr/src/sys/mips/include/ptrace.h#3 integrate .. //depot/projects/mips2-jnpr/src/sys/mips/include/queue.h#2 integrate .. //depot/projects/mips2-jnpr/src/sys/mips/include/reg.h#3 integrate .. //depot/projects/mips2-jnpr/src/sys/mips/include/regdef.h#2 integrate .. //depot/projects/mips2-jnpr/src/sys/mips/include/regnum.h#3 integrate .. //depot/projects/mips2-jnpr/src/sys/mips/include/reloc.h#3 integrate .. //depot/projects/mips2-jnpr/src/sys/mips/include/resource.h#3 integrate .. //depot/projects/mips2-jnpr/src/sys/mips/include/rm7000.h#2 integrate .. //depot/projects/mips2-jnpr/src/sys/mips/include/runq.h#3 integrate .. //depot/projects/mips2-jnpr/src/sys/mips/include/setjmp.h#3 integrate .. //depot/projects/mips2-jnpr/src/sys/mips/include/sf_buf.h#3 integrate .. //depot/projects/mips2-jnpr/src/sys/mips/include/sigframe.h#3 integrate .. //depot/projects/mips2-jnpr/src/sys/mips/include/signal.h#4 integrate .. //depot/projects/mips2-jnpr/src/sys/mips/include/smp.h#3 integrate .. //depot/projects/mips2-jnpr/src/sys/mips/include/stdarg.h#3 integrate .. //depot/projects/mips2-jnpr/src/sys/mips/include/trap.h#3 integrate .. //depot/projects/mips2-jnpr/src/sys/mips/include/ucontext.h#3 integrate .. //depot/projects/mips2-jnpr/src/sys/mips/include/varargs.h#3 integrate .. //depot/projects/mips2-jnpr/src/sys/mips/include/vmparam.h#5 integrate .. //depot/projects/mips2-jnpr/src/sys/mips/mips/cache.S#2 integrate .. //depot/projects/mips2-jnpr/src/sys/mips/mips/clock.c#2 integrate .. //depot/projects/mips2-jnpr/src/sys/mips/mips/copystr.S#2 edit .. //depot/projects/mips2-jnpr/src/sys/mips/mips/cpu.c#3 integrate .. //depot/projects/mips2-jnpr/src/sys/mips/mips/db_disasm.c#3 integrate .. //depot/projects/mips2-jnpr/src/sys/mips/mips/db_interface.c#3 integrate .. //depot/projects/mips2-jnpr/src/sys/mips/mips/db_trace.c#3 integrate .. //depot/projects/mips2-jnpr/src/sys/mips/mips/elf_machdep.c#3 integrate .. //depot/projects/mips2-jnpr/src/sys/mips/mips/exception.S#3 integrate .. //depot/projects/mips2-jnpr/src/sys/mips/mips/fp.S#2 integrate .. //depot/projects/mips2-jnpr/src/sys/mips/mips/gdb_machdep.c#2 integrate .. //depot/projects/mips2-jnpr/src/sys/mips/mips/genassym.c#3 integrate .. //depot/projects/mips2-jnpr/src/sys/mips/mips/interrupt.c#2 integrate .. //depot/projects/mips2-jnpr/src/sys/mips/mips/locore.S#4 integrate .. //depot/projects/mips2-jnpr/src/sys/mips/mips/machdep.c#3 integrate .. //depot/projects/mips2-jnpr/src/sys/mips/mips/mainbus.c#2 integrate .. //depot/projects/mips2-jnpr/src/sys/mips/mips/mem.c#3 integrate .. //depot/projects/mips2-jnpr/src/sys/mips/mips/mips_subr.c#2 integrate .. //depot/projects/mips2-jnpr/src/sys/mips/mips/mp_machdep.c#2 integrate .. //depot/projects/mips2-jnpr/src/sys/mips/mips/pm_machdep.c#2 integrate .. //depot/projects/mips2-jnpr/src/sys/mips/mips/pmap.c#4 integrate .. //depot/projects/mips2-jnpr/src/sys/mips/mips/psraccess.S#2 integrate .. //depot/projects/mips2-jnpr/src/sys/mips/mips/support.S#3 integrate .. //depot/projects/mips2-jnpr/src/sys/mips/mips/swtch.S#3 integrate .. //depot/projects/mips2-jnpr/src/sys/mips/mips/tlb.S#2 integrate .. //depot/projects/mips2-jnpr/src/sys/mips/mips/trap.c#3 integrate .. //depot/projects/mips2-jnpr/src/sys/mips/mips/uio_machdep.c#3 integrate .. //depot/projects/mips2-jnpr/src/sys/mips/mips/vm_machdep.c#3 integrate Differences ... ==== //depot/projects/mips2-jnpr/src/sys/mips/include/_bus.h#3 (text+ko) ==== @@ -25,11 +25,12 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $FreeBSD: src/sys/i386/include/_bus.h,v 1.1 2005/04/18 21:45:33 imp Exp $ + * from: src/sys/i386/include/_bus.h,v 1.1 2005/04/18 21:45:33 imp + * $FreeBSD$ */ #ifndef MIPS_INCLUDE__BUS_H -#define MIPS_INCLUDE__BUS_H +#define MIPS_INCLUDE__BUS_H /* * Bus address and size types @@ -40,7 +41,7 @@ /* * Access methods for bus resources and address space. */ -typedef int bus_space_tag_t; -typedef u_int bus_space_handle_t; +typedef int bus_space_tag_t; +typedef u_int bus_space_handle_t; #endif /* MIPS_INCLUDE__BUS_H */ ==== //depot/projects/mips2-jnpr/src/sys/mips/include/_inttypes.h#3 (text+ko) ==== @@ -34,11 +34,12 @@ * POSSIBILITY OF SUCH DAMAGE. * * From: $NetBSD: int_fmtio.h,v 1.2 2001/04/26 16:25:21 kleink Exp $ - * $FreeBSD: src/sys/i386/include/_inttypes.h,v 1.2 2002/06/30 05:48:02 mike Exp $ + * from: src/sys/i386/include/_inttypes.h,v 1.2 2002/06/30 05:48:02 mike + * $FreeBSD$ */ #ifndef _MACHINE_INTTYPES_H_ -#define _MACHINE_INTTYPES_H_ +#define _MACHINE_INTTYPES_H_ /* * Macros for format specifiers. ==== //depot/projects/mips2-jnpr/src/sys/mips/include/_limits.h#4 (text+ko) ==== @@ -27,7 +27,8 @@ * SUCH DAMAGE. * * @(#)limits.h 8.3 (Berkeley) 1/4/94 - * $FreeBSD: src/sys/i386/include/_limits.h,v 1.27 2005/01/06 22:18:15 imp Exp $ + * from: src/sys/i386/include/_limits.h,v 1.27 2005/01/06 22:18:15 imp + * $FreeBSD$ */ #ifndef _MACHINE__LIMITS_H_ ==== //depot/projects/mips2-jnpr/src/sys/mips/include/_stdint.h#3 (text+ko) ==== @@ -34,7 +34,8 @@ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. * - * $FreeBSD: src/sys/i386/include/_stdint.h,v 1.2 2004/05/18 16:04:57 stefanf Exp $ + * from: src/sys/i386/include/_stdint.h,v 1.2 2004/05/18 16:04:57 stefanf + * $FreeBSD$ */ #ifndef _MACHINE__STDINT_H_ @@ -146,7 +147,7 @@ * 7.18.3 Limits of other integer types */ /* Limits of ptrdiff_t. */ -#define PTRDIFF_MIN INT32_MIN +#define PTRDIFF_MIN INT32_MIN #define PTRDIFF_MAX INT32_MAX /* Limits of sig_atomic_t. */ ==== //depot/projects/mips2-jnpr/src/sys/mips/include/_types.h#3 (text+ko) ==== @@ -33,7 +33,8 @@ * * From: @(#)ansi.h 8.2 (Berkeley) 1/4/94 * From: @(#)types.h 8.3 (Berkeley) 1/5/94 - * $FreeBSD: src/sys/i386/include/_types.h,v 1.12 2005/07/02 23:13:31 thompsa Exp $ + * from: src/sys/i386/include/_types.h,v 1.12 2005/07/02 23:13:31 thompsa + * $FreeBSD$ */ #ifndef _MACHINE__TYPES_H_ @@ -43,7 +44,7 @@ #error this file needs sys/cdefs.h as a prerequisite #endif -#define __NO_STRICT_ALIGNMENT +#define __NO_STRICT_ALIGNMENT /* * Basic types upon which most other types are built. @@ -78,9 +79,9 @@ typedef __int32_t __critical_t; typedef double __double_t; typedef double __float_t; -typedef long __intfptr_t; +typedef long __intfptr_t; typedef __int64_t __intmax_t; -typedef long __intptr_t; +typedef long __intptr_t; typedef __int32_t __int_fast8_t; typedef __int32_t __int_fast16_t; typedef __int32_t __int_fast32_t; @@ -124,12 +125,12 @@ #endif /* __GNUCLIKE_BUILTIN_VARARGS */ #if defined(__GNUC_VA_LIST_COMPATIBILITY) && !defined(__GNUC_VA_LIST) \ && !defined(__NO_GNUC_VA_LIST) -#define __GNUC_VA_LIST +#define __GNUC_VA_LIST typedef __va_list __gnuc_va_list; /* compatibility w/GNU headers*/ #endif typedef struct label_t { - __register_t val[13]; + __register_t val[13]; } label_t; #endif /* !_MACHINE__TYPES_H_ */ ==== //depot/projects/mips2-jnpr/src/sys/mips/include/am29lv081b.h#2 (text+ko) ==== @@ -1,71 +1,70 @@ /* - * $Id: am29lv081b.h,v 1.1 2006/08/07 05:38:57 katta Exp $ + * Copyright (c) 2000-2003, 2005, Juniper Networks, Inc. + * All rights reserved. + * JNPR: am29lv081b.h,v 1.1 2006/08/07 05:38:57 katta * * am29lv081b.h -- am29lv081b definitions * * Chan Lee, May 2000 - * - * Copyright (c) 2000-2003, 2005, Juniper Networks, Inc. - * All rights reserved. */ - +// $FreeBSD$ #ifndef __AM29LV081B_H__ -#define __AM29LV081B_H__ +#define __AM29LV081B_H__ /* * Identifiers for the am29lv081b chip */ -#define AM29L_MAN_ID 0x01 -#define AM29L_DEV_ID 0x38 +#define AM29L_MAN_ID 0x01 +#define AM29L_DEV_ID 0x38 -#define AM29L_DEV_ID_OFFSET 0x01 +#define AM29L_DEV_ID_OFFSET 0x01 -#define AM29L_TIMEOUT 3000 /* 3 seconds in ms */ -#define AM29L_ERASE_TIME 30000 /* 30 seconds in ms */ +#define AM29L_TIMEOUT 3000 /* 3 seconds in ms */ +#define AM29L_ERASE_TIME 30000 /* 30 seconds in ms */ -/* +/* * This is defined for human consumption. */ -#define AM29L_BANNER "AMD29L081B 8Mb flash" +#define AM29L_BANNER "AMD29L081B 8Mb flash" /* * Sector definitions. */ -#define AM29L_SA0 0x00000 -#define AM29L_SA1 0x10000 -#define AM29L_SA2 0x20000 -#define AM29L_SA3 0x30000 -#define AM29L_SA4 0x40000 -#define AM29L_SA5 0x50000 -#define AM29L_SA6 0x60000 -#define AM29L_SA7 0x70000 -#define AM29L_SA8 0x80000 -#define AM29L_SA9 0x90000 -#define AM29L_SA10 0xA0000 -#define AM29L_SA11 0xB0000 -#define AM29L_SA12 0xC0000 -#define AM29L_SA13 0xD0000 -#define AM29L_SA14 0xE0000 -#define AM29L_SA15 0xF0000 +#define AM29L_SA0 0x00000 +#define AM29L_SA1 0x10000 +#define AM29L_SA2 0x20000 +#define AM29L_SA3 0x30000 +#define AM29L_SA4 0x40000 +#define AM29L_SA5 0x50000 +#define AM29L_SA6 0x60000 +#define AM29L_SA7 0x70000 +#define AM29L_SA8 0x80000 +#define AM29L_SA9 0x90000 +#define AM29L_SA10 0xA0000 +#define AM29L_SA11 0xB0000 +#define AM29L_SA12 0xC0000 +#define AM29L_SA13 0xD0000 +#define AM29L_SA14 0xE0000 +#define AM29L_SA15 0xF0000 -#define AM29L_BANK_MASK 0xFFF00000 -#define AM29L_SECTOR_MASK 0xFFFF0000 -#define AM29L_SECTOR_SIZE 0x10000 -#define AM29L_SECTOR_PER_BLK 4 -#define AM29L_TOTAL_SECTORS 16 -#define AM29L_PROTECT_OFFSET 0x2 +#define AM29L_BANK_MASK 0xFFF00000 +#define AM29L_SECTOR_MASK 0xFFFF0000 +#define AM29L_SECTOR_SIZE 0x10000 +#define AM29L_SECTOR_PER_BLK 4 +#define AM29L_TOTAL_SECTORS 16 +#define AM29L_PROTECT_OFFSET 0x2 /* * Definitions for the unlock sequence, both * the address offset and the data definition. */ -#define AM29L_ULCK_ADDR1 0x555 -#define AM29L_ULCK_ADDR2 0x2AA +#define AM29L_ULCK_ADDR1 0x555 +#define AM29L_ULCK_ADDR2 0x2AA -#define AM29L_ULCK_DATA1 0xAA -#define AM29L_ULCK_DATA2 0x55 +#define AM29L_ULCK_DATA1 0xAA +#define AM29L_ULCK_DATA2 0x55 /* * Command definitions for the am29lv081b. Most @@ -73,12 +72,12 @@ * after the unlock command sequence. */ -#define AM29L_CMD_AUTO 0x90 -#define AM29L_CMD_BYTE_PROGRAM 0xA0 -#define AM29L_CMD_ERASE 0x80 -#define AM29L_CMD_ERASE_CHIP 0x10 -#define AM29L_CMD_ERASE_SECT 0x30 -#define AM29L_CMD_RESET 0xF0 +#define AM29L_CMD_AUTO 0x90 +#define AM29L_CMD_BYTE_PROGRAM 0xA0 +#define AM29L_CMD_ERASE 0x80 +#define AM29L_CMD_ERASE_CHIP 0x10 +#define AM29L_CMD_ERASE_SECT 0x30 +#define AM29L_CMD_RESET 0xF0 /* * Masks for get the DQ3, DQ5, DQ6, DQ7 bits. @@ -86,24 +85,25 @@ * command operations. */ -#define AM29L_DQ2_MASK 0x04 -#define AM29L_DQ3_MASK 0x08 -#define AM29L_DQ5_MASK 0x20 -#define AM29L_DQ6_MASK 0x40 -#define AM29L_DQ7_MASK 0x80 +#define AM29L_DQ2_MASK 0x04 +#define AM29L_DQ3_MASK 0x08 +#define AM29L_DQ5_MASK 0x20 +#define AM29L_DQ6_MASK 0x40 +#define AM29L_DQ7_MASK 0x80 -#define AM29L_GET_DQ2(data) ((data & AM29L_DQ2_MASK) >> 2) -#define AM29L_GET_DQ3(data) ((data & AM29L_DQ3_MASK) >> 3) -#define AM29L_GET_DQ5(data) ((data & AM29L_DQ5_MASK) >> 5) -#define AM29L_GET_DQ6(data) ((data & AM29L_DQ6_MASK) >> 6) -#define AM29L_GET_DQ7(data) ((data & AM29L_DQ7_MASK) >> 7) +#define AM29L_GET_DQ2(data) ((data & AM29L_DQ2_MASK) >> 2) +#define AM29L_GET_DQ3(data) ((data & AM29L_DQ3_MASK) >> 3) +#define AM29L_GET_DQ5(data) ((data & AM29L_DQ5_MASK) >> 5) +#define AM29L_GET_DQ6(data) ((data & AM29L_DQ6_MASK) >> 6) +#define AM29L_GET_DQ7(data) ((data & AM29L_DQ7_MASK) >> 7) extern void flash_add_amd29l081b (flash_device_t *dev); static inline u_int32_t am29f_start_addr_flash(u_int8_t *ptr) { - return((u_int32_t)ptr & AM29L_SECTOR_MASK); + + return((u_int32_t)ptr & AM29L_SECTOR_MASK); } #endif /* __AM29LV081B_H_ */ ==== //depot/projects/mips2-jnpr/src/sys/mips/include/archtype.h#2 (text+ko) ==== @@ -1,8 +1,7 @@ /* $OpenBSD: archtype.h,v 1.6 1999/01/27 04:46:04 imp Exp $ */ /* - * $Id: archtype.h,v 1.6 2007/08/09 11:23:32 katta Exp $ * Copyright (c) 1997 Per Fogelstrom - * + * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: @@ -30,18 +29,19 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * + * JNPR: archtype.h,v 1.6 2007/08/09 11:23:32 katta */ #ifndef _MACHINE_ARCHTYPE_H_ -#define _MACHINE_ARCHTYPE_H_ +#define _MACHINE_ARCHTYPE_H_ /* * Define architectural identitys for the different Mips machines. */ /* * FREEBSD_DEVELOPERS_FIXME - * Define constants for the supported MIPS CPU's - */ -#define MIPS_CLASS_UNKNOWN 0x00 + * Define constants for the supported MIPS CPU's + */ +#define MIPS_CLASS_UNKNOWN 0x00 #endif /* !_MACHINE_ARCHTYPE_H_ */ ==== //depot/projects/mips2-jnpr/src/sys/mips/include/asm.h#3 (text+ko) ==== @@ -1,7 +1,6 @@ /* $NetBSD: asm.h,v 1.29 2000/12/14 21:29:51 jeffs Exp $ */ /* - * $Id: asm.h,v 1.10 2007/08/09 11:23:32 katta Exp $ * Copyright (c) 1992, 1993 * The Regents of the University of California. All rights reserved. * @@ -16,10 +15,6 @@ * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed by the University of - * California, Berkeley and its contributors. * 4. Neither the name of the University nor the names of its contributors * may be used to endorse or promote products derived from this software * without specific prior written permission. @@ -37,6 +32,8 @@ * SUCH DAMAGE. * * @(#)machAsmDefs.h 8.1 (Berkeley) 6/10/93 + * JNPR: asm.h,v 1.10 2007/08/09 11:23:32 katta + * $FreeBSD$ */ /* @@ -57,7 +54,7 @@ */ #ifndef _MACHINE_ASM_H_ -#define _MACHINE_ASM_H_ +#define _MACHINE_ASM_H_ #ifndef NO_REG_DEFS #include @@ -69,57 +66,57 @@ * Must always be noreorder, must never use a macro instruction * Final addiu to t9 must always equal the size of this _KERN_MCOUNT */ -#define _KERN_MCOUNT \ - .set push; \ - .set noreorder; \ - .set noat; \ - subu sp,sp,16; \ - sw t9,12(sp); \ - move AT,ra; \ - lui t9,%hi(_mcount); \ - addiu t9,t9,%lo(_mcount); \ - jalr t9; \ - nop; \ - lw t9,4(sp); \ - addiu sp,sp,8; \ - addiu t9,t9,40; \ - .set pop; +#define _KERN_MCOUNT \ + .set push; \ + .set noreorder; \ + .set noat; \ + subu sp,sp,16; \ + sw t9,12(sp); \ + move AT,ra; \ + lui t9,%hi(_mcount); \ + addiu t9,t9,%lo(_mcount); \ + jalr t9; \ + nop; \ + lw t9,4(sp); \ + addiu sp,sp,8; \ + addiu t9,t9,40; \ + .set pop; #ifdef GPROF -#define MCOUNT _KERN_MCOUNT +#define MCOUNT _KERN_MCOUNT #else #define MCOUNT #endif -#define _C_LABEL(x) x +#define _C_LABEL(x) x /* * Endian-independent assembly-code aliases for unaligned memory accesses. */ #if BYTE_ORDER == LITTLE_ENDIAN -#define LWLO lwl -#define LWHI lwr -#define SWLO swl -#define SWHI swr -#endif +#define LWLO lwl +#define LWHI lwr +#define SWLO swl +#define SWHI swr +#endif #if BYTE_ORDER == BIG_ENDIAN -#define LWLO lwr -#define LWHI lwl -#define SWLO swr -#define SWHI swl -#endif +#define LWLO lwr +#define LWHI lwl +#define SWLO swr +#define SWHI swl +#endif #ifdef USE_AENT -#define AENT(x) \ +#define AENT(x) \ .aent x, 0 #else -#define AENT(x) +#define AENT(x) #endif #ifdef __ELF__ -#define WEAK_ALIAS(alias,sym) \ - .weak alias; \ +#define WEAK_ALIAS(alias,sym) \ + .weak alias; \ alias = sym #endif @@ -144,30 +141,30 @@ * - never use any register that callee-saved (S0-S8), and * - not use any local stack storage. */ -#define LEAF(x) \ - .globl _C_LABEL(x); \ - .ent _C_LABEL(x), 0; \ -_C_LABEL(x): ; \ - .frame sp, 0, ra; \ +#define LEAF(x) \ + .globl _C_LABEL(x); \ + .ent _C_LABEL(x), 0; \ +_C_LABEL(x): ; \ + .frame sp, 0, ra; \ MCOUNT /* * LEAF_NOPROFILE * No profilable leaf routine. */ -#define LEAF_NOPROFILE(x) \ - .globl _C_LABEL(x); \ - .ent _C_LABEL(x), 0; \ -_C_LABEL(x): ; \ +#define LEAF_NOPROFILE(x) \ + .globl _C_LABEL(x); \ + .ent _C_LABEL(x), 0; \ +_C_LABEL(x): ; \ .frame sp, 0, ra /* * XLEAF * declare alternate entry to leaf routine */ -#define XLEAF(x) \ - .globl _C_LABEL(x); \ - AENT (_C_LABEL(x)); \ +#define XLEAF(x) \ + .globl _C_LABEL(x); \ + AENT (_C_LABEL(x)); \ _C_LABEL(x): /* @@ -175,9 +172,9 @@ * A function calls other functions and needs * therefore stack space to save/restore registers. */ -#define NESTED(x, fsize, retpc) \ +#define NESTED(x, fsize, retpc) \ .globl _C_LABEL(x); \ - .ent _C_LABEL(x), 0; \ + .ent _C_LABEL(x), 0; \ _C_LABEL(x): ; \ .frame sp, fsize, retpc; \ MCOUNT @@ -186,39 +183,39 @@ * NESTED_NOPROFILE(x) * No profilable nested routine. */ -#define NESTED_NOPROFILE(x, fsize, retpc) \ - .globl _C_LABEL(x); \ - .ent _C_LABEL(x), 0; \ -_C_LABEL(x): ; \ +#define NESTED_NOPROFILE(x, fsize, retpc) \ + .globl _C_LABEL(x); \ + .ent _C_LABEL(x), 0; \ +_C_LABEL(x): ; \ .frame sp, fsize, retpc /* * XNESTED * declare alternate entry point to nested routine. */ -#define XNESTED(x) \ - .globl _C_LABEL(x); \ - AENT (_C_LABEL(x)); \ +#define XNESTED(x) \ + .globl _C_LABEL(x); \ + AENT (_C_LABEL(x)); \ _C_LABEL(x): /* * END * Mark end of a procedure. */ -#define END(x) \ +#define END(x) \ .end _C_LABEL(x) /* * IMPORT -- import external symbol */ -#define IMPORT(sym, size) \ +#define IMPORT(sym, size) \ .extern _C_LABEL(sym),size /* * EXPORT -- export definition of symbol */ -#define EXPORT(x) \ - .globl _C_LABEL(x); \ +#define EXPORT(x) \ + .globl _C_LABEL(x); \ _C_LABEL(x): /* @@ -226,34 +223,34 @@ * exception vector entrypoint * XXX: regmask should be used to generate .mask */ -#define VECTOR(x, regmask) \ - .ent _C_LABEL(x),0; \ - EXPORT(x); \ +#define VECTOR(x, regmask) \ + .ent _C_LABEL(x),0; \ + EXPORT(x); \ #ifdef __STDC__ -#define VECTOR_END(x) \ - EXPORT(x ## End); \ +#define VECTOR_END(x) \ + EXPORT(x ## End); \ END(x) #else -#define VECTOR_END(x) \ - EXPORT(x/**/End); \ +#define VECTOR_END(x) \ + EXPORT(x/**/End); \ END(x) #endif -#define KSEG0TEXT_START -#define KSEG0TEXT_END -#define KSEG0TEXT .text +#define KSEG0TEXT_START +#define KSEG0TEXT_END +#define KSEG0TEXT .text /* * Macros to panic and printf from assembly language. */ -#define PANIC(msg) \ +#define PANIC(msg) \ la a0, 9f; \ jal _C_LABEL(panic); \ nop; \ MSG(msg) -#define PANIC_KSEG0(msg, reg) PANIC(msg) +#define PANIC_KSEG0(msg, reg) PANIC(msg) #define PRINTF(msg) \ la a0, 9f; \ @@ -266,17 +263,17 @@ 9: .asciiz msg; \ .text -#define ASMSTR(str) \ +#define ASMSTR(str) \ .asciiz str; \ .align 3 /* * XXX retain dialects XXX */ -#define ALEAF(x) XLEAF(x) -#define NLEAF(x) LEAF_NOPROFILE(x) -#define NON_LEAF(x, fsize, retpc) NESTED(x, fsize, retpc) -#define NNON_LEAF(x, fsize, retpc) NESTED_NOPROFILE(x, fsize, retpc) +#define ALEAF(x) XLEAF(x) +#define NLEAF(x) LEAF_NOPROFILE(x) +#define NON_LEAF(x, fsize, retpc) NESTED(x, fsize, retpc) +#define NNON_LEAF(x, fsize, retpc) NESTED_NOPROFILE(x, fsize, retpc) /* * standard callframe { @@ -288,7 +285,7 @@ #define CALLFRAME_SIZ (4 * (4 + 2)) #define CALLFRAME_SP (4 * 4) #define CALLFRAME_RA (4 * 5) -#define START_FRAME CALLFRAME_SIZ +#define START_FRAME CALLFRAME_SIZ /* * While it would be nice to be compatible with the SGI @@ -301,112 +298,111 @@ */ #if !defined(_MIPS_BSD_API) || _MIPS_BSD_API == _MIPS_BSD_API_LP32 -#define REG_L lw -#define REG_S sw -#define REG_LI li +#define REG_L lw +#define REG_S sw +#define REG_LI li #define REG_PROLOGUE .set push #define REG_EPILOGUE .set pop -#define SZREG 4 +#define SZREG 4 #else -#define REG_L ld -#define REG_S sd -#define REG_LI dli +#define REG_L ld +#define REG_S sd +#define REG_LI dli #define REG_PROLOGUE .set push ; .set mips3 #define REG_EPILOGUE .set pop -#define SZREG 8 +#define SZREG 8 #endif /* _MIPS_BSD_API */ -#define mfc0_macro(data, spr) \ - asm volatile ("mfc0 %0, $%1" \ - : "=r" (data) /* outputs */ \ - : "i" (spr)); /* inputs */ +#define mfc0_macro(data, spr) \ + asm volatile ("mfc0 %0, $%1" \ + : "=r" (data) /* outputs */ \ + : "i" (spr)); /* inputs */ -#define mtc0_macro(data, spr) \ - asm volatile ("mtc0 %0, $%1" \ - : /* outputs */ \ - : "r" (data), "i" (spr)); /* inputs */ +#define mtc0_macro(data, spr) \ + asm volatile ("mtc0 %0, $%1" \ + : /* outputs */ \ + : "r" (data), "i" (spr)); /* inputs */ -#define cfc0_macro(data, spr) \ - asm volatile ("cfc0 %0, $%1" \ - : "=r" (data) /* outputs */ \ - : "i" (spr)); /* inputs */ +#define cfc0_macro(data, spr) \ + asm volatile ("cfc0 %0, $%1" \ + : "=r" (data) /* outputs */ \ + : "i" (spr)); /* inputs */ +#define ctc0_macro(data, spr) \ + asm volatile ("ctc0 %0, $%1" \ + : /* outputs */ \ + : "r" (data), "i" (spr)); /* inputs */ -#define ctc0_macro(data, spr) \ - asm volatile ("ctc0 %0, $%1" \ - : /* outputs */ \ - : "r" (data), "i" (spr)); /* inputs */ +#define lbu_macro(data, addr) \ + asm volatile ("lbu %0, 0x0(%1)" \ + : "=r" (data) /* outputs */ \ + : "r" (addr)); /* inputs */ -#define lbu_macro(data, addr) \ - asm volatile ("lbu %0, 0x0(%1)" \ - : "=r" (data) /* outputs */ \ - : "r" (addr)); /* inputs */ +#define lb_macro(data, addr) \ + asm volatile ("lb %0, 0x0(%1)" \ + : "=r" (data) /* outputs */ \ + : "r" (addr)); /* inputs */ -#define lb_macro(data, addr) \ - asm volatile ("lb %0, 0x0(%1)" \ - : "=r" (data) /* outputs */ \ - : "r" (addr)); /* inputs */ +#define lwl_macro(data, addr) \ + asm volatile ("lwl %0, 0x0(%1)" \ + : "=r" (data) /* outputs */ \ + : "r" (addr)); /* inputs */ -#define lwl_macro(data, addr) \ - asm volatile ("lwl %0, 0x0(%1)" \ - : "=r" (data) /* outputs */ \ - : "r" (addr)); /* inputs */ +#define lwr_macro(data, addr) \ + asm volatile ("lwr %0, 0x0(%1)" \ + : "=r" (data) /* outputs */ \ + : "r" (addr)); /* inputs */ -#define lwr_macro(data, addr) \ - asm volatile ("lwr %0, 0x0(%1)" \ - : "=r" (data) /* outputs */ \ - : "r" (addr)); /* inputs */ +#define ldl_macro(data, addr) \ + asm volatile ("ldl %0, 0x0(%1)" \ + : "=r" (data) /* outputs */ \ + : "r" (addr)); /* inputs */ -#define ldl_macro(data, addr) \ - asm volatile ("ldl %0, 0x0(%1)" \ - : "=r" (data) /* outputs */ \ - : "r" (addr)); /* inputs */ +#define ldr_macro(data, addr) \ + asm volatile ("ldr %0, 0x0(%1)" \ + : "=r" (data) /* outputs */ \ + : "r" (addr)); /* inputs */ -#define ldr_macro(data, addr) \ - asm volatile ("ldr %0, 0x0(%1)" \ - : "=r" (data) /* outputs */ \ - : "r" (addr)); /* inputs */ +#define sb_macro(data, addr) \ + asm volatile ("sb %0, 0x0(%1)" \ + : /* outputs */ \ + : "r" (data), "r" (addr)); /* inputs */ -#define sb_macro(data, addr) \ - asm volatile ("sb %0, 0x0(%1)" \ - : /* outputs */ \ - : "r" (data), "r" (addr)); /* inputs */ +#define swl_macro(data, addr) \ + asm volatile ("swl %0, 0x0(%1)" \ + : /* outputs */ \ + : "r" (data), "r" (addr)); /* inputs */ -#define swl_macro(data, addr) \ - asm volatile ("swl %0, 0x0(%1)" \ - : /* outputs */ \ - : "r" (data), "r" (addr)); /* inputs */ +#define swr_macro(data, addr) \ + asm volatile ("swr %0, 0x0(%1)" \ + : /* outputs */ \ + : "r" (data), "r" (addr)); /* inputs */ -#define swr_macro(data, addr) \ - asm volatile ("swr %0, 0x0(%1)" \ - : /* outputs */ \ - : "r" (data), "r" (addr)); /* inputs */ +#define sdl_macro(data, addr) \ + asm volatile ("sdl %0, 0x0(%1)" \ + : /* outputs */ \ + : "r" (data), "r" (addr)); /* inputs */ -#define sdl_macro(data, addr) \ - asm volatile ("sdl %0, 0x0(%1)" \ - : /* outputs */ \ - : "r" (data), "r" (addr)); /* inputs */ +#define sdr_macro(data, addr) \ + asm volatile ("sdr %0, 0x0(%1)" \ + : /* outputs */ \ + : "r" (data), "r" (addr)); /* inputs */ -#define sdr_macro(data, addr) \ - asm volatile ("sdr %0, 0x0(%1)" \ - : /* outputs */ \ - : "r" (data), "r" (addr)); /* inputs */ +#define mfgr_macro(data, gr) \ + asm volatile ("move %0, $%1" \ + : "=r" (data) /* outputs */ \ + : "i" (gr)); /* inputs */ -#define mfgr_macro(data, gr) \ - asm volatile ("move %0, $%1" \ - : "=r" (data) /* outputs */ \ - : "i" (gr)); /* inputs */ +#define dmfc0_macro(data, spr) \ + asm volatile ("dmfc0 %0, $%1" \ + : "=r" (data) /* outputs */ \ + : "i" (spr)); /* inputs */ -#define dmfc0_macro(data, spr) \ - asm volatile ("dmfc0 %0, $%1" \ - : "=r" (data) /* outputs */ \ - : "i" (spr)); /* inputs */ - -#define dmtc0_macro(data, spr, sel) \ - asm volatile ("dmtc0 %0, $%1, %2" \ - : /* no outputs */ \ - : "r" (data), "i" (spr), "i" (sel)); /* inputs */ +#define dmtc0_macro(data, spr, sel) \ + asm volatile ("dmtc0 %0, $%1, %2" \ + : /* no outputs */ \ + : "r" (data), "i" (spr), "i" (sel)); /* inputs */ /* * The DYNAMIC_STATUS_MASK option adds an additional masking operation @@ -419,28 +415,26 @@ * XXX this is only currently implemented for mips3. */ #ifdef MIPS_DYNAMIC_STATUS_MASK -#define DYNAMIC_STATUS_MASK(sr,scratch) \ - lw scratch, mips_dynamic_status_mask; \ +#define DYNAMIC_STATUS_MASK(sr,scratch) \ + lw scratch, mips_dynamic_status_mask; \ and sr, sr, scratch -#define DYNAMIC_STATUS_MASK_TOUSER(sr,scratch1) \ +#define DYNAMIC_STATUS_MASK_TOUSER(sr,scratch1) \ ori sr, (MIPS_INT_MASK | MIPS_SR_INT_IE); \ DYNAMIC_STATUS_MASK(sr,scratch1) #else -#define DYNAMIC_STATUS_MASK(sr,scratch) -#define DYNAMIC_STATUS_MASK_TOUSER(sr,scratch1) +#define DYNAMIC_STATUS_MASK(sr,scratch) +#define DYNAMIC_STATUS_MASK_TOUSER(sr,scratch1) #endif #ifdef SMP - /* - * FREEBSD_DEVELOPERS_FIXME - * In multiprocessor case, store/retrieve the pcpu structure - * address for current CPU in scratch register for fast access. - */ - - + /* + * FREEBSD_DEVELOPERS_FIXME + * In multiprocessor case, store/retrieve the pcpu structure + * address for current CPU in scratch register for fast access. + */ #else -#define GET_CPU_PCPU(reg) \ +#define GET_CPU_PCPU(reg) \ lw reg, _C_LABEL(pcpup); #endif ==== //depot/projects/mips2-jnpr/src/sys/mips/include/atomic.h#3 (text+ko) ==== @@ -23,7 +23,8 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $FreeBSD: src/sys/alpha/include/atomic.h,v 1.21.2.3 2005/10/06 18:12:05 jhb Exp $ + * from: src/sys/alpha/include/atomic.h,v 1.21.2.3 2005/10/06 18:12:05 jhb + * $FreeBSD$ >>> TRUNCATED FOR MAIL (1000 lines) <<< From owner-p4-projects@FreeBSD.ORG Wed Jan 2 17:19:33 2008 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 3235716A41A; Wed, 2 Jan 2008 17:19:33 +0000 (UTC) Delivered-To: perforce@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id E928916A417 for ; Wed, 2 Jan 2008 17:19:32 +0000 (UTC) (envelope-from gonzo@FreeBSD.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id D84B413C442 for ; Wed, 2 Jan 2008 17:19:32 +0000 (UTC) (envelope-from gonzo@FreeBSD.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.1/8.14.1) with ESMTP id m02HJW4i055414 for ; Wed, 2 Jan 2008 17:19:32 GMT (envelope-from gonzo@FreeBSD.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.1/8.14.1/Submit) id m02HJWng055411 for perforce@freebsd.org; Wed, 2 Jan 2008 17:19:32 GMT (envelope-from gonzo@FreeBSD.org) Date: Wed, 2 Jan 2008 17:19:32 GMT Message-Id: <200801021719.m02HJWng055411@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to gonzo@FreeBSD.org using -f From: Oleksandr Tymoshenko To: Perforce Change Reviews Cc: Subject: PERFORCE change 132310 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 02 Jan 2008 17:19:33 -0000 http://perforce.freebsd.org/chv.cgi?CH=132310 Change 132310 by gonzo@gonzo_jeeves on 2008/01/02 17:19:10 o Use __builtin_va_start instead of __builtin_stdarg_start. GCC4 obsoletes the former and __builtin_va_start was present in all GCC version 3.1 and later. Affected files ... .. //depot/projects/mips2-jnpr/src/sys/mips/include/stdarg.h#4 edit Differences ... ==== //depot/projects/mips2-jnpr/src/sys/mips/include/stdarg.h#4 (text+ko) ==== @@ -15,7 +15,7 @@ #define _VA_LIST_DECLARED typedef __va_list va_list; #endif -#define va_start(v,l) __builtin_stdarg_start((v),l) +#define va_start(v,l) __builtin_va_start((v),l) #define va_end __builtin_va_end #define va_arg __builtin_va_arg #define va_copy __builtin_va_copy From owner-p4-projects@FreeBSD.ORG Wed Jan 2 17:22:36 2008 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 6E1A616A468; Wed, 2 Jan 2008 17:22:36 +0000 (UTC) Delivered-To: perforce@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 33DA416A420 for ; Wed, 2 Jan 2008 17:22:36 +0000 (UTC) (envelope-from gonzo@FreeBSD.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id 232D913C44B for ; Wed, 2 Jan 2008 17:22:36 +0000 (UTC) (envelope-from gonzo@FreeBSD.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.1/8.14.1) with ESMTP id m02HMaCq056918 for ; Wed, 2 Jan 2008 17:22:36 GMT (envelope-from gonzo@FreeBSD.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.1/8.14.1/Submit) id m02HMa3p056915 for perforce@freebsd.org; Wed, 2 Jan 2008 17:22:36 GMT (envelope-from gonzo@FreeBSD.org) Date: Wed, 2 Jan 2008 17:22:36 GMT Message-Id: <200801021722.m02HMa3p056915@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to gonzo@FreeBSD.org using -f From: Oleksandr Tymoshenko To: Perforce Change Reviews Cc: Subject: PERFORCE change 132311 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 02 Jan 2008 17:22:36 -0000 http://perforce.freebsd.org/chv.cgi?CH=132311 Change 132311 by gonzo@gonzo_jeeves on 2008/01/02 17:22:21 o Redefine __FBSDID for .S files to use .ident instead of __asm__ operator Affected files ... .. //depot/projects/mips2-jnpr/src/sys/mips/include/asm.h#4 edit Differences ... ==== //depot/projects/mips2-jnpr/src/sys/mips/include/asm.h#4 (text+ko) ==== @@ -61,6 +61,13 @@ #endif #include +#undef __FBSDID +#if !defined(lint) && !defined(STRIP_FBSDID) +#define __FBSDID(s) .ident s +#else +#define __FBSDID(s) /* nothing */ +#endif + /* * Define -pg profile entry code. * Must always be noreorder, must never use a macro instruction From owner-p4-projects@FreeBSD.ORG Wed Jan 2 17:22:37 2008 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 45CA316A50D; Wed, 2 Jan 2008 17:22:36 +0000 (UTC) Delivered-To: perforce@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 71D4916A469 for ; Wed, 2 Jan 2008 17:22:36 +0000 (UTC) (envelope-from imp@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id 47DC813C465 for ; Wed, 2 Jan 2008 17:22:36 +0000 (UTC) (envelope-from imp@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.1/8.14.1) with ESMTP id m02HMaLG056924 for ; Wed, 2 Jan 2008 17:22:36 GMT (envelope-from imp@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.1/8.14.1/Submit) id m02HMaIx056921 for perforce@freebsd.org; Wed, 2 Jan 2008 17:22:36 GMT (envelope-from imp@freebsd.org) Date: Wed, 2 Jan 2008 17:22:36 GMT Message-Id: <200801021722.m02HMaIx056921@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to imp@freebsd.org using -f From: Warner Losh To: Perforce Change Reviews Cc: Subject: PERFORCE change 132312 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 02 Jan 2008 17:22:37 -0000 http://perforce.freebsd.org/chv.cgi?CH=132312 Change 132312 by imp@imp_paco-paco on 2008/01/02 17:22:28 Add back missing ) that the style commits dropped. Affected files ... .. //depot/projects/mips2-jnpr/src/sys/mips/include/db_machdep.h#4 edit Differences ... ==== //depot/projects/mips2-jnpr/src/sys/mips/include/db_machdep.h#4 (text+ko) ==== @@ -94,6 +94,6 @@ int db_inst_type(int); void db_dump_tlb(int, int); db_addr_t branch_taken(int inst, db_addr_t pc); -void stacktrace_subr(db_regs_t *, int (*)(const char *, ...); +void stacktrace_subr(db_regs_t *, int (*)(const char *, ...)); #endif /* !_MIPS_DB_MACHDEP_H_ */ From owner-p4-projects@FreeBSD.ORG Wed Jan 2 17:26:41 2008 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id E2B9F16A418; Wed, 2 Jan 2008 17:26:40 +0000 (UTC) Delivered-To: perforce@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id A83E316A421 for ; Wed, 2 Jan 2008 17:26:40 +0000 (UTC) (envelope-from gonzo@FreeBSD.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id 977F313C4DB for ; Wed, 2 Jan 2008 17:26:40 +0000 (UTC) (envelope-from gonzo@FreeBSD.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.1/8.14.1) with ESMTP id m02HQeib059789 for ; Wed, 2 Jan 2008 17:26:40 GMT (envelope-from gonzo@FreeBSD.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.1/8.14.1/Submit) id m02HQe4b059780 for perforce@freebsd.org; Wed, 2 Jan 2008 17:26:40 GMT (envelope-from gonzo@FreeBSD.org) Date: Wed, 2 Jan 2008 17:26:40 GMT Message-Id: <200801021726.m02HQe4b059780@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to gonzo@FreeBSD.org using -f From: Oleksandr Tymoshenko To: Perforce Change Reviews Cc: Subject: PERFORCE change 132313 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 02 Jan 2008 17:26:41 -0000 http://perforce.freebsd.org/chv.cgi?CH=132313 Change 132313 by gonzo@gonzo_jeeves on 2008/01/02 17:25:57 o endian.h is used in asm.h to define LWLO/LWHI/SWLO/SWHI macroses depending on platform endianess, so hide non-assembler part of it by checking for __ASSEMBLER__ built-in macro. Affected files ... .. //depot/projects/mips2-jnpr/src/sys/mips/include/endian.h#4 edit Differences ... ==== //depot/projects/mips2-jnpr/src/sys/mips/include/endian.h#4 (text+ko) ==== @@ -60,6 +60,7 @@ #define _BYTE_ORDER _BIG_ENDIAN #ifndef _LOCORE +#ifndef __ASSEMBLER__ #include #if defined(__CC_SUPPORTS___INLINE) && defined(__GNUCLIKE_ASM) @@ -104,6 +105,7 @@ #endif /* __CC_SUPPORTS___INLINE && __GNUCLIKE_ASM */ +#endif /* !__ASSEMBLER__ */ #endif /* !_LOCORE */ /* From owner-p4-projects@FreeBSD.ORG Wed Jan 2 17:50:05 2008 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 1679A16A421; Wed, 2 Jan 2008 17:50:05 +0000 (UTC) Delivered-To: perforce@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id CC15516A41B for ; Wed, 2 Jan 2008 17:50:04 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id BA45213C465 for ; Wed, 2 Jan 2008 17:50:04 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.1/8.14.1) with ESMTP id m02Ho4M7068942 for ; Wed, 2 Jan 2008 17:50:04 GMT (envelope-from hselasky@FreeBSD.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.1/8.14.1/Submit) id m02Ho42p068939 for perforce@freebsd.org; Wed, 2 Jan 2008 17:50:04 GMT (envelope-from hselasky@FreeBSD.org) Date: Wed, 2 Jan 2008 17:50:04 GMT Message-Id: <200801021750.m02Ho42p068939@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky To: Perforce Change Reviews Cc: Subject: PERFORCE change 132314 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 02 Jan 2008 17:50:05 -0000 http://perforce.freebsd.org/chv.cgi?CH=132314 Change 132314 by hselasky@hselasky_laptop001 on 2008/01/02 17:49:59 The if_zyd firmware should be static and constant. We de-const it using USBD_ADD_BYTES() before passing it to the loader. Affected files ... .. //depot/projects/usb/src/sys/dev/usb/if_zydfw.h#6 edit Differences ... ==== //depot/projects/usb/src/sys/dev/usb/if_zydfw.h#6 (text+ko) ==== @@ -26,7 +26,7 @@ /* $FreeBSD: src/sys/dev/usb/if_zydfw.h,v 1.2 2007/11/03 19:24:51 sam Exp $ */ -uint8_t zd1211_firmware[] = { +static const uint8_t zd1211_firmware[] = { 0x08, 0x91, 0xFF, 0xED, 0x09, 0x93, 0x1E, 0xEE, 0xD1, 0x94, 0x11, 0xEE, 0x88, 0xD4, 0xD1, 0x96, 0xD1, 0x98, 0x5C, 0x99, 0x5C, 0x99, 0x4C, 0x99, @@ -672,9 +672,9 @@ /* * current zd1211b firmware version. */ -#define ZD1211B_FIRMWARE_VER 4705 +#define ZD1211B_FIRMWARE_VER 4705 -uint8_t zd1211b_firmware[] = { +static const uint8_t zd1211b_firmware[] = { 0x08, 0x91, 0xff, 0xed, 0x09, 0x93, 0x1e, 0xee, 0xd1, 0x94, 0x11, 0xee, 0x88, 0xd4, 0xd1, 0x96, 0xd1, 0x98, 0x5c, 0x99, 0x5c, 0x99, 0x4c, 0x99, 0x04, 0x9d, 0xd1, 0x98, 0xd1, 0x9a, 0x03, 0xee, 0xf4, From owner-p4-projects@FreeBSD.ORG Wed Jan 2 17:55:10 2008 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 96C3916A420; Wed, 2 Jan 2008 17:55:10 +0000 (UTC) Delivered-To: perforce@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 5C70616A41A for ; Wed, 2 Jan 2008 17:55:10 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id 4B23613C465 for ; Wed, 2 Jan 2008 17:55:10 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.1/8.14.1) with ESMTP id m02HtAev072084 for ; Wed, 2 Jan 2008 17:55:10 GMT (envelope-from hselasky@FreeBSD.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.1/8.14.1/Submit) id m02HtAYd072078 for perforce@freebsd.org; Wed, 2 Jan 2008 17:55:10 GMT (envelope-from hselasky@FreeBSD.org) Date: Wed, 2 Jan 2008 17:55:10 GMT Message-Id: <200801021755.m02HtAYd072078@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky To: Perforce Change Reviews Cc: Subject: PERFORCE change 132315 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 02 Jan 2008 17:55:10 -0000 http://perforce.freebsd.org/chv.cgi?CH=132315 Change 132315 by hselasky@hselasky_laptop001 on 2008/01/02 17:55:04 Some corrections and additions. Affected files ... .. //depot/projects/usb/src/sys/dev/usb/if_zydreg.h#13 edit Differences ... ==== //depot/projects/usb/src/sys/dev/usb/if_zydreg.h#13 (text+ko) ==== @@ -1066,6 +1066,7 @@ uint16_t count; } __packed; +#define ZYD_HW_PADDING 10 /* bytes */ #define ZYD_CONFIG_INDEX 0 #define ZYD_IFACE_INDEX 0 @@ -1079,7 +1080,6 @@ #define ZYD_MIN_FRAGSZ \ (sizeof(struct zyd_plcphdr) + IEEE80211_MIN_LEN + \ sizeof(struct zyd_rx_stat)) -#define ZYD_MIN_RXBUFSZ ZYD_MIN_FRAGSZ #define ZYX_MAX_RXBUFSZ \ ((sizeof (struct zyd_plcphdr) + IEEE80211_MAX_LEN + \ sizeof (struct zyd_rx_stat)) * ZYD_MAX_RXFRAMECNT + \ @@ -1140,25 +1140,28 @@ struct zyd_rf { /* RF methods */ - int (*init) (struct zyd_rf *); - int (*switch_radio) (struct zyd_rf *, int); - int (*set_channel) (struct zyd_rf *, uint8_t); - - /* RF attributes */ - struct zyd_softc *rf_sc; /* back-pointer */ - int width; + void (*cfg_init_hw) (struct zyd_softc *, struct zyd_rf *); + void (*cfg_switch_radio) (struct zyd_softc *, uint8_t on); + void (*cfg_set_channel) (struct zyd_softc *, struct zyd_rf *, uint8_t); + uint8_t width; }; -struct zyd_rq { - const uint16_t *idata; - struct zyd_pair *odata; - int len; - STAILQ_ENTRY(rq) rq; +enum { + ZYD_TR_BULK_DT_WR, + ZYD_TR_BULK_DT_RD, + ZYD_TR_BULK_CS_WR, + ZYD_TR_BULK_CS_RD, + ZYD_TR_INTR_DT_WR, + ZYD_TR_INTR_DT_RD, + ZYD_TR_INTR_CS_WR, + ZYD_TR_INTR_CS_RD, + ZYD_N_TRANSFER, }; struct zyd_softc { void *sc_evilhack; /* XXX this pointer must be first */ + struct ieee80211_amrr sc_amrr; struct ieee80211com sc_ic; struct zyd_rf sc_rf; struct usb_callout sc_watchdog; @@ -1167,8 +1170,8 @@ struct ieee80211_beacon_offsets sc_bo; struct zyd_rx_radiotap_header sc_rxtap; struct zyd_tx_radiotap_header sc_txtap; - struct zyd_rf sc_rf; - STAILQ_HEAD(rqh, zyd_rq) sc_rqh; + struct zyd_cmd sc_intr_ibuf; + struct zyd_cmd sc_intr_obuf; struct ifnet *sc_ifp; int (*sc_newstate) (struct ieee80211com *, @@ -1179,16 +1182,16 @@ uint32_t sc_rxtap_len; uint32_t sc_txtap_len; + uint32_t sc_unit; uint16_t sc_firmware_base; uint16_t sc_fw_ver; uint16_t sc_fwbase; uint16_t sc_fw_rev; - uint8_t sc_intr_obuf[ZYD_INTR_BUF_SIZE]; - uint8_t sc_intr_ibuf[ZYD_INTR_BUF_SIZE]; uint8_t sc_intr_iwakeup; uint8_t sc_intr_owakeup; + uint8_t sc_intr_ilen; uint8_t sc_intr_olen; uint8_t sc_regdomain; uint8_t sc_mac_rev; @@ -1212,5 +1215,38 @@ #define ZYD_FLAG_LL_READY 0x40 #define ZYD_FLAG_WAIT_COMMAND 0x80 + uint8_t sc_amrr_timer; + uint8_t sc_name[16]; }; + +struct zyd_config_copy { + struct { + uint32_t chan_to_ieee; + uint16_t ic_freq; + uint8_t chan_is_2ghz; + } ic_curchan; + + struct { + struct { + uint8_t chan_is_5ghz; + } ni_chan; + + uint16_t ni_intval; + uint8_t ni_bssid[IEEE80211_ADDR_LEN]; + } ic_bss; + + enum ieee80211_opmode ic_opmode; + enum ieee80211_state ic_state; + uint32_t ic_flags; + uint32_t if_flags; + + uint32_t zyd_multi_low; + uint32_t zyd_multi_high; + + uint16_t ic_txpowlimit; + uint16_t ic_curmode; + + uint8_t ic_myaddr[IEEE80211_ADDR_LEN]; + uint8_t if_broadcastaddr[IEEE80211_ADDR_LEN]; +}; From owner-p4-projects@FreeBSD.ORG Wed Jan 2 18:03:19 2008 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 66F9916A421; Wed, 2 Jan 2008 18:03:19 +0000 (UTC) Delivered-To: perforce@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 2B8F516A41B for ; Wed, 2 Jan 2008 18:03:19 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id 18F0B13C44B for ; Wed, 2 Jan 2008 18:03:19 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.1/8.14.1) with ESMTP id m02I3IbA075731 for ; Wed, 2 Jan 2008 18:03:18 GMT (envelope-from hselasky@FreeBSD.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.1/8.14.1/Submit) id m02I3Ih1075720 for perforce@freebsd.org; Wed, 2 Jan 2008 18:03:18 GMT (envelope-from hselasky@FreeBSD.org) Date: Wed, 2 Jan 2008 18:03:18 GMT Message-Id: <200801021803.m02I3Ih1075720@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky To: Perforce Change Reviews Cc: Subject: PERFORCE change 132316 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 02 Jan 2008 18:03:19 -0000 http://perforce.freebsd.org/chv.cgi?CH=132316 Change 132316 by hselasky@hselasky_laptop001 on 2008/01/02 18:02:18 Merge if_zyd.c from FreeBSD P4 head. The driver has been tested and confirmed to work. Additional bugfixes: o receive frame length was not correctly adjusted o added length check for incoming USB frames Affected files ... .. //depot/projects/usb/src/sys/dev/usb/if_zyd.c#30 edit Differences ... ==== //depot/projects/usb/src/sys/dev/usb/if_zyd.c#30 (text+ko) ==== @@ -1,11 +1,9 @@ -#if 0 +/* $OpenBSD: if_zyd.c,v 1.52 2007/02/11 00:08:04 jsg Exp $ */ +/* $NetBSD: if_zyd.c,v 1.7 2007/06/21 04:04:29 kiyohara Exp $ */ +/* $FreeBSD: src/sys/dev/usb/if_zyd.c,v 1.11 2007/12/01 08:53:03 kevlo Exp $ */ -XXX this driver needs to be updated ! - XXX-- hps - -/* $OpenBSD: if_zyd.c,v 1.27 2006/09/23 22:28:43 mglocker Exp $ */ - -/* +/*- + * Copyright (c) 2006 by Damien Bergamini * Copyright (c) 2006 by Florian Stoehr * * Permission to use, copy, modify, and distribute this software for any @@ -22,10 +20,10 @@ */ #include - __FBSDID("$FreeBSD: src/sys/dev/usb/if_zyd.c $"); +__FBSDID("$FreeBSD: src/sys/dev/usb/if_zyd.c $"); /* - * ZyDAS ZD1211 USB WLAN driver + * ZyDAS ZD1211/ZD1211B USB WLAN driver * * NOTE: all function names beginning like "zyd_cfg_" can only * be called from within the config thread function ! @@ -49,13 +47,11 @@ #include #include +#include #include - -#include -#include -#include -#include -#include +#include +#include +#include #define usbd_config_td_cc zyd_config_copy #define usbd_config_td_softc zyd_softc @@ -84,6 +80,9 @@ #define DPRINTF(...) #endif +#undef INDEXES +#define INDEXES(a) (sizeof(a) / sizeof((a)[0])) + struct mq { /* mini-queue */ struct mbuf *ifq_head; struct mbuf *ifq_tail; @@ -112,133 +111,132 @@ static usbd_config_td_command_t zyd_cfg_pre_stop; static usbd_config_td_command_t zyd_cfg_stop; static usbd_config_td_command_t zyd_config_copy; +static usbd_config_td_command_t zyd_cfg_scan_start; +static usbd_config_td_command_t zyd_cfg_scan_end; +static usbd_config_td_command_t zyd_cfg_set_rxfilter; +static usbd_config_td_command_t zyd_cfg_amrr_timeout; -static uint16_t zyd_getrealaddr(struct zyd_softc *sc, uint32_t mangled_addr); -static void zyd_cfg_usbrequest(struct zyd_softc *sc, uint8_t type, uint8_t request, uint16_t value, uint16_t index, uint16_t length, uint8_t *data); -static void zyd_cfg_usbrequestzc(struct zyd_softc *sc, struct zyd_control *zc); -static void zyd_cfg_reset(struct zyd_softc *sc); +static uint8_t zyd_plcp2ieee(uint8_t signal, uint8_t isofdm); +static struct ieee80211_node * zyd_node_alloc_cb(struct ieee80211_node_table *nt); +static void zyd_cfg_usbrequest(struct zyd_softc *sc, usb_device_request_t *req, uint8_t *data); static void zyd_cfg_usb_intr_read(struct zyd_softc *sc, void *data, uint32_t size); -static void zyd_cfg_usb_intr_write(struct zyd_softc *sc, void *data, uint32_t size); -static uint32_t zyd_addrinc(uint32_t addr); -static void zyd_cfg_read16(struct zyd_softc *sc, uint32_t addr, uint16_t *value); -static void zyd_cfg_read32(struct zyd_softc *sc, uint32_t addr, uint32_t *value); -static void zyd_cfg_read16_multi(struct zyd_softc *sc, const uint32_t *addrs, uint16_t *data, uint8_t usecount); -static void zyd_cfg_read32_multi(struct zyd_softc *sc, const uint32_t *addrs, uint32_t *data, uint8_t usecount); -static void zyd_cfg_write16(struct zyd_softc *sc, uint32_t addr, uint16_t value); -static void zyd_cfg_write32(struct zyd_softc *sc, uint32_t addr, uint32_t value); -static void zyd_cfg_write16_multi(struct zyd_softc *sc, const uint32_t *addrs, uint16_t *data, uint8_t usecount); -static void zyd_cfg_write32_multi(struct zyd_softc *sc, const uint32_t *addrs, uint32_t *data, uint8_t usecount); -static void zyd_cfg_write16_batch(struct zyd_softc *sc, const struct zyd_adpairs16 *data, uint32_t count); -static void zyd_cfg_write32_batch(struct zyd_softc *sc, const struct zyd_adpairs32 *data, uint32_t count); -static void zyd_cfg_rfwrite(struct zyd_softc *sc, uint32_t value, uint8_t bits); -static void zyd_cfg_stateoutput(struct zyd_softc *sc); -static void zyd_rxframeproc(struct usbd_xfer *xfer, struct mq *mq, uint16_t offset, uint16_t len); -static uint8_t zyd_cfg_uploadfirmware(struct zyd_softc *sc); +static void zyd_cfg_usb_intr_write(struct zyd_softc *sc, const void *data, uint16_t code, uint32_t size); +static void zyd_cfg_read16(struct zyd_softc *sc, uint16_t addr, uint16_t *value); +static void zyd_cfg_read32(struct zyd_softc *sc, uint16_t addr, uint32_t *value); +static void zyd_cfg_write16(struct zyd_softc *sc, uint16_t addr, uint16_t value); +static void zyd_cfg_write32(struct zyd_softc *sc, uint16_t addr, uint32_t value); +static void zyd_cfg_rfwrite(struct zyd_softc *sc, uint32_t value); +static uint8_t zyd_cfg_uploadfirmware(struct zyd_softc *sc, const uint8_t *fw_ptr, uint32_t fw_len); static void zyd_cfg_lock_phy(struct zyd_softc *sc); static void zyd_cfg_unlock_phy(struct zyd_softc *sc); -static void zyd_cfg_get_aw_pt_bi(struct zyd_softc *sc, struct zyd_aw_pt_bi *s); -static void zyd_cfg_set_aw_pt_bi(struct zyd_softc *sc, struct zyd_aw_pt_bi *s); static void zyd_cfg_set_beacon_interval(struct zyd_softc *sc, uint32_t interval); static const char *zyd_rf_name(uint8_t type); -static void zyd_cfg_read_rf_pa_types(struct zyd_softc *sc, uint8_t *rf_type, uint8_t *pa_type); static void zyd_cfg_rf_rfmd_init(struct zyd_softc *sc, struct zyd_rf *rf); -static void zyd_cfg_rf_rfmd_switchradio(struct zyd_softc *sc, uint8_t onoff); +static void zyd_cfg_rf_rfmd_switch_radio(struct zyd_softc *sc, uint8_t onoff); static void zyd_cfg_rf_rfmd_set_channel(struct zyd_softc *sc, struct zyd_rf *rf, uint8_t channel); -static void zyd_cfg_rf_al2230_switchradio(struct zyd_softc *sc, uint8_t onoff); +static void zyd_cfg_rf_al2230_switch_radio(struct zyd_softc *sc, uint8_t onoff); static void zyd_cfg_rf_al2230_init(struct zyd_softc *sc, struct zyd_rf *rf); +static void zyd_cfg_rf_al2230_init_b(struct zyd_softc *sc, struct zyd_rf *rf); static void zyd_cfg_rf_al2230_set_channel(struct zyd_softc *sc, struct zyd_rf *rf, uint8_t channel); -static uint8_t zyd_cfg_rf_init_hw(struct zyd_softc *sc, struct zyd_rf *rf, uint8_t type); +static uint8_t zyd_cfg_rf_init_hw(struct zyd_softc *sc, struct zyd_rf *rf); static uint8_t zyd_cfg_hw_init(struct zyd_softc *sc, struct ieee80211com *ic); -static void zyd_cfg_get_e2p_mac_addr(struct zyd_softc *sc, struct zyd_macaddr *mac_addr); static void zyd_cfg_set_mac_addr(struct zyd_softc *sc, const uint8_t *addr); -static void zyd_cfg_read_regdomain(struct zyd_softc *sc, uint8_t *regdomain); -static uint8_t zyd_regdomain_supported(uint8_t regdomain); -static void zyd_cfg_tblreader(struct zyd_softc *sc, uint8_t *values, size_t count, uint32_t e2p_addr, uint32_t guard); -static void zyd_cfg_readcaltables(struct zyd_softc *sc); -static uint8_t zyd_reset_channel(struct zyd_softc *sc); -static void zyd_cfg_set_encryption_type(struct zyd_softc *sc, uint32_t type); static void zyd_cfg_switch_radio(struct zyd_softc *sc, uint8_t onoff); -static void zyd_cfg_enable_hwint(struct zyd_softc *sc); -static void zyd_cfg_disable_hwint(struct zyd_softc *sc); -static void zyd_cfg_set_basic_rates(struct zyd_softc *sc, int mode); -static void zyd_cfg_set_mandatory_rates(struct zyd_softc *sc, int mode); -static void zyd_cfg_reset_mode(struct zyd_softc *sc); static void zyd_cfg_set_bssid(struct zyd_softc *sc, uint8_t *addr); static int zyd_media_change_cb(struct ifnet *ifp); static int zyd_newstate_cb(struct ieee80211com *ic, enum ieee80211_state nstate, int arg); -static uint16_t zyd_txtime(uint16_t len, uint8_t rate, uint32_t flags); static uint8_t zyd_plcp_signal(uint8_t rate); -static uint16_t zyd_calc_useclen(uint8_t rate, uint16_t len, uint8_t *service); -static void zyd_setup_tx_desc(struct usbd_xfer *xfer, struct mbuf *m, uint16_t rate); -static void zyd_cfg_dump_fw_registers(struct zyd_softc *sc); -static uint8_t zyd_tx_frame(struct usbd_xfer *xfer, struct mbuf *m0, struct ieee80211_node *ni, uint8_t rate); static void zyd_start_transfers(struct zyd_softc *sc); static void zyd_start_cb(struct ifnet *ifp); static void zyd_init_cb(void *arg); -static int zyd_reset_cb(struct ifnet *ifp); static int zyd_ioctl_cb(struct ifnet *ifp, u_long command, caddr_t data); static void zyd_watchdog(void *arg); -static void zyd_next_scan(void *arg); static void zyd_end_of_commands(struct zyd_softc *sc); +static void zyd_newassoc_cb(struct ieee80211_node *ni, int isnew); +static void zyd_scan_start_cb(struct ieee80211com *ic); +static void zyd_scan_end_cb(struct ieee80211com *ic); +static void zyd_set_channel_cb(struct ieee80211com *ic); +static void zyd_cfg_set_led(struct zyd_softc *sc, uint32_t which, uint8_t on); -static const struct usb_devno zyd_devs[] = { - {USB_VENDOR_3COM2, USB_PRODUCT_3COM2_3CRUSB10075}, - {USB_VENDOR_ABOCOM, USB_PRODUCT_ABOCOM_WL54}, - {USB_VENDOR_ASUS, USB_PRODUCT_ASUS_WL159G}, - {USB_VENDOR_BELKIN, USB_PRODUCT_BELKIN_F5D7050C}, - {USB_VENDOR_CYBERTAN, USB_PRODUCT_CYBERTAN_TG54USB}, - {USB_VENDOR_DRAYTEK, USB_PRODUCT_DRAYTEK_VIGOR550}, - {USB_VENDOR_PLANEX2, USB_PRODUCT_PLANEX2_GWUS54GZL}, - {USB_VENDOR_PLANEX3, USB_PRODUCT_PLANEX3_GWUS54MINI}, - {USB_VENDOR_SAGEM, USB_PRODUCT_SAGEM_XG760A}, - {USB_VENDOR_SITECOMEU, USB_PRODUCT_SITECOMEU_WL113}, - {USB_VENDOR_SWEEX, USB_PRODUCT_SWEEX_ZD1211}, - {USB_VENDOR_TEKRAM, USB_PRODUCT_TEKRAM_QUICKWLAN}, - {USB_VENDOR_TEKRAM, USB_PRODUCT_TEKRAM_ZD1211}, - {USB_VENDOR_TWINMOS, USB_PRODUCT_TWINMOS_G240}, - {USB_VENDOR_UMEDIA, USB_PRODUCT_UMEDIA_TEW429UB_A}, - {USB_VENDOR_UMEDIA, USB_PRODUCT_UMEDIA_TEW429UB}, - {USB_VENDOR_WISTRONNEWEB, USB_PRODUCT_WISTRONNEWEB_UR055G}, - {USB_VENDOR_ZYDAS, USB_PRODUCT_ZYDAS_ZD1211}, - {USB_VENDOR_ZYXEL, USB_PRODUCT_ZYXEL_ZYAIRG220} -}; +static const struct zyd_phy_pair zyd_def_phy[] = ZYD_DEF_PHY; +static const struct zyd_phy_pair zyd_def_phyB[] = ZYD_DEF_PHYB; -/* Device, regardless of RF */ -static const struct zyd_adpairs16 zyd_def_cr[] = { - ZYD_DEF_CR -}; +/* various supported device vendors/products */ +#define ZYD_ZD1211_DEV(v, p) \ + { { USB_VENDOR_##v, USB_PRODUCT_##v##_##p }, ZYD_ZD1211 } +#define ZYD_ZD1211B_DEV(v, p) \ + { { USB_VENDOR_##v, USB_PRODUCT_##v##_##p }, ZYD_ZD1211B } +static const struct zyd_type { + struct usb_devno dev; + uint8_t rev; +#define ZYD_ZD1211 0 +#define ZYD_ZD1211B 1 +} zyd_devs[] = { + ZYD_ZD1211_DEV(3COM2, 3CRUSB10075), + ZYD_ZD1211_DEV(ABOCOM, WL54), + ZYD_ZD1211_DEV(ASUS, WL159G), + ZYD_ZD1211_DEV(CYBERTAN, TG54USB), + ZYD_ZD1211_DEV(DRAYTEK, VIGOR550), + ZYD_ZD1211_DEV(PLANEX2, GWUS54GD), + ZYD_ZD1211_DEV(PLANEX2, GWUS54GZL), + ZYD_ZD1211_DEV(PLANEX3, GWUS54GZ), + ZYD_ZD1211_DEV(PLANEX3, GWUS54MINI), + ZYD_ZD1211_DEV(SAGEM, XG760A), + ZYD_ZD1211_DEV(SENAO, NUB8301), + ZYD_ZD1211_DEV(SITECOMEU, WL113), + ZYD_ZD1211_DEV(SWEEX, ZD1211), + ZYD_ZD1211_DEV(TEKRAM, QUICKWLAN), + ZYD_ZD1211_DEV(TEKRAM, ZD1211_1), + ZYD_ZD1211_DEV(TEKRAM, ZD1211_2), + ZYD_ZD1211_DEV(TWINMOS, G240), + ZYD_ZD1211_DEV(UMEDIA, ALL0298V2), + ZYD_ZD1211_DEV(UMEDIA, TEW429UB_A), + ZYD_ZD1211_DEV(UMEDIA, TEW429UB), + ZYD_ZD1211_DEV(WISTRONNEWEB, UR055G), + ZYD_ZD1211_DEV(ZCOM, ZD1211), + ZYD_ZD1211_DEV(ZYDAS, ZD1211), + ZYD_ZD1211_DEV(ZYXEL, AG225H), + ZYD_ZD1211_DEV(ZYXEL, ZYAIRG220), + ZYD_ZD1211_DEV(ZYXEL, G200V2), -static const struct zyd_adpairs32 zyd_def_mac[] = { - ZYD_DEF_MAC + ZYD_ZD1211B_DEV(ACCTON, SMCWUSBG), + ZYD_ZD1211B_DEV(ACCTON, ZD1211B), + ZYD_ZD1211B_DEV(ASUS, A9T_WIFI), + ZYD_ZD1211B_DEV(BELKIN, F5D7050_V4000), + ZYD_ZD1211B_DEV(BELKIN, ZD1211B), + ZYD_ZD1211B_DEV(CISCOLINKSYS, WUSBF54G), + ZYD_ZD1211B_DEV(FIBERLINE, WL430U), + ZYD_ZD1211B_DEV(MELCO, KG54L), + ZYD_ZD1211B_DEV(PHILIPS, SNU5600), + ZYD_ZD1211B_DEV(PLANEX2, GW_US54GXS), + ZYD_ZD1211B_DEV(SAGEM, XG76NA), + ZYD_ZD1211B_DEV(SITECOMEU, ZD1211B), + ZYD_ZD1211B_DEV(UMEDIA, TEW429UBC1), +#if 0 /* Shall we needs? */ + ZYD_ZD1211B_DEV(UNKNOWN1, ZD1211B_1), + ZYD_ZD1211B_DEV(UNKNOWN1, ZD1211B_2), + ZYD_ZD1211B_DEV(UNKNOWN2, ZD1211B), + ZYD_ZD1211B_DEV(UNKNOWN3, ZD1211B), +#endif + ZYD_ZD1211B_DEV(USR, USR5423), + ZYD_ZD1211B_DEV(VTECH, ZD1211B), + ZYD_ZD1211B_DEV(ZCOM, ZD1211B), + ZYD_ZD1211B_DEV(ZYDAS, ZD1211B), + ZYD_ZD1211B_DEV(ZYXEL, M202), + ZYD_ZD1211B_DEV(ZYXEL, G220V2), }; +#define zyd_lookup(v, p) \ + ((const struct zyd_type *)usb_lookup(zyd_devs, v, p)) -/* RF2959 */ -static const struct zyd_adpairs16 zyd_rfmd_cr[] = { - ZYD_RFMD_CR -}; - -static const uint32_t zyd_rfmd_rf[] = { - ZYD_RFMD_RF -}; - -/* AL2230 */ -static const struct zyd_adpairs16 zyd_al2230_cr[] = { - ZYD_AL2230_CR -}; - -static const uint32_t zyd_al2230_rf[] = { - ZYD_AL2230_RF -}; - -static const struct usbd_config zyd_config[ZYD_TR_MAX] = { +static const struct usbd_config zyd_config[ZYD_N_TRANSFER] = { [ZYD_TR_BULK_DT_WR] = { .type = UE_BULK, .endpoint = UE_ADDR_ANY, .direction = UE_DIR_OUT, - .bufsize = (MCLBYTES + sizeof(struct zyd_controlsetformat) + 1), + .bufsize = ZYD_MAX_TXBUFSZ, .mh.flags = {.pipe_bof = 1,.force_short_xfer = 1,}, .mh.callback = &zyd_bulk_write_callback, - .index = 0, + .ep_index = 0, .mh.timeout = 10000, /* 10 seconds */ }, @@ -246,10 +244,10 @@ .type = UE_BULK, .endpoint = UE_ADDR_ANY, .direction = UE_DIR_IN, - .bufsize = (MAX(MCLBYTES, 2312) + sizeof(struct zyd_rxleninfoapp)), + .bufsize = ZYX_MAX_RXBUFSZ, .mh.flags = {.pipe_bof = 1,.short_xfer_ok = 1,}, .mh.callback = &zyd_bulk_read_callback, - .index = 0, + .ep_index = 0, }, [ZYD_TR_BULK_CS_WR] = { @@ -278,22 +276,21 @@ .type = UE_BULK_INTR, .endpoint = UE_ADDR_ANY, .direction = UE_DIR_OUT, - .bufsize = ZYD_INTR_BUF_SIZE, + .bufsize = sizeof(struct zyd_cmd), .mh.flags = {.pipe_bof = 1,.force_short_xfer = 1,}, .mh.callback = &zyd_intr_write_callback, .mh.timeout = 1000, /* 1 second */ - .index = 1, + .ep_index = 1, }, [ZYD_TR_INTR_DT_RD] = { .type = UE_BULK_INTR, .endpoint = UE_ADDR_ANY, .direction = UE_DIR_IN, - .bufsize = ZYD_INTR_BUF_SIZE, + .bufsize = sizeof(struct zyd_cmd), .mh.flags = {.pipe_bof = 1,.short_xfer_ok = 1,}, .mh.callback = &zyd_intr_read_callback, - .mh.timeout = 1000, /* 1 second */ - .index = 1, + .ep_index = 1, }, [ZYD_TR_INTR_CS_WR] = { @@ -337,111 +334,61 @@ DRIVER_MODULE(zyd, uhub, zyd_driver, zyd_devclass, usbd_driver_load, 0); MODULE_DEPEND(zyd, usb, 1, 1, 1); MODULE_DEPEND(zyd, wlan, 1, 1, 1); +MODULE_DEPEND(zyd, wlan_amrr, 1, 1, 1); -/* - * Get the real address from a range-mangled address - */ -static uint16_t -zyd_getrealaddr(struct zyd_softc *sc, uint32_t mangled_addr) +static uint8_t +zyd_plcp2ieee(uint8_t signal, uint8_t isofdm) { - uint16_t add; - uint16_t res; + if (isofdm) { + static const uint8_t ofdmrates[16] = + { 0, 0, 0, 0, 0, 0, 0, 96, 48, 24, 12, 108, 72, 36, 18 }; + return ofdmrates[signal & 0xf]; + } else { + static const uint8_t cckrates[16] = + { 0, 0, 0, 0, 4, 0, 0, 11, 0, 0, 2, 0, 0, 0, 22, 0 }; + return cckrates[signal & 0xf]; + } +} - add = 0; - - switch (ZYD_GET_RANGE(mangled_addr)) { - case ZYD_RANGE_USB: - break; - - case ZYD_RANGE_CTL: - add = ZYD_CTRL_START_ADDR; - break; - - case ZYD_RANGE_E2P: - add = ZYD_E2P_START_ADDR; - break; - - case ZYD_RANGE_FW: - add = sc->sc_firmware_base; - break; - } - - res = (add + ZYD_GET_OFFS(mangled_addr)); - - return (res); +/* ARGUSED */ +static struct ieee80211_node * +zyd_node_alloc_cb(struct ieee80211_node_table *nt __unused) +{ + struct zyd_node *zn; + zn = malloc(sizeof(struct zyd_node), M_80211_NODE, M_WAITOK | M_ZERO); + return ((zn != NULL) ? (&zn->ni) : NULL); } - /* * USB request basic wrapper */ static void -zyd_cfg_usbrequest(struct zyd_softc *sc, uint8_t type, uint8_t request, - uint16_t value, uint16_t index, uint16_t length, uint8_t *data) +zyd_cfg_usbrequest(struct zyd_softc *sc, usb_device_request_t *req, uint8_t *data) { - usb_device_request_t req; usbd_status_t err; - - req.bmRequestType = type; - req.bRequest = request; - USETW(req.wValue, value); - USETW(req.wIndex, index); - USETW(req.wLength, length); + uint16_t length; - DPRINTF(sc, 20, "req=%02x val=%02x ind=%02x " - "len=%02x\n", request, - value, index, length); - if (usbd_config_td_is_gone(&(sc->sc_config_td))) { goto error; } err = usbd_do_request_flags - (sc->sc_udev, &(sc->sc_mtx), &req, data, 0, NULL, 10000); + (sc->sc_udev, &(sc->sc_mtx), req, data, 0, NULL, 1000); if (err) { - printf("%s: device request failed, err=%s " - "(ignored)\n", sc->sc_name, usbd_errstr(err)); + DPRINTF(sc, -1, "%s: device request failed, err=%s " + "(ignored)\n", sc->sc_name, usbd_errstr(err)); error: - length = UGETW(req.wLength); + length = UGETW(req->wLength); - if ((req.bmRequestType & UT_READ) && length) { + if ((req->bmRequestType & UT_READ) && length) { bzero(data, length); } } return; } -/* - * Same, higher level - */ -static void -zyd_cfg_usbrequestzc(struct zyd_softc *sc, struct zyd_control *zc) -{ - return (zyd_cfg_usbrequest(sc, zc->type, zc->id, zc->value, - zc->index, zc->length, zc->data)); -} - -/* - * Issue a SET_CONFIGURATION command, which will reset the device. - */ -static void -zyd_cfg_reset(struct zyd_softc *sc) -{ - usbd_status_t err; - - err = usbreq_set_config(sc->sc_udev, &(sc->sc_mtx), ZYD_CONFIG_NO); - - if (err) { - DPRINTF(sc, 0, "reset failed (ignored)\n"); - } - /* Wait a little while for the chip to get its brains in order. */ - err = usbd_config_td_sleep(&(sc->sc_config_td), hz / 10); - - return; -} - static void zyd_intr_read_clear_stall_callback(struct usbd_xfer *xfer) { @@ -463,47 +410,148 @@ zyd_intr_read_callback(struct usbd_xfer *xfer) { struct zyd_softc *sc = xfer->priv_sc; + struct zyd_cmd *cmd = &(sc->sc_intr_ibuf); + uint32_t actlen; + uint32_t x; switch (USBD_GET_STATE(xfer)) { case USBD_ST_TRANSFERRED: - DPRINTF(sc, 2, "length=%d\n", xfer->actlen); + actlen = xfer->actlen; + + DPRINTF(sc, 2, "length=%d\n", actlen); + + if (actlen > sizeof(sc->sc_intr_ibuf)) { + actlen = sizeof(sc->sc_intr_ibuf); + } + usbd_copy_out(xfer->frbuffers + 0, 0, + &(sc->sc_intr_ibuf), actlen); - if (xfer->actlen > sizeof(sc->sc_intr_ibuf)) { - xfer->actlen = sizeof(sc->sc_intr_ibuf); + switch(cmd->code) { + case htole16(ZYD_NOTIF_RETRYSTATUS): + goto handle_notif_retrystatus; + case htole16(ZYD_NOTIF_IORD): + goto handle_notif_iord; + default: + DPRINTF(sc, 1, "unknown indication: 0x%04x\n", + le16toh(cmd->code)); } - usbd_copy_out(xfer->frbuffers + 0, 0, &(sc->sc_intr_ibuf), - xfer->actlen); - goto wakeup; + + /* fallthrough */ case USBD_ST_SETUP: - + tr_setup: if (sc->sc_flags & ZYD_FLAG_INTR_READ_STALL) { usbd_transfer_start(sc->sc_xfer[ZYD_TR_INTR_CS_RD]); - goto wakeup; - } - if (sc->sc_intr_iwakeup) { - xfer->frlengths[0] = xfer->max_data_length; - usbd_start_hardware(xfer); + break; } - return; -wakeup: - sc->sc_intr_iwakeup = 0; - wakeup(&(sc->sc_intr_iwakeup)); - return; + xfer->frlengths[0] = xfer->max_data_length; + usbd_start_hardware(xfer); + break; default: /* Error */ - DPRINTF(sc, 2, "error=%d\n", xfer->error); + DPRINTF(sc, 2, "error = %s\n", + usbd_errstr(xfer->error)); if (xfer->error != USBD_CANCELLED) { /* try to clear stall first */ sc->sc_flags |= ZYD_FLAG_INTR_READ_STALL; usbd_transfer_start(sc->sc_xfer[ZYD_TR_INTR_CS_RD]); + } else { + /* tearing down */ + if (sc->sc_intr_iwakeup) { + bzero(sc->sc_intr_ibuf.data, sc->sc_intr_ilen); + wakeup(&(sc->sc_intr_iwakeup)); + } } - goto wakeup; + break; + } + return; + +handle_notif_retrystatus: { + + struct zyd_notif_retry *retry = (void *)(cmd->data); + struct ieee80211com *ic = &sc->sc_ic; + struct ifnet *ifp = sc->sc_ifp; + struct ieee80211_node *ni; + + DPRINTF(sc, 0, "retry intr: rate=0x%x " + "addr=%02x:%02x:%02x:%02x:%02x:%02x count=%d (0x%x)\n", + le16toh(retry->rate), retry->macaddr[0], retry->macaddr[1], + retry->macaddr[2], retry->macaddr[3], retry->macaddr[4], + retry->macaddr[5], le16toh(retry->count) & 0xff, + le16toh(retry->count)); + + /* + * Find the node to which the packet was sent and update its + * retry statistics. In BSS mode, this node is the AP we're + * associated to so no lookup is actually needed. + */ + if (ic->ic_opmode != IEEE80211_M_STA) { + ni = ieee80211_find_node(&ic->ic_sta, retry->macaddr); + } else { + ni = ic->ic_bss; + } + if (ni == NULL) { + goto tr_setup; + } + + ((struct zyd_node *)ni)->amn.amn_retrycnt++; + if (retry->count & htole16(0x100)) { + ifp->if_oerrors++; /* too many retries */ } + goto tr_setup; +} + +handle_notif_iord: + + if (*(uint16_t *)cmd->data == htole16(ZYD_CR_INTERRUPT)) { + goto tr_setup; /* HMAC interrupt */ + } + + if (actlen < 4) { + goto tr_setup; /* too short */ + } + + actlen -= 4; + + if (actlen != sc->sc_intr_ilen) { + DPRINTF(sc, -1, "unexpected length %u != %u\n", + actlen, sc->sc_intr_ilen); + goto tr_setup; /* invalid length */ + } + + actlen /= 4; + + /* verify register values */ + for (x = 0; x != actlen; x++) { + if (sc->sc_intr_obuf.data[(2*x)] != + sc->sc_intr_ibuf.data[(4*x)]) { + /* invalid register */ + DPRINTF(sc, 0, "Invalid register (1)!\n"); + goto tr_setup; + } + if (sc->sc_intr_obuf.data[(2*x) + 1] != + sc->sc_intr_ibuf.data[(4*x) + 1]) { + /* invalid register */ + DPRINTF(sc, 0, "Invalid register (2)!\n"); + goto tr_setup; + } + } + + if (sc->sc_intr_iwakeup) { + sc->sc_intr_iwakeup = 0; + wakeup(&(sc->sc_intr_iwakeup)); + } else { + sc->sc_intr_iwakeup = 1; + } + /* + * We pause reading data from the interrupt endpoint until + * the data has been picked up! + */ + return; } /* @@ -512,28 +560,48 @@ static void zyd_cfg_usb_intr_read(struct zyd_softc *sc, void *data, uint32_t size) { - int error; - - if (size > sizeof(sc->sc_intr_ibuf)) { - DPRINTF(sc, 0, "truncating transfer size!\n"); - size = sizeof(sc->sc_intr_ibuf); + if (size > sizeof(sc->sc_intr_ibuf.data)) { + DPRINTF(sc, -1, "truncating transfer size!\n"); + size = sizeof(sc->sc_intr_ibuf.data); } if (usbd_config_td_is_gone(&(sc->sc_config_td))) { bzero(data, size); goto done; } + + if (sc->sc_intr_iwakeup) { + DPRINTF(sc, 0, "got data already!\n"); + sc->sc_intr_iwakeup = 0; + goto got_data; + } + + /* else wait for data */ + sc->sc_intr_iwakeup = 1; + sc->sc_intr_ilen = size; - bzero(&(sc->sc_intr_ibuf), size); - usbd_transfer_start(sc->sc_xfer[ZYD_TR_INTR_DT_RD]); - if (sc->sc_intr_iwakeup) { - error = mtx_sleep(&(sc->sc_intr_iwakeup), &(sc->sc_mtx), 0, - "zyd isleep", 0); + while (sc->sc_intr_iwakeup) { + if (mtx_sleep(&(sc->sc_intr_iwakeup), &(sc->sc_mtx), 0, + "zyd-ird", hz/2)) { + /* should not happen */ + } + if (usbd_config_td_is_gone(&(sc->sc_config_td))) { + sc->sc_intr_iwakeup = 0; + bzero(data, size); + goto done; + } } - bcopy(&(sc->sc_intr_ibuf), data, size); + +got_data: + bcopy(sc->sc_intr_ibuf.data, data, size); + /* + * We have fetched the data from the shared buffer and it is + * safe to restart the interrupt transfer! + */ + usbd_transfer_start(sc->sc_xfer[ZYD_TR_INTR_DT_RD]); done: return; } @@ -575,15 +643,11 @@ xfer->frlengths[0] = sc->sc_intr_olen; usbd_start_hardware(xfer); } - return; + break; -wakeup: - sc->sc_intr_owakeup = 0; - wakeup(&(sc->sc_intr_owakeup)); - return; - default: /* Error */ - DPRINTF(sc, 2, "error=%d\n", xfer->error); + DPRINTF(sc, 2, "error = %s\n", + usbd_errstr(xfer->error)); if (xfer->error != USBD_CANCELLED) { /* try to clear stall first */ @@ -591,8 +655,15 @@ usbd_transfer_start(sc->sc_xfer[ZYD_TR_INTR_CS_WR]); } goto wakeup; + } + return; +wakeup: + if (sc->sc_intr_owakeup) { + sc->sc_intr_owakeup = 0; + wakeup(&(sc->sc_intr_owakeup)); } + return; } /* @@ -602,431 +673,222 @@ * full speed mode, EP4 is bulk out, not interrupt out. */ static void -zyd_cfg_usb_intr_write(struct zyd_softc *sc, void *data, uint32_t size) +zyd_cfg_usb_intr_write(struct zyd_softc *sc, const void *data, +uint16_t code, uint32_t size) { - int error; - - if (size > sizeof(sc->sc_intr_obuf)) { - DPRINTF(sc, 0, "truncating transfer size!\n"); - size = sizeof(sc->sc_intr_obuf); + if (size > sizeof(sc->sc_intr_obuf.data)) { + DPRINTF(sc, -1, "truncating transfer size!\n"); + size = sizeof(sc->sc_intr_obuf.data); } if (usbd_config_td_is_gone(&(sc->sc_config_td))) { goto done; } - sc->sc_intr_olen = size; + sc->sc_intr_olen = size + 2; sc->sc_intr_owakeup = 1; - bcopy(data, sc->sc_intr_obuf, size); + sc->sc_intr_obuf.code = htole16(code); + bcopy(data, sc->sc_intr_obuf.data, size); usbd_transfer_start(sc->sc_xfer[ZYD_TR_INTR_DT_WR]); - if (sc->sc_intr_owakeup) { - error = mtx_sleep(&(sc->sc_intr_owakeup), &(sc->sc_mtx), 0, - "zyd osleep", 0); + while (sc->sc_intr_owakeup) { + if (mtx_sleep(&(sc->sc_intr_owakeup), &(sc->sc_mtx), 0, + "zyd-iwr", hz/2)) { + } + + if (usbd_config_td_is_gone(&(sc->sc_config_td))) { + sc->sc_intr_owakeup = 0; + goto done; + } } done: return; } -/* - * Offset correction (all ranges except CTL use word addressing) - */ -static uint32_t -zyd_addrinc(uint32_t addr) -{ - uint32_t range = ZYD_GET_RANGE(addr); - uint32_t offs = ZYD_GET_OFFS(addr); - - offs += (range == ZYD_RANGE_CTL) ? 2 : 1; - - return (range | offs); -} - -/* - * Read a single 16-bit register - */ static void -zyd_cfg_read16(struct zyd_softc *sc, uint32_t addr, uint16_t *value) +zyd_cfg_cmd(struct zyd_softc *sc, uint16_t code, const void *idata, uint16_t ilen, + void *odata, uint16_t olen, uint16_t flags) { - zyd_cfg_read16_multi(sc, &addr, value, 1); - return; -} + zyd_cfg_usb_intr_write(sc, idata, code, ilen); -/* - * Read a single 32-bit register - */ -static void -zyd_cfg_read32(struct zyd_softc *sc, uint32_t addr, uint32_t *value) -{ - zyd_cfg_read32_multi(sc, &addr, value, 1); + if (flags & ZYD_CMD_FLAG_READ) { + zyd_cfg_usb_intr_read(sc, odata, olen); + } return; } -/* - * Read up to 15 16-bit registers (newer firmware versions) - */ static void -zyd_cfg_read16_multi(struct zyd_softc *sc, const uint32_t *addrs, uint16_t *data, - uint8_t usecount) +zyd_cfg_read16(struct zyd_softc *sc, uint16_t addr, uint16_t *value) { - struct zyd_intoutmultiread in; - struct zyd_intinmultioutput op; - uint8_t i; - - memset(&in, 0, sizeof(struct zyd_intoutmultiread)); - memset(&op, 0, sizeof(struct zyd_intinmultioutput)); - - USETW(in.id, ZYD_CMD_IORDREQ); - - for (i = 0; i < usecount; i++) - USETW(in.addr[i], zyd_getrealaddr(sc, addrs[i])); - - zyd_cfg_usb_intr_write(sc, &in, (2 + (usecount * 2))); - zyd_cfg_usb_intr_read(sc, &op, (2 + (usecount * 4))); - - for (i = 0; i < usecount; i++) { - data[i] = UGETW(op.registers[i].data); - } + struct zyd_pair tmp[1]; + addr = htole16(addr); + zyd_cfg_cmd(sc, ZYD_CMD_IORD, &addr, sizeof(addr), + tmp, sizeof(tmp), ZYD_CMD_FLAG_READ); + *value = le16toh(tmp[0].val); return; } -/* - * Read up to 7 32-bit registers (newer firmware versions) - */ static void -zyd_cfg_read32_multi(struct zyd_softc *sc, const uint32_t *addrs, uint32_t *data, - uint8_t usecount) +zyd_cfg_read32(struct zyd_softc *sc, uint16_t addr, uint32_t *value) { - struct zyd_intoutmultiread in; - struct zyd_intinmultioutput op; - uint8_t i; - uint8_t realcount; + struct zyd_pair tmp[2]; + uint16_t regs[2]; - realcount = usecount * 2; + regs[0] = ZYD_REG32_HI(addr); + regs[1] = ZYD_REG32_LO(addr); + regs[0] = htole16(regs[0]); + regs[1] = htole16(regs[1]); - memset(&in, 0, sizeof(struct zyd_intoutmultiread)); - memset(&op, 0, sizeof(struct zyd_intinmultioutput)); - - USETW(in.id, ZYD_CMD_IORDREQ); - - for (i = 0; i < usecount; i++) { - /* high word is first */ - USETW(in.addr[i * 2], zyd_getrealaddr(sc, zyd_addrinc(addrs[i]))); - USETW(in.addr[(i * 2) + 1], zyd_getrealaddr(sc, addrs[i])); - } - - zyd_cfg_usb_intr_write(sc, &in, (2 + (realcount * 2))); - zyd_cfg_usb_intr_read(sc, &op, (2 + (realcount * 4))); - - for (i = 0; i < usecount; i++) { - data[i] = - (UGETW(op.registers[i * 2].data) << 16) | - UGETW(op.registers[(i * 2) + 1].data); - } + zyd_cfg_cmd(sc, ZYD_CMD_IORD, regs, sizeof(regs), + tmp, sizeof(tmp), ZYD_CMD_FLAG_READ); + *value = (le16toh(tmp[0].val) << 16) | le16toh(tmp[1].val); return; } -/* - * Write a single 16-bit register - */ static void -zyd_cfg_write16(struct zyd_softc *sc, uint32_t addr, uint16_t value) +zyd_cfg_write16(struct zyd_softc *sc, uint16_t reg, uint16_t val) { - zyd_cfg_write16_multi(sc, &addr, &value, 1); - return; -} + struct zyd_pair pair[1]; -/* - * Write a single 32-bit register - */ -static void -zyd_cfg_write32(struct zyd_softc *sc, uint32_t addr, uint32_t value) -{ - zyd_cfg_write32_multi(sc, &addr, &value, 1); - return; -} + pair[0].reg = htole16(reg); + pair[0].val = htole16(val); -/* - * Write up to 15 16-bit registers (newer firmware versions) - */ -static void -zyd_cfg_write16_multi(struct zyd_softc *sc, const uint32_t *addrs, uint16_t *data, - uint8_t usecount) -{ - struct zyd_intoutmultiwrite mw; - uint8_t i; - - memset(&mw, 0, sizeof(struct zyd_intoutmultiwrite)); - - USETW(mw.id, ZYD_CMD_IOWRREQ); - - for (i = 0; i < usecount; i++) { - USETW(mw.registers[i].addr, zyd_getrealaddr(sc, addrs[i])); - USETW(mw.registers[i].data, data[i]); - } - - zyd_cfg_usb_intr_write(sc, &mw, (2 + (usecount * 4))); + zyd_cfg_cmd(sc, ZYD_CMD_IOWR, pair, sizeof(pair), NULL, 0, 0); return; } -/* - * Write up to 7 32-bit registers (newer firmware versions) - */ static void -zyd_cfg_write32_multi(struct zyd_softc *sc, const uint32_t *addrs, uint32_t *data, - uint8_t usecount) +zyd_cfg_write32(struct zyd_softc *sc, uint16_t reg, uint32_t val) { - struct zyd_intoutmultiwrite mw; - uint8_t i; - uint8_t realcount; + struct zyd_pair pair[2]; - realcount = usecount * 2; + pair[0].reg = htole16(ZYD_REG32_HI(reg)); + pair[0].val = htole16(val >> 16); + pair[1].reg = htole16(ZYD_REG32_LO(reg)); + pair[1].val = htole16(val & 0xffff); - memset(&mw, 0, sizeof(struct zyd_intoutmultiwrite)); - - USETW(mw.id, ZYD_CMD_IOWRREQ); - - for (i = 0; i < usecount; i++) { - /* high word is first */ - USETW(mw.registers[i * 2].addr, zyd_getrealaddr(sc, zyd_addrinc(addrs[i]))); - USETW(mw.registers[i * 2].data, (*data >> 16)); - - USETW(mw.registers[(i * 2) + 1].addr, zyd_getrealaddr(sc, addrs[i])); - USETW(mw.registers[(i * 2) + 1].data, (*data)); - } - - zyd_cfg_usb_intr_write(sc, &mw, (2 + (realcount * 4))); + zyd_cfg_cmd(sc, ZYD_CMD_IOWR, pair, sizeof(pair), NULL, 0, 0); return; } -/* - * Batch write 16-bit data - */ +/*------------------------------------------------------------------------* + * zyd_cfg_rfwrite - write RF registers + *------------------------------------------------------------------------*/ >>> TRUNCATED FOR MAIL (1000 lines) <<< From owner-p4-projects@FreeBSD.ORG Wed Jan 2 18:13:30 2008 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 1D50C16A469; Wed, 2 Jan 2008 18:13:30 +0000 (UTC) Delivered-To: perforce@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id D6B0816A419 for ; Wed, 2 Jan 2008 18:13:29 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id C52A713C442 for ; Wed, 2 Jan 2008 18:13:29 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.1/8.14.1) with ESMTP id m02IDTdr080228 for ; Wed, 2 Jan 2008 18:13:29 GMT (envelope-from hselasky@FreeBSD.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.1/8.14.1/Submit) id m02IDTkV080225 for perforce@freebsd.org; Wed, 2 Jan 2008 18:13:29 GMT (envelope-from hselasky@FreeBSD.org) Date: Wed, 2 Jan 2008 18:13:29 GMT Message-Id: <200801021813.m02IDTkV080225@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky To: Perforce Change Reviews Cc: Subject: PERFORCE change 132317 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 02 Jan 2008 18:13:30 -0000 http://perforce.freebsd.org/chv.cgi?CH=132317 Change 132317 by hselasky@hselasky_laptop001 on 2008/01/02 18:12:28 We need to expand some macros because indent doesn't like them! Affected files ... .. //depot/projects/usb/src/sys/dev/usb/if_zyd.c#31 edit Differences ... ==== //depot/projects/usb/src/sys/dev/usb/if_zyd.c#31 (text+ko) ==== @@ -162,68 +162,59 @@ static const struct zyd_phy_pair zyd_def_phyB[] = ZYD_DEF_PHYB; /* various supported device vendors/products */ -#define ZYD_ZD1211_DEV(v, p) \ - { { USB_VENDOR_##v, USB_PRODUCT_##v##_##p }, ZYD_ZD1211 } -#define ZYD_ZD1211B_DEV(v, p) \ - { { USB_VENDOR_##v, USB_PRODUCT_##v##_##p }, ZYD_ZD1211B } static const struct zyd_type { struct usb_devno dev; uint8_t rev; #define ZYD_ZD1211 0 #define ZYD_ZD1211B 1 } zyd_devs[] = { - ZYD_ZD1211_DEV(3COM2, 3CRUSB10075), - ZYD_ZD1211_DEV(ABOCOM, WL54), - ZYD_ZD1211_DEV(ASUS, WL159G), - ZYD_ZD1211_DEV(CYBERTAN, TG54USB), - ZYD_ZD1211_DEV(DRAYTEK, VIGOR550), - ZYD_ZD1211_DEV(PLANEX2, GWUS54GD), - ZYD_ZD1211_DEV(PLANEX2, GWUS54GZL), - ZYD_ZD1211_DEV(PLANEX3, GWUS54GZ), - ZYD_ZD1211_DEV(PLANEX3, GWUS54MINI), - ZYD_ZD1211_DEV(SAGEM, XG760A), - ZYD_ZD1211_DEV(SENAO, NUB8301), - ZYD_ZD1211_DEV(SITECOMEU, WL113), - ZYD_ZD1211_DEV(SWEEX, ZD1211), - ZYD_ZD1211_DEV(TEKRAM, QUICKWLAN), - ZYD_ZD1211_DEV(TEKRAM, ZD1211_1), - ZYD_ZD1211_DEV(TEKRAM, ZD1211_2), - ZYD_ZD1211_DEV(TWINMOS, G240), - ZYD_ZD1211_DEV(UMEDIA, ALL0298V2), - ZYD_ZD1211_DEV(UMEDIA, TEW429UB_A), - ZYD_ZD1211_DEV(UMEDIA, TEW429UB), - ZYD_ZD1211_DEV(WISTRONNEWEB, UR055G), - ZYD_ZD1211_DEV(ZCOM, ZD1211), - ZYD_ZD1211_DEV(ZYDAS, ZD1211), - ZYD_ZD1211_DEV(ZYXEL, AG225H), - ZYD_ZD1211_DEV(ZYXEL, ZYAIRG220), - ZYD_ZD1211_DEV(ZYXEL, G200V2), - - ZYD_ZD1211B_DEV(ACCTON, SMCWUSBG), - ZYD_ZD1211B_DEV(ACCTON, ZD1211B), - ZYD_ZD1211B_DEV(ASUS, A9T_WIFI), - ZYD_ZD1211B_DEV(BELKIN, F5D7050_V4000), - ZYD_ZD1211B_DEV(BELKIN, ZD1211B), - ZYD_ZD1211B_DEV(CISCOLINKSYS, WUSBF54G), - ZYD_ZD1211B_DEV(FIBERLINE, WL430U), - ZYD_ZD1211B_DEV(MELCO, KG54L), - ZYD_ZD1211B_DEV(PHILIPS, SNU5600), - ZYD_ZD1211B_DEV(PLANEX2, GW_US54GXS), - ZYD_ZD1211B_DEV(SAGEM, XG76NA), - ZYD_ZD1211B_DEV(SITECOMEU, ZD1211B), - ZYD_ZD1211B_DEV(UMEDIA, TEW429UBC1), -#if 0 /* Shall we needs? */ - ZYD_ZD1211B_DEV(UNKNOWN1, ZD1211B_1), - ZYD_ZD1211B_DEV(UNKNOWN1, ZD1211B_2), - ZYD_ZD1211B_DEV(UNKNOWN2, ZD1211B), - ZYD_ZD1211B_DEV(UNKNOWN3, ZD1211B), -#endif - ZYD_ZD1211B_DEV(USR, USR5423), - ZYD_ZD1211B_DEV(VTECH, ZD1211B), - ZYD_ZD1211B_DEV(ZCOM, ZD1211B), - ZYD_ZD1211B_DEV(ZYDAS, ZD1211B), - ZYD_ZD1211B_DEV(ZYXEL, M202), - ZYD_ZD1211B_DEV(ZYXEL, G220V2), + /* ZYD_ZD1211 */ + { { USB_VENDOR_3COM2, USB_PRODUCT_3COM2_3CRUSB10075 }, ZYD_ZD1211 }, + { { USB_VENDOR_ABOCOM, USB_PRODUCT_ABOCOM_WL54 }, ZYD_ZD1211 }, + { { USB_VENDOR_ASUS, USB_PRODUCT_ASUS_WL159G }, ZYD_ZD1211 }, + { { USB_VENDOR_CYBERTAN, USB_PRODUCT_CYBERTAN_TG54USB }, ZYD_ZD1211 }, + { { USB_VENDOR_DRAYTEK, USB_PRODUCT_DRAYTEK_VIGOR550 }, ZYD_ZD1211 }, + { { USB_VENDOR_PLANEX2, USB_PRODUCT_PLANEX2_GWUS54GD }, ZYD_ZD1211 }, + { { USB_VENDOR_PLANEX2, USB_PRODUCT_PLANEX2_GWUS54GZL }, ZYD_ZD1211 }, + { { USB_VENDOR_PLANEX3, USB_PRODUCT_PLANEX3_GWUS54GZ }, ZYD_ZD1211 }, + { { USB_VENDOR_PLANEX3, USB_PRODUCT_PLANEX3_GWUS54MINI }, ZYD_ZD1211 }, + { { USB_VENDOR_SAGEM, USB_PRODUCT_SAGEM_XG760A }, ZYD_ZD1211 }, + { { USB_VENDOR_SENAO, USB_PRODUCT_SENAO_NUB8301 }, ZYD_ZD1211 }, + { { USB_VENDOR_SITECOMEU, USB_PRODUCT_SITECOMEU_WL113 }, ZYD_ZD1211 }, + { { USB_VENDOR_SWEEX, USB_PRODUCT_SWEEX_ZD1211 }, ZYD_ZD1211 }, + { { USB_VENDOR_TEKRAM, USB_PRODUCT_TEKRAM_QUICKWLAN }, ZYD_ZD1211 }, + { { USB_VENDOR_TEKRAM, USB_PRODUCT_TEKRAM_ZD1211_1 }, ZYD_ZD1211 }, + { { USB_VENDOR_TEKRAM, USB_PRODUCT_TEKRAM_ZD1211_2 }, ZYD_ZD1211 }, + { { USB_VENDOR_TWINMOS, USB_PRODUCT_TWINMOS_G240 }, ZYD_ZD1211 }, + { { USB_VENDOR_UMEDIA, USB_PRODUCT_UMEDIA_ALL0298V2 }, ZYD_ZD1211 }, + { { USB_VENDOR_UMEDIA, USB_PRODUCT_UMEDIA_TEW429UB_A }, ZYD_ZD1211 }, + { { USB_VENDOR_UMEDIA, USB_PRODUCT_UMEDIA_TEW429UB }, ZYD_ZD1211 }, + { { USB_VENDOR_WISTRONNEWEB, USB_PRODUCT_WISTRONNEWEB_UR055G }, ZYD_ZD1211 }, + { { USB_VENDOR_ZCOM, USB_PRODUCT_ZCOM_ZD1211 }, ZYD_ZD1211 }, + { { USB_VENDOR_ZYDAS, USB_PRODUCT_ZYDAS_ZD1211 }, ZYD_ZD1211 }, + { { USB_VENDOR_ZYXEL, USB_PRODUCT_ZYXEL_AG225H }, ZYD_ZD1211 }, + { { USB_VENDOR_ZYXEL, USB_PRODUCT_ZYXEL_ZYAIRG220 }, ZYD_ZD1211 }, + { { USB_VENDOR_ZYXEL, USB_PRODUCT_ZYXEL_G200V2 }, ZYD_ZD1211 }, + /* ZYD_ZD1211B */ + { { USB_VENDOR_ACCTON, USB_PRODUCT_ACCTON_SMCWUSBG }, ZYD_ZD1211B }, + { { USB_VENDOR_ACCTON, USB_PRODUCT_ACCTON_ZD1211B }, ZYD_ZD1211B }, + { { USB_VENDOR_ASUS, USB_PRODUCT_ASUS_A9T_WIFI }, ZYD_ZD1211B }, + { { USB_VENDOR_BELKIN, USB_PRODUCT_BELKIN_F5D7050_V4000 }, ZYD_ZD1211B }, + { { USB_VENDOR_BELKIN, USB_PRODUCT_BELKIN_ZD1211B }, ZYD_ZD1211B }, + { { USB_VENDOR_CISCOLINKSYS, USB_PRODUCT_CISCOLINKSYS_WUSBF54G }, ZYD_ZD1211B }, + { { USB_VENDOR_FIBERLINE, USB_PRODUCT_FIBERLINE_WL430U }, ZYD_ZD1211B }, + { { USB_VENDOR_MELCO, USB_PRODUCT_MELCO_KG54L }, ZYD_ZD1211B }, + { { USB_VENDOR_PHILIPS, USB_PRODUCT_PHILIPS_SNU5600 }, ZYD_ZD1211B }, + { { USB_VENDOR_PLANEX2, USB_PRODUCT_PLANEX2_GW_US54GXS }, ZYD_ZD1211B }, + { { USB_VENDOR_SAGEM, USB_PRODUCT_SAGEM_XG76NA }, ZYD_ZD1211B }, + { { USB_VENDOR_SITECOMEU, USB_PRODUCT_SITECOMEU_ZD1211B }, ZYD_ZD1211B }, + { { USB_VENDOR_UMEDIA, USB_PRODUCT_UMEDIA_TEW429UBC1 }, ZYD_ZD1211B }, + { { USB_VENDOR_USR, USB_PRODUCT_USR_USR5423 }, ZYD_ZD1211B }, + { { USB_VENDOR_VTECH, USB_PRODUCT_VTECH_ZD1211B }, ZYD_ZD1211B }, + { { USB_VENDOR_ZCOM, USB_PRODUCT_ZCOM_ZD1211B }, ZYD_ZD1211B }, + { { USB_VENDOR_ZYDAS, USB_PRODUCT_ZYDAS_ZD1211B }, ZYD_ZD1211B }, + { { USB_VENDOR_ZYXEL, USB_PRODUCT_ZYXEL_M202 }, ZYD_ZD1211B }, + { { USB_VENDOR_ZYXEL, USB_PRODUCT_ZYXEL_G220V2 }, ZYD_ZD1211B }, }; #define zyd_lookup(v, p) \ ((const struct zyd_type *)usb_lookup(zyd_devs, v, p)) From owner-p4-projects@FreeBSD.ORG Wed Jan 2 18:19:36 2008 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id BE63A16A420; Wed, 2 Jan 2008 18:19:36 +0000 (UTC) Delivered-To: perforce@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 8415C16A419 for ; Wed, 2 Jan 2008 18:19:36 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id 72F7013C467 for ; Wed, 2 Jan 2008 18:19:36 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.1/8.14.1) with ESMTP id m02IJa4o082585 for ; Wed, 2 Jan 2008 18:19:36 GMT (envelope-from hselasky@FreeBSD.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.1/8.14.1/Submit) id m02IJa9N082582 for perforce@freebsd.org; Wed, 2 Jan 2008 18:19:36 GMT (envelope-from hselasky@FreeBSD.org) Date: Wed, 2 Jan 2008 18:19:36 GMT Message-Id: <200801021819.m02IJa9N082582@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky To: Perforce Change Reviews Cc: Subject: PERFORCE change 132318 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 02 Jan 2008 18:19:37 -0000 http://perforce.freebsd.org/chv.cgi?CH=132318 Change 132318 by hselasky@hselasky_laptop001 on 2008/01/02 18:18:46 Another "make indent happy" patch. Affected files ... .. //depot/projects/usb/src/sys/dev/usb/if_zyd.c#32 edit Differences ... ==== //depot/projects/usb/src/sys/dev/usb/if_zyd.c#32 (text+ko) ==== @@ -162,12 +162,14 @@ static const struct zyd_phy_pair zyd_def_phyB[] = ZYD_DEF_PHYB; /* various supported device vendors/products */ -static const struct zyd_type { +struct zyd_type { struct usb_devno dev; uint8_t rev; #define ZYD_ZD1211 0 #define ZYD_ZD1211B 1 -} zyd_devs[] = { +}; + +static const struct zyd_type zyd_devs[] = { /* ZYD_ZD1211 */ { { USB_VENDOR_3COM2, USB_PRODUCT_3COM2_3CRUSB10075 }, ZYD_ZD1211 }, { { USB_VENDOR_ABOCOM, USB_PRODUCT_ABOCOM_WL54 }, ZYD_ZD1211 }, From owner-p4-projects@FreeBSD.ORG Wed Jan 2 18:26:44 2008 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 7CAA616A41B; Wed, 2 Jan 2008 18:26:44 +0000 (UTC) Delivered-To: perforce@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 28F6016A418 for ; Wed, 2 Jan 2008 18:26:44 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id 1622313C4EF for ; Wed, 2 Jan 2008 18:26:44 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.1/8.14.1) with ESMTP id m02IQhcA086229 for ; Wed, 2 Jan 2008 18:26:43 GMT (envelope-from hselasky@FreeBSD.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.1/8.14.1/Submit) id m02IQhoY086226 for perforce@freebsd.org; Wed, 2 Jan 2008 18:26:43 GMT (envelope-from hselasky@FreeBSD.org) Date: Wed, 2 Jan 2008 18:26:43 GMT Message-Id: <200801021826.m02IQhoY086226@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky To: Perforce Change Reviews Cc: Subject: PERFORCE change 132319 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 02 Jan 2008 18:26:44 -0000 http://perforce.freebsd.org/chv.cgi?CH=132319 Change 132319 by hselasky@hselasky_laptop001 on 2008/01/02 18:25:46 Style change by "usb_style.sh". Affected files ... .. //depot/projects/usb/src/sys/dev/usb/if_zyd.c#33 edit Differences ... ==== //depot/projects/usb/src/sys/dev/usb/if_zyd.c#33 (text+ko) ==== @@ -81,7 +81,7 @@ #endif #undef INDEXES -#define INDEXES(a) (sizeof(a) / sizeof((a)[0])) +#define INDEXES(a) (sizeof(a) / sizeof((a)[0])) struct mq { /* mini-queue */ struct mbuf *ifq_head; @@ -117,7 +117,7 @@ static usbd_config_td_command_t zyd_cfg_amrr_timeout; static uint8_t zyd_plcp2ieee(uint8_t signal, uint8_t isofdm); -static struct ieee80211_node * zyd_node_alloc_cb(struct ieee80211_node_table *nt); +static struct ieee80211_node *zyd_node_alloc_cb(struct ieee80211_node_table *nt); static void zyd_cfg_usbrequest(struct zyd_softc *sc, usb_device_request_t *req, uint8_t *data); static void zyd_cfg_usb_intr_read(struct zyd_softc *sc, void *data, uint32_t size); static void zyd_cfg_usb_intr_write(struct zyd_softc *sc, const void *data, uint16_t code, uint32_t size); @@ -163,62 +163,63 @@ /* various supported device vendors/products */ struct zyd_type { - struct usb_devno dev; - uint8_t rev; -#define ZYD_ZD1211 0 -#define ZYD_ZD1211B 1 + struct usb_devno dev; + uint8_t rev; +#define ZYD_ZD1211 0 +#define ZYD_ZD1211B 1 }; static const struct zyd_type zyd_devs[] = { - /* ZYD_ZD1211 */ - { { USB_VENDOR_3COM2, USB_PRODUCT_3COM2_3CRUSB10075 }, ZYD_ZD1211 }, - { { USB_VENDOR_ABOCOM, USB_PRODUCT_ABOCOM_WL54 }, ZYD_ZD1211 }, - { { USB_VENDOR_ASUS, USB_PRODUCT_ASUS_WL159G }, ZYD_ZD1211 }, - { { USB_VENDOR_CYBERTAN, USB_PRODUCT_CYBERTAN_TG54USB }, ZYD_ZD1211 }, - { { USB_VENDOR_DRAYTEK, USB_PRODUCT_DRAYTEK_VIGOR550 }, ZYD_ZD1211 }, - { { USB_VENDOR_PLANEX2, USB_PRODUCT_PLANEX2_GWUS54GD }, ZYD_ZD1211 }, - { { USB_VENDOR_PLANEX2, USB_PRODUCT_PLANEX2_GWUS54GZL }, ZYD_ZD1211 }, - { { USB_VENDOR_PLANEX3, USB_PRODUCT_PLANEX3_GWUS54GZ }, ZYD_ZD1211 }, - { { USB_VENDOR_PLANEX3, USB_PRODUCT_PLANEX3_GWUS54MINI }, ZYD_ZD1211 }, - { { USB_VENDOR_SAGEM, USB_PRODUCT_SAGEM_XG760A }, ZYD_ZD1211 }, - { { USB_VENDOR_SENAO, USB_PRODUCT_SENAO_NUB8301 }, ZYD_ZD1211 }, - { { USB_VENDOR_SITECOMEU, USB_PRODUCT_SITECOMEU_WL113 }, ZYD_ZD1211 }, - { { USB_VENDOR_SWEEX, USB_PRODUCT_SWEEX_ZD1211 }, ZYD_ZD1211 }, - { { USB_VENDOR_TEKRAM, USB_PRODUCT_TEKRAM_QUICKWLAN }, ZYD_ZD1211 }, - { { USB_VENDOR_TEKRAM, USB_PRODUCT_TEKRAM_ZD1211_1 }, ZYD_ZD1211 }, - { { USB_VENDOR_TEKRAM, USB_PRODUCT_TEKRAM_ZD1211_2 }, ZYD_ZD1211 }, - { { USB_VENDOR_TWINMOS, USB_PRODUCT_TWINMOS_G240 }, ZYD_ZD1211 }, - { { USB_VENDOR_UMEDIA, USB_PRODUCT_UMEDIA_ALL0298V2 }, ZYD_ZD1211 }, - { { USB_VENDOR_UMEDIA, USB_PRODUCT_UMEDIA_TEW429UB_A }, ZYD_ZD1211 }, - { { USB_VENDOR_UMEDIA, USB_PRODUCT_UMEDIA_TEW429UB }, ZYD_ZD1211 }, - { { USB_VENDOR_WISTRONNEWEB, USB_PRODUCT_WISTRONNEWEB_UR055G }, ZYD_ZD1211 }, - { { USB_VENDOR_ZCOM, USB_PRODUCT_ZCOM_ZD1211 }, ZYD_ZD1211 }, - { { USB_VENDOR_ZYDAS, USB_PRODUCT_ZYDAS_ZD1211 }, ZYD_ZD1211 }, - { { USB_VENDOR_ZYXEL, USB_PRODUCT_ZYXEL_AG225H }, ZYD_ZD1211 }, - { { USB_VENDOR_ZYXEL, USB_PRODUCT_ZYXEL_ZYAIRG220 }, ZYD_ZD1211 }, - { { USB_VENDOR_ZYXEL, USB_PRODUCT_ZYXEL_G200V2 }, ZYD_ZD1211 }, - /* ZYD_ZD1211B */ - { { USB_VENDOR_ACCTON, USB_PRODUCT_ACCTON_SMCWUSBG }, ZYD_ZD1211B }, - { { USB_VENDOR_ACCTON, USB_PRODUCT_ACCTON_ZD1211B }, ZYD_ZD1211B }, - { { USB_VENDOR_ASUS, USB_PRODUCT_ASUS_A9T_WIFI }, ZYD_ZD1211B }, - { { USB_VENDOR_BELKIN, USB_PRODUCT_BELKIN_F5D7050_V4000 }, ZYD_ZD1211B }, - { { USB_VENDOR_BELKIN, USB_PRODUCT_BELKIN_ZD1211B }, ZYD_ZD1211B }, - { { USB_VENDOR_CISCOLINKSYS, USB_PRODUCT_CISCOLINKSYS_WUSBF54G }, ZYD_ZD1211B }, - { { USB_VENDOR_FIBERLINE, USB_PRODUCT_FIBERLINE_WL430U }, ZYD_ZD1211B }, - { { USB_VENDOR_MELCO, USB_PRODUCT_MELCO_KG54L }, ZYD_ZD1211B }, - { { USB_VENDOR_PHILIPS, USB_PRODUCT_PHILIPS_SNU5600 }, ZYD_ZD1211B }, - { { USB_VENDOR_PLANEX2, USB_PRODUCT_PLANEX2_GW_US54GXS }, ZYD_ZD1211B }, - { { USB_VENDOR_SAGEM, USB_PRODUCT_SAGEM_XG76NA }, ZYD_ZD1211B }, - { { USB_VENDOR_SITECOMEU, USB_PRODUCT_SITECOMEU_ZD1211B }, ZYD_ZD1211B }, - { { USB_VENDOR_UMEDIA, USB_PRODUCT_UMEDIA_TEW429UBC1 }, ZYD_ZD1211B }, - { { USB_VENDOR_USR, USB_PRODUCT_USR_USR5423 }, ZYD_ZD1211B }, - { { USB_VENDOR_VTECH, USB_PRODUCT_VTECH_ZD1211B }, ZYD_ZD1211B }, - { { USB_VENDOR_ZCOM, USB_PRODUCT_ZCOM_ZD1211B }, ZYD_ZD1211B }, - { { USB_VENDOR_ZYDAS, USB_PRODUCT_ZYDAS_ZD1211B }, ZYD_ZD1211B }, - { { USB_VENDOR_ZYXEL, USB_PRODUCT_ZYXEL_M202 }, ZYD_ZD1211B }, - { { USB_VENDOR_ZYXEL, USB_PRODUCT_ZYXEL_G220V2 }, ZYD_ZD1211B }, + /* ZYD_ZD1211 */ + {{USB_VENDOR_3COM2, USB_PRODUCT_3COM2_3CRUSB10075}, ZYD_ZD1211}, + {{USB_VENDOR_ABOCOM, USB_PRODUCT_ABOCOM_WL54}, ZYD_ZD1211}, + {{USB_VENDOR_ASUS, USB_PRODUCT_ASUS_WL159G}, ZYD_ZD1211}, + {{USB_VENDOR_CYBERTAN, USB_PRODUCT_CYBERTAN_TG54USB}, ZYD_ZD1211}, + {{USB_VENDOR_DRAYTEK, USB_PRODUCT_DRAYTEK_VIGOR550}, ZYD_ZD1211}, + {{USB_VENDOR_PLANEX2, USB_PRODUCT_PLANEX2_GWUS54GD}, ZYD_ZD1211}, + {{USB_VENDOR_PLANEX2, USB_PRODUCT_PLANEX2_GWUS54GZL}, ZYD_ZD1211}, + {{USB_VENDOR_PLANEX3, USB_PRODUCT_PLANEX3_GWUS54GZ}, ZYD_ZD1211}, + {{USB_VENDOR_PLANEX3, USB_PRODUCT_PLANEX3_GWUS54MINI}, ZYD_ZD1211}, + {{USB_VENDOR_SAGEM, USB_PRODUCT_SAGEM_XG760A}, ZYD_ZD1211}, + {{USB_VENDOR_SENAO, USB_PRODUCT_SENAO_NUB8301}, ZYD_ZD1211}, + {{USB_VENDOR_SITECOMEU, USB_PRODUCT_SITECOMEU_WL113}, ZYD_ZD1211}, + {{USB_VENDOR_SWEEX, USB_PRODUCT_SWEEX_ZD1211}, ZYD_ZD1211}, + {{USB_VENDOR_TEKRAM, USB_PRODUCT_TEKRAM_QUICKWLAN}, ZYD_ZD1211}, + {{USB_VENDOR_TEKRAM, USB_PRODUCT_TEKRAM_ZD1211_1}, ZYD_ZD1211}, + {{USB_VENDOR_TEKRAM, USB_PRODUCT_TEKRAM_ZD1211_2}, ZYD_ZD1211}, + {{USB_VENDOR_TWINMOS, USB_PRODUCT_TWINMOS_G240}, ZYD_ZD1211}, + {{USB_VENDOR_UMEDIA, USB_PRODUCT_UMEDIA_ALL0298V2}, ZYD_ZD1211}, + {{USB_VENDOR_UMEDIA, USB_PRODUCT_UMEDIA_TEW429UB_A}, ZYD_ZD1211}, + {{USB_VENDOR_UMEDIA, USB_PRODUCT_UMEDIA_TEW429UB}, ZYD_ZD1211}, + {{USB_VENDOR_WISTRONNEWEB, USB_PRODUCT_WISTRONNEWEB_UR055G}, ZYD_ZD1211}, + {{USB_VENDOR_ZCOM, USB_PRODUCT_ZCOM_ZD1211}, ZYD_ZD1211}, + {{USB_VENDOR_ZYDAS, USB_PRODUCT_ZYDAS_ZD1211}, ZYD_ZD1211}, + {{USB_VENDOR_ZYXEL, USB_PRODUCT_ZYXEL_AG225H}, ZYD_ZD1211}, + {{USB_VENDOR_ZYXEL, USB_PRODUCT_ZYXEL_ZYAIRG220}, ZYD_ZD1211}, + {{USB_VENDOR_ZYXEL, USB_PRODUCT_ZYXEL_G200V2}, ZYD_ZD1211}, + /* ZYD_ZD1211B */ + {{USB_VENDOR_ACCTON, USB_PRODUCT_ACCTON_SMCWUSBG}, ZYD_ZD1211B}, + {{USB_VENDOR_ACCTON, USB_PRODUCT_ACCTON_ZD1211B}, ZYD_ZD1211B}, + {{USB_VENDOR_ASUS, USB_PRODUCT_ASUS_A9T_WIFI}, ZYD_ZD1211B}, + {{USB_VENDOR_BELKIN, USB_PRODUCT_BELKIN_F5D7050_V4000}, ZYD_ZD1211B}, + {{USB_VENDOR_BELKIN, USB_PRODUCT_BELKIN_ZD1211B}, ZYD_ZD1211B}, + {{USB_VENDOR_CISCOLINKSYS, USB_PRODUCT_CISCOLINKSYS_WUSBF54G}, ZYD_ZD1211B}, + {{USB_VENDOR_FIBERLINE, USB_PRODUCT_FIBERLINE_WL430U}, ZYD_ZD1211B}, + {{USB_VENDOR_MELCO, USB_PRODUCT_MELCO_KG54L}, ZYD_ZD1211B}, + {{USB_VENDOR_PHILIPS, USB_PRODUCT_PHILIPS_SNU5600}, ZYD_ZD1211B}, + {{USB_VENDOR_PLANEX2, USB_PRODUCT_PLANEX2_GW_US54GXS}, ZYD_ZD1211B}, + {{USB_VENDOR_SAGEM, USB_PRODUCT_SAGEM_XG76NA}, ZYD_ZD1211B}, + {{USB_VENDOR_SITECOMEU, USB_PRODUCT_SITECOMEU_ZD1211B}, ZYD_ZD1211B}, + {{USB_VENDOR_UMEDIA, USB_PRODUCT_UMEDIA_TEW429UBC1}, ZYD_ZD1211B}, + {{USB_VENDOR_USR, USB_PRODUCT_USR_USR5423}, ZYD_ZD1211B}, + {{USB_VENDOR_VTECH, USB_PRODUCT_VTECH_ZD1211B}, ZYD_ZD1211B}, + {{USB_VENDOR_ZCOM, USB_PRODUCT_ZCOM_ZD1211B}, ZYD_ZD1211B}, + {{USB_VENDOR_ZYDAS, USB_PRODUCT_ZYDAS_ZD1211B}, ZYD_ZD1211B}, + {{USB_VENDOR_ZYXEL, USB_PRODUCT_ZYXEL_M202}, ZYD_ZD1211B}, + {{USB_VENDOR_ZYXEL, USB_PRODUCT_ZYXEL_G220V2}, ZYD_ZD1211B}, }; -#define zyd_lookup(v, p) \ + +#define zyd_lookup(v, p) \ ((const struct zyd_type *)usb_lookup(zyd_devs, v, p)) static const struct usbd_config zyd_config[ZYD_N_TRANSFER] = { @@ -332,15 +333,17 @@ static uint8_t zyd_plcp2ieee(uint8_t signal, uint8_t isofdm) { - if (isofdm) { - static const uint8_t ofdmrates[16] = - { 0, 0, 0, 0, 0, 0, 0, 96, 48, 24, 12, 108, 72, 36, 18 }; - return ofdmrates[signal & 0xf]; - } else { - static const uint8_t cckrates[16] = - { 0, 0, 0, 0, 4, 0, 0, 11, 0, 0, 2, 0, 0, 0, 22, 0 }; - return cckrates[signal & 0xf]; - } + if (isofdm) { + static const uint8_t ofdmrates[16] = + {0, 0, 0, 0, 0, 0, 0, 96, 48, 24, 12, 108, 72, 36, 18}; + + return ofdmrates[signal & 0xf]; + } else { + static const uint8_t cckrates[16] = + {0, 0, 0, 0, 4, 0, 0, 11, 0, 0, 2, 0, 0, 0, 22, 0}; + + return cckrates[signal & 0xf]; + } } /* ARGUSED */ @@ -348,6 +351,7 @@ zyd_node_alloc_cb(struct ieee80211_node_table *nt __unused) { struct zyd_node *zn; + zn = malloc(sizeof(struct zyd_node), M_80211_NODE, M_WAITOK | M_ZERO); return ((zn != NULL) ? (&zn->ni) : NULL); } @@ -370,7 +374,7 @@ if (err) { DPRINTF(sc, -1, "%s: device request failed, err=%s " - "(ignored)\n", sc->sc_name, usbd_errstr(err)); + "(ignored)\n", sc->sc_name, usbd_errstr(err)); error: length = UGETW(req->wLength); @@ -420,7 +424,7 @@ usbd_copy_out(xfer->frbuffers + 0, 0, &(sc->sc_intr_ibuf), actlen); - switch(cmd->code) { + switch (cmd->code) { case htole16(ZYD_NOTIF_RETRYSTATUS): goto handle_notif_retrystatus; case htole16(ZYD_NOTIF_IORD): @@ -433,19 +437,18 @@ /* fallthrough */ case USBD_ST_SETUP: - tr_setup: +tr_setup: if (sc->sc_flags & ZYD_FLAG_INTR_READ_STALL) { usbd_transfer_start(sc->sc_xfer[ZYD_TR_INTR_CS_RD]); break; } - xfer->frlengths[0] = xfer->max_data_length; usbd_start_hardware(xfer); break; default: /* Error */ - DPRINTF(sc, 2, "error = %s\n", - usbd_errstr(xfer->error)); + DPRINTF(sc, 2, "error = %s\n", + usbd_errstr(xfer->error)); if (xfer->error != USBD_CANCELLED) { /* try to clear stall first */ @@ -462,89 +465,85 @@ } return; -handle_notif_retrystatus: { +handle_notif_retrystatus:{ + + struct zyd_notif_retry *retry = (void *)(cmd->data); + struct ieee80211com *ic = &sc->sc_ic; + struct ifnet *ifp = sc->sc_ifp; + struct ieee80211_node *ni; - struct zyd_notif_retry *retry = (void *)(cmd->data); - struct ieee80211com *ic = &sc->sc_ic; - struct ifnet *ifp = sc->sc_ifp; - struct ieee80211_node *ni; + DPRINTF(sc, 0, "retry intr: rate=0x%x " + "addr=%02x:%02x:%02x:%02x:%02x:%02x count=%d (0x%x)\n", + le16toh(retry->rate), retry->macaddr[0], retry->macaddr[1], + retry->macaddr[2], retry->macaddr[3], retry->macaddr[4], + retry->macaddr[5], le16toh(retry->count) & 0xff, + le16toh(retry->count)); - DPRINTF(sc, 0, "retry intr: rate=0x%x " - "addr=%02x:%02x:%02x:%02x:%02x:%02x count=%d (0x%x)\n", - le16toh(retry->rate), retry->macaddr[0], retry->macaddr[1], - retry->macaddr[2], retry->macaddr[3], retry->macaddr[4], - retry->macaddr[5], le16toh(retry->count) & 0xff, - le16toh(retry->count)); + /* + * Find the node to which the packet was sent and update its + * retry statistics. In BSS mode, this node is the AP we're + * associated to so no lookup is actually needed. + */ + if (ic->ic_opmode != IEEE80211_M_STA) { + ni = ieee80211_find_node(&ic->ic_sta, retry->macaddr); + } else { + ni = ic->ic_bss; + } + if (ni == NULL) { + goto tr_setup; + } + ((struct zyd_node *)ni)->amn.amn_retrycnt++; - /* - * Find the node to which the packet was sent and update its - * retry statistics. In BSS mode, this node is the AP we're - * associated to so no lookup is actually needed. - */ - if (ic->ic_opmode != IEEE80211_M_STA) { - ni = ieee80211_find_node(&ic->ic_sta, retry->macaddr); - } else { - ni = ic->ic_bss; - } - if (ni == NULL) { + if (retry->count & htole16(0x100)) { + ifp->if_oerrors++; /* too many retries */ + } goto tr_setup; } - ((struct zyd_node *)ni)->amn.amn_retrycnt++; +handle_notif_iord: - if (retry->count & htole16(0x100)) { - ifp->if_oerrors++; /* too many retries */ + if (*(uint16_t *)cmd->data == htole16(ZYD_CR_INTERRUPT)) { + goto tr_setup; /* HMAC interrupt */ + } + if (actlen < 4) { + goto tr_setup; /* too short */ } - goto tr_setup; -} + actlen -= 4; -handle_notif_iord: - - if (*(uint16_t *)cmd->data == htole16(ZYD_CR_INTERRUPT)) { - goto tr_setup; /* HMAC interrupt */ - } - - if (actlen < 4) { - goto tr_setup; /* too short */ - } - - actlen -= 4; - - if (actlen != sc->sc_intr_ilen) { + if (actlen != sc->sc_intr_ilen) { DPRINTF(sc, -1, "unexpected length %u != %u\n", actlen, sc->sc_intr_ilen); - goto tr_setup; /* invalid length */ - } + goto tr_setup; /* invalid length */ + } + actlen /= 4; - actlen /= 4; - - /* verify register values */ - for (x = 0; x != actlen; x++) { - if (sc->sc_intr_obuf.data[(2*x)] != - sc->sc_intr_ibuf.data[(4*x)]) { + /* verify register values */ + for (x = 0; x != actlen; x++) { + if (sc->sc_intr_obuf.data[(2 * x)] != + sc->sc_intr_ibuf.data[(4 * x)]) { /* invalid register */ - DPRINTF(sc, 0, "Invalid register (1)!\n"); - goto tr_setup; + DPRINTF(sc, 0, "Invalid register (1)!\n"); + goto tr_setup; } - if (sc->sc_intr_obuf.data[(2*x) + 1] != - sc->sc_intr_ibuf.data[(4*x) + 1]) { + if (sc->sc_intr_obuf.data[(2 * x) + 1] != + sc->sc_intr_ibuf.data[(4 * x) + 1]) { /* invalid register */ - DPRINTF(sc, 0, "Invalid register (2)!\n"); - goto tr_setup; + DPRINTF(sc, 0, "Invalid register (2)!\n"); + goto tr_setup; } - } + } - if (sc->sc_intr_iwakeup) { - sc->sc_intr_iwakeup = 0; - wakeup(&(sc->sc_intr_iwakeup)); - } else { - sc->sc_intr_iwakeup = 1; - } - /* - * We pause reading data from the interrupt endpoint until - * the data has been picked up! - */ - return; + if (sc->sc_intr_iwakeup) { + sc->sc_intr_iwakeup = 0; + wakeup(&(sc->sc_intr_iwakeup)); + } else { + sc->sc_intr_iwakeup = 1; + } + /* + * We pause reading data from the interrupt endpoint until the data + * has been picked up! + */ + return; } /* @@ -561,13 +560,11 @@ bzero(data, size); goto done; } - if (sc->sc_intr_iwakeup) { - DPRINTF(sc, 0, "got data already!\n"); - sc->sc_intr_iwakeup = 0; - goto got_data; + DPRINTF(sc, 0, "got data already!\n"); + sc->sc_intr_iwakeup = 0; + goto got_data; } - /* else wait for data */ sc->sc_intr_iwakeup = 1; @@ -577,22 +574,22 @@ while (sc->sc_intr_iwakeup) { if (mtx_sleep(&(sc->sc_intr_iwakeup), &(sc->sc_mtx), 0, - "zyd-ird", hz/2)) { + "zyd-ird", hz / 2)) { /* should not happen */ } - if (usbd_config_td_is_gone(&(sc->sc_config_td))) { - sc->sc_intr_iwakeup = 0; - bzero(data, size); - goto done; + if (usbd_config_td_is_gone(&(sc->sc_config_td))) { + sc->sc_intr_iwakeup = 0; + bzero(data, size); + goto done; + } } - } got_data: bcopy(sc->sc_intr_ibuf.data, data, size); - /* - * We have fetched the data from the shared buffer and it is - * safe to restart the interrupt transfer! + /* + * We have fetched the data from the shared buffer and it is safe to + * restart the interrupt transfer! */ usbd_transfer_start(sc->sc_xfer[ZYD_TR_INTR_DT_RD]); done: @@ -639,8 +636,8 @@ break; default: /* Error */ - DPRINTF(sc, 2, "error = %s\n", - usbd_errstr(xfer->error)); + DPRINTF(sc, 2, "error = %s\n", + usbd_errstr(xfer->error)); if (xfer->error != USBD_CANCELLED) { /* try to clear stall first */ @@ -653,8 +650,8 @@ wakeup: if (sc->sc_intr_owakeup) { - sc->sc_intr_owakeup = 0; - wakeup(&(sc->sc_intr_owakeup)); + sc->sc_intr_owakeup = 0; + wakeup(&(sc->sc_intr_owakeup)); } return; } @@ -666,8 +663,8 @@ * full speed mode, EP4 is bulk out, not interrupt out. */ static void -zyd_cfg_usb_intr_write(struct zyd_softc *sc, const void *data, -uint16_t code, uint32_t size) +zyd_cfg_usb_intr_write(struct zyd_softc *sc, const void *data, + uint16_t code, uint32_t size) { if (size > sizeof(sc->sc_intr_obuf.data)) { DPRINTF(sc, -1, "truncating transfer size!\n"); @@ -685,14 +682,13 @@ usbd_transfer_start(sc->sc_xfer[ZYD_TR_INTR_DT_WR]); while (sc->sc_intr_owakeup) { - if (mtx_sleep(&(sc->sc_intr_owakeup), &(sc->sc_mtx), 0, - "zyd-iwr", hz/2)) { - } - - if (usbd_config_td_is_gone(&(sc->sc_config_td))) { - sc->sc_intr_owakeup = 0; - goto done; - } + if (mtx_sleep(&(sc->sc_intr_owakeup), &(sc->sc_mtx), 0, + "zyd-iwr", hz / 2)) { + } + if (usbd_config_td_is_gone(&(sc->sc_config_td))) { + sc->sc_intr_owakeup = 0; + goto done; + } } done: return; @@ -714,9 +710,10 @@ zyd_cfg_read16(struct zyd_softc *sc, uint16_t addr, uint16_t *value) { struct zyd_pair tmp[1]; + addr = htole16(addr); zyd_cfg_cmd(sc, ZYD_CMD_IORD, &addr, sizeof(addr), - tmp, sizeof(tmp), ZYD_CMD_FLAG_READ); + tmp, sizeof(tmp), ZYD_CMD_FLAG_READ); *value = le16toh(tmp[0].val); return; } @@ -732,8 +729,8 @@ regs[0] = htole16(regs[0]); regs[1] = htole16(regs[1]); - zyd_cfg_cmd(sc, ZYD_CMD_IORD, regs, sizeof(regs), - tmp, sizeof(tmp), ZYD_CMD_FLAG_READ); + zyd_cfg_cmd(sc, ZYD_CMD_IORD, regs, sizeof(regs), + tmp, sizeof(tmp), ZYD_CMD_FLAG_READ); *value = (le16toh(tmp[0].val) << 16) | le16toh(tmp[1].val); return; } @@ -778,7 +775,7 @@ zyd_cfg_read16(sc, ZYD_CR203, &cr203); cr203 &= ~(ZYD_RF_IF_LE | ZYD_RF_CLK | ZYD_RF_DATA); - req.code = htole16(2); + req.code = htole16(2); req.width = htole16(rf->width); for (i = 0; i != rf->width; i++) { req.bit[i] = htole16(cr203); @@ -804,12 +801,12 @@ } static void -zyd_bulk_read_callback_sub(struct usbd_xfer *xfer, struct mq *mq, +zyd_bulk_read_callback_sub(struct usbd_xfer *xfer, struct mq *mq, uint32_t offset, uint16_t len) { - enum { - ZYD_OVERHEAD = (ZYD_HW_PADDING + IEEE80211_CRC_LEN), - }; + enum { + ZYD_OVERHEAD = (ZYD_HW_PADDING + IEEE80211_CRC_LEN), + }; struct zyd_softc *sc = xfer->priv_sc; struct ifnet *ifp = sc->sc_ifp; struct zyd_plcphdr plcp; @@ -818,29 +815,27 @@ if (len < ZYD_OVERHEAD) { DPRINTF(sc, 0, "frame too " - "short (length=%d)\n", len); + "short (length=%d)\n", len); ifp->if_ierrors++; return; } - usbd_copy_out(xfer->frbuffers + 0, offset, &plcp, sizeof(plcp)); - usbd_copy_out(xfer->frbuffers + 0, offset + len - sizeof(stat), - &stat, sizeof(stat)); + usbd_copy_out(xfer->frbuffers + 0, offset + len - sizeof(stat), + &stat, sizeof(stat)); if (stat.flags & ZYD_RX_ERROR) { DPRINTF(sc, 0, "RX status indicated " - "error (0x%02x)\n", stat.flags); + "error (0x%02x)\n", stat.flags); ifp->if_ierrors++; return; } - /* compute actual frame length */ len -= ZYD_OVERHEAD; /* allocate a mbuf to store the frame */ if (len > MCLBYTES) { DPRINTF(sc, 0, "too large frame, " - "%u bytes\n", len); + "%u bytes\n", len); return; } else if (len > MHLEN) m = m_getcl(M_DONTWAIT, MT_DATA, M_PKTHDR); @@ -856,8 +851,8 @@ m->m_pkthdr.len = len; m->m_len = len; - usbd_copy_out(xfer->frbuffers + 0, offset + - sizeof(plcp), m->m_data, len); + usbd_copy_out(xfer->frbuffers + 0, offset + + sizeof(plcp), m->m_data, len); if (bpf_peers_present(sc->sc_drvbpf)) { struct zyd_rx_radiotap_header *tap = &sc->sc_rxtap; @@ -871,15 +866,13 @@ tap->wr_rate = zyd_plcp2ieee(plcp.signal, stat.flags & ZYD_RX_OFDM); tap->wr_antsignal = stat.rssi + -95; - tap->wr_antnoise = -95; /* XXX */ + tap->wr_antnoise = -95; /* XXX */ bpf_mtap2(sc->sc_drvbpf, tap, sc->sc_rxtap_len, m); } - if (sizeof(m->m_hdr.pad) > 0) { - m->m_hdr.pad[0] = stat.rssi; /* XXX hack */ + m->m_hdr.pad[0] = stat.rssi; /* XXX hack */ } - _IF_ENQUEUE(mq, m); return; @@ -903,7 +896,7 @@ switch (USBD_GET_STATE(xfer)) { case USBD_ST_TRANSFERRED: - if (xfer->actlen < MAX(sizeof(rx_desc),ZYD_MIN_FRAGSZ)) { + if (xfer->actlen < MAX(sizeof(rx_desc), ZYD_MIN_FRAGSZ)) { DPRINTF(sc, -1, "xfer too short, %d bytes\n", xfer->actlen); ifp->if_ierrors++; goto tr_setup; @@ -916,28 +909,30 @@ offset = 0; DPRINTF(sc, 3, "received multi-frame transfer, " - "%u bytes\n", xfer->actlen); + "%u bytes\n", xfer->actlen); for (x = 0; x < ZYD_MAX_RXFRAMECNT; x++) { - len16 = UGETW(rx_desc.len[x]); + len16 = UGETW(rx_desc.len[x]); - if ((len16 == 0) || (len16 > xfer->actlen)) { - break; - } + if ((len16 == 0) || (len16 > xfer->actlen)) { + break; + } + zyd_bulk_read_callback_sub(xfer, &mq, offset, len16); - zyd_bulk_read_callback_sub(xfer, &mq, offset, len16); - - /* next frame is aligned on a 32-bit boundary */ - len16 = (len16 + 3) & ~3; - offset += len16; - if (len16 > xfer->actlen) { - break; - } - xfer->actlen -= len16; + /* + * next frame is aligned on a 32-bit + * boundary + */ + len16 = (len16 + 3) & ~3; + offset += len16; + if (len16 > xfer->actlen) { + break; + } + xfer->actlen -= len16; } } else { DPRINTF(sc, 3, "received single-frame transfer, " - "%u bytes\n", xfer->actlen); + "%u bytes\n", xfer->actlen); zyd_bulk_read_callback_sub(xfer, &mq, 0, xfer->actlen); } @@ -968,11 +963,11 @@ if (m == NULL) break; - rssi = m->m_hdr.pad[0]; /* XXX hack */ + rssi = m->m_hdr.pad[0]; /* XXX hack */ ni = ieee80211_find_rxnode(ic, mtod(m, void *)); - ieee80211_input(ic, m, ni, (rssi > 63) ? - 127 : (2 * rssi), -95/*XXX*/, 0); + ieee80211_input(ic, m, ni, (rssi > 63) ? + 127 : (2 * rssi), -95 /* XXX */ , 0); /* node is no longer needed */ ieee80211_free_node(ni); @@ -1021,21 +1016,20 @@ addr = ZYD_FIRMWARE_START_ADDR; while (fw_len > 0) { - if (fw_len < 64) { - temp = fw_len; - } + if (fw_len < 64) { + temp = fw_len; + } + DPRINTF(sc, 0, "firmware block: fw_len=%u\n", fw_len); - DPRINTF(sc, 0, "firmware block: fw_len=%u\n", fw_len); + USETW(req.wValue, addr); + USETW(req.wLength, temp); - USETW(req.wValue, addr); - USETW(req.wLength, temp); + zyd_cfg_usbrequest(sc, &req, + USBD_ADD_BYTES(fw_ptr, 0)); - zyd_cfg_usbrequest(sc, &req, - USBD_ADD_BYTES(fw_ptr,0)); - - addr += (temp / 2); - fw_len -= temp; - fw_ptr += temp; + addr += (temp / 2); + fw_len -= temp; + fw_ptr += temp; } /* check whether the upload succeeded */ @@ -1069,7 +1063,7 @@ return (UMATCH_NONE); return (zyd_lookup(uaa->vendor, uaa->product) ? - UMATCH_VENDOR_PRODUCT : UMATCH_NONE); + UMATCH_VENDOR_PRODUCT : UMATCH_NONE); } /* @@ -1184,8 +1178,8 @@ { /* XXX this is probably broken.. */ zyd_cfg_write32(sc, ZYD_CR_ATIM_WND_PERIOD, bintval - 2); - zyd_cfg_write32(sc, ZYD_CR_PRE_TBTT, bintval - 1); - zyd_cfg_write32(sc, ZYD_CR_BCN_INTERVAL, bintval); + zyd_cfg_write32(sc, ZYD_CR_PRE_TBTT, bintval - 1); + zyd_cfg_write32(sc, ZYD_CR_BCN_INTERVAL, bintval); return; } @@ -1195,12 +1189,13 @@ static const char * zyd_rf_name(uint8_t type) { - static const char * const zyd_rfs[] = { - "unknown", "unknown", "UW2451", "UCHIP", "AL2230", - "AL7230B", "THETA", "AL2210", "MAXIM_NEW", "GCT", - "PV2000", "RALINK", "INTERSIL", "RFMD", "MAXIM_NEW2", + static const char *const zyd_rfs[] = { + "unknown", "unknown", "UW2451", "UCHIP", "AL2230", + "AL7230B", "THETA", "AL2210", "MAXIM_NEW", "GCT", + "PV2000", "RALINK", "INTERSIL", "RFMD", "MAXIM_NEW2", "PHILIPS" }; + return (zyd_rfs[(type > 15) ? 0 : type]); } @@ -1245,8 +1240,8 @@ uint8_t channel) { static const struct { - uint32_t r1, r2; - } rfprog[] = ZYD_RFMD_CHANTABLE; + uint32_t r1, r2; + } rfprog[] = ZYD_RFMD_CHANTABLE; zyd_cfg_rfwrite(sc, rfprog[channel - 1].r1); zyd_cfg_rfwrite(sc, rfprog[channel - 1].r2); @@ -1261,7 +1256,7 @@ { uint8_t on251 = (sc->sc_mac_rev == ZYD_ZD1211) ? 0x3f : 0x7f; - zyd_cfg_write16(sc, ZYD_CR11, on ? 0x00 : 0x04); + zyd_cfg_write16(sc, ZYD_CR11, on ? 0x00 : 0x04); zyd_cfg_write16(sc, ZYD_CR251, on ? on251 : 0x2f); return; } @@ -1275,7 +1270,7 @@ static const struct zyd_phy_pair phyini[] = ZYD_AL2230_PHY; static const uint32_t rfini[] = ZYD_AL2230_RF; uint32_t i; - + /* init RF-dependent PHY registers */ for (i = 0; i != INDEXES(phyini); i++) { zyd_cfg_write16(sc, phyini[i].reg, phyini[i].val); @@ -1315,8 +1310,8 @@ uint8_t channel) { static const struct { - uint32_t r1, r2, r3; - } rfprog[] = ZYD_AL2230_CHANTABLE; + uint32_t r1, r2, r3; + } rfprog[] = ZYD_AL2230_CHANTABLE; zyd_cfg_rfwrite(sc, rfprog[channel - 1].r1); zyd_cfg_rfwrite(sc, rfprog[channel - 1].r2); @@ -1333,7 +1328,7 @@ static void zyd_cfg_rf_al7230b_switch_radio(struct zyd_softc *sc, uint8_t on) { - zyd_cfg_write16(sc, ZYD_CR11, on ? 0x00 : 0x04); + zyd_cfg_write16(sc, ZYD_CR11, on ? 0x00 : 0x04); zyd_cfg_write16(sc, ZYD_CR251, on ? 0x3f : 0x2f); return; } @@ -1378,8 +1373,8 @@ uint8_t channel) { static const struct { - uint32_t r1, r2; - } rfprog[] = ZYD_AL7230B_CHANTABLE; + uint32_t r1, r2; + } rfprog[] = ZYD_AL7230B_CHANTABLE; static const uint32_t rfsc[] = ZYD_AL7230B_RF_SETCHANNEL; uint32_t i; @@ -1393,7 +1388,7 @@ zyd_cfg_write16(sc, ZYD_CR128, 0x14); zyd_cfg_write16(sc, ZYD_CR129, 0x12); zyd_cfg_write16(sc, ZYD_CR130, 0x10); - zyd_cfg_write16(sc, ZYD_CR38, 0x38); + zyd_cfg_write16(sc, ZYD_CR38, 0x38); zyd_cfg_write16(sc, ZYD_CR136, 0xdf); zyd_cfg_rfwrite(sc, rfprog[channel - 1].r1); @@ -1555,8 +1550,8 @@ static const struct zyd_phy_pair phyini[] = ZYD_MAXIM_PHY; static const uint32_t rfini[] = ZYD_MAXIM_RF; static const struct { - uint32_t r1, r2; - } rfprog[] = ZYD_MAXIM_CHANTABLE; + uint32_t r1, r2; + } rfprog[] = ZYD_MAXIM_CHANTABLE; uint16_t tmp; uint32_t i; @@ -1578,10 +1573,10 @@ /* init maxim radio - skipping the two first values */ if (INDEXES(rfini) > 2) { - for (i = 2; i != INDEXES(rfini); i++) { - zyd_cfg_rfwrite(sc, rfini[i]); + for (i = 2; i != INDEXES(rfini); i++) { + zyd_cfg_rfwrite(sc, rfini[i]); + } } - } zyd_cfg_read16(sc, ZYD_CR203, &tmp); zyd_cfg_write16(sc, ZYD_CR203, tmp | (1 << 4)); @@ -1629,8 +1624,8 @@ static const struct zyd_phy_pair phyini[] = ZYD_MAXIM2_PHY; static const uint32_t rfini[] = ZYD_MAXIM2_RF; static const struct { - uint32_t r1, r2; - } rfprog[] = ZYD_MAXIM2_CHANTABLE; + uint32_t r1, r2; + } rfprog[] = ZYD_MAXIM2_CHANTABLE; uint16_t tmp; uint32_t i; @@ -1652,9 +1647,9 @@ /* init maxim2 radio - skipping the two first values */ if (INDEXES(rfini) > 2) { - for (i = 2; i != INDEXES(rfini); i++) { - zyd_cfg_rfwrite(sc, rfini[i]); - } + for (i = 2; i != INDEXES(rfini); i++) { + zyd_cfg_rfwrite(sc, rfini[i]); + } } zyd_cfg_read16(sc, ZYD_CR203, &tmp); zyd_cfg_write16(sc, ZYD_CR203, tmp | (1 << 4)); @@ -1667,14 +1662,14 @@ static uint8_t zyd_cfg_rf_init_hw(struct zyd_softc *sc, struct zyd_rf *rf) { - ; /* fix for indent */ + ; /* fix for indent */ switch (sc->sc_rf_rev) { case ZYD_RF_RFMD: - rf->cfg_init_hw = zyd_cfg_rf_rfmd_init; + rf->cfg_init_hw = zyd_cfg_rf_rfmd_init; rf->cfg_switch_radio = zyd_cfg_rf_rfmd_switch_radio; - rf->cfg_set_channel = zyd_cfg_rf_rfmd_set_channel; - rf->width = 24; /* 24-bit RF values */ + rf->cfg_set_channel = zyd_cfg_rf_rfmd_set_channel; + rf->width = 24; /* 24-bit RF values */ break; case ZYD_RF_AL2230: if (sc->sc_mac_rev == ZYD_ZD1211B) @@ -1682,38 +1677,38 @@ else rf->cfg_init_hw = zyd_cfg_rf_al2230_init; rf->cfg_switch_radio = zyd_cfg_rf_al2230_switch_radio; - rf->cfg_set_channel = zyd_cfg_rf_al2230_set_channel; - rf->width = 24; /* 24-bit RF values */ + rf->cfg_set_channel = zyd_cfg_rf_al2230_set_channel; + rf->width = 24; /* 24-bit RF values */ break; case ZYD_RF_AL7230B: - rf->cfg_init_hw = zyd_cfg_rf_al7230b_init; + rf->cfg_init_hw = zyd_cfg_rf_al7230b_init; rf->cfg_switch_radio = zyd_cfg_rf_al7230b_switch_radio; - rf->cfg_set_channel = zyd_cfg_rf_al7230b_set_channel; - rf->width = 24; /* 24-bit RF values */ + rf->cfg_set_channel = zyd_cfg_rf_al7230b_set_channel; + rf->width = 24; /* 24-bit RF values */ break; case ZYD_RF_AL2210: - rf->cfg_init_hw = zyd_cfg_rf_al2210_init; + rf->cfg_init_hw = zyd_cfg_rf_al2210_init; rf->cfg_switch_radio = zyd_cfg_rf_al2210_switch_radio; - rf->cfg_set_channel = zyd_cfg_rf_al2210_set_channel; - rf->width = 24; /* 24-bit RF values */ + rf->cfg_set_channel = zyd_cfg_rf_al2210_set_channel; + rf->width = 24; /* 24-bit RF values */ break; case ZYD_RF_GCT: - rf->cfg_init_hw = zyd_cfg_rf_gct_init; + rf->cfg_init_hw = zyd_cfg_rf_gct_init; rf->cfg_switch_radio = zyd_cfg_rf_gct_switch_radio; - rf->cfg_set_channel = zyd_cfg_rf_gct_set_channel; - rf->width = 21; /* 21-bit RF values */ + rf->cfg_set_channel = zyd_cfg_rf_gct_set_channel; + rf->width = 21; /* 21-bit RF values */ break; case ZYD_RF_MAXIM_NEW: - rf->cfg_init_hw = zyd_cfg_rf_maxim_init; + rf->cfg_init_hw = zyd_cfg_rf_maxim_init; rf->cfg_switch_radio = zyd_cfg_rf_maxim_switch_radio; - rf->cfg_set_channel = zyd_cfg_rf_maxim_set_channel; - rf->width = 18; /* 18-bit RF values */ + rf->cfg_set_channel = zyd_cfg_rf_maxim_set_channel; + rf->width = 18; /* 18-bit RF values */ break; case ZYD_RF_MAXIM_NEW2: - rf->cfg_init_hw = zyd_cfg_rf_maxim2_init; + rf->cfg_init_hw = zyd_cfg_rf_maxim2_init; rf->cfg_switch_radio = zyd_cfg_rf_maxim2_switch_radio; - rf->cfg_set_channel = zyd_cfg_rf_maxim2_set_channel; - rf->width = 18; /* 18-bit RF values */ + rf->cfg_set_channel = zyd_cfg_rf_maxim2_set_channel; + rf->width = 18; /* 18-bit RF values */ break; default: printf("%s: Sorry, radio %s is not supported yet\n", @@ -1802,7 +1797,7 @@ /* init beacon interval to 100ms */ zyd_cfg_set_beacon_interval(sc, 100); - return (0); /* success */ + return (0); /* success */ } /* @@ -1818,18 +1813,18 @@ /* read MAC address */ zyd_cfg_read32(sc, ZYD_EEPROM_MAC_ADDR_P1, &tmp); sc->sc_ic.ic_myaddr[0] = tmp & 0xff; - sc->sc_ic.ic_myaddr[1] = tmp >> 8; + sc->sc_ic.ic_myaddr[1] = tmp >> 8; sc->sc_ic.ic_myaddr[2] = tmp >> 16; sc->sc_ic.ic_myaddr[3] = tmp >> 24; zyd_cfg_read32(sc, ZYD_EEPROM_MAC_ADDR_P2, &tmp); sc->sc_ic.ic_myaddr[4] = tmp & 0xff; - sc->sc_ic.ic_myaddr[5] = tmp >> 8; + sc->sc_ic.ic_myaddr[5] = tmp >> 8; zyd_cfg_read32(sc, ZYD_EEPROM_POD, &tmp); - sc->sc_rf_rev = tmp & 0x0f; - sc->sc_fix_cr47 = (tmp >> 8 ) & 0x01; + sc->sc_rf_rev = tmp & 0x0f; + sc->sc_fix_cr47 = (tmp >> 8) & 0x01; sc->sc_fix_cr157 = (tmp >> 13) & 0x01; - sc->sc_pa_rev = (tmp >> 16) & 0x0f; + sc->sc_pa_rev = (tmp >> 16) & 0x0f; /* read regulatory domain (currently unused) */ zyd_cfg_read32(sc, ZYD_EEPROM_SUBID, &tmp); @@ -1930,14 +1925,12 @@ "upload firmware!\n", sc->sc_name); return; } - /* reset device */ - err = usbreq_set_config(sc->sc_udev, &(sc->sc_mtx), - sc->sc_udev->curr_config_no); + err = usbreq_set_config(sc->sc_udev, &(sc->sc_mtx), + sc->sc_udev->curr_config_no); if (err) { DPRINTF(sc, 0, "reset failed (ignored)\n"); } - /* Read MAC and other stuff rom EEPROM */ zyd_cfg_read_eeprom(sc); @@ -1946,15 +1939,13 @@ printf("%s: HW init failed!\n", sc->sc_name); return; } - /* Now init the RF chip */ if (zyd_cfg_rf_init_hw(sc, &sc->sc_rf)) { printf("%s: RF init failed!\n", sc->sc_name); return; } - printf("%s: HMAC ZD1211%s, FW %02x.%02x, RF %s, PA %x, address %02x:%02x:%02x:%02x:%02x:%02x\n", - sc->sc_name, (sc->sc_mac_rev == ZYD_ZD1211) ? "": "B", + sc->sc_name, (sc->sc_mac_rev == ZYD_ZD1211) ? "" : "B", sc->sc_fw_rev >> 8, sc->sc_fw_rev & 0xff, zyd_rf_name(sc->sc_rf_rev), sc->sc_pa_rev, sc->sc_ic.ic_myaddr[0], sc->sc_ic.ic_myaddr[1], sc->sc_ic.ic_myaddr[2], @@ -1993,13 +1984,13 @@ ic->ic_state = IEEE80211_S_INIT; /* Set device capabilities */ - ic->ic_caps = - IEEE80211_C_MONITOR /* monitor mode */ - | IEEE80211_C_SHPREAMBLE /* short preamble supported */ >>> TRUNCATED FOR MAIL (1000 lines) <<< From owner-p4-projects@FreeBSD.ORG Wed Jan 2 19:37:59 2008 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 996A316A41A; Wed, 2 Jan 2008 19:37:59 +0000 (UTC) Delivered-To: perforce@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 5DA4816A418 for ; Wed, 2 Jan 2008 19:37:59 +0000 (UTC) (envelope-from swise@FreeBSD.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id 4CAF513C45B for ; Wed, 2 Jan 2008 19:37:59 +0000 (UTC) (envelope-from swise@FreeBSD.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.1/8.14.1) with ESMTP id m02Jbxkd024613 for ; Wed, 2 Jan 2008 19:37:59 GMT (envelope-from swise@FreeBSD.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.1/8.14.1/Submit) id m02Jbxgs024579 for perforce@freebsd.org; Wed, 2 Jan 2008 19:37:59 GMT (envelope-from swise@FreeBSD.org) Date: Wed, 2 Jan 2008 19:37:59 GMT Message-Id: <200801021937.m02Jbxgs024579@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to swise@FreeBSD.org using -f From: Steve Wise To: Perforce Change Reviews Cc: Subject: PERFORCE change 132326 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 02 Jan 2008 19:37:59 -0000 http://perforce.freebsd.org/chv.cgi?CH=132326 Change 132326 by swise@swise:vic10:iwarp on 2008/01/02 19:37:06 dumping regs can corrupt memory. bad pointer math causes the register dump buffer to be overrun. Affected files ... .. //depot/projects/iwarp/sys/dev/cxgb/cxgb_main.c#7 edit Differences ... ==== //depot/projects/iwarp/sys/dev/cxgb/cxgb_main.c#7 (text+ko) ==== @@ -2683,7 +2683,7 @@ reg_block_dump(struct adapter *ap, uint8_t *buf, unsigned int start, unsigned int end) { - uint32_t *p = (uint32_t *)buf + start; + uint32_t *p = (uint32_t *)(buf + start); for ( ; start <= end; start += sizeof(uint32_t)) *p++ = t3_read_reg(ap, start); From owner-p4-projects@FreeBSD.ORG Wed Jan 2 19:55:17 2008 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 8828816A41B; Wed, 2 Jan 2008 19:55:17 +0000 (UTC) Delivered-To: perforce@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 4CABB16A418 for ; Wed, 2 Jan 2008 19:55:17 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id 3BB7D13C442 for ; Wed, 2 Jan 2008 19:55:17 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.1/8.14.1) with ESMTP id m02JtHGR033171 for ; Wed, 2 Jan 2008 19:55:17 GMT (envelope-from hselasky@FreeBSD.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.1/8.14.1/Submit) id m02JtHGU033165 for perforce@freebsd.org; Wed, 2 Jan 2008 19:55:17 GMT (envelope-from hselasky@FreeBSD.org) Date: Wed, 2 Jan 2008 19:55:17 GMT Message-Id: <200801021955.m02JtHGU033165@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky To: Perforce Change Reviews Cc: Subject: PERFORCE change 132327 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 02 Jan 2008 19:55:17 -0000 http://perforce.freebsd.org/chv.cgi?CH=132327 Change 132327 by hselasky@hselasky_laptop001 on 2008/01/02 19:55:12 Fix a race in if_zyd regarding the interrupt endpoint. We need to do all verification in the "zyd_cfg_usb_intr_read()" function else we get trouble if the data arrives too early, hence the interrupt endpoint is running in the background. Affected files ... .. //depot/projects/usb/src/sys/dev/usb/if_zyd.c#34 edit Differences ... ==== //depot/projects/usb/src/sys/dev/usb/if_zyd.c#34 (text+ko) ==== @@ -409,7 +409,6 @@ struct zyd_softc *sc = xfer->priv_sc; struct zyd_cmd *cmd = &(sc->sc_intr_ibuf); uint32_t actlen; - uint32_t x; switch (USBD_GET_STATE(xfer)) { case USBD_ST_TRANSFERRED: @@ -454,12 +453,6 @@ /* try to clear stall first */ sc->sc_flags |= ZYD_FLAG_INTR_READ_STALL; usbd_transfer_start(sc->sc_xfer[ZYD_TR_INTR_CS_RD]); - } else { - /* tearing down */ - if (sc->sc_intr_iwakeup) { - bzero(sc->sc_intr_ibuf.data, sc->sc_intr_ilen); - wakeup(&(sc->sc_intr_iwakeup)); - } } break; } @@ -506,33 +499,13 @@ goto tr_setup; /* HMAC interrupt */ } if (actlen < 4) { + DPRINTF(sc, -1, "too short, %u bytes\n", actlen); goto tr_setup; /* too short */ } actlen -= 4; - if (actlen != sc->sc_intr_ilen) { - DPRINTF(sc, -1, "unexpected length %u != %u\n", - actlen, sc->sc_intr_ilen); - goto tr_setup; /* invalid length */ - } - actlen /= 4; + sc->sc_intr_ilen = actlen; - /* verify register values */ - for (x = 0; x != actlen; x++) { - if (sc->sc_intr_obuf.data[(2 * x)] != - sc->sc_intr_ibuf.data[(4 * x)]) { - /* invalid register */ - DPRINTF(sc, 0, "Invalid register (1)!\n"); - goto tr_setup; - } - if (sc->sc_intr_obuf.data[(2 * x) + 1] != - sc->sc_intr_ibuf.data[(4 * x) + 1]) { - /* invalid register */ - DPRINTF(sc, 0, "Invalid register (2)!\n"); - goto tr_setup; - } - } - if (sc->sc_intr_iwakeup) { sc->sc_intr_iwakeup = 0; wakeup(&(sc->sc_intr_iwakeup)); @@ -540,8 +513,8 @@ sc->sc_intr_iwakeup = 1; } /* - * We pause reading data from the interrupt endpoint until the data - * has been picked up! + * We pause reading data from the interrupt endpoint until the + * data has been picked up! */ return; } @@ -552,6 +525,9 @@ static void zyd_cfg_usb_intr_read(struct zyd_softc *sc, void *data, uint32_t size) { + uint16_t actlen; + uint16_t x; + if (size > sizeof(sc->sc_intr_ibuf.data)) { DPRINTF(sc, -1, "truncating transfer size!\n"); size = sizeof(sc->sc_intr_ibuf.data); @@ -563,33 +539,56 @@ if (sc->sc_intr_iwakeup) { DPRINTF(sc, 0, "got data already!\n"); sc->sc_intr_iwakeup = 0; - goto got_data; + goto skip0; } - /* else wait for data */ +repeat: + sc->sc_intr_iwakeup = 1; + + while (sc->sc_intr_iwakeup) { - sc->sc_intr_iwakeup = 1; - sc->sc_intr_ilen = size; + /* wait for data */ - usbd_transfer_start(sc->sc_xfer[ZYD_TR_INTR_DT_RD]); + usbd_transfer_start(sc->sc_xfer[ZYD_TR_INTR_DT_RD]); - while (sc->sc_intr_iwakeup) { if (mtx_sleep(&(sc->sc_intr_iwakeup), &(sc->sc_mtx), 0, "zyd-ird", hz / 2)) { /* should not happen */ } if (usbd_config_td_is_gone(&(sc->sc_config_td))) { - sc->sc_intr_iwakeup = 0; bzero(data, size); goto done; } } +skip0: + if (size != sc->sc_intr_ilen) { + DPRINTF(sc, -1, "unexpected length %u != %u\n", + size, sc->sc_intr_ilen); + goto repeat; + } + actlen = sc->sc_intr_ilen; + actlen /= 4; + + /* verify register values */ + for (x = 0; x != actlen; x++) { + if (sc->sc_intr_obuf.data[(2 * x)] != + sc->sc_intr_ibuf.data[(4 * x)]) { + /* invalid register */ + DPRINTF(sc, -1, "Invalid register (1) at %u!\n", x); + goto repeat; + } + if (sc->sc_intr_obuf.data[(2 * x) + 1] != + sc->sc_intr_ibuf.data[(4 * x) + 1]) { + /* invalid register */ + DPRINTF(sc, -1, "Invalid register (2) at %u!\n", x); + goto repeat; + } + } -got_data: bcopy(sc->sc_intr_ibuf.data, data, size); /* - * We have fetched the data from the shared buffer and it is safe to - * restart the interrupt transfer! + * We have fetched the data from the shared buffer and it is + * safe to restart the interrupt transfer! */ usbd_transfer_start(sc->sc_xfer[ZYD_TR_INTR_DT_RD]); done: From owner-p4-projects@FreeBSD.ORG Wed Jan 2 20:19:03 2008 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 63CA416A473; Wed, 2 Jan 2008 20:19:03 +0000 (UTC) Delivered-To: perforce@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 2794116A469; Wed, 2 Jan 2008 20:19:03 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from speedfactory.net (mail6.speedfactory.net [66.23.216.219]) by mx1.freebsd.org (Postfix) with ESMTP id B00B913C448; Wed, 2 Jan 2008 20:19:02 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from server.baldwin.cx (unverified [66.23.211.162]) by speedfactory.net (SurgeMail 3.8q) with ESMTP id 227051832-1834499 for multiple; Wed, 02 Jan 2008 15:16:57 -0500 Received: from localhost.corp.yahoo.com (john@localhost [127.0.0.1]) (authenticated bits=0) by server.baldwin.cx (8.13.8/8.13.8) with ESMTP id m02KIpIb019397; Wed, 2 Jan 2008 15:18:52 -0500 (EST) (envelope-from jhb@freebsd.org) From: John Baldwin To: "M. Warner Losh" Date: Wed, 2 Jan 2008 14:12:08 -0500 User-Agent: KMail/1.9.6 References: <200712310531.lBV5VvH3092205@repoman.freebsd.org> <20080101.120601.106977236.imp@bsdimp.com> In-Reply-To: <20080101.120601.106977236.imp@bsdimp.com> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200801021412.09276.jhb@freebsd.org> X-Greylist: Sender succeeded SMTP AUTH authentication, not delayed by milter-greylist-2.0.2 (server.baldwin.cx [127.0.0.1]); Wed, 02 Jan 2008 15:18:52 -0500 (EST) X-Virus-Scanned: ClamAV 0.91.2/5343/Wed Jan 2 12:41:01 2008 on server.baldwin.cx X-Virus-Status: Clean X-Spam-Status: No, score=-4.4 required=4.2 tests=ALL_TRUSTED,AWL,BAYES_00 autolearn=ham version=3.1.3 X-Spam-Checker-Version: SpamAssassin 3.1.3 (2006-06-01) on server.baldwin.cx Cc: jb@freebsd.org, perforce@freebsd.org Subject: Re: PERFORCE change 132153 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 02 Jan 2008 20:19:03 -0000 On Tuesday 01 January 2008 02:06:01 pm M. Warner Losh wrote: > In message: <200712310531.lBV5VvH3092205@repoman.freebsd.org> > John Birrell writes: > : http://perforce.freebsd.org/chv.cgi?CH=132153 > : > : Change 132153 by jb@jb_freebsd1 on 2007/12/31 05:31:02 > : > : amd64 doesn't seem to have a program header in the kernel modules > : like i386 does. I don't know enough about amd64 to know if that's a > : problem or not. I have a feeling I'm not far off learning that. :-P > > I believe that amd64 is the only one that doesn't... Currently. :) amd64 uses the equivalent of a .o for klds whereas other archs use the equivalent of a .so. Hence link_elf.c (shared object for !amd64) and link_elf_object.c (handles plain object files). Other platforms could be switched to using plain objects IIRC, they are just using .so for their default. > Warner > > : Affected files ... > : > : .. //depot/projects/dtrace/src/contrib/opensolaris/lib/libdtrace/common/dt_module.c#14 edit > : > : Differences ... > : > : ==== //depot/projects/dtrace/src/contrib/opensolaris/lib/libdtrace/common/dt_module.c#14 (text) ==== > : > : @@ -927,6 +927,7 @@ > : #if defined(sun) > : dmp->dm_modid = (int)OBJFS_MODID(st.st_ino); > : #else > : +#if defined(__i386__) > : /* > : * Find the first load section and figure out the relocation > : * offset for the symbols. The kernel module will not need > : @@ -939,6 +940,7 @@ > : } > : } > : #endif > : +#endif > -- John Baldwin From owner-p4-projects@FreeBSD.ORG Wed Jan 2 20:52:57 2008 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 8346216A420; Wed, 2 Jan 2008 20:52:57 +0000 (UTC) Delivered-To: perforce@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 483FF16A419; Wed, 2 Jan 2008 20:52:57 +0000 (UTC) (envelope-from jb@what-creek.com) Received: from what-creek.com (what-creek.com [66.111.37.70]) by mx1.freebsd.org (Postfix) with ESMTP id 206D913C447; Wed, 2 Jan 2008 20:52:56 +0000 (UTC) (envelope-from jb@what-creek.com) Received: by what-creek.com (Postfix, from userid 102) id 483BF7321F; Wed, 2 Jan 2008 20:39:13 +0000 (GMT) Date: Wed, 2 Jan 2008 20:39:13 +0000 From: John Birrell To: John Baldwin Message-ID: <20080102203913.GA44121@what-creek.com> References: <200712310531.lBV5VvH3092205@repoman.freebsd.org> <20080101.120601.106977236.imp@bsdimp.com> <200801021412.09276.jhb@freebsd.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <200801021412.09276.jhb@freebsd.org> User-Agent: Mutt/1.4.2.3i Cc: perforce@freebsd.org, "M. Warner Losh" Subject: Re: PERFORCE change 132153 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 02 Jan 2008 20:52:57 -0000 On Wed, Jan 02, 2008 at 02:12:08PM -0500, John Baldwin wrote: > amd64 uses the equivalent of a .o for klds whereas other archs > use the equivalent of a .so. Hence link_elf.c (shared object for !amd64) and > link_elf_object.c (handles plain object files). Other platforms could be > switched to using plain objects IIRC, they are just using .so for their > default. So I assume then that the amd64 .o is doesn't need to be relocated on load which was why I needed to find the program header on i386. -- John Birrell From owner-p4-projects@FreeBSD.ORG Wed Jan 2 21:13:43 2008 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id C848316A418; Wed, 2 Jan 2008 21:13:42 +0000 (UTC) Delivered-To: perforce@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 89FBE16A46B for ; Wed, 2 Jan 2008 21:13:42 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from speedfactory.net (mail6.speedfactory.net [66.23.216.219]) by mx1.freebsd.org (Postfix) with ESMTP id 3329813C4E8 for ; Wed, 2 Jan 2008 21:13:41 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from server.baldwin.cx (unverified [66.23.211.162]) by speedfactory.net (SurgeMail 3.8q) with ESMTP id 227059532-1834499 for multiple; Wed, 02 Jan 2008 16:11:34 -0500 Received: from localhost.corp.yahoo.com (john@localhost [127.0.0.1]) (authenticated bits=0) by server.baldwin.cx (8.13.8/8.13.8) with ESMTP id m02LDSoB019776; Wed, 2 Jan 2008 16:13:29 -0500 (EST) (envelope-from jhb@freebsd.org) From: John Baldwin To: John Birrell Date: Wed, 2 Jan 2008 16:13:34 -0500 User-Agent: KMail/1.9.6 References: <200712310531.lBV5VvH3092205@repoman.freebsd.org> <200801021412.09276.jhb@freebsd.org> <20080102203913.GA44121@what-creek.com> In-Reply-To: <20080102203913.GA44121@what-creek.com> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200801021613.35446.jhb@freebsd.org> X-Greylist: Sender succeeded SMTP AUTH authentication, not delayed by milter-greylist-2.0.2 (server.baldwin.cx [127.0.0.1]); Wed, 02 Jan 2008 16:13:29 -0500 (EST) X-Virus-Scanned: ClamAV 0.91.2/5343/Wed Jan 2 12:41:01 2008 on server.baldwin.cx X-Virus-Status: Clean X-Spam-Status: No, score=-4.4 required=4.2 tests=ALL_TRUSTED,AWL,BAYES_00 autolearn=ham version=3.1.3 X-Spam-Checker-Version: SpamAssassin 3.1.3 (2006-06-01) on server.baldwin.cx Cc: perforce@freebsd.org, "M. Warner Losh" Subject: Re: PERFORCE change 132153 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 02 Jan 2008 21:13:43 -0000 On Wednesday 02 January 2008 03:39:13 pm John Birrell wrote: > On Wed, Jan 02, 2008 at 02:12:08PM -0500, John Baldwin wrote: > > amd64 uses the equivalent of a .o for klds whereas other archs > > use the equivalent of a .so. Hence link_elf.c (shared object for !amd64) and > > link_elf_object.c (handles plain object files). Other platforms could be > > switched to using plain objects IIRC, they are just using .so for their > > default. > > So I assume then that the amd64 .o is doesn't need to be relocated on load > which was why I needed to find the program header on i386. It would appear from the link_elf_obj.c code that .o files are relocated on load. -- John Baldwin From owner-p4-projects@FreeBSD.ORG Wed Jan 2 21:43:47 2008 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id DC58216A419; Wed, 2 Jan 2008 21:43:46 +0000 (UTC) Delivered-To: perforce@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id A1D8E16A417 for ; Wed, 2 Jan 2008 21:43:46 +0000 (UTC) (envelope-from jb@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id 7921313C45A for ; Wed, 2 Jan 2008 21:43:46 +0000 (UTC) (envelope-from jb@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.1/8.14.1) with ESMTP id m02Lhkjx089910 for ; Wed, 2 Jan 2008 21:43:46 GMT (envelope-from jb@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.1/8.14.1/Submit) id m02Lhkx5089906 for perforce@freebsd.org; Wed, 2 Jan 2008 21:43:46 GMT (envelope-from jb@freebsd.org) Date: Wed, 2 Jan 2008 21:43:46 GMT Message-Id: <200801022143.m02Lhkx5089906@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to jb@freebsd.org using -f From: John Birrell To: Perforce Change Reviews Cc: Subject: PERFORCE change 132334 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 02 Jan 2008 21:43:47 -0000 http://perforce.freebsd.org/chv.cgi?CH=132334 Change 132334 by jb@jb_freebsd1 on 2008/01/02 21:43:02 Back out the addition of two sysconf types. I decided to use the FreeBSD _SC_NPROCESSORS_MAX for both of them instead. Affected files ... .. //depot/projects/dtrace/src/include/unistd.h#7 edit Differences ... ==== //depot/projects/dtrace/src/include/unistd.h#7 (text+ko) ==== @@ -296,8 +296,6 @@ /* Extensions found in Solaris and Linux. */ #define _SC_PHYS_PAGES 121 -#define _SC_NPROCESSORS_MAX 122 -#define _SC_CPUID_MAX 123 /* Keys for the confstr(3) function. */ #if __POSIX_VISIBLE >= 199209 From owner-p4-projects@FreeBSD.ORG Wed Jan 2 21:54:27 2008 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 1465516A420; Wed, 2 Jan 2008 21:54:27 +0000 (UTC) Delivered-To: perforce@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id CE2CE16A41A for ; Wed, 2 Jan 2008 21:54:26 +0000 (UTC) (envelope-from swise@FreeBSD.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id 84CE213C457 for ; Wed, 2 Jan 2008 21:54:26 +0000 (UTC) (envelope-from swise@FreeBSD.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.1/8.14.1) with ESMTP id m02LsQN9095169 for ; Wed, 2 Jan 2008 21:54:26 GMT (envelope-from swise@FreeBSD.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.1/8.14.1/Submit) id m02LsQgA095166 for perforce@freebsd.org; Wed, 2 Jan 2008 21:54:26 GMT (envelope-from swise@FreeBSD.org) Date: Wed, 2 Jan 2008 21:54:26 GMT Message-Id: <200801022154.m02LsQgA095166@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to swise@FreeBSD.org using -f From: Steve Wise To: Perforce Change Reviews Cc: Subject: PERFORCE change 132336 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 02 Jan 2008 21:54:27 -0000 http://perforce.freebsd.org/chv.cgi?CH=132336 Change 132336 by swise@swise:vic10:iwarp on 2008/01/02 21:54:22 cxio hal fixes 1) use m_gethdr() instead of m_get() 2) don't set gen bit for WRs sent down via the toe queue 3) request replies to qp setup WRs Affected files ... .. //depot/projects/iwarp/sys/dev/cxgb/ulp/iw_cxgb/iw_cxgb_cxio_hal.c#4 edit .. //depot/projects/iwarp/sys/dev/cxgb/ulp/iw_cxgb/iw_cxgb_cxio_wr.h#3 edit Differences ... ==== //depot/projects/iwarp/sys/dev/cxgb/ulp/iw_cxgb/iw_cxgb_cxio_hal.c#4 (text+ko) ==== @@ -180,14 +180,14 @@ { u64 sge_cmd; struct t3_modify_qp_wr *wqe; - struct mbuf *skb = m_get(MT_DATA, M_WAITOK); + struct mbuf *skb = m_gethdr(MT_DATA, M_WAITOK); if (!skb) { PDBG("%s alloc_skb failed\n", __FUNCTION__); return (ENOMEM); } wqe = (struct t3_modify_qp_wr *) mbuf_put(skb, sizeof(*wqe)); memset(wqe, 0, sizeof(*wqe)); - build_fw_riwrh((struct fw_riwrh *) wqe, T3_WR_QP_MOD, 3, 1, qpid, 7); + build_fw_riwrh((struct fw_riwrh *) wqe, T3_WR_QP_MOD, 3, 0, qpid, 7); wqe->flags = cpu_to_be32(MODQP_WRITE_EC); sge_cmd = qpid << 8 | 3; wqe->sge_cmd = cpu_to_be64(sge_cmd); @@ -560,7 +560,7 @@ struct t3_modify_qp_wr *wqe; struct mbuf *skb; - skb = m_get(MT_DATA, M_WAITOK); + skb = m_gethdr(MT_DATA, M_WAITOK); if (!skb) { PDBG("%s alloc_skb failed\n", __FUNCTION__); return (ENOMEM); @@ -605,7 +605,7 @@ V_EC_UP_TOKEN(T3_CTL_QP_TID) | F_EC_VALID)) << 32; wqe = (struct t3_modify_qp_wr *) mbuf_put(skb, sizeof(*wqe)); memset(wqe, 0, sizeof(*wqe)); - build_fw_riwrh((struct fw_riwrh *) wqe, T3_WR_QP_MOD, 0, 1, + build_fw_riwrh((struct fw_riwrh *) wqe, T3_WR_QP_MOD, 3, 0, T3_CTL_QP_TID, 7); wqe->flags = cpu_to_be32(MODQP_WRITE_EC); sge_cmd = (3ULL << 56) | FW_RI_SGEEC_START << 8 | 3; @@ -725,6 +725,7 @@ wr_len); if (flag == T3_COMPLETION_FLAG) ring_doorbell(rdev_p->ctrl_qp.doorbell, T3_CTRL_QP_ID); + len -= 96; rdev_p->ctrl_qp.wptr++; } @@ -872,7 +873,7 @@ cxio_rdma_init(struct cxio_rdev *rdev_p, struct t3_rdma_init_attr *attr) { struct t3_rdma_init_wr *wqe; - struct mbuf *skb = m_get(MT_DATA, M_NOWAIT); + struct mbuf *skb = m_gethdr(MT_DATA, M_NOWAIT); if (!skb) return (ENOMEM); PDBG("%s rdev_p %p\n", __FUNCTION__, rdev_p); ==== //depot/projects/iwarp/sys/dev/cxgb/ulp/iw_cxgb/iw_cxgb_cxio_wr.h#3 (text+ko) ==== From owner-p4-projects@FreeBSD.ORG Wed Jan 2 22:01:34 2008 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id AB6C116A418; Wed, 2 Jan 2008 22:01:34 +0000 (UTC) Delivered-To: perforce@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 70DFF16A468 for ; Wed, 2 Jan 2008 22:01:34 +0000 (UTC) (envelope-from imp@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id 480F013C469 for ; Wed, 2 Jan 2008 22:01:34 +0000 (UTC) (envelope-from imp@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.1/8.14.1) with ESMTP id m02M1YZg096127 for ; Wed, 2 Jan 2008 22:01:34 GMT (envelope-from imp@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.1/8.14.1/Submit) id m02M1Y7L096123 for perforce@freebsd.org; Wed, 2 Jan 2008 22:01:34 GMT (envelope-from imp@freebsd.org) Date: Wed, 2 Jan 2008 22:01:34 GMT Message-Id: <200801022201.m02M1Y7L096123@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to imp@freebsd.org using -f From: Warner Losh To: Perforce Change Reviews Cc: Subject: PERFORCE change 132337 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 02 Jan 2008 22:01:35 -0000 http://perforce.freebsd.org/chv.cgi?CH=132337 Change 132337 by imp@imp_paco-paco on 2008/01/02 22:01:00 cpu_halt/cpu_reset should be defined in cpu.h, remove them here. Affected files ... .. //depot/projects/mips2-jnpr/src/sys/mips/include/md_var.h#4 edit Differences ... ==== //depot/projects/mips2-jnpr/src/sys/mips/include/md_var.h#4 (text+ko) ==== @@ -43,8 +43,6 @@ extern char sigcode[]; extern int szsigcode, szosigcode; -void cpu_halt(void); -void cpu_reset(void); void MipsSaveCurFPState(struct thread *); void fork_trampoline(void); void cpu_swapin(struct proc *); From owner-p4-projects@FreeBSD.ORG Wed Jan 2 22:06:40 2008 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 0FE3D16A419; Wed, 2 Jan 2008 22:06:40 +0000 (UTC) Delivered-To: perforce@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id C9FA816A417 for ; Wed, 2 Jan 2008 22:06:39 +0000 (UTC) (envelope-from imp@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id A126513C455 for ; Wed, 2 Jan 2008 22:06:39 +0000 (UTC) (envelope-from imp@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.1/8.14.1) with ESMTP id m02M6dlC000317 for ; Wed, 2 Jan 2008 22:06:39 GMT (envelope-from imp@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.1/8.14.1/Submit) id m02M6djr000314 for perforce@freebsd.org; Wed, 2 Jan 2008 22:06:39 GMT (envelope-from imp@freebsd.org) Date: Wed, 2 Jan 2008 22:06:39 GMT Message-Id: <200801022206.m02M6djr000314@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to imp@freebsd.org using -f From: Warner Losh To: Perforce Change Reviews Cc: Subject: PERFORCE change 132338 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 02 Jan 2008 22:06:40 -0000 http://perforce.freebsd.org/chv.cgi?CH=132338 Change 132338 by imp@imp_paco-paco on 2008/01/02 22:06:25 Remove intrcnt. It has moved to sys/intrrupt.h Affected files ... .. //depot/projects/mips2-jnpr/src/sys/mips/include/intr.h#3 edit Differences ... ==== //depot/projects/mips2-jnpr/src/sys/mips/include/intr.h#3 (text+ko) ==== @@ -43,8 +43,6 @@ #ifndef _LOCORE -extern u_long intrcnt[]; - /* * Index into intrcnt[], which is defined in exceptions.S * Index # = irq # - 1 From owner-p4-projects@FreeBSD.ORG Wed Jan 2 22:23:33 2008 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id E033316A47F; Wed, 2 Jan 2008 22:23:32 +0000 (UTC) Delivered-To: perforce@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id A4B0216A47A for ; Wed, 2 Jan 2008 22:23:32 +0000 (UTC) (envelope-from imp@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id 7AF1713C45A for ; Wed, 2 Jan 2008 22:23:32 +0000 (UTC) (envelope-from imp@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.1/8.14.1) with ESMTP id m02MNWes006181 for ; Wed, 2 Jan 2008 22:23:32 GMT (envelope-from imp@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.1/8.14.1/Submit) id m02MNWqt006178 for perforce@freebsd.org; Wed, 2 Jan 2008 22:23:32 GMT (envelope-from imp@freebsd.org) Date: Wed, 2 Jan 2008 22:23:32 GMT Message-Id: <200801022223.m02MNWqt006178@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to imp@freebsd.org using -f From: Warner Losh To: Perforce Change Reviews Cc: Subject: PERFORCE change 132340 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 02 Jan 2008 22:23:33 -0000 http://perforce.freebsd.org/chv.cgi?CH=132340 Change 132340 by imp@imp_paco-paco on 2008/01/02 22:23:29 Revert Affected files ... .. //depot/projects/mips2-jnpr/src/sys/mips/mips/copystr.S#3 edit Differences ... ==== //depot/projects/mips2-jnpr/src/sys/mips/mips/copystr.S#3 (text+ko) ==== @@ -29,7 +29,7 @@ #include "assym.s" #include #include -/* __FBSDID("$FreeBSD$"); */ +__FBSDID("$FreeBSD$"); #include From owner-p4-projects@FreeBSD.ORG Wed Jan 2 22:24:34 2008 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 1847516A469; Wed, 2 Jan 2008 22:24:34 +0000 (UTC) Delivered-To: perforce@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id D1C8A16A41A for ; Wed, 2 Jan 2008 22:24:33 +0000 (UTC) (envelope-from imp@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id A896013C46E for ; Wed, 2 Jan 2008 22:24:33 +0000 (UTC) (envelope-from imp@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.1/8.14.1) with ESMTP id m02MOXD0007286 for ; Wed, 2 Jan 2008 22:24:33 GMT (envelope-from imp@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.1/8.14.1/Submit) id m02MOXBi007282 for perforce@freebsd.org; Wed, 2 Jan 2008 22:24:33 GMT (envelope-from imp@freebsd.org) Date: Wed, 2 Jan 2008 22:24:33 GMT Message-Id: <200801022224.m02MOXBi007282@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to imp@freebsd.org using -f From: Warner Losh To: Perforce Change Reviews Cc: Subject: PERFORCE change 132341 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 02 Jan 2008 22:24:34 -0000 http://perforce.freebsd.org/chv.cgi?CH=132341 Change 132341 by imp@imp_paco-paco on 2008/01/02 22:24:23 Remove redundant decl Affected files ... .. //depot/projects/mips2-jnpr/src/sys/mips/include/reg.h#4 edit Differences ... ==== //depot/projects/mips2-jnpr/src/sys/mips/include/reg.h#4 (text+ko) ==== @@ -69,7 +69,6 @@ }; #ifdef _KERNEL -void exec_setregs(struct thread *, u_long, u_long, u_long); int fill_fpregs(struct thread *, struct fpreg *); int fill_regs(struct thread *, struct reg *); int set_fpregs(struct thread *, struct fpreg *); From owner-p4-projects@FreeBSD.ORG Wed Jan 2 22:25:35 2008 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 3FD4516A469; Wed, 2 Jan 2008 22:25:35 +0000 (UTC) Delivered-To: perforce@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 058C916A41A for ; Wed, 2 Jan 2008 22:25:35 +0000 (UTC) (envelope-from imp@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id E931813C4E3 for ; Wed, 2 Jan 2008 22:25:34 +0000 (UTC) (envelope-from imp@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.1/8.14.1) with ESMTP id m02MPYMw008118 for ; Wed, 2 Jan 2008 22:25:34 GMT (envelope-from imp@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.1/8.14.1/Submit) id m02MPYO3008115 for perforce@freebsd.org; Wed, 2 Jan 2008 22:25:34 GMT (envelope-from imp@freebsd.org) Date: Wed, 2 Jan 2008 22:25:34 GMT Message-Id: <200801022225.m02MPYO3008115@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to imp@freebsd.org using -f From: Warner Losh To: Perforce Change Reviews Cc: Subject: PERFORCE change 132342 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 02 Jan 2008 22:25:35 -0000 http://perforce.freebsd.org/chv.cgi?CH=132342 Change 132342 by imp@imp_paco-paco on 2008/01/02 22:24:45 more PCPU_* stuff Affected files ... .. //depot/projects/mips2-jnpr/src/sys/mips/include/pcpu.h#4 edit Differences ... ==== //depot/projects/mips2-jnpr/src/sys/mips/include/pcpu.h#4 (text+ko) ==== @@ -67,9 +67,12 @@ #define PCPUP pcpup #endif /* SMP */ +#define PCPU_ADD(member, value) (PCPUP->pc_ ## member += (value)) #define PCPU_GET(member) (PCPUP->pc_ ## member) +#define PCPU_INC(member) PCPU_ADD(member, 1) #define PCPU_PTR(member) (&PCPUP->pc_ ## member) #define PCPU_SET(member,value) (PCPUP->pc_ ## member = (value)) +#define PCPU_LAZY_INC(member) (++PCPUP->pc_ ## member) #endif /* _KERNEL */ From owner-p4-projects@FreeBSD.ORG Wed Jan 2 22:25:36 2008 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 0DB9916A525; Wed, 2 Jan 2008 22:25:35 +0000 (UTC) Delivered-To: perforce@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 2F2D316A420 for ; Wed, 2 Jan 2008 22:25:35 +0000 (UTC) (envelope-from imp@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id 1AA0F13C4E5 for ; Wed, 2 Jan 2008 22:25:35 +0000 (UTC) (envelope-from imp@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.1/8.14.1) with ESMTP id m02MPYLr008124 for ; Wed, 2 Jan 2008 22:25:34 GMT (envelope-from imp@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.1/8.14.1/Submit) id m02MPYoc008121 for perforce@freebsd.org; Wed, 2 Jan 2008 22:25:34 GMT (envelope-from imp@freebsd.org) Date: Wed, 2 Jan 2008 22:25:34 GMT Message-Id: <200801022225.m02MPYoc008121@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to imp@freebsd.org using -f From: Warner Losh To: Perforce Change Reviews Cc: Subject: PERFORCE change 132343 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 02 Jan 2008 22:25:36 -0000 http://perforce.freebsd.org/chv.cgi?CH=132343 Change 132343 by imp@imp_paco-paco on 2008/01/02 22:25:19 More asm macros. Affected files ... .. //depot/projects/mips2-jnpr/src/sys/mips/include/asm.h#5 edit Differences ... ==== //depot/projects/mips2-jnpr/src/sys/mips/include/asm.h#5 (text+ko) ==== @@ -142,6 +142,59 @@ #endif /* __ELF__ */ /* + * These are temp registers whose names can be used in either the old + * or new ABI, although they map to different physical registers. In + * the old ABI, they map to t4-t7, and in the new ABI, they map to a4-a7. + * + * Because they overlap with the last 4 arg regs in the new ABI, ta0-ta3 + * should be used only when we need more than t0-t3. + */ +#if defined(__mips_n32) || defined(__mips_n64) +#define ta0 $8 +#define ta1 $9 +#define ta2 $10 +#define ta3 $11 +#else +#define ta0 $12 +#define ta1 $13 +#define ta2 $14 +#define ta3 $15 +#endif /* __mips_n32 || __mips_n64 */ + +#ifdef __ELF__ +# define _C_LABEL(x) x +#else +# ifdef __STDC__ +# define _C_LABEL(x) _ ## x +# else +# define _C_LABEL(x) _/**/x +# endif +#endif + +/* + * WEAK_ALIAS: create a weak alias. + */ +#define WEAK_ALIAS(alias,sym) \ + .weak alias; \ + alias = sym + +/* + * STRONG_ALIAS: create a strong alias. + */ +#define STRONG_ALIAS(alias,sym) \ + .globl alias; \ + alias = sym + +#define GLOBAL(sym) \ + .globl sym; sym: + +#define ENTRY(sym) \ + .text; .globl sym; .ent sym; sym: + +#define ASM_ENTRY(sym) \ + .text; .globl sym; .type sym,@function; sym: + +/* * LEAF * A leaf routine does * - call no other function, From owner-p4-projects@FreeBSD.ORG Wed Jan 2 22:42:29 2008 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 2062816A496; Wed, 2 Jan 2008 22:42:29 +0000 (UTC) Delivered-To: perforce@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id D538716A420 for ; Wed, 2 Jan 2008 22:42:28 +0000 (UTC) (envelope-from imp@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id A230F13C459 for ; Wed, 2 Jan 2008 22:42:28 +0000 (UTC) (envelope-from imp@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.1/8.14.1) with ESMTP id m02MgStT012897 for ; Wed, 2 Jan 2008 22:42:28 GMT (envelope-from imp@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.1/8.14.1/Submit) id m02MgSas012889 for perforce@freebsd.org; Wed, 2 Jan 2008 22:42:28 GMT (envelope-from imp@freebsd.org) Date: Wed, 2 Jan 2008 22:42:28 GMT Message-Id: <200801022242.m02MgSas012889@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to imp@freebsd.org using -f From: Warner Losh To: Perforce Change Reviews Cc: Subject: PERFORCE change 132345 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 02 Jan 2008 22:42:29 -0000 http://perforce.freebsd.org/chv.cgi?CH=132345 Change 132345 by imp@imp_paco-paco on 2008/01/02 22:41:37 Harmonize where we define things. This might not be perfect, but it gets us going... Might need to clean it up... Affected files ... .. //depot/projects/mips2-jnpr/src/sys/mips/include/asmacros.h#2 edit .. //depot/projects/mips2-jnpr/src/sys/mips/include/cpu.h#4 edit .. //depot/projects/mips2-jnpr/src/sys/mips/include/cpufunc.h#4 edit .. //depot/projects/mips2-jnpr/src/sys/mips/include/cpuregs.h#2 edit Differences ... ==== //depot/projects/mips2-jnpr/src/sys/mips/include/asmacros.h#2 (text+ko) ==== ==== //depot/projects/mips2-jnpr/src/sys/mips/include/cpu.h#4 (text+ko) ==== @@ -50,11 +50,6 @@ #include #include -#define MIPS_KUSEG_ADDR 0x0 -#define MIPS_KSEG0_START MIPS_CACHED_MEMORY_ADDR -#define MIPS_KSEG1_START MIPS_UNCACHED_MEMORY_ADDR -#define MIPS_KSEG2_START 0xc0000000 - #define MIPS_CACHED_MEMORY_ADDR 0x80000000 #define MIPS_UNCACHED_MEMORY_ADDR 0xa0000000 #define MIPS_MAX_MEM_ADDR 0xbe000000 ==== //depot/projects/mips2-jnpr/src/sys/mips/include/cpufunc.h#4 (text+ko) ==== @@ -35,6 +35,216 @@ #ifndef _MACHINE_CPUFUNC_H_ #define _MACHINE_CPUFUNC_H_ +#include +#include + +/* + * These functions are required by user-land atomi ops + */ + +static __inline void +mips_barrier(void) +{ + __asm __volatile (".set noreorder\n\t" + "nop\n\t" + "nop\n\t" + "nop\n\t" + "nop\n\t" + "nop\n\t" + "nop\n\t" + "nop\n\t" + "nop\n\t" + ".set reorder\n\t" + : : : "memory"); +} + +static __inline void +mips_wbflush(void) +{ + __asm __volatile ("sync" : : : "memory"); + mips_barrier(); +#if 0 + __asm __volatile("mtc0 %0, $12\n" /* MIPS_COP_0_STATUS */ + : : "r" (flag)); +#endif +} + +static __inline void +mips_read_membar(void) +{ + /* Nil */ +} + +static __inline void +mips_write_membar(void) +{ + mips_wbflush(); +} + +#ifdef _KERNEL + +static __inline void +mips_tlbp(void) +{ + __asm __volatile ("tlbp"); + mips_barrier(); +#if 0 + register_t ret; + register_t tmp; + + __asm __volatile("mfc0 %0, $12\n" /* MIPS_COP_0_STATUS */ + "and %1, %0, $~1\n" /* MIPS_SR_INT_IE */ + "mtc0 %1, $12\n" /* MIPS_COP_0_STATUS */ + : "=r" (ret), "=r" (tmp)); + return (ret); +#endif +} + +static __inline void +mips_tlbr(void) +{ + __asm __volatile ("tlbr"); + mips_barrier(); +} + +static __inline void +mips_tlbwi(void) +{ + __asm __volatile ("tlbwi"); + mips_barrier(); +#if 0 + __asm __volatile("mfc %0, $12\n" /* MIPS_COP_0_STATUS */ + "or %0, %0, $1\n" /* MIPS_SR_INT_IE */ + "mtc0 %0, $12\n" /* MIPS_COP_0_STATUS */ + : "=r" (tmp)); +#endif +} + +static __inline void +mips_tlbwr(void) +{ + __asm __volatile ("tlbwr"); + mips_barrier(); +} + + +#if 0 /* XXX mips64 */ + +#define MIPS_RDRW64_COP0(n,r) \ +static __inline u_int64_t \ +mips_rd_ ## n (void) \ +{ \ + int v0; \ + __asm __volatile ("dmfc0 %[v0], $"__XSTRING(r)";" \ + : [v0] "=&r"(v0)); \ + mips_barrier(); \ + return (v0); \ +} \ +static __inline void \ +mips_wr_ ## n (u_int64_t a0) \ +{ \ + __asm __volatile ("dmtc0 %[a0], $"__XSTRING(r)";" \ + __XSTRING(COP0_SYNC)";" \ + "nop;" \ + "nop;" \ + : \ + : [a0] "r"(a0)); \ + mips_barrier(); \ +} struct __hack + +MIPS_RDRW64_COP0(entrylo0, MIPS_COP_0_TLB_LO0); +MIPS_RDRW64_COP0(entrylo1, MIPS_COP_0_TLB_LO1); +MIPS_RDRW64_COP0(entryhi, MIPS_COP_0_TLB_HI); +MIPS_RDRW64_COP0(pagemask, MIPS_COP_0_TLB_PG_MASK); +MIPS_RDRW64_COP0(xcontext, MIPS_COP_0_TLB_XCONTEXT); + +#undef MIPS_RDRW64_COP0 +#endif + +#define MIPS_RDRW32_COP0(n,r) \ +static __inline u_int32_t \ +mips_rd_ ## n (void) \ +{ \ + int v0; \ + __asm __volatile ("mfc0 %[v0], $"__XSTRING(r)";" \ + : [v0] "=&r"(v0)); \ + mips_barrier(); \ + return (v0); \ +} \ +static __inline void \ +mips_wr_ ## n (u_int32_t a0) \ +{ \ + __asm __volatile ("mtc0 %[a0], $"__XSTRING(r)";" \ + __XSTRING(COP0_SYNC)";" \ + "nop;" \ + "nop;" \ + : \ + : [a0] "r"(a0)); \ + mips_barrier(); \ +} struct __hack + +MIPS_RDRW32_COP0(compare, MIPS_COP_0_COMPARE); +MIPS_RDRW32_COP0(config, MIPS_COP_0_CONFIG); +MIPS_RDRW32_COP0(count, MIPS_COP_0_COUNT); +MIPS_RDRW32_COP0(index, MIPS_COP_0_TLB_INDEX); +MIPS_RDRW32_COP0(wired, MIPS_COP_0_TLB_WIRED); +MIPS_RDRW32_COP0(cause, MIPS_COP_0_CAUSE); +MIPS_RDRW32_COP0(status, MIPS_COP_0_STATUS); + +/* XXX: Some of these registers are specific to MIPS32. */ +MIPS_RDRW32_COP0(entrylo0, MIPS_COP_0_TLB_LO0); +MIPS_RDRW32_COP0(entrylo1, MIPS_COP_0_TLB_LO1); +MIPS_RDRW32_COP0(entrylow, MIPS_COP_0_TLB_LOW); +MIPS_RDRW32_COP0(entryhi, MIPS_COP_0_TLB_HI); +MIPS_RDRW32_COP0(pagemask, MIPS_COP_0_TLB_PG_MASK); +MIPS_RDRW32_COP0(prid, MIPS_COP_0_PRID); +MIPS_RDRW32_COP0(watchlo, MIPS_COP_0_WATCH_LO); +MIPS_RDRW32_COP0(watchhi, MIPS_COP_0_WATCH_HI); + +static __inline u_int32_t +mips_rd_config_sel1(void) +{ + int v0; + __asm __volatile("mfc0 %[v0], $16, 1 ;" + : [v0] "=&r" (v0)); + mips_barrier(); + return (v0); +} + +#undef MIPS_RDRW32_COP0 + +static __inline register_t +intr_disable(void) +{ + register_t s; + + s = mips_rd_status(); + mips_wr_status(s & ~MIPS_SR_INT_IE); + + return (s); +} + +static __inline register_t +intr_enable(void) +{ + register_t s; + + s = mips_rd_status(); + mips_wr_status(s | MIPS_SR_INT_IE); + + return (s); +} + +#define intr_restore(s) mips_wr_status((s)) + +static __inline void +breakpoint(void) +{ + __asm __volatile ("break"); +} + +#endif /* _KERNEL */ + #define readb(va) (*(volatile u_int8_t *) (va)) #define readw(va) (*(volatile u_int16_t *) (va)) #define readl(va) (*(volatile u_int32_t *) (va)) @@ -70,10 +280,6 @@ #define _swap_(x) (((x) >> 24) | ((x) << 24) | \ (((x) >> 8) & 0xff00) | (((x) & 0xff00) << 8)) -#define intr_disable disableintr -#define intr_restore(s) restoreintr(s) -#define intr_enable enableintr - static __inline void __out32rb(volatile u_int32_t *, u_int32_t); static __inline void __out16rb(volatile u_int16_t *, u_int16_t); static __inline u_int32_t __in32rb(volatile u_int32_t *); @@ -124,6 +330,5 @@ void outsw(u_int16_t *, const u_int16_t *,int); void outsl(u_int32_t *, const u_int32_t *,int); u_int loadandclear(volatile u_int *addr); -int breakpoint(void); #endif /* !_MACHINE_CPUFUNC_H_ */ ==== //depot/projects/mips2-jnpr/src/sys/mips/include/cpuregs.h#2 (text+ko) ==== @@ -88,13 +88,6 @@ #define MIPS_MAX_MEM_ADDR 0xbe000000 #define MIPS_RESERVED_ADDR 0xbfc80000 -#define MIPS_PHYS_MASK 0x1fffffff - -#define MIPS_KSEG0_TO_PHYS(x) ((unsigned)(x) & MIPS_PHYS_MASK) -#define MIPS_PHYS_TO_KSEG0(x) ((unsigned)(x) | MIPS_KSEG0_START) -#define MIPS_KSEG1_TO_PHYS(x) ((unsigned)(x) & MIPS_PHYS_MASK) -#define MIPS_PHYS_TO_KSEG1(x) ((unsigned)(x) | MIPS_KSEG1_START) - /* Map virtual address to index in mips3 r4k virtually-indexed cache */ #define MIPS3_VA_TO_CINDEX(x) \ ((unsigned)(x) & 0xffffff | MIPS_KSEG0_START) From owner-p4-projects@FreeBSD.ORG Wed Jan 2 23:01:50 2008 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 0488116A41A; Wed, 2 Jan 2008 23:01:50 +0000 (UTC) Delivered-To: perforce@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id BC0CD16A417 for ; Wed, 2 Jan 2008 23:01:49 +0000 (UTC) (envelope-from jb@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id A9E2D13C442 for ; Wed, 2 Jan 2008 23:01:49 +0000 (UTC) (envelope-from jb@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.1/8.14.1) with ESMTP id m02N1nle020057 for ; Wed, 2 Jan 2008 23:01:49 GMT (envelope-from jb@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.1/8.14.1/Submit) id m02N1mim020053 for perforce@freebsd.org; Wed, 2 Jan 2008 23:01:48 GMT (envelope-from jb@freebsd.org) Date: Wed, 2 Jan 2008 23:01:48 GMT Message-Id: <200801022301.m02N1mim020053@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to jb@freebsd.org using -f From: John Birrell To: Perforce Change Reviews Cc: Subject: PERFORCE change 132346 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 02 Jan 2008 23:01:50 -0000 http://perforce.freebsd.org/chv.cgi?CH=132346 Change 132346 by jb@jb_freebsd1 on 2008/01/02 23:01:47 IFC Affected files ... .. //depot/projects/dtrace/doc/share/pgpkeys/delphij.key#3 integrate .. //depot/projects/dtrace/doc/share/pgpkeys/pgpkeys-developers.sgml#28 integrate .. //depot/projects/dtrace/doc/share/pgpkeys/pgpkeys.ent#27 integrate .. //depot/projects/dtrace/doc/share/pgpkeys/weongyo.key#1 branch .. //depot/projects/dtrace/doc/share/sgml/man-refs.ent#22 integrate .. //depot/projects/dtrace/doc/zh_CN.GB2312/books/porters-handbook/book.sgml#21 integrate .. //depot/projects/dtrace/ports/LEGAL#31 integrate .. //depot/projects/dtrace/ports/MOVED#59 integrate .. //depot/projects/dtrace/ports/Tools/portbuild/scripts/dopackages.wrapper#4 integrate .. //depot/projects/dtrace/src/COPYRIGHT#5 integrate .. //depot/projects/dtrace/src/lib/libarchive/Makefile#10 integrate .. //depot/projects/dtrace/src/lib/libarchive/mtree.5#2 delete .. //depot/projects/dtrace/src/lib/libarchive/test/Makefile#2 integrate .. //depot/projects/dtrace/src/lib/libarchive/test/README#2 integrate .. //depot/projects/dtrace/src/lib/libarchive/test/main.c#2 integrate .. //depot/projects/dtrace/src/lib/libarchive/test/read_open_memory.c#2 integrate .. //depot/projects/dtrace/src/lib/libarchive/test/test.h#2 integrate .. //depot/projects/dtrace/src/lib/libarchive/test/test_compat_gtar.c#1 branch .. //depot/projects/dtrace/src/lib/libarchive/test/test_compat_gtar_1.tgz.uu#1 branch .. //depot/projects/dtrace/src/lib/libarchive/test/test_compat_zip.c#1 branch .. //depot/projects/dtrace/src/lib/libarchive/test/test_compat_zip_1.zip.uu#1 branch .. //depot/projects/dtrace/src/lib/libarchive/test/test_empty_write.c#1 branch .. //depot/projects/dtrace/src/lib/libarchive/test/test_entry_strmode.c#1 branch .. //depot/projects/dtrace/src/lib/libarchive/test/test_read_format_cpio_odc.c#2 integrate .. //depot/projects/dtrace/src/lib/libarchive/test/test_read_format_gtar_sparse.c#2 integrate .. //depot/projects/dtrace/src/lib/libarchive/test/test_read_format_gtar_sparse_1_13.tgz.uu#1 branch .. //depot/projects/dtrace/src/lib/libarchive/test/test_read_format_gtar_sparse_1_17.tgz.uu#1 branch .. //depot/projects/dtrace/src/lib/libarchive/test/test_read_format_gtar_sparse_1_17_posix00.tgz.uu#1 branch .. //depot/projects/dtrace/src/lib/libarchive/test/test_read_format_gtar_sparse_1_17_posix01.tgz.uu#1 branch .. //depot/projects/dtrace/src/lib/libarchive/test/test_read_format_gtar_sparse_1_17_posix10.tgz.uu#1 branch .. //depot/projects/dtrace/src/lib/libarchive/test/test_read_format_gtar_sparse_1_17_posix10_modified.tar.uu#1 branch .. //depot/projects/dtrace/src/lib/libarchive/test/test_read_format_isorr_bz2.c#2 integrate .. //depot/projects/dtrace/src/lib/libarchive/test/test_read_format_mtree.c#1 branch .. //depot/projects/dtrace/src/lib/libarchive/test/test_read_format_zip.c#2 integrate .. //depot/projects/dtrace/src/lib/libarchive/test/test_read_pax_truncated.c#2 integrate .. //depot/projects/dtrace/src/lib/libarchive/test/test_tar_filenames.c#2 integrate .. //depot/projects/dtrace/src/lib/libarchive/test/test_tar_large.c#1 branch .. //depot/projects/dtrace/src/lib/libarchive/test/test_write_disk_perms.c#2 integrate .. //depot/projects/dtrace/src/lib/libarchive/test/test_write_format_cpio.c#3 integrate .. //depot/projects/dtrace/src/lib/libarchive/test/test_write_format_cpio_newc.c#1 branch .. //depot/projects/dtrace/src/lib/libarchive/test/test_write_format_cpio_odc.c#1 branch .. //depot/projects/dtrace/src/release/doc/en_US.ISO8859-1/relnotes/article.sgml#16 integrate .. //depot/projects/dtrace/src/share/man/man4/ed.4#5 integrate .. //depot/projects/dtrace/src/share/man/man4/man4.i386/ep.4#5 integrate .. //depot/projects/dtrace/src/share/misc/committers-src.dot#5 integrate .. //depot/projects/dtrace/src/share/zoneinfo/backward#7 integrate .. //depot/projects/dtrace/src/share/zoneinfo/europe#7 integrate .. //depot/projects/dtrace/src/share/zoneinfo/southamerica#9 integrate .. //depot/projects/dtrace/src/share/zoneinfo/zone.tab#8 integrate .. //depot/projects/dtrace/src/sys/amd64/amd64/pmap.c#28 integrate .. //depot/projects/dtrace/src/sys/cam/cam_xpt.c#16 integrate .. //depot/projects/dtrace/src/sys/dev/ata/ata-all.h#9 integrate .. //depot/projects/dtrace/src/sys/dev/ata/ata-disk.c#9 integrate .. //depot/projects/dtrace/src/sys/dev/cxgb/cxgb_l2t.c#4 integrate .. //depot/projects/dtrace/src/sys/i386/i386/pmap.c#24 integrate .. //depot/projects/dtrace/src/sys/kern/kern_tc.c#10 integrate .. //depot/projects/dtrace/src/sys/kern/subr_smp.c#8 integrate .. //depot/projects/dtrace/src/sys/kern/uipc_usrreq.c#19 integrate .. //depot/projects/dtrace/src/sys/kern/vfs_mount.c#22 integrate .. //depot/projects/dtrace/src/sys/netinet/if_ether.c#15 integrate .. //depot/projects/dtrace/src/sys/netinet/if_ether.h#5 integrate .. //depot/projects/dtrace/src/sys/ufs/ffs/ffs_vnops.c#11 integrate .. //depot/projects/dtrace/src/sys/vm/pmap.h#9 integrate .. //depot/projects/dtrace/src/sys/vm/vm_page.c#30 integrate .. //depot/projects/dtrace/src/usr.bin/calendar/calendars/calendar.freebsd#16 integrate .. //depot/projects/dtrace/src/usr.bin/colldef/parse.y#5 integrate .. //depot/projects/dtrace/src/usr.bin/colldef/scan.l#5 integrate .. //depot/projects/dtrace/src/usr.bin/tar/COPYING#5 integrate .. //depot/projects/dtrace/src/usr.bin/tar/Makefile#5 integrate .. //depot/projects/dtrace/src/usr.bin/tar/bsdtar.1#7 integrate .. //depot/projects/dtrace/src/usr.bin/tar/bsdtar.c#6 integrate .. //depot/projects/dtrace/src/usr.bin/tar/bsdtar.h#6 integrate .. //depot/projects/dtrace/src/usr.bin/tar/bsdtar_platform.h#6 integrate .. //depot/projects/dtrace/src/usr.bin/tar/config_freebsd.h#2 integrate .. //depot/projects/dtrace/src/usr.bin/tar/read.c#7 integrate .. //depot/projects/dtrace/src/usr.bin/tar/test/config.sh#2 delete .. //depot/projects/dtrace/src/usr.bin/tar/test/test-acl.sh#2 delete .. //depot/projects/dtrace/src/usr.bin/tar/test/test-basic.sh#2 delete .. //depot/projects/dtrace/src/usr.bin/tar/test/test-deep-dir.sh#2 delete .. //depot/projects/dtrace/src/usr.bin/tar/test/test-flags.sh#2 delete .. //depot/projects/dtrace/src/usr.bin/tar/test/test-nodump.sh#2 delete .. //depot/projects/dtrace/src/usr.bin/tar/test/test-overwrite.sh#2 delete .. //depot/projects/dtrace/src/usr.bin/tar/test/test-utf8.sh#2 delete .. //depot/projects/dtrace/src/usr.bin/tar/util.c#6 integrate .. //depot/projects/dtrace/src/usr.sbin/mtree/Makefile#4 integrate .. //depot/projects/dtrace/src/usr.sbin/mtree/mtree.5#1 branch .. //depot/projects/dtrace/src/usr.sbin/sysinstall/dist.c#11 integrate .. //depot/projects/dtrace/src/usr.sbin/sysinstall/dist.h#8 integrate .. //depot/projects/dtrace/src/usr.sbin/sysinstall/menus.c#10 integrate .. //depot/projects/dtrace/src/usr.sbin/sysinstall/sysinstall.h#8 integrate .. //depot/projects/dtrace/www/en/cgi/cgi-style.pl#6 integrate .. //depot/projects/dtrace/www/en/projects/ideas/ideas.xml#6 integrate .. //depot/projects/dtrace/www/share/sgml/header.ent#8 integrate Differences ... ==== //depot/projects/dtrace/doc/share/pgpkeys/delphij.key#3 (text+ko) ==== @@ -1,6 +1,6 @@ - + uid Xin LI -pub 1024D/42EA8A4B 2006-01-27 [expires: 2008-01-01] +pub 1024D/42EA8A4B 2006-01-27 [expired: 2008-01-01] Key fingerprint = F19C 2616 FA97 9C13 2581 C6F3 85C5 1CCE 42EA 8A4B uid Xin LI uid Xin LI uid Xin LI -sub 4096g/11A94A02 2006-01-27 [expires: 2008-01-01] + +pub 1024D/18EDEBA0 2008-01-02 [expires: 2010-01-02] + Key fingerprint = 79A6 CF42 F917 DDCA F1C2 C926 8BEB DB04 18ED EBA0 +uid Xin LI +uid Xin LI +uid Xin LI +sub 4096g/8ED8F128 2008-01-02 [expires: 2010-01-02] ]]> ==== //depot/projects/dtrace/doc/share/pgpkeys/pgpkeys-developers.sgml#28 (text+ko) ==== @@ -1,7 +1,7 @@ @@ -429,6 +429,11 @@ &pgpkey.jkh; + + &a.weongyo; + &pgpkey.weongyo; + + &a.ahze; &pgpkey.ahze; ==== //depot/projects/dtrace/doc/share/pgpkeys/pgpkeys.ent#27 (text+ko) ==== @@ -1,5 +1,5 @@ - + @@ -265,6 +265,7 @@ + ==== //depot/projects/dtrace/doc/share/sgml/man-refs.ent#22 (text+ko) ==== @@ -20,7 +20,7 @@ lexicographical order by the entity (i.e., the dots used in place of special characters should not be expanded when comparing). - $FreeBSD: doc/share/sgml/man-refs.ent,v 1.445 2007/12/16 02:44:04 bmah Exp $ + $FreeBSD: doc/share/sgml/man-refs.ent,v 1.446 2008/01/01 23:55:27 bmah Exp $ --> @@ -3697,6 +3697,7 @@ + @@ -4117,6 +4118,7 @@ + ==== //depot/projects/dtrace/doc/zh_CN.GB2312/books/porters-handbook/book.sgml#21 (text+ko) ==== @@ -2,8 +2,8 @@ The FreeBSD Documentation Project The FreeBSD Simplified Chinese Project - Original Revision: 1.891 - $FreeBSD: doc/zh_CN.GB2312/books/porters-handbook/book.sgml,v 1.30 2007/12/17 15:53:15 loader Exp $ + Original Revision: 1.893 + $FreeBSD: doc/zh_CN.GB2312/books/porters-handbook/book.sgml,v 1.31 2008/01/02 07:17:57 loader Exp $ --> 603100 - 7.0-CURRENT. + 7.0-CURRENT¡£ 700000 @@ -10909,6 +10909,11 @@ PCIOCREAD ºÍ PCIOCWRITE IOCTL ABI ÏòϼæÈÝÖ®ºóµÄ 7.0-CURRENT£¬ ÕâÒ»±ä¶¯µ¼Ö PCIOCGETCONF IOCTL µÄ ABI Ôٴη¢Éú±ä»¯¡£ 700055 + + + 7.0-RELEASE Ö®ºóµÄ 7.0-STABLE + 700100 + 8.0-CURRENT¡£ ·Ö²ðÁË¿í×Ö·ûºÍµ¥×Ö½Ú×Ö·û ctype¡£ @@ -10938,7 +10943,10 @@ 8.0-CURRENT 800006 - + + kdb_enter() Ôö¼Ó "why" ²ÎÊýÖ®ºóµÄ 8.0-CURRENT¡£ + 800007 + ==== //depot/projects/dtrace/ports/LEGAL#31 (text+ko) ==== @@ -1,5 +1,5 @@ # Creator: Jordan Hubbard -# $FreeBSD: ports/LEGAL,v 1.562 2007/12/24 17:01:12 alepulver Exp $ +# $FreeBSD: ports/LEGAL,v 1.563 2008/01/01 15:35:04 lme Exp $ ********************************************************************** *** NOTE TO COMMITTERS *** @@ -624,6 +624,7 @@ VTK-* math/vtk Portions contain patented algorithms and may require a license for commercial use +vrml2pov-src* graphics/vrml2pov Redistribution is not allowed waeijiro-fpw-* japanese/waeijiro-fpw The original dictionary is not free warsow/* games/linux-warsow Redistribution is limited, art is copyrighted ==== //depot/projects/dtrace/ports/MOVED#59 (text+ko) ==== @@ -1,7 +1,7 @@ # # MOVED - a list of (recently) moved or removed ports # -# $FreeBSD: ports/MOVED,v 1.1525 2007/12/25 20:05:46 lioux Exp $ +# $FreeBSD: ports/MOVED,v 1.1526 2008/01/01 22:41:52 marcus Exp $ # # Each entry consists of a single line containing the following four # fields in the order named, separated with the pipe (`|') character: @@ -3351,3 +3351,6 @@ net-p2p/mldonkey-core-devel||2007-12-25|Development version no longer necessary net-p2p/mldonkey-gui-devel||2007-12-25|Development version no longer necessary net-p2p/mldonkey-devel||2007-12-25|Development version no longer necessary +audio/polypaudio|audio/pulseaudio|2008-01-01|Project renamed +audio/paman|audio/pavucontrol|2008-01-01|New tool to work with pulseaudio +audio/akode-plugins-polypaudio||2008-01-01|Polypaudio is obsolete in favor of pulseaudio ==== //depot/projects/dtrace/ports/Tools/portbuild/scripts/dopackages.wrapper#4 (text+ko) ==== @@ -1,14 +1,5 @@ #!/bin/sh -cleanup() { - lock=$1 - error=$2 - - rm -f ${lock} - - exit ${error} -} - # configurable variables pb=/var/portbuild arch=$1 @@ -27,11 +18,10 @@ exit 1 fi -touch ${lock} rm -f ${status} mkdir -p ${pb}/${arch}/archive/buildlogs -trap "cleanup ${lock} 1" 1 2 3 9 10 11 15 +trap "exit 1" 1 2 3 9 10 11 15 dorun() { branch=$1 @@ -39,11 +29,11 @@ ln -sf ${pb}/${arch}/archive/buildlogs/log.${branch}.${date} ${pb}/${arch}/${branch}/build.log ln -sf log.${branch}.${date} ${pb}/${arch}/archive/buildlogs/log.${branch}.${shortdate} - ${pb}/scripts/dopackages ${arch} $@ ${branch} ${date} 2>&1 \ + lockf -t 0 ${lock} ${pb}/scripts/dopackages ${arch} $@ ${branch} ${date} 2>&1 \ > ${pb}/${arch}/archive/buildlogs/log.${branch}.${date} if [ -f ${status} ]; then error=$(cat ${status}) - cleanup ${lock} ${error} + exit ${error} fi } @@ -51,4 +41,4 @@ dorun ${branch} $@ & wait -cleanup ${lock} 0 +exit 0 ==== //depot/projects/dtrace/src/COPYRIGHT#5 (text+ko) ==== @@ -1,10 +1,10 @@ -# $FreeBSD: src/COPYRIGHT,v 1.8 2006/12/31 16:34:16 delphij Exp $ +# $FreeBSD: src/COPYRIGHT,v 1.9 2007/12/31 22:09:19 delphij Exp $ # @(#)COPYRIGHT 8.2 (Berkeley) 3/21/94 The compilation of software known as FreeBSD is distributed under the following terms: -Copyright (C) 1992-2007 The FreeBSD Project. All rights reserved. +Copyright (C) 1992-2008 The FreeBSD Project. All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions ==== //depot/projects/dtrace/src/lib/libarchive/Makefile#10 (text+ko) ==== @@ -1,4 +1,4 @@ -# $FreeBSD: src/lib/libarchive/Makefile,v 1.78 2007/12/30 04:58:21 kientzle Exp $ +# $FreeBSD: src/lib/libarchive/Makefile,v 1.79 2008/01/01 06:17:05 kientzle Exp $ LIB= archive DPADD= ${LIBBZ2} ${LIBZ} @@ -103,7 +103,6 @@ cpio.5 \ libarchive.3 \ libarchive-formats.5 \ - mtree.5 \ tar.5 # Symlink the man pages under each function name. ==== //depot/projects/dtrace/src/lib/libarchive/test/Makefile#2 (text+ko) ==== @@ -1,11 +1,32 @@ -# $FreeBSD: src/lib/libarchive/test/Makefile,v 1.11 2007/07/13 15:14:35 kientzle Exp $ +# $FreeBSD: src/lib/libarchive/test/Makefile,v 1.12 2008/01/01 22:28:04 kientzle Exp $ + +# Where to find the libarchive sources +LA_SRCDIR=${.CURDIR}/.. +.PATH: ${LA_SRCDIR} + +# Get a list of all libarchive source files +LA_SRCS!=make -f ${LA_SRCDIR}/Makefile -V SRCS + +TESTFILES= \ + test_compat_gtar_1.tgz \ + test_compat_zip_1.zip \ + test_read_format_gtar_sparse_1_13.tgz \ + test_read_format_gtar_sparse_1_17.tgz \ + test_read_format_gtar_sparse_1_17_posix00.tgz \ + test_read_format_gtar_sparse_1_17_posix01.tgz \ + test_read_format_gtar_sparse_1_17_posix10.tgz \ + test_read_format_gtar_sparse_1_17_posix10_modified.tar TESTS= \ test_acl_basic.c \ test_acl_pax.c \ test_archive_api_feature.c \ test_bad_fd.c \ + test_compat_gtar.c \ + test_compat_zip.c \ + test_empty_write.c \ test_entry.c \ + test_entry_strmode.c \ test_read_compress_program.c \ test_read_data_large.c \ test_read_extract.c \ @@ -22,6 +43,7 @@ test_read_format_gtar_sparse.c \ test_read_format_iso_gz.c \ test_read_format_isorr_bz2.c \ + test_read_format_mtree.c \ test_read_format_pax_bz2.c \ test_read_format_tar.c \ test_read_format_tbz.c \ @@ -33,50 +55,74 @@ test_read_position.c \ test_read_truncated.c \ test_tar_filenames.c \ + test_tar_large.c \ test_write_compress_program.c \ test_write_disk.c \ test_write_disk_perms.c \ test_write_disk_secure.c \ test_write_format_ar.c \ test_write_format_cpio.c \ + test_write_format_cpio_odc.c \ + test_write_format_cpio_newc.c \ test_write_format_cpio_empty.c \ test_write_format_shar_empty.c \ test_write_format_tar.c \ test_write_format_tar_empty.c \ test_write_open_memory.c -SRCS= ${TESTS} \ + +# Build the test program using all libarchive sources + the test sources. +SRCS= ${LA_SRCS} \ + ${TESTS} \ list.h \ main.c \ read_open_memory.c -CLEANFILES+= list.h +CLEANFILES+= list.h archive.h NO_MAN=yes PROG=libarchive_test -DPADD=${LIBARCHIVE} ${LIBBZ2} ${LIBZ} -LDADD= -larchive -lz -lbz2 +INTERNALPROG=yes # Don't install this; it's just for testing +DPADD=${LIBBZ2} ${LIBZ} +CFLAGS+= -DPLATFORM_CONFIG_H=\"config_freebsd.h\" +LDADD= -lz -lbz2 CFLAGS+= -static -g CFLAGS+= -I${.OBJDIR} +CFLAGS+= -I${.CURDIR} +CFLAGS+= -I${LA_SRCDIR} +# Without this, libarchive source files find archive.h in LA_SRCDIR, +# which may not be the same as archive.h in the test dir. +CFLAGS+= -I- # Uncomment to link against dmalloc -#LDADD+= -L/usr/local/lib -ldmalloc -#CFLAGS+= -I/usr/local/include -DUSE_DMALLOC -#WARNS=6 +LDADD+= -L/usr/local/lib -ldmalloc +CFLAGS+= -I/usr/local/include -DUSE_DMALLOC +WARNS=6 + +# Build libarchive_test and run it. +check test: libarchive_test ${TESTFILES} + ./libarchive_test + +.for f in ${TESTFILES} +${f}: ${f}.uu + uudecode -p ${.CURDIR}/${f}.uu >${f} +.endfor + +INCS=archive.h list.h -test: libarchive_test - ./libarchive_test -k +# Build archive.h, but in our .OBJDIR, not libarchive's +# This keeps libarchive_test and libarchive builds completely separate. +archive.h: ${LA_SRCDIR}/archive.h.in ${LA_SRCDIR}/Makefile + cd ${LA_SRCDIR} && unset MAKEOBJDIRPREFIX && MAKEOBJDIR=${.OBJDIR} make archive.h +# list.h is just a list of all tests, as indicated by DEFINE_TEST macro lines list.h: ${TESTS} Makefile (cd ${.CURDIR}; cat ${TESTS}) | grep DEFINE_TEST > list.h -clean: - rm -f *.out - rm -f *.o - rm -f *.core - rm -f *~ - rm -f list.h +CLEANFILES += *.out *.o *.core *~ list.h archive.h ${TESTFILES} + +cleantest: -chmod -R +w /tmp/libarchive_test.* rm -rf /tmp/libarchive_test.* ==== //depot/projects/dtrace/src/lib/libarchive/test/README#2 (text+ko) ==== @@ -1,4 +1,4 @@ -$FreeBSD: src/lib/libarchive/test/README,v 1.2 2007/05/29 01:00:20 kientzle Exp $ +$FreeBSD: src/lib/libarchive/test/README,v 1.3 2008/01/01 22:28:04 kientzle Exp $ This is the test harness for libarchive. @@ -32,7 +32,11 @@ * The test function should use assert(), assertA() and similar macros defined in test.h. If you need to add new macros of this form, feel - free to do so. + free to do so. The current macro set includes assertEqualInt() and + assertEqualString() that print out additional detail about their + arguments if the assertion does fail. 'A' versions also accept + a struct archive * and display any error message from there on + failure. * You are encouraged to document each assertion with a failure() call just before the assert. The failure() function is a printf-like @@ -43,7 +47,10 @@ assert(strcmp(buff1, buff2) == 0); * Tests are encouraged to be economical with their memory and disk usage, - though this is not essential. + though this is not essential. The test is occasionally run under + a memory debugger to try to locate memory leaks in the library; + as a result, tests should be careful to release any memory they + allocate. * Disable tests on specific platforms as necessary. Please don't use config.h to adjust feature requirements, as I want the tests @@ -53,3 +60,4 @@ #if !defined(__PLATFORM) && !defined(__Platform2__) assert(xxxx) #endif + ==== //depot/projects/dtrace/src/lib/libarchive/test/main.c#2 (text+ko) ==== @@ -24,6 +24,17 @@ */ /* + * This same file is used pretty much verbatim for all test harnesses. + * + * The next line is used to define various environment variables, etc. + * + * The tar and cpio test harnesses are identical except for this line; + * the libarchive test harness omits some code that is needed only for + * testing standalone executables. + */ +#define PROGRAM "LIBARCHIVE" + +/* * Various utility routines useful for test programs. * Each test program is linked against this file. */ @@ -32,7 +43,19 @@ #include #include "test.h" -__FBSDID("$FreeBSD: src/lib/libarchive/test/main.c,v 1.8 2007/07/31 05:03:27 kientzle Exp $"); +__FBSDID("$FreeBSD: src/lib/libarchive/test/main.c,v 1.9 2008/01/01 22:28:04 kientzle Exp $"); + +/* + * "list.h" is simply created by "grep DEFINE_TEST"; it has + * a line like + * DEFINE_TEST(test_function) + * for each test. + * Include it here with a suitable DEFINE_TEST to declare all of the + * test functions. + */ +#undef DEFINE_TEST +#define DEFINE_TEST(name) void name(void); +#include "list.h" /* Interix doesn't define these in a standard header. */ #if __INTERIX__ @@ -48,6 +71,8 @@ static int failures = 0; /* Cumulative count of skipped component tests. */ static int skips = 0; +/* Cumulative count of assertions. */ +static int assertions = 0; /* * My own implementation of the standard assert() macro emits the @@ -57,12 +82,10 @@ * Emacs. ;-) * * It also supports a few special features specifically to simplify - * libarchive test harnesses: + * test harnesses: * failure(fmt, args) -- Stores a text string that gets * printed if the following assertion fails, good for * explaining subtle tests. - * assertA(a, cond) -- If the test fails, also prints out any error - * message stored in archive object 'a'. */ static char msg[4096]; @@ -76,12 +99,13 @@ int count; } failed_lines[1000]; - -/* Count this failure; return the number of previous failures. */ +/* + * Count this failure; return the number of previous failures. + */ static int previous_failures(const char *filename, int line) { - int i; + unsigned int i; int count; if (failed_filename == NULL || strcmp(failed_filename, filename) != 0) @@ -100,24 +124,30 @@ return (0); } } + return (0); } -/* Inform user that we're skipping a test. */ -static const char *skipped_filename; -static int skipped_line; -void skipping_setup(const char *filename, int line) +/* + * Copy arguments into file-local variables. + */ +static const char *test_filename; +static int test_line; +static void *test_extra; +void test_setup(const char *filename, int line) { - skipped_filename = filename; - skipped_line = line; + test_filename = filename; + test_line = line; } + +/* + * Inform user that we're skipping a test. + */ void test_skipping(const char *fmt, ...) { - int i; - int line = skipped_line; va_list ap; - if (previous_failures(skipped_filename, skipped_line)) + if (previous_failures(test_filename, test_line)) return; va_start(ap, fmt); @@ -130,29 +160,30 @@ /* Common handling of failed tests. */ static void -test_failed(struct archive *a, int line) +report_failure(void *extra) { - int i; - - failures ++; - if (msg[0] != '\0') { fprintf(stderr, " Description: %s\n", msg); msg[0] = '\0'; } - if (a != NULL) { - fprintf(stderr, " archive error: %s\n", archive_error_string(a)); + if (extra != NULL) { + fprintf(stderr, " archive error: %s\n", archive_error_string((struct archive *)extra)); } if (dump_on_failure) { - fprintf(stderr, " *** forcing core dump so failure can be debugged ***\n"); + fprintf(stderr, + " *** forcing core dump so failure can be debugged ***\n"); *(char *)(NULL) = 0; exit(1); } } -/* Summarize repeated failures in the just-completed test file. */ -int +/* + * Summarize repeated failures in the just-completed test file. + * The reports above suppress multiple failures from the same source + * line; this reports on any tests that did fail multiple times. + */ +static int summarize_comparator(const void *a0, const void *b0) { const struct line *a = a0, *b = b0; @@ -165,10 +196,10 @@ return (a->line - b->line); } -void -summarize(const char *filename) +static void +summarize(void) { - int i; + unsigned int i; qsort(failed_lines, sizeof(failed_lines)/sizeof(failed_lines[0]), sizeof(failed_lines[0]), summarize_comparator); @@ -196,35 +227,39 @@ /* Generic assert() just displays the failed condition. */ void -test_assert(const char *file, int line, int value, const char *condition, struct archive *a) +test_assert(const char *file, int line, int value, const char *condition, void *extra) { + ++assertions; if (value) { msg[0] = '\0'; return; } + failures ++; if (previous_failures(file, line)) return; fprintf(stderr, "%s:%d: Assertion failed\n", file, line); fprintf(stderr, " Condition: %s\n", condition); - test_failed(a, line); + report_failure(extra); } /* assertEqualInt() displays the values of the two integers. */ void test_assert_equal_int(const char *file, int line, - int v1, const char *e1, int v2, const char *e2, struct archive *a) + int v1, const char *e1, int v2, const char *e2, void *extra) { + ++assertions; if (v1 == v2) { msg[0] = '\0'; return; } + failures ++; if (previous_failures(file, line)) return; fprintf(stderr, "%s:%d: Assertion failed: Ints not equal\n", file, line); fprintf(stderr, " %s=%d\n", e1, v1); fprintf(stderr, " %s=%d\n", e2, v2); - test_failed(a, line); + report_failure(extra); } /* assertEqualString() displays the values of the two strings. */ @@ -232,8 +267,9 @@ test_assert_equal_string(const char *file, int line, const char *v1, const char *e1, const char *v2, const char *e2, - struct archive *a) + void *extra) { + ++assertions; if (v1 == NULL || v2 == NULL) { if (v1 == v2) { msg[0] = '\0'; @@ -243,13 +279,14 @@ msg[0] = '\0'; return; } + failures ++; if (previous_failures(file, line)) return; fprintf(stderr, "%s:%d: Assertion failed: Strings not equal\n", file, line); fprintf(stderr, " %s = \"%s\"\n", e1, v1); fprintf(stderr, " %s = \"%s\"\n", e2, v2); - test_failed(a, line); + report_failure(extra); } /* assertEqualWString() displays the values of the two strings. */ @@ -257,26 +294,222 @@ test_assert_equal_wstring(const char *file, int line, const wchar_t *v1, const char *e1, const wchar_t *v2, const char *e2, - struct archive *a) + void *extra) { + ++assertions; if (wcscmp(v1, v2) == 0) { msg[0] = '\0'; return; } + failures ++; if (previous_failures(file, line)) return; fprintf(stderr, "%s:%d: Assertion failed: Unicode strings not equal\n", file, line); fwprintf(stderr, L" %s = \"%ls\"\n", e1, v1); fwprintf(stderr, L" %s = \"%ls\"\n", e2, v2); - test_failed(a, line); + report_failure(extra); +} + +/* + * Pretty standard hexdump routine. As a bonus, if ref != NULL, then + * any bytes in p that differ from ref will be highlighted with '_' + * before and after the hex value. + */ +static void +hexdump(const char *p, const char *ref, size_t l, size_t offset) +{ + size_t i, j; + char sep; + + for(i=0; i < l; i+=16) { + fprintf(stderr, "%04x", i + offset); + sep = ' '; + for (j = 0; j < 16 && i + j < l; j++) { + if (ref != NULL && p[i + j] != ref[i + j]) + sep = '_'; + fprintf(stderr, "%c%02x", sep, p[i+j]); + if (ref != NULL && p[i + j] == ref[i + j]) + sep = ' '; + } + for (; j < 16; j++) { + fprintf(stderr, "%c ", sep); + sep = ' '; + } + fprintf(stderr, "%c", sep); + for (j=0; j < 16 && i + j < l; j++) { + int c = p[i + j]; + if (c >= ' ' && c <= 126) + fprintf(stderr, "%c", c); + else + fprintf(stderr, "."); + } + fprintf(stderr, "\n"); + } +} + +/* assertEqualMem() displays the values of the two memory blocks. */ +/* TODO: For long blocks, hexdump the first bytes that actually differ. */ +void +test_assert_equal_mem(const char *file, int line, + const char *v1, const char *e1, + const char *v2, const char *e2, + size_t l, const char *ld, void *extra) +{ + ++assertions; + if (v1 == NULL || v2 == NULL) { + if (v1 == v2) { + msg[0] = '\0'; + return; + } + } else if (memcmp(v1, v2, l) == 0) { + msg[0] = '\0'; + return; + } + failures ++; + if (previous_failures(file, line)) + return; + fprintf(stderr, "%s:%d: Assertion failed: memory not equal\n", + file, line); + fprintf(stderr, " size %s = %d\n", ld, (int)l); + fprintf(stderr, " Dump of %s\n", e1); + hexdump(v1, v2, l < 32 ? l : 32, 0); + fprintf(stderr, " Dump of %s\n", e2); + hexdump(v2, v1, l < 32 ? l : 32, 0); + fprintf(stderr, "\n"); + report_failure(extra); +} + +void +test_assert_empty_file(const char *f1fmt, ...) +{ + char f1[1024]; + struct stat st; + va_list ap; + + va_start(ap, f1fmt); + vsprintf(f1, f1fmt, ap); + va_end(ap); + + if (stat(f1, &st) != 0) { + fprintf(stderr, "%s:%d: Could not stat: %s\n", test_filename, test_line, f1); + report_failure(NULL); + } else if (st.st_size > 0) { + fprintf(stderr, "%s:%d: File not empty: %s\n", test_filename, test_line, f1); + fprintf(stderr, " File size: %d\n", (int)st.st_size); + report_failure(NULL); + } +} + +/* assertEqualFile() asserts that two files have the same contents. */ +/* TODO: hexdump the first bytes that actually differ. */ +void +test_assert_equal_file(const char *f1, const char *f2pattern, ...) +{ + char f2[1024]; + va_list ap; + char buff1[1024]; + char buff2[1024]; + int fd1, fd2; + int n1, n2; + + va_start(ap, f2pattern); + vsprintf(f2, f2pattern, ap); + va_end(ap); + + fd1 = open(f1, O_RDONLY); + fd2 = open(f2, O_RDONLY); + for (;;) { + n1 = read(fd1, buff1, sizeof(buff1)); + n2 = read(fd2, buff2, sizeof(buff2)); + if (n1 != n2) + break; + if (n1 == 0 && n2 == 0) + return; + if (memcmp(buff1, buff2, n1) != 0) + break; + } + fprintf(stderr, "%s:%d: Files are not identical\n", test_filename, test_line); + fprintf(stderr, " file1=\"%s\"\n", f1); + fprintf(stderr, " file2=\"%s\"\n", f2); + report_failure(test_extra); +} + + +/* + * Call standard system() call, but build up the command line using + * sprintf() conventions. + */ +int +systemf(const char *fmt, ...) >>> TRUNCATED FOR MAIL (1000 lines) <<< From owner-p4-projects@FreeBSD.ORG Wed Jan 2 23:16:05 2008 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 64E5C16A420; Wed, 2 Jan 2008 23:16:05 +0000 (UTC) Delivered-To: perforce@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 2898116A41A for ; Wed, 2 Jan 2008 23:16:05 +0000 (UTC) (envelope-from imp@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id 17C8A13C46B for ; Wed, 2 Jan 2008 23:16:05 +0000 (UTC) (envelope-from imp@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.1/8.14.1) with ESMTP id m02NG4gf028180 for ; Wed, 2 Jan 2008 23:16:04 GMT (envelope-from imp@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.1/8.14.1/Submit) id m02NG4p8028177 for perforce@freebsd.org; Wed, 2 Jan 2008 23:16:04 GMT (envelope-from imp@freebsd.org) Date: Wed, 2 Jan 2008 23:16:04 GMT Message-Id: <200801022316.m02NG4p8028177@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to imp@freebsd.org using -f From: Warner Losh To: Perforce Change Reviews Cc: Subject: PERFORCE change 132347 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 02 Jan 2008 23:16:05 -0000 http://perforce.freebsd.org/chv.cgi?CH=132347 Change 132347 by imp@imp_paco-paco on 2008/01/02 23:15:51 use proper, non-conflicting guard variables. Affected files ... .. //depot/projects/mips2-jnpr/src/sys/mips/include/intr_machdep.h#2 edit Differences ... ==== //depot/projects/mips2-jnpr/src/sys/mips/include/intr_machdep.h#2 (text+ko) ==== @@ -23,11 +23,11 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $P4: //depot/projects/mips2-jnpr/src/sys/mips/include/intr_machdep.h#1 $ + * $P4: //depot/projects/mips2-jnpr/src/sys/mips/include/intr_machdep.h#2 $ */ -#ifndef _MACHINE_INTR_H_ -#define _MACHINE_INTR_H_ +#ifndef _MACHINE_INTR_MACHDEP_H_ +#define _MACHINE_INTR_MACHDEP_H_ #define NHARD_IRQS 6 #define NSOFT_IRQS 2 @@ -40,4 +40,4 @@ void *, int, int, void **); void cpu_intr(struct trapframe *); -#endif /* !_MACHINE_INTR_H_ */ +#endif /* !_MACHINE_INTR_MACHDEP_H_ */ From owner-p4-projects@FreeBSD.ORG Wed Jan 2 23:17:06 2008 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id B0F6D16A419; Wed, 2 Jan 2008 23:17:06 +0000 (UTC) Delivered-To: perforce@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 76D8816A41A for ; Wed, 2 Jan 2008 23:17:06 +0000 (UTC) (envelope-from imp@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id 4E66A13C448 for ; Wed, 2 Jan 2008 23:17:06 +0000 (UTC) (envelope-from imp@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.1/8.14.1) with ESMTP id m02NH65T028207 for ; Wed, 2 Jan 2008 23:17:06 GMT (envelope-from imp@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.1/8.14.1/Submit) id m02NH6om028204 for perforce@freebsd.org; Wed, 2 Jan 2008 23:17:06 GMT (envelope-from imp@freebsd.org) Date: Wed, 2 Jan 2008 23:17:06 GMT Message-Id: <200801022317.m02NH6om028204@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to imp@freebsd.org using -f From: Warner Losh To: Perforce Change Reviews Cc: Subject: PERFORCE change 132348 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 02 Jan 2008 23:17:06 -0000 http://perforce.freebsd.org/chv.cgi?CH=132348 Change 132348 by imp@imp_paco-paco on 2008/01/02 23:16:08 These are now declared in headers Affected files ... .. //depot/projects/mips2-jnpr/src/sys/mips/mips/db_trace.c#4 edit Differences ... ==== //depot/projects/mips2-jnpr/src/sys/mips/mips/db_trace.c#4 (text+ko) ==== @@ -21,11 +21,6 @@ #include -int db_md_set_watchpoint __P((db_expr_t addr, db_expr_t size)); -int db_md_clr_watchpoint __P((db_expr_t addr, db_expr_t size)); -void db_md_list_watchpoints __P((void)); - - int db_md_set_watchpoint(db_expr_t addr, db_expr_t size) { From owner-p4-projects@FreeBSD.ORG Thu Jan 3 02:46:16 2008 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id CE17016A41B; Thu, 3 Jan 2008 02:46:15 +0000 (UTC) Delivered-To: perforce@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 7A03D16A417 for ; Thu, 3 Jan 2008 02:46:15 +0000 (UTC) (envelope-from imp@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id 5DE6F13C455 for ; Thu, 3 Jan 2008 02:46:15 +0000 (UTC) (envelope-from imp@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.1/8.14.1) with ESMTP id m032kF4O018809 for ; Thu, 3 Jan 2008 02:46:15 GMT (envelope-from imp@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.1/8.14.1/Submit) id m032kFJd018804 for perforce@freebsd.org; Thu, 3 Jan 2008 02:46:15 GMT (envelope-from imp@freebsd.org) Date: Thu, 3 Jan 2008 02:46:15 GMT Message-Id: <200801030246.m032kFJd018804@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to imp@freebsd.org using -f From: Warner Losh To: Perforce Change Reviews Cc: Subject: PERFORCE change 132362 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 03 Jan 2008 02:46:16 -0000 http://perforce.freebsd.org/chv.cgi?CH=132362 Change 132362 by imp@imp_paco-paco on 2008/01/03 02:45:21 Lots of little cleanups to make machdep.c compile. Affected files ... .. //depot/projects/mips2-jnpr/src/sys/mips/include/asm.h#6 edit .. //depot/projects/mips2-jnpr/src/sys/mips/mips/machdep.c#4 edit Differences ... ==== //depot/projects/mips2-jnpr/src/sys/mips/include/asm.h#6 (text+ko) ==== @@ -374,93 +374,93 @@ #endif /* _MIPS_BSD_API */ #define mfc0_macro(data, spr) \ - asm volatile ("mfc0 %0, $%1" \ + __asm __volatile ("mfc0 %0, $%1" \ : "=r" (data) /* outputs */ \ : "i" (spr)); /* inputs */ #define mtc0_macro(data, spr) \ - asm volatile ("mtc0 %0, $%1" \ + __asm __volatile ("mtc0 %0, $%1" \ : /* outputs */ \ : "r" (data), "i" (spr)); /* inputs */ #define cfc0_macro(data, spr) \ - asm volatile ("cfc0 %0, $%1" \ + __asm __volatile ("cfc0 %0, $%1" \ : "=r" (data) /* outputs */ \ : "i" (spr)); /* inputs */ #define ctc0_macro(data, spr) \ - asm volatile ("ctc0 %0, $%1" \ + __asm __volatile ("ctc0 %0, $%1" \ : /* outputs */ \ : "r" (data), "i" (spr)); /* inputs */ #define lbu_macro(data, addr) \ - asm volatile ("lbu %0, 0x0(%1)" \ + __asm __volatile ("lbu %0, 0x0(%1)" \ : "=r" (data) /* outputs */ \ : "r" (addr)); /* inputs */ #define lb_macro(data, addr) \ - asm volatile ("lb %0, 0x0(%1)" \ + __asm __volatile ("lb %0, 0x0(%1)" \ : "=r" (data) /* outputs */ \ : "r" (addr)); /* inputs */ #define lwl_macro(data, addr) \ - asm volatile ("lwl %0, 0x0(%1)" \ + __asm __volatile ("lwl %0, 0x0(%1)" \ : "=r" (data) /* outputs */ \ : "r" (addr)); /* inputs */ #define lwr_macro(data, addr) \ - asm volatile ("lwr %0, 0x0(%1)" \ + __asm __volatile ("lwr %0, 0x0(%1)" \ : "=r" (data) /* outputs */ \ : "r" (addr)); /* inputs */ #define ldl_macro(data, addr) \ - asm volatile ("ldl %0, 0x0(%1)" \ + __asm __volatile ("ldl %0, 0x0(%1)" \ : "=r" (data) /* outputs */ \ : "r" (addr)); /* inputs */ #define ldr_macro(data, addr) \ - asm volatile ("ldr %0, 0x0(%1)" \ + __asm __volatile ("ldr %0, 0x0(%1)" \ : "=r" (data) /* outputs */ \ : "r" (addr)); /* inputs */ #define sb_macro(data, addr) \ - asm volatile ("sb %0, 0x0(%1)" \ + __asm __volatile ("sb %0, 0x0(%1)" \ : /* outputs */ \ : "r" (data), "r" (addr)); /* inputs */ #define swl_macro(data, addr) \ - asm volatile ("swl %0, 0x0(%1)" \ + __asm __volatile ("swl %0, 0x0(%1)" \ : /* outputs */ \ : "r" (data), "r" (addr)); /* inputs */ #define swr_macro(data, addr) \ - asm volatile ("swr %0, 0x0(%1)" \ + __asm __volatile ("swr %0, 0x0(%1)" \ : /* outputs */ \ : "r" (data), "r" (addr)); /* inputs */ #define sdl_macro(data, addr) \ - asm volatile ("sdl %0, 0x0(%1)" \ + __asm __volatile ("sdl %0, 0x0(%1)" \ : /* outputs */ \ : "r" (data), "r" (addr)); /* inputs */ #define sdr_macro(data, addr) \ - asm volatile ("sdr %0, 0x0(%1)" \ + __asm __volatile ("sdr %0, 0x0(%1)" \ : /* outputs */ \ : "r" (data), "r" (addr)); /* inputs */ #define mfgr_macro(data, gr) \ - asm volatile ("move %0, $%1" \ + __asm __volatile ("move %0, $%1" \ : "=r" (data) /* outputs */ \ : "i" (gr)); /* inputs */ #define dmfc0_macro(data, spr) \ - asm volatile ("dmfc0 %0, $%1" \ + __asm __volatile ("dmfc0 %0, $%1" \ : "=r" (data) /* outputs */ \ : "i" (spr)); /* inputs */ #define dmtc0_macro(data, spr, sel) \ - asm volatile ("dmtc0 %0, $%1, %2" \ + __asm __volatile ("dmtc0 %0, $%1, %2" \ : /* no outputs */ \ : "r" (data), "i" (spr), "i" (sel)); /* inputs */ ==== //depot/projects/mips2-jnpr/src/sys/mips/mips/machdep.c#4 (text+ko) ==== @@ -174,7 +174,7 @@ */ printf("%s", version); - printf("real memory = %u (%uK bytes)\n", ptoa(Maxmem), + printf("real memory = %lu (%luK bytes)\n", ptoa(Maxmem), ptoa(Maxmem) / 1024); realmem = Maxmem; /* @@ -195,7 +195,7 @@ vm_ksubmap_init(&kmi); - printf("avail memory = %u (%uMB)\n", ptoa(cnt.v_free_count), + printf("avail memory = %lu (%luMB)\n", ptoa(cnt.v_free_count), ptoa(cnt.v_free_count) / 1048576); /* @@ -211,11 +211,12 @@ void cpu_reset(void) { - u_int64_t msg; for (;;) ; } +#if 0 +/*XXXimp: This seems like a vestage of something in the J! kernel */ /* Get current clock frequency for the given cpu id. */ int cpu_est_clockrate(int cpu_id, uint64_t *rate) @@ -223,6 +224,7 @@ return (cpu_clock); } +#endif /* * Shutdown the CPU as much as possible @@ -281,7 +283,7 @@ pcpu_init(pcpup, 0, sizeof(struct pcpu)); #endif - proc_linkup(&proc0, &ksegrp0, &thread0); + proc_linkup(&proc0, &thread0); PCPU_SET(curthread, &thread0); PCPU_SET(curpcb, thread0.td_pcb); } @@ -342,7 +344,7 @@ vm_offset_t AllowMem, memsize; const char *cp; size_t sz; - int i, phys_avail_cnt; + int phys_avail_cnt; /* Determine memory layout */ phys_avail_cnt = 0; @@ -431,7 +433,7 @@ sz = round_page(MSGBUF_SIZE); msgbufp = (struct msgbuf *) pmap_steal_memory(sz); msgbufinit(msgbufp, sz); - printf("%s: msgbufp[size=%d] = 0x%x\n", __FUNCTION__, sz, msgbufp); + printf("%s: msgbufp[size=%d] = 0x%p\n", __FUNCTION__, sz, msgbufp); } @@ -575,7 +577,7 @@ #ifdef DDB kdb_init(); if ((boothowto & RB_KDB) || (boothowto & RB_GDB)) - kdb_enter("Boot flags requested debugger"); + kdb_enter(KDB_WHY_BOOTFLAGS, "Boot flags requested debugger"); #endif pmap_bootstrap(); @@ -646,7 +648,7 @@ cpu_idle(void) { if (mips_cp0_status_read() & SR_INT_ENAB) - asm volatile ("wait"); + __asm __volatile ("wait"); else panic("ints disabled in idleproc!"); } From owner-p4-projects@FreeBSD.ORG Thu Jan 3 03:18:50 2008 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id CB2AE16A41B; Thu, 3 Jan 2008 03:18:49 +0000 (UTC) Delivered-To: perforce@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 6F87616A419 for ; Thu, 3 Jan 2008 03:18:49 +0000 (UTC) (envelope-from imp@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id 5EB3513C455 for ; Thu, 3 Jan 2008 03:18:49 +0000 (UTC) (envelope-from imp@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.1/8.14.1) with ESMTP id m033InIx031840 for ; Thu, 3 Jan 2008 03:18:49 GMT (envelope-from imp@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.1/8.14.1/Submit) id m033In6V031837 for perforce@freebsd.org; Thu, 3 Jan 2008 03:18:49 GMT (envelope-from imp@freebsd.org) Date: Thu, 3 Jan 2008 03:18:49 GMT Message-Id: <200801030318.m033In6V031837@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to imp@freebsd.org using -f From: Warner Losh To: Perforce Change Reviews Cc: Subject: PERFORCE change 132363 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 03 Jan 2008 03:18:50 -0000 http://perforce.freebsd.org/chv.cgi?CH=132363 Change 132363 by imp@imp_paco-paco on 2008/01/03 03:18:40 On the road to getting the mips pmap.c to compile: fix all the silly errors. Also, there's some #define missing, so bracket the affected code with ifdefs for this #define. Fix trivial printf format errors and allow KSEG2 and KSSEG to be used. Affected files ... .. //depot/projects/mips2-jnpr/src/sys/mips/include/cpuregs.h#3 edit .. //depot/projects/mips2-jnpr/src/sys/mips/include/pmap.h#4 edit .. //depot/projects/mips2-jnpr/src/sys/mips/mips/pmap.c#5 edit Differences ... ==== //depot/projects/mips2-jnpr/src/sys/mips/include/cpuregs.h#3 (text+ko) ==== @@ -83,6 +83,8 @@ #define MIPS_KSEG1_END 0xbfffffff #define MIPS_KSSEG_START 0xc0000000 #define MIPS_KSSEG_END 0xdfffffff +#define MIPS_KSEG2_START MIPS_KSSEG_START +#define MIPS_KSEG2_END MIPS_KSSEG_END #define MIPS_KSEG3_START 0xe0000000 #define MIPS_KSEG3_END 0xffffffff #define MIPS_MAX_MEM_ADDR 0xbe000000 ==== //depot/projects/mips2-jnpr/src/sys/mips/include/pmap.h#4 (text+ko) ==== @@ -199,7 +199,7 @@ struct fpage { vm_offset_t kva; - u_int hstate; + u_int state; }; struct sysmaps { ==== //depot/projects/mips2-jnpr/src/sys/mips/mips/pmap.c#5 (text+ko) ==== @@ -336,9 +336,11 @@ pmap_init(void) { +#ifdef VM_ALLOC_WIRED_TLB_PG_POOL if (need_wired_tlb_page_pool) { pmap_init_fpage(); } +#endif /* * Initialize the address space (zone) for the pv entries. Set a @@ -352,10 +354,6 @@ uma_zone_set_obj(pvzone, &pvzone_obj, pv_entry_max); } -void -pmap_init2() -{ -} /*************************************************** * Low level helper routines..... ***************************************************/ @@ -685,6 +683,7 @@ /* * Create the floating pages, aka FPAGES! */ +#ifdef VM_ALLOC_WIRED_TLB_PG_POOL static void pmap_init_fpage() { @@ -804,6 +803,7 @@ * Should there be any flush operation at the end? */ } +#endif /* Revision 1.507 * @@ -908,8 +908,10 @@ req = VM_ALLOC_NOOBJ | VM_ALLOC_NORMAL | VM_ALLOC_WIRED | VM_ALLOC_ZERO; +#ifdef VM_ALLOC_WIRED_TLB_PG_POOL if (need_wired_tlb_page_pool) req |= VM_ALLOC_WIRED_TLB_PG_POOL; +#endif /* * allocate the page directory page */ @@ -952,9 +954,10 @@ ("_pmap_allocpte: flags is neither M_NOWAIT nor M_WAITOK")); req = VM_ALLOC_WIRED| VM_ALLOC_ZERO| VM_ALLOC_NOOBJ; +#ifdef VM_ALLOC_WIRED_TLB_PG_POOL if (need_wired_tlb_page_pool) req |= VM_ALLOC_WIRED_TLB_PG_POOL; - +#endif /* * Find or fabricate a new pagetable page */ @@ -1146,10 +1149,10 @@ * This index is bogus, but out of the way */ req = VM_ALLOC_SYSTEM | VM_ALLOC_WIRED | VM_ALLOC_NOOBJ; - +#ifdef VM_ALLOC_WIRED_TLB_PG_POOL if (need_wired_tlb_page_pool) req |= VM_ALLOC_WIRED_TLB_PG_POOL; - +#endif nkpg = vm_page_alloc(NULL, nkpt, req); if (!nkpg) panic("pmap_growkernel: no memory to grow kernel"); @@ -1728,7 +1731,7 @@ if (origpte & PG_M) { KASSERT((origpte & PG_RW), ("pmap_enter: modified page not writable:" - " va: 0x%x, pte: 0x%x", va, origpte)); + " va: 0x%x, pte: 0x%lx", va, origpte)); if ((page_is_managed(opa)) && pmap_track_modified(va)) vm_page_dirty(om); @@ -1894,12 +1897,14 @@ if (i != 0) printf("%s: ERROR!!! More than one page of virtual address mapping not supported\n", - __funct__); + __func__); +#ifdef VM_ALLOC_WIRED_TLB_PG_POOL if (need_wired_tlb_page_pool) { va = pmap_map_fpage(pa, &fpages_shared[PMAP_FPAGE_KENTER_TEMP], TRUE); } else +#endif va = MIPS_PHYS_TO_CACHED(pa); return((void *)va); @@ -1979,6 +1984,7 @@ vm_offset_t va; vm_paddr_t phys = VM_PAGE_TO_PHYS(m); +#ifdef VM_ALLOC_WIRED_TLB_PG_POOL if (need_wired_tlb_page_pool) { struct fpage *fp1; struct sysmaps *sysmaps; @@ -1996,7 +2002,9 @@ /* * Should you do cache flush? */ - } else { + } else +#endif + { va = MIPS_PHYS_TO_CACHED(phys); bzero((caddr_t) va, PAGE_SIZE); } @@ -2015,6 +2023,7 @@ vm_offset_t va; vm_paddr_t phys = VM_PAGE_TO_PHYS(m); +#ifdef VM_ALLOC_WIRED_TLB_PG_POOL if (need_wired_tlb_page_pool) { struct fpage *fp1; struct sysmaps *sysmaps; @@ -2030,7 +2039,9 @@ sched_unpin(); mtx_unlock(&sysmaps->lock); - } else { + } else +#endif + { va = MIPS_PHYS_TO_CACHED(phys); bzero((char *)(caddr_t)va + off, size); } @@ -2042,13 +2053,16 @@ vm_offset_t va; vm_paddr_t phys = VM_PAGE_TO_PHYS(m); +#ifdef VM_ALLOC_WIRED_TLB_PG_POOL if (need_wired_tlb_page_pool) { sched_pin(); va = pmap_map_fpage(phys, &fpages_shared[PMAP_FPAGE3], FALSE); bzero((caddr_t) va, PAGE_SIZE); pmap_unmap_fpage(phys, &fpages_shared[PMAP_FPAGE3]); sched_unpin(); - } else { + } else +#endif + { va = MIPS_PHYS_TO_CACHED(phys); bzero((caddr_t) va, PAGE_SIZE); } @@ -2069,6 +2083,7 @@ vm_paddr_t phy_dst = VM_PAGE_TO_PHYS(dst); +#ifdef VM_ALLOC_WIRED_TLB_PG_POOL if (need_wired_tlb_page_pool) { struct fpage *fp1, *fp2; struct sysmaps *sysmaps; @@ -2093,7 +2108,9 @@ /* * Should you flush the cache? */ - } else { + } else +#endif + { va_src = MIPS_PHYS_TO_CACHED(phy_src); va_dst = MIPS_PHYS_TO_CACHED(phy_dst); bcopy((caddr_t) va_src, (caddr_t) va_dst, PAGE_SIZE); @@ -2177,7 +2194,7 @@ m = PHYS_TO_VM_PAGE(mips_tlbpfn_to_paddr(tpte)); KASSERT(m < &vm_page_array[vm_page_array_size], - ("pmap_remove_pages: bad tpte %x", tpte)); + ("pmap_remove_pages: bad tpte %lx", tpte)); pv->pv_pmap->pm_stats.resident_count--; @@ -2255,7 +2272,6 @@ { register pv_entry_t pv; register pt_entry_t *pte; - int s; if (m->flags & PG_FICTITIOUS) return; @@ -2818,9 +2834,11 @@ else if (va >= MIPS_UNCACHED_MEMORY_ADDR && va < MIPS_KSEG2_START) pa = MIPS_UNCACHED_TO_PHYS(va); +#ifdef VM_ALLOC_WIRED_TLB_PG_POOL else if (need_wired_tlb_page_pool && ((va >= VM_MIN_KERNEL_ADDRESS) && (va < (VM_MIN_KERNEL_ADDRESS + VM_KERNEL_ALLOC_OFFSET)))) pa = MIPS_CACHED_TO_PHYS(va); +#endif else if (va >= MIPS_KSEG2_START && va < VM_MAX_KERNEL_ADDRESS) { pt_entry_t *ptep; From owner-p4-projects@FreeBSD.ORG Thu Jan 3 03:45:17 2008 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 9B54316A420; Thu, 3 Jan 2008 03:45:17 +0000 (UTC) Delivered-To: perforce@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 6052316A417 for ; Thu, 3 Jan 2008 03:45:17 +0000 (UTC) (envelope-from imp@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id 4FCC313C457 for ; Thu, 3 Jan 2008 03:45:17 +0000 (UTC) (envelope-from imp@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.1/8.14.1) with ESMTP id m033jGYH042256 for ; Thu, 3 Jan 2008 03:45:16 GMT (envelope-from imp@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.1/8.14.1/Submit) id m033jGqG042251 for perforce@freebsd.org; Thu, 3 Jan 2008 03:45:16 GMT (envelope-from imp@freebsd.org) Date: Thu, 3 Jan 2008 03:45:16 GMT Message-Id: <200801030345.m033jGqG042251@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to imp@freebsd.org using -f From: Warner Losh To: Perforce Change Reviews Cc: Subject: PERFORCE change 132364 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 03 Jan 2008 03:45:18 -0000 http://perforce.freebsd.org/chv.cgi?CH=132364 Change 132364 by imp@imp_paco-paco on 2008/01/03 03:44:50 Get stack_machdep.c building. This was never in the jnpr port, so we needed to translate the differing trapframe format between that port and the mips2 port. Affected files ... .. //depot/projects/mips2-jnpr/src/sys/mips/mips/stack_machdep.c#2 edit Differences ... ==== //depot/projects/mips2-jnpr/src/sys/mips/mips/stack_machdep.c#2 (text+ko) ==== @@ -27,6 +27,7 @@ #include __FBSDID("$FreeBSD$"); +#include #include #include #include @@ -38,8 +39,6 @@ #include #include -extern char btext[]; - static u_register_t stack_register_fetch(u_register_t sp, u_register_t stack_pos) { @@ -135,8 +134,8 @@ if (TD_IS_RUNNING(td)) panic("stack_save_td: running"); - pc = td->td_pcb->pcb_regs[PCB_REG_PC]; - sp = td->td_pcb->pcb_regs[PCB_REG_SP]; + pc = td->td_pcb->pcb_regs.pc; + sp = td->td_pcb->pcb_regs.sp; stack_capture(st, pc, sp); } @@ -148,7 +147,7 @@ if (curthread == NULL) panic("stack_save: curthread == NULL)"); - pc = curthread->td_pcb->pcb_regs[PCB_REG_PC]; - sp = curthread->td_pcb->pcb_regs[PCB_REG_SP]; + pc = curthread->td_pcb->pcb_regs.pc; + sp = curthread->td_pcb->pcb_regs.sp; stack_capture(st, pc, sp); } From owner-p4-projects@FreeBSD.ORG Thu Jan 3 03:55:28 2008 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 1A27316A469; Thu, 3 Jan 2008 03:55:28 +0000 (UTC) Delivered-To: perforce@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id D37CA16A41A for ; Thu, 3 Jan 2008 03:55:27 +0000 (UTC) (envelope-from imp@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id AAA5113C44B for ; Thu, 3 Jan 2008 03:55:27 +0000 (UTC) (envelope-from imp@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.1/8.14.1) with ESMTP id m033tRx5046254 for ; Thu, 3 Jan 2008 03:55:27 GMT (envelope-from imp@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.1/8.14.1/Submit) id m033tRhP046250 for perforce@freebsd.org; Thu, 3 Jan 2008 03:55:27 GMT (envelope-from imp@freebsd.org) Date: Thu, 3 Jan 2008 03:55:27 GMT Message-Id: <200801030355.m033tRhP046250@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to imp@freebsd.org using -f From: Warner Losh To: Perforce Change Reviews Cc: Subject: PERFORCE change 132365 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 03 Jan 2008 03:55:28 -0000 http://perforce.freebsd.org/chv.cgi?CH=132365 Change 132365 by imp@imp_paco-paco on 2008/01/03 03:55:05 DELAY centrally defined. Affected files ... .. //depot/projects/mips2-jnpr/src/sys/mips/include/clock.h#4 edit Differences ... ==== //depot/projects/mips2-jnpr/src/sys/mips/include/clock.h#4 (text+ko) ==== @@ -15,8 +15,6 @@ #ifdef _KERNEL -void DELAY(int usec); - extern int cpu_clock; /* From owner-p4-projects@FreeBSD.ORG Thu Jan 3 03:56:29 2008 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 83B1216A421; Thu, 3 Jan 2008 03:56:29 +0000 (UTC) Delivered-To: perforce@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 4644516A418 for ; Thu, 3 Jan 2008 03:56:29 +0000 (UTC) (envelope-from imp@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id 1DC1F13C45B for ; Thu, 3 Jan 2008 03:56:29 +0000 (UTC) (envelope-from imp@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.1/8.14.1) with ESMTP id m033uT5F046578 for ; Thu, 3 Jan 2008 03:56:29 GMT (envelope-from imp@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.1/8.14.1/Submit) id m033uSAc046575 for perforce@freebsd.org; Thu, 3 Jan 2008 03:56:29 GMT (envelope-from imp@freebsd.org) Date: Thu, 3 Jan 2008 03:56:29 GMT Message-Id: <200801030356.m033uSAc046575@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to imp@freebsd.org using -f From: Warner Losh To: Perforce Change Reviews Cc: Subject: PERFORCE change 132366 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 03 Jan 2008 03:56:30 -0000 http://perforce.freebsd.org/chv.cgi?CH=132366 Change 132366 by imp@imp_paco-paco on 2008/01/03 03:55:40 Get all the defines # this is cpu.h vs cpuregs.h fallout, may want to revisit it Affected files ... .. //depot/projects/mips2-jnpr/src/sys/mips/mips/swtch.S#4 edit Differences ... ==== //depot/projects/mips2-jnpr/src/sys/mips/mips/swtch.S#4 (text+ko) ==== @@ -59,6 +59,7 @@ #include #include #include +#include #include #include From owner-p4-projects@FreeBSD.ORG Thu Jan 3 04:03:37 2008 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 21C8516A41B; Thu, 3 Jan 2008 04:03:37 +0000 (UTC) Delivered-To: perforce@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id DB24216A419 for ; Thu, 3 Jan 2008 04:03:36 +0000 (UTC) (envelope-from imp@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id CABC913C442 for ; Thu, 3 Jan 2008 04:03:36 +0000 (UTC) (envelope-from imp@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.1/8.14.1) with ESMTP id m0343aW0050421 for ; Thu, 3 Jan 2008 04:03:36 GMT (envelope-from imp@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.1/8.14.1/Submit) id m0343a1k050417 for perforce@freebsd.org; Thu, 3 Jan 2008 04:03:36 GMT (envelope-from imp@freebsd.org) Date: Thu, 3 Jan 2008 04:03:36 GMT Message-Id: <200801030403.m0343a1k050417@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to imp@freebsd.org using -f From: Warner Losh To: Perforce Change Reviews Cc: Subject: PERFORCE change 132367 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 03 Jan 2008 04:03:37 -0000 http://perforce.freebsd.org/chv.cgi?CH=132367 Change 132367 by imp@imp_paco-paco on 2008/01/03 04:03:01 Adjust mips2-based tick.c to the reality of the jnpr underpinnings. Add expected defines in clock.h, although they may ultimately be lame. Affected files ... .. //depot/projects/mips2-jnpr/src/sys/mips/include/clock.h#5 edit .. //depot/projects/mips2-jnpr/src/sys/mips/mips/tick.c#2 edit Differences ... ==== //depot/projects/mips2-jnpr/src/sys/mips/include/clock.h#5 (text+ko) ==== @@ -32,6 +32,22 @@ extern intrmask_t clockintr(intrmask_t, struct clockframe *); +#define wall_cmos_clock 0 +#define adjkerntz 0 + +/* + * Default is to assume a CPU pipeline clock of 100Mhz, and + * that CP0_COUNT increments every 2 cycles. + */ +#define MIPS_DEFAULT_HZ (100 * 1000 * 1000) + +void tick_init_params(uint64_t, int); +void tick_init(void); +int sysbeep(int pitch, int period); + +extern uint64_t counter_freq; +extern int clocks_running; + #endif #endif /* !_MACHINE_CLOCK_H_ */ ==== //depot/projects/mips2-jnpr/src/sys/mips/mips/tick.c#2 (text+ko) ==== @@ -196,10 +196,11 @@ /* * Magic. Setting up with an arg of NULL means we get passed tf. + * XXX this comment and the code don't match. */ tf = arg; - usermode = tf->tf_regs[TF_SR] & MIPS_SR_KSU_USER; - pc = tf->tf_regs[TF_EPC]; + usermode = tf->sr & MIPS_SR_KSU_USER; + pc = tf->pc; if (clocks_running) { hardclock(usermode, pc); From owner-p4-projects@FreeBSD.ORG Thu Jan 3 05:42:19 2008 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id DB45C16A41B; Thu, 3 Jan 2008 05:42:18 +0000 (UTC) Delivered-To: perforce@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 7596416A417 for ; Thu, 3 Jan 2008 05:42:18 +0000 (UTC) (envelope-from imp@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id 654EE13C458 for ; Thu, 3 Jan 2008 05:42:18 +0000 (UTC) (envelope-from imp@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.1/8.14.1) with ESMTP id m035gImO096052 for ; Thu, 3 Jan 2008 05:42:18 GMT (envelope-from imp@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.1/8.14.1/Submit) id m035gIer096049 for perforce@freebsd.org; Thu, 3 Jan 2008 05:42:18 GMT (envelope-from imp@freebsd.org) Date: Thu, 3 Jan 2008 05:42:18 GMT Message-Id: <200801030542.m035gIer096049@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to imp@freebsd.org using -f From: Warner Losh To: Perforce Change Reviews Cc: Subject: PERFORCE change 132368 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 03 Jan 2008 05:42:19 -0000 http://perforce.freebsd.org/chv.cgi?CH=132368 Change 132368 by imp@imp_paco-paco on 2008/01/03 05:41:23 Declare pmap_uipdate_page() in pmap.h. Don't PMAP_INLINE for non-static functions. Affected files ... .. //depot/projects/mips2-jnpr/src/sys/mips/include/pmap.h#5 edit .. //depot/projects/mips2-jnpr/src/sys/mips/mips/pmap.c#6 edit .. //depot/projects/mips2-jnpr/src/sys/mips/mips/trap.c#4 edit Differences ... ==== //depot/projects/mips2-jnpr/src/sys/mips/include/pmap.h#5 (text+ko) ==== @@ -177,10 +177,11 @@ int page_is_managed(vm_offset_t pa); void pmap_page_is_free(vm_page_t m); void pmap_kushmem_reattach(struct proc *); -PMAP_INLINE void pmap_kenter(vm_offset_t va, vm_paddr_t pa); -PMAP_INLINE void pmap_kremove(vm_offset_t va); +/* PMAP_INLINE */ void pmap_kenter(vm_offset_t va, vm_paddr_t pa); +/* PMAP_INLINE */ void pmap_kremove(vm_offset_t va); void * pmap_kenter_temporary(vm_paddr_t pa, int i); int pmap_compute_pages_to_dump(void); +void pmap_update_page(pmap_t pmap, vm_offset_t va, pt_entry_t pte); /* * floating virtual pages (FPAGES) ==== //depot/projects/mips2-jnpr/src/sys/mips/mips/pmap.c#6 (text+ko) ==== @@ -572,7 +572,7 @@ /* * add a wired page to the kva */ -PMAP_INLINE void +/* PMAP_INLINE */ void pmap_kenter(vm_offset_t va, vm_paddr_t pa) { register pt_entry_t *pte; @@ -595,7 +595,7 @@ /* * remove a page from the kernel pagetables */ -PMAP_INLINE void +/* PMAP_INLINE */ void pmap_kremove(vm_offset_t va) { register pt_entry_t *pte; @@ -2812,7 +2812,7 @@ * Extract the physical page address associated * virtual address. */ -PMAP_INLINE vm_offset_t +/* PMAP_INLINE */ vm_offset_t pmap_kextract(vm_offset_t va) { vm_offset_t pa = 0; ==== //depot/projects/mips2-jnpr/src/sys/mips/mips/trap.c#4 (text+ko) ==== @@ -302,7 +302,6 @@ * In the case of a kernel trap, we return the pc where to resume if * p->p_addr->u_pcb.pcb_onfault is set, otherwise, return old pc. */ -void pmap_update_page(pmap_t pmap, vm_offset_t va, pt_entry_t pte); u_int trap(trapframe) struct trapframe *trapframe; From owner-p4-projects@FreeBSD.ORG Thu Jan 3 06:15:53 2008 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 7170916A46E; Thu, 3 Jan 2008 06:15:53 +0000 (UTC) Delivered-To: perforce@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 3730D16A419 for ; Thu, 3 Jan 2008 06:15:53 +0000 (UTC) (envelope-from imp@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id 2690913C459 for ; Thu, 3 Jan 2008 06:15:53 +0000 (UTC) (envelope-from imp@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.1/8.14.1) with ESMTP id m036Fr5H011210 for ; Thu, 3 Jan 2008 06:15:53 GMT (envelope-from imp@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.1/8.14.1/Submit) id m036FrOH011207 for perforce@freebsd.org; Thu, 3 Jan 2008 06:15:53 GMT (envelope-from imp@freebsd.org) Date: Thu, 3 Jan 2008 06:15:53 GMT Message-Id: <200801030615.m036FrOH011207@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to imp@freebsd.org using -f From: Warner Losh To: Perforce Change Reviews Cc: Subject: PERFORCE change 132369 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 03 Jan 2008 06:15:53 -0000 http://perforce.freebsd.org/chv.cgi?CH=132369 Change 132369 by imp@imp_paco-paco on 2008/01/03 06:15:10 I think I can just remove the reference to PG_BUSY here since it changed into VOP_BUSY, and also remove the page queue locking operations. I think they are also not needed. Affected files ... .. //depot/projects/mips2-jnpr/src/sys/mips/mips/pmap.c#7 edit Differences ... ==== //depot/projects/mips2-jnpr/src/sys/mips/mips/pmap.c#7 (text+ko) ==== @@ -875,7 +875,7 @@ } void -pmap_pinit0(struct pmap *pmap) +pmap_pinit0(pmap_t pmap) { int i; @@ -896,8 +896,8 @@ * Initialize a preallocated and zeroed pmap structure, * such as one in a vmspace structure. */ -void -pmap_pinit(struct pmap *pmap) +int +pmap_pinit(pmap_t pmap) { vm_page_t ptdpg; int i; @@ -917,11 +917,16 @@ */ ptdpg = vm_page_alloc( NULL, NUSERPGTBLS, req); +#if 0 + /* I think we can just delete these, now that PG_BUSY is gone */ vm_page_lock_queues(); vm_page_flag_clear(ptdpg, PG_BUSY); /* not usually mapped*/ +#endif ptdpg->valid = VM_PAGE_BITS_ALL; +#if 0 vm_page_unlock_queues(); +#endif pmap->pm_segtab = (pd_entry_t *) MIPS_PHYS_TO_CACHED(VM_PAGE_TO_PHYS(ptdpg)); @@ -936,6 +941,8 @@ } TAILQ_INIT(&pmap->pm_pvlist); bzero(&pmap->pm_stats, sizeof pmap->pm_stats); + + return (1); } /* From owner-p4-projects@FreeBSD.ORG Thu Jan 3 06:30:30 2008 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id AAFDC16A41A; Thu, 3 Jan 2008 06:30:30 +0000 (UTC) Delivered-To: perforce@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 7087116A418 for ; Thu, 3 Jan 2008 06:30:30 +0000 (UTC) (envelope-from imp@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id 6061713C448 for ; Thu, 3 Jan 2008 06:30:30 +0000 (UTC) (envelope-from imp@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.1/8.14.1) with ESMTP id m036UU9d015209 for ; Thu, 3 Jan 2008 06:30:30 GMT (envelope-from imp@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.1/8.14.1/Submit) id m036UUEY015206 for perforce@freebsd.org; Thu, 3 Jan 2008 06:30:30 GMT (envelope-from imp@freebsd.org) Date: Thu, 3 Jan 2008 06:30:30 GMT Message-Id: <200801030630.m036UUEY015206@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to imp@freebsd.org using -f From: Warner Losh To: Perforce Change Reviews Cc: Subject: PERFORCE change 132370 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 03 Jan 2008 06:30:31 -0000 http://perforce.freebsd.org/chv.cgi?CH=132370 Change 132370 by imp@imp_paco-paco on 2008/01/03 06:29:30 remove references to pmap_page_protect. It appears to have been relegated to the scrap heap of history. Affected files ... .. //depot/projects/mips2-jnpr/src/sys/mips/mips/pmap.c#8 edit Differences ... ==== //depot/projects/mips2-jnpr/src/sys/mips/mips/pmap.c#8 (text+ko) ==== @@ -1437,16 +1437,6 @@ register pv_entry_t pv; register pt_entry_t *pte, tpte; -#if defined(PMAP_DIAGNOSTIC) - /* - * XXX this makes pmap_page_protect(NONE) illegal for non-managed - * pages! - */ - if (m->flags & PG_FICTITIOUS) { - panic("pmap_remove_all: illegal for unmanaged page, va: 0x%x", VM_PAGE_TO_PHYS(m)); - } -#endif - mtx_assert(&vm_page_queue_mtx, MA_OWNED); if (m->md.pv_flags & PV_TABLE_REF) @@ -2333,23 +2323,6 @@ } /* - * pmap_page_protect: - * - * Lower the permission for all mappings to a given page. - */ -void -pmap_page_protect(vm_page_t m, vm_prot_t prot) -{ - if ((prot & VM_PROT_WRITE) == 0) { - if (prot & (VM_PROT_READ | VM_PROT_EXECUTE)) { - pmap_changebit(m, PG_RW, FALSE); - } else { - pmap_remove_all(m); - } - } -} - -/* * pmap_ts_referenced: * * Return the count of reference bits for a page, clearing all of them. From owner-p4-projects@FreeBSD.ORG Thu Jan 3 06:31:32 2008 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 283B716A41B; Thu, 3 Jan 2008 06:31:32 +0000 (UTC) Delivered-To: perforce@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id E21B616A418 for ; Thu, 3 Jan 2008 06:31:31 +0000 (UTC) (envelope-from imp@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id 8CB0413C45A for ; Thu, 3 Jan 2008 06:31:31 +0000 (UTC) (envelope-from imp@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.1/8.14.1) with ESMTP id m036VVQQ015690 for ; Thu, 3 Jan 2008 06:31:31 GMT (envelope-from imp@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.1/8.14.1/Submit) id m036VVb4015686 for perforce@freebsd.org; Thu, 3 Jan 2008 06:31:31 GMT (envelope-from imp@freebsd.org) Date: Thu, 3 Jan 2008 06:31:31 GMT Message-Id: <200801030631.m036VVb4015686@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to imp@freebsd.org using -f From: Warner Losh To: Perforce Change Reviews Cc: Subject: PERFORCE change 132371 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 03 Jan 2008 06:31:32 -0000 http://perforce.freebsd.org/chv.cgi?CH=132371 Change 132371 by imp@imp_paco-paco on 2008/01/03 06:30:49 Restore diagnostics, but fix comment name. Affected files ... .. //depot/projects/mips2-jnpr/src/sys/mips/mips/pmap.c#9 edit Differences ... ==== //depot/projects/mips2-jnpr/src/sys/mips/mips/pmap.c#9 (text+ko) ==== @@ -1437,6 +1437,14 @@ register pv_entry_t pv; register pt_entry_t *pte, tpte; +#if defined(PMAP_DEBUG) + /* + * XXX This makes pmap_remove_all() illegal for non-managed pages! + */ + if (m->flags & PG_FICTITIOUS) { + panic("pmap_page_protect: illegal for unmanaged page, va: 0x%x", VM_PAGE_TO_PHYS(m)); + } +#endif mtx_assert(&vm_page_queue_mtx, MA_OWNED); if (m->md.pv_flags & PV_TABLE_REF) From owner-p4-projects@FreeBSD.ORG Thu Jan 3 06:37:39 2008 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id DE8E716A41A; Thu, 3 Jan 2008 06:37:38 +0000 (UTC) Delivered-To: perforce@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 8B7F616A417 for ; Thu, 3 Jan 2008 06:37:38 +0000 (UTC) (envelope-from zhouzhouyi@FreeBSD.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id 7AAC413C457 for ; Thu, 3 Jan 2008 06:37:38 +0000 (UTC) (envelope-from zhouzhouyi@FreeBSD.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.1/8.14.1) with ESMTP id m036bcSG018679 for ; Thu, 3 Jan 2008 06:37:38 GMT (envelope-from zhouzhouyi@FreeBSD.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.1/8.14.1/Submit) id m036bcmg018676 for perforce@freebsd.org; Thu, 3 Jan 2008 06:37:38 GMT (envelope-from zhouzhouyi@FreeBSD.org) Date: Thu, 3 Jan 2008 06:37:38 GMT Message-Id: <200801030637.m036bcmg018676@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to zhouzhouyi@FreeBSD.org using -f From: Zhouyi ZHOU To: Perforce Change Reviews Cc: Subject: PERFORCE change 132373 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 03 Jan 2008 06:37:39 -0000 http://perforce.freebsd.org/chv.cgi?CH=132373 Change 132373 by zhouzhouyi@zhouzhouyi_mactest on 2008/01/03 06:36:44 style modification Affected files ... .. //depot/projects/soc2007/zhouzhouyi_mactest_soc/regression/mactest/tests/open/02.t#5 edit Differences ... ==== //depot/projects/soc2007/zhouzhouyi_mactest_soc/regression/mactest/tests/open/02.t#5 (text+ko) ==== @@ -1,80 +1,91 @@ #!/bin/sh -# $FreeBSD: src/tools/regression/mactest/tests/open/02.t,v 1.1 2007/06/04 01:42:08 zhouzhouyi Exp $ +# $FreeBSD$ -desc="open opens (and eventually creates) a file, checking the effects of MAC enforcement" +desc="open opens (and eventually creates) a file" - - dir=`dirname $0` . ${dir}/../misc.sh -echo "1..7" +case "${os}" in +FreeBSD) + + mac_mls_support=`sysctl -n security.mac.mls.enabled 2>/dev/null` + mac_biba_support=`sysctl -n security.mac.biba.enabled 2>/dev/null` + mac_test_support=`sysctl -n security.mac.test.pseudoinit 2>/dev/null` -n0=`namegen` -n1=`namegen` + if [ "${mac_mls_support}" != "" ] && [ "${mac_biba_support}" != "" ] && + [ "${mac_test_support}" != "" ]; then #turn off all the switches -for i in `sysctl security.mac | grep "\.enabled"| - sed 's/\([a-z\.]*\.enabled\)\(:\ \)\([01]\)/\1/`; do -sysctl ${i}=0 -done + for i in `sysctl security.mac | grep "\.enabled"| + sed 's/\([a-z\.]*\.enabled\)\(:\ \)\([01]\)/\1/`; do + sysctl ${i}=0 >/dev/null + done + + + if [ -f ${mactest_conf} ]; then + rm ${mactest_conf} + fi + touch ${mactest_conf} + setfmac "mls/equal,biba/equal" ${mactest_conf} + + echo "1..7" + + n0=`namegen` + n1=`namegen` + -mac_mls_support=`sysctl -n security.mac.mls.enabled 2>/dev/null` -#following test case is to show, when subject's effective mls level does not dominate -#object's effective mls level, a ESRCH is returned when signaling -if [ "${mac_mls_support}" != "" ] ; then + dvplabel=`getfmac ".."| sed 's/\(\.\.:\ \)\([a-z\,\/]*\)/\2/`; - dvplabel=`getfmac "."| sed 's/\(\.:\ \)\([a-z\,\/]*\)/\2/` - + sysctl security.mac.mls.enabled=1 > /dev/null +#case 1 unsucessful create #examine the label of its parent directory - echo -n "pid = -1 mac_test_check_vnode_lookup:" > ${mactest_conf} - echo "biba/high(low-high),mls/10(low-high) ${dvplabel}" >> ${mactest_conf} + echo -n "pid = -1 vnode_check_lookup:" > ${mactest_conf} + echo "biba/high(low-high),mls/10(low-high) ${dvplabel}" >> ${mactest_conf} #check the label of its parent directory - echo -n "pid = -1 mac_test_check_vnode_create:" >> ${mactest_conf} - echo "biba/high(low-high),mls/10(low-high) ${dvplabel}" >> ${mactest_conf} + echo -n "pid = -1 vnode_check_create:" >> ${mactest_conf} + echo "biba/high(low-high),mls/10(low-high) ${dvplabel}" >> ${mactest_conf} #since the mac_mls forbid the vnode create, there are no vnode label initialization -#and vnode extattr creating. +#BLP: no write down + mactestexpect "" EACCES -m "mls/10(low-high)" -f ${mactest_conf} mkdir ${n1} 0755 + truncate -s 0 ${mactest_conf} - t=`sysctl security.mac.mls.enabled=1` - echo "enforcing mac/mls!" - -#BLP: no write down - mactestexpect "" EACCES -m "mls/10(low-high)" -f ${mactest_conf} mkdir ${n1} 0755 - - rm ${mactest_conf} - touch ${mactest_conf} #the mac hook checking is already done in previous test cases! - mactestexpect "" 0 -m ${dvplabel} -f ${mactest_conf} mkdir ${n1} 0755 - mactestexpect "" "" -m ${dvplabel} -f ${mactest_conf} system setfmac "mls/10" ${n1} +#case 2 create the directory + mactestexpect "" 0 -m ${dvplabel} -f ${mactest_conf} mkdir ${n1} 0755 +#case 3 label the directory + mactestexpect "" "" -m ${dvplabel} -f ${mactest_conf} system setfmac "mls/10" ${n1} -#BLP: no read high - echo -n "pid = -1 mac_test_check_vnode_open#VREAD:" > ${mactest_conf} - echo "biba/high(low-high),mls/low(low-high) biba/high,mls/10" >> ${mactest_conf} - mactestexpect "" EACCES -m ${dvplabel} -f ${mactest_conf} open ${n1} O_RDONLY +#case 4 BLP: no read high + echo -n "pid = -1 vnode_check_open#VREAD:" > ${mactest_conf} + echo "biba/high(low-high),mls/low(low-high) biba/high,mls/10" >> ${mactest_conf} + mactestexpect "" EACCES -m ${dvplabel} -f ${mactest_conf} open ${n1} O_RDONLY +#case 5 #there will be mac_check_vnode_stat in setfmac - echo -n "pid = -2 mac_test_check_vnode_stat:" > ${mactest_conf} - echo "biba/high(low-high),mls/low(low-high) NULL biba/high,mls/10" >> ${mactest_conf} - mactestexpect "setfmac:.traversing.${n1}:.Permission.denied" "" -m ${dvplabel} -f ${mactest_conf} system setfmac "mls/low" ${n1} + echo -n "pid = -2 vnode_check_stat:" > ${mactest_conf} + echo "biba/high(low-high),mls/low(low-high) biba/high,mls/10" >> ${mactest_conf} + mactestexpect "setfmac:.traversing.${n1}:.Permission.denied" "" -m ${dvplabel} -f ${mactest_conf} system setfmac "mls/low" ${n1} -#relabel the vnode to mls/low - rm ${mactest_conf} - touch ${mactest_conf} - mactestexpect "" "" -m mls/10 -f ${mactest_conf} system setfmac "mls/low" ${n1} +#case 6 relabel the vnode to mls/low + truncate -s 0 ${mactest_conf} + mactestexpect "" "" -m mls/10 -f ${mactest_conf} system setfmac "mls/low" ${n1} +#case 7 BLP: ok read low + mactestexpect "" 0 -m mls/10 -f ${mactest_conf} open ${n1} O_RDONLY -#BLP: ok read low - mactestexpect "" 0 -m mls/10 -f ${mactest_conf} open ${n1} O_RDONLY - - - t=`sysctl security.mac.mls.enabled=0` - echo "disabling mac/mls!" - #cleanup: -# cd .. - rm -fr ${n1} - rm ${mactest_conf} - -fi+ sysctl security.mac.mls.enabled=0 >/dev/null + sysctl security.mac.biba.enabled=0 > /dev/null + cd .. + rm -fr ${n1} + rm ${mactest_conf} +#mac_mls mac_biba and mac_test support + fi + ;; +*) + quick_exit + ;; +esac From owner-p4-projects@FreeBSD.ORG Thu Jan 3 06:38:40 2008 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id D647316A41B; Thu, 3 Jan 2008 06:38:39 +0000 (UTC) Delivered-To: perforce@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 9B64F16A41A for ; Thu, 3 Jan 2008 06:38:39 +0000 (UTC) (envelope-from zhouzhouyi@FreeBSD.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id 723C713C442 for ; Thu, 3 Jan 2008 06:38:39 +0000 (UTC) (envelope-from zhouzhouyi@FreeBSD.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.1/8.14.1) with ESMTP id m036cdHf018707 for ; Thu, 3 Jan 2008 06:38:39 GMT (envelope-from zhouzhouyi@FreeBSD.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.1/8.14.1/Submit) id m036cdoI018704 for perforce@freebsd.org; Thu, 3 Jan 2008 06:38:39 GMT (envelope-from zhouzhouyi@FreeBSD.org) Date: Thu, 3 Jan 2008 06:38:39 GMT Message-Id: <200801030638.m036cdoI018704@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to zhouzhouyi@FreeBSD.org using -f From: Zhouyi ZHOU To: Perforce Change Reviews Cc: Subject: PERFORCE change 132374 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 03 Jan 2008 06:38:40 -0000 http://perforce.freebsd.org/chv.cgi?CH=132374 Change 132374 by zhouzhouyi@zhouzhouyi_mactest on 2008/01/03 06:38:25 clean the working directory Affected files ... .. //depot/projects/soc2007/zhouzhouyi_mactest_soc/regression/mactest/tests/open/02.t#6 edit Differences ... ==== //depot/projects/soc2007/zhouzhouyi_mactest_soc/regression/mactest/tests/open/02.t#6 (text+ko) ==== @@ -79,7 +79,6 @@ #cleanup: sysctl security.mac.mls.enabled=0 >/dev/null sysctl security.mac.biba.enabled=0 > /dev/null - cd .. rm -fr ${n1} rm ${mactest_conf} #mac_mls mac_biba and mac_test support From owner-p4-projects@FreeBSD.ORG Thu Jan 3 06:58:00 2008 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 0287516A46C; Thu, 3 Jan 2008 06:58:00 +0000 (UTC) Delivered-To: perforce@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id BB96016A420 for ; Thu, 3 Jan 2008 06:57:59 +0000 (UTC) (envelope-from imp@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id AB4A113C457 for ; Thu, 3 Jan 2008 06:57:59 +0000 (UTC) (envelope-from imp@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.1/8.14.1) with ESMTP id m036vxc8026098 for ; Thu, 3 Jan 2008 06:57:59 GMT (envelope-from imp@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.1/8.14.1/Submit) id m036vxPX026095 for perforce@freebsd.org; Thu, 3 Jan 2008 06:57:59 GMT (envelope-from imp@freebsd.org) Date: Thu, 3 Jan 2008 06:57:59 GMT Message-Id: <200801030657.m036vxPX026095@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to imp@freebsd.org using -f From: Warner Losh To: Perforce Change Reviews Cc: Subject: PERFORCE change 132376 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 03 Jan 2008 06:58:00 -0000 http://perforce.freebsd.org/chv.cgi?CH=132376 Change 132376 by imp@imp_paco-paco on 2008/01/03 06:57:20 Update, I hope correctly, the pmap_enter_quick function. Affected files ... .. //depot/projects/mips2-jnpr/src/sys/mips/mips/pmap.c#10 edit Differences ... ==== //depot/projects/mips2-jnpr/src/sys/mips/mips/pmap.c#10 (text+ko) ==== @@ -1768,17 +1768,16 @@ * 2. Not wired. * 3. Read access. * 4. No page table pages. - * 5. Tlbflush is deferred to calling procedure. - * 6. Page IS managed. * but is *MUCH* faster than pmap_enter... */ -vm_page_t -pmap_enter_quick(pmap_t pmap, vm_offset_t va, vm_page_t m, vm_prot_t prot, - vm_page_t mpte) + +void +pmap_enter_quick(pmap_t pmap, vm_offset_t va, vm_page_t m, vm_prot_t prot) { pt_entry_t *pte; vm_offset_t pa; + vm_page_t mpte = NULL; mtx_assert(&vm_page_queue_mtx, MA_OWNED); VM_OBJECT_LOCK_ASSERT(m->object, MA_OWNED); @@ -1842,7 +1841,7 @@ if (mpte) pmap_unwire_pte_hold(pmap, mpte); PMAP_UNLOCK(pmap); - return 0; + return; } /* @@ -1888,7 +1887,7 @@ } PMAP_UNLOCK(pmap); - return mpte; + return; } /* From owner-p4-projects@FreeBSD.ORG Thu Jan 3 07:05:08 2008 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id EABF616A418; Thu, 3 Jan 2008 07:05:07 +0000 (UTC) Delivered-To: perforce@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id B076B16A41B for ; Thu, 3 Jan 2008 07:05:07 +0000 (UTC) (envelope-from imp@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id 9FC8613C442 for ; Thu, 3 Jan 2008 07:05:07 +0000 (UTC) (envelope-from imp@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.1/8.14.1) with ESMTP id m03757YO030802 for ; Thu, 3 Jan 2008 07:05:07 GMT (envelope-from imp@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.1/8.14.1/Submit) id m03757Ve030797 for perforce@freebsd.org; Thu, 3 Jan 2008 07:05:07 GMT (envelope-from imp@freebsd.org) Date: Thu, 3 Jan 2008 07:05:07 GMT Message-Id: <200801030705.m03757Ve030797@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to imp@freebsd.org using -f From: Warner Losh To: Perforce Change Reviews Cc: Subject: PERFORCE change 132377 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 03 Jan 2008 07:05:08 -0000 http://perforce.freebsd.org/chv.cgi?CH=132377 Change 132377 by imp@imp_paco-paco on 2008/01/03 07:04:33 Remove sva, eva parameters from pmap_remove_pages. Remove unused rouine. Make decl for pmap_init_fpage() dependent on VM_ALLOC_WIRED_TLB_PG_POOL. Affected files ... .. //depot/projects/mips2-jnpr/src/sys/mips/mips/pmap.c#11 edit Differences ... ==== //depot/projects/mips2-jnpr/src/sys/mips/mips/pmap.c#11 (text+ko) ==== @@ -181,7 +181,9 @@ static int init_pte_prot(vm_offset_t va, vm_page_t m, vm_prot_t prot); static void pmap_TLB_invalidate_kernel(vm_offset_t); static void pmap_TLB_update_kernel(vm_offset_t, pt_entry_t); +#ifdef VM_ALLOC_WIRED_TLB_PG_POOL static void pmap_init_fpage(void); +#endif #ifdef SMP static void pmap_invalidate_page_action(void *arg); static void pmap_invalidate_all_action(void *arg); @@ -2121,31 +2123,6 @@ } } -/* - * this routine returns true if a physical page resides - * in the given pmap. - */ -static boolean_t -pmap_page_exists(pmap_t pmap, vm_page_t m) -{ - register pv_entry_t pv; - - if (m->flags & PG_FICTITIOUS) - return FALSE; - - mtx_assert(&vm_page_queue_mtx, MA_OWNED); - /* - * Not found, check current mappings returning immediately if found. - */ - TAILQ_FOREACH(pv, &m->md.pv_list, pv_list) { - if (pv->pv_pmap == pmap) { - return TRUE; - } - } - return (FALSE); -} -/* N/C */ - #define PMAP_REMOVE_PAGES_CURPROC_ONLY /* * Remove all pages from specified address space @@ -2156,7 +2133,7 @@ * in the case of running down an entire address space. */ void -pmap_remove_pages(pmap_t pmap, vm_offset_t sva, vm_offset_t eva) +pmap_remove_pages(pmap_t pmap) { pt_entry_t *pte, tpte; pv_entry_t pv, npv; @@ -2171,16 +2148,12 @@ vm_page_lock_queues(); PMAP_LOCK(pmap); - + sched_pin(); + //XXX need to be TAILQ_FOREACH_SAFE? for(pv = TAILQ_FIRST(&pmap->pm_pvlist); pv; pv = npv) { - if (pv->pv_va >= eva || pv->pv_va < sva) { - npv = TAILQ_NEXT(pv, pv_plist); - continue; - } - pte = pmap_pte(pv->pv_pmap, pv->pv_va); if (!pmap_pte_v(pte)) panic("pmap_remove_pages: page on pm_pvlist has no pte\n"); @@ -2221,6 +2194,7 @@ pmap_unuse_pt(pv->pv_pmap, pv->pv_va, pv->pv_ptem); free_pv_entry(pv); } + sched_unpin(); pmap_invalidate_all(pmap); PMAP_UNLOCK(pmap); vm_page_unlock_queues(); From owner-p4-projects@FreeBSD.ORG Thu Jan 3 07:31:36 2008 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 34C1816A46C; Thu, 3 Jan 2008 07:31:36 +0000 (UTC) Delivered-To: perforce@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id EE1A416A418 for ; Thu, 3 Jan 2008 07:31:35 +0000 (UTC) (envelope-from imp@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id C571D13C467 for ; Thu, 3 Jan 2008 07:31:35 +0000 (UTC) (envelope-from imp@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.1/8.14.1) with ESMTP id m037VZDX039124 for ; Thu, 3 Jan 2008 07:31:35 GMT (envelope-from imp@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.1/8.14.1/Submit) id m037VZeH039116 for perforce@freebsd.org; Thu, 3 Jan 2008 07:31:35 GMT (envelope-from imp@freebsd.org) Date: Thu, 3 Jan 2008 07:31:35 GMT Message-Id: <200801030731.m037VZeH039116@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to imp@freebsd.org using -f From: Warner Losh To: Perforce Change Reviews Cc: Subject: PERFORCE change 132379 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 03 Jan 2008 07:31:36 -0000 http://perforce.freebsd.org/chv.cgi?CH=132379 Change 132379 by imp@imp_paco-paco on 2008/01/03 07:30:38 tlb.[ch] appear to be unnessary in the JNPR world. Affected files ... .. //depot/projects/mips2-jnpr/src/sys/mips/include/tlb.h#2 delete .. //depot/projects/mips2-jnpr/src/sys/mips/mips/tlb.c#2 delete Differences ... From owner-p4-projects@FreeBSD.ORG Thu Jan 3 07:32:37 2008 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 9655A16A418; Thu, 3 Jan 2008 07:32:37 +0000 (UTC) Delivered-To: perforce@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 43C9716A41A for ; Thu, 3 Jan 2008 07:32:37 +0000 (UTC) (envelope-from imp@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id 32DCE13C45D for ; Thu, 3 Jan 2008 07:32:37 +0000 (UTC) (envelope-from imp@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.1/8.14.1) with ESMTP id m037WbJB039792 for ; Thu, 3 Jan 2008 07:32:37 GMT (envelope-from imp@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.1/8.14.1/Submit) id m037Wakn039787 for perforce@freebsd.org; Thu, 3 Jan 2008 07:32:36 GMT (envelope-from imp@freebsd.org) Date: Thu, 3 Jan 2008 07:32:36 GMT Message-Id: <200801030732.m037Wakn039787@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to imp@freebsd.org using -f From: Warner Losh To: Perforce Change Reviews Cc: Subject: PERFORCE change 132380 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 03 Jan 2008 07:32:37 -0000 http://perforce.freebsd.org/chv.cgi?CH=132380 Change 132380 by imp@imp_paco-paco on 2008/01/03 07:32:02 Move more of the files from the juniper port. Maybe more are needed. Affected files ... .. //depot/projects/mips2-jnpr/src/sys/conf/files.mips#2 edit .. //depot/projects/mips2-jnpr/src/sys/mips/mips/cache.S#3 edit .. //depot/projects/mips2-jnpr/src/sys/mips/mips/fp.S#3 edit .. //depot/projects/mips2-jnpr/src/sys/mips/mips/psraccess.S#3 edit Differences ... ==== //depot/projects/mips2-jnpr/src/sys/conf/files.mips#2 (text+ko) ==== @@ -1,38 +1,89 @@ +# This file tells config what files go into building a kernel, +# files marked standard are always included. +# +# Copyright (c) 2001, 2004-2005, Juniper Networks, Inc. +# All rights reserved. +# JNPR: files.mips,v 1.11 2007/08/09 12:25:35 katta +# +# The long compile-with and dependency lines are required because of +# limitations in config: backslash-newline doesn't work in strings, and +# dependency lines other than the first are silently ignored. +# +# ---------------------------------------------------------------------- +# Phase 2 +# ---------------------------------------------------------------------- +# This file tells config what files go into building a kernel, +# files marked standard are always included. +# +# Copyright (c) 2001, 2004-2005, Juniper Networks, Inc. +# All rights reserved. +# JNPR: files.mips,v 1.11 2007/08/09 12:25:35 katta # $FreeBSD$ +# +# The long compile-with and dependency lines are required because of +# limitations in config: backslash-newline doesn't work in strings, and +# dependency lines other than the first are silently ignored. +# +# ---------------------------------------------------------------------- +# Phase 2 +# ---------------------------------------------------------------------- -dev/cfe/cfe_api.c optional cfe -dev/cfe/cfe_console.c optional cfe_console -#dev/cfe/cfe_resource.c optional cfe # not yet needed +mips/mips/cache.S standard +#xxx +#mips/mips/cpuconf.c standard +mips/mips/machdep.c standard +mips/mips/mp_machdep.c optional smp +mips/mips/mips_subr.c standard +mips/mips/psraccess.S standard +# Really? +mips/drivers/sio/ns16550.c standard +# +# ---------------------------------------------------------------------- +# Phase 3 +# ---------------------------------------------------------------------- +mips/mips/autoconf.c standard +mips/mips/cpu.c standard +mips/mips/elf_machdep.c standard +mips/mips/exception.S standard +mips/mips/gdb_machdep.c standard +mips/mips/interrupt.c standard +mips/mips/mainbus.c standard +mips/mips/pmap.c standard +mips/mips/trap.c standard +mips/mips/vm_machdep.c standard +# +# ---------------------------------------------------------------------- +# Phase 4 +# ---------------------------------------------------------------------- +# +mips/mips/clock.c standard +#mips/mips/queue.c standard +# ---------------------------------------------------------------------- +# Phase 5 +# ---------------------------------------------------------------------- +mips/mips/fp.S standard +mips/mips/pm_machdep.c standard +mips/mips/swtch.S standard -mips/mips/autoconf.c standard mips/mips/busdma_machdep.c standard -mips/mips/cache.c standard -mips/mips/cache_mipsNN.c standard -mips/mips/copystr.S standard -mips/mips/cpu.c standard +#mips/mips/cache.c standard +#mips/mips/cache_mipsNN.c standard +#mips/mips/copystr.S standard mips/mips/db_disasm.c optional ddb mips/mips/db_interface.c optional ddb mips/mips/db_trace.c optional ddb mips/mips/dump_machdep.c standard -mips/mips/elf_machdep.c standard -mips/mips/exception.S standard mips/mips/in_cksum.c optional inet mips/mips/intr_machdep.c standard mips/mips/locore.S standard no-obj -mips/mips/machdep.c standard mips/mips/mem.c optional mem mips/mips/nexus.c standard -mips/mips/pmap.c standard mips/mips/stack_machdep.c optional ddb | stack mips/mips/support.S standard mips/mips/swtch.S standard mips/mips/sys_machdep.c standard mips/mips/tick.c standard -mips/mips/tlb.c standard -mips/mips/trap.c standard -mips/mips/uio_machdep.c standard mips/mips/uio_machdep.c standard -mips/mips/vm_machdep.c standard geom/geom_bsd.c standard geom/geom_bsd_enc.c standard geom/geom_mbr.c standard @@ -53,3 +104,8 @@ #XXX: We can't use these versions, as strcmp.c is included conf/files #libkern/mips/strcmp.S standard #libkern/mips/strncmp.S standard + +dev/cfe/cfe_api.c optional cfe +dev/cfe/cfe_console.c optional cfe_console +#dev/cfe/cfe_resource.c optional cfe # not yet needed + ==== //depot/projects/mips2-jnpr/src/sys/mips/mips/cache.S#3 (text+ko) ==== @@ -37,7 +37,7 @@ #include #include -#include "assym.S" +#include "assym.s" /* * Skip the .h file. Noone else need to know! ==== //depot/projects/mips2-jnpr/src/sys/mips/mips/fp.S#3 (text+ko) ==== @@ -43,7 +43,7 @@ #include #include -#include "assym.S" +#include "assym.s" #define SEXP_INF 0xff #define DEXP_INF 0x7ff ==== //depot/projects/mips2-jnpr/src/sys/mips/mips/psraccess.S#3 (text+ko) ==== @@ -41,7 +41,7 @@ #include #include -#include "assym.S" +#include "assym.s" /* * FREEBSD_DEVELOPERS_FIXME From owner-p4-projects@FreeBSD.ORG Thu Jan 3 10:15:29 2008 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 389E116A420; Thu, 3 Jan 2008 10:15:29 +0000 (UTC) Delivered-To: perforce@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id F259516A41A for ; Thu, 3 Jan 2008 10:15:28 +0000 (UTC) (envelope-from andrew@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id E1D7D13C474 for ; Thu, 3 Jan 2008 10:15:28 +0000 (UTC) (envelope-from andrew@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.1/8.14.1) with ESMTP id m03AFSTp026310 for ; Thu, 3 Jan 2008 10:15:28 GMT (envelope-from andrew@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.1/8.14.1/Submit) id m03AFSNS026302 for perforce@freebsd.org; Thu, 3 Jan 2008 10:15:28 GMT (envelope-from andrew@freebsd.org) Date: Thu, 3 Jan 2008 10:15:28 GMT Message-Id: <200801031015.m03AFSNS026302@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to andrew@freebsd.org using -f From: Andrew Turner To: Perforce Change Reviews Cc: Subject: PERFORCE change 132385 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 03 Jan 2008 10:15:29 -0000 http://perforce.freebsd.org/chv.cgi?CH=132385 Change 132385 by andrew@andrew_hermies on 2008/01/03 10:15:21 Add the start of a NAND driver based on one written by John Birrell (jb@) Affected files ... .. //depot/projects/arm/src/sys/arm/s3c2xx0/files.s3c2xx0#3 edit .. //depot/projects/arm/src/sys/arm/s3c2xx0/s3c2410.c#7 edit .. //depot/projects/arm/src/sys/arm/s3c2xx0/s3c2410reg.h#2 edit .. //depot/projects/arm/src/sys/arm/s3c2xx0/s3c24x0_nand.c#1 add Differences ... ==== //depot/projects/arm/src/sys/arm/s3c2xx0/files.s3c2xx0#3 (text+ko) ==== @@ -4,6 +4,7 @@ arm/s3c2xx0/s3c2410.c standard arm/s3c2xx0/s3c2xx0_space.c standard arm/s3c2xx0/s3c24x0_clk.c standard +arm/s3c2xx0/s3c24x0_nand.c optional nand arm/s3c2xx0/uart_bus_s3c2410.c optional uart arm/s3c2xx0/uart_cpu_s3c2410.c optional uart arm/s3c2xx0/uart_dev_s3c2410.c optional uart ==== //depot/projects/arm/src/sys/arm/s3c2xx0/s3c2410.c#7 (text+ko) ==== @@ -200,6 +200,7 @@ rman_manage_region(&s3c2xx0_softc->s3c2xx0_rman, 0, 32) != 0) panic("s3c2410_attach: failed to set up rman"); device_add_child(dev, "timer", 0); + device_add_child(dev, "nand", 0); bus_generic_probe(dev); bus_generic_attach(dev); ==== //depot/projects/arm/src/sys/arm/s3c2xx0/s3c2410reg.h#2 (text+ko) ==== @@ -141,10 +141,17 @@ /* NAND Flash controller */ #define NANDFC_NFCONF 0x00 /* Configuration */ +#define NFCONF_ENABLE (1<<15) /* NAND controller enabled */ +#define NFCONF_ECC (1<<12) /* Initialize ECC decoder/encoder */ +#define NFCONF_FCE (1<<11) /* Flash chip enabled */ +#define NFCONF_TACLS (7<<8) /* CLE and ALE duration */ +#define NFCONF_TWRPH0 (7<<4) /* TWRPH0 duration */ +#define NFCONF_TWRPH1 (7<<0) /* TWRPH1 duration */ #define NANDFC_NFCMD 0x04 /* command */ #define NANDFC_NFADDR 0x08 /* address */ #define NANDFC_NFDATA 0x0c /* data */ #define NANDFC_NFSTAT 0x10 /* operation status */ +#define NFSTAT_READY (1<<0) /* NAND flash memory ready/busy status */ #define NANDFC_NFECC 0x14 /* ecc */ /* GPIO */ From owner-p4-projects@FreeBSD.ORG Thu Jan 3 16:56:39 2008 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 72E6316A47F; Thu, 3 Jan 2008 16:56:39 +0000 (UTC) Delivered-To: perforce@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 2CE2616A41A; Thu, 3 Jan 2008 16:56:39 +0000 (UTC) (envelope-from imp@bsdimp.com) Received: from harmony.bsdimp.com (bsdimp.com [199.45.160.85]) by mx1.freebsd.org (Postfix) with ESMTP id C566A13C46A; Thu, 3 Jan 2008 16:56:38 +0000 (UTC) (envelope-from imp@bsdimp.com) Received: from localhost (localhost [127.0.0.1]) by harmony.bsdimp.com (8.14.1/8.14.1) with ESMTP id m03GtM9j094398; Thu, 3 Jan 2008 09:55:22 -0700 (MST) (envelope-from imp@bsdimp.com) Date: Thu, 03 Jan 2008 09:55:34 -0700 (MST) Message-Id: <20080103.095534.-1820226863.imp@bsdimp.com> To: andrew@freebsd.org From: "M. Warner Losh" In-Reply-To: <200801031015.m03AFSNS026302@repoman.freebsd.org> References: <200801031015.m03AFSNS026302@repoman.freebsd.org> X-Mailer: Mew version 5.2 on Emacs 21.3 / Mule 5.0 (SAKAKI) Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit Cc: perforce@freebsd.org Subject: Re: PERFORCE change 132385 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 03 Jan 2008 16:56:39 -0000 In message: <200801031015.m03AFSNS026302@repoman.freebsd.org> Andrew Turner writes: : http://perforce.freebsd.org/chv.cgi?CH=132385 : : Change 132385 by andrew@andrew_hermies on 2008/01/03 10:15:21 : : Add the start of a NAND driver based on one written by John Birrell (jb@) You better make sure that you can use it. At timing solutions, we were told not to distribute it without telling John Birrell first and getting his permission. There was some problem with the code he wanted to get corrected. Not sure if it was technical or political or license, but he did ask us not to distribute it. John Hein should not have published it. Also, the driver needs to be split into a machine specific NAND "bridge" part and a nand protocol part. We need similar things for NOR memory and a few others. Warner : Affected files ... : : .. //depot/projects/arm/src/sys/arm/s3c2xx0/files.s3c2xx0#3 edit : .. //depot/projects/arm/src/sys/arm/s3c2xx0/s3c2410.c#7 edit : .. //depot/projects/arm/src/sys/arm/s3c2xx0/s3c2410reg.h#2 edit : .. //depot/projects/arm/src/sys/arm/s3c2xx0/s3c24x0_nand.c#1 add : : Differences ... : : ==== //depot/projects/arm/src/sys/arm/s3c2xx0/files.s3c2xx0#3 (text+ko) ==== : : @@ -4,6 +4,7 @@ : arm/s3c2xx0/s3c2410.c standard : arm/s3c2xx0/s3c2xx0_space.c standard : arm/s3c2xx0/s3c24x0_clk.c standard : +arm/s3c2xx0/s3c24x0_nand.c optional nand : arm/s3c2xx0/uart_bus_s3c2410.c optional uart : arm/s3c2xx0/uart_cpu_s3c2410.c optional uart : arm/s3c2xx0/uart_dev_s3c2410.c optional uart : : ==== //depot/projects/arm/src/sys/arm/s3c2xx0/s3c2410.c#7 (text+ko) ==== : : @@ -200,6 +200,7 @@ : rman_manage_region(&s3c2xx0_softc->s3c2xx0_rman, 0, 32) != 0) : panic("s3c2410_attach: failed to set up rman"); : device_add_child(dev, "timer", 0); : + device_add_child(dev, "nand", 0); : bus_generic_probe(dev); : bus_generic_attach(dev); : : : ==== //depot/projects/arm/src/sys/arm/s3c2xx0/s3c2410reg.h#2 (text+ko) ==== : : @@ -141,10 +141,17 @@ : : /* NAND Flash controller */ : #define NANDFC_NFCONF 0x00 /* Configuration */ : +#define NFCONF_ENABLE (1<<15) /* NAND controller enabled */ : +#define NFCONF_ECC (1<<12) /* Initialize ECC decoder/encoder */ : +#define NFCONF_FCE (1<<11) /* Flash chip enabled */ : +#define NFCONF_TACLS (7<<8) /* CLE and ALE duration */ : +#define NFCONF_TWRPH0 (7<<4) /* TWRPH0 duration */ : +#define NFCONF_TWRPH1 (7<<0) /* TWRPH1 duration */ : #define NANDFC_NFCMD 0x04 /* command */ : #define NANDFC_NFADDR 0x08 /* address */ : #define NANDFC_NFDATA 0x0c /* data */ : #define NANDFC_NFSTAT 0x10 /* operation status */ : +#define NFSTAT_READY (1<<0) /* NAND flash memory ready/busy status */ : #define NANDFC_NFECC 0x14 /* ecc */ : : /* GPIO */ : From owner-p4-projects@FreeBSD.ORG Thu Jan 3 17:23:55 2008 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id A799F16A468; Thu, 3 Jan 2008 17:23:55 +0000 (UTC) Delivered-To: perforce@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 6D22616A419 for ; Thu, 3 Jan 2008 17:23:55 +0000 (UTC) (envelope-from swise@FreeBSD.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id 456A013C458 for ; Thu, 3 Jan 2008 17:23:55 +0000 (UTC) (envelope-from swise@FreeBSD.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.1/8.14.1) with ESMTP id m03HNtCE024098 for ; Thu, 3 Jan 2008 17:23:55 GMT (envelope-from swise@FreeBSD.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.1/8.14.1/Submit) id m03HNteT024093 for perforce@freebsd.org; Thu, 3 Jan 2008 17:23:55 GMT (envelope-from swise@FreeBSD.org) Date: Thu, 3 Jan 2008 17:23:55 GMT Message-Id: <200801031723.m03HNteT024093@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to swise@FreeBSD.org using -f From: Steve Wise To: Perforce Change Reviews Cc: Subject: PERFORCE change 132408 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 03 Jan 2008 17:23:55 -0000 http://perforce.freebsd.org/chv.cgi?CH=132408 Change 132408 by swise@swise:vic10:iwarp on 2008/01/03 17:23:11 Print out firmware version. Affected files ... .. //depot/projects/iwarp/sys/dev/cxgb/cxgb_main.c#8 edit Differences ... ==== //depot/projects/iwarp/sys/dev/cxgb/cxgb_main.c#8 (text+ko) ==== @@ -630,6 +630,7 @@ snprintf(&sc->fw_version[0], sizeof(sc->fw_version), "%d.%d.%d", G_FW_VERSION_MAJOR(vers), G_FW_VERSION_MINOR(vers), G_FW_VERSION_MICRO(vers)); + device_printf("Firmware Version %s\n", &sc->fw_version[0]); t3_add_attach_sysctls(sc); out: From owner-p4-projects@FreeBSD.ORG Thu Jan 3 17:23:56 2008 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 6A8AD16A52B; Thu, 3 Jan 2008 17:23:55 +0000 (UTC) Delivered-To: perforce@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 7C7F416A420 for ; Thu, 3 Jan 2008 17:23:55 +0000 (UTC) (envelope-from imp@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id 6D99513C4CC for ; Thu, 3 Jan 2008 17:23:55 +0000 (UTC) (envelope-from imp@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.1/8.14.1) with ESMTP id m03HNtte024105 for ; Thu, 3 Jan 2008 17:23:55 GMT (envelope-from imp@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.1/8.14.1/Submit) id m03HNtl2024102 for perforce@freebsd.org; Thu, 3 Jan 2008 17:23:55 GMT (envelope-from imp@freebsd.org) Date: Thu, 3 Jan 2008 17:23:55 GMT Message-Id: <200801031723.m03HNtl2024102@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to imp@freebsd.org using -f From: Warner Losh To: Perforce Change Reviews Cc: Subject: PERFORCE change 132409 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 03 Jan 2008 17:23:56 -0000 http://perforce.freebsd.org/chv.cgi?CH=132409 Change 132409 by imp@imp_paco-paco on 2008/01/03 17:23:28 Make this compile at least. Note: we'll likely have to investigate different cache_xxx.S files for different CPUs in the future. Affected files ... .. //depot/projects/mips2-jnpr/src/sys/mips/mips/cache.S#4 edit Differences ... ==== //depot/projects/mips2-jnpr/src/sys/mips/mips/cache.S#4 (text+ko) ==== @@ -35,6 +35,7 @@ */ #include #include +#include #include #include "assym.s" @@ -74,6 +75,8 @@ #define HitWB_S 0x1b +#define InvalidateSecondaryPage 0x17 /* Only RM527[0-1] */ + /* * RM7000 config register bits. */ From owner-p4-projects@FreeBSD.ORG Thu Jan 3 17:24:57 2008 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 1D39716A419; Thu, 3 Jan 2008 17:24:57 +0000 (UTC) Delivered-To: perforce@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id BE83216A417 for ; Thu, 3 Jan 2008 17:24:56 +0000 (UTC) (envelope-from swise@FreeBSD.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id AE7C913C447 for ; Thu, 3 Jan 2008 17:24:56 +0000 (UTC) (envelope-from swise@FreeBSD.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.1/8.14.1) with ESMTP id m03HOuWC025080 for ; Thu, 3 Jan 2008 17:24:56 GMT (envelope-from swise@FreeBSD.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.1/8.14.1/Submit) id m03HOukw025075 for perforce@freebsd.org; Thu, 3 Jan 2008 17:24:56 GMT (envelope-from swise@FreeBSD.org) Date: Thu, 3 Jan 2008 17:24:56 GMT Message-Id: <200801031724.m03HOukw025075@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to swise@FreeBSD.org using -f From: Steve Wise To: Perforce Change Reviews Cc: Subject: PERFORCE change 132410 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 03 Jan 2008 17:24:57 -0000 http://perforce.freebsd.org/chv.cgi?CH=132410 Change 132410 by swise@swise:vic10:iwarp on 2008/01/03 17:24:40 iwcm: don't use condvars Since the upcalls from the driver can be on the interrupt level, we need to use msleep/wakeup for synchronization in the iwcm. Affected files ... .. //depot/projects/iwarp/sys/contrib/rdma/rdma_iwcm.c#7 edit Differences ... ==== //depot/projects/iwarp/sys/contrib/rdma/rdma_iwcm.c#7 (text+ko) ==== @@ -39,8 +39,8 @@ #include #include -#include #include +#include #include #include #include @@ -79,8 +79,8 @@ enum iw_cm_state state; unsigned long flags; struct ib_qp *qp; - struct cv destroy_comp; - struct cv connect_wait; + void * destroy_comp; + void * connect_wait; TAILQ_HEAD(, iwcm_work) work_list; struct mtx lock; atomic_t refcount; @@ -198,7 +198,7 @@ BUG_ON(atomic_read(&cm_id_priv->refcount)==0); if (atomic_dec_and_test(&cm_id_priv->refcount)) { BUG_ON(!TAILQ_EMPTY(&cm_id_priv->work_list)); - cv_broadcast(&cm_id_priv->destroy_comp); + wakeup(&cm_id_priv->destroy_comp); mtx_unlock_spin(&cm_id_priv->lock); return 1; } @@ -249,8 +249,6 @@ cm_id_priv->id.rem_ref = rem_ref; mtx_init(&cm_id_priv->lock, "cm_id_priv", NULL, MTX_DUPOK|MTX_SPIN); atomic_set(&cm_id_priv->refcount, 1); - cv_init(&cm_id_priv->connect_wait, "cm_id_priv connect_wait"); - cv_init(&cm_id_priv->destroy_comp, "cm_id_priv destroy_comp"); TAILQ_INIT(&cm_id_priv->work_list); TAILQ_INIT(&cm_id_priv->work_free_list); @@ -305,7 +303,7 @@ /* Wait if we're currently in a connect or accept downcall */ mtx_lock_spin(&cm_id_priv->lock); if (test_bit(IWCM_F_CONNECT_WAIT, &cm_id_priv->flags)) - cv_wait(&cm_id_priv->connect_wait, &cm_id_priv->lock); + msleep_spin(&cm_id_priv->connect_wait, &cm_id_priv->lock, "iwcm connect1", 0); switch (cm_id_priv->state) { case IW_CM_STATE_ESTABLISHED: @@ -373,7 +371,7 @@ */ mtx_lock_spin(&cm_id_priv->lock); if (test_bit(IWCM_F_CONNECT_WAIT, &cm_id_priv->flags)) - cv_wait(&cm_id_priv->connect_wait, &cm_id_priv->lock); + msleep_spin(&cm_id_priv->connect_wait, &cm_id_priv->lock, "iwcm connect2", 0); switch (cm_id_priv->state) { case IW_CM_STATE_LISTEN: @@ -435,7 +433,7 @@ mtx_lock_spin(&cm_id_priv->lock); if (atomic_read(&cm_id_priv->refcount)) - cv_wait(&cm_id_priv->destroy_comp, &cm_id_priv->lock); + msleep_spin(&cm_id_priv->destroy_comp, &cm_id_priv->lock, "iwcm destroy", 0); mtx_unlock_spin(&cm_id_priv->lock); free_cm_id(cm_id_priv); @@ -496,7 +494,7 @@ mtx_lock_spin(&cm_id_priv->lock); if (cm_id_priv->state != IW_CM_STATE_CONN_RECV) { clear_bit(IWCM_F_CONNECT_WAIT, &cm_id_priv->flags); - cv_broadcast(&cm_id_priv->connect_wait); + wakeup(&cm_id_priv->connect_wait); mtx_unlock_spin(&cm_id_priv->lock); return (EINVAL); } @@ -508,7 +506,7 @@ mtx_lock_spin(&cm_id_priv->lock); clear_bit(IWCM_F_CONNECT_WAIT, &cm_id_priv->flags); - cv_broadcast(&cm_id_priv->connect_wait); + wakeup(&cm_id_priv->connect_wait); mtx_unlock_spin(&cm_id_priv->lock); return ret; @@ -535,7 +533,7 @@ mtx_lock_spin(&cm_id_priv->lock); if (cm_id_priv->state != IW_CM_STATE_CONN_RECV) { clear_bit(IWCM_F_CONNECT_WAIT, &cm_id_priv->flags); - cv_broadcast(&cm_id_priv->connect_wait); + wakeup(&cm_id_priv->connect_wait); mtx_unlock_spin(&cm_id_priv->lock); return (EINVAL); @@ -561,7 +559,7 @@ cm_id_priv->qp = NULL; } clear_bit(IWCM_F_CONNECT_WAIT, &cm_id_priv->flags); - cv_broadcast(&cm_id_priv->connect_wait); + wakeup(&cm_id_priv->connect_wait); mtx_unlock_spin(&cm_id_priv->lock); } @@ -593,7 +591,7 @@ if (cm_id_priv->state != IW_CM_STATE_IDLE) { clear_bit(IWCM_F_CONNECT_WAIT, &cm_id_priv->flags); - cv_broadcast(&cm_id_priv->connect_wait); + wakeup(&cm_id_priv->connect_wait); mtx_unlock_spin(&cm_id_priv->lock); return (EINVAL); @@ -620,7 +618,7 @@ BUG_ON(cm_id_priv->state != IW_CM_STATE_CONN_SENT); cm_id_priv->state = IW_CM_STATE_IDLE; clear_bit(IWCM_F_CONNECT_WAIT, &cm_id_priv->flags); - cv_broadcast(&cm_id_priv->connect_wait); + wakeup(&cm_id_priv->connect_wait); mtx_unlock_spin(&cm_id_priv->lock); } @@ -732,7 +730,7 @@ BUG_ON(cm_id_priv->state != IW_CM_STATE_CONN_RECV); cm_id_priv->state = IW_CM_STATE_ESTABLISHED; ret = cm_id_priv->id.cm_handler(&cm_id_priv->id, iw_event); - cv_broadcast(&cm_id_priv->connect_wait); + wakeup(&cm_id_priv->connect_wait); mtx_unlock_spin(&cm_id_priv->lock); return ret; @@ -775,7 +773,7 @@ free(iw_event->private_data, M_DEVBUF); /* Wake up waiters on connect complete */ - cv_broadcast(&cm_id_priv->connect_wait); + wakeup(&cm_id_priv->connect_wait); mtx_unlock_spin(&cm_id_priv->lock); return ret; From owner-p4-projects@FreeBSD.ORG Thu Jan 3 17:25:58 2008 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 557B216A41A; Thu, 3 Jan 2008 17:25:58 +0000 (UTC) Delivered-To: perforce@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 1A9E016A41B for ; Thu, 3 Jan 2008 17:25:58 +0000 (UTC) (envelope-from swise@FreeBSD.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id 0B8F613C4DD for ; Thu, 3 Jan 2008 17:25:58 +0000 (UTC) (envelope-from swise@FreeBSD.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.1/8.14.1) with ESMTP id m03HPvSU025530 for ; Thu, 3 Jan 2008 17:25:57 GMT (envelope-from swise@FreeBSD.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.1/8.14.1/Submit) id m03HPvbK025527 for perforce@freebsd.org; Thu, 3 Jan 2008 17:25:57 GMT (envelope-from swise@FreeBSD.org) Date: Thu, 3 Jan 2008 17:25:57 GMT Message-Id: <200801031725.m03HPvbK025527@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to swise@FreeBSD.org using -f From: Steve Wise To: Perforce Change Reviews Cc: Subject: PERFORCE change 132411 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 03 Jan 2008 17:25:58 -0000 http://perforce.freebsd.org/chv.cgi?CH=132411 Change 132411 by swise@swise:vic10:iwarp on 2008/01/03 17:25:40 Add async notification support in if_cxgb. Affected files ... .. //depot/projects/iwarp/sys/dev/cxgb/cxgb_adapter.h#9 edit .. //depot/projects/iwarp/sys/dev/cxgb/cxgb_sge.c#6 edit Differences ... ==== //depot/projects/iwarp/sys/dev/cxgb/cxgb_adapter.h#9 (text+ko) ==== @@ -120,8 +120,8 @@ uint8_t port_id; uint8_t tx_chan; uint8_t txpkt_intf; + uint8_t nqsets; uint8_t first_qset; - uint32_t nqsets; uint8_t hw_addr[ETHER_ADDR_LEN]; struct taskqueue *tq; @@ -196,6 +196,7 @@ uint32_t holdoff_tmr; uint32_t next_holdoff; uint32_t imm_data; + uint32_t async_notif; struct rsp_desc *desc; uint32_t cntxt_id; struct mtx lock; ==== //depot/projects/iwarp/sys/dev/cxgb/cxgb_sge.c#6 (text+ko) ==== @@ -2749,15 +2749,37 @@ eth = (r->rss_hdr.opcode == CPL_RX_PKT); if (__predict_false(flags & F_RSPD_ASYNC_NOTIF)) { - /* XXX */ - printf("async notification\n"); + struct mbuf *m; + + if (cxgb_debug) + printf("async notification\n"); + + if (rspq->rspq_mbuf == NULL) { + rspq->rspq_mbuf = m_gethdr(M_DONTWAIT, MT_DATA); + m = rspq->rspq_mbuf; + } else { + m = m_gethdr(M_DONTWAIT, MT_DATA); + } + + /* XXX m is lost here if rspq->rspq_mbuf is not NULL */ + + if (m == NULL) + goto no_mem; + memcpy(mtod(m, char *), r, AN_PKT_SIZE); + m->m_len = m->m_pkthdr.len = AN_PKT_SIZE; + *mtod(m, char *) = CPL_ASYNC_NOTIF; + rss_csum = htonl(CPL_ASYNC_NOTIF << 24); + eop = 1; + rspq->async_notif++; + goto skip; } else if (flags & F_RSPD_IMM_DATA_VALID) { #ifdef DISABLE_MBUF_IOVEC if (cxgb_debug) printf("IMM DATA VALID opcode=0x%x rspq->cidx=%d\n", r->rss_hdr.opcode, rspq->cidx); if(get_imm_packet(adap, r, &rspq->rspq_mh) == 0) { + no_mem: rspq->next_holdoff = NOMEM_INTR_DELAY; budget_left--; break; @@ -2777,6 +2799,7 @@ * XXX revisit me */ if (rspq->rspq_mbuf == NULL && m == NULL) { + no_mem: rspq->next_holdoff = NOMEM_INTR_DELAY; budget_left--; break; @@ -2788,7 +2811,7 @@ goto skip; #endif - } else if (r->len_cq) { + } else if (r->len_cq) { int drop_thresh = eth ? SGE_RX_DROP_THRES : 0; #ifdef DISABLE_MBUF_IOVEC From owner-p4-projects@FreeBSD.ORG Thu Jan 3 17:26:59 2008 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 8B59416A46B; Thu, 3 Jan 2008 17:26:59 +0000 (UTC) Delivered-To: perforce@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 512B516A417 for ; Thu, 3 Jan 2008 17:26:59 +0000 (UTC) (envelope-from imp@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id 41D8E13C44B for ; Thu, 3 Jan 2008 17:26:59 +0000 (UTC) (envelope-from imp@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.1/8.14.1) with ESMTP id m03HQxjS025552 for ; Thu, 3 Jan 2008 17:26:59 GMT (envelope-from imp@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.1/8.14.1/Submit) id m03HQxYq025549 for perforce@freebsd.org; Thu, 3 Jan 2008 17:26:59 GMT (envelope-from imp@freebsd.org) Date: Thu, 3 Jan 2008 17:26:59 GMT Message-Id: <200801031726.m03HQxYq025549@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to imp@freebsd.org using -f From: Warner Losh To: Perforce Change Reviews Cc: Subject: PERFORCE change 132412 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 03 Jan 2008 17:26:59 -0000 http://perforce.freebsd.org/chv.cgi?CH=132412 Change 132412 by imp@imp_paco-paco on 2008/01/03 17:26:15 asm and volatile need __ in front. Affected files ... .. //depot/projects/mips2-jnpr/src/sys/mips/mips/mips_subr.c#3 edit Differences ... ==== //depot/projects/mips2-jnpr/src/sys/mips/mips/mips_subr.c#3 (text+ko) ==== @@ -9,14 +9,14 @@ mips_setwatchlo(u_int32_t watchlo) { - asm volatile ("mtc0 %0, $18, 0" : : "r" (watchlo)); + __asm __volatile ("mtc0 %0, $18, 0" : : "r" (watchlo)); } static void mips_setwatchhi(u_int32_t watchhi) { - asm volatile ("mtc0 %0, $19, 0" : : "r" (watchhi)); + __asm __volatile ("mtc0 %0, $19, 0" : : "r" (watchhi)); } From owner-p4-projects@FreeBSD.ORG Thu Jan 3 17:29:02 2008 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 2426016A469; Thu, 3 Jan 2008 17:29:02 +0000 (UTC) Delivered-To: perforce@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id DDB5F16A41B for ; Thu, 3 Jan 2008 17:29:01 +0000 (UTC) (envelope-from imp@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id CEF1013C465 for ; Thu, 3 Jan 2008 17:29:01 +0000 (UTC) (envelope-from imp@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.1/8.14.1) with ESMTP id m03HT1Z1025620 for ; Thu, 3 Jan 2008 17:29:01 GMT (envelope-from imp@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.1/8.14.1/Submit) id m03HT1aS025617 for perforce@freebsd.org; Thu, 3 Jan 2008 17:29:01 GMT (envelope-from imp@freebsd.org) Date: Thu, 3 Jan 2008 17:29:01 GMT Message-Id: <200801031729.m03HT1aS025617@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to imp@freebsd.org using -f From: Warner Losh To: Perforce Change Reviews Cc: Subject: PERFORCE change 132413 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 03 Jan 2008 17:29:02 -0000 http://perforce.freebsd.org/chv.cgi?CH=132413 Change 132413 by imp@imp_paco-paco on 2008/01/03 17:28:26 Fix silly compiler errors. Affected files ... .. //depot/projects/mips2-jnpr/src/sys/mips/drivers/sio/ns16550.c#2 edit .. //depot/projects/mips2-jnpr/src/sys/mips/include/ns16550.h#3 edit Differences ... ==== //depot/projects/mips2-jnpr/src/sys/mips/drivers/sio/ns16550.c#2 (text+ko) ==== @@ -15,7 +15,7 @@ */ #include -__FBSD("$FreeBSD$"); +__FBSDID("$FreeBSD$"); #include #include ==== //depot/projects/mips2-jnpr/src/sys/mips/include/ns16550.h#3 (text+ko) ==== @@ -168,7 +168,7 @@ #define com_efr com_fifo -#define NS16550_SYNC asm volatile ("sync") +#define NS16550_SYNC __asm __volatile ("sync") #define NS16550_DEVICE (1<<0) From owner-p4-projects@FreeBSD.ORG Thu Jan 3 18:27:04 2008 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id F0CA216A419; Thu, 3 Jan 2008 18:27:03 +0000 (UTC) Delivered-To: perforce@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id B631B16A420 for ; Thu, 3 Jan 2008 18:27:03 +0000 (UTC) (envelope-from swise@FreeBSD.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id 8E82A13C442 for ; Thu, 3 Jan 2008 18:27:03 +0000 (UTC) (envelope-from swise@FreeBSD.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.1/8.14.1) with ESMTP id m03IR3YS049155 for ; Thu, 3 Jan 2008 18:27:03 GMT (envelope-from swise@FreeBSD.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.1/8.14.1/Submit) id m03IR3qU049152 for perforce@freebsd.org; Thu, 3 Jan 2008 18:27:03 GMT (envelope-from swise@FreeBSD.org) Date: Thu, 3 Jan 2008 18:27:03 GMT Message-Id: <200801031827.m03IR3qU049152@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to swise@FreeBSD.org using -f From: Steve Wise To: Perforce Change Reviews Cc: Subject: PERFORCE change 132415 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 03 Jan 2008 18:27:04 -0000 http://perforce.freebsd.org/chv.cgi?CH=132415 Change 132415 by swise@swise:vic10:iwarp on 2008/01/03 18:26:59 Fix build break. Affected files ... .. //depot/projects/iwarp/sys/dev/cxgb/cxgb_main.c#9 edit Differences ... ==== //depot/projects/iwarp/sys/dev/cxgb/cxgb_main.c#9 (text+ko) ==== @@ -630,7 +630,7 @@ snprintf(&sc->fw_version[0], sizeof(sc->fw_version), "%d.%d.%d", G_FW_VERSION_MAJOR(vers), G_FW_VERSION_MINOR(vers), G_FW_VERSION_MICRO(vers)); - device_printf("Firmware Version %s\n", &sc->fw_version[0]); + device_printf(sc->dev, "Firmware Version %s\n", &sc->fw_version[0]); t3_add_attach_sysctls(sc); out: From owner-p4-projects@FreeBSD.ORG Thu Jan 3 20:05:20 2008 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 3BCBC16A54C; Thu, 3 Jan 2008 20:05:20 +0000 (UTC) Delivered-To: perforce@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id C9ED416A53F for ; Thu, 3 Jan 2008 20:05:19 +0000 (UTC) (envelope-from andrew@fubar.geek.nz) Received: from fep01.xtra.co.nz (fep01.xtra.co.nz [210.54.141.245]) by mx1.freebsd.org (Postfix) with ESMTP id 6722F13C44B for ; Thu, 3 Jan 2008 20:05:19 +0000 (UTC) (envelope-from andrew@fubar.geek.nz) Received: from mta04.xtra.co.nz ([172.23.11.41]) by fep01.xtra.co.nz with ESMTP id <20080103195402.WWHN24338.fep01.xtra.co.nz@mta04.xtra.co.nz>; Fri, 4 Jan 2008 08:54:02 +1300 Received: from fep05.xtra.co.nz ([172.23.12.51]) by mta04.xtra.co.nz with ESMTP id <20080103195402.RDKL28381.mta04.xtra.co.nz@fep05.xtra.co.nz>; Fri, 4 Jan 2008 08:54:02 +1300 Received: from serv.int.fubar.geek.nz ([219.89.107.40]) by fep05.xtra.co.nz with ESMTP id <20080103195402.FLVI9910.fep05.xtra.co.nz@serv.int.fubar.geek.nz>; Fri, 4 Jan 2008 08:54:02 +1300 Date: Fri, 4 Jan 2008 08:54:01 +1300 From: Andrew Turner To: "M. Warner Losh" Message-ID: <20080104085401.35caffac@hermies.int.fubar.geek.nz> In-Reply-To: <20080103.095534.-1820226863.imp@bsdimp.com> References: <200801031015.m03AFSNS026302@repoman.freebsd.org> <20080103.095534.-1820226863.imp@bsdimp.com> X-Mailer: Claws Mail 3.0.2 (GTK+ 2.12.3; i386-portbld-freebsd7.0) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Cc: perforce@freebsd.org Subject: Re: PERFORCE change 132385 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 03 Jan 2008 20:05:20 -0000 On Thu, 03 Jan 2008 09:55:34 -0700 (MST) "M. Warner Losh" wrote: > In message: <200801031015.m03AFSNS026302@repoman.freebsd.org> > Andrew Turner writes: > : http://perforce.freebsd.org/chv.cgi?CH=132385 > : > : Change 132385 by andrew@andrew_hermies on 2008/01/03 10:15:21 > : > : Add the start of a NAND driver based on one written by John > Birrell (jb@) > > You better make sure that you can use it. At timing solutions, we > were told not to distribute it without telling John Birrell first and > getting his permission. There was some problem with the code he > wanted to get corrected. Not sure if it was technical or political or > license, but he did ask us not to distribute it. John Hein should not > have published it. John Hein got an all green message after checking with John Birrell. I also got permission to use FreeBSD license with the driver. > > Also, the driver needs to be split into a machine specific NAND > "bridge" part and a nand protocol part. We need similar things for > NOR memory and a few others. I am planning on splitting it out. I want to get something working and in version control first. Andrew From owner-p4-projects@FreeBSD.ORG Thu Jan 3 20:08:13 2008 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 4338B16A419; Thu, 3 Jan 2008 20:08:13 +0000 (UTC) Delivered-To: perforce@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 0691416A421 for ; Thu, 3 Jan 2008 20:08:13 +0000 (UTC) (envelope-from evilpete@gmail.com) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id E9A5813C4D1 for ; Thu, 3 Jan 2008 20:08:12 +0000 (UTC) (envelope-from evilpete@gmail.com) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.1/8.14.1) with ESMTP id m03K8CVT096432 for ; Thu, 3 Jan 2008 20:08:12 GMT (envelope-from evilpete@gmail.com) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.1/8.14.1/Submit) id m03K86Ag096416 for perforce@freebsd.org; Thu, 3 Jan 2008 20:08:06 GMT (envelope-from evilpete@gmail.com) Date: Thu, 3 Jan 2008 20:08:06 GMT Message-Id: <200801032008.m03K86Ag096416@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to evilpete@gmail.com using -f From: Peter Wemm To: Perforce Change Reviews Cc: Subject: PERFORCE change 132421 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 03 Jan 2008 20:08:13 -0000 http://perforce.freebsd.org/chv.cgi?CH=132421 Change 132421 by peter@peter_daintree on 2008/01/03 20:07:38 IFC @132419 Affected files ... .. //depot/projects/hammer/COPYRIGHT#6 integrate .. //depot/projects/hammer/contrib/cvs/src/filesubr.c#6 integrate .. //depot/projects/hammer/contrib/ncurses/FREEBSD-upgrade#2 integrate .. //depot/projects/hammer/contrib/ncurses/INSTALL#3 integrate .. //depot/projects/hammer/contrib/ncurses/MANIFEST#3 integrate .. //depot/projects/hammer/contrib/ncurses/NEWS#3 integrate .. //depot/projects/hammer/contrib/ncurses/TO-DO#3 integrate .. //depot/projects/hammer/contrib/ncurses/aclocal.m4#3 integrate .. //depot/projects/hammer/contrib/ncurses/config.guess#3 integrate .. //depot/projects/hammer/contrib/ncurses/config.sub#3 integrate .. //depot/projects/hammer/contrib/ncurses/configure#3 integrate .. //depot/projects/hammer/contrib/ncurses/configure.in#3 integrate .. //depot/projects/hammer/contrib/ncurses/dist.mk#3 integrate .. //depot/projects/hammer/contrib/ncurses/doc/hackguide.doc#3 integrate .. //depot/projects/hammer/contrib/ncurses/doc/html/ncurses-intro.html#3 integrate .. //depot/projects/hammer/contrib/ncurses/doc/ncurses-intro.doc#3 integrate .. //depot/projects/hammer/contrib/ncurses/form/Makefile.in#3 integrate .. //depot/projects/hammer/contrib/ncurses/form/fld_def.c#3 integrate .. //depot/projects/hammer/contrib/ncurses/form/fld_dup.c#3 integrate .. //depot/projects/hammer/contrib/ncurses/form/fld_ftlink.c#3 integrate .. //depot/projects/hammer/contrib/ncurses/form/fld_link.c#3 integrate .. //depot/projects/hammer/contrib/ncurses/form/fld_newftyp.c#3 integrate .. //depot/projects/hammer/contrib/ncurses/form/frm_def.c#3 integrate .. //depot/projects/hammer/contrib/ncurses/form/frm_driver.c#3 integrate .. //depot/projects/hammer/contrib/ncurses/form/fty_alnum.c#3 integrate .. //depot/projects/hammer/contrib/ncurses/form/fty_alpha.c#3 integrate .. //depot/projects/hammer/contrib/ncurses/form/fty_enum.c#3 integrate .. //depot/projects/hammer/contrib/ncurses/form/fty_int.c#3 integrate .. //depot/projects/hammer/contrib/ncurses/form/fty_num.c#3 integrate .. //depot/projects/hammer/contrib/ncurses/form/fty_regex.c#3 integrate .. //depot/projects/hammer/contrib/ncurses/form/headers#2 integrate .. //depot/projects/hammer/contrib/ncurses/form/modules#3 integrate .. //depot/projects/hammer/contrib/ncurses/include/MKterm.h.awk.in#3 integrate .. //depot/projects/hammer/contrib/ncurses/include/curses.h.in#3 integrate .. //depot/projects/hammer/contrib/ncurses/include/curses.tail#3 integrate .. //depot/projects/hammer/contrib/ncurses/include/curses.wide#3 integrate .. //depot/projects/hammer/contrib/ncurses/include/headers#2 integrate .. //depot/projects/hammer/contrib/ncurses/include/nc_alloc.h#3 integrate .. //depot/projects/hammer/contrib/ncurses/include/ncurses_defs#3 integrate .. //depot/projects/hammer/contrib/ncurses/include/ncurses_dll.h#3 integrate .. //depot/projects/hammer/contrib/ncurses/include/tic.h#3 integrate .. //depot/projects/hammer/contrib/ncurses/install-sh#3 integrate .. //depot/projects/hammer/contrib/ncurses/man/Makefile.in#3 integrate .. //depot/projects/hammer/contrib/ncurses/man/captoinfo.1m#3 integrate .. //depot/projects/hammer/contrib/ncurses/man/clear.1#3 integrate .. //depot/projects/hammer/contrib/ncurses/man/curs_add_wch.3x#3 integrate .. //depot/projects/hammer/contrib/ncurses/man/curs_addch.3x#3 integrate .. //depot/projects/hammer/contrib/ncurses/man/curs_attr.3x#3 integrate .. //depot/projects/hammer/contrib/ncurses/man/curs_border.3x#3 integrate .. //depot/projects/hammer/contrib/ncurses/man/curs_deleteln.3x#3 integrate .. //depot/projects/hammer/contrib/ncurses/man/curs_extend.3x#3 integrate .. //depot/projects/hammer/contrib/ncurses/man/curs_getcchar.3x#3 integrate .. //depot/projects/hammer/contrib/ncurses/man/curs_getyx.3x#3 integrate .. //depot/projects/hammer/contrib/ncurses/man/curs_insstr.3x#3 integrate .. //depot/projects/hammer/contrib/ncurses/man/curs_legacy.3x#1 branch .. //depot/projects/hammer/contrib/ncurses/man/curs_mouse.3x#3 integrate .. //depot/projects/hammer/contrib/ncurses/man/curs_opaque.3x#1 branch .. //depot/projects/hammer/contrib/ncurses/man/curs_outopts.3x#3 integrate .. //depot/projects/hammer/contrib/ncurses/man/curs_printw.3x#3 integrate .. //depot/projects/hammer/contrib/ncurses/man/curs_scanw.3x#3 integrate .. //depot/projects/hammer/contrib/ncurses/man/curs_scr_dump.3x#3 integrate .. //depot/projects/hammer/contrib/ncurses/man/curs_slk.3x#3 integrate .. //depot/projects/hammer/contrib/ncurses/man/curs_termattrs.3x#3 integrate .. //depot/projects/hammer/contrib/ncurses/man/curs_termcap.3x#3 integrate .. //depot/projects/hammer/contrib/ncurses/man/curs_terminfo.3x#3 integrate .. //depot/projects/hammer/contrib/ncurses/man/curs_trace.3x#3 integrate .. //depot/projects/hammer/contrib/ncurses/man/curs_util.3x#3 integrate .. //depot/projects/hammer/contrib/ncurses/man/default_colors.3x#3 integrate .. //depot/projects/hammer/contrib/ncurses/man/form_driver.3x#3 integrate .. //depot/projects/hammer/contrib/ncurses/man/form_field_new.3x#3 integrate .. //depot/projects/hammer/contrib/ncurses/man/form_field_opts.3x#3 integrate .. //depot/projects/hammer/contrib/ncurses/man/form_field_validation.3x#3 integrate .. //depot/projects/hammer/contrib/ncurses/man/form_hook.3x#3 integrate .. //depot/projects/hammer/contrib/ncurses/man/form_opts.3x#3 integrate .. //depot/projects/hammer/contrib/ncurses/man/infocmp.1m#3 integrate .. //depot/projects/hammer/contrib/ncurses/man/infotocap.1m#3 integrate .. //depot/projects/hammer/contrib/ncurses/man/legacy_coding.3x#2 integrate .. //depot/projects/hammer/contrib/ncurses/man/man_db.renames#3 integrate .. //depot/projects/hammer/contrib/ncurses/man/menu_driver.3x#3 integrate .. //depot/projects/hammer/contrib/ncurses/man/menu_hook.3x#3 integrate .. //depot/projects/hammer/contrib/ncurses/man/menu_opts.3x#3 integrate .. //depot/projects/hammer/contrib/ncurses/man/mitem_opts.3x#3 integrate .. //depot/projects/hammer/contrib/ncurses/man/ncurses.3x#3 integrate .. //depot/projects/hammer/contrib/ncurses/man/panel.3x#3 integrate .. //depot/projects/hammer/contrib/ncurses/man/term.5#3 integrate .. //depot/projects/hammer/contrib/ncurses/man/term.7#3 integrate .. //depot/projects/hammer/contrib/ncurses/man/terminfo.head#3 integrate .. //depot/projects/hammer/contrib/ncurses/man/terminfo.tail#3 integrate .. //depot/projects/hammer/contrib/ncurses/man/tic.1m#3 integrate .. //depot/projects/hammer/contrib/ncurses/man/toe.1m#3 integrate .. //depot/projects/hammer/contrib/ncurses/man/tput.1#3 integrate .. //depot/projects/hammer/contrib/ncurses/man/tset.1#3 integrate .. //depot/projects/hammer/contrib/ncurses/menu/Makefile.in#3 integrate .. //depot/projects/hammer/contrib/ncurses/menu/headers#2 integrate .. //depot/projects/hammer/contrib/ncurses/menu/menu.h#3 integrate .. //depot/projects/hammer/contrib/ncurses/menu/modules#3 integrate .. //depot/projects/hammer/contrib/ncurses/misc/Makefile.in#3 integrate .. //depot/projects/hammer/contrib/ncurses/misc/ncurses-config.in#2 integrate .. //depot/projects/hammer/contrib/ncurses/misc/shlib#3 integrate .. //depot/projects/hammer/contrib/ncurses/misc/terminfo.src#3 integrate .. //depot/projects/hammer/contrib/ncurses/mk-1st.awk#3 integrate .. //depot/projects/hammer/contrib/ncurses/mk-hdr.awk#1 branch .. //depot/projects/hammer/contrib/ncurses/mkdirs.sh#1 branch .. //depot/projects/hammer/contrib/ncurses/mkinstalldirs#3 delete .. //depot/projects/hammer/contrib/ncurses/ncurses/Makefile.in#3 integrate .. //depot/projects/hammer/contrib/ncurses/ncurses/base/MKkeyname.awk#3 integrate .. //depot/projects/hammer/contrib/ncurses/ncurses/base/MKlib_gen.sh#3 integrate .. //depot/projects/hammer/contrib/ncurses/ncurses/base/MKunctrl.awk#3 integrate .. //depot/projects/hammer/contrib/ncurses/ncurses/base/define_key.c#3 integrate .. //depot/projects/hammer/contrib/ncurses/ncurses/base/key_defined.c#2 integrate .. //depot/projects/hammer/contrib/ncurses/ncurses/base/keyok.c#3 integrate .. //depot/projects/hammer/contrib/ncurses/ncurses/base/lib_addstr.c#3 integrate .. //depot/projects/hammer/contrib/ncurses/ncurses/base/lib_color.c#3 integrate .. //depot/projects/hammer/contrib/ncurses/ncurses/base/lib_delwin.c#2 integrate .. //depot/projects/hammer/contrib/ncurses/ncurses/base/lib_freeall.c#3 integrate .. //depot/projects/hammer/contrib/ncurses/ncurses/base/lib_getch.c#3 integrate .. //depot/projects/hammer/contrib/ncurses/ncurses/base/lib_initscr.c#3 integrate .. //depot/projects/hammer/contrib/ncurses/ncurses/base/lib_instr.c#3 integrate .. //depot/projects/hammer/contrib/ncurses/ncurses/base/lib_mouse.c#3 integrate .. //depot/projects/hammer/contrib/ncurses/ncurses/base/lib_newterm.c#3 integrate .. //depot/projects/hammer/contrib/ncurses/ncurses/base/lib_newwin.c#3 integrate .. //depot/projects/hammer/contrib/ncurses/ncurses/base/lib_overlay.c#3 integrate .. //depot/projects/hammer/contrib/ncurses/ncurses/base/lib_redrawln.c#3 integrate .. //depot/projects/hammer/contrib/ncurses/ncurses/base/lib_refresh.c#3 integrate .. //depot/projects/hammer/contrib/ncurses/ncurses/base/lib_restart.c#3 integrate .. //depot/projects/hammer/contrib/ncurses/ncurses/base/lib_screen.c#3 integrate .. //depot/projects/hammer/contrib/ncurses/ncurses/base/lib_set_term.c#3 integrate .. //depot/projects/hammer/contrib/ncurses/ncurses/base/lib_slkinit.c#2 integrate .. //depot/projects/hammer/contrib/ncurses/ncurses/base/lib_slkset.c#3 integrate .. //depot/projects/hammer/contrib/ncurses/ncurses/base/lib_ungetch.c#3 integrate .. //depot/projects/hammer/contrib/ncurses/ncurses/base/lib_window.c#3 integrate .. //depot/projects/hammer/contrib/ncurses/ncurses/base/memmove.c#2 integrate .. //depot/projects/hammer/contrib/ncurses/ncurses/base/resizeterm.c#3 integrate .. //depot/projects/hammer/contrib/ncurses/ncurses/base/safe_sprintf.c#3 integrate .. //depot/projects/hammer/contrib/ncurses/ncurses/base/tries.c#3 integrate .. //depot/projects/hammer/contrib/ncurses/ncurses/base/use_window.c#1 branch .. //depot/projects/hammer/contrib/ncurses/ncurses/base/wresize.c#3 integrate .. //depot/projects/hammer/contrib/ncurses/ncurses/curses.priv.h#4 integrate .. //depot/projects/hammer/contrib/ncurses/ncurses/llib-lncurses#3 integrate .. //depot/projects/hammer/contrib/ncurses/ncurses/llib-lncursesw#3 integrate .. //depot/projects/hammer/contrib/ncurses/ncurses/modules#3 integrate .. //depot/projects/hammer/contrib/ncurses/ncurses/tinfo/MKcaptab.awk#3 integrate .. //depot/projects/hammer/contrib/ncurses/ncurses/tinfo/MKcaptab.sh#1 branch .. //depot/projects/hammer/contrib/ncurses/ncurses/tinfo/MKcodes.awk#1 branch .. //depot/projects/hammer/contrib/ncurses/ncurses/tinfo/MKnames.awk#3 integrate .. //depot/projects/hammer/contrib/ncurses/ncurses/tinfo/access.c#3 integrate .. //depot/projects/hammer/contrib/ncurses/ncurses/tinfo/add_tries.c#3 integrate .. //depot/projects/hammer/contrib/ncurses/ncurses/tinfo/comp_error.c#3 integrate .. //depot/projects/hammer/contrib/ncurses/ncurses/tinfo/comp_hash.c#3 integrate .. //depot/projects/hammer/contrib/ncurses/ncurses/tinfo/comp_parse.c#4 integrate .. //depot/projects/hammer/contrib/ncurses/ncurses/tinfo/db_iterator.c#2 integrate .. //depot/projects/hammer/contrib/ncurses/ncurses/tinfo/entries.c#1 branch .. //depot/projects/hammer/contrib/ncurses/ncurses/tinfo/home_terminfo.c#3 integrate .. //depot/projects/hammer/contrib/ncurses/ncurses/tinfo/init_keytry.c#3 integrate .. //depot/projects/hammer/contrib/ncurses/ncurses/tinfo/lib_acs.c#3 integrate .. //depot/projects/hammer/contrib/ncurses/ncurses/tinfo/lib_baudrate.c#3 integrate .. //depot/projects/hammer/contrib/ncurses/ncurses/tinfo/lib_data.c#3 integrate .. //depot/projects/hammer/contrib/ncurses/ncurses/tinfo/lib_options.c#3 integrate .. //depot/projects/hammer/contrib/ncurses/ncurses/tinfo/lib_raw.c#3 integrate .. //depot/projects/hammer/contrib/ncurses/ncurses/tinfo/lib_setup.c#3 integrate .. //depot/projects/hammer/contrib/ncurses/ncurses/tinfo/lib_termcap.c#3 integrate .. //depot/projects/hammer/contrib/ncurses/ncurses/tinfo/lib_tparm.c#3 integrate .. //depot/projects/hammer/contrib/ncurses/ncurses/tinfo/lib_tputs.c#3 integrate .. //depot/projects/hammer/contrib/ncurses/ncurses/tinfo/lib_ttyflags.c#3 integrate .. //depot/projects/hammer/contrib/ncurses/ncurses/tinfo/make_keys.c#3 integrate .. //depot/projects/hammer/contrib/ncurses/ncurses/tinfo/name_match.c#3 integrate .. //depot/projects/hammer/contrib/ncurses/ncurses/tinfo/parse_entry.c#3 integrate .. //depot/projects/hammer/contrib/ncurses/ncurses/tinfo/read_entry.c#3 integrate .. //depot/projects/hammer/contrib/ncurses/ncurses/tinfo/setbuf.c#3 integrate .. //depot/projects/hammer/contrib/ncurses/ncurses/tinfo/strings.c#3 integrate .. //depot/projects/hammer/contrib/ncurses/ncurses/tinfo/trim_sgr0.c#2 integrate .. //depot/projects/hammer/contrib/ncurses/ncurses/tinfo/use_screen.c#1 branch .. //depot/projects/hammer/contrib/ncurses/ncurses/tinfo/write_entry.c#3 integrate .. //depot/projects/hammer/contrib/ncurses/ncurses/trace/lib_trace.c#3 integrate .. //depot/projects/hammer/contrib/ncurses/ncurses/trace/lib_traceatr.c#3 integrate .. //depot/projects/hammer/contrib/ncurses/ncurses/trace/lib_tracebits.c#3 integrate .. //depot/projects/hammer/contrib/ncurses/ncurses/trace/lib_tracechr.c#3 integrate .. //depot/projects/hammer/contrib/ncurses/ncurses/trace/lib_tracedmp.c#3 integrate .. //depot/projects/hammer/contrib/ncurses/ncurses/trace/lib_tracemse.c#3 integrate .. //depot/projects/hammer/contrib/ncurses/ncurses/trace/trace_buf.c#3 integrate .. //depot/projects/hammer/contrib/ncurses/ncurses/trace/trace_tries.c#2 integrate .. //depot/projects/hammer/contrib/ncurses/ncurses/trace/varargs.c#3 integrate .. //depot/projects/hammer/contrib/ncurses/ncurses/trace/visbuf.c#3 integrate .. //depot/projects/hammer/contrib/ncurses/ncurses/tty/hardscroll.c#2 integrate .. //depot/projects/hammer/contrib/ncurses/ncurses/tty/hashmap.c#3 integrate .. //depot/projects/hammer/contrib/ncurses/ncurses/tty/lib_mvcur.c#3 integrate .. //depot/projects/hammer/contrib/ncurses/ncurses/tty/lib_tstp.c#3 integrate .. //depot/projects/hammer/contrib/ncurses/ncurses/tty/lib_twait.c#3 integrate .. //depot/projects/hammer/contrib/ncurses/ncurses/tty/lib_vidattr.c#3 integrate .. //depot/projects/hammer/contrib/ncurses/ncurses/tty/tty_update.c#3 integrate .. //depot/projects/hammer/contrib/ncurses/ncurses/widechar/lib_cchar.c#3 integrate .. //depot/projects/hammer/contrib/ncurses/ncurses/widechar/lib_get_wch.c#3 integrate .. //depot/projects/hammer/contrib/ncurses/ncurses/widechar/lib_in_wchnstr.c#3 integrate .. //depot/projects/hammer/contrib/ncurses/ncurses/widechar/lib_key_name.c#1 branch .. //depot/projects/hammer/contrib/ncurses/ncurses/widechar/lib_unget_wch.c#3 integrate .. //depot/projects/hammer/contrib/ncurses/ncurses/widechar/lib_vid_attr.c#3 integrate .. //depot/projects/hammer/contrib/ncurses/ncurses/widechar/lib_wunctrl.c#3 integrate .. //depot/projects/hammer/contrib/ncurses/panel/Makefile.in#3 integrate .. //depot/projects/hammer/contrib/ncurses/panel/headers#2 integrate .. //depot/projects/hammer/contrib/ncurses/panel/modules#2 integrate .. //depot/projects/hammer/contrib/ncurses/progs/Makefile.in#3 integrate .. //depot/projects/hammer/contrib/ncurses/progs/clear.c#3 integrate .. //depot/projects/hammer/contrib/ncurses/progs/dump_entry.c#3 integrate .. //depot/projects/hammer/contrib/ncurses/progs/infocmp.c#3 integrate .. //depot/projects/hammer/contrib/ncurses/progs/modules#3 integrate .. //depot/projects/hammer/contrib/ncurses/progs/progs.priv.h#3 integrate .. //depot/projects/hammer/contrib/ncurses/progs/tic.c#3 integrate .. //depot/projects/hammer/contrib/ncurses/progs/toe.c#3 integrate .. //depot/projects/hammer/contrib/ncurses/progs/tput.c#3 integrate .. //depot/projects/hammer/contrib/ncurses/progs/tset.c#3 integrate .. //depot/projects/hammer/contrib/ncurses/tack/COPYING#3 delete .. //depot/projects/hammer/contrib/ncurses/tack/HISTORY#3 delete .. //depot/projects/hammer/contrib/ncurses/tack/Makefile.in#3 delete .. //depot/projects/hammer/contrib/ncurses/tack/README#2 delete .. //depot/projects/hammer/contrib/ncurses/tack/ansi.c#3 delete .. //depot/projects/hammer/contrib/ncurses/tack/charset.c#3 delete .. //depot/projects/hammer/contrib/ncurses/tack/color.c#3 delete .. //depot/projects/hammer/contrib/ncurses/tack/control.c#3 delete .. //depot/projects/hammer/contrib/ncurses/tack/crum.c#3 delete .. //depot/projects/hammer/contrib/ncurses/tack/edit.c#3 delete .. //depot/projects/hammer/contrib/ncurses/tack/fun.c#3 delete .. //depot/projects/hammer/contrib/ncurses/tack/init.c#3 delete .. //depot/projects/hammer/contrib/ncurses/tack/menu.c#3 delete .. //depot/projects/hammer/contrib/ncurses/tack/modes.c#3 delete .. //depot/projects/hammer/contrib/ncurses/tack/modules#3 delete .. //depot/projects/hammer/contrib/ncurses/tack/output.c#3 delete .. //depot/projects/hammer/contrib/ncurses/tack/pad.c#3 delete .. //depot/projects/hammer/contrib/ncurses/tack/scan.c#3 delete .. //depot/projects/hammer/contrib/ncurses/tack/sync.c#3 delete .. //depot/projects/hammer/contrib/ncurses/tack/sysdep.c#3 delete .. //depot/projects/hammer/contrib/ncurses/tack/tack.1#3 delete .. //depot/projects/hammer/contrib/ncurses/tack/tack.c#3 delete .. //depot/projects/hammer/contrib/ncurses/tack/tack.h#3 delete .. //depot/projects/hammer/games/fortune/datfiles/fortunes#75 integrate .. //depot/projects/hammer/games/fortune/datfiles/gerrold.limerick#3 integrate .. //depot/projects/hammer/lib/libarchive/Makefile#45 integrate .. //depot/projects/hammer/lib/libarchive/archive.h.in#21 integrate .. //depot/projects/hammer/lib/libarchive/archive_endian.h#1 branch .. //depot/projects/hammer/lib/libarchive/archive_entry.c#32 integrate .. //depot/projects/hammer/lib/libarchive/archive_entry.h#21 integrate .. //depot/projects/hammer/lib/libarchive/archive_entry_link_resolver.c#1 branch .. //depot/projects/hammer/lib/libarchive/archive_entry_private.h#2 integrate .. //depot/projects/hammer/lib/libarchive/archive_entry_strmode.c#1 branch .. //depot/projects/hammer/lib/libarchive/archive_platform.h#19 integrate .. //depot/projects/hammer/lib/libarchive/archive_read.c#22 integrate .. //depot/projects/hammer/lib/libarchive/archive_read_private.h#4 integrate .. //depot/projects/hammer/lib/libarchive/archive_read_support_compression_none.c#14 integrate .. //depot/projects/hammer/lib/libarchive/archive_read_support_format_all.c#10 integrate .. //depot/projects/hammer/lib/libarchive/archive_read_support_format_ar.c#4 integrate .. //depot/projects/hammer/lib/libarchive/archive_read_support_format_cpio.c#21 integrate .. //depot/projects/hammer/lib/libarchive/archive_read_support_format_iso9660.c#15 integrate .. //depot/projects/hammer/lib/libarchive/archive_read_support_format_mtree.c#1 branch .. //depot/projects/hammer/lib/libarchive/archive_read_support_format_tar.c#38 integrate .. //depot/projects/hammer/lib/libarchive/archive_read_support_format_zip.c#15 integrate .. //depot/projects/hammer/lib/libarchive/archive_util.c#15 integrate .. //depot/projects/hammer/lib/libarchive/archive_write_disk.c#9 integrate .. //depot/projects/hammer/lib/libarchive/archive_write_set_compression_bzip2.c#14 integrate .. //depot/projects/hammer/lib/libarchive/archive_write_set_compression_gzip.c#15 integrate .. //depot/projects/hammer/lib/libarchive/archive_write_set_compression_none.c#16 integrate .. //depot/projects/hammer/lib/libarchive/archive_write_set_format_ar.c#4 integrate .. //depot/projects/hammer/lib/libarchive/archive_write_set_format_cpio.c#12 integrate .. //depot/projects/hammer/lib/libarchive/archive_write_set_format_pax.c#32 integrate .. //depot/projects/hammer/lib/libarchive/archive_write_set_format_ustar.c#19 integrate .. //depot/projects/hammer/lib/libarchive/cpio.5#1 branch .. //depot/projects/hammer/lib/libarchive/filter_fork.c#2 integrate .. //depot/projects/hammer/lib/libarchive/libarchive-formats.5#14 integrate .. //depot/projects/hammer/lib/libarchive/libarchive_internals.3#2 integrate .. //depot/projects/hammer/lib/libarchive/test/Makefile#7 integrate .. //depot/projects/hammer/lib/libarchive/test/README#3 integrate .. //depot/projects/hammer/lib/libarchive/test/main.c#8 integrate .. //depot/projects/hammer/lib/libarchive/test/read_open_memory.c#2 integrate .. //depot/projects/hammer/lib/libarchive/test/test.h#5 integrate .. //depot/projects/hammer/lib/libarchive/test/test_compat_gtar.c#1 branch .. //depot/projects/hammer/lib/libarchive/test/test_compat_gtar_1.tgz.uu#1 branch .. //depot/projects/hammer/lib/libarchive/test/test_compat_zip.c#1 branch .. //depot/projects/hammer/lib/libarchive/test/test_compat_zip_1.zip.uu#1 branch .. //depot/projects/hammer/lib/libarchive/test/test_empty_write.c#1 branch .. //depot/projects/hammer/lib/libarchive/test/test_entry_strmode.c#1 branch .. //depot/projects/hammer/lib/libarchive/test/test_read_format_cpio_odc.c#2 integrate .. //depot/projects/hammer/lib/libarchive/test/test_read_format_gtar_sparse.c#6 integrate .. //depot/projects/hammer/lib/libarchive/test/test_read_format_gtar_sparse_1_13.tgz.uu#1 branch .. //depot/projects/hammer/lib/libarchive/test/test_read_format_gtar_sparse_1_17.tgz.uu#1 branch .. //depot/projects/hammer/lib/libarchive/test/test_read_format_gtar_sparse_1_17_posix00.tgz.uu#1 branch .. //depot/projects/hammer/lib/libarchive/test/test_read_format_gtar_sparse_1_17_posix01.tgz.uu#1 branch .. //depot/projects/hammer/lib/libarchive/test/test_read_format_gtar_sparse_1_17_posix10.tgz.uu#1 branch .. //depot/projects/hammer/lib/libarchive/test/test_read_format_gtar_sparse_1_17_posix10_modified.tar.uu#1 branch .. //depot/projects/hammer/lib/libarchive/test/test_read_format_isorr_bz2.c#3 integrate .. //depot/projects/hammer/lib/libarchive/test/test_read_format_mtree.c#1 branch .. //depot/projects/hammer/lib/libarchive/test/test_read_format_zip.c#3 integrate .. //depot/projects/hammer/lib/libarchive/test/test_read_pax_truncated.c#2 integrate .. //depot/projects/hammer/lib/libarchive/test/test_tar_filenames.c#6 integrate .. //depot/projects/hammer/lib/libarchive/test/test_tar_large.c#1 branch .. //depot/projects/hammer/lib/libarchive/test/test_write_disk_perms.c#8 integrate .. //depot/projects/hammer/lib/libarchive/test/test_write_format_cpio.c#4 integrate .. //depot/projects/hammer/lib/libarchive/test/test_write_format_cpio_newc.c#1 branch .. //depot/projects/hammer/lib/libarchive/test/test_write_format_cpio_odc.c#1 branch .. //depot/projects/hammer/lib/libc/gen/sem_open.3#3 integrate .. //depot/projects/hammer/lib/libc/stdlib/malloc.3#17 integrate .. //depot/projects/hammer/lib/libc/stdlib/malloc.c#39 integrate .. //depot/projects/hammer/lib/libkvm/kvm_file.c#4 integrate .. //depot/projects/hammer/lib/ncurses/ncurses/Makefile#8 integrate .. //depot/projects/hammer/lib/ncurses/ncurses/ncurses_cfg.h#3 integrate .. //depot/projects/hammer/release/doc/en_US.ISO8859-1/relnotes/article.sgml#27 integrate .. //depot/projects/hammer/sbin/savecore/savecore.c#16 integrate .. //depot/projects/hammer/share/man/man3/tree.3#7 integrate .. //depot/projects/hammer/share/man/man4/ed.4#15 integrate .. //depot/projects/hammer/share/man/man4/man4.i386/ep.4#20 integrate .. //depot/projects/hammer/share/man/man4/ng_pppoe.4#13 integrate .. //depot/projects/hammer/share/man/man9/VOP_LOCK.9#7 integrate .. //depot/projects/hammer/share/man/man9/lock.9#9 integrate .. //depot/projects/hammer/share/misc/committers-src.dot#7 integrate .. //depot/projects/hammer/share/timedef/am_ET.UTF-8.src#2 integrate .. //depot/projects/hammer/share/timedef/be_BY.CP1131.src#2 integrate .. //depot/projects/hammer/share/timedef/be_BY.CP1251.src#2 integrate .. //depot/projects/hammer/share/timedef/be_BY.ISO8859-5.src#2 integrate .. //depot/projects/hammer/share/timedef/be_BY.UTF-8.src#2 integrate .. //depot/projects/hammer/share/timedef/bg_BG.CP1251.src#2 integrate .. //depot/projects/hammer/share/timedef/bg_BG.UTF-8.src#2 integrate .. //depot/projects/hammer/share/timedef/ca_ES.ISO8859-1.src#2 integrate .. //depot/projects/hammer/share/timedef/ca_ES.UTF-8.src#2 integrate .. //depot/projects/hammer/share/timedef/cs_CZ.ISO8859-2.src#2 integrate .. //depot/projects/hammer/share/timedef/cs_CZ.UTF-8.src#2 integrate .. //depot/projects/hammer/share/timedef/da_DK.ISO8859-1.src#3 integrate .. //depot/projects/hammer/share/timedef/da_DK.UTF-8.src#3 integrate .. //depot/projects/hammer/share/timedef/de_AT.ISO8859-1.src#2 integrate .. //depot/projects/hammer/share/timedef/de_AT.UTF-8.src#2 integrate .. //depot/projects/hammer/share/timedef/de_DE.ISO8859-1.src#2 integrate .. //depot/projects/hammer/share/timedef/de_DE.UTF-8.src#2 integrate .. //depot/projects/hammer/share/timedef/el_GR.ISO8859-7.src#2 integrate .. //depot/projects/hammer/share/timedef/el_GR.UTF-8.src#2 integrate .. //depot/projects/hammer/share/timedef/en_GB.ISO8859-1.src#2 integrate .. //depot/projects/hammer/share/timedef/en_US.ISO8859-1.src#2 integrate .. //depot/projects/hammer/share/timedef/es_ES.ISO8859-1.src#2 integrate .. //depot/projects/hammer/share/timedef/es_ES.UTF-8.src#2 integrate .. //depot/projects/hammer/share/timedef/et_EE.ISO8859-15.src#2 integrate .. //depot/projects/hammer/share/timedef/et_EE.UTF-8.src#2 integrate .. //depot/projects/hammer/share/timedef/eu_ES.ISO8859-1.src#2 integrate .. //depot/projects/hammer/share/timedef/fi_FI.ISO8859-1.src#2 integrate .. //depot/projects/hammer/share/timedef/fi_FI.UTF-8.src#2 integrate .. //depot/projects/hammer/share/timedef/fr_FR.ISO8859-1.src#2 integrate .. //depot/projects/hammer/share/timedef/fr_FR.UTF-8.src#2 integrate .. //depot/projects/hammer/share/timedef/he_IL.UTF-8.src#2 integrate .. //depot/projects/hammer/share/timedef/hi_IN.ISCII-DEV.src#2 integrate .. //depot/projects/hammer/share/timedef/hr_HR.ISO8859-2.src#2 integrate .. //depot/projects/hammer/share/timedef/hr_HR.UTF-8.src#2 integrate .. //depot/projects/hammer/share/timedef/hu_HU.ISO8859-2.src#2 integrate .. //depot/projects/hammer/share/timedef/hu_HU.UTF-8.src#2 integrate .. //depot/projects/hammer/share/timedef/hy_AM.ARMSCII-8.src#2 integrate .. //depot/projects/hammer/share/timedef/hy_AM.UTF-8.src#2 integrate .. //depot/projects/hammer/share/timedef/is_IS.ISO8859-1.src#2 integrate .. //depot/projects/hammer/share/timedef/is_IS.UTF-8.src#2 integrate .. //depot/projects/hammer/share/timedef/it_IT.ISO8859-1.src#3 integrate .. //depot/projects/hammer/share/timedef/it_IT.UTF-8.src#2 integrate .. //depot/projects/hammer/share/timedef/ja_JP.SJIS.src#2 integrate .. //depot/projects/hammer/share/timedef/ja_JP.UTF-8.src#2 integrate .. //depot/projects/hammer/share/timedef/ja_JP.eucJP.src#2 integrate .. //depot/projects/hammer/share/timedef/kk_KZ.PT154.src#2 integrate .. //depot/projects/hammer/share/timedef/kk_KZ.UTF-8.src#2 integrate .. //depot/projects/hammer/share/timedef/ko_KR.UTF-8.src#2 integrate .. //depot/projects/hammer/share/timedef/ko_KR.eucKR.src#2 integrate .. //depot/projects/hammer/share/timedef/la_LN.ISO8859-1.src#2 integrate .. //depot/projects/hammer/share/timedef/lt_LT.ISO8859-13.src#2 integrate .. //depot/projects/hammer/share/timedef/lt_LT.ISO8859-4.src#2 integrate .. //depot/projects/hammer/share/timedef/lt_LT.UTF-8.src#2 integrate .. //depot/projects/hammer/share/timedef/mn_MN.UTF-8.src#2 integrate .. //depot/projects/hammer/share/timedef/nl_NL.ISO8859-1.src#2 integrate .. //depot/projects/hammer/share/timedef/nn_NO.ISO8859-1.src#2 integrate .. //depot/projects/hammer/share/timedef/nn_NO.UTF-8.src#2 integrate .. //depot/projects/hammer/share/timedef/no_NO.ISO8859-1.src#2 integrate .. //depot/projects/hammer/share/timedef/no_NO.UTF-8.src#2 integrate .. //depot/projects/hammer/share/timedef/pl_PL.ISO8859-2.src#3 integrate .. //depot/projects/hammer/share/timedef/pl_PL.UTF-8.src#3 integrate .. //depot/projects/hammer/share/timedef/pt_BR.ISO8859-1.src#2 integrate .. //depot/projects/hammer/share/timedef/pt_BR.UTF-8.src#2 integrate .. //depot/projects/hammer/share/timedef/pt_PT.ISO8859-1.src#2 integrate .. //depot/projects/hammer/share/timedef/pt_PT.UTF-8.src#2 integrate .. //depot/projects/hammer/share/timedef/ro_RO.ISO8859-2.src#2 integrate .. //depot/projects/hammer/share/timedef/ro_RO.UTF-8.src#2 integrate .. //depot/projects/hammer/share/timedef/ru_RU.CP1251.src#2 integrate .. //depot/projects/hammer/share/timedef/ru_RU.CP866.src#2 integrate .. //depot/projects/hammer/share/timedef/ru_RU.ISO8859-5.src#2 integrate .. //depot/projects/hammer/share/timedef/ru_RU.KOI8-R.src#2 integrate .. //depot/projects/hammer/share/timedef/ru_RU.UTF-8.src#2 integrate .. //depot/projects/hammer/share/timedef/sk_SK.ISO8859-2.src#2 integrate .. //depot/projects/hammer/share/timedef/sk_SK.UTF-8.src#2 integrate .. //depot/projects/hammer/share/timedef/sl_SI.ISO8859-2.src#3 integrate .. //depot/projects/hammer/share/timedef/sl_SI.UTF-8.src#3 integrate .. //depot/projects/hammer/share/timedef/sr_YU.ISO8859-2.src#2 integrate .. //depot/projects/hammer/share/timedef/sr_YU.ISO8859-5.src#2 integrate .. //depot/projects/hammer/share/timedef/sr_YU.UTF-8.src#2 integrate .. //depot/projects/hammer/share/timedef/sv_SE.ISO8859-1.src#3 integrate .. //depot/projects/hammer/share/timedef/sv_SE.UTF-8.src#3 integrate .. //depot/projects/hammer/share/timedef/tr_TR.ISO8859-9.src#3 integrate .. //depot/projects/hammer/share/timedef/tr_TR.UTF-8.src#3 integrate .. //depot/projects/hammer/share/timedef/uk_UA.CP1251.src#2 integrate .. //depot/projects/hammer/share/timedef/uk_UA.ISO8859-5.src#2 integrate .. //depot/projects/hammer/share/timedef/uk_UA.KOI8-U.src#2 integrate .. //depot/projects/hammer/share/timedef/uk_UA.UTF-8.src#2 integrate .. //depot/projects/hammer/share/timedef/zh_CN.GB18030.src#2 integrate .. //depot/projects/hammer/share/timedef/zh_CN.GB2312.src#2 integrate .. //depot/projects/hammer/share/timedef/zh_CN.UTF-8.src#2 integrate .. //depot/projects/hammer/share/timedef/zh_CN.eucCN.src#3 integrate .. //depot/projects/hammer/share/timedef/zh_TW.Big5.src#2 integrate .. //depot/projects/hammer/share/timedef/zh_TW.UTF-8.src#2 integrate .. //depot/projects/hammer/share/zoneinfo/backward#9 integrate .. //depot/projects/hammer/share/zoneinfo/europe#12 integrate .. //depot/projects/hammer/share/zoneinfo/southamerica#14 integrate .. //depot/projects/hammer/share/zoneinfo/zone.tab#13 integrate .. //depot/projects/hammer/sys/amd64/amd64/pmap.c#170 integrate .. //depot/projects/hammer/sys/amd64/conf/NOTES#107 integrate .. //depot/projects/hammer/sys/arm/arm/pmap.c#48 integrate .. //depot/projects/hammer/sys/cam/cam_xpt.c#36 integrate .. //depot/projects/hammer/sys/compat/linux/linux_file.c#25 integrate .. //depot/projects/hammer/sys/compat/linux/linux_stats.c#30 integrate .. //depot/projects/hammer/sys/compat/svr4/svr4_stream.c#21 integrate .. //depot/projects/hammer/sys/conf/NOTES#135 integrate .. //depot/projects/hammer/sys/conf/files#170 integrate .. //depot/projects/hammer/sys/dev/acpica/acpi_thermal.c#32 integrate .. //depot/projects/hammer/sys/dev/ata/ata-all.h#47 integrate .. //depot/projects/hammer/sys/dev/ata/ata-disk.c#46 integrate .. //depot/projects/hammer/sys/dev/atkbdc/atkbd.c#5 integrate .. //depot/projects/hammer/sys/dev/atkbdc/atkbd_atkbdc.c#3 integrate .. //depot/projects/hammer/sys/dev/cxgb/cxgb_l2t.c#5 integrate .. //depot/projects/hammer/sys/dev/ed/if_ed_pci.c#16 integrate .. //depot/projects/hammer/sys/dev/ed/if_ed_rtl80x9.c#4 integrate .. //depot/projects/hammer/sys/dev/fb/creator.c#14 integrate .. //depot/projects/hammer/sys/dev/fb/fb.c#9 integrate .. //depot/projects/hammer/sys/dev/fb/fbreg.h#15 integrate .. //depot/projects/hammer/sys/dev/fb/machfb.c#6 integrate .. //depot/projects/hammer/sys/dev/fb/splash_bmp.c#3 integrate .. //depot/projects/hammer/sys/dev/fb/splash_pcx.c#2 integrate .. //depot/projects/hammer/sys/dev/fb/vga.c#23 integrate .. //depot/projects/hammer/sys/dev/gem/if_gem.c#31 integrate .. //depot/projects/hammer/sys/dev/gem/if_gem_pci.c#17 integrate .. //depot/projects/hammer/sys/dev/gem/if_gemreg.h#5 integrate .. //depot/projects/hammer/sys/dev/gem/if_gemvar.h#11 integrate .. //depot/projects/hammer/sys/dev/ichwd/ichwd.c#12 integrate .. //depot/projects/hammer/sys/dev/ichwd/ichwd.h#6 integrate .. //depot/projects/hammer/sys/dev/kbd/kbd.c#14 integrate .. //depot/projects/hammer/sys/dev/kbd/kbdreg.h#5 integrate .. //depot/projects/hammer/sys/dev/kbdmux/kbdmux.c#6 integrate .. //depot/projects/hammer/sys/dev/le/am7990.c#4 integrate .. //depot/projects/hammer/sys/dev/le/am79900.c#4 integrate .. //depot/projects/hammer/sys/dev/streams/streams.c#16 integrate .. //depot/projects/hammer/sys/dev/syscons/blank/blank_saver.c#2 integrate .. //depot/projects/hammer/sys/dev/syscons/daemon/daemon_saver.c#4 integrate .. //depot/projects/hammer/sys/dev/syscons/dragon/dragon_saver.c#3 integrate .. //depot/projects/hammer/sys/dev/syscons/fade/fade_saver.c#3 integrate .. //depot/projects/hammer/sys/dev/syscons/fire/fire_saver.c#4 integrate .. //depot/projects/hammer/sys/dev/syscons/green/green_saver.c#2 integrate .. //depot/projects/hammer/sys/dev/syscons/logo/logo_saver.c#4 integrate .. //depot/projects/hammer/sys/dev/syscons/rain/rain_saver.c#4 integrate .. //depot/projects/hammer/sys/dev/syscons/scgfbrndr.c#10 integrate .. //depot/projects/hammer/sys/dev/syscons/scvgarndr.c#10 integrate .. //depot/projects/hammer/sys/dev/syscons/scvidctl.c#10 integrate .. //depot/projects/hammer/sys/dev/syscons/snake/snake_saver.c#4 integrate .. //depot/projects/hammer/sys/dev/syscons/star/star_saver.c#3 integrate .. //depot/projects/hammer/sys/dev/syscons/syscons.c#43 integrate .. //depot/projects/hammer/sys/dev/syscons/syscons.h#14 integrate .. //depot/projects/hammer/sys/dev/syscons/warp/warp_saver.c#4 integrate .. //depot/projects/hammer/sys/dev/usb/ukbd.c#22 integrate .. //depot/projects/hammer/sys/dev/vkbd/vkbd.c#12 integrate .. //depot/projects/hammer/sys/fs/devfs/devfs_vnops.c#54 integrate .. //depot/projects/hammer/sys/fs/fifofs/fifo_vnops.c#40 integrate .. //depot/projects/hammer/sys/fs/unionfs/union_vnops.c#33 integrate .. //depot/projects/hammer/sys/i386/conf/NOTES#97 integrate .. //depot/projects/hammer/sys/i386/i386/machdep.c#85 integrate .. //depot/projects/hammer/sys/i386/i386/pmap.c#105 integrate .. //depot/projects/hammer/sys/i386/xbox/xboxfb.c#5 integrate .. //depot/projects/hammer/sys/ia64/ia64/pmap.c#64 integrate .. //depot/projects/hammer/sys/isa/vga_isa.c#16 integrate .. //depot/projects/hammer/sys/kern/kern_descrip.c#72 integrate .. //depot/projects/hammer/sys/kern/kern_event.c#48 integrate .. //depot/projects/hammer/sys/kern/kern_exec.c#76 integrate .. //depot/projects/hammer/sys/kern/kern_lock.c#33 integrate .. //depot/projects/hammer/sys/kern/kern_mib.c#19 integrate .. //depot/projects/hammer/sys/kern/kern_proc.c#64 integrate .. //depot/projects/hammer/sys/kern/kern_tc.c#25 integrate .. //depot/projects/hammer/sys/kern/subr_lock.c#10 integrate .. //depot/projects/hammer/sys/kern/subr_smp.c#33 integrate .. //depot/projects/hammer/sys/kern/sys_generic.c#37 integrate .. //depot/projects/hammer/sys/kern/sys_pipe.c#38 integrate .. //depot/projects/hammer/sys/kern/uipc_debug.c#3 integrate .. //depot/projects/hammer/sys/kern/uipc_mqueue.c#12 integrate .. //depot/projects/hammer/sys/kern/uipc_syscalls.c#67 integrate .. //depot/projects/hammer/sys/kern/uipc_usrreq.c#53 integrate .. //depot/projects/hammer/sys/kern/vfs_bio.c#81 integrate .. //depot/projects/hammer/sys/kern/vfs_mount.c#86 integrate .. //depot/projects/hammer/sys/kern/vfs_subr.c#120 integrate .. //depot/projects/hammer/sys/kern/vfs_syscalls.c#75 integrate .. //depot/projects/hammer/sys/kern/vfs_vnops.c#50 integrate .. //depot/projects/hammer/sys/net/ieee8023ad_lacp.c#7 integrate .. //depot/projects/hammer/sys/net/ieee8023ad_lacp.h#6 integrate .. //depot/projects/hammer/sys/net/if_lagg.c#13 integrate .. //depot/projects/hammer/sys/net/netisr.h#7 integrate .. //depot/projects/hammer/sys/netgraph/ng_pppoe.c#26 integrate .. //depot/projects/hammer/sys/netgraph/ng_socket.c#28 integrate .. //depot/projects/hammer/sys/netinet/if_ether.c#45 integrate .. //depot/projects/hammer/sys/netinet/if_ether.h#8 integrate .. //depot/projects/hammer/sys/opencrypto/cryptodev.c#25 integrate .. //depot/projects/hammer/sys/pc98/cbus/gdc.c#4 integrate .. //depot/projects/hammer/sys/pc98/cbus/pckbd.c#5 integrate .. //depot/projects/hammer/sys/pc98/cbus/scgdcrndr.c#3 integrate .. //depot/projects/hammer/sys/powerpc/powerpc/pmap_dispatch.c#10 integrate .. //depot/projects/hammer/sys/sparc64/sparc64/pmap.c#50 integrate .. //depot/projects/hammer/sys/sun4v/sun4v/pmap.c#6 integrate .. //depot/projects/hammer/sys/sys/file.h#17 integrate .. //depot/projects/hammer/sys/sys/lockmgr.h#14 integrate .. //depot/projects/hammer/sys/sys/param.h#101 integrate .. //depot/projects/hammer/sys/sys/sysctl.h#39 integrate .. //depot/projects/hammer/sys/sys/tree.h#9 integrate .. //depot/projects/hammer/sys/sys/unpcb.h#8 integrate .. //depot/projects/hammer/sys/ufs/ffs/ffs_balloc.c#13 integrate .. //depot/projects/hammer/sys/ufs/ffs/ffs_vnops.c#46 integrate .. //depot/projects/hammer/sys/vm/pmap.h#31 integrate .. //depot/projects/hammer/sys/vm/vm_fault.c#50 integrate .. //depot/projects/hammer/sys/vm/vm_kern.c#28 integrate .. //depot/projects/hammer/sys/vm/vm_object.c#71 integrate .. //depot/projects/hammer/sys/vm/vm_page.c#68 integrate .. //depot/projects/hammer/sys/vm/vm_reserv.c#1 branch .. //depot/projects/hammer/sys/vm/vm_reserv.h#1 branch .. //depot/projects/hammer/tools/regression/sockets/unix_gc/Makefile#1 branch .. //depot/projects/hammer/tools/regression/sockets/unix_gc/unix_gc.c#1 branch .. //depot/projects/hammer/usr.bin/calendar/calendars/calendar.freebsd#59 integrate .. //depot/projects/hammer/usr.bin/calendar/io.c#5 integrate .. //depot/projects/hammer/usr.bin/colldef/parse.y#6 integrate .. //depot/projects/hammer/usr.bin/colldef/scan.l#3 integrate .. //depot/projects/hammer/usr.bin/fetch/fetch.1#14 integrate .. //depot/projects/hammer/usr.bin/netstat/atalk.c#6 integrate .. //depot/projects/hammer/usr.bin/netstat/bpf.c#5 integrate .. //depot/projects/hammer/usr.bin/netstat/if.c#16 integrate .. //depot/projects/hammer/usr.bin/netstat/inet.c#24 integrate .. //depot/projects/hammer/usr.bin/netstat/inet6.c#9 integrate .. //depot/projects/hammer/usr.bin/netstat/ipsec.c#9 integrate .. //depot/projects/hammer/usr.bin/netstat/ipx.c#8 integrate .. //depot/projects/hammer/usr.bin/netstat/main.c#25 integrate .. //depot/projects/hammer/usr.bin/netstat/mbuf.c#16 integrate .. //depot/projects/hammer/usr.bin/netstat/mcast.c#7 integrate .. //depot/projects/hammer/usr.bin/netstat/mroute.c#8 integrate .. //depot/projects/hammer/usr.bin/netstat/mroute6.c#7 integrate .. //depot/projects/hammer/usr.bin/netstat/netgraph.c#6 integrate .. //depot/projects/hammer/usr.bin/netstat/netstat.h#19 integrate .. //depot/projects/hammer/usr.bin/netstat/pfkey.c#5 integrate .. //depot/projects/hammer/usr.bin/netstat/route.c#13 integrate .. //depot/projects/hammer/usr.bin/netstat/sctp.c#6 integrate .. //depot/projects/hammer/usr.bin/netstat/unix.c#5 integrate .. //depot/projects/hammer/usr.bin/tar/COPYING#3 integrate .. //depot/projects/hammer/usr.bin/tar/Makefile#23 integrate .. //depot/projects/hammer/usr.bin/tar/bsdtar.1#25 integrate .. //depot/projects/hammer/usr.bin/tar/bsdtar.c#35 integrate .. //depot/projects/hammer/usr.bin/tar/bsdtar.h#19 integrate .. //depot/projects/hammer/usr.bin/tar/bsdtar_platform.h#16 integrate .. //depot/projects/hammer/usr.bin/tar/config_freebsd.h#2 integrate .. //depot/projects/hammer/usr.bin/tar/read.c#24 integrate .. //depot/projects/hammer/usr.bin/tar/test/config.sh#2 delete .. //depot/projects/hammer/usr.bin/tar/test/test-acl.sh#2 delete .. //depot/projects/hammer/usr.bin/tar/test/test-basic.sh#4 delete .. //depot/projects/hammer/usr.bin/tar/test/test-deep-dir.sh#2 delete .. //depot/projects/hammer/usr.bin/tar/test/test-flags.sh#2 delete .. //depot/projects/hammer/usr.bin/tar/test/test-nodump.sh#2 delete .. //depot/projects/hammer/usr.bin/tar/test/test-overwrite.sh#2 delete .. //depot/projects/hammer/usr.bin/tar/test/test-utf8.sh#2 delete .. //depot/projects/hammer/usr.bin/tar/util.c#13 integrate .. //depot/projects/hammer/usr.bin/truss/syscalls.c#24 integrate .. //depot/projects/hammer/usr.sbin/mtree/Makefile#5 integrate .. //depot/projects/hammer/usr.sbin/mtree/mtree.5#1 branch .. //depot/projects/hammer/usr.sbin/portsnap/portsnap/portsnap.8#7 integrate .. //depot/projects/hammer/usr.sbin/sysinstall/dist.c#33 integrate .. //depot/projects/hammer/usr.sbin/sysinstall/dist.h#14 integrate .. //depot/projects/hammer/usr.sbin/sysinstall/index.c#16 integrate .. //depot/projects/hammer/usr.sbin/sysinstall/main.c#10 integrate .. //depot/projects/hammer/usr.sbin/sysinstall/menus.c#46 integrate .. //depot/projects/hammer/usr.sbin/sysinstall/sysinstall.h#28 integrate Differences ... ==== //depot/projects/hammer/COPYRIGHT#6 (text+ko) ==== @@ -1,10 +1,10 @@ -# $FreeBSD: src/COPYRIGHT,v 1.8 2006/12/31 16:34:16 delphij Exp $ +# $FreeBSD: src/COPYRIGHT,v 1.9 2007/12/31 22:09:19 delphij Exp $ # @(#)COPYRIGHT 8.2 (Berkeley) 3/21/94 The compilation of software known as FreeBSD is distributed under the following terms: -Copyright (C) 1992-2007 The FreeBSD Project. All rights reserved. +Copyright (C) 1992-2008 The FreeBSD Project. All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions ==== //depot/projects/hammer/contrib/cvs/src/filesubr.c#6 (text+ko) ==== @@ -18,7 +18,7 @@ file system semantics. */ /* - * $FreeBSD: src/contrib/cvs/src/filesubr.c,v 1.12 2004/06/10 19:12:50 peter Exp $ + * $FreeBSD: src/contrib/cvs/src/filesubr.c,v 1.13 2007/12/31 03:42:05 obrien Exp $ */ #include @@ -877,7 +877,7 @@ { char *file = NULL; int buflen = BUFSIZ; - int linklen; + int link_name_len; /* Get the name of the file to which `from' is linked. FIXME: what portability issues arise here? Are readlink & @@ -886,14 +886,15 @@ { file = xrealloc (file, buflen); errno = 0; - linklen = readlink (link, file, buflen - 1); + link_name_len = readlink (link, file, buflen - 1); buflen *= 2; } - while (linklen == -1 && errno == ENAMETOOLONG); + while (link_name_len < 0 && errno == ENAMETOOLONG); - if (linklen == -1) + if (link_name_len < 0) error (1, errno, "cannot readlink %s", link); - file[linklen] = '\0'; + + file[link_name_len] = '\0'; return file; } ==== //depot/projects/hammer/contrib/ncurses/FREEBSD-upgrade#2 (text+ko) ==== @@ -1,4 +1,4 @@ -$FreeBSD: src/contrib/ncurses/FREEBSD-upgrade,v 1.1 2007/01/20 08:24:05 rafan Exp $ +$FreeBSD: src/contrib/ncurses/FREEBSD-upgrade,v 1.2 2007/12/30 11:19:29 rafan Exp $ ncurses @@ -19,6 +19,9 @@ The date in the tag can be obtained from contrib/ncurses/dist.mk. +Remove files that are removed in this release in vendor branch (NCURSES) +instead of HEAD. + To make local changes to ncurses, simply patch and commit to the main branch (aka HEAD). Never make local changes on the vendor (NCURSES) branch. @@ -39,9 +42,6 @@ ncurses/tinfo/comp_scan.c rev 1.2: native termcap tweaking -ncurses/tinfo/lib_baudrate.c - rev 1.2: switch to contemporary TTY interface - ncurses/tinfo/lib_termcap.c rev 1.2: native termcap tweaking rev 1.4: remove GCC_UNUSED for rev 1.2 ==== //depot/projects/hammer/contrib/ncurses/INSTALL#3 (text+ko) ==== @@ -25,7 +25,7 @@ -- sale, use or other dealings in this Software without prior written -- -- authorization. -- ------------------------------------------------------------------------------- --- $Id: INSTALL,v 1.114 2006/12/17 19:58:19 tom Exp $ +-- $Id: INSTALL,v 1.122 2007/12/01 19:37:47 tom Exp $ --------------------------------------------------------------------- How to install Ncurses/Terminfo on your system --------------------------------------------------------------------- @@ -304,6 +304,11 @@ return deceptive results, so you may have to override the configure script. Or you may be building tic for a smaller machine. + --disable-big-strings + Disable compile-time optimization of predefined tables which puts + all of their strings into a very long string, to reduce relocation + overhead. + --disable-database Use only built-in data. The ncurses libraries normally read terminfo and termcap data from disk. You can configure ncurses to have a @@ -334,6 +339,16 @@ For testing, compile-in code that frees memory that normally would not be freed, to simplify analysis of memory-leaks. + Any implementation of curses must not free the memory associated with + a screen, since (even after calling endwin()), it must be available + for use in the next call to refresh(). There are also chunks of + memory held for performance reasons. That makes it hard to analyze + curses applications for memory leaks. To work around this, build + a debugging version of the ncurses library which frees those chunks + which it can, and provides the _nc_free_and_exit() function to free + the remainder on exit. The ncurses utility and test programs use this + feature, e.g., via the ExitProgram() macro. + --disable-lp64 The header files will ignore use of the _LP64 symbol to make chtype and mmask_t types 32 bits (they may be long on 64-bit hosts, for @@ -358,6 +373,13 @@ rather than the include directory. This makes it simpler to avoid compile-time conflicts with other versions of curses.h + --disable-relink + If --enable-rpath is given, the generated makefiles normally will + rebuild the libraries during install. Use this option to simply + copy whatever the linked produced. + + This option is ignored if --enable-rpath is not given. + --disable-root-environ Compile with environment restriction, so certain environment variables are not available when running as root, or via a setuid/setgid @@ -476,12 +498,22 @@ may not be accurate, or that your stty settings have disabled the use of tabs. + --enable-mixed-case + Controls whether the filesystem on which the terminfo database resides + supports mixed-case filenames (normal for UNIX, but not on other + systems). If you do not specify this option, the configure script + checks the current filesystem. + --enable-no-padding Compile-in support for the $NCURSES_NO_PADDING environment variable, which allows you to suppress the effect of non-mandatory padding in terminfo entries. This is the default, unless you have disabled the extended functions. + --enable-reentrant + Compile experimental configuration which improves reentrant use of the + library by reducing global and static variables. + --enable-rpath Use rpath option when generating shared libraries, and (with some restrictions) when linking the corresponding programs. This originally @@ -495,6 +527,9 @@ environment variable, they do not work with setuid applications since the LD_LIBRARY_PATH variable would be unset in that situation. + This option does not apply to --with-libtool, since libtool makes + extra assumptions about rpath. + --enable-safe-sprintf Compile with experimental safe-sprintf code. You may consider using this if you are building ncurses for a system that has neither @@ -659,10 +694,16 @@ See also --without-dlsym - --with-hashed-db + --with-hashed-db[=XXX] Use a hashed database for storing terminfo data rather than storing each compiled entry in a separate binary file within a directory tree. + + In particular, this uses the Berkeley database 1.8.5 interface, as + provided by that and its successors db 2, 3, and 4. The actual + interface is slightly different in the successor versions of the + Berkeley database. The database should have been configured using + "--enable-compat185". If you use this option for configuring ncurses, tic will only be able to write entries in the hashed database. infocmp can still read @@ -674,6 +715,12 @@ You cannot have a directory containing both hashed-database and filesystem-based terminfo entries. + Use the parameter value to give the install-prefix used for the + datbase, e.g., + --with-hashed-db=/usr/local/BigBase + to find the corresponding include- and lib-directories under the + given directory. + See also the --enable-getcap option. --with-install-prefix=XXX @@ -833,6 +880,15 @@ Specify a search-list of termcap files which will be compiled into the ncurses library (default: /etc/termcap:/usr/share/misc/termcap) + --with-ticlib[=XXX] + When building the ncurses library, build a separate library for + the modules that are used only by the utility programs. Normally + those would be bundled with the termlib or ncurses libraries. + + If an option value is given, that overrides the name of the tic + library. As in termlib, there is no ABI difference between the + "wide" libticw.so and libtic.so + --with-trace Configure the trace() function as part of the all models of the ncurses library. Normally it is part of the debug (libncurses_g) library only. ==== //depot/projects/hammer/contrib/ncurses/MANIFEST#3 (text+ko) ==== @@ -4,6 +4,7 @@ ./Ada95/README ./Ada95/TODO ./Ada95/gen/Makefile.in +./Ada95/gen/adacurses-config.in ./Ada95/gen/gen.c ./Ada95/gen/html.m4 ./Ada95/gen/normal.m4 @@ -20,6 +21,7 @@ ./Ada95/gen/terminal_interface-curses-panels-user_data.ads.m4 ./Ada95/gen/terminal_interface-curses-panels.ads.m4 ./Ada95/gen/terminal_interface-curses-trace.ads.m4 +./Ada95/gen/terminal_interface-curses.adb.m4 ./Ada95/gen/terminal_interface-curses.ads.m4 ./Ada95/samples/Makefile.in ./Ada95/samples/README @@ -163,7 +165,6 @@ ./Ada95/src/terminal_interface-curses-text_io.adb ./Ada95/src/terminal_interface-curses-text_io.ads ./Ada95/src/terminal_interface-curses-trace.adb_p -./Ada95/src/terminal_interface-curses.adb ./Ada95/src/terminal_interface.ads ./INSTALL ./MANIFEST @@ -553,8 +554,10 @@ ./man/curs_instr.3x ./man/curs_inwstr.3x ./man/curs_kernel.3x +./man/curs_legacy.3x ./man/curs_mouse.3x ./man/curs_move.3x +./man/curs_opaque.3x ./man/curs_outopts.3x ./man/curs_overlay.3x ./man/curs_pad.3x @@ -709,7 +712,8 @@ ./mk-0th.awk ./mk-1st.awk ./mk-2nd.awk -./mkinstalldirs +./mk-hdr.awk +./mkdirs.sh ./ncurses/Makefile.in ./ncurses/README ./ncurses/README.IZ @@ -799,6 +803,7 @@ ./ncurses/base/safe_sprintf.c ./ncurses/base/sigaction.c ./ncurses/base/tries.c +./ncurses/base/use_window.c ./ncurses/base/version.c ./ncurses/base/vsscanf.c ./ncurses/base/wresize.c @@ -808,6 +813,8 @@ ./ncurses/llib-lncursesw ./ncurses/modules ./ncurses/tinfo/MKcaptab.awk +./ncurses/tinfo/MKcaptab.sh +./ncurses/tinfo/MKcodes.awk ./ncurses/tinfo/MKfallback.sh ./ncurses/tinfo/MKkeys_list.sh ./ncurses/tinfo/MKnames.awk @@ -824,6 +831,7 @@ ./ncurses/tinfo/comp_scan.c ./ncurses/tinfo/db_iterator.c ./ncurses/tinfo/doalloc.c +./ncurses/tinfo/entries.c ./ncurses/tinfo/free_ttype.c ./ncurses/tinfo/getenv_num.c ./ncurses/tinfo/hashed_db.c @@ -856,6 +864,7 @@ ./ncurses/tinfo/setbuf.c ./ncurses/tinfo/strings.c ./ncurses/tinfo/trim_sgr0.c +./ncurses/tinfo/use_screen.c ./ncurses/tinfo/write_entry.c ./ncurses/trace/README ./ncurses/trace/lib_trace.c @@ -891,6 +900,7 @@ ./ncurses/widechar/lib_in_wchnstr.c ./ncurses/widechar/lib_ins_wch.c ./ncurses/widechar/lib_inwstr.c +./ncurses/widechar/lib_key_name.c ./ncurses/widechar/lib_pecho_wchar.c ./ncurses/widechar/lib_slk_wset.c ./ncurses/widechar/lib_unget_wch.c @@ -934,29 +944,6 @@ ./progs/toe.c ./progs/tput.c ./progs/tset.c -./tack/COPYING -./tack/HISTORY -./tack/Makefile.in -./tack/README -./tack/ansi.c -./tack/charset.c -./tack/color.c -./tack/control.c -./tack/crum.c -./tack/edit.c -./tack/fun.c -./tack/init.c -./tack/menu.c -./tack/modes.c -./tack/modules -./tack/output.c -./tack/pad.c -./tack/scan.c -./tack/sync.c -./tack/sysdep.c -./tack/tack.1 -./tack/tack.c -./tack/tack.h ./tar-copy.sh ./test/Makefile.in ./test/README @@ -981,6 +968,7 @@ ./test/demo_termcap.c ./test/ditto.c ./test/dots.c +./test/dots_mvcur.c ./test/echochar.c ./test/edit_field.c ./test/edit_field.h @@ -992,8 +980,11 @@ ./test/gdc.c ./test/hanoi.c ./test/hashtest.c +./test/inch_wide.c +./test/inchs.c ./test/ins_wide.c ./test/inserts.c +./test/key_names.c ./test/keynames.c ./test/knight.c ./test/linux-color.dat @@ -1010,8 +1001,15 @@ ./test/rain.c ./test/redraw.c ./test/savescreen.c +./test/savescreen.sh ./test/tclock.c ./test/test.priv.h +./test/test_arrays.c +./test/test_get_wstr.c +./test/test_getstr.c +./test/test_instr.c +./test/test_inwstr.c +./test/test_opaque.c ./test/testaddch.c ./test/testcurs.c ./test/testscanw.c ==== //depot/projects/hammer/contrib/ncurses/NEWS#3 (text+ko) ==== @@ -1,5 +1,5 @@ ------------------------------------------------------------------------------- --- Copyright (c) 1998-2005,2006 Free Software Foundation, Inc. -- +-- Copyright (c) 1998-2006,2007 Free Software Foundation, Inc. -- -- -- -- Permission is hereby granted, free of charge, to any person obtaining a -- -- copy of this software and associated documentation files (the -- @@ -25,7 +25,7 @@ -- sale, use or other dealings in this Software without prior written -- -- authorization. -- ------------------------------------------------------------------------------- --- $Id: NEWS,v 1.1056 2006/12/17 20:36:26 tom Exp $ +-- $Id: NEWS,v 1.1188 2007/12/22 23:56:08 tom Exp $ ------------------------------------------------------------------------------- This is a log of changes that ncurses has gone through since Zeyd started @@ -45,9 +45,512 @@ Changes through 1.9.9e did not credit all contributions; it is not possible to add this information. +20071222 + + continue implementing support for threading demo by adding mutex + for delwin(). + +20071215 + + add several functions to C++ binding which wrap C functions that + pass a WINDOW* parameter (request by Chris Lee). + +20071201 + + add note about configure options needed for Berkeley database to the + INSTALL file. + + improve checks for version of Berkeley database libraries. + + amend fix for rpath to not modify LDFLAGS if the platform has no + applicable transformation (report by Christian Ebert, cf: 20071124). + +20071124 + + modify configure option --with-hashed-db to accept a parameter which + is the install-prefix of a given Berkeley Database (prompted by + pierre4d2 comments). + + rewrite wrapper for wcrtomb(), making it work on Solaris. This is >>> TRUNCATED FOR MAIL (1000 lines) <<< From owner-p4-projects@FreeBSD.ORG Thu Jan 3 20:29:35 2008 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id AA1D216A46E; Thu, 3 Jan 2008 20:29:35 +0000 (UTC) Delivered-To: perforce@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 6E28216A46B for ; Thu, 3 Jan 2008 20:29:35 +0000 (UTC) (envelope-from evilpete@gmail.com) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id 5F34613C442 for ; Thu, 3 Jan 2008 20:29:35 +0000 (UTC) (envelope-from evilpete@gmail.com) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.1/8.14.1) with ESMTP id m03KTZlj004095 for ; Thu, 3 Jan 2008 20:29:35 GMT (envelope-from evilpete@gmail.com) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.1/8.14.1/Submit) id m03KTZ3g004092 for perforce@freebsd.org; Thu, 3 Jan 2008 20:29:35 GMT (envelope-from evilpete@gmail.com) Date: Thu, 3 Jan 2008 20:29:35 GMT Message-Id: <200801032029.m03KTZ3g004092@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to evilpete@gmail.com using -f From: Peter Wemm To: Perforce Change Reviews Cc: Subject: PERFORCE change 132422 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 03 Jan 2008 20:29:36 -0000 http://perforce.freebsd.org/chv.cgi?CH=132422 Change 132422 by peter@peter_daintree on 2008/01/03 20:28:47 DOH! don't reuse $u for uuid. Affected files ... .. //depot/projects/hammer/sys/conf/newvers.sh#20 edit Differences ... ==== //depot/projects/hammer/sys/conf/newvers.sh#20 (text+ko) ==== @@ -86,7 +86,7 @@ touch version v=`cat version` u=${USER:-root} d=`pwd` h=${HOSTNAME:-`hostname`} t=`date` i=`${MAKE:-make} -V KERN_IDENT` -u=`uuidgen` +uuid=`uuidgen` cat << EOF > vers.c $COPYRIGHT #define SCCSSTR "@(#)${VERSION} #${v}: ${t}" @@ -99,7 +99,7 @@ char osrelease[sizeof(RELSTR) > 32 ? sizeof(RELSTR) : 32] = RELSTR; int osreldate = ${RELDATE}; char kern_ident[] = "${i}"; -char build_uuid[] = "${u}"; +char build_uuid[] = "${uuid}"; EOF echo `expr ${v} + 1` > version From owner-p4-projects@FreeBSD.ORG Thu Jan 3 20:40:48 2008 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 0FFF216A476; Thu, 3 Jan 2008 20:40:48 +0000 (UTC) Delivered-To: perforce@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id C8EE916A474 for ; Thu, 3 Jan 2008 20:40:47 +0000 (UTC) (envelope-from imp@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id BA0DE13C45B for ; Thu, 3 Jan 2008 20:40:47 +0000 (UTC) (envelope-from imp@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.1/8.14.1) with ESMTP id m03KelnX008111 for ; Thu, 3 Jan 2008 20:40:47 GMT (envelope-from imp@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.1/8.14.1/Submit) id m03Kelnm008108 for perforce@freebsd.org; Thu, 3 Jan 2008 20:40:47 GMT (envelope-from imp@freebsd.org) Date: Thu, 3 Jan 2008 20:40:47 GMT Message-Id: <200801032040.m03Kelnm008108@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to imp@freebsd.org using -f From: Warner Losh To: Perforce Change Reviews Cc: Subject: PERFORCE change 132423 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 03 Jan 2008 20:40:48 -0000 http://perforce.freebsd.org/chv.cgi?CH=132423 Change 132423 by imp@imp_paco-paco on 2008/01/03 20:40:30 Comment these out until I can get the right names sorted out. Affected files ... .. //depot/projects/mips2-jnpr/src/sys/mips/mips/interrupt.c#3 edit Differences ... ==== //depot/projects/mips2-jnpr/src/sys/mips/mips/interrupt.c#3 (text+ko) ==== @@ -217,6 +217,7 @@ { } +#if 0 static int sched_ithd(void *cookie) { @@ -238,6 +239,7 @@ intr_handlers[irq].ih_flags = flags; } +// XXX these have changed and need to be updated int inthand_add(const char *name, u_int irq, void (*handler)(void *), void *arg, int flags, void **cookiep) @@ -288,6 +290,7 @@ error = intr_event_remove_handler(cookie); return (error); } +#endif /* * Process interrupts. The parameter pending has non-masked interrupts. From owner-p4-projects@FreeBSD.ORG Thu Jan 3 20:42:50 2008 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 73DB516A420; Thu, 3 Jan 2008 20:42:50 +0000 (UTC) Delivered-To: perforce@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 385F016A418 for ; Thu, 3 Jan 2008 20:42:50 +0000 (UTC) (envelope-from imp@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id 1111A13C4CE for ; Thu, 3 Jan 2008 20:42:50 +0000 (UTC) (envelope-from imp@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.1/8.14.1) with ESMTP id m03KgnNi008769 for ; Thu, 3 Jan 2008 20:42:49 GMT (envelope-from imp@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.1/8.14.1/Submit) id m03KgnY4008764 for perforce@freebsd.org; Thu, 3 Jan 2008 20:42:49 GMT (envelope-from imp@freebsd.org) Date: Thu, 3 Jan 2008 20:42:49 GMT Message-Id: <200801032042.m03KgnY4008764@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to imp@freebsd.org using -f From: Warner Losh To: Perforce Change Reviews Cc: Subject: PERFORCE change 132424 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 03 Jan 2008 20:42:50 -0000 http://perforce.freebsd.org/chv.cgi?CH=132424 Change 132424 by imp@imp_paco-paco on 2008/01/03 20:41:54 kludge-o-matic for now until watch points are integrated. Affected files ... .. //depot/projects/mips2-jnpr/src/sys/mips/mips/mips_subr.c#4 edit Differences ... ==== //depot/projects/mips2-jnpr/src/sys/mips/mips/mips_subr.c#4 (text+ko) ==== @@ -23,9 +23,10 @@ /* * mips_watchpoint -- set/clear a watchpoint */ +void mips_watchpoint(void *addr, int access);//XXX kludge void -mips_watchpoint(void* addr, int access) +mips_watchpoint(void *addr, int access) { u_int32_t watchlo = 0; u_int32_t watchhi = 0; From owner-p4-projects@FreeBSD.ORG Thu Jan 3 21:08:17 2008 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id C12D516A477; Thu, 3 Jan 2008 21:08:16 +0000 (UTC) Delivered-To: perforce@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 6E50B16A419 for ; Thu, 3 Jan 2008 21:08:16 +0000 (UTC) (envelope-from imp@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id 5BA4C13C43E for ; Thu, 3 Jan 2008 21:08:16 +0000 (UTC) (envelope-from imp@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.1/8.14.1) with ESMTP id m03L8GDS029465 for ; Thu, 3 Jan 2008 21:08:16 GMT (envelope-from imp@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.1/8.14.1/Submit) id m03L8GQA029462 for perforce@freebsd.org; Thu, 3 Jan 2008 21:08:16 GMT (envelope-from imp@freebsd.org) Date: Thu, 3 Jan 2008 21:08:16 GMT Message-Id: <200801032108.m03L8GQA029462@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to imp@freebsd.org using -f From: Warner Losh To: Perforce Change Reviews Cc: Subject: PERFORCE change 132425 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 03 Jan 2008 21:08:17 -0000 http://perforce.freebsd.org/chv.cgi?CH=132425 Change 132425 by imp@imp_paco-paco on 2008/01/03 21:08:04 Trap compiles now. not 100% sure of the changes, so we should have many eyes look here... Affected files ... .. //depot/projects/mips2-jnpr/src/sys/mips/mips/trap.c#5 edit Differences ... ==== //depot/projects/mips2-jnpr/src/sys/mips/mips/trap.c#5 (text+ko) ==== @@ -311,24 +311,23 @@ unsigned ucode = 0; struct thread *td = curthread; struct proc *p = curproc; - u_quad_t sticks; vm_prot_t ftype; pt_entry_t *pte; unsigned int entry; pmap_t pmap; int quad_syscall = 0; int access_type; + ksiginfo_t ksi; char *msg = NULL; + register_t addr = 0; trapdebug_enter(trapframe, 0); type = (trapframe->cause & CR_EXC_CODE) >> CR_EXC_CODE_SHIFT; if (USERMODE(trapframe->sr)) { type |= T_USER; - sticks = td->td_sticks; usermode = 1; } else { - sticks = 0; usermode = 0; } @@ -581,6 +580,7 @@ ucode = ftype; i = ((rv == KERN_PROTECTION_FAILURE) ? SIGBUS : SIGSEGV); + addr = trapframe->pc; msg = "BAD_PAGE_FAULT"; log_bad_page_fault(msg, trapframe, type); @@ -626,6 +626,7 @@ case T_BUS_ERR_LD_ST+T_USER: /* BERR asserted to cpu */ ucode = 0; /* XXX should be VM_PROT_something */ i = SIGBUS; + addr = trapframe->pc; if (!msg) msg = "BUS_ERR"; log_bad_page_fault(msg, trapframe, type); @@ -706,7 +707,7 @@ else callp = &p->p_sysent->sv_table[code]; - nargs = callp->sy_narg & SYF_ARGMASK; + nargs = callp->sy_narg; if (nargs > nsaved) { i = copyin((caddr_t)(locr0->sp + @@ -736,14 +737,6 @@ else trp[-1].code = code; #endif - - /* - * Try to run the syscall without Giant if the syscall - * is MP safe. - */ - if ((callp->sy_narg & SYF_MPSAFE) == 0) - mtx_lock(&Giant); - STOPEVENT(p, S_SCE, nargs); PTRACESTOP_SC(p, td, S_PT_SCE); @@ -799,18 +792,12 @@ } /* - * Release Giant if we previously set it. - */ - if ((callp->sy_narg & SYF_MPSAFE) == 0) - mtx_unlock(&Giant); - - /* * The sync'ing of I & D caches for SYS_ptrace() is * done by procfs_domem() through procfs_rwmem() instead * of being done here under a special check for SYS_ptrace(). */ done: - userret(td, trapframe, sticks); + userret(td, trapframe); #ifdef KTRACE if (KTRPOINT(p, KTR_SYSRET)) @@ -824,7 +811,7 @@ STOPEVENT(p, S_SCX, code); PTRACESTOP_SC(p, td, S_PT_SCX); - +#ifdef GONE_IN_7 WITNESS_WARN(WARN_PANIC, NULL, "System call %s returning", (code >= 0 && code < SYS_MAXSYSCALL) ? syscallnames[code] : "???"); @@ -833,7 +820,7 @@ if (curthread->td_flags & (TDF_ASTPENDING|TDF_NEEDRESCHED)) { ast(trapframe); } - +#endif return (trapframe->pc); } @@ -861,6 +848,7 @@ #endif if (td->td_md.md_ss_addr != va || instr != BREAK_SSTEP) { i = SIGTRAP; + addr = trapframe->pc; break; } @@ -870,7 +858,7 @@ * call to ptrace_clear_single_step() in issignal() * when SIGTRAP is processed. */ - + addr = trapframe->pc; i = SIGTRAP; break; } @@ -885,6 +873,7 @@ va += sizeof(int); printf("watch exception @ 0x%x\n", va); i = SIGTRAP; + addr = va; break; } @@ -906,12 +895,14 @@ } else { locr0->pc += sizeof(int); } + addr = va; i = SIGEMT; /* Stuff it with something for now */ break; } case T_RES_INST+T_USER: i = SIGILL; + addr = trapframe->pc; break; case T_COP_UNUSABLE+T_USER: @@ -926,6 +917,7 @@ i = SIGILL; /* only FPU instructions allowed */ break; } + addr = trapframe->pc; MipsSwitchFPState(PCPU_GET(fpcurthread), td->td_frame); PCPU_SET(fpcurthread, td); td->td_frame->sr |= SR_COP_1_BIT; @@ -947,6 +939,7 @@ case T_OVFLOW+T_USER: i = SIGFPE; + addr = trapframe->pc; break; case T_ADDR_ERR_LD: /* misaligned access */ @@ -1023,18 +1016,23 @@ td->td_frame->pc = trapframe->pc; td->td_frame->cause = trapframe->cause; td->td_frame->badvaddr = trapframe->badvaddr; - trapsignal(td, i, ucode); + ksiginfo_init_trap(&ksi); + ksi.ksi_signo = i; + ksi.ksi_code = ucode; + ksi.ksi_addr = (void *)addr; + ksi.ksi_trapno = type; + trapsignal(td, &ksi); out: /* * Note: we should only get here if returning to user mode. */ - userret(td, trapframe, sticks); - mtx_assert(&sched_lock, MA_NOTOWNED); + userret(td, trapframe); mtx_assert(&Giant, MA_NOTOWNED); +#ifdef GONE_IN_7 if (curthread->td_flags & (TDF_ASTPENDING | TDF_NEEDRESCHED)) { ast(trapframe); } - +#endif return (trapframe->pc); } @@ -1214,7 +1212,6 @@ /* forward */ char *fn_name(unsigned addr); -void stacktrace_subr(struct trapframe *, int (*)(const char*, ...); /* * Print a stack backtrace. @@ -1226,7 +1223,7 @@ } void -stacktrace_subr(struct trapframe *regs, int (*printfn)(const char*, ...))) +stacktrace_subr(struct trapframe *regs, int (*printfn)(const char*, ...)) { InstFmt i; unsigned a0, a1, a2, a3, pc, sp, fp, ra, va, subr; From owner-p4-projects@FreeBSD.ORG Thu Jan 3 21:16:25 2008 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 6F1BC16A469; Thu, 3 Jan 2008 21:16:25 +0000 (UTC) Delivered-To: perforce@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 344F316A41B for ; Thu, 3 Jan 2008 21:16:25 +0000 (UTC) (envelope-from imp@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id 24FA613C467 for ; Thu, 3 Jan 2008 21:16:25 +0000 (UTC) (envelope-from imp@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.1/8.14.1) with ESMTP id m03LGPAZ033244 for ; Thu, 3 Jan 2008 21:16:25 GMT (envelope-from imp@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.1/8.14.1/Submit) id m03LGPNn033241 for perforce@freebsd.org; Thu, 3 Jan 2008 21:16:25 GMT (envelope-from imp@freebsd.org) Date: Thu, 3 Jan 2008 21:16:25 GMT Message-Id: <200801032116.m03LGPNn033241@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to imp@freebsd.org using -f From: Warner Losh To: Perforce Change Reviews Cc: Subject: PERFORCE change 132426 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 03 Jan 2008 21:16:25 -0000 http://perforce.freebsd.org/chv.cgi?CH=132426 Change 132426 by imp@imp_paco-paco on 2008/01/03 21:16:17 cpu_thread_setup -> cpu_thread_alloc remove redundant decl make sure that FLASH addresses are defined before use cpu_throw seems redundant now, so elimiante it. Affected files ... .. //depot/projects/mips2-jnpr/src/sys/mips/mips/vm_machdep.c#4 edit Differences ... ==== //depot/projects/mips2-jnpr/src/sys/mips/mips/vm_machdep.c#4 (text+ko) ==== @@ -235,7 +235,7 @@ } void -cpu_thread_setup(struct thread *td) +cpu_thread_alloc(struct thread *td) { pt_entry_t *pte; int i; @@ -362,8 +362,6 @@ return((int)va); } -SYSCTL_DECL(_vm_stats_misc); - /* * Implement the pre-zeroed page mechanism. * This routine is called from the idle loop. @@ -390,7 +388,11 @@ is_cacheable_mem(vm_offset_t pa) { if ((pa >= SDRAM_ADDR_START && pa <= SDRAM_ADDR_END) || +#ifdef FLASH_ADDR_START (pa >= FLASH_ADDR_START && pa <= FLASH_ADDR_END)) +#else + 0) +#endif return 1; else return 0; @@ -510,6 +512,7 @@ return (0); } +#ifdef GONE_IN_7 void cpu_throw(struct thread *old, struct thread *new) { @@ -517,3 +520,4 @@ cpu_switch(old, new); panic("cpu_throw() didn't"); } +#endif From owner-p4-projects@FreeBSD.ORG Thu Jan 3 21:46:37 2008 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 3122C16A46C; Thu, 3 Jan 2008 21:46:37 +0000 (UTC) Delivered-To: perforce@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id E9E6F16A469 for ; Thu, 3 Jan 2008 21:46:36 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id CEFA313C465 for ; Thu, 3 Jan 2008 21:46:36 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.1/8.14.1) with ESMTP id m03LkaMG044421 for ; Thu, 3 Jan 2008 21:46:36 GMT (envelope-from hselasky@FreeBSD.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.1/8.14.1/Submit) id m03Lkat0044418 for perforce@freebsd.org; Thu, 3 Jan 2008 21:46:36 GMT (envelope-from hselasky@FreeBSD.org) Date: Thu, 3 Jan 2008 21:46:36 GMT Message-Id: <200801032146.m03Lkat0044418@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky To: Perforce Change Reviews Cc: Subject: PERFORCE change 132431 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 03 Jan 2008 21:46:37 -0000 http://perforce.freebsd.org/chv.cgi?CH=132431 Change 132431 by hselasky@hselasky_laptop001 on 2008/01/03 21:46:14 Add some need structures to the USS820 header file, mostly copied from the AT9100 driver. Affected files ... .. //depot/projects/usb/src/sys/dev/usb/uss820_dci.h#4 edit Differences ... ==== //depot/projects/usb/src/sys/dev/usb/uss820_dci.h#4 (text+ko) ==== @@ -27,6 +27,8 @@ #ifndef _USS820_DCI_H_ #define _USS820_DCI_H_ +#define USS820_EP_MAX 8 /* maximum number of endpoints */ + #define USS820_TXDAT 0x00 /* Transmit FIFO data */ #define USS820_TXCNTL 0x01 /* Transmit FIFO byte count low */ @@ -250,4 +252,127 @@ #define USS820_UNK1 0x1f /* Unknown */ #define USS820_UNK1_UNKNOWN 0xFF +#define USS820_GET_REG(sc,reg) \ + ((reg) << (sc)->sc_reg_shift) + +#define USS820_WRITE_SHARED_1(sc, reg, data) do { \ + USS820_WRITE_1(sc, USS820_PEND, 1); \ + USS820_WRITE_1(sc, reg, data); \ + USS820_WRITE_1(sc, USS820_PEND, 0); \ +} while (0) + +#define USS820_READ_1(sc, reg) \ + bus_space_read_1((sc)->sc_io_tag, (sc)->sc_io_hdl, \ + USS820_GET_REG(sc,reg)) + +#define USS820_WRITE_1(sc, reg, data) \ + bus_space_write_1((sc)->sc_io_tag, (sc)->sc_io_hdl, \ + USS820_GET_REG(sc,reg), data) + +struct uss820_dci_td; + +typedef uint8_t (uss820_dci_cmd_t)(struct uss820_dci_td *td); + +struct uss820_dci_td { + bus_space_tag_t io_tag; + bus_space_handle_t io_hdl; + struct uss820_dci_td *obj_next; + uss820_dci_cmd_t *func; + struct usbd_page_cache *pc; + uint32_t offset; + uint32_t remainder; + uint16_t max_packet_size; + uint8_t rx_stat_reg; + uint8_t rx_flag_reg; + uint8_t tx_flag_reg; + uint8_t rx_fifo_reg; + uint8_t tx_fifo_reg; + uint8_t rx_count_low_reg; + uint8_t rx_count_high_reg; + uint8_t tx_count_low_reg; + uint8_t tx_count_high_reg; + uint8_t rx_cntl_reg; + uint8_t tx_cntl_reg; + uint8_t ep_reg; + uint8_t ep_index; + uint8_t error:1; + uint8_t alt_next:1; + uint8_t short_pkt:1; + uint8_t support_multi_buffer:1; + uint8_t did_stall:1; +}; + +struct uss820_std_temp { + uss820_dci_cmd_t *func; + struct usbd_page_cache *pc; + struct uss820_dci_td *td; + struct uss820_dci_td *td_next; + uint32_t len; + uint32_t offset; + uint16_t max_frame_size; + uint8_t short_pkt; + /* + * short_pkt = 0: transfer should be short terminated + * short_pkt = 1: transfer should not be short terminated + */ + uint8_t setup_alt_next; +}; + +struct uss820_dci_config_desc { + usb_config_descriptor_t confd; + usb_interface_descriptor_t ifcd; + usb_endpoint_descriptor_t endpd; +} __packed; + +union uss820_hub_temp { + uWord wValue; + usb_port_status_t ps; +}; + +struct uss820_flags { + uint8_t change_connect:1; + uint8_t change_suspend:1; + uint8_t status_suspend:1; /* set if suspended */ + uint8_t status_vbus:1; /* set if present */ + uint8_t status_bus_reset:1; /* set if reset complete */ + uint8_t clocks_off:1; + uint8_t port_powered:1; + uint8_t port_enabled:1; + uint8_t d_pulled_up:1; + uint8_t mcsr_feat:1; +}; + +struct uss820_dci_softc { + struct usbd_bus sc_bus; + union uss820_hub_temp sc_hub_temp; + LIST_HEAD(, usbd_xfer) sc_interrupt_list_head; + struct usbd_std_root_transfer sc_root_ctrl; + struct usbd_std_root_transfer sc_root_intr; + struct usbd_config_td sc_config_td; + + struct resource *sc_io_res; + struct resource *sc_irq_res; + void *sc_intr_hdl; + bus_size_t sc_io_size; + bus_space_tag_t sc_io_tag; + bus_space_handle_t sc_io_hdl; + + uint8_t sc_rt_addr; /* root HUB address */ + uint8_t sc_dv_addr; /* device address */ + uint8_t sc_conf; /* root HUB config */ + uint8_t sc_reg_shift; + + uint8_t sc_hub_idata[1]; + + struct uss820_flags sc_flags; +}; + +/* prototypes */ + +usbd_status_t uss820_dci_init(struct uss820_dci_softc *sc); +void uss820_dci_uninit(struct uss820_dci_softc *sc); +void uss820_dci_suspend(struct uss820_dci_softc *sc); +void uss820_dci_resume(struct uss820_dci_softc *sc); +void uss820_dci_interrupt(struct uss820_dci_softc *sc); + #endif /* _USS820_DCI_H_ */ From owner-p4-projects@FreeBSD.ORG Thu Jan 3 22:21:14 2008 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 0BF0516A496; Thu, 3 Jan 2008 22:21:14 +0000 (UTC) Delivered-To: perforce@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id ABFD616A41A for ; Thu, 3 Jan 2008 22:21:13 +0000 (UTC) (envelope-from imp@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id 9C29C13C469 for ; Thu, 3 Jan 2008 22:21:13 +0000 (UTC) (envelope-from imp@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.1/8.14.1) with ESMTP id m03MLDMv057689 for ; Thu, 3 Jan 2008 22:21:13 GMT (envelope-from imp@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.1/8.14.1/Submit) id m03MLDCC057683 for perforce@freebsd.org; Thu, 3 Jan 2008 22:21:13 GMT (envelope-from imp@freebsd.org) Date: Thu, 3 Jan 2008 22:21:13 GMT Message-Id: <200801032221.m03MLDCC057683@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to imp@freebsd.org using -f From: Warner Losh To: Perforce Change Reviews Cc: Subject: PERFORCE change 132433 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 03 Jan 2008 22:21:14 -0000 http://perforce.freebsd.org/chv.cgi?CH=132433 Change 132433 by imp@imp_paco-paco on 2008/01/03 22:20:23 Make pm_machdep.c compile. Affected files ... .. //depot/projects/mips2-jnpr/src/sys/mips/include/cpu.h#5 edit .. //depot/projects/mips2-jnpr/src/sys/mips/include/pcb.h#4 edit .. //depot/projects/mips2-jnpr/src/sys/mips/include/pmap.h#6 edit .. //depot/projects/mips2-jnpr/src/sys/mips/mips/pm_machdep.c#3 edit .. //depot/projects/mips2-jnpr/src/sys/mips/mips/pmap.c#12 edit .. //depot/projects/mips2-jnpr/src/sys/mips/mips/swtch.S#5 edit Differences ... ==== //depot/projects/mips2-jnpr/src/sys/mips/include/cpu.h#5 (text+ko) ==== @@ -496,20 +496,20 @@ extern int intr_nesting_level; #define func_0args_asmmacro(func, in) \ - asm volatile ( "jalr %0" \ + __asm __volatile ( "jalr %0" \ : "=r" (in) /* outputs */ \ : "r" (func) /* inputs */ \ : "$31", "$4"); #define func_1args_asmmacro(func, arg0) \ - asm volatile ("move $4, %1;" \ + __asm __volatile ("move $4, %1;" \ "jalr %0" \ : /* outputs */ \ : "r" (func), "r" (arg0) /* inputs */ \ : "$31", "$4"); #define func_2args_asmmacro(func, arg0, arg1) \ - asm volatile ("move $4, %1;" \ + __asm __volatile ("move $4, %1;" \ "move $5, %2;" \ "jalr %0" \ : /* outputs */ \ @@ -517,7 +517,7 @@ : "$31", "$4", "$5"); #define func_3args_asmmacro(func, arg0, arg1, arg2) \ - asm volatile ( "move $4, %1;" \ + __asm __volatile ( "move $4, %1;" \ "move $5, %2;" \ "move $6, %3;" \ "jalr %0" \ ==== //depot/projects/mips2-jnpr/src/sys/mips/include/pcb.h#4 (text+ko) ==== @@ -58,7 +58,7 @@ extern struct pcb *curpcb; /* the current running pcb */ void makectx(struct trapframe *, struct pcb *); -void savectx(struct pcb *); +int savectx(struct pcb *); #endif #endif /* !_MACHINE_PCB_H_ */ ==== //depot/projects/mips2-jnpr/src/sys/mips/include/pmap.h#6 (text+ko) ==== ==== //depot/projects/mips2-jnpr/src/sys/mips/mips/pm_machdep.c#3 (text+ko) ==== @@ -46,6 +46,7 @@ #include #include #include +#include #include #include #include @@ -78,18 +79,20 @@ * specified pc, psl. */ void -sendsig(sig_t catcher, int sig, sigset_t *mask, u_long code) +sendsig(sig_t catcher, ksiginfo_t *ksi, sigset_t *mask) { struct proc *p; struct thread *td; struct trapframe *regs; struct sigacts *psp; struct sigframe sf, *sfp; + int sig; int oonstack; td = curthread; p = td->td_proc; PROC_LOCK_ASSERT(p, MA_OWNED); + sig = ksi->ksi_signo; psp = p->p_sigacts; mtx_assert(&psp->ps_mtx, MA_OWNED); @@ -143,11 +146,11 @@ /* fill siginfo structure */ sf.sf_si.si_signo = sig; - sf.sf_si.si_code = code; + sf.sf_si.si_code = ksi->ksi_code; sf.sf_si.si_addr = (void*)regs->badvaddr; } else { /* Old FreeBSD-style arguments. */ - regs->a1 = code; + regs->a1 = ksi->ksi_code; regs->a3 = regs->badvaddr; /* sf.sf_ahu.sf_handler = catcher; */ } @@ -178,6 +181,7 @@ mtx_lock(&psp->ps_mtx); } +#ifdef GONE_IN_7 /* * Build siginfo_t for SA thread */ @@ -196,6 +200,7 @@ si->si_code = code; /* XXXKSE fill other fields */ } +#endif /* * System call to cleanup state after a signal @@ -224,7 +229,7 @@ /* #ifdef DEBUG */ if (ucp->uc_mcontext.mc_regs[ZERO] != UCONTEXT_MAGIC) { - printf("sigreturn: pid %d, ucp %x\n", p->p_pid, ucp); + printf("sigreturn: pid %d, ucp %p\n", p->p_pid, ucp); printf(" old sp %x ra %x pc %x\n", regs->sp, regs->ra, regs->pc); printf(" new sp %x ra %x pc %x z %x\n", @@ -310,8 +315,6 @@ int i; int bpinstr = BREAK_SSTEP; int curinstr; - struct uio uio; - struct iovec iov; struct proc *p; p = td->td_proc; @@ -506,8 +509,6 @@ ptrace_clear_single_step(struct thread *td) { int i; - struct uio uio; - struct iovec iov; struct proc *p; p = td->td_proc; @@ -532,8 +533,8 @@ } void -cpu_switch(struct thread *old, struct thread *new) +cpu_switch(struct thread *old, struct thread *new, struct mtx * new_lock) { - + /* XXX this is lame, maybe, but we ignore new_lock */ func_2args_asmmacro(&mips_cpu_switch, old, new); } ==== //depot/projects/mips2-jnpr/src/sys/mips/mips/pmap.c#12 (text+ko) ==== ==== //depot/projects/mips2-jnpr/src/sys/mips/mips/swtch.S#5 (text+ko) ==== @@ -230,6 +230,8 @@ /* + *XXX Fixme: should be written to new interface that requires lock + * storage. We fake it for now. * mips_cpu_switch(struct thread *old, struct thread *new); * Find the highest priority process and resume it. */ From owner-p4-projects@FreeBSD.ORG Thu Jan 3 22:25:18 2008 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 6775616A420; Thu, 3 Jan 2008 22:25:18 +0000 (UTC) Delivered-To: perforce@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 2C5CE16A417 for ; Thu, 3 Jan 2008 22:25:18 +0000 (UTC) (envelope-from evilpete@gmail.com) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id 1B81413C457 for ; Thu, 3 Jan 2008 22:25:18 +0000 (UTC) (envelope-from evilpete@gmail.com) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.1/8.14.1) with ESMTP id m03MPILp060678 for ; Thu, 3 Jan 2008 22:25:18 GMT (envelope-from evilpete@gmail.com) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.1/8.14.1/Submit) id m03MPHAE060675 for perforce@freebsd.org; Thu, 3 Jan 2008 22:25:17 GMT (envelope-from evilpete@gmail.com) Date: Thu, 3 Jan 2008 22:25:17 GMT Message-Id: <200801032225.m03MPHAE060675@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to evilpete@gmail.com using -f From: Peter Wemm To: Perforce Change Reviews Cc: Subject: PERFORCE change 132434 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 03 Jan 2008 22:25:18 -0000 http://perforce.freebsd.org/chv.cgi?CH=132434 Change 132434 by peter@peter_daintree on 2008/01/03 22:24:56 Export the build uuid to the dump header. Nothing interesting is done with it at this point. While here, move all the mkdumpheader() copies into a MI place, as the (duplicated) comment suggested. Allow magic numbers to be passed through so textdumps can share the code too. Affected files ... .. //depot/projects/hammer/sbin/savecore/savecore.c#17 edit .. //depot/projects/hammer/sys/amd64/amd64/dump_machdep.c#27 edit .. //depot/projects/hammer/sys/amd64/amd64/minidump_machdep.c#4 edit .. //depot/projects/hammer/sys/arm/arm/dump_machdep.c#3 edit .. //depot/projects/hammer/sys/ddb/db_textdump.c#2 edit .. //depot/projects/hammer/sys/i386/i386/dump_machdep.c#12 edit .. //depot/projects/hammer/sys/i386/i386/minidump_machdep.c#4 edit .. //depot/projects/hammer/sys/ia64/ia64/dump_machdep.c#9 edit .. //depot/projects/hammer/sys/kern/kern_shutdown.c#49 edit .. //depot/projects/hammer/sys/sparc64/sparc64/dump_machdep.c#9 edit .. //depot/projects/hammer/sys/sun4v/sun4v/dump_machdep.c#2 edit .. //depot/projects/hammer/sys/sys/kerneldump.h#9 edit Differences ... ==== //depot/projects/hammer/sbin/savecore/savecore.c#17 (text+ko) ==== @@ -84,6 +84,7 @@ #include #include #include +#include /* The size of the buffer used for I/O. */ #define BUFFERSIZE (1024*1024) @@ -104,6 +105,10 @@ uint64_t dumplen; time_t t; const char *stat_str; + const struct kerneldumpheader_v1 *h_v1 = (const struct kerneldumpheader_v1 *)h; + char *uuid_string; + uint32_t uuid_ret; + uuid_t u; fprintf(f, "Dump header from device %s\n", device); fprintf(f, " Architecture: %s\n", h->architecture); @@ -118,7 +123,18 @@ fprintf(f, " Hostname: %s\n", h->hostname); fprintf(f, " Magic: %s\n", h->magic); fprintf(f, " Version String: %s", h->versionstring); - fprintf(f, " Panic String: %s\n", h->panicstring); + if (dtoh32(h->version) == KERNELDUMPVERSION_V1) { + fprintf(f, " Panic String: %s\n", h_v1->panicstring); + } else { + fprintf(f, " Panic String: %s\n", h->panicstring); + uuid_string = NULL; + memcpy(&u, h->uuid, sizeof(u)); + uuid_to_string(&u, &uuid_string, &uuid_ret); + if (uuid_ret == uuid_s_ok) + fprintf(f, " Build uuid: %s\n", uuid_string); + if (uuid_string) + free(uuid_string); + } fprintf(f, " Dump Parity: %u\n", h->parity); fprintf(f, " Bounds: %d\n", bounds); @@ -435,7 +451,8 @@ } } else if (memcmp(kdhl.magic, KERNELDUMPMAGIC, sizeof kdhl.magic) == 0) { - if (dtoh32(kdhl.version) != KERNELDUMPVERSION) { + if (dtoh32(kdhl.version) != KERNELDUMPVERSION && + dtoh32(kdhl.version) != KERNELDUMPVERSION_V1) { syslog(LOG_ERR, "unknown version (%d) in last dump header on %s", dtoh32(kdhl.version), device); @@ -463,7 +480,8 @@ syslog(LOG_ERR, "unable to force dump - bad magic"); goto closefd; } - if (dtoh32(kdhl.version) != KERNELDUMPVERSION) { + if (dtoh32(kdhl.version) != KERNELDUMPVERSION && + dtoh32(kdhl.version) != KERNELDUMPVERSION_V1) { syslog(LOG_ERR, "unknown version (%d) in last dump header on %s", dtoh32(kdhl.version), device); ==== //depot/projects/hammer/sys/amd64/amd64/dump_machdep.c#27 (text+ko) ==== @@ -104,27 +104,6 @@ return (mdp); } -/* XXX should be MI */ -static void -mkdumpheader(struct kerneldumpheader *kdh, uint32_t archver, uint64_t dumplen, - uint32_t blksz) -{ - - bzero(kdh, sizeof(*kdh)); - strncpy(kdh->magic, KERNELDUMPMAGIC, sizeof(kdh->magic)); - strncpy(kdh->architecture, MACHINE_ARCH, sizeof(kdh->architecture)); - kdh->version = htod32(KERNELDUMPVERSION); - kdh->architectureversion = htod32(archver); - kdh->dumplength = htod64(dumplen); - kdh->dumptime = htod64(time_second); - kdh->blocksize = htod32(blksz); - strncpy(kdh->hostname, hostname, sizeof(kdh->hostname)); - strncpy(kdh->versionstring, version, sizeof(kdh->versionstring)); - if (panicstr != NULL) - strncpy(kdh->panicstring, panicstr, sizeof(kdh->panicstring)); - kdh->parity = kerneldump_parity(kdh); -} - static int buf_write(struct dumperinfo *di, char *ptr, size_t sz) { @@ -321,7 +300,7 @@ dumplo = di->mediaoffset + di->mediasize - dumpsize; dumplo -= sizeof(kdh) * 2; - mkdumpheader(&kdh, KERNELDUMP_AMD64_VERSION, dumpsize, di->blocksize); + mkdumpheader(&kdh, KERNELDUMPMAGIC, KERNELDUMP_AMD64_VERSION, dumpsize, di->blocksize); printf("Dumping %llu MB (%d chunks)\n", (long long)dumpsize >> 20, ehdr.e_phnum); ==== //depot/projects/hammer/sys/amd64/amd64/minidump_machdep.c#4 (text) ==== @@ -81,27 +81,6 @@ return (0); } -/* XXX should be MI */ -static void -mkdumpheader(struct kerneldumpheader *kdh, uint32_t archver, uint64_t dumplen, - uint32_t blksz) -{ - - bzero(kdh, sizeof(*kdh)); - strncpy(kdh->magic, KERNELDUMPMAGIC, sizeof(kdh->magic)); - strncpy(kdh->architecture, MACHINE_ARCH, sizeof(kdh->architecture)); - kdh->version = htod32(KERNELDUMPVERSION); - kdh->architectureversion = htod32(archver); - kdh->dumplength = htod64(dumplen); - kdh->dumptime = htod64(time_second); - kdh->blocksize = htod32(blksz); - strncpy(kdh->hostname, hostname, sizeof(kdh->hostname)); - strncpy(kdh->versionstring, version, sizeof(kdh->versionstring)); - if (panicstr != NULL) - strncpy(kdh->panicstring, panicstr, sizeof(kdh->panicstring)); - kdh->parity = kerneldump_parity(kdh); -} - #define PG2MB(pgs) (((pgs) + (1 << 8) - 1) >> 8) static int @@ -280,7 +259,7 @@ mdhdr.dmapend = DMAP_MAX_ADDRESS; strncpy(mdhdr.build_uuid, build_uuid, sizeof(mdhdr.build_uuid) - 1); - mkdumpheader(&kdh, KERNELDUMP_AMD64_VERSION, dumpsize, di->blocksize); + mkdumpheader(&kdh, KERNELDUMPMAGIC, KERNELDUMP_AMD64_VERSION, dumpsize, di->blocksize); printf("Physical memory: %ju MB\n", ptoa((uintmax_t)physmem) / 1048576); printf("Dumping %llu MB:", (long long)dumpsize >> 20); ==== //depot/projects/hammer/sys/arm/arm/dump_machdep.c#3 (text+ko) ==== @@ -102,27 +102,6 @@ return (mdp); } -/* XXX should be MI */ -static void -mkdumpheader(struct kerneldumpheader *kdh, uint32_t archver, uint64_t dumplen, - uint32_t blksz) -{ - - bzero(kdh, sizeof(*kdh)); - strncpy(kdh->magic, KERNELDUMPMAGIC, sizeof(kdh->magic)); - strncpy(kdh->architecture, MACHINE_ARCH, sizeof(kdh->architecture)); - kdh->version = htod32(KERNELDUMPVERSION); - kdh->architectureversion = htod32(archver); - kdh->dumplength = htod64(dumplen); - kdh->dumptime = htod64(time_second); - kdh->blocksize = htod32(blksz); - strncpy(kdh->hostname, hostname, sizeof(kdh->hostname)); - strncpy(kdh->versionstring, version, sizeof(kdh->versionstring)); - if (panicstr != NULL) - strncpy(kdh->panicstring, panicstr, sizeof(kdh->panicstring)); - kdh->parity = kerneldump_parity(kdh); -} - static int buf_write(struct dumperinfo *di, char *ptr, size_t sz) { @@ -324,7 +303,7 @@ dumplo = di->mediaoffset + di->mediasize - dumpsize; dumplo -= sizeof(kdh) * 2; - mkdumpheader(&kdh, KERNELDUMP_ARM_VERSION, dumpsize, di->blocksize); + mkdumpheader(&kdh, KERNELDUMPMAGIC, KERNELDUMP_ARM_VERSION, dumpsize, di->blocksize); printf("Dumping %llu MB (%d chunks)\n", (long long)dumpsize >> 20, ehdr.e_phnum); ==== //depot/projects/hammer/sys/ddb/db_textdump.c#2 (text+ko) ==== @@ -177,30 +177,6 @@ static struct kerneldumpheader kdh; /* - * Text dumps are prefixed with a normal kernel dump header but with a - * different magic number to allow them to be uniquely identified. - */ -static void -mkdumpheader(struct kerneldumpheader *kdh, uint32_t archver, - uint64_t dumplen, uint32_t blksz) -{ - - bzero(kdh, sizeof(*kdh)); - strncpy(kdh->magic, TEXTDUMPMAGIC, sizeof(kdh->magic)); - strncpy(kdh->architecture, MACHINE_ARCH, sizeof(kdh->architecture)); - kdh->version = htod32(KERNELDUMPVERSION); - kdh->architectureversion = htod32(archver); - kdh->dumplength = htod64(dumplen); - kdh->dumptime = htod64(time_second); - kdh->blocksize = htod32(blksz); - strncpy(kdh->hostname, hostname, sizeof(kdh->hostname)); - strncpy(kdh->versionstring, version, sizeof(kdh->versionstring)); - if (panicstr != NULL) - strncpy(kdh->panicstring, panicstr, sizeof(kdh->panicstring)); - kdh->parity = kerneldump_parity(kdh); -} - -/* * Calculate and fill in the checksum for a tar header. */ static void @@ -465,7 +441,7 @@ */ textdump_offset = di->mediasize - sizeof(kdh); textdump_saveoff(&trailer_offset); - mkdumpheader(&kdh, KERNELDUMP_TEXT_VERSION, 0, TEXTDUMP_BLOCKSIZE); + mkdumpheader(&kdh, TEXTDUMPMAGIC, KERNELDUMP_TEXT_VERSION, 0, TEXTDUMP_BLOCKSIZE); (void)textdump_writenextblock(di, (char *)&kdh); /* @@ -490,7 +466,7 @@ * size. */ dumplen = trailer_offset - (textdump_offset + TEXTDUMP_BLOCKSIZE); - mkdumpheader(&kdh, KERNELDUMP_TEXT_VERSION, dumplen, + mkdumpheader(&kdh, TEXTDUMPMAGIC, KERNELDUMP_TEXT_VERSION, dumplen, TEXTDUMP_BLOCKSIZE); (void)textdump_writenextblock(di, (char *)&kdh); textdump_restoreoff(trailer_offset); ==== //depot/projects/hammer/sys/i386/i386/dump_machdep.c#12 (text+ko) ==== @@ -104,27 +104,6 @@ return (mdp); } -/* XXX should be MI */ -static void -mkdumpheader(struct kerneldumpheader *kdh, uint32_t archver, uint64_t dumplen, - uint32_t blksz) -{ - - bzero(kdh, sizeof(*kdh)); - strncpy(kdh->magic, KERNELDUMPMAGIC, sizeof(kdh->magic)); - strncpy(kdh->architecture, MACHINE_ARCH, sizeof(kdh->architecture)); - kdh->version = htod32(KERNELDUMPVERSION); - kdh->architectureversion = htod32(archver); - kdh->dumplength = htod64(dumplen); - kdh->dumptime = htod64(time_second); - kdh->blocksize = htod32(blksz); - strncpy(kdh->hostname, hostname, sizeof(kdh->hostname)); - strncpy(kdh->versionstring, version, sizeof(kdh->versionstring)); - if (panicstr != NULL) - strncpy(kdh->panicstring, panicstr, sizeof(kdh->panicstring)); - kdh->parity = kerneldump_parity(kdh); -} - static int buf_write(struct dumperinfo *di, char *ptr, size_t sz) { @@ -321,7 +300,7 @@ dumplo = di->mediaoffset + di->mediasize - dumpsize; dumplo -= sizeof(kdh) * 2; - mkdumpheader(&kdh, KERNELDUMP_I386_VERSION, dumpsize, di->blocksize); + mkdumpheader(&kdh, KERNELDUMPMAGIC, KERNELDUMP_I386_VERSION, dumpsize, di->blocksize); printf("Dumping %llu MB (%d chunks)\n", (long long)dumpsize >> 20, ehdr.e_phnum); ==== //depot/projects/hammer/sys/i386/i386/minidump_machdep.c#4 (text) ==== @@ -78,27 +78,6 @@ return (0); } -/* XXX should be MI */ -static void -mkdumpheader(struct kerneldumpheader *kdh, uint32_t archver, uint64_t dumplen, - uint32_t blksz) -{ - - bzero(kdh, sizeof(*kdh)); - strncpy(kdh->magic, KERNELDUMPMAGIC, sizeof(kdh->magic)); - strncpy(kdh->architecture, MACHINE_ARCH, sizeof(kdh->architecture)); - kdh->version = htod32(KERNELDUMPVERSION); - kdh->architectureversion = htod32(archver); - kdh->dumplength = htod64(dumplen); - kdh->dumptime = htod64(time_second); - kdh->blocksize = htod32(blksz); - strncpy(kdh->hostname, hostname, sizeof(kdh->hostname)); - strncpy(kdh->versionstring, version, sizeof(kdh->versionstring)); - if (panicstr != NULL) - strncpy(kdh->panicstring, panicstr, sizeof(kdh->panicstring)); - kdh->parity = kerneldump_parity(kdh); -} - #define PG2MB(pgs) (((pgs) + (1 << 8) - 1) >> 8) static int @@ -275,7 +254,7 @@ mdhdr.paemode = 1; #endif - mkdumpheader(&kdh, KERNELDUMP_I386_VERSION, dumpsize, di->blocksize); + mkdumpheader(&kdh, KERNELDUMPMAGIC, KERNELDUMP_I386_VERSION, dumpsize, di->blocksize); printf("Physical memory: %ju MB\n", ptoa((uintmax_t)physmem) / 1048576); printf("Dumping %llu MB:", (long long)dumpsize >> 20); ==== //depot/projects/hammer/sys/ia64/ia64/dump_machdep.c#9 (text+ko) ==== @@ -59,27 +59,6 @@ static char buffer[DEV_BSIZE]; static size_t fragsz; -/* XXX should be MI */ -static void -mkdumpheader(struct kerneldumpheader *kdh, uint32_t archver, uint64_t dumplen, - uint32_t blksz) -{ - - bzero(kdh, sizeof(*kdh)); - strncpy(kdh->magic, KERNELDUMPMAGIC, sizeof(kdh->magic)); - strncpy(kdh->architecture, MACHINE_ARCH, sizeof(kdh->architecture)); - kdh->version = htod32(KERNELDUMPVERSION); - kdh->architectureversion = htod32(archver); - kdh->dumplength = htod64(dumplen); - kdh->dumptime = htod64(time_second); - kdh->blocksize = htod32(blksz); - strncpy(kdh->hostname, hostname, sizeof(kdh->hostname)); - strncpy(kdh->versionstring, version, sizeof(kdh->versionstring)); - if (panicstr != NULL) - strncpy(kdh->panicstring, panicstr, sizeof(kdh->panicstring)); - kdh->parity = kerneldump_parity(kdh); -} - static int buf_write(struct dumperinfo *di, char *ptr, size_t sz) { @@ -260,7 +239,7 @@ dumplo = di->mediaoffset + di->mediasize - dumpsize; dumplo -= sizeof(kdh) * 2; - mkdumpheader(&kdh, KERNELDUMP_IA64_VERSION, dumpsize, di->blocksize); + mkdumpheader(&kdh, KERNELDUMPMAGIC, KERNELDUMP_IA64_VERSION, dumpsize, di->blocksize); printf("Dumping %llu MB (%d chunks)\n", (long long)dumpsize >> 20, ehdr.e_phnum); ==== //depot/projects/hammer/sys/kern/kern_shutdown.c#49 (text+ko) ==== @@ -53,6 +53,7 @@ #include #include #include +#include #include #include #include @@ -64,6 +65,7 @@ #include /* smp_active */ #include #include +#include #include @@ -388,7 +390,7 @@ * unmount filesystems (thus forcing an fsck on reboot). */ printf("Giving up on %d buffers\n", nbusy); -#ifdef DDB +#ifdef DDB_x Debugger("busy buffers"); #endif DELAY(5000000); /* 5 seconds */ @@ -677,3 +679,26 @@ printf("Kernel dumps not implemented on this architecture\n"); } #endif + +void +mkdumpheader(struct kerneldumpheader *kdh, char *magic, uint32_t archver, + uint64_t dumplen, uint32_t blksz) +{ + struct uuid u; + + parse_uuid(build_uuid, &u); + bzero(kdh, sizeof(*kdh)); + strncpy(kdh->magic, magic, sizeof(kdh->magic)); + strncpy(kdh->architecture, MACHINE_ARCH, sizeof(kdh->architecture)); + kdh->version = htod32(KERNELDUMPVERSION); + kdh->architectureversion = htod32(archver); + kdh->dumplength = htod64(dumplen); + kdh->dumptime = htod64(time_second); + kdh->blocksize = htod32(blksz); + strncpy(kdh->hostname, hostname, sizeof(kdh->hostname)); + strncpy(kdh->versionstring, version, sizeof(kdh->versionstring)); + if (panicstr != NULL) + strncpy(kdh->panicstring, panicstr, sizeof(kdh->panicstring)); + bcopy(&u, kdh->uuid, sizeof(kdh->uuid)); + kdh->parity = kerneldump_parity(kdh); +} ==== //depot/projects/hammer/sys/sparc64/sparc64/dump_machdep.c#9 (text+ko) ==== @@ -55,27 +55,6 @@ #define MAXDUMPSZ (MAXDUMPPGS << PAGE_SHIFT) -/* XXX should be MI */ -static void -mkdumpheader(struct kerneldumpheader *kdh, uint32_t archver, uint64_t dumplen, - uint32_t blksz) -{ - - bzero(kdh, sizeof(*kdh)); - strncpy(kdh->magic, KERNELDUMPMAGIC, sizeof(kdh->magic)); - strncpy(kdh->architecture, MACHINE_ARCH, sizeof(kdh->architecture)); - kdh->version = htod32(KERNELDUMPVERSION); - kdh->architectureversion = htod32(archver); - kdh->dumplength = htod64(dumplen); - kdh->dumptime = htod64(time_second); - kdh->blocksize = htod32(blksz); - strncpy(kdh->hostname, hostname, sizeof(kdh->hostname)); - strncpy(kdh->versionstring, version, sizeof(kdh->versionstring)); - if (panicstr != NULL) - strncpy(kdh->panicstring, panicstr, sizeof(kdh->panicstring)); - kdh->parity = kerneldump_parity(kdh); -} - static int buf_write(struct dumperinfo *di, char *ptr, size_t sz) { @@ -190,7 +169,7 @@ /* Determine dump offset on device. */ dumplo = di->mediaoffset + di->mediasize - totsize; - mkdumpheader(&kdh, KERNELDUMP_SPARC64_VERSION, size, di->blocksize); + mkdumpheader(&kdh, KERNELDUMPMAGIC, KERNELDUMP_SPARC64_VERSION, size, di->blocksize); printf("Dumping %lu MB (%d chunks)\n", (u_long)(size >> 20), nreg); ==== //depot/projects/hammer/sys/sun4v/sun4v/dump_machdep.c#2 (text+ko) ==== @@ -56,27 +56,6 @@ #define MAXDUMPSZ (MAXDUMPPGS << PAGE_SHIFT) -/* XXX should be MI */ -static void -mkdumpheader(struct kerneldumpheader *kdh, uint32_t archver, uint64_t dumplen, - uint32_t blksz) -{ - - bzero(kdh, sizeof(*kdh)); - strncpy(kdh->magic, KERNELDUMPMAGIC, sizeof(kdh->magic)); - strncpy(kdh->architecture, MACHINE_ARCH, sizeof(kdh->architecture)); - kdh->version = htod32(KERNELDUMPVERSION); - kdh->architectureversion = htod32(archver); - kdh->dumplength = htod64(dumplen); - kdh->dumptime = htod64(time_second); - kdh->blocksize = htod32(blksz); - strncpy(kdh->hostname, hostname, sizeof(kdh->hostname)); - strncpy(kdh->versionstring, version, sizeof(kdh->versionstring)); - if (panicstr != NULL) - strncpy(kdh->panicstring, panicstr, sizeof(kdh->panicstring)); - kdh->parity = kerneldump_parity(kdh); -} - static int buf_write(struct dumperinfo *di, char *ptr, size_t sz) { @@ -193,7 +172,7 @@ /* Determine dump offset on device. */ dumplo = di->mediaoffset + di->mediasize - totsize; - mkdumpheader(&kdh, KERNELDUMP_SPARC64_VERSION, size, di->blocksize); + mkdumpheader(&kdh, KERNELDUMPMAGIC, KERNELDUMP_SPARC64_VERSION, size, di->blocksize); printf("Dumping %lu MB (%d chunks)\n", (u_long)(size >> 20), nreg); ==== //depot/projects/hammer/sys/sys/kerneldump.h#9 (text+ko) ==== @@ -64,7 +64,7 @@ #define KERNELDUMPMAGIC_CLEARED "Cleared Kernel Dump" char architecture[12]; uint32_t version; -#define KERNELDUMPVERSION 1 +#define KERNELDUMPVERSION 2 uint32_t architectureversion; #define KERNELDUMP_ALPHA_VERSION 1 #define KERNELDUMP_I386_VERSION 2 @@ -78,6 +78,22 @@ uint32_t blocksize; char hostname[64]; char versionstring[192]; + char panicstring[176]; + u_char uuid[16]; + uint32_t parity; +}; + +struct kerneldumpheader_v1 { + char magic[20]; + char architecture[12]; +#define KERNELDUMPVERSION_V1 1 + uint32_t version; + uint32_t architectureversion; + uint64_t dumplength; /* excl headers */ + uint64_t dumptime; + uint32_t blocksize; + char hostname[64]; + char versionstring[192]; char panicstring[192]; uint32_t parity; }; @@ -98,4 +114,9 @@ return (parity); } +#ifdef _KERNEL +void mkdumpheader(struct kerneldumpheader *kdh, char *magic, uint32_t archver, + uint64_t dumplen, uint32_t blksz); +#endif + #endif /* _SYS_KERNELDUMP_H */ From owner-p4-projects@FreeBSD.ORG Thu Jan 3 22:27:21 2008 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id D8F0F16A468; Thu, 3 Jan 2008 22:27:20 +0000 (UTC) Delivered-To: perforce@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 9E99816A420 for ; Thu, 3 Jan 2008 22:27:20 +0000 (UTC) (envelope-from imp@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id 8F14613C45A for ; Thu, 3 Jan 2008 22:27:20 +0000 (UTC) (envelope-from imp@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.1/8.14.1) with ESMTP id m03MRKig060776 for ; Thu, 3 Jan 2008 22:27:20 GMT (envelope-from imp@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.1/8.14.1/Submit) id m03MRKvr060773 for perforce@freebsd.org; Thu, 3 Jan 2008 22:27:20 GMT (envelope-from imp@freebsd.org) Date: Thu, 3 Jan 2008 22:27:20 GMT Message-Id: <200801032227.m03MRKvr060773@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to imp@freebsd.org using -f From: Warner Losh To: Perforce Change Reviews Cc: Subject: PERFORCE change 132435 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 03 Jan 2008 22:27:21 -0000 http://perforce.freebsd.org/chv.cgi?CH=132435 Change 132435 by imp@imp_paco-paco on 2008/01/03 22:26:45 asm -> __asm Affected files ... .. //depot/projects/mips2-jnpr/src/sys/mips/include/defs_mips.h#3 edit Differences ... ==== //depot/projects/mips2-jnpr/src/sys/mips/include/defs_mips.h#3 (text+ko) ==== @@ -77,13 +77,13 @@ { UNSIGNED_32 data; /* Fetch old value and increment */ - asm volatile ("1:; ll %0, 0x0(%1)" + __asm __volatile ("1:; ll %0, 0x0(%1)" : "=r" (data) /* outputs */ : "r" (addr)); /* inputs */ data += 1; /* Write it back and check for success */ - asm volatile ("sc %0, 0x0(%1); beqz %0, 1b" + __asm __volatile ("sc %0, 0x0(%1); beqz %0, 1b" : /* outputs */ : "r" (data), "r" (addr)); /* inputs */ } @@ -98,13 +98,13 @@ UNSIGNED_32 data; /* Fetch old value and decrement */ - asm volatile ("1:; ll %0, 0x0(%1)" + __asm __volatile ("1:; ll %0, 0x0(%1)" : "=r" (data) /* outputs */ : "r" (addr)); /* inputs */ data -= 1; /* Write it back and check for success */ - asm volatile ("sc %0, 0x0(%1); beqz %0, 1b" + __asm __volatile ("sc %0, 0x0(%1); beqz %0, 1b" : /* outputs */ : "r" (data), "r" (addr)); /* inputs */ } @@ -120,14 +120,14 @@ UNSIGNED_32 tmp; /* Fetch old value */ - asm volatile ("1:; ll %0, 0x0(%1)" + __asm __volatile ("1:; ll %0, 0x0(%1)" : "=r" (data) /* outputs */ : "r" (addr)); /* inputs */ tmp = new_value; /* Write it back and check for success */ - asm volatile ("sc %0, 0x0(%1); beqz %0, 1b" + __asm __volatile ("sc %0, 0x0(%1); beqz %0, 1b" : /* outputs */ : "r" (tmp), "r" (addr)); /* inputs */ From owner-p4-projects@FreeBSD.ORG Thu Jan 3 22:40:35 2008 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id F251916A421; Thu, 3 Jan 2008 22:40:34 +0000 (UTC) Delivered-To: perforce@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id B7FC116A41A for ; Thu, 3 Jan 2008 22:40:34 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id A8C8C13C4CE for ; Thu, 3 Jan 2008 22:40:34 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.1/8.14.1) with ESMTP id m03MeYeI064937 for ; Thu, 3 Jan 2008 22:40:34 GMT (envelope-from hselasky@FreeBSD.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.1/8.14.1/Submit) id m03MeYbJ064934 for perforce@freebsd.org; Thu, 3 Jan 2008 22:40:34 GMT (envelope-from hselasky@FreeBSD.org) Date: Thu, 3 Jan 2008 22:40:34 GMT Message-Id: <200801032240.m03MeYbJ064934@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky To: Perforce Change Reviews Cc: Subject: PERFORCE change 132436 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 03 Jan 2008 22:40:35 -0000 http://perforce.freebsd.org/chv.cgi?CH=132436 Change 132436 by hselasky@hselasky_laptop001 on 2008/01/03 22:39:52 Small bugfix. "sc->sc_dci.sc_bus.bdev" will be cleared by "usb_detach", so we need to make a copy first and pass that when we delete the child. Affected files ... .. //depot/projects/usb/src/sys/arm/at91/at91_udp.c#4 edit Differences ... ==== //depot/projects/usb/src/sys/arm/at91/at91_udp.c#4 (text+ko) ==== @@ -258,12 +258,13 @@ at91_udp_detach(device_t dev) { struct at91_udp_softc *sc = device_get_softc(dev); + device_t bdev; int err; if (sc->sc_dci.sc_bus.bdev) { - device_detach(sc->sc_dci.sc_bus.bdev); - device_delete_child(dev, sc->sc_dci.sc_bus.bdev); - sc->sc_dci.sc_bus.bdev = NULL; + bdev = sc->sc_dci.sc_bus.bdev; + device_detach(bdev); + device_delete_child(dev, bdev); } /* during module unload there are lots of children leftover */ device_delete_all_children(dev); From owner-p4-projects@FreeBSD.ORG Thu Jan 3 23:09:04 2008 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 4174916A41B; Thu, 3 Jan 2008 23:09:04 +0000 (UTC) Delivered-To: perforce@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 0724916A418 for ; Thu, 3 Jan 2008 23:09:04 +0000 (UTC) (envelope-from imp@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id EBE4413C4D1 for ; Thu, 3 Jan 2008 23:09:03 +0000 (UTC) (envelope-from imp@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.1/8.14.1) with ESMTP id m03N93Qg072373 for ; Thu, 3 Jan 2008 23:09:03 GMT (envelope-from imp@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.1/8.14.1/Submit) id m03N93V5072370 for perforce@freebsd.org; Thu, 3 Jan 2008 23:09:03 GMT (envelope-from imp@freebsd.org) Date: Thu, 3 Jan 2008 23:09:03 GMT Message-Id: <200801032309.m03N93V5072370@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to imp@freebsd.org using -f From: Warner Losh To: Perforce Change Reviews Cc: Subject: PERFORCE change 132437 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 03 Jan 2008 23:09:04 -0000 http://perforce.freebsd.org/chv.cgi?CH=132437 Change 132437 by imp@imp_paco-paco on 2008/01/03 23:08:20 hack a little on clock.c, then punt. Not sure it is needed. down to one file. Woo Hoo! Affected files ... .. //depot/projects/mips2-jnpr/src/sys/conf/files.mips#3 edit .. //depot/projects/mips2-jnpr/src/sys/mips/mips/clock.c#3 edit Differences ... ==== //depot/projects/mips2-jnpr/src/sys/conf/files.mips#3 (text+ko) ==== @@ -56,7 +56,7 @@ # Phase 4 # ---------------------------------------------------------------------- # -mips/mips/clock.c standard +#mips/mips/clock.c standard #mips/mips/queue.c standard # ---------------------------------------------------------------------- # Phase 5 ==== //depot/projects/mips2-jnpr/src/sys/mips/mips/clock.c#3 (text+ko) ==== @@ -54,10 +54,6 @@ #include #include #include -#if 0 -#include -#include -#endif struct clk_ticks { u_long hard_ticks; @@ -148,6 +144,8 @@ } } +void mips_start_timer(void); + void mips_start_timer(void) { @@ -165,8 +163,6 @@ static void mips_timer_init(void) { - unsigned int ic_reg; - printf("mips_timer_init: starting the real time clock.\n"); /* From owner-p4-projects@FreeBSD.ORG Thu Jan 3 23:32:28 2008 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 92DC516A420; Thu, 3 Jan 2008 23:32:28 +0000 (UTC) Delivered-To: perforce@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 5824316A417 for ; Thu, 3 Jan 2008 23:32:28 +0000 (UTC) (envelope-from jb@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id 48AC813C447 for ; Thu, 3 Jan 2008 23:32:28 +0000 (UTC) (envelope-from jb@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.1/8.14.1) with ESMTP id m03NWS27073440 for ; Thu, 3 Jan 2008 23:32:28 GMT (envelope-from jb@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.1/8.14.1/Submit) id m03NWS9A073437 for perforce@freebsd.org; Thu, 3 Jan 2008 23:32:28 GMT (envelope-from jb@freebsd.org) Date: Thu, 3 Jan 2008 23:32:28 GMT Message-Id: <200801032332.m03NWS9A073437@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to jb@freebsd.org using -f From: John Birrell To: Perforce Change Reviews Cc: Subject: PERFORCE change 132439 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 03 Jan 2008 23:32:29 -0000 http://perforce.freebsd.org/chv.cgi?CH=132439 Change 132439 by jb@jb_freebsd1 on 2008/01/03 23:31:50 Use SMP_MAXCPU instead of MAXCPU which defaults to 1 outside a kernel build. Add a few checks for NULL pointers. Affected files ... .. //depot/projects/dtrace/src/sys/contrib/opensolaris/uts/common/dtrace/dtrace.c#9 edit Differences ... ==== //depot/projects/dtrace/src/sys/contrib/opensolaris/uts/common/dtrace/dtrace.c#9 (text) ==== @@ -270,7 +270,7 @@ #define vuprintf vprintf #define ttoproc(_a) ((_a)->td_proc) #define crgetzoneid(_a) 0 -#define NCPU 32 +#define NCPU SMP_MAXCPU #define SNOCD 0 #define CPU_ON_INTR(_a) 0 @@ -8901,10 +8901,14 @@ svarp[id] = NULL; } - kmem_free(dp->dtdo_buf, dp->dtdo_len * sizeof (dif_instr_t)); - kmem_free(dp->dtdo_inttab, dp->dtdo_intlen * sizeof (uint64_t)); - kmem_free(dp->dtdo_strtab, dp->dtdo_strlen); - kmem_free(dp->dtdo_vartab, dp->dtdo_varlen * sizeof (dtrace_difv_t)); + if (dp->dtdo_buf != NULL) + kmem_free(dp->dtdo_buf, dp->dtdo_len * sizeof (dif_instr_t)); + if (dp->dtdo_inttab != NULL) + kmem_free(dp->dtdo_inttab, dp->dtdo_intlen * sizeof (uint64_t)); + if (dp->dtdo_strtab != NULL) + kmem_free(dp->dtdo_strtab, dp->dtdo_strlen); + if (dp->dtdo_vartab != NULL) + kmem_free(dp->dtdo_vartab, dp->dtdo_varlen * sizeof (dtrace_difv_t)); kmem_free(dp, sizeof (dtrace_difo_t)); } @@ -10735,8 +10739,9 @@ kmem_free(ep, sizeof (dtrace_ecbdesc_t)); } - kmem_free(enab->dten_desc, - enab->dten_maxdesc * sizeof (dtrace_enabling_t *)); + if (enab->dten_desc != NULL) + kmem_free(enab->dten_desc, + enab->dten_maxdesc * sizeof (dtrace_enabling_t *)); /* * If this was a retained enabling, decrement the dts_nretained count From owner-p4-projects@FreeBSD.ORG Thu Jan 3 23:33:29 2008 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id BF8E716A46E; Thu, 3 Jan 2008 23:33:29 +0000 (UTC) Delivered-To: perforce@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 847FD16A469 for ; Thu, 3 Jan 2008 23:33:29 +0000 (UTC) (envelope-from jb@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id 7477513C461 for ; Thu, 3 Jan 2008 23:33:29 +0000 (UTC) (envelope-from jb@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.1/8.14.1) with ESMTP id m03NXTjb073514 for ; Thu, 3 Jan 2008 23:33:29 GMT (envelope-from jb@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.1/8.14.1/Submit) id m03NXT0N073511 for perforce@freebsd.org; Thu, 3 Jan 2008 23:33:29 GMT (envelope-from jb@freebsd.org) Date: Thu, 3 Jan 2008 23:33:29 GMT Message-Id: <200801032333.m03NXT0N073511@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to jb@freebsd.org using -f From: John Birrell To: Perforce Change Reviews Cc: Subject: PERFORCE change 132440 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 03 Jan 2008 23:33:30 -0000 http://perforce.freebsd.org/chv.cgi?CH=132440 Change 132440 by jb@jb_freebsd1 on 2008/01/03 23:33:11 Add a simple test for the cyclic_add_omni() call to fire timers on all CPUs. Affected files ... .. //depot/projects/dtrace/src/sys/cddl/kern/cyclic_test.c#3 edit Differences ... ==== //depot/projects/dtrace/src/sys/cddl/kern/cyclic_test.c#3 (text+ko) ==== @@ -45,7 +45,7 @@ nanotime(&ts); timespecsub(&ts,&test_001_start); - printf("%s: called after %lu.%09lu\n",__func__,(u_long) ts.tv_sec,(u_long) ts.tv_nsec); + printf("%s: called after %lu.%09lu on curcpu %d\n",__func__,(u_long) ts.tv_sec,(u_long) ts.tv_nsec, curcpu); } static void @@ -60,7 +60,6 @@ hdlr.cyh_func = (cyc_func_t) cyclic_test_001_func; hdlr.cyh_arg = 0; - hdlr.cyh_level = CY_LOW_LEVEL; when.cyt_when = 0; when.cyt_interval = 1000000000; @@ -84,13 +83,63 @@ printf("%s: %s\n",__func__, error == 0 ? "passed":"failed"); } +static struct timespec test_002_start; + +static void +cyclic_test_002_func(void *arg) +{ + struct timespec ts; + + nanotime(&ts); + timespecsub(&ts,&test_002_start); + printf("%s: called after %lu.%09lu on curcpu %d\n",__func__,(u_long) ts.tv_sec,(u_long) ts.tv_nsec, curcpu); +} + +static void +cyclic_test_002_online(void *arg, cpu_t *c, cyc_handler_t *hdlr, cyc_time_t *t) +{ + printf("%s: online on curcpu %d\n",__func__, curcpu); + hdlr->cyh_func = cyclic_test_002_func; + hdlr->cyh_arg = NULL; + t->cyt_when = 0; + t->cyt_interval = 1000000000; +} + +static void +cyclic_test_002_offline(void *arg, cpu_t *c, void *arg1) +{ + printf("%s: offline on curcpu %d\n",__func__, curcpu); +} + static void cyclic_test_002(void) { int error = 0; + cyc_omni_handler_t hdlr; + cyclic_id_t id; printf("%s: starting\n",__func__); - DELAY(60000000); + + hdlr.cyo_online = cyclic_test_002_online; + hdlr.cyo_offline = cyclic_test_002_offline; + hdlr.cyo_arg = NULL; + + nanotime(&test_002_start); + + mutex_enter(&cpu_lock); + + id = cyclic_add_omni(&hdlr); + + mutex_exit(&cpu_lock); + + DELAY(1200000); + + mutex_enter(&cpu_lock); + + cyclic_remove(id); + + mutex_exit(&cpu_lock); + printf("%s: %s\n",__func__, error == 0 ? "passed":"failed"); } @@ -180,3 +229,4 @@ DEV_MODULE(cyclic_test, cyclic_test_modevent, NULL); MODULE_VERSION(cyclic_test, 1); MODULE_DEPEND(cyclic_test, cyclic, 1, 1, 1); +MODULE_DEPEND(cyclic_test, opensolaris, 1, 1, 1); From owner-p4-projects@FreeBSD.ORG Thu Jan 3 23:35:32 2008 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 0946616A420; Thu, 3 Jan 2008 23:35:32 +0000 (UTC) Delivered-To: perforce@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id C2CBA16A41A for ; Thu, 3 Jan 2008 23:35:31 +0000 (UTC) (envelope-from jb@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id B2B5513C448 for ; Thu, 3 Jan 2008 23:35:31 +0000 (UTC) (envelope-from jb@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.1/8.14.1) with ESMTP id m03NZV9u073646 for ; Thu, 3 Jan 2008 23:35:31 GMT (envelope-from jb@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.1/8.14.1/Submit) id m03NZVMf073643 for perforce@freebsd.org; Thu, 3 Jan 2008 23:35:31 GMT (envelope-from jb@freebsd.org) Date: Thu, 3 Jan 2008 23:35:31 GMT Message-Id: <200801032335.m03NZVMf073643@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to jb@freebsd.org using -f From: John Birrell To: Perforce Change Reviews Cc: Subject: PERFORCE change 132441 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 03 Jan 2008 23:35:32 -0000 http://perforce.freebsd.org/chv.cgi?CH=132441 Change 132441 by jb@jb_freebsd1 on 2008/01/03 23:34:46 Add a hack to report if an attempt is being made to free a NULL pointer. I am so sick of seeing the DTrace kernel module do that before I've got it re-ported. Affected files ... .. //depot/projects/dtrace/src/sys/compat/opensolaris/kern/opensolaris_kmem.c#4 edit Differences ... ==== //depot/projects/dtrace/src/sys/compat/opensolaris/kern/opensolaris_kmem.c#4 (text+ko) ==== @@ -95,6 +95,10 @@ zfs_kmem_free(void *buf, size_t size __unused) { #ifdef KMEM_DEBUG + if (buf == NULL) { + printf("%s: attempt to free NULL\n",__func__); + return; + } struct kmem_item *i; buf = (u_char *)buf - sizeof(struct kmem_item); From owner-p4-projects@FreeBSD.ORG Thu Jan 3 23:36:33 2008 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 531A016A421; Thu, 3 Jan 2008 23:36:33 +0000 (UTC) Delivered-To: perforce@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 189EA16A418 for ; Thu, 3 Jan 2008 23:36:33 +0000 (UTC) (envelope-from jb@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id E4D4613C4E8 for ; Thu, 3 Jan 2008 23:36:32 +0000 (UTC) (envelope-from jb@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.1/8.14.1) with ESMTP id m03NaWRU073691 for ; Thu, 3 Jan 2008 23:36:32 GMT (envelope-from jb@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.1/8.14.1/Submit) id m03NaWcW073688 for perforce@freebsd.org; Thu, 3 Jan 2008 23:36:32 GMT (envelope-from jb@freebsd.org) Date: Thu, 3 Jan 2008 23:36:32 GMT Message-Id: <200801032336.m03NaWcW073688@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to jb@freebsd.org using -f From: John Birrell To: Perforce Change Reviews Cc: Subject: PERFORCE change 132442 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 03 Jan 2008 23:36:33 -0000 http://perforce.freebsd.org/chv.cgi?CH=132442 Change 132442 by jb@jb_freebsd1 on 2008/01/03 23:35:43 Map a couple of sysconf definitions to something which resembles them. Affected files ... .. //depot/projects/dtrace/src/contrib/opensolaris/lib/libdtrace/common/dtrace.h#7 edit Differences ... ==== //depot/projects/dtrace/src/contrib/opensolaris/lib/libdtrace/common/dtrace.h#7 (text) ==== @@ -572,4 +572,9 @@ } #endif +#if !defined(sun) +#define _SC_CPUID_MAX _SC_NPROCESSORS_CONF +#define _SC_NPROCESSORS_MAX _SC_NPROCESSORS_CONF +#endif + #endif /* _DTRACE_H */ From owner-p4-projects@FreeBSD.ORG Thu Jan 3 23:38:35 2008 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 94F6516A420; Thu, 3 Jan 2008 23:38:35 +0000 (UTC) Delivered-To: perforce@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 5A76116A418 for ; Thu, 3 Jan 2008 23:38:35 +0000 (UTC) (envelope-from jb@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id 3293113C4E3 for ; Thu, 3 Jan 2008 23:38:35 +0000 (UTC) (envelope-from jb@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.1/8.14.1) with ESMTP id m03NcZnI073786 for ; Thu, 3 Jan 2008 23:38:35 GMT (envelope-from jb@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.1/8.14.1/Submit) id m03NcZxT073783 for perforce@freebsd.org; Thu, 3 Jan 2008 23:38:35 GMT (envelope-from jb@freebsd.org) Date: Thu, 3 Jan 2008 23:38:35 GMT Message-Id: <200801032338.m03NcZxT073783@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to jb@freebsd.org using -f From: John Birrell To: Perforce Change Reviews Cc: Subject: PERFORCE change 132443 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 03 Jan 2008 23:38:35 -0000 http://perforce.freebsd.org/chv.cgi?CH=132443 Change 132443 by jb@jb_freebsd1 on 2008/01/03 23:37:47 This isn't required now that we share a kmem implementation with zfs via the opensolaris kernel module. Affected files ... .. //depot/projects/dtrace/src/sys/cddl/kern/kmem.c#3 delete Differences ... From owner-p4-projects@FreeBSD.ORG Thu Jan 3 23:39:36 2008 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id AA80116A420; Thu, 3 Jan 2008 23:39:36 +0000 (UTC) Delivered-To: perforce@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 6FF6216A419 for ; Thu, 3 Jan 2008 23:39:36 +0000 (UTC) (envelope-from jb@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id 6001B13C469 for ; Thu, 3 Jan 2008 23:39:36 +0000 (UTC) (envelope-from jb@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.1/8.14.1) with ESMTP id m03Ndaj7073875 for ; Thu, 3 Jan 2008 23:39:36 GMT (envelope-from jb@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.1/8.14.1/Submit) id m03NdaJ7073872 for perforce@freebsd.org; Thu, 3 Jan 2008 23:39:36 GMT (envelope-from jb@freebsd.org) Date: Thu, 3 Jan 2008 23:39:36 GMT Message-Id: <200801032339.m03NdaJ7073872@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to jb@freebsd.org using -f From: John Birrell To: Perforce Change Reviews Cc: Subject: PERFORCE change 132444 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 03 Jan 2008 23:39:36 -0000 http://perforce.freebsd.org/chv.cgi?CH=132444 Change 132444 by jb@jb_freebsd1 on 2008/01/03 23:38:54 Comment out the installation of the library D scripts until they are re-ported. The implementation has changed. Affected files ... .. //depot/projects/dtrace/src/cddl/lib/libdtrace/Makefile#17 edit Differences ... ==== //depot/projects/dtrace/src/cddl/lib/libdtrace/Makefile#17 (text+ko) ==== @@ -88,11 +88,11 @@ beforedepend: dt_errtags.c dt_names.c -beforeinstall: -.if exists(${DESTDIR}/usr/lib/dtrace) -.for file in ${DSRCS} - ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m ${NOBINMODE} ${.CURDIR}/${file} ${DESTDIR}/usr/lib/dtrace -.endfor -.endif +#beforeinstall: +#.if exists(${DESTDIR}/usr/lib/dtrace) +#.for file in ${DSRCS} +# ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m ${NOBINMODE} ${.CURDIR}/${file} ${DESTDIR}/usr/lib/dtrace +#.endfor +#.endif .include From owner-p4-projects@FreeBSD.ORG Thu Jan 3 23:44:42 2008 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 6FE2016A418; Thu, 3 Jan 2008 23:44:42 +0000 (UTC) Delivered-To: perforce@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 3596116A504 for ; Thu, 3 Jan 2008 23:44:42 +0000 (UTC) (envelope-from imp@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id 2632113C465 for ; Thu, 3 Jan 2008 23:44:42 +0000 (UTC) (envelope-from imp@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.1/8.14.1) with ESMTP id m03NigoA074188 for ; Thu, 3 Jan 2008 23:44:42 GMT (envelope-from imp@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.1/8.14.1/Submit) id m03NiflL074185 for perforce@freebsd.org; Thu, 3 Jan 2008 23:44:41 GMT (envelope-from imp@freebsd.org) Date: Thu, 3 Jan 2008 23:44:41 GMT Message-Id: <200801032344.m03NiflL074185@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to imp@freebsd.org using -f From: Warner Losh To: Perforce Change Reviews Cc: Subject: PERFORCE change 132446 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 03 Jan 2008 23:44:42 -0000 http://perforce.freebsd.org/chv.cgi?CH=132446 Change 132446 by imp@imp_paco-paco on 2008/01/03 23:44:05 Checkpoint the easy fixes to malta_machdep.c Affected files ... .. //depot/projects/mips2-jnpr/src/sys/mips/include/cpu.h#6 edit .. //depot/projects/mips2-jnpr/src/sys/mips/mips32/malta/malta_machdep.c#2 edit Differences ... ==== //depot/projects/mips2-jnpr/src/sys/mips/include/cpu.h#6 (text+ko) ==== @@ -67,9 +67,10 @@ #define MIPS_VA_TO_CINDEX(x) ((unsigned)(x) & 0xffffff | MIPS_CACHED_MEMORY_ADDR) #define MIPS_CACHED_TO_UNCACHED(x) (MIPS_PHYS_TO_UNCACHED(MIPS_CACHED_TO_PHYS(x))) -#define MIPS_PHYS_TO_KSEG0(x) ((x) | MIPS_KSEG0_START) -#define MIPS_PHYS_TO_KSEG1(x) ((x) | MIPS_KSEG1_START) -#define MIPS_KSEG1_TO_PHYS(x) ((x) & MIPS_PHYS_MASK) +#define MIPS_PHYS_TO_KSEG0(x) ((unsigned)(x) | MIPS_KSEG0_START) +#define MIPS_PHYS_TO_KSEG1(x) ((unsigned)(x) | MIPS_KSEG1_START) +#define MIPS_KSEG0_TO_PHYS(x) ((unsigned)(x) & MIPS_PHYS_MASK) +#define MIPS_KSEG1_TO_PHYS(x) ((unsigned)(x) & MIPS_PHYS_MASK) /* * Status register. ==== //depot/projects/mips2-jnpr/src/sys/mips/mips32/malta/malta_machdep.c#2 (text+ko) ==== @@ -57,6 +57,7 @@ #include #include +#include #include #include #include From owner-p4-projects@FreeBSD.ORG Thu Jan 3 23:56:55 2008 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 7055316A41B; Thu, 3 Jan 2008 23:56:55 +0000 (UTC) Delivered-To: perforce@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 332DC16A418 for ; Thu, 3 Jan 2008 23:56:55 +0000 (UTC) (envelope-from jb@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id 21EAE13C459 for ; Thu, 3 Jan 2008 23:56:55 +0000 (UTC) (envelope-from jb@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.1/8.14.1) with ESMTP id m03Nutxs074674 for ; Thu, 3 Jan 2008 23:56:55 GMT (envelope-from jb@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.1/8.14.1/Submit) id m03NusaD074671 for perforce@freebsd.org; Thu, 3 Jan 2008 23:56:54 GMT (envelope-from jb@freebsd.org) Date: Thu, 3 Jan 2008 23:56:54 GMT Message-Id: <200801032356.m03NusaD074671@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to jb@freebsd.org using -f From: John Birrell To: Perforce Change Reviews Cc: Subject: PERFORCE change 132447 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 03 Jan 2008 23:56:55 -0000 http://perforce.freebsd.org/chv.cgi?CH=132447 Change 132447 by jb@jb_freebsd1 on 2008/01/03 23:56:36 Remove the OpenSolaris version of the cyclic subsystem in favour of a reduced functionality, FreeBSD-specific version. The cyclic requirement in FreeBSD is currently limited to the 'dtrace' module and the DTrace 'profile' provider. The latter needs to be able to fire timesr on one CPU or all CPUs. OpenSolaris uses the cyclic timer subsystem for a lot more than this, so obviously it's feature set is very much larger. In FreeBSD, we don't have the provision to enable and disable CPUs. We don't need to suspend and resume the cyclic timer subsystem. We don't need to juggle cyclics from one CPU to another. We don't have the concept for CPU partitions. Of course, one day we could add all that. :-) The area where the design of the OpenSolaris cyclic subsystem really bites us in it's basis on interrupt levels, processor levels or protection levels or whatever you choose to call them. They are all CPU-specific, so the OpenSolaris cyclic code tends to cross call over to the target CPU to do things that it needs to protect by setting a spl/ipl. In FreeBSD, we have a SMP model which uses locking(9) functions in place of spl/ipl etc. As a result, locking the cyclic operation is better done in a different way. For the FreeBSD-specific cyclic timer, I have removed all concept of interrupt levels. This means that much of the complexity of the OpenSolaris system is removed, perhaps with a performance penalty. I'm not sure of that. in OpenSolaris, they got to some length to avoid locking in the most executed path (adding and firing). For FreeBSD I have added a spinlock to each cyclic CPU structure. The addition, removal and firing of timers all lock the CPU specific spinlock. I assume this has a low performance impact because there should be little lock contention. As a result, the resizing of the buffers for a target CPU can occur on any CPU. The only time that a cross CPU call is required is to notify the target CPU that it's backend timer has been reprogrammed, enabled or disabled. Since the per-CPU locks are spinlocks, this limits the types of operations that a timer handler can perform. Allocating memory with wait is an obvious one which isn't allowed. I'll have to wait and see if that works our OK for the couple of uses listed above. Note that Apple uses their own kernel timers rather than a port of the cyclic device in their DTrace implementation. Affected files ... .. //depot/projects/dtrace/src/sys/cddl/amd64/cyclic_machdep.c#7 edit .. //depot/projects/dtrace/src/sys/cddl/kern/cyclic.c#6 add .. //depot/projects/dtrace/src/sys/cddl/kern/kern_cyclic.c#10 delete .. //depot/projects/dtrace/src/sys/compat/opensolaris/sys/cyclic.h#2 edit .. //depot/projects/dtrace/src/sys/compat/opensolaris/sys/cyclic_impl.h#2 edit .. //depot/projects/dtrace/src/sys/contrib/opensolaris/uts/common/os/cyclic.c#14 delete .. //depot/projects/dtrace/src/sys/contrib/opensolaris/uts/common/sys/cyclic.h#9 delete .. //depot/projects/dtrace/src/sys/contrib/opensolaris/uts/common/sys/cyclic_impl.h#4 delete .. //depot/projects/dtrace/src/sys/modules/cyclic/Makefile#7 edit Differences ... ==== //depot/projects/dtrace/src/sys/cddl/amd64/cyclic_machdep.c#7 (text+ko) ==== @@ -26,65 +26,23 @@ * */ -static cyb_arg_t configure(cpu_t *); -static void unconfigure(cyb_arg_t); static void enable(cyb_arg_t); static void disable(cyb_arg_t); static void reprogram(cyb_arg_t, hrtime_t); -static void softint(cyb_arg_t, cyc_level_t); -static cyc_cookie_t set_level(cyb_arg_t, cyc_level_t); -static void restore_level(cyb_arg_t, cyc_cookie_t); static void xcall(cyb_arg_t, cpu_t *, cyc_func_t, void *); -static void suspend(cyb_arg_t); -static void resume(cyb_arg_t); static void cyclic_clock(void); static cyc_backend_t be = { - configure, - unconfigure, + NULL, /* cyb_configure */ + NULL, /* cyb_unconfigure */ enable, disable, reprogram, - softint, - set_level, - restore_level, xcall, - suspend, - resume, NULL /* cyb_arg_t cyb_arg */ }; -static void *cyclic_lock_ih; -static void *cyclic_low_ih; - -/* - * Software interrupt callbacks. - */ static void -cyclic_swi_low(void *dummy) -{ - cpu_t *c = &solaris_cpu[curcpu]; - - c->cpu_intr_actv |= (1 << CY_LOW_LEVEL); - - cyclic_softint(c, CY_LOW_LEVEL); - - c->cpu_intr_actv &= ~(1 << CY_LOW_LEVEL); -} - -static void -cyclic_swi_lock(void *dummy) -{ - cpu_t *c = &solaris_cpu[curcpu]; - - c->cpu_intr_actv |= (1 << CY_LOCK_LEVEL); - - cyclic_softint(c, CY_LOCK_LEVEL); - - c->cpu_intr_actv &= ~(1 << CY_LOCK_LEVEL); -} - -static void cyclic_ap_start(void *dummy) { /* Initialise the rest of the CPUs. */ @@ -99,20 +57,8 @@ static void cyclic_machdep_init(void) { - /* - * Add a software interrupt handlers for low priority cyclic - * events. - */ - swi_add(&clk_intr_event, "low cyclic", cyclic_swi_low, NULL, - SWI_TQ, 0, &cyclic_low_ih); - swi_add(&clk_intr_event, "lock cyclic", cyclic_swi_lock, NULL, - SWI_TQ_FAST, 0, &cyclic_lock_ih); - - /* - * Register the cyclic backend. Note that the resolution argument - * is only used on Solaris, so we don't bother with that. - */ - cyclic_init(&be, 0); + /* Register the cyclic backend. */ + cyclic_init(&be); } static void @@ -120,27 +66,12 @@ { int i; - for (i = 0; i < mp_maxid; i++) + for (i = 0; i <= mp_maxid; i++) /* Reset the cyclic clock callback hook. */ lapic_cyclic_clock_func[i] = NULL; /* De-register the cyclic backend. */ cyclic_uninit(); - - /* Remove the software interrupt handlers. */ - swi_remove(cyclic_low_ih); - swi_remove(cyclic_lock_ih); -} - -static cyb_arg_t configure(cpu_t *c) -{ - - return (NULL); -} - -static void unconfigure(cyb_arg_t arg) -{ - } static void enable(cyb_arg_t arg) @@ -155,38 +86,10 @@ lapic_cyclic_clock_func[curcpu] = NULL; } -static void reprogram(cyb_arg_t arg, hrtime_t interval) +static hrtime_t exp_due[SMP_MAXCPU]; +static void reprogram(cyb_arg_t arg, hrtime_t exp) { - /* XXX */ -} - -static void softint(cyb_arg_t arg, cyc_level_t level) -{ - /* - * Schedule the software interrupt processing at the - * requested level. - */ - switch (level) { - case CY_LOW_LEVEL: - swi_sched(cyclic_low_ih, 0); - break; - case CY_LOCK_LEVEL: - swi_sched(cyclic_lock_ih, 0); - break; - default: - printf("%s:%s(%d): unexpected soft level %d\n",__FUNCTION__,__FILE__,__LINE__,level); - break; - } -} - -static cyc_cookie_t set_level(cyb_arg_t arg, cyc_level_t level) -{ - return (intr_disable()); -} - -static void restore_level(cyb_arg_t arg, cyc_cookie_t cookie) -{ - intr_restore(cookie); + exp_due[curcpu] = exp; } static void xcall(cyb_arg_t arg, cpu_t *c, cyc_func_t func, void *param) @@ -202,11 +105,3 @@ func, NULL, param); } -static void suspend(cyb_arg_t arg) -{ -} - -static void resume(cyb_arg_t arg) -{ -} - ==== //depot/projects/dtrace/src/sys/compat/opensolaris/sys/cyclic.h#2 (text+ko) ==== @@ -1,31 +1,31 @@ /* - * Copyright (C) 2007 John Birrell - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * - * THIS SOFTWARE IS PROVIDED BY AUTHOR AND CONTRIBUTORS ``AS IS'' AND - * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL AUTHOR OR CONTRIBUTORS BE LIABLE - * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY - * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. + * CDDL HEADER START + * + * The contents of this file are subject to the terms of the + * Common Development and Distribution License, Version 1.0 only + * (the "License"). You may not use this file except in compliance + * with the License. + * + * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE + * or http://www.opensolaris.org/os/licensing. + * See the License for the specific language governing permissions + * and limitations under the License. + * + * When distributing Covered Code, include this CDDL HEADER in each + * file and include the License file at usr/src/OPENSOLARIS.LICENSE. + * If applicable, add the following below this CDDL HEADER, with the + * fields enclosed by brackets "[]" replaced with your own identifying + * information: Portions Copyright [yyyy] [name of copyright owner] + * + * CDDL HEADER END * - * $FreeBSD: src/sys/compat/opensolaris/sys/cyclic.h,v 1.1 2007/11/28 21:50:40 jb Exp $ + * $FreeBSD$ * */ +/* + * Copyright (c) 1999-2001 by Sun Microsystems, Inc. + * All rights reserved. + */ #ifndef _COMPAT_OPENSOLARIS_SYS_CYCLIC_H_ #define _COMPAT_OPENSOLARIS_SYS_CYCLIC_H_ @@ -34,6 +34,46 @@ typedef void cpu_t; #endif -#include_next + +#ifndef _ASM +#include +#include +#endif /* !_ASM */ + +#ifndef _ASM + +typedef uintptr_t cyclic_id_t; +typedef int cyc_index_t; +typedef uint16_t cyc_level_t; +typedef void (*cyc_func_t)(void *); +typedef void *cyb_arg_t; + +#define CYCLIC_NONE ((cyclic_id_t)0) + +typedef struct cyc_handler { + cyc_func_t cyh_func; + void *cyh_arg; +} cyc_handler_t; + +typedef struct cyc_time { + hrtime_t cyt_when; + hrtime_t cyt_interval; +} cyc_time_t; + +typedef struct cyc_omni_handler { + void (*cyo_online)(void *, cpu_t *, cyc_handler_t *, cyc_time_t *); + void (*cyo_offline)(void *, cpu_t *, void *); + void *cyo_arg; +} cyc_omni_handler_t; + +#ifdef _KERNEL + +cyclic_id_t cyclic_add(cyc_handler_t *, cyc_time_t *); +cyclic_id_t cyclic_add_omni(cyc_omni_handler_t *); +void cyclic_remove(cyclic_id_t); + +#endif /* _KERNEL */ + +#endif /* !_ASM */ #endif ==== //depot/projects/dtrace/src/sys/compat/opensolaris/sys/cyclic_impl.h#2 (text+ko) ==== @@ -1,41 +1,305 @@ /* - * Copyright (C) 2007 John Birrell - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * - * THIS SOFTWARE IS PROVIDED BY AUTHOR AND CONTRIBUTORS ``AS IS'' AND - * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL AUTHOR OR CONTRIBUTORS BE LIABLE - * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY - * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. + * CDDL HEADER START + * + * The contents of this file are subject to the terms of the + * Common Development and Distribution License, Version 1.0 only + * (the "License"). You may not use this file except in compliance + * with the License. + * + * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE + * or http://www.opensolaris.org/os/licensing. + * See the License for the specific language governing permissions + * and limitations under the License. + * + * When distributing Covered Code, include this CDDL HEADER in each + * file and include the License file at usr/src/OPENSOLARIS.LICENSE. + * If applicable, add the following below this CDDL HEADER, with the + * fields enclosed by brackets "[]" replaced with your own identifying + * information: Portions Copyright [yyyy] [name of copyright owner] + * + * CDDL HEADER END * - * $FreeBSD: src/sys/compat/opensolaris/sys/cyclic.h,v 1.1 2007/11/28 21:50:40 jb Exp $ + * $FreeBSD$ * */ +/* + * Copyright 2004 Sun Microsystems, Inc. All rights reserved. + * Use is subject to license terms. + */ #ifndef _COMPAT_OPENSOLARIS_SYS_CYCLIC_IMPL_H_ #define _COMPAT_OPENSOLARIS_SYS_CYCLIC_IMPL_H_ -#include -#include -#include -#include -#include +#include + +/* + * Cyclic Subsystem Backend-supplied Interfaces + * -------------------------------------------- + * + * 0 Background + * + * The design, implementation and interfaces of the cyclic subsystem are + * covered in detail in block comments in the implementation. This + * comment covers the interface from the cyclic subsystem into the cyclic + * backend. The backend is specified by a structure of function pointers + * defined below. + * + * 1 Overview + * + * cyb_configure() <-- Configures the backend on the specified CPU + * cyb_unconfigure() <-- Unconfigures the backend + * cyb_enable() <-- Enables the CY_HIGH_LEVEL interrupt source + * cyb_disable() <-- Disables the CY_HIGH_LEVEL interrupt source + * cyb_reprogram() <-- Reprograms the CY_HIGH_LEVEL interrupt source + * cyb_xcall() <-- Cross calls to the specified CPU + * + * 2 cyb_arg_t cyb_configure(cpu_t *) + * + * 2.1 Overview + * + * cyb_configure() should configure the specified CPU for cyclic operation. + * + * 2.2 Arguments and notes + * + * cyb_configure() should initialize any backend-specific per-CPU + * structures for the specified CPU. cyb_configure() will be called for + * each CPU (including the boot CPU) during boot. If the platform + * supports dynamic reconfiguration, cyb_configure() will be called for + * new CPUs as they are configured into the system. + * + * 2.3 Return value + * + * cyb_configure() is expected to return a cookie (a cyb_arg_t, which is + * of type void *) which will be used as the first argument for all future + * cyclic calls into the backend on the specified CPU. + * + * 2.4 Caller's context + * + * cpu_lock will be held. The caller's CPU is unspecified, and may or + * may not be the CPU specified to cyb_configure(). + * + * 3 void cyb_unconfigure(cyb_arg_t arg) + * + * 3.1 Overview + * + * cyb_unconfigure() should unconfigure the specified backend. + * + * 3.2 Arguments and notes + * + * The only argument to cyb_unconfigure() is a cookie as returned from + * cyb_configure(). + * + * cyb_unconfigure() should free any backend-specific per-CPU structures + * for the specified backend. cyb_unconfigure() will _only_ be called on + * platforms which support dynamic reconfiguration. If the platform does + * not support dynamic reconfiguration, cyb_unconfigure() may panic. + * + * After cyb_unconfigure() returns, the backend must not call cyclic_fire() + * on the corresponding CPU; doing so will result in a bad trap. + * + * 3.3 Return value + * + * None. + * + * 3.4 Caller's context + * + * cpu_lock will be held. The caller's CPU is unspecified, and may or + * may not be the CPU specified to cyb_unconfigure(). The specified + * CPU is guaranteed to exist at the time cyb_unconfigure() is called. + * The cyclic subsystem is guaranteed to be suspended when cyb_unconfigure() + * is called, and interrupts are guaranteed to be disabled. + * + * 4 void cyb_enable(cyb_arg_t arg) + * + * 4.1 Overview + * + * cyb_enable() should enable the CY_HIGH_LEVEL interrupt source on + * the specified backend. + * + * 4.2 Arguments and notes + * + * The only argument to cyb_enable() is a backend cookie as returned from + * cyb_configure(). + * + * cyb_enable() will only be called if a) the specified backend has never + * been enabled or b) the specified backend has been explicitly disabled with + * cyb_disable(). In either case, cyb_enable() will only be called if + * the cyclic subsystem wishes to add a cyclic to the CPU corresponding + * to the specified backend. cyb_enable() will be called before + * cyb_reprogram() for a given backend. + * + * cyclic_fire() should not be called on a CPU which has not had its backend + * explicitly cyb_enable()'d, but to do so does not constitute fatal error. + * + * 4.3 Return value + * + * None. + * + * 4.4 Caller's context + * + * cyb_enable() will only be called from CY_HIGH_LEVEL context on the CPU + * corresponding to the specified backend. + * + * 5 void cyb_disable(cyb_arg_t arg) + * + * 5.1 Overview + * + * cyb_disable() should disable the CY_HIGH_LEVEL interrupt source on + * the specified backend. + * + * 5.2 Arguments and notes + * + * The only argument to cyb_disable() is a backend cookie as returned from + * cyb_configure(). + * + * cyb_disable() will only be called on backends which have been previously + * been cyb_enable()'d. cyb_disable() will be called when all cyclics have + * been juggled away or removed from a cyb_enable()'d CPU. + * + * cyclic_fire() should not be called on a CPU which has had its backend + * explicitly cyb_disable()'d, but to do so does not constitute fatal + * error. cyb_disable() is thus not required to check for a pending + * CY_HIGH_LEVEL interrupt. + * + * 5.3 Return value + * + * None. + * + * 5.4 Caller's context + * + * cyb_disable() will only be called from CY_HIGH_LEVEL context on the CPU + * corresponding to the specified backend. + * + * 6 void cyb_reprogram(cyb_arg_t arg, hrtime_t time) + * + * 6.1 Overview + * + * cyb_reprogram() should reprogram the CY_HIGH_LEVEL interrupt source + * to fire at the absolute time specified. + * + * 6.2 Arguments and notes + * + * The first argument to cyb_reprogram() is a backend cookie as returned from + * cyb_configure(). + * + * The second argument is an absolute time at which the CY_HIGH_LEVEL + * interrupt should fire. The specified time _may_ be in the past (albeit + * the very recent past). If this is the case, the backend should generate + * a CY_HIGH_LEVEL interrupt as soon as possible. + * + * The platform should not assume that cyb_reprogram() will be called with + * monotonically increasing values. + * + * If the platform does not allow for interrupts at arbitrary times in the + * future, cyb_reprogram() may do nothing -- as long as cyclic_fire() is + * called periodically at CY_HIGH_LEVEL. While this is clearly suboptimal + * (cyclic granularity will be bounded by the length of the period between + * cyclic_fire()'s), it allows the cyclic subsystem to be implemented on + * inferior hardware. + * + * 6.3 Return value + * + * None. + * + * 6.4 Caller's context + * + * cyb_reprogram() will only be called from CY_HIGH_LEVEL context on the CPU + * corresponding to the specified backend. + * + * 10 cyb_xcall(cyb_arg_t arg, cpu_t *, void(*func)(void *), void *farg) + * + * 10.1 Overview + * + * cyb_xcall() should execute the specified function on the specified CPU. + * + * 10.2 Arguments and notes + * + * The first argument to cyb_restore_level() is a backend cookie as returned + * from cyb_configure(). The second argument is a CPU on which the third + * argument, a function pointer, should be executed. The fourth argument, + * a void *, should be passed as the argument to the specified function. + * + * cyb_xcall() must provide exactly-once semantics. If the specified + * function is called more than once, or not at all, the cyclic subsystem + * will become internally inconsistent. The specified function must be + * be executed on the specified CPU, but may be executed in any context + * (any interrupt context or kernel context). + * + * cyb_xcall() cannot block. Any resources which cyb_xcall() needs to + * acquire must thus be protected by synchronization primitives which + * never require the caller to block. + * + * 10.3 Return value + * + * None. + * + * 10.4 Caller's context + * + * cpu_lock will be held and kernel preemption may be disabled. The caller + * may be unable to block, giving rise to the constraint outlined in + * 10.2, above. + * + */ +typedef struct cyc_backend { + cyb_arg_t (*cyb_configure)(cpu_t *); + void (*cyb_unconfigure)(cyb_arg_t); + void (*cyb_enable)(cyb_arg_t); + void (*cyb_disable)(cyb_arg_t); + void (*cyb_reprogram)(cyb_arg_t, hrtime_t); + void (*cyb_xcall)(cyb_arg_t, cpu_t *, cyc_func_t, void *); + cyb_arg_t cyb_arg; +} cyc_backend_t; + +#define CYF_FREE 0x0001 + +typedef struct cyclic { + hrtime_t cy_expire; + hrtime_t cy_interval; + void (*cy_handler)(void *); + void *cy_arg; + uint16_t cy_flags; +} cyclic_t; + +typedef struct cyc_cpu { + cpu_t *cyp_cpu; + cyc_index_t *cyp_heap; + cyclic_t *cyp_cyclics; + cyc_index_t cyp_nelems; + cyc_index_t cyp_size; + cyc_backend_t *cyp_backend; + struct mtx cyp_mtx; +} cyc_cpu_t; + +typedef struct cyc_omni_cpu { + cyc_cpu_t *cyo_cpu; + cyc_index_t cyo_ndx; + void *cyo_arg; + struct cyc_omni_cpu *cyo_next; +} cyc_omni_cpu_t; + +typedef struct cyc_id { + cyc_cpu_t *cyi_cpu; + cyc_index_t cyi_ndx; + struct cyc_id *cyi_prev; + struct cyc_id *cyi_next; + cyc_omni_handler_t cyi_omni_hdlr; + cyc_omni_cpu_t *cyi_omni_list; +} cyc_id_t; + +typedef struct cyc_xcallarg { + cyc_cpu_t *cyx_cpu; + hrtime_t cyx_exp; + volatile int cyx_wait; +} cyc_xcallarg_t; + +#define CY_DEFAULT_PERCPU 1 +#define CY_PASSIVE_LEVEL -1 + +#define CY_WAIT 0 +#define CY_NOWAIT 1 -#include_next +#define CYC_HEAP_PARENT(ndx) (((ndx) - 1) >> 1) +#define CYC_HEAP_RIGHT(ndx) (((ndx) + 1) << 1) +#define CYC_HEAP_LEFT(ndx) ((((ndx) + 1) << 1) - 1) #endif ==== //depot/projects/dtrace/src/sys/modules/cyclic/Makefile#7 (text+ko) ==== @@ -1,17 +1,15 @@ # $FreeBSD# -.PATH: ${.CURDIR}/../../contrib/opensolaris/uts/common/os -.PATH: ${.CURDIR}/../../compat/opensolaris/kern +.PATH: ${.CURDIR}/../../cddl/kern KMOD= cyclic SRCS= cyclic.c -SRCS+= bus_if.h device_if.h vnode_if.h +SRCS+= vnode_if.h CFLAGS+= -I${.CURDIR}/../../compat/opensolaris \ -I${.CURDIR}/../../contrib/opensolaris/uts/common \ -I${.CURDIR}/../.. \ - -I${.CURDIR}/../../cddl/kern \ -I${.CURDIR}/../../cddl/${MACHINE_ARCH} CFLAGS+= -DDEBUG=1 From owner-p4-projects@FreeBSD.ORG Fri Jan 4 00:01:00 2008 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id E287016A420; Fri, 4 Jan 2008 00:00:59 +0000 (UTC) Delivered-To: perforce@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 8D2B016A417 for ; Fri, 4 Jan 2008 00:00:59 +0000 (UTC) (envelope-from jb@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id 6468213C44B for ; Fri, 4 Jan 2008 00:00:59 +0000 (UTC) (envelope-from jb@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.1/8.14.1) with ESMTP id m0400xX1074869 for ; Fri, 4 Jan 2008 00:00:59 GMT (envelope-from jb@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.1/8.14.1/Submit) id m0400xNp074866 for perforce@freebsd.org; Fri, 4 Jan 2008 00:00:59 GMT (envelope-from jb@freebsd.org) Date: Fri, 4 Jan 2008 00:00:59 GMT Message-Id: <200801040000.m0400xNp074866@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to jb@freebsd.org using -f From: John Birrell To: Perforce Change Reviews Cc: Subject: PERFORCE change 132448 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 04 Jan 2008 00:01:00 -0000 http://perforce.freebsd.org/chv.cgi?CH=132448 Change 132448 by jb@jb_freebsd1 on 2008/01/04 00:00:55 Scrap these from here too. Affected files ... .. //depot/projects/opensolaris/src/sys/contrib/opensolaris/uts/common/os/cyclic.c#2 delete .. //depot/projects/opensolaris/src/sys/contrib/opensolaris/uts/common/sys/cyclic.h#3 delete .. //depot/projects/opensolaris/src/sys/contrib/opensolaris/uts/common/sys/cyclic_impl.h#2 delete Differences ... From owner-p4-projects@FreeBSD.ORG Fri Jan 4 00:12:13 2008 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id C43AC16A419; Fri, 4 Jan 2008 00:12:12 +0000 (UTC) Delivered-To: perforce@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 6EC5E16A417 for ; Fri, 4 Jan 2008 00:12:12 +0000 (UTC) (envelope-from jb@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id 5DE0113C442 for ; Fri, 4 Jan 2008 00:12:12 +0000 (UTC) (envelope-from jb@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.1/8.14.1) with ESMTP id m040CCvr077021 for ; Fri, 4 Jan 2008 00:12:12 GMT (envelope-from jb@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.1/8.14.1/Submit) id m040CBji077018 for perforce@freebsd.org; Fri, 4 Jan 2008 00:12:11 GMT (envelope-from jb@freebsd.org) Date: Fri, 4 Jan 2008 00:12:11 GMT Message-Id: <200801040012.m040CBji077018@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to jb@freebsd.org using -f From: John Birrell To: Perforce Change Reviews Cc: Subject: PERFORCE change 132450 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 04 Jan 2008 00:12:13 -0000 http://perforce.freebsd.org/chv.cgi?CH=132450 Change 132450 by jb@jb_freebsd1 on 2008/01/04 00:11:15 IFC Affected files ... .. //depot/projects/dtrace/src/lib/libarchive/archive_endian.h#1 branch .. //depot/projects/dtrace/src/lib/libarchive/archive_read.c#10 integrate .. //depot/projects/dtrace/src/lib/libarchive/archive_read_private.h#2 integrate .. //depot/projects/dtrace/src/lib/libarchive/archive_read_support_format_zip.c#10 integrate .. //depot/projects/dtrace/src/lib/libc/stdlib/malloc.3#9 integrate .. //depot/projects/dtrace/src/lib/libc/stdlib/malloc.c#16 integrate .. //depot/projects/dtrace/src/share/man/man5/boot.config.5#2 integrate .. //depot/projects/dtrace/src/sys/amd64/amd64/pmap.c#29 integrate .. //depot/projects/dtrace/src/sys/arm/arm/pmap.c#25 integrate .. //depot/projects/dtrace/src/sys/i386/i386/pmap.c#25 integrate .. //depot/projects/dtrace/src/sys/ia64/ia64/pmap.c#12 integrate .. //depot/projects/dtrace/src/sys/kern/kern_descrip.c#14 integrate .. //depot/projects/dtrace/src/sys/kern/uipc_debug.c#2 integrate .. //depot/projects/dtrace/src/sys/powerpc/powerpc/pmap_dispatch.c#10 integrate .. //depot/projects/dtrace/src/sys/sparc64/sparc64/pmap.c#15 integrate .. //depot/projects/dtrace/src/sys/sun4v/sun4v/pmap.c#26 integrate .. //depot/projects/dtrace/src/sys/ufs/ffs/ffs_balloc.c#6 integrate .. //depot/projects/dtrace/src/sys/vm/pmap.h#10 integrate .. //depot/projects/dtrace/src/sys/vm/vm_fault.c#13 integrate .. //depot/projects/dtrace/src/sys/vm/vm_kern.c#9 integrate .. //depot/projects/dtrace/src/usr.bin/netstat/atalk.c#6 integrate .. //depot/projects/dtrace/src/usr.bin/netstat/bpf.c#7 integrate .. //depot/projects/dtrace/src/usr.bin/netstat/if.c#7 integrate .. //depot/projects/dtrace/src/usr.bin/netstat/inet.c#8 integrate .. //depot/projects/dtrace/src/usr.bin/netstat/inet6.c#7 integrate .. //depot/projects/dtrace/src/usr.bin/netstat/ipsec.c#7 integrate .. //depot/projects/dtrace/src/usr.bin/netstat/ipx.c#6 integrate .. //depot/projects/dtrace/src/usr.bin/netstat/main.c#6 integrate .. //depot/projects/dtrace/src/usr.bin/netstat/mbuf.c#6 integrate .. //depot/projects/dtrace/src/usr.bin/netstat/mcast.c#6 integrate .. //depot/projects/dtrace/src/usr.bin/netstat/mroute.c#7 integrate .. //depot/projects/dtrace/src/usr.bin/netstat/mroute6.c#7 integrate .. //depot/projects/dtrace/src/usr.bin/netstat/netgraph.c#6 integrate .. //depot/projects/dtrace/src/usr.bin/netstat/netstat.h#6 integrate .. //depot/projects/dtrace/src/usr.bin/netstat/pfkey.c#7 integrate .. //depot/projects/dtrace/src/usr.bin/netstat/route.c#8 integrate .. //depot/projects/dtrace/src/usr.bin/netstat/sctp.c#3 integrate .. //depot/projects/dtrace/src/usr.bin/netstat/unix.c#6 integrate .. //depot/projects/dtrace/src/usr.bin/truss/syscalls.c#7 integrate Differences ... ==== //depot/projects/dtrace/src/lib/libarchive/archive_read.c#10 (text+ko) ==== @@ -32,7 +32,7 @@ */ #include "archive_platform.h" -__FBSDID("$FreeBSD: src/lib/libarchive/archive_read.c,v 1.36 2007/12/30 04:58:21 kientzle Exp $"); +__FBSDID("$FreeBSD: src/lib/libarchive/archive_read.c,v 1.37 2008/01/03 17:54:26 des Exp $"); #ifdef HAVE_ERRNO_H #include @@ -741,3 +741,14 @@ __archive_errx(1, "Not enough slots for compression registration"); return (NULL); /* Never actually executed. */ } + +/* used internally to simplify read-ahead */ +const void * +__archive_read_ahead(struct archive_read *a, size_t len) +{ + const void *h; + + if ((a->decompressor->read_ahead)(a, &h, len) < (ssize_t)len) + return (NULL); + return (h); +} ==== //depot/projects/dtrace/src/lib/libarchive/archive_read_private.h#2 (text+ko) ==== @@ -22,7 +22,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/lib/libarchive/archive_read_private.h,v 1.3 2007/05/29 01:00:18 kientzle Exp $ + * $FreeBSD: src/lib/libarchive/archive_read_private.h,v 1.4 2008/01/03 17:54:26 des Exp $ */ #ifndef ARCHIVE_READ_PRIVATE_H_INCLUDED @@ -173,4 +173,7 @@ int (*bid)(const void *, size_t), int (*init)(struct archive_read *, const void *, size_t)); +const void + *__archive_read_ahead(struct archive_read *, size_t); + #endif ==== //depot/projects/dtrace/src/lib/libarchive/archive_read_support_format_zip.c#10 (text+ko) ==== @@ -24,7 +24,7 @@ */ #include "archive_platform.h" -__FBSDID("$FreeBSD: src/lib/libarchive/archive_read_support_format_zip.c,v 1.17 2007/12/30 04:58:21 kientzle Exp $"); +__FBSDID("$FreeBSD: src/lib/libarchive/archive_read_support_format_zip.c,v 1.19 2008/01/03 18:30:37 des Exp $"); #ifdef HAVE_ERRNO_H #include @@ -42,6 +42,7 @@ #include "archive_entry.h" #include "archive_private.h" #include "archive_read_private.h" +#include "archive_endian.h" struct zip { /* entry_bytes_remaining is the number of bytes we expect. */ @@ -121,11 +122,6 @@ static int archive_read_format_zip_read_data_skip(struct archive_read *a); static int archive_read_format_zip_read_header(struct archive_read *, struct archive_entry *); -static int i2(const char *); -static int i4(const char *); -static unsigned int u2(const char *); -static unsigned int u4(const char *); -static uint64_t u8(const char *); static int zip_read_data_deflate(struct archive_read *a, const void **buff, size_t *size, off_t *offset); static int zip_read_data_none(struct archive_read *a, const void **buff, @@ -166,18 +162,14 @@ static int archive_read_format_zip_bid(struct archive_read *a) { - int bytes_read; int bid = 0; - const void *h; const char *p; if (a->archive.archive_format == ARCHIVE_FORMAT_ZIP) bid += 1; - bytes_read = (a->decompressor->read_ahead)(a, &h, 4); - if (bytes_read < 4) - return (-1); - p = (const char *)h; + if ((p = __archive_read_ahead(a, 4)) == NULL) + return (-1); /* * Bid of 30 here is: 16 bits for "PK", @@ -198,7 +190,6 @@ archive_read_format_zip_read_header(struct archive_read *a, struct archive_entry *entry) { - int bytes_read; const void *h; const char *signature; struct zip *zip; @@ -213,8 +204,7 @@ zip->end_of_entry_cleanup = 0; zip->entry_uncompressed_bytes_read = 0; zip->entry_compressed_bytes_read = 0; - bytes_read = (a->decompressor->read_ahead)(a, &h, 4); - if (bytes_read < 4) + if ((h = __archive_read_ahead(a, 4)) == NULL) return (ARCHIVE_FATAL); signature = (const char *)h; @@ -261,21 +251,17 @@ { const struct zip_file_header *p; const void *h; - int bytes_read; - bytes_read = - (a->decompressor->read_ahead)(a, &h, sizeof(struct zip_file_header)); - if (bytes_read < (int)sizeof(struct zip_file_header)) { + if ((p = __archive_read_ahead(a, sizeof *p)) == NULL) { archive_set_error(&a->archive, ARCHIVE_ERRNO_FILE_FORMAT, "Truncated ZIP file header"); return (ARCHIVE_FATAL); } - p = (const struct zip_file_header *)h; zip->version = p->version[0]; zip->system = p->version[1]; - zip->flags = i2(p->flags); - zip->compression = i2(p->compression); + zip->flags = le16dec(p->flags); + zip->compression = le16dec(p->compression); if (zip->compression < sizeof(compression_names)/sizeof(compression_names[0])) zip->compression_name = compression_names[zip->compression]; @@ -287,25 +273,24 @@ zip->mode = 0; zip->uid = 0; zip->gid = 0; - zip->crc32 = i4(p->crc32); - zip->filename_length = i2(p->filename_length); - zip->extra_length = i2(p->extra_length); - zip->uncompressed_size = u4(p->uncompressed_size); - zip->compressed_size = u4(p->compressed_size); + zip->crc32 = le32dec(p->crc32); + zip->filename_length = le16dec(p->filename_length); + zip->extra_length = le16dec(p->extra_length); + zip->uncompressed_size = le32dec(p->uncompressed_size); + zip->compressed_size = le32dec(p->compressed_size); (a->decompressor->consume)(a, sizeof(struct zip_file_header)); /* Read the filename. */ - bytes_read = (a->decompressor->read_ahead)(a, &h, zip->filename_length); - if (bytes_read < zip->filename_length) { + if ((h = __archive_read_ahead(a, zip->filename_length)) == NULL) { archive_set_error(&a->archive, ARCHIVE_ERRNO_FILE_FORMAT, "Truncated ZIP file header"); return (ARCHIVE_FATAL); } if (archive_string_ensure(&zip->pathname, zip->filename_length) == NULL) __archive_errx(1, "Out of memory"); - archive_strncpy(&zip->pathname, (const char *)h, zip->filename_length); + archive_strncpy(&zip->pathname, h, zip->filename_length); (a->decompressor->consume)(a, zip->filename_length); archive_entry_set_pathname(entry, zip->pathname.s); @@ -315,8 +300,7 @@ zip->mode = AE_IFREG | 0777; /* Read the extra data. */ - bytes_read = (a->decompressor->read_ahead)(a, &h, zip->extra_length); - if (bytes_read < zip->extra_length) { + if ((h = __archive_read_ahead(a, zip->extra_length)) == NULL) { archive_set_error(&a->archive, ARCHIVE_ERRNO_FILE_FORMAT, "Truncated ZIP file header"); return (ARCHIVE_FATAL); @@ -387,21 +371,18 @@ if (zip->end_of_entry) { if (!zip->end_of_entry_cleanup) { if (zip->flags & ZIP_LENGTH_AT_END) { - const void *h; const char *p; - int bytes_read = - (a->decompressor->read_ahead)(a, &h, 16); - if (bytes_read < 16) { + + if ((p = __archive_read_ahead(a, 16)) == NULL) { archive_set_error(&a->archive, ARCHIVE_ERRNO_FILE_FORMAT, "Truncated ZIP end-of-file record"); return (ARCHIVE_FATAL); } - p = (const char *)h; - zip->crc32 = i4(p + 4); - zip->compressed_size = u4(p + 8); - zip->uncompressed_size = u4(p + 12); - bytes_read = (a->decompressor->consume)(a, 16); + zip->crc32 = le32dec(p + 4); + zip->compressed_size = le32dec(p + 8); + zip->uncompressed_size = le32dec(p + 12); + (a->decompressor->consume)(a, 16); } /* Check file size, CRC against these values. */ @@ -696,37 +677,6 @@ return (ARCHIVE_OK); } -static int -i2(const char *p) -{ - return ((0xff & (int)p[0]) + 256 * (0xff & (int)p[1])); -} - - -static int -i4(const char *p) -{ - return ((0xffff & i2(p)) + 0x10000 * (0xffff & i2(p+2))); -} - -static unsigned int -u2(const char *p) -{ - return ((0xff & (unsigned int)p[0]) + 256 * (0xff & (unsigned int)p[1])); -} - -static unsigned int -u4(const char *p) -{ - return u2(p) + 0x10000 * u2(p+2); -} - -static uint64_t -u8(const char *p) -{ - return u4(p) + 0x100000000LL * u4(p+4); -} - /* * The extra data is stored as a list of * id1+size1+data1 + id2+size2+data2 ... @@ -739,8 +689,8 @@ const char *p = (const char *)extra; while (offset < zip->extra_length - 4) { - unsigned short headerid = u2(p + offset); - unsigned short datasize = u2(p + offset + 2); + unsigned short headerid = le16dec(p + offset); + unsigned short datasize = le16dec(p + offset + 2); offset += 4; if (offset + datasize > zip->extra_length) break; @@ -752,9 +702,9 @@ case 0x0001: /* Zip64 extended information extra field. */ if (datasize >= 8) - zip->uncompressed_size = u8(p + offset); + zip->uncompressed_size = le64dec(p + offset); if (datasize >= 16) - zip->compressed_size = u8(p + offset + 8); + zip->compressed_size = le64dec(p + offset + 8); break; case 0x5455: { @@ -767,11 +717,11 @@ { #ifdef DEBUG fprintf(stderr, "mtime: %lld -> %d\n", - (long long)zip->mtime, i4(p + offset)); + (long long)zip->mtime, le32dec(p + offset)); #endif if (datasize < 4) break; - zip->mtime = i4(p + offset); + zip->mtime = le32dec(p + offset); offset += 4; datasize -= 4; } @@ -779,7 +729,7 @@ { if (datasize < 4) break; - zip->atime = i4(p + offset); + zip->atime = le32dec(p + offset); offset += 4; datasize -= 4; } @@ -787,7 +737,7 @@ { if (datasize < 4) break; - zip->ctime = i4(p + offset); + zip->ctime = le32dec(p + offset); offset += 4; datasize -= 4; } @@ -797,12 +747,12 @@ /* Info-ZIP Unix Extra Field (type 2) "Ux". */ #ifdef DEBUG fprintf(stderr, "uid %d gid %d\n", - i2(p + offset), i2(p + offset + 2)); + le16dec(p + offset), le16dec(p + offset + 2)); #endif if (datasize >= 2) - zip->uid = i2(p + offset); + zip->uid = le16dec(p + offset); if (datasize >= 4) - zip->gid = i2(p + offset + 2); + zip->gid = le16dec(p + offset + 2); break; default: break; ==== //depot/projects/dtrace/src/lib/libc/stdlib/malloc.3#9 (text+ko) ==== @@ -30,9 +30,9 @@ .\" SUCH DAMAGE. .\" .\" @(#)malloc.3 8.1 (Berkeley) 6/4/93 -.\" $FreeBSD: src/lib/libc/stdlib/malloc.3,v 1.75 2007/12/27 23:29:44 jasone Exp $ +.\" $FreeBSD: src/lib/libc/stdlib/malloc.3,v 1.76 2008/01/03 23:22:13 jasone Exp $ .\" -.Dd December 27, 2007 +.Dd January 3, 2008 .Dt MALLOC 3 .Os .Sh NAME @@ -245,7 +245,7 @@ Use .Xr mmap 2 to acquire anonymously mapped memory. -This option is disabled by default. +This option is enabled by default. If both the .Dq D and @@ -335,24 +335,24 @@ to obtain memory, which is suboptimal for several reasons, including race conditions, increased fragmentation, and artificial limitations on maximum usable memory. -This allocator uses +This allocator uses both .Xr sbrk 2 -by default in order to facilitate resource limits, but it can be configured at -run time to use -.Xr sbrk 2 -and/or -.Xr mmap 2 . +and +.Xr mmap 2 +by default, but it can be configured at run time to use only one or the other. If resource limits are not a primary concern, the preferred configuration is .Ev MALLOC_OPTIONS=dM or .Ev MALLOC_OPTIONS=DM . When so configured, the .Ar datasize -resource limit has little practical effect for typical applications. -The +resource limit has little practical effect for typical applications; use +.Ev MALLOC_OPTIONS=Dm +if that is a concern. +Regardless of allocator configuration, the .Ar vmemoryuse -resource limit, however, can be used to bound the total virtual memory used by -a process, as described in +resource limit can be used to bound the total virtual memory used by a +process, as described in .Xr limits 1 . .Pp This allocator uses multiple arenas in order to reduce lock contention for ==== //depot/projects/dtrace/src/lib/libc/stdlib/malloc.c#16 (text+ko) ==== @@ -1,5 +1,5 @@ /*- - * Copyright (C) 2006,2007 Jason Evans . + * Copyright (C) 2006-2008 Jason Evans . * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -131,10 +131,10 @@ * unnecessary, but we are burdened by history and the lack of resource limits * for anonymous mapped memory. */ -#define MALLOC_DSS +#define MALLOC_DSS #include -__FBSDID("$FreeBSD: src/lib/libc/stdlib/malloc.c,v 1.160 2007/12/31 06:19:48 jasone Exp $"); +__FBSDID("$FreeBSD: src/lib/libc/stdlib/malloc.c,v 1.161 2008/01/03 23:22:13 jasone Exp $"); #include "libc_private.h" #ifdef MALLOC_DEBUG @@ -821,7 +821,7 @@ #endif #ifdef MALLOC_DSS static bool opt_dss = true; -static bool opt_mmap = false; +static bool opt_mmap = true; #endif static bool opt_hint = false; #ifdef MALLOC_LAZY_FREE @@ -1646,6 +1646,7 @@ return (NULL); /* Clean up unneeded leading/trailing space. */ + offset = CHUNK_ADDR2OFFSET(ret); if (offset != 0) { /* Leading space. */ pages_unmap(ret, chunksize - offset); @@ -1661,11 +1662,11 @@ pages_unmap((void *)((uintptr_t)ret + size), chunksize); } + } else { + /* Clean up unneeded leading space. */ + pages_unmap(ret, chunksize - offset); + ret = (void *)((uintptr_t)ret + (chunksize - offset)); } - - /* Clean up unneeded leading space. */ - pages_unmap(ret, chunksize - offset); - ret = (void *)((uintptr_t)ret + (chunksize - offset)); } return (ret); ==== //depot/projects/dtrace/src/share/man/man5/boot.config.5#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/share/man/man5/boot.config.5,v 1.1 2007/08/14 15:25:32 danger Exp $ +.\" $FreeBSD: src/share/man/man5/boot.config.5,v 1.2 2008/01/03 20:54:34 danger Exp $ .Dd May 13, 2007 .Dt BOOT.CONFIG 5 .Os @@ -78,11 +78,11 @@ # echo "1:ad(1,a)/boot/loader" > /boot.config .Ed .Pp -will instruct the second boot stage of -.Xr loader 8 -on the first disk to boot with the third boot stage of -.Xr loader 8 -from the second disk. +will instruct the second stage of +.Xr boot 8 +on the first disk to boot with the third +.Xr boot 8 +stage from the second disk. .Pp The command: .Bd -literal -offset indent ==== //depot/projects/dtrace/src/sys/amd64/amd64/pmap.c#29 (text+ko) ==== @@ -77,7 +77,7 @@ */ #include -__FBSDID("$FreeBSD: src/sys/amd64/amd64/pmap.c,v 1.600 2008/01/02 08:54:39 alc Exp $"); +__FBSDID("$FreeBSD: src/sys/amd64/amd64/pmap.c,v 1.601 2008/01/03 07:34:32 alc Exp $"); /* * Manages physical address maps. @@ -2250,8 +2250,8 @@ * insert this page into the given map NOW. */ void -pmap_enter(pmap_t pmap, vm_offset_t va, vm_page_t m, vm_prot_t prot, - boolean_t wired) +pmap_enter(pmap_t pmap, vm_offset_t va, vm_prot_t access, vm_page_t m, + vm_prot_t prot, boolean_t wired) { vm_paddr_t pa; pd_entry_t *pde; ==== //depot/projects/dtrace/src/sys/arm/arm/pmap.c#25 (text+ko) ==== @@ -147,7 +147,7 @@ #include "opt_vm.h" #include -__FBSDID("$FreeBSD: src/sys/arm/arm/pmap.c,v 1.93 2007/12/11 20:35:44 cognet Exp $"); +__FBSDID("$FreeBSD: src/sys/arm/arm/pmap.c,v 1.96 2008/01/03 07:34:33 alc Exp $"); #include #include #include @@ -3170,11 +3170,10 @@ #if defined(PMAP_DEBUG) /* - * XXX this makes pmap_page_protect(NONE) illegal for non-managed - * pages! + * XXX This makes pmap_remove_all() illegal for non-managed pages! */ if (m->flags & PG_FICTITIOUS) { - panic("pmap_page_protect: illegal for unmanaged page, va: 0x%x", VM_PAGE_TO_PHYS(m)); + panic("pmap_remove_all: illegal for unmanaged page, va: 0x%x", VM_PAGE_TO_PHYS(m)); } #endif @@ -3325,8 +3324,8 @@ */ void -pmap_enter(pmap_t pmap, vm_offset_t va, vm_page_t m, vm_prot_t prot, - boolean_t wired) +pmap_enter(pmap_t pmap, vm_offset_t va, vm_prot_t access, vm_page_t m, + vm_prot_t prot, boolean_t wired) { vm_page_lock_queues(); ==== //depot/projects/dtrace/src/sys/i386/i386/pmap.c#25 (text+ko) ==== @@ -75,7 +75,7 @@ */ #include -__FBSDID("$FreeBSD: src/sys/i386/i386/pmap.c,v 1.603 2008/01/02 08:54:39 alc Exp $"); +__FBSDID("$FreeBSD: src/sys/i386/i386/pmap.c,v 1.604 2008/01/03 07:34:33 alc Exp $"); /* * Manages physical address maps. @@ -2302,8 +2302,8 @@ * insert this page into the given map NOW. */ void -pmap_enter(pmap_t pmap, vm_offset_t va, vm_page_t m, vm_prot_t prot, - boolean_t wired) +pmap_enter(pmap_t pmap, vm_offset_t va, vm_prot_t access, vm_page_t m, + vm_prot_t prot, boolean_t wired) { vm_paddr_t pa; pd_entry_t *pde; ==== //depot/projects/dtrace/src/sys/ia64/ia64/pmap.c#12 (text+ko) ==== @@ -46,7 +46,7 @@ */ #include -__FBSDID("$FreeBSD: src/sys/ia64/ia64/pmap.c,v 1.193 2007/11/17 22:52:29 alc Exp $"); +__FBSDID("$FreeBSD: src/sys/ia64/ia64/pmap.c,v 1.196 2008/01/03 07:34:33 alc Exp $"); #include #include @@ -1458,11 +1458,10 @@ #if defined(DIAGNOSTIC) /* - * XXX this makes pmap_page_protect(NONE) illegal for non-managed - * pages! + * XXX This makes pmap_remove_all() illegal for non-managed pages! */ if (m->flags & PG_FICTITIOUS) { - panic("pmap_page_protect: illegal for unmanaged page, va: 0x%lx", VM_PAGE_TO_PHYS(m)); + panic("pmap_remove_all: illegal for unmanaged page, va: 0x%lx", VM_PAGE_TO_PHYS(m)); } #endif mtx_assert(&vm_page_queue_mtx, MA_OWNED); @@ -1556,8 +1555,8 @@ * insert this page into the given map NOW. */ void -pmap_enter(pmap_t pmap, vm_offset_t va, vm_page_t m, vm_prot_t prot, - boolean_t wired) +pmap_enter(pmap_t pmap, vm_offset_t va, vm_prot_t access, vm_page_t m, + vm_prot_t prot, boolean_t wired) { pmap_t oldpmap; vm_offset_t pa; ==== //depot/projects/dtrace/src/sys/kern/kern_descrip.c#14 (text+ko) ==== @@ -35,7 +35,7 @@ */ #include -__FBSDID("$FreeBSD: src/sys/kern/kern_descrip.c,v 1.315 2007/12/30 01:42:13 jeff Exp $"); +__FBSDID("$FreeBSD: src/sys/kern/kern_descrip.c,v 1.316 2008/01/03 01:26:59 jeff Exp $"); #include "opt_compat.h" #include "opt_ddb.h" @@ -2392,7 +2392,8 @@ if (fdp == NULL) continue; /* overestimates sparse tables. */ - n += fdp->fd_lastfile; + if (fdp->fd_lastfile > 0) + n += fdp->fd_lastfile; fddrop(fdp); } sx_sunlock(&allproc_lock); ==== //depot/projects/dtrace/src/sys/kern/uipc_debug.c#2 (text+ko) ==== @@ -29,7 +29,7 @@ */ #include -__FBSDID("$FreeBSD: src/sys/kern/uipc_debug.c,v 1.2 2007/05/03 14:42:41 rwatson Exp $"); +__FBSDID("$FreeBSD: src/sys/kern/uipc_debug.c,v 1.3 2008/01/03 15:19:31 bz Exp $"); #include "opt_ddb.h" @@ -394,13 +394,17 @@ db_printf("sb_lastrecord: %p\n", sb->sb_lastrecord); db_print_indent(indent); - db_printf("sb_cc: %d ", sb->sb_cc); - db_printf("sb_hiwat: %d ", sb->sb_hiwat); - db_printf("sb_mbcnt: %d ", sb->sb_mbcnt); - db_printf("sb_mbmax: %d\n", sb->sb_mbmax); + db_printf("sb_sndptr: %p ", sb->sb_sndptr); + db_printf("sb_sndptroff: %u\n", sb->sb_sndptroff); + + db_print_indent(indent); + db_printf("sb_cc: %u ", sb->sb_cc); + db_printf("sb_hiwat: %u ", sb->sb_hiwat); + db_printf("sb_mbcnt: %u ", sb->sb_mbcnt); + db_printf("sb_mbmax: %u\n", sb->sb_mbmax); db_print_indent(indent); - db_printf("sb_ctl: %d ", sb->sb_ctl); + db_printf("sb_ctl: %u ", sb->sb_ctl); db_printf("sb_lowat: %d ", sb->sb_lowat); db_printf("sb_timeo: %d\n", sb->sb_timeo); ==== //depot/projects/dtrace/src/sys/powerpc/powerpc/pmap_dispatch.c#10 (text+ko) ==== @@ -26,7 +26,7 @@ */ #include -__FBSDID("$FreeBSD: src/sys/powerpc/powerpc/pmap_dispatch.c,v 1.11 2007/11/17 22:52:29 alc Exp $"); +__FBSDID("$FreeBSD: src/sys/powerpc/powerpc/pmap_dispatch.c,v 1.12 2008/01/03 07:34:34 alc Exp $"); /* * Dispatch MI pmap calls to the appropriate MMU implementation @@ -107,8 +107,8 @@ } void -pmap_enter(pmap_t pmap, vm_offset_t va, vm_page_t p, vm_prot_t prot, - boolean_t wired) +pmap_enter(pmap_t pmap, vm_offset_t va, vm_prot_t access, vm_page_t p, + vm_prot_t prot, boolean_t wired) { MMU_ENTER(mmu_obj, pmap, va, p, prot, wired); } ==== //depot/projects/dtrace/src/sys/sparc64/sparc64/pmap.c#15 (text+ko) ==== @@ -39,7 +39,7 @@ * SUCH DAMAGE. * * from: @(#)pmap.c 7.7 (Berkeley) 5/12/91 - * $FreeBSD: src/sys/sparc64/sparc64/pmap.c,v 1.169 2007/12/27 03:52:14 alc Exp $ + * $FreeBSD: src/sys/sparc64/sparc64/pmap.c,v 1.170 2008/01/03 07:34:34 alc Exp $ */ /* @@ -1273,8 +1273,8 @@ * will be wired down. */ void -pmap_enter(pmap_t pm, vm_offset_t va, vm_page_t m, vm_prot_t prot, - boolean_t wired) +pmap_enter(pmap_t pm, vm_offset_t va, vm_prot_t access, vm_page_t m, + vm_prot_t prot, boolean_t wired) { vm_page_lock_queues(); ==== //depot/projects/dtrace/src/sys/sun4v/sun4v/pmap.c#26 (text+ko) ==== @@ -26,7 +26,7 @@ */ #include -__FBSDID("$FreeBSD: src/sys/sun4v/sun4v/pmap.c,v 1.41 2007/11/17 22:52:29 alc Exp $"); +__FBSDID("$FreeBSD: src/sys/sun4v/sun4v/pmap.c,v 1.42 2008/01/03 07:34:34 alc Exp $"); #include "opt_kstack_pages.h" #include "opt_msgbuf.h" @@ -1039,8 +1039,8 @@ * will be wired down. */ void -pmap_enter(pmap_t pmap, vm_offset_t va, vm_page_t m, vm_prot_t prot, - boolean_t wired) +pmap_enter(pmap_t pmap, vm_offset_t va, vm_prot_t access, vm_page_t m, + vm_prot_t prot, boolean_t wired) { vm_paddr_t pa, opa; uint64_t tte_data, otte_data; ==== //depot/projects/dtrace/src/sys/ufs/ffs/ffs_balloc.c#6 (text+ko) ==== @@ -60,7 +60,7 @@ */ #include -__FBSDID("$FreeBSD: src/sys/ufs/ffs/ffs_balloc.c,v 1.52 2007/12/29 13:31:27 kib Exp $"); +__FBSDID("$FreeBSD: src/sys/ufs/ffs/ffs_balloc.c,v 1.53 2008/01/03 12:28:57 kib Exp $"); #include #include @@ -420,12 +420,6 @@ bp->b_flags &= ~B_ASYNC; brelse(bp); } - - /* - * After the buffer is invalidated, free the block. - */ - ffs_blkfree(ump, fs, ip->i_devvp, *blkp, fs->fs_bsize, - ip->i_number); deallocated += fs->fs_bsize; } if (allocib != NULL) { @@ -461,6 +455,14 @@ ip->i_flag |= IN_CHANGE | IN_UPDATE; } (void) ffs_syncvnode(vp, MNT_WAIT); + /* + * After the buffers are invalidated and on-disk pointers are + * cleared, free the blocks. + */ + for (blkp = allociblk; blkp < allocblk; blkp++) { + ffs_blkfree(ump, fs, ip->i_devvp, *blkp, fs->fs_bsize, + ip->i_number); + } return (error); } @@ -918,12 +920,6 @@ bp->b_flags &= ~B_ASYNC; brelse(bp); } - - /* - * After the buffer is invalidated, free the block. - */ - ffs_blkfree(ump, fs, ip->i_devvp, *blkp, fs->fs_bsize, - ip->i_number); deallocated += fs->fs_bsize; } if (allocib != NULL) { @@ -959,5 +955,13 @@ ip->i_flag |= IN_CHANGE | IN_UPDATE; } (void) ffs_syncvnode(vp, MNT_WAIT); + /* + * After the buffers are invalidated and on-disk pointers are + * cleared, free the blocks. + */ + for (blkp = allociblk; blkp < allocblk; blkp++) { + ffs_blkfree(ump, fs, ip->i_devvp, *blkp, fs->fs_bsize, + ip->i_number); + } return (error); } ==== //depot/projects/dtrace/src/sys/vm/pmap.h#10 (text+ko) ==== @@ -57,7 +57,7 @@ * any improvements or extensions that they make and grant Carnegie the * rights to redistribute these changes. * - * $FreeBSD: src/sys/vm/pmap.h,v 1.82 2008/01/01 20:36:04 alc Exp $ + * $FreeBSD: src/sys/vm/pmap.h,v 1.83 2008/01/03 07:34:34 alc Exp $ */ /* @@ -95,8 +95,8 @@ void pmap_clear_reference(vm_page_t m); void pmap_copy(pmap_t, pmap_t, vm_offset_t, vm_size_t, vm_offset_t); void pmap_copy_page(vm_page_t, vm_page_t); -void pmap_enter(pmap_t, vm_offset_t, vm_page_t, vm_prot_t, - boolean_t); +void pmap_enter(pmap_t, vm_offset_t, vm_prot_t, vm_page_t, + vm_prot_t, boolean_t); void pmap_enter_quick(pmap_t pmap, vm_offset_t va, vm_page_t m, vm_prot_t prot); void pmap_enter_object(pmap_t pmap, vm_offset_t start, ==== //depot/projects/dtrace/src/sys/vm/vm_fault.c#13 (text+ko) ==== @@ -72,7 +72,7 @@ */ #include -__FBSDID("$FreeBSD: src/sys/vm/vm_fault.c,v 1.238 2007/12/29 19:53:04 alc Exp $"); +__FBSDID("$FreeBSD: src/sys/vm/vm_fault.c,v 1.239 2008/01/03 07:34:34 alc Exp $"); #include "opt_vm.h" @@ -888,7 +888,7 @@ * back on the active queue until later so that the pageout daemon * won't find it (yet). */ - pmap_enter(fs.map->pmap, vaddr, fs.m, prot, wired); + pmap_enter(fs.map->pmap, vaddr, fault_type, fs.m, prot, wired); if (((fault_flags & VM_FAULT_WIRE_MASK) == 0) && (wired == 0)) { vm_fault_prefault(fs.map->pmap, vaddr, fs.entry); } @@ -1177,9 +1177,10 @@ VM_OBJECT_UNLOCK(dst_object); /* - * Enter it in the pmap... + * Enter it in the pmap as a read and/or execute access. */ - pmap_enter(dst_map->pmap, vaddr, dst_m, prot, FALSE); + pmap_enter(dst_map->pmap, vaddr, prot & ~VM_PROT_WRITE, dst_m, + prot, FALSE); /* * Mark it no longer busy, and put it on the active list. ==== //depot/projects/dtrace/src/sys/vm/vm_kern.c#9 (text+ko) ==== @@ -63,7 +63,7 @@ */ #include -__FBSDID("$FreeBSD: src/sys/vm/vm_kern.c,v 1.129 2007/11/07 21:56:58 pjd Exp $"); +__FBSDID("$FreeBSD: src/sys/vm/vm_kern.c,v 1.130 2008/01/03 07:34:34 alc Exp $"); #include #include @@ -406,7 +406,8 @@ /* * Because this is kernel_pmap, this call will not block. */ - pmap_enter(kernel_pmap, addr + i, m, VM_PROT_ALL, 1); + pmap_enter(kernel_pmap, addr + i, VM_PROT_ALL, m, VM_PROT_ALL, + TRUE); vm_page_wakeup(m); } VM_OBJECT_UNLOCK(kmem_object); ==== //depot/projects/dtrace/src/usr.bin/netstat/atalk.c#6 (text+ko) ==== @@ -1,4 +1,4 @@ -/* +/*- * Copyright (c) 1983, 1988, 1993 * The Regents of the University of California. All rights reserved. * @@ -38,7 +38,7 @@ #endif #include -__FBSDID("$FreeBSD: src/usr.bin/netstat/atalk.c,v 1.26 2007/07/16 17:15:54 jhb Exp $"); +__FBSDID("$FreeBSD: src/usr.bin/netstat/atalk.c,v 1.27 2008/01/02 23:26:11 obrien Exp $"); #include #include @@ -260,7 +260,7 @@ } } -#define ANY(x,y,z) if (x || sflag <= 1) \ +#define ANY(x,y,z) if (x || sflag <= 1) \ printf("\t%lu %s%s%s\n",x,y,plural(x),z) /* ==== //depot/projects/dtrace/src/usr.bin/netstat/bpf.c#7 (text+ko) ==== @@ -22,9 +22,11 @@ * LIABILITY, OR TORT (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/usr.bin/netstat/bpf.c,v 1.9 2007/07/16 17:15:54 jhb Exp $ */ + +#include +__FBSDID("$FreeBSD: src/usr.bin/netstat/bpf.c,v 1.10 2008/01/02 23:26:11 obrien Exp $"); + #include #include #include @@ -84,7 +86,7 @@ *flagbuf++ = bd->bd_async ? 'a' : '-'; *flagbuf++ = bd->bd_locked ? 'l' : '-'; *flagbuf++ = '\0'; -} +} void bpf_stats(char *ifname) ==== //depot/projects/dtrace/src/usr.bin/netstat/if.c#7 (text+ko) ==== @@ -1,4 +1,4 @@ -/* +/*- * Copyright (c) 1983, 1988, 1993 * The Regents of the University of California. All rights reserved. * @@ -38,7 +38,7 @@ #endif #include -__FBSDID("$FreeBSD: src/usr.bin/netstat/if.c,v 1.69 2007/07/16 17:15:54 jhb Exp $"); +__FBSDID("$FreeBSD: src/usr.bin/netstat/if.c,v 1.70 2008/01/02 23:26:11 obrien Exp $"); #include #include @@ -82,7 +82,7 @@ static char ntop_buf[INET6_ADDRSTRLEN]; /* for inet_ntop() */ #endif -/* +/* * Dump pfsync statistics structure. */ void @@ -105,9 +105,9 @@ printf("%s:\n", name); -#define p(f, m) if (pfsyncstat.f || sflag <= 1) \ +#define p(f, m) if (pfsyncstat.f || sflag <= 1) \ printf(m, (uintmax_t)pfsyncstat.f, plural(pfsyncstat.f)) -#define p2(f, m) if (pfsyncstat.f || sflag <= 1) \ +#define p2(f, m) if (pfsyncstat.f || sflag <= 1) \ printf(m, (uintmax_t)pfsyncstat.f) p(pfsyncs_ipackets, "\t%ju packet%s received (IPv4)\n"); @@ -214,10 +214,10 @@ sidewaysintpr(interval1, ifnetaddr); >>> TRUNCATED FOR MAIL (1000 lines) <<< From owner-p4-projects@FreeBSD.ORG Fri Jan 4 01:25:42 2008 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 1B0C616A468; Fri, 4 Jan 2008 01:25:42 +0000 (UTC) Delivered-To: perforce@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id D43E716A419; Fri, 4 Jan 2008 01:25:41 +0000 (UTC) (envelope-from rwatson@FreeBSD.org) Received: from cyrus.watson.org (cyrus.watson.org [209.31.154.42]) by mx1.freebsd.org (Postfix) with ESMTP id AE05F13C45B; Fri, 4 Jan 2008 01:25:41 +0000 (UTC) (envelope-from rwatson@FreeBSD.org) Received: from fledge.watson.org (fledge.watson.org [209.31.154.41]) by cyrus.watson.org (Postfix) with ESMTP id 70E2546F1F; Thu, 3 Jan 2008 20:25:41 -0500 (EST) Date: Fri, 4 Jan 2008 01:25:41 +0000 (GMT) From: Robert Watson X-X-Sender: robert@fledge.watson.org To: Peter Wemm In-Reply-To: <200801032225.m03MPHAE060675@repoman.freebsd.org> Message-ID: <20080104012425.N42109@fledge.watson.org> References: <200801032225.m03MPHAE060675@repoman.freebsd.org> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed Cc: Perforce Change Reviews Subject: Re: PERFORCE change 132434 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 04 Jan 2008 01:25:42 -0000 On Thu, 3 Jan 2008, Peter Wemm wrote: > http://perforce.freebsd.org/chv.cgi?CH=132434 > > Change 132434 by peter@peter_daintree on 2008/01/03 22:24:56 > > Export the build uuid to the dump header. Nothing interesting is done > with it at this point. > > While here, move all the mkdumpheader() copies into a MI place, as > the (duplicated) comment suggested. Allow magic numbers to be passed > through so textdumps can share the code too. Currently, I duplicate the panic string and kernel version string from the dump header in the textdump itself as data files. Any chance you want to do the same with the uuid? (Perhaps a better model would be to have savecore append another file to the textdump containing the header information, but the above seems to work fine for now, and has some advantages). Robert N M Watson Computer Laboratory University of Cambridge From owner-p4-projects@FreeBSD.ORG Fri Jan 4 03:18:24 2008 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 7C91716A468; Fri, 4 Jan 2008 03:18:24 +0000 (UTC) Delivered-To: perforce@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 426FD16A41B for ; Fri, 4 Jan 2008 03:18:24 +0000 (UTC) (envelope-from jb@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id 3219313C458 for ; Fri, 4 Jan 2008 03:18:24 +0000 (UTC) (envelope-from jb@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.1/8.14.1) with ESMTP id m043IOQ0005563 for ; Fri, 4 Jan 2008 03:18:24 GMT (envelope-from jb@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.1/8.14.1/Submit) id m043INTl005560 for perforce@freebsd.org; Fri, 4 Jan 2008 03:18:23 GMT (envelope-from jb@freebsd.org) Date: Fri, 4 Jan 2008 03:18:23 GMT Message-Id: <200801040318.m043INTl005560@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to jb@freebsd.org using -f From: John Birrell To: Perforce Change Reviews Cc: Subject: PERFORCE change 132452 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 04 Jan 2008 03:18:24 -0000 http://perforce.freebsd.org/chv.cgi?CH=132452 Change 132452 by jb@jb_freebsd1 on 2008/01/04 03:18:02 Update to reflect the fact that the interrupt levels aren't valid on FreeBSD. Affected files ... .. //depot/projects/dtrace/src/sys/cddl/dev/profile/profile.c#4 edit .. //depot/projects/dtrace/src/sys/contrib/opensolaris/uts/common/dtrace/dtrace.c#10 edit Differences ... ==== //depot/projects/dtrace/src/sys/cddl/dev/profile/profile.c#4 (text+ko) ==== @@ -407,7 +407,6 @@ hdlr->cyh_func = profile_fire; hdlr->cyh_arg = pcpu; - hdlr->cyh_level = CY_HIGH_LEVEL; when->cyt_interval = prof->prof_interval; when->cyt_when = dtrace_gethrtime() + when->cyt_interval; @@ -441,7 +440,6 @@ if (prof->prof_kind == PROF_TICK) { hdlr.cyh_func = profile_tick; hdlr.cyh_arg = prof; - hdlr.cyh_level = CY_HIGH_LEVEL; when.cyt_interval = prof->prof_interval; when.cyt_when = dtrace_gethrtime() + when.cyt_interval; ==== //depot/projects/dtrace/src/sys/contrib/opensolaris/uts/common/dtrace/dtrace.c#10 (text) ==== @@ -12840,7 +12840,9 @@ hdlr.cyh_func = (cyc_func_t)dtrace_state_clean; hdlr.cyh_arg = state; +#if defined(sun) hdlr.cyh_level = CY_LOW_LEVEL; +#endif when.cyt_when = 0; when.cyt_interval = opt[DTRACEOPT_CLEANRATE]; @@ -12849,7 +12851,9 @@ hdlr.cyh_func = (cyc_func_t)dtrace_state_deadman; hdlr.cyh_arg = state; +#if defined(sun) hdlr.cyh_level = CY_LOW_LEVEL; +#endif when.cyt_when = 0; when.cyt_interval = dtrace_deadman_interval; From owner-p4-projects@FreeBSD.ORG Fri Jan 4 05:11:27 2008 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id BFE3316A468; Fri, 4 Jan 2008 05:11:27 +0000 (UTC) Delivered-To: perforce@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 6C3F416A420 for ; Fri, 4 Jan 2008 05:11:27 +0000 (UTC) (envelope-from jb@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id 5C11013C447 for ; Fri, 4 Jan 2008 05:11:27 +0000 (UTC) (envelope-from jb@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.1/8.14.1) with ESMTP id m045BRZF024745 for ; Fri, 4 Jan 2008 05:11:27 GMT (envelope-from jb@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.1/8.14.1/Submit) id m045BR0l024742 for perforce@freebsd.org; Fri, 4 Jan 2008 05:11:27 GMT (envelope-from jb@freebsd.org) Date: Fri, 4 Jan 2008 05:11:27 GMT Message-Id: <200801040511.m045BR0l024742@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to jb@freebsd.org using -f From: John Birrell To: Perforce Change Reviews Cc: Subject: PERFORCE change 132458 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 04 Jan 2008 05:11:28 -0000 http://perforce.freebsd.org/chv.cgi?CH=132458 Change 132458 by jb@jb_freebsd1 on 2008/01/04 05:10:56 Add another test to add a few cyclic to cause the arrays to be expanded and the old arrays to be freed. Affected files ... .. //depot/projects/dtrace/src/sys/cddl/kern/cyclic_test.c#4 edit Differences ... ==== //depot/projects/dtrace/src/sys/cddl/kern/cyclic_test.c#4 (text+ko) ==== @@ -143,6 +143,71 @@ printf("%s: %s\n",__func__, error == 0 ? "passed":"failed"); } +static struct timespec test_003_start; + +static void +cyclic_test_003_func(void *arg) +{ + struct timespec ts; + + nanotime(&ts); + timespecsub(&ts,&test_003_start); + printf("%s: called after %lu.%09lu on curcpu %d id %ju\n",__func__,(u_long) ts.tv_sec,(u_long) ts.tv_nsec, curcpu, (uintmax_t) arg); +} + +static void +cyclic_test_003(void) +{ + int error = 0; + cyc_handler_t hdlr; + cyc_time_t when; + cyclic_id_t id; + cyclic_id_t id1; + cyclic_id_t id2; + cyclic_id_t id3; + + printf("%s: starting\n",__func__); + + hdlr.cyh_func = (cyc_func_t) cyclic_test_003_func; + + when.cyt_when = 0; + + nanotime(&test_003_start); + + mutex_enter(&cpu_lock); + + when.cyt_interval = 200000000; + hdlr.cyh_arg = (void *) 0UL; + id = cyclic_add(&hdlr, &when); + + when.cyt_interval = 400000000; + hdlr.cyh_arg = (void *) 1UL; + id1 = cyclic_add(&hdlr, &when); + + hdlr.cyh_arg = (void *) 2UL; + when.cyt_interval = 1000000000; + id2 = cyclic_add(&hdlr, &when); + + hdlr.cyh_arg = (void *) 3UL; + when.cyt_interval = 1300000000; + id3 = cyclic_add(&hdlr, &when); + + mutex_exit(&cpu_lock); + + DELAY(1200000); + + mutex_enter(&cpu_lock); + + cyclic_remove(id); + cyclic_remove(id1); + cyclic_remove(id2); + cyclic_remove(id3); + + mutex_exit(&cpu_lock); + + printf("%s: %s\n",__func__, error == 0 ? "passed":"failed"); +} + /* Kernel thread command routine. */ static void cyclic_run_tests(void *arg) @@ -156,9 +221,13 @@ case 2: cyclic_test_002(); break; + case 3: + cyclic_test_003(); + break; default: cyclic_test_001(); cyclic_test_002(); + cyclic_test_003(); break; } From owner-p4-projects@FreeBSD.ORG Fri Jan 4 05:13:30 2008 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id E403616A419; Fri, 4 Jan 2008 05:13:29 +0000 (UTC) Delivered-To: perforce@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id A8A3916A417 for ; Fri, 4 Jan 2008 05:13:29 +0000 (UTC) (envelope-from jb@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id 9852D13C45A for ; Fri, 4 Jan 2008 05:13:29 +0000 (UTC) (envelope-from jb@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.1/8.14.1) with ESMTP id m045DTNb024798 for ; Fri, 4 Jan 2008 05:13:29 GMT (envelope-from jb@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.1/8.14.1/Submit) id m045DT9m024795 for perforce@freebsd.org; Fri, 4 Jan 2008 05:13:29 GMT (envelope-from jb@freebsd.org) Date: Fri, 4 Jan 2008 05:13:29 GMT Message-Id: <200801040513.m045DT9m024795@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to jb@freebsd.org using -f From: John Birrell To: Perforce Change Reviews Cc: Subject: PERFORCE change 132459 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 04 Jan 2008 05:13:30 -0000 http://perforce.freebsd.org/chv.cgi?CH=132459 Change 132459 by jb@jb_freebsd1 on 2008/01/04 05:13:01 Drop the mutex lock before freeing memory and obtain it again directly after. The window the the CPU is unlocked could be enough for another thread to get in a do the expansion and possibly to fill the expanded arrays, so put the expand call in a loop (while the mutex is locked) and only come out when there is space for the cyclic being added. Affected files ... .. //depot/projects/dtrace/src/sys/cddl/kern/cyclic.c#7 edit Differences ... ==== //depot/projects/dtrace/src/sys/cddl/kern/cyclic.c#7 (text+ko) ==== @@ -690,10 +690,14 @@ mtx_lock_spin(&cpu->cyp_mtx); /* Check if another thread beat us while the mutex was unlocked. */ - if (old_size < cpu->cyp_size) { + if (old_size != cpu->cyp_size) { /* Oh well, he won. */ + mtx_unlock_spin(&cpu->cyp_mtx); + free(new_heap, M_CYCLIC); free(new_cyclics, M_CYCLIC); + + mtx_lock_spin(&cpu->cyp_mtx); return; } @@ -722,8 +726,12 @@ if (old_cyclics != NULL) { ASSERT(old_heap != NULL); ASSERT(old_size != 0); + mtx_unlock_spin(&cpu->cyp_mtx); + free(old_cyclics, M_CYCLIC); free(old_heap, M_CYCLIC); + + mtx_lock_spin(&cpu->cyp_mtx); } } @@ -741,10 +749,10 @@ ASSERT(!(cpu->cyp_cpu->cpu_flags & CPU_OFFLINE)); ASSERT(when->cyt_when >= 0 && when->cyt_interval > 0); - if (cpu->cyp_nelems == cpu->cyp_size) { + while (cpu->cyp_nelems == cpu->cyp_size) cyclic_expand(cpu); - ASSERT(cpu->cyp_nelems < cpu->cyp_size); - } + + ASSERT(cpu->cyp_nelems < cpu->cyp_size); nelems = cpu->cyp_nelems++; From owner-p4-projects@FreeBSD.ORG Fri Jan 4 06:37:57 2008 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id C9C0416A41B; Fri, 4 Jan 2008 06:37:56 +0000 (UTC) Delivered-To: perforce@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 7CBC816A417 for ; Fri, 4 Jan 2008 06:37:56 +0000 (UTC) (envelope-from jb@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id 53F2013C4EE for ; Fri, 4 Jan 2008 06:37:56 +0000 (UTC) (envelope-from jb@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.1/8.14.1) with ESMTP id m046bubk047276 for ; Fri, 4 Jan 2008 06:37:56 GMT (envelope-from jb@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.1/8.14.1/Submit) id m046burb047273 for perforce@freebsd.org; Fri, 4 Jan 2008 06:37:56 GMT (envelope-from jb@freebsd.org) Date: Fri, 4 Jan 2008 06:37:56 GMT Message-Id: <200801040637.m046burb047273@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to jb@freebsd.org using -f From: John Birrell To: Perforce Change Reviews Cc: Subject: PERFORCE change 132460 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 04 Jan 2008 06:37:57 -0000 http://perforce.freebsd.org/chv.cgi?CH=132460 Change 132460 by jb@jb_freebsd1 on 2008/01/04 06:37:39 Fix a mismerge. I guess. Affected files ... .. //depot/projects/dtrace/src/contrib/opensolaris/cmd/dtrace/dtrace.c#12 edit Differences ... ==== //depot/projects/dtrace/src/contrib/opensolaris/cmd/dtrace/dtrace.c#12 (text) ==== @@ -235,12 +235,6 @@ */ dtrace_close(g_dtp); - /* - * Close the DTrace handle to ensure that any controlled processes are - * correctly restored and continued. - */ - dtrace_close(g_dtp); - exit(E_ERROR); } From owner-p4-projects@FreeBSD.ORG Fri Jan 4 07:19:40 2008 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 1A44316A41A; Fri, 4 Jan 2008 07:19:40 +0000 (UTC) Delivered-To: perforce@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id D393116A417 for ; Fri, 4 Jan 2008 07:19:39 +0000 (UTC) (envelope-from imp@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id 8E0D013C458 for ; Fri, 4 Jan 2008 07:19:39 +0000 (UTC) (envelope-from imp@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.1/8.14.1) with ESMTP id m047Jdkq050330 for ; Fri, 4 Jan 2008 07:19:39 GMT (envelope-from imp@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.1/8.14.1/Submit) id m047JdLk050327 for perforce@freebsd.org; Fri, 4 Jan 2008 07:19:39 GMT (envelope-from imp@freebsd.org) Date: Fri, 4 Jan 2008 07:19:39 GMT Message-Id: <200801040719.m047JdLk050327@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to imp@freebsd.org using -f From: Warner Losh To: Perforce Change Reviews Cc: Subject: PERFORCE change 132461 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 04 Jan 2008 07:19:40 -0000 http://perforce.freebsd.org/chv.cgi?CH=132461 Change 132461 by imp@imp_paco-paco on 2008/01/04 07:18:46 locks of hacks for the moment to get things "compiling". but there's lots of work here still to reconcile how we want to do locore interfaces, cpu junk, etc. Affected files ... .. //depot/projects/mips2-jnpr/src/sys/mips/include/md_var.h#5 edit .. //depot/projects/mips2-jnpr/src/sys/mips/include/trap.h#4 edit .. //depot/projects/mips2-jnpr/src/sys/mips/mips/locore.S#5 edit .. //depot/projects/mips2-jnpr/src/sys/mips/mips/machdep.c#5 edit .. //depot/projects/mips2-jnpr/src/sys/mips/mips32/malta/malta_machdep.c#3 edit Differences ... ==== //depot/projects/mips2-jnpr/src/sys/mips/include/md_var.h#5 (text+ko) ==== @@ -59,4 +59,10 @@ #define MIPS_DEBUG_PRINT(fmt, args...) #endif +void cpu_identify(void); +void mips_cpu_init(void); + +/* Platform call-downs. */ +void platform_identify(void); + #endif /* !_MACHINE_MD_VAR_H_ */ ==== //depot/projects/mips2-jnpr/src/sys/mips/include/trap.h#4 (text+ko) ==== @@ -106,4 +106,10 @@ #endif +#ifndef LOCORE /* XXX */ +int check_address(void *); +void platform_trap_enter(void); +void platform_trap_exit(void); +#endif + #endif /* !_MACHINE_TRAP_H_ */ ==== //depot/projects/mips2-jnpr/src/sys/mips/mips/locore.S#5 (text+ko) ==== @@ -125,7 +125,8 @@ bne a2, zero, start_secondary nop - +/*XXXimp: should call platform_start here and also port over the + platform specific code. */ jal _C_LABEL(mips_init) # mips_init(argc, argv, envp) sw zero, START_FRAME - 8(sp) # Zero out old fp for debugger nop ==== //depot/projects/mips2-jnpr/src/sys/mips/mips/machdep.c#5 (text+ko) ==== @@ -122,7 +122,7 @@ SYSCTL_INT(_hw, OID_AUTO, clockrate, CTLFLAG_RD, &cpu_clock, 0, "CPU instruction clock rate"); -vm_offset_t proc0kstack; +vm_offset_t kstack0; #ifdef SMP struct pcpu __pcpu[32]; @@ -266,11 +266,11 @@ * Initialize mips and configure to run kernel */ -static void +void mips_proc0_init(void) { - proc0kstack = pmap_steal_memory(KSTACK_PAGES * PAGE_SIZE); - thread0.td_kstack = proc0kstack; + kstack0 = pmap_steal_memory(KSTACK_PAGES * PAGE_SIZE); + thread0.td_kstack = kstack0; thread0.td_pcb = (struct pcb *) (thread0.td_kstack + KSTACK_PAGES * PAGE_SIZE) - 1; @@ -513,6 +513,12 @@ #include /* * Do all the stuff that locore normally does before calling mi_start(). + * + * We need to migrate to the mips2 way of doing things. There's code in + * locore.S which preserves environment parameters and passes them to + * platform start... + * + * XXXimp */ void mips_init(int bootinfo_magic, int boothowto_arg, u_int32_t bootdev_arg, @@ -570,6 +576,7 @@ getmemsize(); +#if 0 /* depend on phys_avail being initialized first */ mips_proc0_init(); mutex_init(); @@ -579,8 +586,10 @@ if ((boothowto & RB_KDB) || (boothowto & RB_GDB)) kdb_enter(KDB_WHY_BOOTFLAGS, "Boot flags requested debugger"); #endif - pmap_bootstrap(); +#else + /* XXXimp need to call platform start */ +#endif init_param2(physmem); } ==== //depot/projects/mips2-jnpr/src/sys/mips/mips32/malta/malta_machdep.c#3 (text+ko) ==== @@ -183,12 +183,16 @@ mips_cpu_init(); pmap_bootstrap(); +#if 0 proc_linkup(&proc0, &thread0); thread0.td_kstack = kstack0; pcpu_init(pcpup, 0, sizeof(struct pcpu)); pcpup->pc_curthread = &thread0; cpu_thread_alloc(curthread); pcpup->pc_curpcb = curthread->td_pcb; +#else + mips_proc0_init(); +#endif mutex_init(); From owner-p4-projects@FreeBSD.ORG Fri Jan 4 07:43:14 2008 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 98B4216A468; Fri, 4 Jan 2008 07:43:14 +0000 (UTC) Delivered-To: perforce@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 55E2B16A418 for ; Fri, 4 Jan 2008 07:43:14 +0000 (UTC) (envelope-from zhouzhouyi@FreeBSD.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id 0D3E113C44B for ; Fri, 4 Jan 2008 07:43:14 +0000 (UTC) (envelope-from zhouzhouyi@FreeBSD.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.1/8.14.1) with ESMTP id m047hEXt051205 for ; Fri, 4 Jan 2008 07:43:14 GMT (envelope-from zhouzhouyi@FreeBSD.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.1/8.14.1/Submit) id m047h3Tb051200 for perforce@freebsd.org; Fri, 4 Jan 2008 07:43:03 GMT (envelope-from zhouzhouyi@FreeBSD.org) Date: Fri, 4 Jan 2008 07:43:03 GMT Message-Id: <200801040743.m047h3Tb051200@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to zhouzhouyi@FreeBSD.org using -f From: Zhouyi ZHOU To: Perforce Change Reviews Cc: Subject: PERFORCE change 132462 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 04 Jan 2008 07:43:15 -0000 http://perforce.freebsd.org/chv.cgi?CH=132462 Change 132462 by zhouzhouyi@zhouzhouyi_mactest on 2008/01/04 07:42:19 IFC Affected files ... .. //depot/projects/soc2007/zhouzhouyi_mactest_soc/regression/bin/mv/Makefile#1 branch .. //depot/projects/soc2007/zhouzhouyi_mactest_soc/regression/bin/mv/regress.sh#1 branch .. //depot/projects/soc2007/zhouzhouyi_mactest_soc/regression/bin/mv/regress.t#1 branch .. //depot/projects/soc2007/zhouzhouyi_mactest_soc/regression/geom_eli/init-a.t#4 integrate .. //depot/projects/soc2007/zhouzhouyi_mactest_soc/regression/geom_eli/init.t#4 integrate .. //depot/projects/soc2007/zhouzhouyi_mactest_soc/regression/geom_eli/integrity-copy.t#4 integrate .. //depot/projects/soc2007/zhouzhouyi_mactest_soc/regression/geom_eli/integrity-data.t#4 integrate .. //depot/projects/soc2007/zhouzhouyi_mactest_soc/regression/geom_eli/integrity-hmac.t#4 integrate .. //depot/projects/soc2007/zhouzhouyi_mactest_soc/regression/geom_eli/onetime-a.t#4 integrate .. //depot/projects/soc2007/zhouzhouyi_mactest_soc/regression/geom_eli/onetime.t#4 integrate .. //depot/projects/soc2007/zhouzhouyi_mactest_soc/regression/lib/libc/gen/test-wordexp.c#3 integrate .. //depot/projects/soc2007/zhouzhouyi_mactest_soc/regression/lib/libc/stdio/test-printfloat.c#3 integrate .. //depot/projects/soc2007/zhouzhouyi_mactest_soc/regression/lib/libc/stdio/test-scanfloat.c#3 integrate .. //depot/projects/soc2007/zhouzhouyi_mactest_soc/regression/lib/msun/Makefile#3 integrate .. //depot/projects/soc2007/zhouzhouyi_mactest_soc/regression/lib/msun/test-csqrt.c#1 branch .. //depot/projects/soc2007/zhouzhouyi_mactest_soc/regression/lib/msun/test-csqrt.t#1 branch .. //depot/projects/soc2007/zhouzhouyi_mactest_soc/regression/lib/msun/test-lround.c#3 integrate .. //depot/projects/soc2007/zhouzhouyi_mactest_soc/regression/lib/msun/test-nan.c#1 branch .. //depot/projects/soc2007/zhouzhouyi_mactest_soc/regression/lib/msun/test-nan.t#1 branch .. //depot/projects/soc2007/zhouzhouyi_mactest_soc/regression/lib/msun/test-next.c#3 integrate .. //depot/projects/soc2007/zhouzhouyi_mactest_soc/regression/netinet/tcpconnect/README.tcp-md5#1 branch .. //depot/projects/soc2007/zhouzhouyi_mactest_soc/regression/netinet/tcpconnect/tcpconnect.c#3 integrate .. //depot/projects/soc2007/zhouzhouyi_mactest_soc/regression/priv/Makefile#4 integrate .. //depot/projects/soc2007/zhouzhouyi_mactest_soc/regression/priv/main.c#4 integrate .. //depot/projects/soc2007/zhouzhouyi_mactest_soc/regression/priv/main.h#4 integrate .. //depot/projects/soc2007/zhouzhouyi_mactest_soc/regression/priv/priv_netinet_ipsec.c#1 branch .. //depot/projects/soc2007/zhouzhouyi_mactest_soc/regression/sockets/unix_gc/Makefile#1 branch .. //depot/projects/soc2007/zhouzhouyi_mactest_soc/regression/sockets/unix_gc/unix_gc.c#1 branch .. //depot/projects/soc2007/zhouzhouyi_mactest_soc/regression/usr.bin/sed/multitest.t#3 integrate .. //depot/projects/soc2007/zhouzhouyi_mactest_soc/regression/usr.bin/sed/regress.sh#4 integrate .. //depot/projects/soc2007/zhouzhouyi_mactest_soc/sys/amd64/amd64/busdma_machdep.c#3 integrate .. //depot/projects/soc2007/zhouzhouyi_mactest_soc/sys/amd64/amd64/db_trace.c#3 integrate .. //depot/projects/soc2007/zhouzhouyi_mactest_soc/sys/amd64/amd64/exception.S#3 integrate .. //depot/projects/soc2007/zhouzhouyi_mactest_soc/sys/amd64/amd64/genassym.c#4 integrate .. //depot/projects/soc2007/zhouzhouyi_mactest_soc/sys/amd64/amd64/identcpu.c#3 integrate .. //depot/projects/soc2007/zhouzhouyi_mactest_soc/sys/amd64/amd64/intr_machdep.c#3 integrate .. //depot/projects/soc2007/zhouzhouyi_mactest_soc/sys/amd64/amd64/machdep.c#4 integrate .. //depot/projects/soc2007/zhouzhouyi_mactest_soc/sys/amd64/amd64/mp_watchdog.c#3 integrate .. //depot/projects/soc2007/zhouzhouyi_mactest_soc/sys/amd64/amd64/pmap.c#5 integrate .. //depot/projects/soc2007/zhouzhouyi_mactest_soc/sys/amd64/amd64/prof_machdep.c#3 integrate .. //depot/projects/soc2007/zhouzhouyi_mactest_soc/sys/amd64/amd64/stack_machdep.c#1 branch .. //depot/projects/soc2007/zhouzhouyi_mactest_soc/sys/amd64/amd64/trap.c#4 integrate .. //depot/projects/soc2007/zhouzhouyi_mactest_soc/sys/amd64/amd64/vm_machdep.c#3 integrate .. //depot/projects/soc2007/zhouzhouyi_mactest_soc/sys/amd64/conf/GENERIC#6 integrate .. //depot/projects/soc2007/zhouzhouyi_mactest_soc/sys/amd64/conf/NOTES#5 integrate .. //depot/projects/soc2007/zhouzhouyi_mactest_soc/sys/amd64/include/pci_cfgreg.h#3 integrate .. //depot/projects/soc2007/zhouzhouyi_mactest_soc/sys/amd64/include/pmc_mdep.h#3 integrate .. //depot/projects/soc2007/zhouzhouyi_mactest_soc/sys/amd64/include/specialreg.h#4 integrate .. //depot/projects/soc2007/zhouzhouyi_mactest_soc/sys/amd64/include/stack.h#1 branch .. //depot/projects/soc2007/zhouzhouyi_mactest_soc/sys/amd64/include/vmparam.h#4 integrate .. //depot/projects/soc2007/zhouzhouyi_mactest_soc/sys/amd64/pci/pci_cfgreg.c#3 integrate .. //depot/projects/soc2007/zhouzhouyi_mactest_soc/sys/arm/arm/busdma_machdep.c#4 integrate .. //depot/projects/soc2007/zhouzhouyi_mactest_soc/sys/arm/arm/cpufunc.c#6 integrate .. //depot/projects/soc2007/zhouzhouyi_mactest_soc/sys/arm/arm/cpufunc_asm_xscale_c3.S#1 branch .. //depot/projects/soc2007/zhouzhouyi_mactest_soc/sys/arm/arm/db_trace.c#3 integrate .. //depot/projects/soc2007/zhouzhouyi_mactest_soc/sys/arm/arm/nexus_io.c#3 delete .. //depot/projects/soc2007/zhouzhouyi_mactest_soc/sys/arm/arm/nexus_io_asm.S#3 delete .. //depot/projects/soc2007/zhouzhouyi_mactest_soc/sys/arm/arm/pmap.c#6 integrate .. //depot/projects/soc2007/zhouzhouyi_mactest_soc/sys/arm/arm/stack_machdep.c#1 branch .. //depot/projects/soc2007/zhouzhouyi_mactest_soc/sys/arm/arm/trap.c#4 integrate .. //depot/projects/soc2007/zhouzhouyi_mactest_soc/sys/arm/arm/vm_machdep.c#4 integrate .. //depot/projects/soc2007/zhouzhouyi_mactest_soc/sys/arm/at91/at91.c#3 integrate .. //depot/projects/soc2007/zhouzhouyi_mactest_soc/sys/arm/at91/if_ate.c#4 integrate .. //depot/projects/soc2007/zhouzhouyi_mactest_soc/sys/arm/at91/kb920x_machdep.c#5 integrate .. //depot/projects/soc2007/zhouzhouyi_mactest_soc/sys/arm/at91/uart_dev_at91usart.c#3 integrate .. //depot/projects/soc2007/zhouzhouyi_mactest_soc/sys/arm/conf/AVILA#4 integrate .. //depot/projects/soc2007/zhouzhouyi_mactest_soc/sys/arm/conf/BWCT#3 integrate .. //depot/projects/soc2007/zhouzhouyi_mactest_soc/sys/arm/conf/CRB#1 branch .. //depot/projects/soc2007/zhouzhouyi_mactest_soc/sys/arm/conf/EP80219#3 integrate .. //depot/projects/soc2007/zhouzhouyi_mactest_soc/sys/arm/conf/HL200#1 branch .. //depot/projects/soc2007/zhouzhouyi_mactest_soc/sys/arm/conf/IQ31244#3 integrate .. //depot/projects/soc2007/zhouzhouyi_mactest_soc/sys/arm/conf/KB920X#4 integrate .. //depot/projects/soc2007/zhouzhouyi_mactest_soc/sys/arm/conf/SIMICS#3 integrate .. //depot/projects/soc2007/zhouzhouyi_mactest_soc/sys/arm/conf/SKYEYE#3 integrate .. //depot/projects/soc2007/zhouzhouyi_mactest_soc/sys/arm/include/asmacros.h#4 integrate .. //depot/projects/soc2007/zhouzhouyi_mactest_soc/sys/arm/include/atomic.h#3 integrate .. //depot/projects/soc2007/zhouzhouyi_mactest_soc/sys/arm/include/pmc_mdep.h#3 integrate .. //depot/projects/soc2007/zhouzhouyi_mactest_soc/sys/arm/include/stack.h#1 branch .. //depot/projects/soc2007/zhouzhouyi_mactest_soc/sys/arm/include/vmparam.h#4 integrate .. //depot/projects/soc2007/zhouzhouyi_mactest_soc/sys/arm/sa11x0/files.sa11x0#3 integrate .. //depot/projects/soc2007/zhouzhouyi_mactest_soc/sys/arm/xscale/i8134x/crb_machdep.c#1 branch .. //depot/projects/soc2007/zhouzhouyi_mactest_soc/sys/arm/xscale/i8134x/files.crb#1 branch .. //depot/projects/soc2007/zhouzhouyi_mactest_soc/sys/arm/xscale/i8134x/files.i81342#1 branch .. //depot/projects/soc2007/zhouzhouyi_mactest_soc/sys/arm/xscale/i8134x/i81342.c#1 branch .. //depot/projects/soc2007/zhouzhouyi_mactest_soc/sys/arm/xscale/i8134x/i81342_mcu.c#1 branch .. //depot/projects/soc2007/zhouzhouyi_mactest_soc/sys/arm/xscale/i8134x/i81342_pci.c#1 branch .. //depot/projects/soc2007/zhouzhouyi_mactest_soc/sys/arm/xscale/i8134x/i81342_space.c#1 branch .. //depot/projects/soc2007/zhouzhouyi_mactest_soc/sys/arm/xscale/i8134x/i81342reg.h#1 branch .. //depot/projects/soc2007/zhouzhouyi_mactest_soc/sys/arm/xscale/i8134x/i81342var.h#1 branch .. //depot/projects/soc2007/zhouzhouyi_mactest_soc/sys/arm/xscale/i8134x/obio.c#1 branch .. //depot/projects/soc2007/zhouzhouyi_mactest_soc/sys/arm/xscale/i8134x/obio_space.c#1 branch .. //depot/projects/soc2007/zhouzhouyi_mactest_soc/sys/arm/xscale/i8134x/obiovar.h#1 branch .. //depot/projects/soc2007/zhouzhouyi_mactest_soc/sys/arm/xscale/i8134x/std.crb#1 branch .. //depot/projects/soc2007/zhouzhouyi_mactest_soc/sys/arm/xscale/i8134x/std.i81342#1 branch .. //depot/projects/soc2007/zhouzhouyi_mactest_soc/sys/arm/xscale/i8134x/uart_bus_i81342.c#1 branch .. //depot/projects/soc2007/zhouzhouyi_mactest_soc/sys/arm/xscale/i8134x/uart_cpu_i81342.c#1 branch .. //depot/projects/soc2007/zhouzhouyi_mactest_soc/sys/boot/arm/at91/boot2/bwct_board.c#1 branch .. //depot/projects/soc2007/zhouzhouyi_mactest_soc/sys/boot/arm/at91/boot2/centipad_board.c#1 branch .. //depot/projects/soc2007/zhouzhouyi_mactest_soc/sys/boot/arm/at91/libat91/spi_flash.c#3 integrate .. //depot/projects/soc2007/zhouzhouyi_mactest_soc/sys/boot/common/loader.8#3 integrate .. //depot/projects/soc2007/zhouzhouyi_mactest_soc/sys/boot/forth/support.4th#3 integrate .. //depot/projects/soc2007/zhouzhouyi_mactest_soc/sys/boot/i386/cdboot/cdboot.s#3 integrate .. //depot/projects/soc2007/zhouzhouyi_mactest_soc/sys/boot/i386/gptboot/Makefile#1 branch .. //depot/projects/soc2007/zhouzhouyi_mactest_soc/sys/boot/i386/gptboot/gptboot.c#1 branch .. //depot/projects/soc2007/zhouzhouyi_mactest_soc/sys/boot/i386/gptboot/gptldr.S#1 branch .. //depot/projects/soc2007/zhouzhouyi_mactest_soc/sys/boot/i386/libi386/biosdisk.c#4 integrate .. //depot/projects/soc2007/zhouzhouyi_mactest_soc/sys/boot/i386/pmbr/Makefile#1 branch .. //depot/projects/soc2007/zhouzhouyi_mactest_soc/sys/boot/i386/pmbr/pmbr.s#1 branch .. //depot/projects/soc2007/zhouzhouyi_mactest_soc/sys/boot/pc98/cdboot/cdboot.s#3 integrate .. //depot/projects/soc2007/zhouzhouyi_mactest_soc/sys/boot/powerpc/Makefile#3 integrate .. //depot/projects/soc2007/zhouzhouyi_mactest_soc/sys/boot/powerpc/loader/Makefile#3 delete .. //depot/projects/soc2007/zhouzhouyi_mactest_soc/sys/boot/powerpc/loader/conf.c#3 delete .. //depot/projects/soc2007/zhouzhouyi_mactest_soc/sys/boot/powerpc/loader/help.ofw#3 delete .. //depot/projects/soc2007/zhouzhouyi_mactest_soc/sys/boot/powerpc/loader/ldscript.powerpc#3 delete .. //depot/projects/soc2007/zhouzhouyi_mactest_soc/sys/boot/powerpc/loader/metadata.c#3 delete .. //depot/projects/soc2007/zhouzhouyi_mactest_soc/sys/boot/powerpc/loader/start.c#3 delete .. //depot/projects/soc2007/zhouzhouyi_mactest_soc/sys/boot/powerpc/loader/version#3 delete .. //depot/projects/soc2007/zhouzhouyi_mactest_soc/sys/boot/powerpc/ofw/Makefile#1 branch .. //depot/projects/soc2007/zhouzhouyi_mactest_soc/sys/boot/powerpc/ofw/conf.c#1 branch .. //depot/projects/soc2007/zhouzhouyi_mactest_soc/sys/boot/powerpc/ofw/help.ofw#1 branch .. //depot/projects/soc2007/zhouzhouyi_mactest_soc/sys/boot/powerpc/ofw/ldscript.powerpc#1 branch .. //depot/projects/soc2007/zhouzhouyi_mactest_soc/sys/boot/powerpc/ofw/metadata.c#1 branch .. //depot/projects/soc2007/zhouzhouyi_mactest_soc/sys/boot/powerpc/ofw/start.c#1 branch .. //depot/projects/soc2007/zhouzhouyi_mactest_soc/sys/boot/powerpc/ofw/version#1 branch .. //depot/projects/soc2007/zhouzhouyi_mactest_soc/sys/cam/cam_xpt.c#4 integrate .. //depot/projects/soc2007/zhouzhouyi_mactest_soc/sys/cam/scsi/scsi_all.h#4 integrate .. //depot/projects/soc2007/zhouzhouyi_mactest_soc/sys/cam/scsi/scsi_da.c#4 integrate .. //depot/projects/soc2007/zhouzhouyi_mactest_soc/sys/cam/scsi/scsi_low.h#3 integrate .. //depot/projects/soc2007/zhouzhouyi_mactest_soc/sys/compat/freebsd32/freebsd32.h#3 integrate .. //depot/projects/soc2007/zhouzhouyi_mactest_soc/sys/compat/freebsd32/freebsd32_ipc.h#1 branch .. //depot/projects/soc2007/zhouzhouyi_mactest_soc/sys/compat/freebsd32/freebsd32_misc.c#4 integrate .. //depot/projects/soc2007/zhouzhouyi_mactest_soc/sys/compat/freebsd32/freebsd32_proto.h#4 integrate .. //depot/projects/soc2007/zhouzhouyi_mactest_soc/sys/compat/freebsd32/freebsd32_syscall.h#4 integrate .. //depot/projects/soc2007/zhouzhouyi_mactest_soc/sys/compat/freebsd32/freebsd32_syscalls.c#4 integrate .. //depot/projects/soc2007/zhouzhouyi_mactest_soc/sys/compat/freebsd32/freebsd32_sysent.c#4 integrate .. //depot/projects/soc2007/zhouzhouyi_mactest_soc/sys/compat/freebsd32/syscalls.master#4 integrate .. //depot/projects/soc2007/zhouzhouyi_mactest_soc/sys/compat/linprocfs/linprocfs.c#4 integrate .. //depot/projects/soc2007/zhouzhouyi_mactest_soc/sys/compat/linux/linux_file.c#5 integrate .. //depot/projects/soc2007/zhouzhouyi_mactest_soc/sys/compat/linux/linux_ioctl.c#3 integrate .. //depot/projects/soc2007/zhouzhouyi_mactest_soc/sys/compat/linux/linux_ioctl.h#3 integrate .. //depot/projects/soc2007/zhouzhouyi_mactest_soc/sys/compat/linux/linux_stats.c#4 integrate .. //depot/projects/soc2007/zhouzhouyi_mactest_soc/sys/compat/ndis/ndis_var.h#3 integrate .. //depot/projects/soc2007/zhouzhouyi_mactest_soc/sys/compat/ndis/ntoskrnl_var.h#3 integrate .. //depot/projects/soc2007/zhouzhouyi_mactest_soc/sys/compat/ndis/subr_ndis.c#3 integrate .. //depot/projects/soc2007/zhouzhouyi_mactest_soc/sys/compat/ndis/subr_ntoskrnl.c#4 integrate .. //depot/projects/soc2007/zhouzhouyi_mactest_soc/sys/compat/opensolaris/rpc/xdr.h#3 integrate .. //depot/projects/soc2007/zhouzhouyi_mactest_soc/sys/compat/opensolaris/sys/atomic.h#3 integrate .. //depot/projects/soc2007/zhouzhouyi_mactest_soc/sys/compat/opensolaris/sys/bitmap.h#1 branch .. //depot/projects/soc2007/zhouzhouyi_mactest_soc/sys/compat/opensolaris/sys/cpupart.h#1 branch .. //depot/projects/soc2007/zhouzhouyi_mactest_soc/sys/compat/opensolaris/sys/cpuvar.h#1 branch .. //depot/projects/soc2007/zhouzhouyi_mactest_soc/sys/compat/opensolaris/sys/cyclic.h#1 branch .. //depot/projects/soc2007/zhouzhouyi_mactest_soc/sys/compat/opensolaris/sys/elf.h#1 branch .. //depot/projects/soc2007/zhouzhouyi_mactest_soc/sys/compat/opensolaris/sys/kmem.h#3 integrate .. //depot/projects/soc2007/zhouzhouyi_mactest_soc/sys/compat/opensolaris/sys/mman.h#1 branch .. //depot/projects/soc2007/zhouzhouyi_mactest_soc/sys/compat/opensolaris/sys/modctl.h#1 branch .. //depot/projects/soc2007/zhouzhouyi_mactest_soc/sys/compat/opensolaris/sys/objfs.h#1 branch .. //depot/projects/soc2007/zhouzhouyi_mactest_soc/sys/compat/opensolaris/sys/param.h#1 branch .. //depot/projects/soc2007/zhouzhouyi_mactest_soc/sys/compat/opensolaris/sys/pcpu.h#1 branch .. //depot/projects/soc2007/zhouzhouyi_mactest_soc/sys/compat/opensolaris/sys/proc.h#4 integrate .. //depot/projects/soc2007/zhouzhouyi_mactest_soc/sys/compat/opensolaris/sys/stat.h#1 branch .. //depot/projects/soc2007/zhouzhouyi_mactest_soc/sys/compat/opensolaris/sys/time.h#3 integrate .. //depot/projects/soc2007/zhouzhouyi_mactest_soc/sys/compat/opensolaris/sys/types.h#3 integrate .. //depot/projects/soc2007/zhouzhouyi_mactest_soc/sys/compat/svr4/svr4_stream.c#3 integrate .. //depot/projects/soc2007/zhouzhouyi_mactest_soc/sys/conf/Makefile.amd64#3 integrate .. //depot/projects/soc2007/zhouzhouyi_mactest_soc/sys/conf/NOTES#6 integrate .. //depot/projects/soc2007/zhouzhouyi_mactest_soc/sys/conf/files#8 edit .. //depot/projects/soc2007/zhouzhouyi_mactest_soc/sys/conf/files.amd64#6 integrate .. //depot/projects/soc2007/zhouzhouyi_mactest_soc/sys/conf/files.arm#5 integrate .. //depot/projects/soc2007/zhouzhouyi_mactest_soc/sys/conf/files.i386#6 integrate .. //depot/projects/soc2007/zhouzhouyi_mactest_soc/sys/conf/files.ia64#5 integrate .. //depot/projects/soc2007/zhouzhouyi_mactest_soc/sys/conf/files.pc98#5 integrate .. //depot/projects/soc2007/zhouzhouyi_mactest_soc/sys/conf/files.powerpc#5 integrate .. //depot/projects/soc2007/zhouzhouyi_mactest_soc/sys/conf/files.sparc64#4 integrate .. //depot/projects/soc2007/zhouzhouyi_mactest_soc/sys/conf/files.sun4v#5 integrate .. //depot/projects/soc2007/zhouzhouyi_mactest_soc/sys/conf/kmod.mk#4 integrate .. //depot/projects/soc2007/zhouzhouyi_mactest_soc/sys/conf/options#5 integrate .. //depot/projects/soc2007/zhouzhouyi_mactest_soc/sys/conf/options.amd64#4 integrate .. //depot/projects/soc2007/zhouzhouyi_mactest_soc/sys/conf/options.i386#4 integrate .. //depot/projects/soc2007/zhouzhouyi_mactest_soc/sys/conf/options.powerpc#3 integrate .. //depot/projects/soc2007/zhouzhouyi_mactest_soc/sys/contrib/dev/wpi/LICENSE#1 branch .. //depot/projects/soc2007/zhouzhouyi_mactest_soc/sys/contrib/dev/wpi/iwlwifi-3945-2.14.4.fw.uu#1 branch .. //depot/projects/soc2007/zhouzhouyi_mactest_soc/sys/contrib/ipfilter/netinet/fil.c#5 integrate .. //depot/projects/soc2007/zhouzhouyi_mactest_soc/sys/contrib/ipfilter/netinet/ip_auth.c#5 integrate .. //depot/projects/soc2007/zhouzhouyi_mactest_soc/sys/contrib/ipfilter/netinet/ip_fil_freebsd.c#5 integrate .. //depot/projects/soc2007/zhouzhouyi_mactest_soc/sys/contrib/opensolaris/common/avl/avl.c#3 integrate .. //depot/projects/soc2007/zhouzhouyi_mactest_soc/sys/contrib/opensolaris/common/nvpair/nvpair.c#3 integrate .. //depot/projects/soc2007/zhouzhouyi_mactest_soc/sys/contrib/opensolaris/uts/common/fs/zfs/arc.c#4 integrate .. //depot/projects/soc2007/zhouzhouyi_mactest_soc/sys/contrib/opensolaris/uts/common/fs/zfs/sys/spa.h#3 integrate .. //depot/projects/soc2007/zhouzhouyi_mactest_soc/sys/contrib/opensolaris/uts/common/fs/zfs/vdev_cache.c#3 integrate .. //depot/projects/soc2007/zhouzhouyi_mactest_soc/sys/contrib/opensolaris/uts/common/fs/zfs/vdev_queue.c#3 integrate .. //depot/projects/soc2007/zhouzhouyi_mactest_soc/sys/contrib/opensolaris/uts/common/fs/zfs/zil.c#3 integrate .. //depot/projects/soc2007/zhouzhouyi_mactest_soc/sys/contrib/opensolaris/uts/common/fs/zfs/zio.c#3 integrate .. //depot/projects/soc2007/zhouzhouyi_mactest_soc/sys/contrib/opensolaris/uts/common/rpc/xdr.c#3 integrate .. //depot/projects/soc2007/zhouzhouyi_mactest_soc/sys/contrib/opensolaris/uts/common/rpc/xdr.h#3 integrate .. //depot/projects/soc2007/zhouzhouyi_mactest_soc/sys/contrib/opensolaris/uts/common/sys/byteorder.h#3 integrate .. //depot/projects/soc2007/zhouzhouyi_mactest_soc/sys/contrib/opensolaris/uts/common/sys/isa_defs.h#3 integrate .. //depot/projects/soc2007/zhouzhouyi_mactest_soc/sys/contrib/opensolaris/uts/common/sys/procset.h#3 integrate .. //depot/projects/soc2007/zhouzhouyi_mactest_soc/sys/contrib/opensolaris/uts/common/sys/sysmacros.h#3 integrate .. //depot/projects/soc2007/zhouzhouyi_mactest_soc/sys/contrib/opensolaris/uts/common/sys/vmem.h#3 integrate .. //depot/projects/soc2007/zhouzhouyi_mactest_soc/sys/contrib/pf/net/pf.c#5 integrate .. //depot/projects/soc2007/zhouzhouyi_mactest_soc/sys/contrib/pf/net/pf_if.c#5 integrate .. //depot/projects/soc2007/zhouzhouyi_mactest_soc/sys/contrib/pf/net/pf_ioctl.c#4 integrate .. //depot/projects/soc2007/zhouzhouyi_mactest_soc/sys/contrib/pf/net/pf_ruleset.c#1 branch .. //depot/projects/soc2007/zhouzhouyi_mactest_soc/sys/ddb/db_capture.c#1 branch .. //depot/projects/soc2007/zhouzhouyi_mactest_soc/sys/ddb/db_command.c#3 integrate .. //depot/projects/soc2007/zhouzhouyi_mactest_soc/sys/ddb/db_command.h#3 integrate .. //depot/projects/soc2007/zhouzhouyi_mactest_soc/sys/ddb/db_input.c#3 integrate .. //depot/projects/soc2007/zhouzhouyi_mactest_soc/sys/ddb/db_lex.c#3 integrate .. //depot/projects/soc2007/zhouzhouyi_mactest_soc/sys/ddb/db_lex.h#3 integrate .. //depot/projects/soc2007/zhouzhouyi_mactest_soc/sys/ddb/db_main.c#3 integrate .. //depot/projects/soc2007/zhouzhouyi_mactest_soc/sys/ddb/db_output.c#3 integrate .. //depot/projects/soc2007/zhouzhouyi_mactest_soc/sys/ddb/db_script.c#1 branch .. //depot/projects/soc2007/zhouzhouyi_mactest_soc/sys/ddb/db_textdump.c#1 branch .. //depot/projects/soc2007/zhouzhouyi_mactest_soc/sys/ddb/ddb.h#3 integrate .. //depot/projects/soc2007/zhouzhouyi_mactest_soc/sys/dev/aac/aac.c#5 integrate .. //depot/projects/soc2007/zhouzhouyi_mactest_soc/sys/dev/aac/aac_cam.c#4 integrate .. //depot/projects/soc2007/zhouzhouyi_mactest_soc/sys/dev/aac/aac_debug.c#3 integrate .. //depot/projects/soc2007/zhouzhouyi_mactest_soc/sys/dev/aac/aac_pci.c#5 integrate .. //depot/projects/soc2007/zhouzhouyi_mactest_soc/sys/dev/aac/aacreg.h#3 integrate .. //depot/projects/soc2007/zhouzhouyi_mactest_soc/sys/dev/aac/aacvar.h#3 integrate .. //depot/projects/soc2007/zhouzhouyi_mactest_soc/sys/dev/acpica/Osd/OsdDebug.c#3 integrate .. //depot/projects/soc2007/zhouzhouyi_mactest_soc/sys/dev/acpica/acpi_battery.c#4 integrate .. //depot/projects/soc2007/zhouzhouyi_mactest_soc/sys/dev/acpica/acpi_ec.c#5 integrate .. //depot/projects/soc2007/zhouzhouyi_mactest_soc/sys/dev/acpica/acpi_thermal.c#3 integrate .. //depot/projects/soc2007/zhouzhouyi_mactest_soc/sys/dev/agp/agp.c#1 branch .. //depot/projects/soc2007/zhouzhouyi_mactest_soc/sys/dev/agp/agp_ali.c#1 branch .. //depot/projects/soc2007/zhouzhouyi_mactest_soc/sys/dev/agp/agp_amd.c#1 branch .. //depot/projects/soc2007/zhouzhouyi_mactest_soc/sys/dev/agp/agp_amd64.c#1 branch .. //depot/projects/soc2007/zhouzhouyi_mactest_soc/sys/dev/agp/agp_ati.c#1 branch .. //depot/projects/soc2007/zhouzhouyi_mactest_soc/sys/dev/agp/agp_i810.c#1 branch .. //depot/projects/soc2007/zhouzhouyi_mactest_soc/sys/dev/agp/agp_if.m#1 branch .. //depot/projects/soc2007/zhouzhouyi_mactest_soc/sys/dev/agp/agp_intel.c#1 branch .. //depot/projects/soc2007/zhouzhouyi_mactest_soc/sys/dev/agp/agp_nvidia.c#1 branch .. //depot/projects/soc2007/zhouzhouyi_mactest_soc/sys/dev/agp/agp_sis.c#1 branch .. //depot/projects/soc2007/zhouzhouyi_mactest_soc/sys/dev/agp/agp_via.c#1 branch .. //depot/projects/soc2007/zhouzhouyi_mactest_soc/sys/dev/agp/agppriv.h#1 branch .. //depot/projects/soc2007/zhouzhouyi_mactest_soc/sys/dev/agp/agpreg.h#1 branch .. //depot/projects/soc2007/zhouzhouyi_mactest_soc/sys/dev/agp/agpvar.h#1 branch .. //depot/projects/soc2007/zhouzhouyi_mactest_soc/sys/dev/amr/amr.c#3 integrate .. //depot/projects/soc2007/zhouzhouyi_mactest_soc/sys/dev/amr/amr_cam.c#3 integrate .. //depot/projects/soc2007/zhouzhouyi_mactest_soc/sys/dev/amr/amr_pci.c#3 integrate .. //depot/projects/soc2007/zhouzhouyi_mactest_soc/sys/dev/amr/amrvar.h#3 integrate .. //depot/projects/soc2007/zhouzhouyi_mactest_soc/sys/dev/an/if_an.c#4 integrate .. //depot/projects/soc2007/zhouzhouyi_mactest_soc/sys/dev/an/if_anreg.h#3 integrate .. //depot/projects/soc2007/zhouzhouyi_mactest_soc/sys/dev/arcmsr/arcmsr.c#4 integrate .. //depot/projects/soc2007/zhouzhouyi_mactest_soc/sys/dev/arcmsr/arcmsr.h#3 integrate .. //depot/projects/soc2007/zhouzhouyi_mactest_soc/sys/dev/asmc/asmc.c#1 branch .. //depot/projects/soc2007/zhouzhouyi_mactest_soc/sys/dev/asmc/asmcvar.h#1 branch .. //depot/projects/soc2007/zhouzhouyi_mactest_soc/sys/dev/ata/ata-all.h#5 integrate .. //depot/projects/soc2007/zhouzhouyi_mactest_soc/sys/dev/ata/ata-chipset.c#7 integrate .. //depot/projects/soc2007/zhouzhouyi_mactest_soc/sys/dev/ata/ata-disk.c#5 integrate .. //depot/projects/soc2007/zhouzhouyi_mactest_soc/sys/dev/ata/ata-dma.c#4 integrate .. //depot/projects/soc2007/zhouzhouyi_mactest_soc/sys/dev/ata/ata-lowlevel.c#4 integrate .. //depot/projects/soc2007/zhouzhouyi_mactest_soc/sys/dev/ata/ata-pci.c#5 integrate .. //depot/projects/soc2007/zhouzhouyi_mactest_soc/sys/dev/ata/ata-pci.h#6 integrate .. //depot/projects/soc2007/zhouzhouyi_mactest_soc/sys/dev/ata/atapi-cd.c#5 integrate .. //depot/projects/soc2007/zhouzhouyi_mactest_soc/sys/dev/ata/atapi-fd.c#4 integrate .. //depot/projects/soc2007/zhouzhouyi_mactest_soc/sys/dev/ata/atapi-tape.c#4 integrate .. //depot/projects/soc2007/zhouzhouyi_mactest_soc/sys/dev/atkbdc/atkbd.c#3 integrate .. //depot/projects/soc2007/zhouzhouyi_mactest_soc/sys/dev/atkbdc/atkbd_atkbdc.c#3 integrate .. //depot/projects/soc2007/zhouzhouyi_mactest_soc/sys/dev/bce/if_bce.c#4 integrate .. //depot/projects/soc2007/zhouzhouyi_mactest_soc/sys/dev/bfe/if_bfe.c#3 integrate .. //depot/projects/soc2007/zhouzhouyi_mactest_soc/sys/dev/bge/if_bge.c#4 integrate .. //depot/projects/soc2007/zhouzhouyi_mactest_soc/sys/dev/bge/if_bgereg.h#3 integrate .. //depot/projects/soc2007/zhouzhouyi_mactest_soc/sys/dev/cxgb/common/cxgb_t3_cpl.h#4 integrate .. //depot/projects/soc2007/zhouzhouyi_mactest_soc/sys/dev/cxgb/cxgb_adapter.h#4 integrate .. //depot/projects/soc2007/zhouzhouyi_mactest_soc/sys/dev/cxgb/cxgb_config.h#3 integrate .. //depot/projects/soc2007/zhouzhouyi_mactest_soc/sys/dev/cxgb/cxgb_include.h#4 integrate .. //depot/projects/soc2007/zhouzhouyi_mactest_soc/sys/dev/cxgb/cxgb_l2t.c#4 integrate .. //depot/projects/soc2007/zhouzhouyi_mactest_soc/sys/dev/cxgb/cxgb_l2t.h#4 integrate .. //depot/projects/soc2007/zhouzhouyi_mactest_soc/sys/dev/cxgb/cxgb_main.c#4 integrate .. //depot/projects/soc2007/zhouzhouyi_mactest_soc/sys/dev/cxgb/cxgb_offload.c#4 integrate .. //depot/projects/soc2007/zhouzhouyi_mactest_soc/sys/dev/cxgb/cxgb_offload.h#4 integrate .. //depot/projects/soc2007/zhouzhouyi_mactest_soc/sys/dev/cxgb/cxgb_osdep.h#4 integrate .. //depot/projects/soc2007/zhouzhouyi_mactest_soc/sys/dev/cxgb/cxgb_sge.c#4 integrate .. //depot/projects/soc2007/zhouzhouyi_mactest_soc/sys/dev/cxgb/sys/cxgb_support.c#1 branch .. //depot/projects/soc2007/zhouzhouyi_mactest_soc/sys/dev/cxgb/sys/mbufq.h#3 integrate .. //depot/projects/soc2007/zhouzhouyi_mactest_soc/sys/dev/cxgb/sys/mvec.h#4 integrate .. //depot/projects/soc2007/zhouzhouyi_mactest_soc/sys/dev/cxgb/sys/uipc_mvec.c#3 integrate .. //depot/projects/soc2007/zhouzhouyi_mactest_soc/sys/dev/cxgb/t3b_protocol_sram-1.1.0.bin.gz.uu#1 branch .. //depot/projects/soc2007/zhouzhouyi_mactest_soc/sys/dev/cxgb/t3b_tp_eeprom-1.1.0.bin.gz.uu#1 branch .. //depot/projects/soc2007/zhouzhouyi_mactest_soc/sys/dev/cxgb/t3cdev.h#1 branch .. //depot/projects/soc2007/zhouzhouyi_mactest_soc/sys/dev/cxgb/t3fw-4.7.0.bin.gz.uu#1 branch .. //depot/projects/soc2007/zhouzhouyi_mactest_soc/sys/dev/cxgb/ulp/toecore/cxgb_toedev.h#1 branch .. //depot/projects/soc2007/zhouzhouyi_mactest_soc/sys/dev/cxgb/ulp/toecore/toedev.c#1 branch .. //depot/projects/soc2007/zhouzhouyi_mactest_soc/sys/dev/cxgb/ulp/toecore/toedev.h#3 delete .. //depot/projects/soc2007/zhouzhouyi_mactest_soc/sys/dev/cxgb/ulp/tom/cxgb_cpl_io.c#1 branch .. //depot/projects/soc2007/zhouzhouyi_mactest_soc/sys/dev/cxgb/ulp/tom/cxgb_cpl_socket.c#1 branch .. //depot/projects/soc2007/zhouzhouyi_mactest_soc/sys/dev/cxgb/ulp/tom/cxgb_defs.h#1 branch .. //depot/projects/soc2007/zhouzhouyi_mactest_soc/sys/dev/cxgb/ulp/tom/cxgb_listen.c#1 branch .. //depot/projects/soc2007/zhouzhouyi_mactest_soc/sys/dev/cxgb/ulp/tom/cxgb_t3_ddp.h#1 branch .. //depot/projects/soc2007/zhouzhouyi_mactest_soc/sys/dev/cxgb/ulp/tom/cxgb_tcp.h#1 branch .. //depot/projects/soc2007/zhouzhouyi_mactest_soc/sys/dev/cxgb/ulp/tom/cxgb_tcp_subr.c#1 branch .. //depot/projects/soc2007/zhouzhouyi_mactest_soc/sys/dev/cxgb/ulp/tom/cxgb_tcp_usrreq.c#1 branch .. //depot/projects/soc2007/zhouzhouyi_mactest_soc/sys/dev/cxgb/ulp/tom/cxgb_toepcb.h#1 branch .. //depot/projects/soc2007/zhouzhouyi_mactest_soc/sys/dev/cxgb/ulp/tom/cxgb_tom.c#1 branch .. //depot/projects/soc2007/zhouzhouyi_mactest_soc/sys/dev/cxgb/ulp/tom/cxgb_tom.h#1 branch .. //depot/projects/soc2007/zhouzhouyi_mactest_soc/sys/dev/cxgb/ulp/tom/cxgb_tom_sysctl.c#1 branch .. //depot/projects/soc2007/zhouzhouyi_mactest_soc/sys/dev/dc/dcphy.c#3 integrate .. //depot/projects/soc2007/zhouzhouyi_mactest_soc/sys/dev/dc/if_dc.c#4 integrate .. //depot/projects/soc2007/zhouzhouyi_mactest_soc/sys/dev/dcons/dcons_os.c#4 integrate .. //depot/projects/soc2007/zhouzhouyi_mactest_soc/sys/dev/drm/drmP.h#3 integrate .. //depot/projects/soc2007/zhouzhouyi_mactest_soc/sys/dev/drm/drm_agpsupport.c#3 integrate .. //depot/projects/soc2007/zhouzhouyi_mactest_soc/sys/dev/ed/if_ed_pci.c#3 integrate .. //depot/projects/soc2007/zhouzhouyi_mactest_soc/sys/dev/ed/if_ed_rtl80x9.c#3 integrate .. //depot/projects/soc2007/zhouzhouyi_mactest_soc/sys/dev/em/e1000_80003es2lan.c#3 integrate .. //depot/projects/soc2007/zhouzhouyi_mactest_soc/sys/dev/em/e1000_80003es2lan.h#3 integrate .. //depot/projects/soc2007/zhouzhouyi_mactest_soc/sys/dev/em/e1000_82540.c#3 integrate .. //depot/projects/soc2007/zhouzhouyi_mactest_soc/sys/dev/em/e1000_82541.c#3 integrate .. //depot/projects/soc2007/zhouzhouyi_mactest_soc/sys/dev/em/e1000_82541.h#3 integrate .. //depot/projects/soc2007/zhouzhouyi_mactest_soc/sys/dev/em/e1000_82542.c#3 integrate .. //depot/projects/soc2007/zhouzhouyi_mactest_soc/sys/dev/em/e1000_82543.c#3 integrate .. //depot/projects/soc2007/zhouzhouyi_mactest_soc/sys/dev/em/e1000_82543.h#3 integrate .. //depot/projects/soc2007/zhouzhouyi_mactest_soc/sys/dev/em/e1000_82571.c#3 integrate .. //depot/projects/soc2007/zhouzhouyi_mactest_soc/sys/dev/em/e1000_82571.h#3 integrate .. //depot/projects/soc2007/zhouzhouyi_mactest_soc/sys/dev/em/e1000_82575.c#3 integrate .. //depot/projects/soc2007/zhouzhouyi_mactest_soc/sys/dev/em/e1000_82575.h#3 integrate .. //depot/projects/soc2007/zhouzhouyi_mactest_soc/sys/dev/em/e1000_api.c#3 integrate .. //depot/projects/soc2007/zhouzhouyi_mactest_soc/sys/dev/em/e1000_api.h#3 integrate .. //depot/projects/soc2007/zhouzhouyi_mactest_soc/sys/dev/em/e1000_defines.h#3 integrate .. //depot/projects/soc2007/zhouzhouyi_mactest_soc/sys/dev/em/e1000_hw.h#3 integrate .. //depot/projects/soc2007/zhouzhouyi_mactest_soc/sys/dev/em/e1000_ich8lan.c#3 integrate .. //depot/projects/soc2007/zhouzhouyi_mactest_soc/sys/dev/em/e1000_ich8lan.h#3 integrate .. //depot/projects/soc2007/zhouzhouyi_mactest_soc/sys/dev/em/e1000_mac.c#3 integrate .. //depot/projects/soc2007/zhouzhouyi_mactest_soc/sys/dev/em/e1000_mac.h#3 integrate .. //depot/projects/soc2007/zhouzhouyi_mactest_soc/sys/dev/em/e1000_manage.c#3 integrate .. //depot/projects/soc2007/zhouzhouyi_mactest_soc/sys/dev/em/e1000_manage.h#3 integrate .. //depot/projects/soc2007/zhouzhouyi_mactest_soc/sys/dev/em/e1000_nvm.c#3 integrate .. //depot/projects/soc2007/zhouzhouyi_mactest_soc/sys/dev/em/e1000_nvm.h#3 integrate .. //depot/projects/soc2007/zhouzhouyi_mactest_soc/sys/dev/em/e1000_osdep.h#3 integrate .. //depot/projects/soc2007/zhouzhouyi_mactest_soc/sys/dev/em/e1000_phy.c#3 integrate .. //depot/projects/soc2007/zhouzhouyi_mactest_soc/sys/dev/em/e1000_phy.h#3 integrate .. //depot/projects/soc2007/zhouzhouyi_mactest_soc/sys/dev/em/e1000_regs.h#3 integrate .. //depot/projects/soc2007/zhouzhouyi_mactest_soc/sys/dev/em/if_em.c#4 integrate .. //depot/projects/soc2007/zhouzhouyi_mactest_soc/sys/dev/em/if_em.h#4 integrate .. //depot/projects/soc2007/zhouzhouyi_mactest_soc/sys/dev/esp/esp_sbus.c#3 integrate .. //depot/projects/soc2007/zhouzhouyi_mactest_soc/sys/dev/fb/creator.c#3 integrate .. //depot/projects/soc2007/zhouzhouyi_mactest_soc/sys/dev/fb/fb.c#3 integrate .. //depot/projects/soc2007/zhouzhouyi_mactest_soc/sys/dev/fb/fbreg.h#3 integrate .. //depot/projects/soc2007/zhouzhouyi_mactest_soc/sys/dev/fb/machfb.c#3 integrate .. //depot/projects/soc2007/zhouzhouyi_mactest_soc/sys/dev/fb/splash_bmp.c#4 integrate .. //depot/projects/soc2007/zhouzhouyi_mactest_soc/sys/dev/fb/splash_pcx.c#3 integrate .. //depot/projects/soc2007/zhouzhouyi_mactest_soc/sys/dev/fb/vga.c#3 integrate .. //depot/projects/soc2007/zhouzhouyi_mactest_soc/sys/dev/gem/if_gem.c#4 integrate .. //depot/projects/soc2007/zhouzhouyi_mactest_soc/sys/dev/gem/if_gem_pci.c#4 integrate .. //depot/projects/soc2007/zhouzhouyi_mactest_soc/sys/dev/gem/if_gemreg.h#4 integrate .. //depot/projects/soc2007/zhouzhouyi_mactest_soc/sys/dev/gem/if_gemvar.h#4 integrate .. //depot/projects/soc2007/zhouzhouyi_mactest_soc/sys/dev/hptrr/amd64-elf.hptrr_lib.o.uu#1 branch .. //depot/projects/soc2007/zhouzhouyi_mactest_soc/sys/dev/hptrr/array.h#1 branch .. //depot/projects/soc2007/zhouzhouyi_mactest_soc/sys/dev/hptrr/him.h#1 branch .. //depot/projects/soc2007/zhouzhouyi_mactest_soc/sys/dev/hptrr/himfuncs.h#1 branch .. //depot/projects/soc2007/zhouzhouyi_mactest_soc/sys/dev/hptrr/hptintf.h#1 branch .. //depot/projects/soc2007/zhouzhouyi_mactest_soc/sys/dev/hptrr/hptrr_config.c#1 branch .. //depot/projects/soc2007/zhouzhouyi_mactest_soc/sys/dev/hptrr/hptrr_config.h#1 branch .. //depot/projects/soc2007/zhouzhouyi_mactest_soc/sys/dev/hptrr/hptrr_os_bsd.c#1 branch .. //depot/projects/soc2007/zhouzhouyi_mactest_soc/sys/dev/hptrr/hptrr_osm_bsd.c#1 branch .. //depot/projects/soc2007/zhouzhouyi_mactest_soc/sys/dev/hptrr/i386-elf.hptrr_lib.o.uu#1 branch .. //depot/projects/soc2007/zhouzhouyi_mactest_soc/sys/dev/hptrr/ldm.h#1 branch .. //depot/projects/soc2007/zhouzhouyi_mactest_soc/sys/dev/hptrr/list.h#1 branch .. //depot/projects/soc2007/zhouzhouyi_mactest_soc/sys/dev/hptrr/os_bsd.h#1 branch .. //depot/projects/soc2007/zhouzhouyi_mactest_soc/sys/dev/hptrr/osm.h#1 branch .. //depot/projects/soc2007/zhouzhouyi_mactest_soc/sys/dev/hwpmc/hwpmc_amd.c#3 integrate .. //depot/projects/soc2007/zhouzhouyi_mactest_soc/sys/dev/hwpmc/hwpmc_arm.c#3 integrate .. //depot/projects/soc2007/zhouzhouyi_mactest_soc/sys/dev/hwpmc/hwpmc_ia64.c#3 integrate .. //depot/projects/soc2007/zhouzhouyi_mactest_soc/sys/dev/hwpmc/hwpmc_logging.c#3 integrate .. //depot/projects/soc2007/zhouzhouyi_mactest_soc/sys/dev/hwpmc/hwpmc_mod.c#3 integrate .. //depot/projects/soc2007/zhouzhouyi_mactest_soc/sys/dev/hwpmc/hwpmc_piv.c#3 integrate .. //depot/projects/soc2007/zhouzhouyi_mactest_soc/sys/dev/hwpmc/hwpmc_powerpc.c#3 integrate .. //depot/projects/soc2007/zhouzhouyi_mactest_soc/sys/dev/hwpmc/hwpmc_ppro.c#3 integrate .. //depot/projects/soc2007/zhouzhouyi_mactest_soc/sys/dev/hwpmc/hwpmc_sparc64.c#3 integrate .. //depot/projects/soc2007/zhouzhouyi_mactest_soc/sys/dev/hwpmc/hwpmc_x86.c#3 integrate .. //depot/projects/soc2007/zhouzhouyi_mactest_soc/sys/dev/ichsmb/ichsmb_pci.c#3 integrate .. //depot/projects/soc2007/zhouzhouyi_mactest_soc/sys/dev/ichwd/ichwd.c#4 integrate .. //depot/projects/soc2007/zhouzhouyi_mactest_soc/sys/dev/ichwd/ichwd.h#4 integrate .. //depot/projects/soc2007/zhouzhouyi_mactest_soc/sys/dev/if_ndis/if_ndis.c#4 integrate .. //depot/projects/soc2007/zhouzhouyi_mactest_soc/sys/dev/if_ndis/if_ndis_pci.c#3 integrate .. //depot/projects/soc2007/zhouzhouyi_mactest_soc/sys/dev/if_ndis/if_ndisvar.h#4 integrate .. //depot/projects/soc2007/zhouzhouyi_mactest_soc/sys/dev/ipw/if_ipw.c#5 integrate .. //depot/projects/soc2007/zhouzhouyi_mactest_soc/sys/dev/iscsi/initiator/isc_cam.c#1 branch .. //depot/projects/soc2007/zhouzhouyi_mactest_soc/sys/dev/iscsi/initiator/isc_sm.c#1 branch .. //depot/projects/soc2007/zhouzhouyi_mactest_soc/sys/dev/iscsi/initiator/isc_soc.c#1 branch .. //depot/projects/soc2007/zhouzhouyi_mactest_soc/sys/dev/iscsi/initiator/isc_subr.c#1 branch .. //depot/projects/soc2007/zhouzhouyi_mactest_soc/sys/dev/iscsi/initiator/iscsi.c#1 branch .. //depot/projects/soc2007/zhouzhouyi_mactest_soc/sys/dev/iscsi/initiator/iscsi.h#1 branch .. //depot/projects/soc2007/zhouzhouyi_mactest_soc/sys/dev/iscsi/initiator/iscsi_subr.c#1 branch .. //depot/projects/soc2007/zhouzhouyi_mactest_soc/sys/dev/iscsi/initiator/iscsivar.h#1 branch .. //depot/projects/soc2007/zhouzhouyi_mactest_soc/sys/dev/iwi/if_iwi.c#4 integrate .. //depot/projects/soc2007/zhouzhouyi_mactest_soc/sys/dev/ixgbe/LICENSE#1 branch .. //depot/projects/soc2007/zhouzhouyi_mactest_soc/sys/dev/ixgbe/ixgbe.c#1 branch .. //depot/projects/soc2007/zhouzhouyi_mactest_soc/sys/dev/ixgbe/ixgbe.h#1 branch .. //depot/projects/soc2007/zhouzhouyi_mactest_soc/sys/dev/ixgbe/ixgbe_82598.c#1 branch .. //depot/projects/soc2007/zhouzhouyi_mactest_soc/sys/dev/ixgbe/ixgbe_api.c#1 branch .. //depot/projects/soc2007/zhouzhouyi_mactest_soc/sys/dev/ixgbe/ixgbe_api.h#1 branch .. //depot/projects/soc2007/zhouzhouyi_mactest_soc/sys/dev/ixgbe/ixgbe_common.c#1 branch .. //depot/projects/soc2007/zhouzhouyi_mactest_soc/sys/dev/ixgbe/ixgbe_common.h#1 branch .. //depot/projects/soc2007/zhouzhouyi_mactest_soc/sys/dev/ixgbe/ixgbe_osdep.h#1 branch .. //depot/projects/soc2007/zhouzhouyi_mactest_soc/sys/dev/ixgbe/ixgbe_phy.c#1 branch .. //depot/projects/soc2007/zhouzhouyi_mactest_soc/sys/dev/ixgbe/ixgbe_phy.h#1 branch .. //depot/projects/soc2007/zhouzhouyi_mactest_soc/sys/dev/ixgbe/ixgbe_type.h#1 branch .. //depot/projects/soc2007/zhouzhouyi_mactest_soc/sys/dev/kbd/kbd.c#3 integrate .. //depot/projects/soc2007/zhouzhouyi_mactest_soc/sys/dev/kbd/kbdreg.h#3 integrate .. //depot/projects/soc2007/zhouzhouyi_mactest_soc/sys/dev/kbdmux/kbdmux.c#4 integrate .. //depot/projects/soc2007/zhouzhouyi_mactest_soc/sys/dev/le/am7990.c#3 integrate .. //depot/projects/soc2007/zhouzhouyi_mactest_soc/sys/dev/le/am79900.c#3 integrate .. //depot/projects/soc2007/zhouzhouyi_mactest_soc/sys/dev/lge/if_lge.c#3 integrate .. //depot/projects/soc2007/zhouzhouyi_mactest_soc/sys/dev/md/md.c#3 integrate .. //depot/projects/soc2007/zhouzhouyi_mactest_soc/sys/dev/mfi/mfi.c#4 integrate .. //depot/projects/soc2007/zhouzhouyi_mactest_soc/sys/dev/mfi/mfi_pci.c#4 integrate .. //depot/projects/soc2007/zhouzhouyi_mactest_soc/sys/dev/mii/amphy.c#3 integrate .. //depot/projects/soc2007/zhouzhouyi_mactest_soc/sys/dev/mii/e1000phy.c#4 integrate .. //depot/projects/soc2007/zhouzhouyi_mactest_soc/sys/dev/mii/nsphy.c#3 integrate .. //depot/projects/soc2007/zhouzhouyi_mactest_soc/sys/dev/mii/rlphy.c#3 integrate .. //depot/projects/soc2007/zhouzhouyi_mactest_soc/sys/dev/mii/tdkphy.c#3 integrate .. //depot/projects/soc2007/zhouzhouyi_mactest_soc/sys/dev/mii/ukphy_subr.c#3 integrate .. //depot/projects/soc2007/zhouzhouyi_mactest_soc/sys/dev/msk/if_msk.c#4 integrate .. //depot/projects/soc2007/zhouzhouyi_mactest_soc/sys/dev/msk/if_mskreg.h#3 integrate .. //depot/projects/soc2007/zhouzhouyi_mactest_soc/sys/dev/mxge/eth_z8e.h#1 branch .. //depot/projects/soc2007/zhouzhouyi_mactest_soc/sys/dev/mxge/ethp_z8e.h#1 branch .. //depot/projects/soc2007/zhouzhouyi_mactest_soc/sys/dev/mxge/mxge_eth_z8e.c#1 branch .. //depot/projects/soc2007/zhouzhouyi_mactest_soc/sys/dev/mxge/mxge_ethp_z8e.c#1 branch .. //depot/projects/soc2007/zhouzhouyi_mactest_soc/sys/dev/nfe/if_nfe.c#5 integrate .. //depot/projects/soc2007/zhouzhouyi_mactest_soc/sys/dev/nge/if_nge.c#3 integrate .. //depot/projects/soc2007/zhouzhouyi_mactest_soc/sys/dev/nve/if_nve.c#3 integrate .. //depot/projects/soc2007/zhouzhouyi_mactest_soc/sys/dev/nvram/nvram.c#1 branch .. //depot/projects/soc2007/zhouzhouyi_mactest_soc/sys/dev/nxge/if_nxge.c#1 branch .. //depot/projects/soc2007/zhouzhouyi_mactest_soc/sys/dev/nxge/if_nxge.h#1 branch .. //depot/projects/soc2007/zhouzhouyi_mactest_soc/sys/dev/nxge/include/build-version.h#1 branch .. //depot/projects/soc2007/zhouzhouyi_mactest_soc/sys/dev/nxge/include/version.h#1 branch .. //depot/projects/soc2007/zhouzhouyi_mactest_soc/sys/dev/nxge/include/xge-debug.h#1 branch .. //depot/projects/soc2007/zhouzhouyi_mactest_soc/sys/dev/nxge/include/xge-defs.h#1 branch .. //depot/projects/soc2007/zhouzhouyi_mactest_soc/sys/dev/nxge/include/xge-list.h#1 branch .. //depot/projects/soc2007/zhouzhouyi_mactest_soc/sys/dev/nxge/include/xge-os-pal.h#1 branch .. //depot/projects/soc2007/zhouzhouyi_mactest_soc/sys/dev/nxge/include/xge-queue.h#1 branch .. //depot/projects/soc2007/zhouzhouyi_mactest_soc/sys/dev/nxge/include/xgehal-channel.h#1 branch .. //depot/projects/soc2007/zhouzhouyi_mactest_soc/sys/dev/nxge/include/xgehal-config.h#1 branch .. //depot/projects/soc2007/zhouzhouyi_mactest_soc/sys/dev/nxge/include/xgehal-device.h#1 branch .. //depot/projects/soc2007/zhouzhouyi_mactest_soc/sys/dev/nxge/include/xgehal-driver.h#1 branch .. //depot/projects/soc2007/zhouzhouyi_mactest_soc/sys/dev/nxge/include/xgehal-event.h#1 branch .. //depot/projects/soc2007/zhouzhouyi_mactest_soc/sys/dev/nxge/include/xgehal-fifo.h#1 branch .. //depot/projects/soc2007/zhouzhouyi_mactest_soc/sys/dev/nxge/include/xgehal-mgmt.h#1 branch .. //depot/projects/soc2007/zhouzhouyi_mactest_soc/sys/dev/nxge/include/xgehal-mgmtaux.h#1 branch .. //depot/projects/soc2007/zhouzhouyi_mactest_soc/sys/dev/nxge/include/xgehal-mm.h#1 branch .. //depot/projects/soc2007/zhouzhouyi_mactest_soc/sys/dev/nxge/include/xgehal-regs.h#1 branch .. //depot/projects/soc2007/zhouzhouyi_mactest_soc/sys/dev/nxge/include/xgehal-ring.h#1 branch .. //depot/projects/soc2007/zhouzhouyi_mactest_soc/sys/dev/nxge/include/xgehal-stats.h#1 branch .. //depot/projects/soc2007/zhouzhouyi_mactest_soc/sys/dev/nxge/include/xgehal-types.h#1 branch .. //depot/projects/soc2007/zhouzhouyi_mactest_soc/sys/dev/nxge/include/xgehal.h#1 branch .. //depot/projects/soc2007/zhouzhouyi_mactest_soc/sys/dev/nxge/xge-osdep.h#1 branch .. //depot/projects/soc2007/zhouzhouyi_mactest_soc/sys/dev/nxge/xgehal/xge-queue.c#1 branch .. //depot/projects/soc2007/zhouzhouyi_mactest_soc/sys/dev/nxge/xgehal/xgehal-channel-fp.c#1 branch .. //depot/projects/soc2007/zhouzhouyi_mactest_soc/sys/dev/nxge/xgehal/xgehal-channel.c#1 branch .. //depot/projects/soc2007/zhouzhouyi_mactest_soc/sys/dev/nxge/xgehal/xgehal-config.c#1 branch .. //depot/projects/soc2007/zhouzhouyi_mactest_soc/sys/dev/nxge/xgehal/xgehal-device-fp.c#1 branch .. //depot/projects/soc2007/zhouzhouyi_mactest_soc/sys/dev/nxge/xgehal/xgehal-device.c#1 branch .. //depot/projects/soc2007/zhouzhouyi_mactest_soc/sys/dev/nxge/xgehal/xgehal-driver.c#1 branch .. //depot/projects/soc2007/zhouzhouyi_mactest_soc/sys/dev/nxge/xgehal/xgehal-fifo-fp.c#1 branch .. //depot/projects/soc2007/zhouzhouyi_mactest_soc/sys/dev/nxge/xgehal/xgehal-fifo.c#1 branch .. //depot/projects/soc2007/zhouzhouyi_mactest_soc/sys/dev/nxge/xgehal/xgehal-mgmt.c#1 branch .. //depot/projects/soc2007/zhouzhouyi_mactest_soc/sys/dev/nxge/xgehal/xgehal-mgmtaux.c#1 branch .. //depot/projects/soc2007/zhouzhouyi_mactest_soc/sys/dev/nxge/xgehal/xgehal-mm.c#1 branch .. //depot/projects/soc2007/zhouzhouyi_mactest_soc/sys/dev/nxge/xgehal/xgehal-ring-fp.c#1 branch .. //depot/projects/soc2007/zhouzhouyi_mactest_soc/sys/dev/nxge/xgehal/xgehal-ring.c#1 branch .. //depot/projects/soc2007/zhouzhouyi_mactest_soc/sys/dev/nxge/xgehal/xgehal-stats.c#1 branch .. //depot/projects/soc2007/zhouzhouyi_mactest_soc/sys/dev/nxge/xgell-version.h#1 branch .. //depot/projects/soc2007/zhouzhouyi_mactest_soc/sys/dev/ofw/ofw_console.c#3 integrate .. //depot/projects/soc2007/zhouzhouyi_mactest_soc/sys/dev/ofw/openpromio.c#3 integrate .. //depot/projects/soc2007/zhouzhouyi_mactest_soc/sys/dev/pci/pci.c#5 integrate .. //depot/projects/soc2007/zhouzhouyi_mactest_soc/sys/dev/pci/pci_user.c#5 integrate .. //depot/projects/soc2007/zhouzhouyi_mactest_soc/sys/dev/powermac_nvram/powermac_nvram.c#3 integrate .. //depot/projects/soc2007/zhouzhouyi_mactest_soc/sys/dev/random/yarrow.c#3 integrate .. //depot/projects/soc2007/zhouzhouyi_mactest_soc/sys/dev/re/if_re.c#4 integrate .. //depot/projects/soc2007/zhouzhouyi_mactest_soc/sys/dev/si/si_pci.c#3 integrate .. //depot/projects/soc2007/zhouzhouyi_mactest_soc/sys/dev/sio/sio.c#4 integrate .. //depot/projects/soc2007/zhouzhouyi_mactest_soc/sys/dev/sio/sio_isa.c#3 integrate .. //depot/projects/soc2007/zhouzhouyi_mactest_soc/sys/dev/sio/sio_puc.c#3 integrate .. //depot/projects/soc2007/zhouzhouyi_mactest_soc/sys/dev/sk/if_sk.c#3 integrate .. //depot/projects/soc2007/zhouzhouyi_mactest_soc/sys/dev/snp/snp.c#4 integrate .. //depot/projects/soc2007/zhouzhouyi_mactest_soc/sys/dev/sound/pci/hda/hdac.c#5 integrate .. //depot/projects/soc2007/zhouzhouyi_mactest_soc/sys/dev/sound/pci/ich.c#4 integrate .. //depot/projects/soc2007/zhouzhouyi_mactest_soc/sys/dev/sound/pci/maestro.c#3 integrate .. //depot/projects/soc2007/zhouzhouyi_mactest_soc/sys/dev/sound/pci/t4dwave.c#3 integrate .. //depot/projects/soc2007/zhouzhouyi_mactest_soc/sys/dev/sound/pcm/channel.c#3 integrate .. //depot/projects/soc2007/zhouzhouyi_mactest_soc/sys/dev/stge/if_stge.c#3 integrate .. //depot/projects/soc2007/zhouzhouyi_mactest_soc/sys/dev/streams/streams.c#4 integrate .. //depot/projects/soc2007/zhouzhouyi_mactest_soc/sys/dev/syscons/blank/blank_saver.c#3 integrate .. //depot/projects/soc2007/zhouzhouyi_mactest_soc/sys/dev/syscons/daemon/daemon_saver.c#3 integrate .. //depot/projects/soc2007/zhouzhouyi_mactest_soc/sys/dev/syscons/dragon/dragon_saver.c#3 integrate .. //depot/projects/soc2007/zhouzhouyi_mactest_soc/sys/dev/syscons/fade/fade_saver.c#3 integrate .. //depot/projects/soc2007/zhouzhouyi_mactest_soc/sys/dev/syscons/fire/fire_saver.c#3 integrate .. //depot/projects/soc2007/zhouzhouyi_mactest_soc/sys/dev/syscons/green/green_saver.c#3 integrate .. //depot/projects/soc2007/zhouzhouyi_mactest_soc/sys/dev/syscons/logo/logo_saver.c#3 integrate .. //depot/projects/soc2007/zhouzhouyi_mactest_soc/sys/dev/syscons/rain/rain_saver.c#3 integrate .. //depot/projects/soc2007/zhouzhouyi_mactest_soc/sys/dev/syscons/scgfbrndr.c#3 integrate .. //depot/projects/soc2007/zhouzhouyi_mactest_soc/sys/dev/syscons/scvgarndr.c#3 integrate .. //depot/projects/soc2007/zhouzhouyi_mactest_soc/sys/dev/syscons/scvidctl.c#3 integrate .. //depot/projects/soc2007/zhouzhouyi_mactest_soc/sys/dev/syscons/snake/snake_saver.c#3 integrate .. //depot/projects/soc2007/zhouzhouyi_mactest_soc/sys/dev/syscons/star/star_saver.c#3 integrate .. //depot/projects/soc2007/zhouzhouyi_mactest_soc/sys/dev/syscons/syscons.c#4 integrate .. //depot/projects/soc2007/zhouzhouyi_mactest_soc/sys/dev/syscons/syscons.h#4 integrate .. //depot/projects/soc2007/zhouzhouyi_mactest_soc/sys/dev/syscons/warp/warp_saver.c#3 integrate .. //depot/projects/soc2007/zhouzhouyi_mactest_soc/sys/dev/ti/if_ti.c#3 integrate .. //depot/projects/soc2007/zhouzhouyi_mactest_soc/sys/dev/txp/if_txp.c#3 integrate .. //depot/projects/soc2007/zhouzhouyi_mactest_soc/sys/dev/uart/uart_core.c#3 integrate .. //depot/projects/soc2007/zhouzhouyi_mactest_soc/sys/dev/uart/uart_cpu_powerpc.c#3 integrate .. //depot/projects/soc2007/zhouzhouyi_mactest_soc/sys/dev/usb/ehci_pci.c#4 integrate .. //depot/projects/soc2007/zhouzhouyi_mactest_soc/sys/dev/usb/if_axe.c#5 integrate .. //depot/projects/soc2007/zhouzhouyi_mactest_soc/sys/dev/usb/if_axereg.h#5 integrate .. //depot/projects/soc2007/zhouzhouyi_mactest_soc/sys/dev/usb/if_rum.c#5 integrate .. //depot/projects/soc2007/zhouzhouyi_mactest_soc/sys/dev/usb/if_zyd.c#1 branch .. //depot/projects/soc2007/zhouzhouyi_mactest_soc/sys/dev/usb/if_zydfw.h#1 branch .. //depot/projects/soc2007/zhouzhouyi_mactest_soc/sys/dev/usb/if_zydreg.h#1 branch .. //depot/projects/soc2007/zhouzhouyi_mactest_soc/sys/dev/usb/uhci_pci.c#3 integrate .. //depot/projects/soc2007/zhouzhouyi_mactest_soc/sys/dev/usb/ukbd.c#6 integrate .. //depot/projects/soc2007/zhouzhouyi_mactest_soc/sys/dev/usb/umass.c#4 integrate .. //depot/projects/soc2007/zhouzhouyi_mactest_soc/sys/dev/usb/ums.c#4 integrate .. //depot/projects/soc2007/zhouzhouyi_mactest_soc/sys/dev/usb/uplcom.c#3 integrate .. //depot/projects/soc2007/zhouzhouyi_mactest_soc/sys/dev/usb/usb_quirks.c#4 integrate .. //depot/projects/soc2007/zhouzhouyi_mactest_soc/sys/dev/usb/usbdevs#6 integrate .. //depot/projects/soc2007/zhouzhouyi_mactest_soc/sys/dev/utopia/utopia.c#3 integrate .. //depot/projects/soc2007/zhouzhouyi_mactest_soc/sys/dev/vge/if_vge.c#3 integrate .. //depot/projects/soc2007/zhouzhouyi_mactest_soc/sys/dev/vkbd/vkbd.c#3 integrate .. //depot/projects/soc2007/zhouzhouyi_mactest_soc/sys/dev/vx/if_vx_pci.c#3 integrate .. //depot/projects/soc2007/zhouzhouyi_mactest_soc/sys/dev/wpi/if_wpi.c#1 branch .. //depot/projects/soc2007/zhouzhouyi_mactest_soc/sys/dev/wpi/if_wpireg.h#1 branch .. //depot/projects/soc2007/zhouzhouyi_mactest_soc/sys/dev/wpi/if_wpivar.h#1 branch .. //depot/projects/soc2007/zhouzhouyi_mactest_soc/sys/fs/coda/README#1 branch .. //depot/projects/soc2007/zhouzhouyi_mactest_soc/sys/fs/coda/TODO#1 branch .. //depot/projects/soc2007/zhouzhouyi_mactest_soc/sys/fs/coda/cnode.h#1 branch .. //depot/projects/soc2007/zhouzhouyi_mactest_soc/sys/fs/coda/coda.h#1 branch .. //depot/projects/soc2007/zhouzhouyi_mactest_soc/sys/fs/coda/coda_fbsd.c#1 branch .. //depot/projects/soc2007/zhouzhouyi_mactest_soc/sys/fs/coda/coda_io.h#1 branch .. //depot/projects/soc2007/zhouzhouyi_mactest_soc/sys/fs/coda/coda_kernel.h#1 branch .. //depot/projects/soc2007/zhouzhouyi_mactest_soc/sys/fs/coda/coda_namecache.c#1 branch .. //depot/projects/soc2007/zhouzhouyi_mactest_soc/sys/fs/coda/coda_namecache.h#1 branch .. //depot/projects/soc2007/zhouzhouyi_mactest_soc/sys/fs/coda/coda_opstats.h#1 branch .. //depot/projects/soc2007/zhouzhouyi_mactest_soc/sys/fs/coda/coda_pioctl.h#1 branch .. //depot/projects/soc2007/zhouzhouyi_mactest_soc/sys/fs/coda/coda_psdev.c#1 branch .. //depot/projects/soc2007/zhouzhouyi_mactest_soc/sys/fs/coda/coda_psdev.h#1 branch .. //depot/projects/soc2007/zhouzhouyi_mactest_soc/sys/fs/coda/coda_subr.c#1 branch .. //depot/projects/soc2007/zhouzhouyi_mactest_soc/sys/fs/coda/coda_subr.h#1 branch .. //depot/projects/soc2007/zhouzhouyi_mactest_soc/sys/fs/coda/coda_venus.c#1 branch .. //depot/projects/soc2007/zhouzhouyi_mactest_soc/sys/fs/coda/coda_venus.h#1 branch .. //depot/projects/soc2007/zhouzhouyi_mactest_soc/sys/fs/coda/coda_vfsops.c#1 branch .. //depot/projects/soc2007/zhouzhouyi_mactest_soc/sys/fs/coda/coda_vfsops.h#1 branch .. //depot/projects/soc2007/zhouzhouyi_mactest_soc/sys/fs/coda/coda_vnops.c#1 branch .. //depot/projects/soc2007/zhouzhouyi_mactest_soc/sys/fs/coda/coda_vnops.h#1 branch .. //depot/projects/soc2007/zhouzhouyi_mactest_soc/sys/fs/devfs/devfs_vnops.c#5 integrate .. //depot/projects/soc2007/zhouzhouyi_mactest_soc/sys/fs/fifofs/fifo_vnops.c#4 integrate .. //depot/projects/soc2007/zhouzhouyi_mactest_soc/sys/fs/msdosfs/msdosfs_vfsops.c#5 integrate .. //depot/projects/soc2007/zhouzhouyi_mactest_soc/sys/fs/ntfs/ntfs_ihash.c#3 integrate .. //depot/projects/soc2007/zhouzhouyi_mactest_soc/sys/fs/ntfs/ntfs_vfsops.c#4 integrate .. //depot/projects/soc2007/zhouzhouyi_mactest_soc/sys/fs/tmpfs/tmpfs.h#4 integrate .. //depot/projects/soc2007/zhouzhouyi_mactest_soc/sys/fs/tmpfs/tmpfs_subr.c#4 integrate .. //depot/projects/soc2007/zhouzhouyi_mactest_soc/sys/fs/tmpfs/tmpfs_vfsops.c#5 integrate .. //depot/projects/soc2007/zhouzhouyi_mactest_soc/sys/fs/tmpfs/tmpfs_vnops.c#4 integrate .. //depot/projects/soc2007/zhouzhouyi_mactest_soc/sys/fs/udf/udf_vfsops.c#4 integrate .. //depot/projects/soc2007/zhouzhouyi_mactest_soc/sys/fs/unionfs/union_subr.c#5 integrate .. //depot/projects/soc2007/zhouzhouyi_mactest_soc/sys/fs/unionfs/union_vnops.c#4 integrate .. //depot/projects/soc2007/zhouzhouyi_mactest_soc/sys/geom/eli/g_eli_crypto.c#4 integrate .. //depot/projects/soc2007/zhouzhouyi_mactest_soc/sys/geom/geom_bsd.c#3 integrate .. //depot/projects/soc2007/zhouzhouyi_mactest_soc/sys/geom/geom_bsd_enc.c#3 integrate .. //depot/projects/soc2007/zhouzhouyi_mactest_soc/sys/geom/geom_dev.c#3 integrate .. //depot/projects/soc2007/zhouzhouyi_mactest_soc/sys/geom/geom_io.c#4 integrate .. //depot/projects/soc2007/zhouzhouyi_mactest_soc/sys/geom/label/g_label_reiserfs.c#3 integrate .. //depot/projects/soc2007/zhouzhouyi_mactest_soc/sys/geom/part/g_part.c#4 integrate .. //depot/projects/soc2007/zhouzhouyi_mactest_soc/sys/geom/part/g_part.h#4 integrate .. //depot/projects/soc2007/zhouzhouyi_mactest_soc/sys/geom/part/g_part_bsd.c#1 branch .. //depot/projects/soc2007/zhouzhouyi_mactest_soc/sys/i386/bios/apm.c#3 integrate .. //depot/projects/soc2007/zhouzhouyi_mactest_soc/sys/i386/conf/GENERIC#7 edit .. //depot/projects/soc2007/zhouzhouyi_mactest_soc/sys/i386/conf/GENERIC.hints#4 integrate .. //depot/projects/soc2007/zhouzhouyi_mactest_soc/sys/i386/conf/NOTES#5 integrate .. //depot/projects/soc2007/zhouzhouyi_mactest_soc/sys/i386/conf/PAE#4 integrate .. //depot/projects/soc2007/zhouzhouyi_mactest_soc/sys/i386/conf/XBOX#3 integrate .. //depot/projects/soc2007/zhouzhouyi_mactest_soc/sys/i386/i386/busdma_machdep.c#3 integrate .. //depot/projects/soc2007/zhouzhouyi_mactest_soc/sys/i386/i386/db_trace.c#3 integrate .. //depot/projects/soc2007/zhouzhouyi_mactest_soc/sys/i386/i386/exception.s#3 integrate .. //depot/projects/soc2007/zhouzhouyi_mactest_soc/sys/i386/i386/genassym.c#4 integrate .. //depot/projects/soc2007/zhouzhouyi_mactest_soc/sys/i386/i386/intr_machdep.c#3 integrate .. //depot/projects/soc2007/zhouzhouyi_mactest_soc/sys/i386/i386/locore.s#3 integrate .. //depot/projects/soc2007/zhouzhouyi_mactest_soc/sys/i386/i386/machdep.c#5 integrate .. //depot/projects/soc2007/zhouzhouyi_mactest_soc/sys/i386/i386/mp_machdep.c#4 integrate .. //depot/projects/soc2007/zhouzhouyi_mactest_soc/sys/i386/i386/mp_watchdog.c#3 integrate .. //depot/projects/soc2007/zhouzhouyi_mactest_soc/sys/i386/i386/pmap.c#5 integrate .. //depot/projects/soc2007/zhouzhouyi_mactest_soc/sys/i386/i386/stack_machdep.c#1 branch .. //depot/projects/soc2007/zhouzhouyi_mactest_soc/sys/i386/i386/trap.c#4 integrate .. //depot/projects/soc2007/zhouzhouyi_mactest_soc/sys/i386/i386/vm_machdep.c#4 integrate .. //depot/projects/soc2007/zhouzhouyi_mactest_soc/sys/i386/include/pmap.h#3 integrate .. //depot/projects/soc2007/zhouzhouyi_mactest_soc/sys/i386/include/pmc_mdep.h#3 integrate .. //depot/projects/soc2007/zhouzhouyi_mactest_soc/sys/i386/include/stack.h#1 branch .. //depot/projects/soc2007/zhouzhouyi_mactest_soc/sys/i386/include/vmparam.h#4 integrate .. //depot/projects/soc2007/zhouzhouyi_mactest_soc/sys/i386/isa/prof_machdep.c#3 integrate .. //depot/projects/soc2007/zhouzhouyi_mactest_soc/sys/i386/linux/linux_machdep.c#4 integrate .. //depot/projects/soc2007/zhouzhouyi_mactest_soc/sys/i386/pci/pci_cfgreg.c#3 integrate .. //depot/projects/soc2007/zhouzhouyi_mactest_soc/sys/i386/pci/pci_pir.c#3 integrate .. //depot/projects/soc2007/zhouzhouyi_mactest_soc/sys/i386/xbox/xboxfb.c#3 integrate .. //depot/projects/soc2007/zhouzhouyi_mactest_soc/sys/i4b/include/i4b_cause.h#1 branch .. //depot/projects/soc2007/zhouzhouyi_mactest_soc/sys/i4b/include/i4b_debug.h#1 branch .. //depot/projects/soc2007/zhouzhouyi_mactest_soc/sys/i4b/include/i4b_ioctl.h#1 branch .. //depot/projects/soc2007/zhouzhouyi_mactest_soc/sys/i4b/include/i4b_rbch_ioctl.h#1 branch .. //depot/projects/soc2007/zhouzhouyi_mactest_soc/sys/i4b/include/i4b_tel_ioctl.h#1 branch .. //depot/projects/soc2007/zhouzhouyi_mactest_soc/sys/i4b/include/i4b_trace.h#1 branch .. //depot/projects/soc2007/zhouzhouyi_mactest_soc/sys/ia64/conf/DEFAULTS#3 integrate .. //depot/projects/soc2007/zhouzhouyi_mactest_soc/sys/ia64/conf/GENERIC#4 integrate .. //depot/projects/soc2007/zhouzhouyi_mactest_soc/sys/ia64/ia64/busdma_machdep.c#3 integrate .. //depot/projects/soc2007/zhouzhouyi_mactest_soc/sys/ia64/ia64/db_machdep.c#5 integrate .. //depot/projects/soc2007/zhouzhouyi_mactest_soc/sys/ia64/ia64/interrupt.c#4 integrate .. //depot/projects/soc2007/zhouzhouyi_mactest_soc/sys/ia64/ia64/machdep.c#5 integrate .. //depot/projects/soc2007/zhouzhouyi_mactest_soc/sys/ia64/ia64/pmap.c#5 integrate .. //depot/projects/soc2007/zhouzhouyi_mactest_soc/sys/ia64/ia64/stack_machdep.c#1 branch .. //depot/projects/soc2007/zhouzhouyi_mactest_soc/sys/ia64/ia64/trap.c#3 integrate .. //depot/projects/soc2007/zhouzhouyi_mactest_soc/sys/ia64/ia64/vm_machdep.c#3 integrate .. //depot/projects/soc2007/zhouzhouyi_mactest_soc/sys/ia64/include/atomic.h#4 integrate .. //depot/projects/soc2007/zhouzhouyi_mactest_soc/sys/ia64/include/pmc_mdep.h#3 integrate .. //depot/projects/soc2007/zhouzhouyi_mactest_soc/sys/ia64/include/vmparam.h#4 integrate .. //depot/projects/soc2007/zhouzhouyi_mactest_soc/sys/isa/vga_isa.c#3 integrate .. //depot/projects/soc2007/zhouzhouyi_mactest_soc/sys/kern/Makefile#4 integrate .. //depot/projects/soc2007/zhouzhouyi_mactest_soc/sys/kern/imgact_elf.c#4 integrate .. //depot/projects/soc2007/zhouzhouyi_mactest_soc/sys/kern/init_main.c#5 integrate .. //depot/projects/soc2007/zhouzhouyi_mactest_soc/sys/kern/kern_clock.c#4 integrate .. //depot/projects/soc2007/zhouzhouyi_mactest_soc/sys/kern/kern_conf.c#4 integrate .. //depot/projects/soc2007/zhouzhouyi_mactest_soc/sys/kern/kern_descrip.c#4 integrate .. //depot/projects/soc2007/zhouzhouyi_mactest_soc/sys/kern/kern_event.c#4 integrate .. //depot/projects/soc2007/zhouzhouyi_mactest_soc/sys/kern/kern_exec.c#6 integrate .. //depot/projects/soc2007/zhouzhouyi_mactest_soc/sys/kern/kern_fork.c#6 integrate .. //depot/projects/soc2007/zhouzhouyi_mactest_soc/sys/kern/kern_kse.c#5 integrate .. //depot/projects/soc2007/zhouzhouyi_mactest_soc/sys/kern/kern_kthread.c#4 integrate .. //depot/projects/soc2007/zhouzhouyi_mactest_soc/sys/kern/kern_ktrace.c#5 integrate .. //depot/projects/soc2007/zhouzhouyi_mactest_soc/sys/kern/kern_linker.c#4 integrate .. //depot/projects/soc2007/zhouzhouyi_mactest_soc/sys/kern/kern_lock.c#3 integrate .. //depot/projects/soc2007/zhouzhouyi_mactest_soc/sys/kern/kern_mbuf.c#5 integrate .. //depot/projects/soc2007/zhouzhouyi_mactest_soc/sys/kern/kern_mib.c#3 integrate .. //depot/projects/soc2007/zhouzhouyi_mactest_soc/sys/kern/kern_module.c#3 integrate .. //depot/projects/soc2007/zhouzhouyi_mactest_soc/sys/kern/kern_mutex.c#4 integrate .. //depot/projects/soc2007/zhouzhouyi_mactest_soc/sys/kern/kern_pmc.c#3 integrate .. //depot/projects/soc2007/zhouzhouyi_mactest_soc/sys/kern/kern_proc.c#6 integrate .. //depot/projects/soc2007/zhouzhouyi_mactest_soc/sys/kern/kern_resource.c#4 integrate .. //depot/projects/soc2007/zhouzhouyi_mactest_soc/sys/kern/kern_rmlock.c#1 branch .. //depot/projects/soc2007/zhouzhouyi_mactest_soc/sys/kern/kern_rwlock.c#4 integrate .. //depot/projects/soc2007/zhouzhouyi_mactest_soc/sys/kern/kern_shutdown.c#4 integrate .. //depot/projects/soc2007/zhouzhouyi_mactest_soc/sys/kern/kern_sig.c#5 integrate .. //depot/projects/soc2007/zhouzhouyi_mactest_soc/sys/kern/kern_switch.c#5 integrate .. //depot/projects/soc2007/zhouzhouyi_mactest_soc/sys/kern/kern_sx.c#5 integrate .. //depot/projects/soc2007/zhouzhouyi_mactest_soc/sys/kern/kern_synch.c#5 integrate .. //depot/projects/soc2007/zhouzhouyi_mactest_soc/sys/kern/kern_sysctl.c#5 integrate .. //depot/projects/soc2007/zhouzhouyi_mactest_soc/sys/kern/kern_tc.c#3 integrate .. //depot/projects/soc2007/zhouzhouyi_mactest_soc/sys/kern/kern_thr.c#5 integrate .. //depot/projects/soc2007/zhouzhouyi_mactest_soc/sys/kern/kern_thread.c#6 integrate .. //depot/projects/soc2007/zhouzhouyi_mactest_soc/sys/kern/kern_timeout.c#4 integrate .. //depot/projects/soc2007/zhouzhouyi_mactest_soc/sys/kern/kern_umtx.c#3 integrate .. //depot/projects/soc2007/zhouzhouyi_mactest_soc/sys/kern/linker_if.m#3 integrate .. //depot/projects/soc2007/zhouzhouyi_mactest_soc/sys/kern/p1003_1b.c#4 integrate .. //depot/projects/soc2007/zhouzhouyi_mactest_soc/sys/kern/sched_4bsd.c#6 integrate .. //depot/projects/soc2007/zhouzhouyi_mactest_soc/sys/kern/sched_ule.c#5 integrate .. //depot/projects/soc2007/zhouzhouyi_mactest_soc/sys/kern/subr_bus.c#4 integrate .. //depot/projects/soc2007/zhouzhouyi_mactest_soc/sys/kern/subr_kdb.c#4 integrate .. //depot/projects/soc2007/zhouzhouyi_mactest_soc/sys/kern/subr_lock.c#4 integrate .. //depot/projects/soc2007/zhouzhouyi_mactest_soc/sys/kern/subr_pcpu.c#3 integrate .. //depot/projects/soc2007/zhouzhouyi_mactest_soc/sys/kern/subr_sleepqueue.c#4 integrate .. //depot/projects/soc2007/zhouzhouyi_mactest_soc/sys/kern/subr_smp.c#4 integrate .. //depot/projects/soc2007/zhouzhouyi_mactest_soc/sys/kern/subr_stack.c#3 integrate .. //depot/projects/soc2007/zhouzhouyi_mactest_soc/sys/kern/subr_trap.c#4 integrate .. //depot/projects/soc2007/zhouzhouyi_mactest_soc/sys/kern/subr_turnstile.c#3 integrate .. //depot/projects/soc2007/zhouzhouyi_mactest_soc/sys/kern/subr_witness.c#4 integrate .. //depot/projects/soc2007/zhouzhouyi_mactest_soc/sys/kern/sys_generic.c#4 integrate .. //depot/projects/soc2007/zhouzhouyi_mactest_soc/sys/kern/sys_pipe.c#4 integrate .. //depot/projects/soc2007/zhouzhouyi_mactest_soc/sys/kern/sys_process.c#5 integrate .. //depot/projects/soc2007/zhouzhouyi_mactest_soc/sys/kern/tty_cons.c#3 integrate .. //depot/projects/soc2007/zhouzhouyi_mactest_soc/sys/kern/tty_pty.c#4 integrate .. //depot/projects/soc2007/zhouzhouyi_mactest_soc/sys/kern/uipc_debug.c#3 integrate .. //depot/projects/soc2007/zhouzhouyi_mactest_soc/sys/kern/uipc_mqueue.c#3 integrate .. //depot/projects/soc2007/zhouzhouyi_mactest_soc/sys/kern/uipc_sockbuf.c#4 integrate .. //depot/projects/soc2007/zhouzhouyi_mactest_soc/sys/kern/uipc_syscalls.c#5 integrate .. //depot/projects/soc2007/zhouzhouyi_mactest_soc/sys/kern/uipc_usrreq.c#5 integrate .. //depot/projects/soc2007/zhouzhouyi_mactest_soc/sys/kern/vfs_bio.c#4 integrate .. //depot/projects/soc2007/zhouzhouyi_mactest_soc/sys/kern/vfs_cache.c#4 integrate .. //depot/projects/soc2007/zhouzhouyi_mactest_soc/sys/kern/vfs_mount.c#5 integrate .. //depot/projects/soc2007/zhouzhouyi_mactest_soc/sys/kern/vfs_subr.c#5 integrate .. //depot/projects/soc2007/zhouzhouyi_mactest_soc/sys/kern/vfs_syscalls.c#5 integrate .. //depot/projects/soc2007/zhouzhouyi_mactest_soc/sys/kern/vfs_vnops.c#5 integrate .. //depot/projects/soc2007/zhouzhouyi_mactest_soc/sys/modules/Makefile#6 integrate .. //depot/projects/soc2007/zhouzhouyi_mactest_soc/sys/modules/agp/Makefile#3 integrate .. //depot/projects/soc2007/zhouzhouyi_mactest_soc/sys/modules/amr/Makefile#3 integrate .. //depot/projects/soc2007/zhouzhouyi_mactest_soc/sys/modules/asmc/Makefile#1 branch .. //depot/projects/soc2007/zhouzhouyi_mactest_soc/sys/modules/cxgb/Makefile#4 integrate .. //depot/projects/soc2007/zhouzhouyi_mactest_soc/sys/modules/cxgb/cxgb/Makefile#1 branch .. //depot/projects/soc2007/zhouzhouyi_mactest_soc/sys/modules/cxgb/toecore/Makefile#1 branch .. //depot/projects/soc2007/zhouzhouyi_mactest_soc/sys/modules/cxgb/tom/Makefile#1 branch .. //depot/projects/soc2007/zhouzhouyi_mactest_soc/sys/modules/hptrr/Makefile#1 branch .. //depot/projects/soc2007/zhouzhouyi_mactest_soc/sys/modules/iscsi/Makefile#1 branch .. //depot/projects/soc2007/zhouzhouyi_mactest_soc/sys/modules/iscsi/initiator/Makefile#1 branch .. //depot/projects/soc2007/zhouzhouyi_mactest_soc/sys/modules/ixgbe/Makefile#1 branch .. //depot/projects/soc2007/zhouzhouyi_mactest_soc/sys/modules/nvram/Makefile#1 branch .. //depot/projects/soc2007/zhouzhouyi_mactest_soc/sys/modules/nxge/Makefile#1 branch .. //depot/projects/soc2007/zhouzhouyi_mactest_soc/sys/modules/wpi/Makefile#1 branch .. //depot/projects/soc2007/zhouzhouyi_mactest_soc/sys/modules/wpifw/Makefile#1 branch .. //depot/projects/soc2007/zhouzhouyi_mactest_soc/sys/modules/zfs/Makefile#3 integrate .. //depot/projects/soc2007/zhouzhouyi_mactest_soc/sys/modules/zyd/Makefile#1 branch .. //depot/projects/soc2007/zhouzhouyi_mactest_soc/sys/net/bpf.c#6 integrate .. //depot/projects/soc2007/zhouzhouyi_mactest_soc/sys/net/bpf.h#3 integrate .. //depot/projects/soc2007/zhouzhouyi_mactest_soc/sys/net/bpf_filter.c#4 integrate .. //depot/projects/soc2007/zhouzhouyi_mactest_soc/sys/net/bridgestp.c#4 integrate .. //depot/projects/soc2007/zhouzhouyi_mactest_soc/sys/net/bridgestp.h#4 integrate .. //depot/projects/soc2007/zhouzhouyi_mactest_soc/sys/net/ieee8023ad_lacp.c#4 integrate .. //depot/projects/soc2007/zhouzhouyi_mactest_soc/sys/net/ieee8023ad_lacp.h#4 integrate .. //depot/projects/soc2007/zhouzhouyi_mactest_soc/sys/net/if.h#3 integrate .. //depot/projects/soc2007/zhouzhouyi_mactest_soc/sys/net/if_bridge.c#6 integrate .. //depot/projects/soc2007/zhouzhouyi_mactest_soc/sys/net/if_enc.c#3 integrate .. //depot/projects/soc2007/zhouzhouyi_mactest_soc/sys/net/if_ethersubr.c#6 integrate .. //depot/projects/soc2007/zhouzhouyi_mactest_soc/sys/net/if_lagg.c#4 integrate .. //depot/projects/soc2007/zhouzhouyi_mactest_soc/sys/net/if_var.h#3 integrate .. //depot/projects/soc2007/zhouzhouyi_mactest_soc/sys/net/netisr.h#3 integrate .. //depot/projects/soc2007/zhouzhouyi_mactest_soc/sys/net/pfil.c#3 integrate .. //depot/projects/soc2007/zhouzhouyi_mactest_soc/sys/net/pfil.h#3 integrate .. //depot/projects/soc2007/zhouzhouyi_mactest_soc/sys/net/route.c#3 integrate .. //depot/projects/soc2007/zhouzhouyi_mactest_soc/sys/net/route.h#3 integrate .. //depot/projects/soc2007/zhouzhouyi_mactest_soc/sys/net80211/ieee80211.c#4 integrate .. //depot/projects/soc2007/zhouzhouyi_mactest_soc/sys/net80211/ieee80211.h#5 integrate .. //depot/projects/soc2007/zhouzhouyi_mactest_soc/sys/net80211/ieee80211_ht.c#5 integrate .. //depot/projects/soc2007/zhouzhouyi_mactest_soc/sys/net80211/ieee80211_node.c#5 integrate .. //depot/projects/soc2007/zhouzhouyi_mactest_soc/sys/net80211/ieee80211_output.c#5 integrate .. //depot/projects/soc2007/zhouzhouyi_mactest_soc/sys/net80211/ieee80211_proto.c#5 integrate .. //depot/projects/soc2007/zhouzhouyi_mactest_soc/sys/net80211/ieee80211_radiotap.h#4 integrate .. //depot/projects/soc2007/zhouzhouyi_mactest_soc/sys/net80211/ieee80211_scan_sta.c#5 integrate .. //depot/projects/soc2007/zhouzhouyi_mactest_soc/sys/net80211/ieee80211_var.h#5 integrate .. //depot/projects/soc2007/zhouzhouyi_mactest_soc/sys/netatalk/aarp.c#4 integrate .. //depot/projects/soc2007/zhouzhouyi_mactest_soc/sys/netatalk/ddp_output.c#4 integrate .. //depot/projects/soc2007/zhouzhouyi_mactest_soc/sys/netgraph/netgraph.h#5 integrate .. //depot/projects/soc2007/zhouzhouyi_mactest_soc/sys/netgraph/ng_base.c#6 integrate .. //depot/projects/soc2007/zhouzhouyi_mactest_soc/sys/netgraph/ng_car.c#3 integrate .. //depot/projects/soc2007/zhouzhouyi_mactest_soc/sys/netgraph/ng_car.h#3 integrate .. //depot/projects/soc2007/zhouzhouyi_mactest_soc/sys/netgraph/ng_cisco.c#3 integrate .. //depot/projects/soc2007/zhouzhouyi_mactest_soc/sys/netgraph/ng_l2tp.c#4 integrate .. //depot/projects/soc2007/zhouzhouyi_mactest_soc/sys/netgraph/ng_pppoe.c#4 integrate .. //depot/projects/soc2007/zhouzhouyi_mactest_soc/sys/netgraph/ng_pppoe.h#3 integrate .. //depot/projects/soc2007/zhouzhouyi_mactest_soc/sys/netgraph/ng_socket.c#4 integrate .. //depot/projects/soc2007/zhouzhouyi_mactest_soc/sys/netinet/if_ether.c#5 integrate .. //depot/projects/soc2007/zhouzhouyi_mactest_soc/sys/netinet/if_ether.h#3 integrate .. //depot/projects/soc2007/zhouzhouyi_mactest_soc/sys/netinet/in_pcb.c#7 integrate .. //depot/projects/soc2007/zhouzhouyi_mactest_soc/sys/netinet/in_pcb.h#4 integrate .. //depot/projects/soc2007/zhouzhouyi_mactest_soc/sys/netinet/ip_dummynet.c#5 integrate .. //depot/projects/soc2007/zhouzhouyi_mactest_soc/sys/netinet/ip_dummynet.h#3 integrate .. //depot/projects/soc2007/zhouzhouyi_mactest_soc/sys/netinet/ip_fw2.c#6 integrate .. //depot/projects/soc2007/zhouzhouyi_mactest_soc/sys/netinet/ip_fw_pfil.c#4 integrate .. //depot/projects/soc2007/zhouzhouyi_mactest_soc/sys/netinet/ip_input.c#6 integrate .. //depot/projects/soc2007/zhouzhouyi_mactest_soc/sys/netinet/libalias/alias_util.c#3 integrate .. //depot/projects/soc2007/zhouzhouyi_mactest_soc/sys/netinet/sctp.h#4 integrate .. //depot/projects/soc2007/zhouzhouyi_mactest_soc/sys/netinet/sctp_bsd_addr.c#4 integrate .. //depot/projects/soc2007/zhouzhouyi_mactest_soc/sys/netinet/sctp_indata.c#5 integrate .. //depot/projects/soc2007/zhouzhouyi_mactest_soc/sys/netinet/sctp_output.c#6 integrate .. //depot/projects/soc2007/zhouzhouyi_mactest_soc/sys/netinet/sctp_structs.h#5 integrate .. //depot/projects/soc2007/zhouzhouyi_mactest_soc/sys/netinet/sctp_usrreq.c#6 integrate .. //depot/projects/soc2007/zhouzhouyi_mactest_soc/sys/netinet/sctputil.c#6 integrate .. //depot/projects/soc2007/zhouzhouyi_mactest_soc/sys/netinet/tcp.h#3 integrate .. //depot/projects/soc2007/zhouzhouyi_mactest_soc/sys/netinet/tcp_offload.c#1 branch .. //depot/projects/soc2007/zhouzhouyi_mactest_soc/sys/netinet/tcp_offload.h#1 branch .. //depot/projects/soc2007/zhouzhouyi_mactest_soc/sys/netinet/tcp_output.c#6 integrate .. //depot/projects/soc2007/zhouzhouyi_mactest_soc/sys/netinet/tcp_subr.c#6 integrate .. //depot/projects/soc2007/zhouzhouyi_mactest_soc/sys/netinet/tcp_syncache.c#6 integrate .. //depot/projects/soc2007/zhouzhouyi_mactest_soc/sys/netinet/tcp_syncache.h#2 integrate .. //depot/projects/soc2007/zhouzhouyi_mactest_soc/sys/netinet/tcp_usrreq.c#5 integrate .. //depot/projects/soc2007/zhouzhouyi_mactest_soc/sys/netinet/tcp_var.h#5 integrate .. //depot/projects/soc2007/zhouzhouyi_mactest_soc/sys/netinet/toedev.h#1 branch .. //depot/projects/soc2007/zhouzhouyi_mactest_soc/sys/netinet6/dest6.c#4 integrate .. //depot/projects/soc2007/zhouzhouyi_mactest_soc/sys/netinet6/frag6.c#4 integrate .. //depot/projects/soc2007/zhouzhouyi_mactest_soc/sys/netinet6/icmp6.c#4 integrate .. //depot/projects/soc2007/zhouzhouyi_mactest_soc/sys/netinet6/in6.c#4 integrate .. //depot/projects/soc2007/zhouzhouyi_mactest_soc/sys/netinet6/in6.h#4 integrate .. //depot/projects/soc2007/zhouzhouyi_mactest_soc/sys/netinet6/in6_cksum.c#4 integrate .. //depot/projects/soc2007/zhouzhouyi_mactest_soc/sys/netinet6/in6_gif.c#4 integrate .. //depot/projects/soc2007/zhouzhouyi_mactest_soc/sys/netinet6/in6_gif.h#3 integrate .. //depot/projects/soc2007/zhouzhouyi_mactest_soc/sys/netinet6/in6_ifattach.c#4 integrate .. //depot/projects/soc2007/zhouzhouyi_mactest_soc/sys/netinet6/in6_ifattach.h#3 integrate .. //depot/projects/soc2007/zhouzhouyi_mactest_soc/sys/netinet6/in6_pcb.c#5 integrate .. //depot/projects/soc2007/zhouzhouyi_mactest_soc/sys/netinet6/in6_pcb.h#3 integrate .. //depot/projects/soc2007/zhouzhouyi_mactest_soc/sys/netinet6/in6_proto.c#4 integrate .. //depot/projects/soc2007/zhouzhouyi_mactest_soc/sys/netinet6/in6_rmx.c#4 integrate .. //depot/projects/soc2007/zhouzhouyi_mactest_soc/sys/netinet6/in6_src.c#4 integrate .. //depot/projects/soc2007/zhouzhouyi_mactest_soc/sys/netinet6/in6_var.h#3 integrate .. //depot/projects/soc2007/zhouzhouyi_mactest_soc/sys/netinet6/ip6_ecn.h#3 integrate .. //depot/projects/soc2007/zhouzhouyi_mactest_soc/sys/netinet6/ip6_forward.c#4 integrate .. //depot/projects/soc2007/zhouzhouyi_mactest_soc/sys/netinet6/ip6_id.c#4 integrate .. //depot/projects/soc2007/zhouzhouyi_mactest_soc/sys/netinet6/ip6_input.c#4 integrate .. //depot/projects/soc2007/zhouzhouyi_mactest_soc/sys/netinet6/ip6_ipsec.c#1 branch .. //depot/projects/soc2007/zhouzhouyi_mactest_soc/sys/netinet6/ip6_ipsec.h#1 branch .. //depot/projects/soc2007/zhouzhouyi_mactest_soc/sys/netinet6/ip6_mroute.c#4 integrate .. //depot/projects/soc2007/zhouzhouyi_mactest_soc/sys/netinet6/ip6_mroute.h#4 integrate .. //depot/projects/soc2007/zhouzhouyi_mactest_soc/sys/netinet6/ip6_output.c#4 integrate .. //depot/projects/soc2007/zhouzhouyi_mactest_soc/sys/netinet6/ip6_var.h#4 integrate .. //depot/projects/soc2007/zhouzhouyi_mactest_soc/sys/netinet6/ip6protosw.h#3 integrate .. //depot/projects/soc2007/zhouzhouyi_mactest_soc/sys/netinet6/mld6.c#4 integrate .. //depot/projects/soc2007/zhouzhouyi_mactest_soc/sys/netinet6/mld6_var.h#3 integrate .. //depot/projects/soc2007/zhouzhouyi_mactest_soc/sys/netinet6/nd6.c#5 integrate .. //depot/projects/soc2007/zhouzhouyi_mactest_soc/sys/netinet6/nd6.h#3 integrate .. //depot/projects/soc2007/zhouzhouyi_mactest_soc/sys/netinet6/nd6_nbr.c#4 integrate .. //depot/projects/soc2007/zhouzhouyi_mactest_soc/sys/netinet6/nd6_rtr.c#4 integrate .. //depot/projects/soc2007/zhouzhouyi_mactest_soc/sys/netinet6/pim6.h#3 integrate .. //depot/projects/soc2007/zhouzhouyi_mactest_soc/sys/netinet6/pim6_var.h#3 integrate .. //depot/projects/soc2007/zhouzhouyi_mactest_soc/sys/netinet6/raw_ip6.c#4 integrate .. //depot/projects/soc2007/zhouzhouyi_mactest_soc/sys/netinet6/raw_ip6.h#3 integrate .. //depot/projects/soc2007/zhouzhouyi_mactest_soc/sys/netinet6/route6.c#4 integrate .. //depot/projects/soc2007/zhouzhouyi_mactest_soc/sys/netinet6/scope6.c#4 integrate .. //depot/projects/soc2007/zhouzhouyi_mactest_soc/sys/netinet6/scope6_var.h#3 integrate .. //depot/projects/soc2007/zhouzhouyi_mactest_soc/sys/netinet6/sctp6_usrreq.c#4 integrate .. //depot/projects/soc2007/zhouzhouyi_mactest_soc/sys/netinet6/sctp6_var.h#4 integrate .. //depot/projects/soc2007/zhouzhouyi_mactest_soc/sys/netinet6/tcp6_var.h#3 integrate .. //depot/projects/soc2007/zhouzhouyi_mactest_soc/sys/netinet6/udp6_usrreq.c#5 integrate .. //depot/projects/soc2007/zhouzhouyi_mactest_soc/sys/netinet6/udp6_var.h#4 integrate .. //depot/projects/soc2007/zhouzhouyi_mactest_soc/sys/netipsec/ipsec.c#4 integrate .. //depot/projects/soc2007/zhouzhouyi_mactest_soc/sys/netipsec/ipsec.h#4 integrate .. //depot/projects/soc2007/zhouzhouyi_mactest_soc/sys/netipsec/ipsec_input.c#4 integrate .. //depot/projects/soc2007/zhouzhouyi_mactest_soc/sys/netipsec/ipsec_output.c#4 integrate .. //depot/projects/soc2007/zhouzhouyi_mactest_soc/sys/netipsec/keysock.c#4 integrate .. //depot/projects/soc2007/zhouzhouyi_mactest_soc/sys/netipsec/xform.h#3 integrate .. //depot/projects/soc2007/zhouzhouyi_mactest_soc/sys/netipsec/xform_ipip.c#4 integrate .. //depot/projects/soc2007/zhouzhouyi_mactest_soc/sys/netncp/ncp_rq.c#3 integrate .. //depot/projects/soc2007/zhouzhouyi_mactest_soc/sys/netncp/ncp_sock.c#3 integrate .. //depot/projects/soc2007/zhouzhouyi_mactest_soc/sys/netncp/ncp_sock.h#3 integrate .. //depot/projects/soc2007/zhouzhouyi_mactest_soc/sys/netsmb/smb_trantcp.c#3 integrate .. //depot/projects/soc2007/zhouzhouyi_mactest_soc/sys/nfsclient/nfs_vnops.c#3 integrate .. //depot/projects/soc2007/zhouzhouyi_mactest_soc/sys/opencrypto/cryptodev.c#4 integrate .. //depot/projects/soc2007/zhouzhouyi_mactest_soc/sys/pc98/cbus/gdc.c#3 integrate .. //depot/projects/soc2007/zhouzhouyi_mactest_soc/sys/pc98/cbus/pckbd.c#3 integrate .. //depot/projects/soc2007/zhouzhouyi_mactest_soc/sys/pc98/cbus/scgdcrndr.c#3 integrate .. //depot/projects/soc2007/zhouzhouyi_mactest_soc/sys/pc98/cbus/sio.c#5 integrate .. //depot/projects/soc2007/zhouzhouyi_mactest_soc/sys/pc98/conf/GENERIC#5 integrate .. //depot/projects/soc2007/zhouzhouyi_mactest_soc/sys/pc98/include/stack.h#1 branch .. //depot/projects/soc2007/zhouzhouyi_mactest_soc/sys/pc98/pc98/machdep.c#4 integrate .. //depot/projects/soc2007/zhouzhouyi_mactest_soc/sys/pci/agp.c#5 delete .. //depot/projects/soc2007/zhouzhouyi_mactest_soc/sys/pci/agp_ali.c#4 delete .. //depot/projects/soc2007/zhouzhouyi_mactest_soc/sys/pci/agp_amd.c#4 delete .. //depot/projects/soc2007/zhouzhouyi_mactest_soc/sys/pci/agp_amd64.c#4 delete .. //depot/projects/soc2007/zhouzhouyi_mactest_soc/sys/pci/agp_ati.c#4 delete .. //depot/projects/soc2007/zhouzhouyi_mactest_soc/sys/pci/agp_i810.c#5 delete .. //depot/projects/soc2007/zhouzhouyi_mactest_soc/sys/pci/agp_if.m#3 delete .. //depot/projects/soc2007/zhouzhouyi_mactest_soc/sys/pci/agp_intel.c#4 delete .. //depot/projects/soc2007/zhouzhouyi_mactest_soc/sys/pci/agp_nvidia.c#4 delete .. //depot/projects/soc2007/zhouzhouyi_mactest_soc/sys/pci/agp_sis.c#4 delete .. //depot/projects/soc2007/zhouzhouyi_mactest_soc/sys/pci/agp_via.c#5 delete .. //depot/projects/soc2007/zhouzhouyi_mactest_soc/sys/pci/agppriv.h#5 delete .. //depot/projects/soc2007/zhouzhouyi_mactest_soc/sys/pci/agpreg.h#4 delete .. //depot/projects/soc2007/zhouzhouyi_mactest_soc/sys/pci/agpvar.h#3 delete .. //depot/projects/soc2007/zhouzhouyi_mactest_soc/sys/pci/if_rl.c#4 integrate .. //depot/projects/soc2007/zhouzhouyi_mactest_soc/sys/pci/if_rlreg.h#4 integrate .. //depot/projects/soc2007/zhouzhouyi_mactest_soc/sys/pci/if_sf.c#3 integrate .. //depot/projects/soc2007/zhouzhouyi_mactest_soc/sys/pci/if_ste.c#3 integrate .. //depot/projects/soc2007/zhouzhouyi_mactest_soc/sys/pci/if_vr.c#4 integrate .. //depot/projects/soc2007/zhouzhouyi_mactest_soc/sys/pci/if_xl.c#5 integrate .. //depot/projects/soc2007/zhouzhouyi_mactest_soc/sys/pci/nfsmb.c#3 integrate .. //depot/projects/soc2007/zhouzhouyi_mactest_soc/sys/pci/xrpu.c#3 delete .. //depot/projects/soc2007/zhouzhouyi_mactest_soc/sys/powerpc/aim/clock.c#1 branch .. //depot/projects/soc2007/zhouzhouyi_mactest_soc/sys/powerpc/aim/copyinout.c#1 branch .. //depot/projects/soc2007/zhouzhouyi_mactest_soc/sys/powerpc/aim/interrupt.c#1 branch .. //depot/projects/soc2007/zhouzhouyi_mactest_soc/sys/powerpc/aim/locore.S#1 branch .. //depot/projects/soc2007/zhouzhouyi_mactest_soc/sys/powerpc/aim/machdep.c#1 branch .. //depot/projects/soc2007/zhouzhouyi_mactest_soc/sys/powerpc/aim/mmu_oea.c#1 branch .. //depot/projects/soc2007/zhouzhouyi_mactest_soc/sys/powerpc/aim/nexus.c#1 branch .. //depot/projects/soc2007/zhouzhouyi_mactest_soc/sys/powerpc/aim/ofw_machdep.c#1 branch .. //depot/projects/soc2007/zhouzhouyi_mactest_soc/sys/powerpc/aim/ofwmagic.S#1 branch .. //depot/projects/soc2007/zhouzhouyi_mactest_soc/sys/powerpc/aim/swtch.S#1 branch .. //depot/projects/soc2007/zhouzhouyi_mactest_soc/sys/powerpc/aim/trap.c#1 branch .. //depot/projects/soc2007/zhouzhouyi_mactest_soc/sys/powerpc/aim/trap_subr.S#1 branch .. //depot/projects/soc2007/zhouzhouyi_mactest_soc/sys/powerpc/aim/uio_machdep.c#1 branch .. //depot/projects/soc2007/zhouzhouyi_mactest_soc/sys/powerpc/aim/uma_machdep.c#1 branch .. //depot/projects/soc2007/zhouzhouyi_mactest_soc/sys/powerpc/aim/vm_machdep.c#1 branch .. //depot/projects/soc2007/zhouzhouyi_mactest_soc/sys/powerpc/conf/GENERIC#4 integrate .. //depot/projects/soc2007/zhouzhouyi_mactest_soc/sys/powerpc/conf/NOTES#4 integrate .. //depot/projects/soc2007/zhouzhouyi_mactest_soc/sys/powerpc/include/_bus.h#3 integrate .. //depot/projects/soc2007/zhouzhouyi_mactest_soc/sys/powerpc/include/atomic.h#4 integrate .. //depot/projects/soc2007/zhouzhouyi_mactest_soc/sys/powerpc/include/bus.h#3 integrate .. //depot/projects/soc2007/zhouzhouyi_mactest_soc/sys/powerpc/include/fpu.h#3 integrate .. //depot/projects/soc2007/zhouzhouyi_mactest_soc/sys/powerpc/include/md_var.h#4 integrate .. //depot/projects/soc2007/zhouzhouyi_mactest_soc/sys/powerpc/include/pmc_mdep.h#3 integrate .. //depot/projects/soc2007/zhouzhouyi_mactest_soc/sys/powerpc/include/stack.h#1 branch .. //depot/projects/soc2007/zhouzhouyi_mactest_soc/sys/powerpc/include/vmparam.h#4 integrate .. //depot/projects/soc2007/zhouzhouyi_mactest_soc/sys/powerpc/powermac/grackle.c#4 integrate .. //depot/projects/soc2007/zhouzhouyi_mactest_soc/sys/powerpc/powermac/macio.c#3 integrate .. //depot/projects/soc2007/zhouzhouyi_mactest_soc/sys/powerpc/powermac/pswitch.c#3 integrate .. //depot/projects/soc2007/zhouzhouyi_mactest_soc/sys/powerpc/powermac/uninorth.c#4 integrate .. //depot/projects/soc2007/zhouzhouyi_mactest_soc/sys/powerpc/powerpc/bus_machdep.c#1 branch .. //depot/projects/soc2007/zhouzhouyi_mactest_soc/sys/powerpc/powerpc/clock.c#3 delete .. //depot/projects/soc2007/zhouzhouyi_mactest_soc/sys/powerpc/powerpc/copyinout.c#3 delete .. //depot/projects/soc2007/zhouzhouyi_mactest_soc/sys/powerpc/powerpc/db_memrw.c#3 delete .. //depot/projects/soc2007/zhouzhouyi_mactest_soc/sys/powerpc/powerpc/db_trace.c#3 integrate .. //depot/projects/soc2007/zhouzhouyi_mactest_soc/sys/powerpc/powerpc/interrupt.c#4 delete .. //depot/projects/soc2007/zhouzhouyi_mactest_soc/sys/powerpc/powerpc/intr_machdep.c#4 integrate .. //depot/projects/soc2007/zhouzhouyi_mactest_soc/sys/powerpc/powerpc/locore.S#3 delete .. //depot/projects/soc2007/zhouzhouyi_mactest_soc/sys/powerpc/powerpc/machdep.c#4 delete .. //depot/projects/soc2007/zhouzhouyi_mactest_soc/sys/powerpc/powerpc/mmu_if.m#3 integrate .. //depot/projects/soc2007/zhouzhouyi_mactest_soc/sys/powerpc/powerpc/mmu_oea.c#3 delete .. //depot/projects/soc2007/zhouzhouyi_mactest_soc/sys/powerpc/powerpc/nexus.c#4 delete .. //depot/projects/soc2007/zhouzhouyi_mactest_soc/sys/powerpc/powerpc/ofw_machdep.c#3 delete .. //depot/projects/soc2007/zhouzhouyi_mactest_soc/sys/powerpc/powerpc/ofwmagic.S#3 delete .. //depot/projects/soc2007/zhouzhouyi_mactest_soc/sys/powerpc/powerpc/pmap_dispatch.c#4 integrate .. //depot/projects/soc2007/zhouzhouyi_mactest_soc/sys/powerpc/powerpc/stack_machdep.c#1 branch .. //depot/projects/soc2007/zhouzhouyi_mactest_soc/sys/powerpc/powerpc/swtch.S#3 delete .. //depot/projects/soc2007/zhouzhouyi_mactest_soc/sys/powerpc/powerpc/trap.c#4 delete .. //depot/projects/soc2007/zhouzhouyi_mactest_soc/sys/powerpc/powerpc/trap_subr.S#3 delete .. //depot/projects/soc2007/zhouzhouyi_mactest_soc/sys/powerpc/powerpc/uio_machdep.c#3 delete .. //depot/projects/soc2007/zhouzhouyi_mactest_soc/sys/powerpc/powerpc/uma_machdep.c#4 delete .. //depot/projects/soc2007/zhouzhouyi_mactest_soc/sys/powerpc/powerpc/vm_machdep.c#3 delete .. //depot/projects/soc2007/zhouzhouyi_mactest_soc/sys/powerpc/psim/iobus.c#3 integrate .. //depot/projects/soc2007/zhouzhouyi_mactest_soc/sys/security/audit/audit.c#5 integrate .. //depot/projects/soc2007/zhouzhouyi_mactest_soc/sys/security/audit/audit_pipe.c#5 integrate .. //depot/projects/soc2007/zhouzhouyi_mactest_soc/sys/security/mac/mac_atalk.c#1 branch .. //depot/projects/soc2007/zhouzhouyi_mactest_soc/sys/security/mac/mac_posix_sem.c#5 integrate .. //depot/projects/soc2007/zhouzhouyi_mactest_soc/sys/security/mac_test/mac_test.c#17 edit .. //depot/projects/soc2007/zhouzhouyi_mactest_soc/sys/sparc64/conf/DEFAULTS#3 integrate .. //depot/projects/soc2007/zhouzhouyi_mactest_soc/sys/sparc64/conf/GENERIC#4 integrate .. //depot/projects/soc2007/zhouzhouyi_mactest_soc/sys/sparc64/include/pmc_mdep.h#3 integrate .. //depot/projects/soc2007/zhouzhouyi_mactest_soc/sys/sparc64/include/stack.h#1 branch .. //depot/projects/soc2007/zhouzhouyi_mactest_soc/sys/sparc64/include/vmparam.h#4 integrate .. //depot/projects/soc2007/zhouzhouyi_mactest_soc/sys/sparc64/pci/ofw_pcibus.c#4 integrate .. //depot/projects/soc2007/zhouzhouyi_mactest_soc/sys/sparc64/pci/psycho.c#5 integrate .. //depot/projects/soc2007/zhouzhouyi_mactest_soc/sys/sparc64/pci/psychovar.h#3 integrate .. //depot/projects/soc2007/zhouzhouyi_mactest_soc/sys/sparc64/sparc64/db_trace.c#3 integrate .. //depot/projects/soc2007/zhouzhouyi_mactest_soc/sys/sparc64/sparc64/intr_machdep.c#4 integrate .. //depot/projects/soc2007/zhouzhouyi_mactest_soc/sys/sparc64/sparc64/machdep.c#4 integrate .. //depot/projects/soc2007/zhouzhouyi_mactest_soc/sys/sparc64/sparc64/pmap.c#6 integrate .. //depot/projects/soc2007/zhouzhouyi_mactest_soc/sys/sparc64/sparc64/stack_machdep.c#1 branch .. //depot/projects/soc2007/zhouzhouyi_mactest_soc/sys/sparc64/sparc64/trap.c#3 integrate .. //depot/projects/soc2007/zhouzhouyi_mactest_soc/sys/sparc64/sparc64/tsb.c#3 integrate .. //depot/projects/soc2007/zhouzhouyi_mactest_soc/sys/sparc64/sparc64/vm_machdep.c#4 integrate .. //depot/projects/soc2007/zhouzhouyi_mactest_soc/sys/sun4v/conf/GENERIC#4 integrate .. //depot/projects/soc2007/zhouzhouyi_mactest_soc/sys/sun4v/include/pcpu.h#3 integrate .. //depot/projects/soc2007/zhouzhouyi_mactest_soc/sys/sun4v/include/pmc_mdep.h#3 integrate .. //depot/projects/soc2007/zhouzhouyi_mactest_soc/sys/sun4v/include/stack.h#1 branch .. //depot/projects/soc2007/zhouzhouyi_mactest_soc/sys/sun4v/include/stdarg.h#3 integrate .. //depot/projects/soc2007/zhouzhouyi_mactest_soc/sys/sun4v/include/vmparam.h#4 integrate .. //depot/projects/soc2007/zhouzhouyi_mactest_soc/sys/sun4v/sun4v/db_trace.c#3 integrate .. //depot/projects/soc2007/zhouzhouyi_mactest_soc/sys/sun4v/sun4v/hvcons.c#3 integrate .. //depot/projects/soc2007/zhouzhouyi_mactest_soc/sys/sun4v/sun4v/machdep.c#4 integrate .. //depot/projects/soc2007/zhouzhouyi_mactest_soc/sys/sun4v/sun4v/pmap.c#4 integrate .. //depot/projects/soc2007/zhouzhouyi_mactest_soc/sys/sun4v/sun4v/stack_machdep.c#1 branch .. //depot/projects/soc2007/zhouzhouyi_mactest_soc/sys/sun4v/sun4v/trap.c#3 integrate .. //depot/projects/soc2007/zhouzhouyi_mactest_soc/sys/sun4v/sun4v/vm_machdep.c#4 integrate .. //depot/projects/soc2007/zhouzhouyi_mactest_soc/sys/sys/_elf_solaris.h#3 delete .. //depot/projects/soc2007/zhouzhouyi_mactest_soc/sys/sys/_lock.h#3 integrate .. //depot/projects/soc2007/zhouzhouyi_mactest_soc/sys/sys/_rmlock.h#1 branch .. //depot/projects/soc2007/zhouzhouyi_mactest_soc/sys/sys/ata.h#5 integrate .. //depot/projects/soc2007/zhouzhouyi_mactest_soc/sys/sys/callout.h#4 integrate .. //depot/projects/soc2007/zhouzhouyi_mactest_soc/sys/sys/cdefs.h#3 integrate .. //depot/projects/soc2007/zhouzhouyi_mactest_soc/sys/sys/copyright.h#3 integrate .. //depot/projects/soc2007/zhouzhouyi_mactest_soc/sys/sys/disklabel.h#3 integrate .. //depot/projects/soc2007/zhouzhouyi_mactest_soc/sys/sys/elf.h#3 integrate .. //depot/projects/soc2007/zhouzhouyi_mactest_soc/sys/sys/elf_common.h#3 integrate .. //depot/projects/soc2007/zhouzhouyi_mactest_soc/sys/sys/eventhandler.h#3 integrate .. //depot/projects/soc2007/zhouzhouyi_mactest_soc/sys/sys/file.h#3 integrate .. //depot/projects/soc2007/zhouzhouyi_mactest_soc/sys/sys/kdb.h#3 integrate .. //depot/projects/soc2007/zhouzhouyi_mactest_soc/sys/sys/kernel.h#4 integrate .. //depot/projects/soc2007/zhouzhouyi_mactest_soc/sys/sys/kerneldump.h#3 integrate .. //depot/projects/soc2007/zhouzhouyi_mactest_soc/sys/sys/linker.h#3 integrate .. //depot/projects/soc2007/zhouzhouyi_mactest_soc/sys/sys/lock.h#3 integrate .. //depot/projects/soc2007/zhouzhouyi_mactest_soc/sys/sys/lock_profile.h#4 integrate .. //depot/projects/soc2007/zhouzhouyi_mactest_soc/sys/sys/lockmgr.h#3 integrate .. //depot/projects/soc2007/zhouzhouyi_mactest_soc/sys/sys/malloc.h#3 integrate .. //depot/projects/soc2007/zhouzhouyi_mactest_soc/sys/sys/mbuf.h#5 integrate .. //depot/projects/soc2007/zhouzhouyi_mactest_soc/sys/sys/mutex.h#4 integrate .. //depot/projects/soc2007/zhouzhouyi_mactest_soc/sys/sys/param.h#6 integrate .. //depot/projects/soc2007/zhouzhouyi_mactest_soc/sys/sys/pcpu.h#3 integrate .. //depot/projects/soc2007/zhouzhouyi_mactest_soc/sys/sys/pmc.h#3 integrate .. //depot/projects/soc2007/zhouzhouyi_mactest_soc/sys/sys/pmckern.h#3 integrate .. //depot/projects/soc2007/zhouzhouyi_mactest_soc/sys/sys/pmclog.h#3 integrate .. //depot/projects/soc2007/zhouzhouyi_mactest_soc/sys/sys/priv.h#3 integrate .. //depot/projects/soc2007/zhouzhouyi_mactest_soc/sys/sys/proc.h#6 integrate .. //depot/projects/soc2007/zhouzhouyi_mactest_soc/sys/sys/resource.h#3 integrate .. //depot/projects/soc2007/zhouzhouyi_mactest_soc/sys/sys/rmlock.h#1 branch .. //depot/projects/soc2007/zhouzhouyi_mactest_soc/sys/sys/selinfo.h#3 integrate .. //depot/projects/soc2007/zhouzhouyi_mactest_soc/sys/sys/signal.h#3 integrate .. //depot/projects/soc2007/zhouzhouyi_mactest_soc/sys/sys/smp.h#3 integrate .. //depot/projects/soc2007/zhouzhouyi_mactest_soc/sys/sys/socket.h#4 integrate .. //depot/projects/soc2007/zhouzhouyi_mactest_soc/sys/sys/socketvar.h#3 integrate .. //depot/projects/soc2007/zhouzhouyi_mactest_soc/sys/sys/stack.h#3 integrate .. //depot/projects/soc2007/zhouzhouyi_mactest_soc/sys/sys/stat.h#3 integrate .. //depot/projects/soc2007/zhouzhouyi_mactest_soc/sys/sys/sx.h#4 integrate .. //depot/projects/soc2007/zhouzhouyi_mactest_soc/sys/sys/sysctl.h#4 integrate .. //depot/projects/soc2007/zhouzhouyi_mactest_soc/sys/sys/systm.h#5 integrate .. //depot/projects/soc2007/zhouzhouyi_mactest_soc/sys/sys/time.h#3 integrate .. //depot/projects/soc2007/zhouzhouyi_mactest_soc/sys/sys/tree.h#3 integrate .. //depot/projects/soc2007/zhouzhouyi_mactest_soc/sys/sys/tty.h#3 integrate .. //depot/projects/soc2007/zhouzhouyi_mactest_soc/sys/sys/types.h#3 integrate .. //depot/projects/soc2007/zhouzhouyi_mactest_soc/sys/sys/ucred.h#3 integrate .. //depot/projects/soc2007/zhouzhouyi_mactest_soc/sys/sys/umtx.h#3 integrate .. //depot/projects/soc2007/zhouzhouyi_mactest_soc/sys/sys/unpcb.h#3 integrate .. //depot/projects/soc2007/zhouzhouyi_mactest_soc/sys/sys/user.h#4 integrate .. //depot/projects/soc2007/zhouzhouyi_mactest_soc/sys/sys/xrpuio.h#3 delete .. //depot/projects/soc2007/zhouzhouyi_mactest_soc/sys/ufs/ffs/ffs_alloc.c#4 integrate .. //depot/projects/soc2007/zhouzhouyi_mactest_soc/sys/ufs/ffs/ffs_balloc.c#3 integrate .. //depot/projects/soc2007/zhouzhouyi_mactest_soc/sys/ufs/ffs/ffs_inode.c#3 integrate .. //depot/projects/soc2007/zhouzhouyi_mactest_soc/sys/ufs/ffs/ffs_snapshot.c#3 integrate .. //depot/projects/soc2007/zhouzhouyi_mactest_soc/sys/ufs/ffs/ffs_softdep.c#3 integrate .. //depot/projects/soc2007/zhouzhouyi_mactest_soc/sys/ufs/ffs/ffs_vnops.c#4 integrate .. //depot/projects/soc2007/zhouzhouyi_mactest_soc/sys/ufs/ufs/ufs_bmap.c#3 integrate .. //depot/projects/soc2007/zhouzhouyi_mactest_soc/sys/ufs/ufs/ufs_lookup.c#3 integrate .. //depot/projects/soc2007/zhouzhouyi_mactest_soc/sys/ufs/ufs/ufs_vnops.c#4 integrate >>> TRUNCATED FOR MAIL (1000 lines) <<< From owner-p4-projects@FreeBSD.ORG Fri Jan 4 07:45:19 2008 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 042AF16A41A; Fri, 4 Jan 2008 07:45:19 +0000 (UTC) Delivered-To: perforce@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id A57E216A418 for ; Fri, 4 Jan 2008 07:45:18 +0000 (UTC) (envelope-from imp@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id 956B013C44B for ; Fri, 4 Jan 2008 07:45:18 +0000 (UTC) (envelope-from imp@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.1/8.14.1) with ESMTP id m047jGko051330 for ; Fri, 4 Jan 2008 07:45:16 GMT (envelope-from imp@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.1/8.14.1/Submit) id m047jG0v051327 for perforce@freebsd.org; Fri, 4 Jan 2008 07:45:16 GMT (envelope-from imp@freebsd.org) Date: Fri, 4 Jan 2008 07:45:16 GMT Message-Id: <200801040745.m047jG0v051327@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to imp@freebsd.org using -f From: Warner Losh To: Perforce Change Reviews Cc: Subject: PERFORCE change 132463 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 04 Jan 2008 07:45:19 -0000 http://perforce.freebsd.org/chv.cgi?CH=132463 Change 132463 by imp@imp_paco-paco on 2008/01/04 07:44:17 Resolve all the multiple definitions. We go from ~10,000 lines of output on the link down to 117. There's about 60 undefined symbols now. Affected files ... .. //depot/projects/mips2-jnpr/src/sys/conf/files.mips#4 edit .. //depot/projects/mips2-jnpr/src/sys/mips/include/cpu.h#7 edit .. //depot/projects/mips2-jnpr/src/sys/mips/include/intr.h#4 edit .. //depot/projects/mips2-jnpr/src/sys/mips/mips/cpu.c#4 edit .. //depot/projects/mips2-jnpr/src/sys/mips/mips/interrupt.c#4 edit .. //depot/projects/mips2-jnpr/src/sys/mips/mips/machdep.c#6 edit .. //depot/projects/mips2-jnpr/src/sys/mips/mips/sys_machdep.c#2 delete Differences ... ==== //depot/projects/mips2-jnpr/src/sys/conf/files.mips#4 (text+ko) ==== @@ -81,7 +81,6 @@ mips/mips/stack_machdep.c optional ddb | stack mips/mips/support.S standard mips/mips/swtch.S standard -mips/mips/sys_machdep.c standard mips/mips/tick.c standard mips/mips/uio_machdep.c standard geom/geom_bsd.c standard @@ -91,7 +90,6 @@ libkern/ashldi3.c standard libkern/ashrdi3.c standard libkern/divdi3.c standard -libkern/ffs.c standard libkern/ffsl.c standard libkern/fls.c standard libkern/flsl.c standard ==== //depot/projects/mips2-jnpr/src/sys/mips/include/cpu.h#7 (text+ko) ==== @@ -430,36 +430,36 @@ #define MIPS_VR5400 0x54 /* NEC Vr5400 FPU ISA IV+ */ #ifndef _LOCORE -union cpuprid cpu_id; +extern union cpuprid cpu_id; #define mips_proc_type() ((cpu_id.cpu.cp_vendor << 8) | cpu_id.cpu.cp_imp) #define mips_set_proc_type(type) (cpu_id.cpu.cp_vendor = (type) >> 8, \ cpu_id.cpu.cp_imp = ((type) & 0x00ff)) #endif /* !_LOCORE */ #if defined(_KERNEL) && !defined(_LOCORE) -union cpuprid fpu_id; +extern union cpuprid fpu_id; -u_int CpuPrimaryInstCacheSize; -u_int CpuPrimaryInstCacheLSize; -u_int CpuPrimaryInstSetSize; -u_int CpuPrimaryInstCacheNsets; -u_int CpuPrimaryInstCacheAsso; +extern u_int CpuPrimaryInstCacheSize; +extern u_int CpuPrimaryInstCacheLSize; +extern u_int CpuPrimaryInstSetSize; +extern u_int CpuPrimaryInstCacheNsets; +extern u_int CpuPrimaryInstCacheAsso; -u_int CpuPrimaryDataCacheSize; -u_int CpuPrimaryDataCacheLSize; -u_int CpuPrimaryDataSetSize; -u_int CpuPrimaryDataCacheNsets; -u_int CpuPrimaryDataCacheAsso; +extern u_int CpuPrimaryDataCacheSize; +extern u_int CpuPrimaryDataCacheLSize; +extern u_int CpuPrimaryDataSetSize; +extern u_int CpuPrimaryDataCacheNsets; +extern u_int CpuPrimaryDataCacheAsso; -u_int CpuCacheAliasMask; -u_int CpuSecondaryCacheSize; -u_int CpuTertiaryCacheSize; -u_int CpuNWayCache; -u_int CpuCacheType; -u_int CpuConfigRegister; -u_int CpuStatusRegister; -u_int CpuExternalCacheOn; -u_int CpuOnboardCacheOn; +extern u_int CpuCacheAliasMask; +extern u_int CpuSecondaryCacheSize; +extern u_int CpuTertiaryCacheSize; +extern u_int CpuNWayCache; +extern u_int CpuCacheType; +extern u_int CpuConfigRegister; +extern u_int CpuStatusRegister; +extern u_int CpuExternalCacheOn; +extern u_int CpuOnboardCacheOn; struct tlb; struct user; ==== //depot/projects/mips2-jnpr/src/sys/mips/include/intr.h#4 (text+ko) ==== @@ -53,8 +53,8 @@ #define INTRCNT_PE 3 /* irq 4 */ #define INTRCNT_PICNIC 4 /* irq 5 */ -intrmask_t idle_mask; -void (*mips_ack_interrupt)(int, intrmask_t); +extern intrmask_t idle_mask; +extern void (*mips_ack_interrupt)(int, intrmask_t); typedef int ih_func_t(void *); @@ -71,7 +71,7 @@ void *frame; }; -struct mips_intr_handler intr_handlers[16]; +extern struct mips_intr_handler intr_handlers[]; struct trapframe; void mips_set_intr(int pri, intrmask_t mask, ==== //depot/projects/mips2-jnpr/src/sys/mips/mips/cpu.c#4 (text+ko) ==== @@ -40,6 +40,30 @@ #include #include +union cpuprid cpu_id; +union cpuprid fpu_id; + +u_int CpuPrimaryInstCacheSize; +u_int CpuPrimaryInstCacheLSize; +u_int CpuPrimaryInstSetSize; +u_int CpuPrimaryInstCacheNsets; +u_int CpuPrimaryInstCacheAsso; + +u_int CpuPrimaryDataCacheSize; +u_int CpuPrimaryDataCacheLSize; +u_int CpuPrimaryDataSetSize; +u_int CpuPrimaryDataCacheNsets; +u_int CpuPrimaryDataCacheAsso; + +u_int CpuCacheAliasMask; +u_int CpuSecondaryCacheSize; +u_int CpuTertiaryCacheSize; +u_int CpuNWayCache; +u_int CpuCacheType; +u_int CpuConfigRegister; +u_int CpuStatusRegister; +u_int CpuExternalCacheOn; +u_int CpuOnboardCacheOn; static void cpu_identify(driver_t *driver, device_t parent); static int cpu_probe(device_t dev); ==== //depot/projects/mips2-jnpr/src/sys/mips/mips/interrupt.c#4 (text+ko) ==== @@ -70,6 +70,10 @@ #include #include +intrmask_t idle_mask; +void (*mips_ack_interrupt)(int, intrmask_t); +struct mips_intr_handler intr_handlers[16]; + /* * Modern versions of MIPS processors have extended interrupt * capabilites. How these are handeled differs from implementation ==== //depot/projects/mips2-jnpr/src/sys/mips/mips/machdep.c#6 (text+ko) ==== From owner-p4-projects@FreeBSD.ORG Fri Jan 4 07:50:22 2008 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 1C1FF16A420; Fri, 4 Jan 2008 07:50:22 +0000 (UTC) Delivered-To: perforce@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id D5F4F16A419 for ; Fri, 4 Jan 2008 07:50:21 +0000 (UTC) (envelope-from zhouzhouyi@FreeBSD.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id C5A5B13C45B for ; Fri, 4 Jan 2008 07:50:21 +0000 (UTC) (envelope-from zhouzhouyi@FreeBSD.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.1/8.14.1) with ESMTP id m047oLAV051532 for ; Fri, 4 Jan 2008 07:50:21 GMT (envelope-from zhouzhouyi@FreeBSD.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.1/8.14.1/Submit) id m047oLJK051529 for perforce@freebsd.org; Fri, 4 Jan 2008 07:50:21 GMT (envelope-from zhouzhouyi@FreeBSD.org) Date: Fri, 4 Jan 2008 07:50:21 GMT Message-Id: <200801040750.m047oLJK051529@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to zhouzhouyi@FreeBSD.org using -f From: Zhouyi ZHOU To: Perforce Change Reviews Cc: Subject: PERFORCE change 132464 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 04 Jan 2008 07:50:22 -0000 http://perforce.freebsd.org/chv.cgi?CH=132464 Change 132464 by zhouzhouyi@zhouzhouyi_mactest on 2008/01/04 07:50:02 style modification Affected files ... .. //depot/projects/soc2007/zhouzhouyi_mactest_soc/regression/mactest/tests/truncate/00.t#2 edit Differences ... ==== //depot/projects/soc2007/zhouzhouyi_mactest_soc/regression/mactest/tests/truncate/00.t#2 (text+ko) ==== @@ -1,95 +1,97 @@ #!/bin/sh -# $FreeBSD: src/tools/regression/mactest/tests/truncate/00.t,v 1.2 2007/01/25 20:50:02 zhouzhouyi Exp $ +# $FreeBSD$ desc="truncate descrease/increase file size" - dir=`dirname $0` . ${dir}/../misc.sh -echo "1..9" +case "${os}" in +FreeBSD) -n0=`namegen` -n1=`namegen` + mac_mls_support=`sysctl -n security.mac.mls.enabled 2>/dev/null` + mac_biba_support=`sysctl -n security.mac.biba.enabled 2>/dev/null` + mac_test_support=`sysctl -n security.mac.test.pseudoinit 2>/dev/null` + if [ "${mac_mls_support}" != "" ] && [ "${mac_biba_support}" != "" ] && + [ "${mac_test_support}" != "" ]; then +#turn off all the switches + for i in `sysctl security.mac | grep "\.enabled"| + sed 's/\([a-z\.]*\.enabled\)\(:\ \)\([01]\)/\1/`; do + sysctl ${i}=0 >/dev/null + done -#turn off all the switches -for i in `sysctl security.mac | grep "\.enabled"| - sed 's/\([a-z\.]*\.enabled\)\(:\ \)\([01]\)/\1/`; do -sysctl ${i}=0 -done + if [ -f ${mactest_conf} ]; then + rm ${mactest_conf} + fi + touch ${mactest_conf} + setfmac "mls/equal,biba/equal" ${mactest_conf} + + echo "1..9" -mac_mls_support=`sysctl -n security.mac.mls.enabled 2>/dev/null` -mac_biba_support=`sysctl -n security.mac.biba.enabled 2>/dev/null` + n0=`namegen` + n1=`namegen` -if [ "${mac_mls_support}" != "" ] && [ "${mac_biba_support}" != "" ] ; then - dvplabel=`getfmac ".."| sed 's/\(\.\.:\ \)\([a-z\,\/]*\)/\2/`; + dvplabel=`getfmac ".."| sed 's/\(\.\.:\ \)\([a-z\,\/]*\)/\2/`; + sysctl security.mac.mls.enabled=1 > /dev/null + sysctl security.mac.biba.enabled=1 > /dev/null + sysctl security.mac.mls.revocation_enabled=1 > /dev/null + sysctl security.mac.biba.revocation_enabled=1 > /dev/null - if [ -f ${mactest_conf} ]; then - rm ${mactest_conf} - fi - touch ${mactest_conf} - - t=`sysctl security.mac.mls.enabled=1` - echo "enforcing mac/mls!" - t=`sysctl security.mac.biba.enabled=1` - echo "enforcing mac/biba!" - t=`sysctl security.mac.mls.revocation_enabled=1` - t=`sysctl security.mac.biba.revocation_enabled=1` - echo "enable revocation!" ############################################################# #case 1-2 #first make working dir, the hook checks are already done in open: - mactestexpect "" 0 -m "mls/low(low-high)" -f ${mactest_conf} mkdir ${n1} 0755 - mactestexpect "" "" -m "mls/low(low-high)" -f ${mactest_conf} system setfmac "mls/6" ${n1} + mactestexpect "" 0 -m "mls/low(low-high)" -f ${mactest_conf} mkdir ${n1} 0755 + mactestexpect "" "" -m "mls/low(low-high)" -f ${mactest_conf} system setfmac "mls/6" ${n1} ############################################################# #case 3-4 #create the node - mactestexpect "" 0 -m "mls/6(low-high)" -f ${mactest_conf} create ${n1}/${n0} 0644 - mactestexpect "" "" -m "mls/6(low-high)" -f ${mactest_conf} system setfmac "mls/7" ${n1}/${n0} + mactestexpect "" 0 -m "mls/6(low-high)" -f ${mactest_conf} create ${n1}/${n0} 0644 + mactestexpect "" "" -m "mls/6(low-high)" -f ${mactest_conf} system setfmac "mls/7" ${n1}/${n0} ############################################################# #case 5: do the truncate operation, blp no write down - echo -n "pid = -1 mac_test_check_vnode_lookup:" > ${mactest_conf} - echo "biba/high(low-high),mls/9(low-high) biba/high,mls/6" >> ${mactest_conf} - echo -n "pid = -1 mac_test_check_vnode_write:" >> ${mactest_conf} - echo "biba/high(low-high),mls/9(low-high) NULL biba/high,mls/7" >> ${mactest_conf} - mactestexpect "" EACCES -m "mls/9(low-high)" -f ${mactest_conf} truncate ${n1}/${n0} 1234567 + echo -n "pid = -1 vnode_check_lookup:" > ${mactest_conf} + echo "biba/high(low-high),mls/9(low-high) biba/high,mls/6" >> ${mactest_conf} + echo -n "pid = -1 vnode_check_write:" >> ${mactest_conf} + echo "biba/high(low-high),mls/9(low-high) biba/high,mls/7" >> ${mactest_conf} + mactestexpect "" EACCES -m "mls/9(low-high)" -f ${mactest_conf} truncate ${n1}/${n0} 1234567 #case 6: do the truncate operation, biba no write down - echo -n "pid = -1 mac_test_check_vnode_lookup:" > ${mactest_conf} - echo "biba/low(low-high),mls/6(low-high) biba/high,mls/6" >> ${mactest_conf} - echo -n "pid = -1 mac_test_check_vnode_write:" >> ${mactest_conf} - echo "biba/low(low-high),mls/6(low-high) NULL biba/high,mls/7" >> ${mactest_conf} - mactestexpect "" EACCES -m "mls/6(low-high),biba/low(low-high)" -f ${mactest_conf} truncate ${n1}/${n0} 1234567 + echo -n "pid = -1 vnode_check_lookup:" > ${mactest_conf} + echo "biba/low(low-high),mls/6(low-high) biba/high,mls/6" >> ${mactest_conf} + echo -n "pid = -1 vnode_check_write:" >> ${mactest_conf} + echo "biba/low(low-high),mls/6(low-high) biba/high,mls/7" >> ${mactest_conf} + mactestexpect "" EACCES -m "mls/6(low-high),biba/low(low-high)" -f ${mactest_conf} truncate ${n1}/${n0} 1234567 #case 7: succussfully truncate - rm ${mactest_conf} - touch ${mactest_conf} - mactestexpect "" 0 -m "mls/6(low-high),biba/high(low-high)" -f ${mactest_conf} truncate ${n1}/${n0} 1234567 + truncate -s 0 ${mactest_conf} + mactestexpect "" 0 -m "mls/6(low-high),biba/high(low-high)" -f ${mactest_conf} truncate ${n1}/${n0} 1234567 #case 8: lstat the file size, blp no read up - echo -n "pid = -1 mac_test_check_vnode_stat:" > ${mactest_conf} - echo "biba/high(low-high),mls/6(low-high) NULL biba/high,mls/7" >> ${mactest_conf} - mactestexpect "" EACCES -m "mls/6(low-high)" -f ${mactest_conf} lstat ${n1}/${n0} size + echo -n "pid = -1 vnode_check_stat:" > ${mactest_conf} + echo "biba/high(low-high),mls/6(low-high) biba/high,mls/7" >> ${mactest_conf} + mactestexpect "" EACCES -m "mls/6(low-high)" -f ${mactest_conf} lstat ${n1}/${n0} size #case 9: successfully lstat the file size - rm ${mactest_conf} - touch ${mactest_conf} - mactestexpect "" 1234567 -m "mls/7(low-high)" -f ${mactest_conf} lstat ${n1}/${n0} size + truncate -s 0 ${mactest_conf} + mactestexpect "" 1234567 -m "mls/7(low-high)" -f ${mactest_conf} lstat ${n1}/${n0} size #cleanup: - t=`sysctl security.mac.mls.enabled=0` - echo "disabling mac/mls!" - t=`sysctl security.mac.biba.enabled=0` - echo "disabling mac/biba!" - rm -fr ${n1} - rm ${mactest_conf} -fi - + sysctl security.mac.mls.enabled=0 >/dev/null + sysctl security.mac.biba.enabled=0 > /dev/null + rm -fr ${n1} + rm ${mactest_conf} +#mac_mls mac_biba and mac_test support + fi + ;; +*) + quick_exit + ;; +esac From owner-p4-projects@FreeBSD.ORG Fri Jan 4 07:56:29 2008 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id BD8F416A41B; Fri, 4 Jan 2008 07:56:28 +0000 (UTC) Delivered-To: perforce@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 6997716A419 for ; Fri, 4 Jan 2008 07:56:28 +0000 (UTC) (envelope-from jb@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id 59AA313C467 for ; Fri, 4 Jan 2008 07:56:28 +0000 (UTC) (envelope-from jb@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.1/8.14.1) with ESMTP id m047uSuq052334 for ; Fri, 4 Jan 2008 07:56:28 GMT (envelope-from jb@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.1/8.14.1/Submit) id m047uSfg052331 for perforce@freebsd.org; Fri, 4 Jan 2008 07:56:28 GMT (envelope-from jb@freebsd.org) Date: Fri, 4 Jan 2008 07:56:28 GMT Message-Id: <200801040756.m047uSfg052331@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to jb@freebsd.org using -f From: John Birrell To: Perforce Change Reviews Cc: Subject: PERFORCE change 132465 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 04 Jan 2008 07:56:29 -0000 http://perforce.freebsd.org/chv.cgi?CH=132465 Change 132465 by jb@jb_freebsd1 on 2008/01/04 07:55:55 Add some debug stuff. Add a missing function all. Comment out the toxic range stuff for now because it is not accurate. Affected files ... .. //depot/projects/dtrace/src/sys/contrib/opensolaris/uts/common/dtrace/dtrace.c#11 edit Differences ... ==== //depot/projects/dtrace/src/sys/contrib/opensolaris/uts/common/dtrace/dtrace.c#11 (text) ==== @@ -2616,6 +2616,7 @@ return (dtrace_getreg(lwp->lwp_regs, ndx)); #else +printf("%s(%d): DOODAD\n",__func__,__LINE__); return (0); #endif } @@ -2854,7 +2855,8 @@ (uintptr_t)curthread->t_procp->p_user.u_comm, state, mstate)); #else - return ((uint64_t)(uintptr_t) curthread->td_proc->p_comm); + return (dtrace_dif_varstr( + (uintptr_t) curthread->td_proc->p_comm, state, mstate)); #endif case DIF_VAR_ZONENAME: @@ -2993,6 +2995,7 @@ break; case DIF_SUBR_MUTEX_OWNED: +printf("%s(%d): DOODAD\n",__func__,__LINE__); #ifdef DOODAD union { if (!dtrace_canload(tupregs[0].dttk_value, sizeof (kmutex_t), @@ -3010,6 +3013,7 @@ break; case DIF_SUBR_MUTEX_OWNER: +printf("%s(%d): DOODAD\n",__func__,__LINE__); #ifdef DOODAD union { if (!dtrace_canload(tupregs[0].dttk_value, sizeof (kmutex_t), @@ -3028,6 +3032,7 @@ break; case DIF_SUBR_MUTEX_TYPE_ADAPTIVE: +printf("%s(%d): DOODAD\n",__func__,__LINE__); #ifdef DOODAD union { if (!dtrace_canload(tupregs[0].dttk_value, sizeof (kmutex_t), @@ -3042,6 +3047,7 @@ break; case DIF_SUBR_MUTEX_TYPE_SPIN: +printf("%s(%d): DOODAD\n",__func__,__LINE__); #ifdef DOODAD union { if (!dtrace_canload(tupregs[0].dttk_value, sizeof (kmutex_t), @@ -3056,6 +3062,7 @@ break; case DIF_SUBR_RW_READ_HELD: { +printf("%s(%d): DOODAD\n",__func__,__LINE__); #ifdef DOODAD union { uintptr_t tmp; @@ -3073,6 +3080,7 @@ } case DIF_SUBR_RW_WRITE_HELD: +printf("%s(%d): DOODAD\n",__func__,__LINE__); #ifdef DOODAD union { if (!dtrace_canload(tupregs[0].dttk_value, sizeof (krwlock_t), @@ -3087,6 +3095,7 @@ break; case DIF_SUBR_RW_ISWRITER: +printf("%s(%d): DOODAD\n",__func__,__LINE__); #ifdef DOODAD union { if (!dtrace_canload(tupregs[0].dttk_value, sizeof (krwlock_t), @@ -3210,6 +3219,7 @@ case DIF_SUBR_MSGSIZE: case DIF_SUBR_MSGDSIZE: { +printf("%s(%d): DOODAD\n",__func__,__LINE__); #ifdef DOODAD uintptr_t baddr = tupregs[0].dttk_value, daddr; uintptr_t wptr, rptr; @@ -3687,6 +3697,7 @@ } case DIF_SUBR_GETMAJOR: +printf("%s(%d): DOODAD\n",__func__,__LINE__); #ifdef DOODAD #ifdef _LP64 regs[rd] = (tupregs[0].dttk_value >> NBITSMINOR64) & MAXMAJ64; @@ -3697,6 +3708,7 @@ break; case DIF_SUBR_GETMINOR: +printf("%s(%d): DOODAD\n",__func__,__LINE__); #ifdef DOODAD #ifdef _LP64 regs[rd] = tupregs[0].dttk_value & MAXMIN64; @@ -3707,6 +3719,7 @@ break; case DIF_SUBR_DDI_PATHNAME: { +printf("%s(%d): DOODAD\n",__func__,__LINE__); #ifdef DOODAD /* * This one is a galactic mess. We are going to roughly @@ -4250,6 +4263,7 @@ case DIF_SUBR_INET_NTOA: case DIF_SUBR_INET_NTOA6: case DIF_SUBR_INET_NTOP: { +printf("%s(%d): DOODAD\n",__func__,__LINE__); #ifdef DOODAD size_t size; int af, argi, i; @@ -5306,6 +5320,7 @@ c[i++] = ')'; c[i] = '\0'; +printf("%s(%d): DOODAD\n",__func__,__LINE__); #ifdef DOODAD debug_enter(c); #endif @@ -5358,6 +5373,7 @@ if (curthread->t_dtrace_sig == 0) curthread->t_dtrace_sig = (uint8_t)sig; +printf("%s(%d): DOODAD\n",__func__,__LINE__); #ifdef DOODAD curthread->t_sig_check = 1; aston(curthread); @@ -5372,6 +5388,7 @@ if (!curthread->t_dtrace_stop) { curthread->t_dtrace_stop = 1; +printf("%s(%d): DOODAD\n",__func__,__LINE__); #ifdef DOODAD curthread->t_sig_check = 1; aston(curthread); @@ -5382,6 +5399,7 @@ static void dtrace_action_chill(dtrace_mstate_t *mstate, hrtime_t val) { +printf("%s(%d): DOODAD\n",__func__,__LINE__); #ifdef DOODAD hrtime_t now; volatile uint16_t *flags; @@ -5435,6 +5453,7 @@ dtrace_action_ustack(dtrace_mstate_t *mstate, dtrace_state_t *state, uint64_t *buf, uint64_t arg) { +printf("%s(%d): DOODAD\n",__func__,__LINE__); #ifdef DOODAD int nframes = DTRACE_USTACK_NFRAMES(arg); int strsize = DTRACE_USTACK_STRSIZE(arg); @@ -5705,6 +5724,7 @@ * profile case, the check above will ensure that * we're examining a user context. */ +printf("%s(%d): DOODAD\n",__func__,__LINE__); #ifdef DOODAD if (ecb->dte_cond & DTRACE_COND_OWNER) { cred_t *cr; @@ -12461,6 +12481,7 @@ * we can do destructive things to processes which * have altered credentials. */ +printf("%s(%d): DOODAD\n",__func__,__LINE__); #ifdef DOODAD if (priv_isequalset(priv_getset(cr, PRIV_EFFECTIVE), cr->cr_zone->zone_privset)) { @@ -12508,6 +12529,7 @@ * we can do destructive things to processes which * have altered credentials. */ +printf("%s(%d): DOODAD\n",__func__,__LINE__); #ifdef DOODAD if (priv_isequalset(priv_getset(cr, PRIV_EFFECTIVE), cr->cr_zone->zone_privset)) { @@ -14527,6 +14549,8 @@ static void dtrace_toxrange_add(uintptr_t base, uintptr_t limit) { +printf("%s(%d): DOODAD\n",__func__,__LINE__); +#ifdef DOODAD if (dtrace_toxranges >= dtrace_toxranges_max) { int osize, nsize; dtrace_toxrange_t *range; @@ -14559,6 +14583,7 @@ dtrace_toxrange[dtrace_toxranges].dtt_base = base; dtrace_toxrange[dtrace_toxranges].dtt_limit = limit; dtrace_toxranges++; +#endif } /* From owner-p4-projects@FreeBSD.ORG Fri Jan 4 08:01:34 2008 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 480AE16A41B; Fri, 4 Jan 2008 08:01:34 +0000 (UTC) Delivered-To: perforce@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 0DBFE16A417 for ; Fri, 4 Jan 2008 08:01:34 +0000 (UTC) (envelope-from zhouzhouyi@FreeBSD.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id F1BDE13C44B for ; Fri, 4 Jan 2008 08:01:33 +0000 (UTC) (envelope-from zhouzhouyi@FreeBSD.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.1/8.14.1) with ESMTP id m0481XUZ052577 for ; Fri, 4 Jan 2008 08:01:33 GMT (envelope-from zhouzhouyi@FreeBSD.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.1/8.14.1/Submit) id m0481XOS052574 for perforce@freebsd.org; Fri, 4 Jan 2008 08:01:33 GMT (envelope-from zhouzhouyi@FreeBSD.org) Date: Fri, 4 Jan 2008 08:01:33 GMT Message-Id: <200801040801.m0481XOS052574@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to zhouzhouyi@FreeBSD.org using -f From: Zhouyi ZHOU To: Perforce Change Reviews Cc: Subject: PERFORCE change 132466 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 04 Jan 2008 08:01:34 -0000 http://perforce.freebsd.org/chv.cgi?CH=132466 Change 132466 by zhouzhouyi@zhouzhouyi_mactest on 2008/01/04 08:00:34 kdb_enter needs two argument Affected files ... .. //depot/projects/soc2007/zhouzhouyi_mactest_soc/sys/security/mac_test/mac_test.c#18 edit Differences ... ==== //depot/projects/soc2007/zhouzhouyi_mactest_soc/sys/security/mac_test/mac_test.c#18 (text+ko) ==== @@ -171,7 +171,7 @@ #define COUNTER_INC1(variable) atomic_add_int(&counter_##variable, 1) #ifdef KDB -#define DEBUGGER(func, string) kdb_enter((string)) +#define DEBUGGER(func, string) kdb_enter(KDB_WHY_MAC,(string)) #else #define DEBUGGER(func, string) printf("mac_test: %s: %s\n", (func), (string)) #endif From owner-p4-projects@FreeBSD.ORG Fri Jan 4 08:43:18 2008 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 637D616A46B; Fri, 4 Jan 2008 08:43:18 +0000 (UTC) Delivered-To: perforce@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 1080016A468 for ; Fri, 4 Jan 2008 08:43:18 +0000 (UTC) (envelope-from andrew@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id F2B1A13C455 for ; Fri, 4 Jan 2008 08:43:17 +0000 (UTC) (envelope-from andrew@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.1/8.14.1) with ESMTP id m048hHSp056152 for ; Fri, 4 Jan 2008 08:43:17 GMT (envelope-from andrew@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.1/8.14.1/Submit) id m048hHTJ056148 for perforce@freebsd.org; Fri, 4 Jan 2008 08:43:17 GMT (envelope-from andrew@freebsd.org) Date: Fri, 4 Jan 2008 08:43:17 GMT Message-Id: <200801040843.m048hHTJ056148@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to andrew@freebsd.org using -f From: Andrew Turner To: Perforce Change Reviews Cc: Subject: PERFORCE change 132471 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 04 Jan 2008 08:43:18 -0000 http://perforce.freebsd.org/chv.cgi?CH=132471 Change 132471 by andrew@andrew_hermies on 2008/01/04 08:43:15 Rename the softc to be inline with the filename Rename p_bug to buf and p_spare to spare in s3c24x0_nand_read_page Remove s3c24x0_nand_read_spare as it was unused and was merged into s3c24x0_nand_read_page Affected files ... .. //depot/projects/arm/src/sys/arm/s3c2xx0/s3c24x0_nand.c#2 edit Differences ... ==== //depot/projects/arm/src/sys/arm/s3c2xx0/s3c24x0_nand.c#2 (text+ko) ==== @@ -53,7 +53,7 @@ #define NAND_CMD_BLKERASEC 0xd0 #define NAND_CMD_RESET 0xff -struct s3c2410_nand_softc { +struct s3c24x0_nand_softc { struct s3c2xx0_softc sc_sx; bus_space_handle_t sc_nand_ioh; @@ -89,10 +89,8 @@ static int s3c24x0_nand_attach(device_t); /* Internal functions */ -static int s3c24x0_nand_read_page(struct s3c2410_nand_softc*, int, +static int s3c24x0_nand_read_page(struct s3c24x0_nand_softc*, int, u_int8_t*, u_int8_t*); -//static int s3c24x0_nand_read_spare(struct s3c2410_nand_softc*, int, -// u_int8_t *); static d_strategy_t s3c24x0_nand_strategy; @@ -105,7 +103,7 @@ static driver_t nand_s3c2410_driver = { "nand", s3c2410_nand_methods, - sizeof(struct s3c2410_nand_softc), + sizeof(struct s3c24x0_nand_softc), }; static devclass_t nand_devclass; @@ -121,7 +119,7 @@ static int s3c24x0_nand_attach(device_t dev) { - struct s3c2410_nand_softc *sc = device_get_softc(dev); + struct s3c24x0_nand_softc *sc = device_get_softc(dev); const char *p = NULL; intrmask_t intr_mask; bus_space_handle_t ioh; @@ -229,18 +227,13 @@ for (block = 0; block < sc->blocks_disk; block++) { page = block * sc->pages_block; s3c24x0_nand_read_page(sc, page, NULL, spare); - //s3c24x0_nand_read_spare(sc, page, spare); if (spare[5] == 0xFF) { s3c24x0_nand_read_page(sc, page + (sc->data_size >> 8), NULL, spare); - //s3c24x0_nand_read_spare(sc, page + (sc->data_size >> 8), - // spare); if (spare[5] == 0xFF) { /* The block is good */ continue; } - } else { - printf("A: %X ", spare[0]); } printf("Bad block: %X\n", page); } @@ -290,12 +283,12 @@ static void s3c24x0_nand_strategy(struct bio *bp) { - struct s3c2410_nand_softc *sc; + struct s3c24x0_nand_softc *sc; u_long current_lblk, lpage, next_lblk, page, pagei; u_int8_t *p_data; long cnt; - sc = (struct s3c2410_nand_softc*)bp->bio_disk->d_drv1; + sc = (struct s3c24x0_nand_softc*)bp->bio_disk->d_drv1; if (sc == NULL) { bp->bio_error = EINVAL; goto bad; @@ -441,18 +434,17 @@ /* * Read a page from the NAND - * TODO: check if p_buf is NULL and skip the page if it is */ static int -s3c24x0_nand_read_page(struct s3c2410_nand_softc *sc, int page, - u_int8_t *p_buf, u_int8_t *p_spare) +s3c24x0_nand_read_page(struct s3c24x0_nand_softc *sc, int page, + u_int8_t *buf, u_int8_t *spare) { bus_space_handle_t ioh; bus_space_tag_t iot; intrmask_t intr_mask; int i; - KASSERT(p_buf != NULL || p_spare != NULL, + KASSERT(buf != NULL || spare != NULL, ("s3c24x0_nand_read_page: nothing to read")); ioh = sc->sc_nand_ioh; @@ -463,7 +455,7 @@ /* Issue the command read the page */ bus_space_write_1(iot, ioh, NANDFC_NFCMD, - (p_buf != NULL) ? NAND_CMD_READ0 : NAND_CMD_READ2); + (buf != NULL) ? NAND_CMD_READ0 : NAND_CMD_READ2); /* Output the address */ bus_space_write_1(iot, ioh, NANDFC_NFADDR, 0x00); @@ -487,16 +479,16 @@ DELAY(12); /* Enter a loop to read the bytes from the page */ - if (p_buf != NULL) { + if (buf != NULL) { for (i = 0; i < sc->data_size; i++) { - p_buf[i] = bus_space_read_1(iot, ioh, NANDFC_NFDATA); + buf[i] = bus_space_read_1(iot, ioh, NANDFC_NFDATA); } } /* Check if the spare data area is to be read too */ - if (p_spare != NULL) { + if (spare != NULL) { for (i = 0; i < sc->spare_size; i++) { - p_spare[i] = bus_space_read_1(iot, ioh, NANDFC_NFDATA); + spare[i] = bus_space_read_1(iot, ioh, NANDFC_NFDATA); } } @@ -505,49 +497,4 @@ return(0); } -#if 0 -static int -s3c24x0_nand_read_spare(struct s3c2410_nand_softc *sc, int page, - u_int8_t *p_buf) -{ - bus_space_handle_t ioh; - bus_space_tag_t iot; - intrmask_t intr_mask; - int i; - - ioh = sc->sc_nand_ioh; - iot = sc->sc_sx.sc_iot; - - intr_mask = splbio(); - - /* Issue the command to read the spare area */ - bus_space_write_1(iot, ioh, NANDFC_NFCMD, NAND_CMD_READ2); - - /* Set the address */ - bus_space_write_1(iot, ioh, NANDFC_NFADDR, 0x00); - bus_space_write_1(iot, ioh, NANDFC_NFADDR, page & 0xff); - bus_space_write_1(iot, ioh, NANDFC_NFADDR, (page >> 8) & 0xff); - - /* Check if a 4th address cycle is required */ - /* TODO: Fix the if statement */ - //if (sc->device_type >= 64) { - /* Output the 4th address cycle */ - // bus_space_write_1(iot, ioh, NANDFC_NFADDR, (page >> 16) & 0xff); - //} - - /* The maximum time (tR) for data transfer from the cell to the register is 12 microseconds */ - DELAY(12); - - /* Enter a loop to read the bytes from the spare area */ - for (i = 0; i < sc->spare_size; i++) { - /* Read the next byte */ - p_buf[i] = bus_space_read_1(iot, ioh, NANDFC_NFDATA); - } - - splx(intr_mask); - - return (0); -} -#endif - DRIVER_MODULE(nand, s3c2410, nand_s3c2410_driver, nand_devclass, 0, 0); From owner-p4-projects@FreeBSD.ORG Fri Jan 4 09:05:43 2008 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 1726A16A46C; Fri, 4 Jan 2008 09:05:43 +0000 (UTC) Delivered-To: perforce@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id CEFA016A421 for ; Fri, 4 Jan 2008 09:05:42 +0000 (UTC) (envelope-from kmacy@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id BD67813C459 for ; Fri, 4 Jan 2008 09:05:42 +0000 (UTC) (envelope-from kmacy@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.1/8.14.1) with ESMTP id m0495gaf067147 for ; Fri, 4 Jan 2008 09:05:42 GMT (envelope-from kmacy@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.1/8.14.1/Submit) id m0495g02067127 for perforce@freebsd.org; Fri, 4 Jan 2008 09:05:42 GMT (envelope-from kmacy@freebsd.org) Date: Fri, 4 Jan 2008 09:05:42 GMT Message-Id: <200801040905.m0495g02067127@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to kmacy@freebsd.org using -f From: Kip Macy To: Perforce Change Reviews Cc: Subject: PERFORCE change 132473 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 04 Jan 2008 09:05:43 -0000 http://perforce.freebsd.org/chv.cgi?CH=132473 Change 132473 by kmacy@pandemonium:kmacy:xen31 on 2008/01/04 09:04:42 - pull in most recent public xen headers from hg - set interface version to immediately prior to addition of hyperpage - update grant table interface to provide runtime sized grant tables - add virtual network interface to build and bring it more in line with latest linux version Affected files ... .. //depot/projects/xen31/sys/conf/files#13 edit .. //depot/projects/xen31/sys/dev/xen/blkfront/block.h#3 edit .. //depot/projects/xen31/sys/dev/xen/console/xencons_ring.c#5 edit .. //depot/projects/xen31/sys/dev/xen/netfront/mbufq.h#1 add .. //depot/projects/xen31/sys/dev/xen/netfront/netfront.c#2 edit .. //depot/projects/xen31/sys/i386/i386/trap.c#6 edit .. //depot/projects/xen31/sys/i386/i386/vm_machdep.c#5 edit .. //depot/projects/xen31/sys/i386/include/cpufunc.h#6 edit .. //depot/projects/xen31/sys/i386/include/pmap.h#8 edit .. //depot/projects/xen31/sys/i386/include/xen/evtchn.h#5 edit .. //depot/projects/xen31/sys/i386/include/xen/features.h#1 add .. //depot/projects/xen31/sys/i386/include/xen/hypercall.h#5 edit .. //depot/projects/xen31/sys/i386/include/xen/hypervisor-ifs.h#3 edit .. //depot/projects/xen31/sys/i386/include/xen/hypervisor.h#3 edit .. //depot/projects/xen31/sys/i386/include/xen/xen-os.h#4 edit .. //depot/projects/xen31/sys/i386/include/xen/xen-public/COPYING#1 add .. //depot/projects/xen31/sys/i386/include/xen/xen-public/acm.h#2 edit .. //depot/projects/xen31/sys/i386/include/xen/xen-public/acm_ops.h#2 edit .. //depot/projects/xen31/sys/i386/include/xen/xen-public/arch-ia64.h#2 edit .. //depot/projects/xen31/sys/i386/include/xen/xen-public/arch-powerpc.h#1 add .. //depot/projects/xen31/sys/i386/include/xen/xen-public/arch-x86/xen-x86_32.h#1 add .. //depot/projects/xen31/sys/i386/include/xen/xen-public/arch-x86/xen-x86_64.h#1 add .. //depot/projects/xen31/sys/i386/include/xen/xen-public/arch-x86/xen.h#1 add .. //depot/projects/xen31/sys/i386/include/xen/xen-public/arch-x86_32.h#4 edit .. //depot/projects/xen31/sys/i386/include/xen/xen-public/arch-x86_64.h#2 edit .. //depot/projects/xen31/sys/i386/include/xen/xen-public/callback.h#1 add .. //depot/projects/xen31/sys/i386/include/xen/xen-public/dom0_ops.h#3 edit .. //depot/projects/xen31/sys/i386/include/xen/xen-public/domctl.h#1 add .. //depot/projects/xen31/sys/i386/include/xen/xen-public/elfstructs.h#1 add .. //depot/projects/xen31/sys/i386/include/xen/xen-public/event_channel.h#3 edit .. //depot/projects/xen31/sys/i386/include/xen/xen-public/features.h#2 edit .. //depot/projects/xen31/sys/i386/include/xen/xen-public/foreign/Makefile#1 add .. //depot/projects/xen31/sys/i386/include/xen/xen-public/foreign/mkchecker.py#1 add .. //depot/projects/xen31/sys/i386/include/xen/xen-public/foreign/mkheader.py#1 add .. //depot/projects/xen31/sys/i386/include/xen/xen-public/foreign/reference.size#1 add .. //depot/projects/xen31/sys/i386/include/xen/xen-public/foreign/structs.py#1 add .. //depot/projects/xen31/sys/i386/include/xen/xen-public/grant_table.h#4 edit .. //depot/projects/xen31/sys/i386/include/xen/xen-public/hvm/e820.h#1 add .. //depot/projects/xen31/sys/i386/include/xen/xen-public/hvm/hvm_info_table.h#1 add .. //depot/projects/xen31/sys/i386/include/xen/xen-public/hvm/hvm_op.h#1 add .. //depot/projects/xen31/sys/i386/include/xen/xen-public/hvm/ioreq.h#1 add .. //depot/projects/xen31/sys/i386/include/xen/xen-public/hvm/params.h#1 add .. //depot/projects/xen31/sys/i386/include/xen/xen-public/hvm/save.h#1 add .. //depot/projects/xen31/sys/i386/include/xen/xen-public/hvm/vmx_assist.h#1 add .. //depot/projects/xen31/sys/i386/include/xen/xen-public/io/blkif.h#2 edit .. //depot/projects/xen31/sys/i386/include/xen/xen-public/io/console.h#2 edit .. //depot/projects/xen31/sys/i386/include/xen/xen-public/io/fbif.h#1 add .. //depot/projects/xen31/sys/i386/include/xen/xen-public/io/kbdif.h#1 add .. //depot/projects/xen31/sys/i386/include/xen/xen-public/io/netif.h#2 edit .. //depot/projects/xen31/sys/i386/include/xen/xen-public/io/pciif.h#1 add .. //depot/projects/xen31/sys/i386/include/xen/xen-public/io/protocols.h#1 add .. //depot/projects/xen31/sys/i386/include/xen/xen-public/io/ring.h#2 edit .. //depot/projects/xen31/sys/i386/include/xen/xen-public/io/tpmif.h#1 add .. //depot/projects/xen31/sys/i386/include/xen/xen-public/io/xs_wire.h#2 edit .. //depot/projects/xen31/sys/i386/include/xen/xen-public/kexec.h#1 add .. //depot/projects/xen31/sys/i386/include/xen/xen-public/libelf.h#1 add .. //depot/projects/xen31/sys/i386/include/xen/xen-public/memory.h#3 edit .. //depot/projects/xen31/sys/i386/include/xen/xen-public/nmi.h#2 edit .. //depot/projects/xen31/sys/i386/include/xen/xen-public/platform.h#1 add .. //depot/projects/xen31/sys/i386/include/xen/xen-public/sched.h#3 edit .. //depot/projects/xen31/sys/i386/include/xen/xen-public/sched_ctl.h#2 delete .. //depot/projects/xen31/sys/i386/include/xen/xen-public/sysctl.h#1 add .. //depot/projects/xen31/sys/i386/include/xen/xen-public/trace.h#2 edit .. //depot/projects/xen31/sys/i386/include/xen/xen-public/version.h#2 edit .. //depot/projects/xen31/sys/i386/include/xen/xen-public/xen-compat.h#3 edit .. //depot/projects/xen31/sys/i386/include/xen/xen-public/xen.h#5 edit .. //depot/projects/xen31/sys/i386/include/xen/xen-public/xencomm.h#1 add .. //depot/projects/xen31/sys/i386/include/xen/xen-public/xenoprof.h#1 add .. //depot/projects/xen31/sys/i386/include/xen/xenpmap.h#6 edit .. //depot/projects/xen31/sys/i386/include/xen/xenvar.h#5 edit .. //depot/projects/xen31/sys/i386/isa/npx.c#3 edit .. //depot/projects/xen31/sys/i386/xen/pmap.c#11 edit .. //depot/projects/xen31/sys/i386/xen/xen_machdep.c#12 edit .. //depot/projects/xen31/sys/sys/cdefs.h#3 edit .. //depot/projects/xen31/sys/xen/evtchn/evtchn_dev.c#2 edit .. //depot/projects/xen31/sys/xen/gnttab.c#3 edit .. //depot/projects/xen31/sys/xen/gnttab.h#2 edit .. //depot/projects/xen31/sys/xen/xenbus/xenbus_xs.c#9 edit Differences ... ==== //depot/projects/xen31/sys/conf/files#13 (text+ko) ==== @@ -2110,6 +2110,7 @@ vm/vm_zeroidle.c standard vm/vnode_pager.c standard xen/gnttab.c optional xen +xen/features.c optional xen xen/evtchn/evtchn.c optional xen xen/evtchn/evtchn_dev.c optional xen xen/xenbus/xenbus_client.c optional xen @@ -2121,6 +2122,7 @@ dev/xen/console/console.c optional xen dev/xen/console/xencons_ring.c optional xen dev/xen/blkfront/blkfront.c optional xen +dev/xen/netfront/netfront.c optional xen # gnu/fs/xfs/xfs_alloc.c optional xfs \ ==== //depot/projects/xen31/sys/dev/xen/blkfront/block.h#3 (text+ko) ==== @@ -1,5 +1,6 @@ #ifndef __XEN_DRIVERS_BLOCK_H__ #define __XEN_DRIVERS_BLOCK_H__ +#include struct xlbd_type_info { ==== //depot/projects/xen31/sys/dev/xen/console/xencons_ring.c#5 (text+ko) ==== @@ -21,6 +21,7 @@ #include +#include #include ==== //depot/projects/xen31/sys/dev/xen/netfront/netfront.c#2 (text+ko) ==== @@ -39,6 +39,7 @@ #include #include #include +#include #include #include @@ -54,20 +55,37 @@ #include -#include -#include -#include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + #define GRANT_INVALID_REF 0 #define NET_TX_RING_SIZE __RING_SIZE((netif_tx_sring_t *)0, PAGE_SIZE) #define NET_RX_RING_SIZE __RING_SIZE((netif_rx_sring_t *)0, PAGE_SIZE) +#ifdef CONFIG_XEN +static int MODPARM_rx_copy = 0; +module_param_named(rx_copy, MODPARM_rx_copy, bool, 0); +MODULE_PARM_DESC(rx_copy, "Copy packets from network card (rather than flip)"); +static int MODPARM_rx_flip = 0; +module_param_named(rx_flip, MODPARM_rx_flip, bool, 0); +MODULE_PARM_DESC(rx_flip, "Flip packets from network card (rather than copy)"); +#else +static const int MODPARM_rx_copy = 1; +static const int MODPARM_rx_flip = 0; +#endif + +#define RX_COPY_THRESHOLD 256 struct netfront_info; static void xn_txeof(struct netfront_info *); @@ -89,18 +107,20 @@ #endif static void show_device(struct netfront_info *sc); +#ifdef notyet static void netfront_closing(struct xenbus_device *dev); +#endif static void netif_free(struct netfront_info *info); static int netfront_remove(struct xenbus_device *dev); static int talk_to_backend(struct xenbus_device *dev, struct netfront_info *info); -static int create_netdev(int handle, struct xenbus_device *dev, struct ifnet **ifp); +static int create_netdev(struct xenbus_device *dev, struct ifnet **ifp); static void netif_disconnect_backend(struct netfront_info *info); static int setup_device(struct xenbus_device *dev, struct netfront_info *info); static void end_access(int ref, void *page); /* Xenolinux helper functions */ -static void network_connect(struct ifnet *ifp); +static int network_connect(struct ifnet *ifp); static void xn_free_rx_ring(struct netfront_info *); @@ -118,7 +138,7 @@ * not the other way around. The size must track the free index arrays. */ struct xn_chain_data { - struct mbuf *xn_tx_chain[NET_TX_RING_SIZE+1]; + struct mbuf *xn_tx_chain[NET_TX_RING_SIZE+1]; struct mbuf *xn_rx_chain[NET_RX_RING_SIZE+1]; }; @@ -160,75 +180,67 @@ unsigned long tx_compressed; }; -struct netfront_info -{ - struct ifnet *xn_ifp; +struct netfront_info { + + struct ifnet *xn_ifp; - struct net_device_stats stats; - unsigned int tx_full; + struct net_device_stats stats; + unsigned int tx_full; - netif_tx_front_ring_t tx; - netif_rx_front_ring_t rx; + netif_tx_front_ring_t tx; + netif_rx_front_ring_t rx; - struct mtx tx_lock; - struct mtx rx_lock; + struct mtx tx_lock; + struct mtx rx_lock; - unsigned int handle; - unsigned int evtchn, irq; - - /* What is the status of our connection to the remote backend? */ -#define BEST_CLOSED 0 -#define BEST_DISCONNECTED 1 -#define BEST_CONNECTED 2 - unsigned int backend_state; - - /* Is this interface open or closed (down or up)? */ -#define UST_CLOSED 0 -#define UST_OPEN 1 - unsigned int user_state; - + unsigned int handle; + unsigned int irq; + unsigned int copying_receiver; + unsigned int carrier; + /* Receive-ring batched refills. */ #define RX_MIN_TARGET 32 #define RX_MAX_TARGET NET_RX_RING_SIZE - int rx_min_target, rx_max_target, rx_target; + int rx_min_target, rx_max_target, rx_target; - /* - * {tx,rx}_skbs store outstanding skbuffs. The first entry in each - * array is an index into a chain of free entries. - */ + /* + * {tx,rx}_skbs store outstanding skbuffs. The first entry in each + * array is an index into a chain of free entries. + */ - grant_ref_t gref_tx_head; - grant_ref_t grant_tx_ref[NET_TX_RING_SIZE + 1]; - grant_ref_t gref_rx_head; - grant_ref_t grant_rx_ref[NET_TX_RING_SIZE + 1]; + grant_ref_t gref_tx_head; + grant_ref_t grant_tx_ref[NET_TX_RING_SIZE + 1]; + grant_ref_t gref_rx_head; + grant_ref_t grant_rx_ref[NET_TX_RING_SIZE + 1]; - struct xenbus_device *xbdev; - int tx_ring_ref; - int rx_ring_ref; - uint8_t mac[ETHER_ADDR_LEN]; - struct xn_chain_data xn_cdata; /* mbufs */ +#define TX_MAX_TARGET min(NET_RX_RING_SIZE, 256) + struct xenbus_device *xbdev; + int tx_ring_ref; + int rx_ring_ref; + uint8_t mac[ETHER_ADDR_LEN]; + struct xn_chain_data xn_cdata; /* mbufs */ unsigned short xn_rx_free_idxs[NET_RX_RING_SIZE+1]; unsigned short xn_tx_free_idxs[NET_RX_RING_SIZE+1]; - struct mbuf *xn_rx_batch; /* head of the batch queue */ - struct mbuf *xn_rx_batchtail; - int xn_rx_batchlen; /* how many queued */ - int xn_if_flags; - struct callout xn_stat_ch; + struct mbuf_head xn_rx_batch; /* head of the batch queue */ + int xn_if_flags; + struct callout xn_stat_ch; }; +#define rx_mbufs xn_cdata.xn_rx_chain +#define tx_mbufs xn_cdata.xn_tx_chain #define XN_LOCK_INIT(_sc, _name) \ - mtx_init(&(_sc)->tx_lock, #_name"_tx", "network transmit lock", MTX_SPIN); \ - mtx_init(&(_sc)->rx_lock, #_name"_rx", "network receive lock", MTX_SPIN); -#define XN_RX_LOCK(_sc) mtx_lock_spin(&(_sc)->rx_lock) -#define XN_RX_UNLOCK(_sc) mtx_unlock_spin(&(_sc)->rx_lock) -#define XN_TX_LOCK(_sc) mtx_lock_spin(&(_sc)->tx_lock) -#define XN_TX_UNLOCK(_sc) mtx_unlock_spin(&(_sc)->tx_lock) -#define XN_LOCK(_sc) mtx_lock_spin(&(_sc)->tx_lock); \ - mtx_lock_spin(&(_sc)->rx_lock); -#define XN_UNLOCK(_sc) mtx_unlock_spin(&(_sc)->rx_lock); \ - mtx_unlock_spin(&(_sc)->tx_lock) + mtx_init(&(_sc)->tx_lock, #_name"_tx", "network transmit lock", MTX_DEF); \ + mtx_init(&(_sc)->rx_lock, #_name"_rx", "network receive lock", MTX_DEF); +#define XN_RX_LOCK(_sc) mtx_lock(&(_sc)->rx_lock) +#define XN_RX_UNLOCK(_sc) mtx_unlock(&(_sc)->rx_lock) +#define XN_TX_LOCK(_sc) mtx_lock(&(_sc)->tx_lock) +#define XN_TX_UNLOCK(_sc) mtx_unlock(&(_sc)->tx_lock) +#define XN_LOCK(_sc) mtx_lock(&(_sc)->tx_lock); \ + mtx_lock(&(_sc)->rx_lock); +#define XN_UNLOCK(_sc) mtx_unlock(&(_sc)->rx_lock); \ + mtx_unlock(&(_sc)->tx_lock) #define XN_LOCK_ASSERT(_sc) mtx_assert(&(_sc)->rx_lock, MA_OWNED); \ mtx_assert(&(_sc)->tx_lock, MA_OWNED); #define XN_RX_LOCK_ASSERT(_sc) mtx_assert(&(_sc)->rx_lock, MA_OWNED); @@ -236,22 +248,62 @@ #define XN_LOCK_DESTROY(_sc) mtx_destroy(&(_sc)->rx_lock); \ mtx_destroy(&(_sc)->tx_lock); +#define netfront_carrier_on(netif) ((netif)->carrier = 1) +#define netfront_carrier_off(netif) ((netif)->carrier = 0) +#define netfront_carrier_ok(netif) ((netif)->carrier) + /* Access macros for acquiring freeing slots in xn_free_{tx,rx}_idxs[]. */ -#define ADD_ID_TO_FREELIST(_list, _id) \ - (_list)[(_id)] = (_list)[0]; \ - (_list)[0] = (_id); -#define GET_ID_FROM_FREELIST(_list) \ - ({ unsigned short _id = (_list)[0]; \ - (_list)[0] = (_list)[_id]; \ - (unsigned short)_id; }) -#define FREELIST_EMPTY(_list, _maxid) \ - ((_list)[0] == (_maxid+1)) + + + +/* + * Access macros for acquiring freeing slots in tx_skbs[]. + */ + +static inline void +add_id_to_freelist(struct mbuf **list, unsigned short id) +{ + list[id] = list[0]; + list[0] = (void *)(unsigned long)id; +} + +static inline unsigned short +get_id_from_freelist(struct mbuf **list) +{ + unsigned int id = (unsigned int)(unsigned long)list[0]; + list[0] = list[id]; + return (id); +} + +static inline int +xennet_rxidx(RING_IDX idx) +{ + return idx & (NET_RX_RING_SIZE - 1); +} + +static inline struct mbuf * +xennet_get_rx_mbuf(struct netfront_info *np, + RING_IDX ri) +{ + int i = xennet_rxidx(ri); + struct mbuf *m; + + m = np->rx_mbufs[i]; + np->rx_mbufs[i] = NULL; + return (m); +} + +static inline grant_ref_t +xennet_get_rx_ref(struct netfront_info *np, RING_IDX ri) +{ + int i = xennet_rxidx(ri); + grant_ref_t ref = np->grant_rx_ref[i]; + np->grant_rx_ref[i] = GRANT_INVALID_REF; + return ref; +} + #ifdef DEBUG -static char *be_state_name[] = { - [BEST_CLOSED] = "closed", - [BEST_DISCONNECTED] = "disconnected", - [BEST_CONNECTED] = "connected", -}; + #endif #define IPRINTK(fmt, args...) \ printf("[XEN] " fmt, ##args) @@ -269,15 +321,19 @@ if (! m) return 0; - - M_MOVE_PKTHDR(m, buf); + + M_MOVE_PKTHDR(m, buf); MCLGET (m, M_DONTWAIT); m->m_pkthdr.len = buf->m_pkthdr.len; m->m_len = buf->m_len; - m_copydata(buf, 0, buf->m_pkthdr.len, mtod(m,caddr_t) ); - m->m_ext.ext_args = (vm_paddr_t *)vtophys(mtod(m,caddr_t)); + m_copydata(buf, 0, buf->m_pkthdr.len, mtod(m,caddr_t) ); + /* + * XXX this will break on > 4GB + * + */ + m->m_ext.ext_args = (caddr_t *)(uintptr_t)vtophys(mtod(m,caddr_t)); return m; } @@ -294,7 +350,7 @@ char *s; int i; char *e; - char *macstr = xenbus_read(NULL, dev->nodename, "mac", NULL); + char *macstr = xenbus_read(XBT_NIL, dev->nodename, "mac", NULL); if (IS_ERR(macstr)) { return PTR_ERR(macstr); } @@ -323,27 +379,20 @@ int err; struct ifnet *ifp; struct netfront_info *info; - unsigned int handle; - - err = xenbus_scanf(NULL, dev->nodename, "handle", "%u", &handle); - if (err != 1) { - xenbus_dev_fatal(dev, err, "reading handle"); - return err; - } - err = create_netdev(handle, dev, &ifp); + err = create_netdev(dev, &ifp); if (err) { xenbus_dev_fatal(dev, err, "creating netdev"); return err; } info = ifp->if_softc; - dev->data = info; + dev->dev_driver_data = info; err = talk_to_backend(dev, info); if (err) { free(info, M_DEVBUF); - dev->data = NULL; + dev->dev_driver_data = NULL; return err; } @@ -360,7 +409,7 @@ static int netfront_resume(struct xenbus_device *dev) { - struct netfront_info *info = dev->data; + struct netfront_info *info = dev->dev_driver_data; DPRINTK("%s\n", dev->nodename); @@ -374,21 +423,26 @@ talk_to_backend(struct xenbus_device *dev, struct netfront_info *info) { const char *message; - struct xenbus_transaction *xbt; + struct xenbus_transaction xbt; int err; - + + err = xen_net_read_mac(dev, info->mac); + if (err) { + xenbus_dev_fatal(dev, err, "parsing %s/mac", dev->nodename); + goto out; + } + /* Create shared ring, alloc event channel. */ err = setup_device(dev, info); if (err) goto out; again: - xbt = xenbus_transaction_start(); - if (IS_ERR(xbt)) { + err = xenbus_transaction_start(&xbt); + if (err) { xenbus_dev_fatal(dev, err, "starting transaction"); goto destroy_ring; } - err = xenbus_printf(xbt, dev->nodename, "tx-ring-ref","%u", info->tx_ring_ref); if (err) { @@ -402,18 +456,35 @@ goto abort_transaction; } err = xenbus_printf(xbt, dev->nodename, - "event-channel", "%u", info->evtchn); + "event-channel", "%u", irq_to_evtchn_port(info->irq)); if (err) { message = "writing event-channel"; goto abort_transaction; } + err = xenbus_printf(xbt, dev->nodename, "request-rx-copy", "%u", + info->copying_receiver); + if (err) { + message = "writing request-rx-copy"; + goto abort_transaction; + } - err = xenbus_printf(xbt, dev->nodename, - "state", "%d", XenbusStateConnected); + err = xenbus_printf(xbt, dev->nodename, "feature-rx-notify", "%d", 1); + if (err) { + message = "writing feature-rx-notify"; + goto abort_transaction; + } + err = xenbus_printf(xbt, dev->nodename, "feature-sg", "%d", 1); + if (err) { + message = "writing feature-sg"; + goto abort_transaction; + } +#ifdef HAVE_TSO + err = xenbus_printf(xbt, dev->nodename, "feature-gso-tcpv4", "%d", 1); if (err) { - message = "writing frontend XenbusStateConnected"; + message = "writing feature-gso-tcpv4"; goto abort_transaction; } +#endif err = xenbus_transaction_end(xbt, 0); if (err) { @@ -451,47 +522,47 @@ info->tx.sring = NULL; info->irq = 0; - txs = (netif_tx_sring_t *)malloc(PAGE_SIZE, M_DEVBUF, M_NOWAIT); + txs = (netif_tx_sring_t *)malloc(PAGE_SIZE, M_DEVBUF, M_NOWAIT|M_ZERO); if (!txs) { err = ENOMEM; xenbus_dev_fatal(dev, err, "allocating tx ring page"); goto fail; } - rxs = (netif_rx_sring_t *)malloc(PAGE_SIZE, M_DEVBUF, M_NOWAIT); + SHARED_RING_INIT(txs); + FRONT_RING_INIT(&info->tx, txs, PAGE_SIZE); + err = xenbus_grant_ring(dev, virt_to_mfn(txs)); + if (err < 0) + goto fail; + info->tx_ring_ref = err; + + + rxs = (netif_rx_sring_t *)malloc(PAGE_SIZE, M_DEVBUF, M_NOWAIT|M_ZERO); if (!rxs) { err = ENOMEM; xenbus_dev_fatal(dev, err, "allocating rx ring page"); goto fail; } - memset(txs, 0, PAGE_SIZE); - memset(rxs, 0, PAGE_SIZE); - info->backend_state = BEST_DISCONNECTED; - - SHARED_RING_INIT(txs); - FRONT_RING_INIT(&info->tx, txs, PAGE_SIZE); - SHARED_RING_INIT(rxs); FRONT_RING_INIT(&info->rx, rxs, PAGE_SIZE); - err = xenbus_grant_ring(dev, virt_to_mfn(txs)); - if (err < 0) - goto fail; - info->tx_ring_ref = err; - err = xenbus_grant_ring(dev, virt_to_mfn(rxs)); if (err < 0) goto fail; info->rx_ring_ref = err; - err = xenbus_alloc_evtchn(dev, &info->evtchn); - if (err) - goto fail; - +#if 0 network_connect(ifp); +#endif + err = bind_listening_port_to_irqhandler(dev->otherend_id, + "xn", xn_intr, info, INTR_TYPE_NET | INTR_MPSAFE, NULL); - info->irq = bind_evtchn_to_irqhandler( - info->evtchn, "xn", xn_intr, info, INTR_TYPE_NET | INTR_MPSAFE, NULL); - + if (err <= 0) { + xenbus_dev_fatal(dev, err, + "bind_evtchn_to_irqhandler failed"); + goto fail; + } + info->irq = err; + show_device(info); return 0; @@ -508,26 +579,34 @@ static void backend_changed(struct xenbus_device *dev, XenbusState backend_state) { + struct netfront_info *sc = dev->dev_driver_data; + DPRINTK("\n"); + switch (backend_state) { case XenbusStateInitialising: - case XenbusStateInitWait: case XenbusStateInitialised: case XenbusStateConnected: case XenbusStateUnknown: case XenbusStateClosed: - break; - + break; + case XenbusStateInitWait: + if (dev->state != XenbusStateInitialising) + break; + if (network_connect(sc->xn_ifp) != 0) + break; + xenbus_switch_state(dev, XenbusStateConnected); +#ifdef notyet + (void)send_fake_arp(netdev); +#endif + break; break; case XenbusStateClosing: - netfront_closing(dev); + xenbus_frontend_closed(dev); break; } } - - - static void xn_free_rx_ring(struct netfront_info *sc) { @@ -564,19 +643,52 @@ #endif } +static inline int +netfront_tx_slot_available(struct netfront_info *np) +{ + return ((np->tx.req_prod_pvt - np->tx.rsp_cons) < + (TX_MAX_TARGET - /* MAX_SKB_FRAGS */ 24 - 2)); +} +static void +netif_release_tx_bufs(struct netfront_info *np) +{ + struct mbuf *m; + int i; + + for (i = 1; i <= NET_TX_RING_SIZE; i++) { + m = np->xn_cdata.xn_tx_chain[i]; + + if (m == NULL) + continue; + gnttab_grant_foreign_access_ref( + np->grant_tx_ref[i], np->xbdev->otherend_id, + virt_to_mfn(mtod(m, vm_offset_t)), + GNTMAP_readonly); + gnttab_release_grant_reference( + &np->gref_tx_head, np->grant_tx_ref[i]); + np->grant_tx_ref[i] = GRANT_INVALID_REF; + add_id_to_freelist(np->tx_mbufs, i); + m_freem(m); + } +} + static void network_alloc_rx_buffers(struct netfront_info *sc) { unsigned short id; - struct mbuf *m_new, *next; - int i, batch_target; + struct mbuf *m_new; + int i, batch_target, notify; RING_IDX req_prod; struct xen_memory_reservation reservation; grant_ref_t ref; + int nr_flips; + netif_rx_request_t *req; + vm_offset_t vaddr; + unsigned long pfn; + + req_prod = sc->rx.req_prod_pvt; - req_prod = sc->rx.req_prod_pvt; - - if (unlikely(sc->backend_state != BEST_CONNECTED) ) + if (unlikely(sc->carrier == 0)) return; /* @@ -586,110 +698,136 @@ * ourself and for other kernel subsystems. */ batch_target = sc->rx_target - (req_prod - sc->rx.rsp_cons); - for (i = sc->xn_rx_batchlen; i < batch_target; i++, sc->xn_rx_batchlen++) { + for (i = mbufq_len(&sc->xn_rx_batch); i < batch_target; i++) { MGETHDR(m_new, M_DONTWAIT, MT_DATA); if (m_new == NULL) - break; - - MCLGET(m_new, M_DONTWAIT); - if (!(m_new->m_flags & M_EXT)) { - m_freem(m_new); - break; + goto no_mbuf; + + m_cljget(m_new, M_DONTWAIT, MJUMPAGESIZE); + if ((m_new->m_flags & M_EXT) == 0) { + m_freem(m_new); + +no_mbuf: + if (i != 0) + goto refill; + /* + * XXX set timer + */ + break; } - m_new->m_len = m_new->m_pkthdr.len = MCLBYTES; + m_new->m_len = m_new->m_pkthdr.len = MJUMPAGESIZE; /* queue the mbufs allocated */ - if (!sc->xn_rx_batch) - sc->xn_rx_batch = m_new; - - if (sc->xn_rx_batchtail) - sc->xn_rx_batchtail->m_next = m_new; - sc->xn_rx_batchtail = m_new; + mbufq_tail(&sc->xn_rx_batch, m_new); } /* Is the batch large enough to be worthwhile? */ - if ( i < (sc->rx_target/2) ) - return; - - for (i = 0, m_new = sc->xn_rx_batch; m_new; - i++, sc->xn_rx_batchlen--, m_new = next) { + if (i < (sc->rx_target/2)) { + if (req_prod >sc->rx.sring->req_prod) + goto push; + return; + } + /* Adjust our floating fill target if we risked running out of buffers. */ + if ( ((req_prod - sc->rx.sring->rsp_prod) < (sc->rx_target / 4)) && + ((sc->rx_target *= 2) > sc->rx_max_target) ) + sc->rx_target = sc->rx_max_target; - next = m_new->m_next; - m_new->m_next = NULL; +refill: + for (nr_flips = i = 0; ; i++) { + if ((m_new = mbufq_dequeue(&sc->xn_rx_batch)) == NULL) + break; - m_new->m_ext.ext_args = (vm_paddr_t *)vtophys(m_new->m_ext.ext_buf); + m_new->m_ext.ext_args = (vm_paddr_t *)(uintptr_t)vtophys(m_new->m_ext.ext_buf); + id = xennet_rxidx(req_prod + 1); + + KASSERT(id != 0, ("alloc_rx_buffers: found free receive index of 0\n")); + PANIC_IF(sc->xn_cdata.xn_rx_chain[id] != NULL); + sc->xn_cdata.xn_rx_chain[id] = m_new; - id = GET_ID_FROM_FREELIST(sc->xn_rx_free_idxs); - KASSERT(id != 0, ("alloc_rx_buffers: found free receive index of 0\n")); - sc->xn_cdata.xn_rx_chain[id] = m_new; + ref = gnttab_claim_grant_reference(&sc->gref_rx_head); + PANIC_IF((signed short)ref < 0); + sc->grant_rx_ref[id] = ref; + + vaddr = mtod(m_new, vm_offset_t); + pfn = vtophys(vaddr) >> PAGE_SHIFT; + req = RING_GET_REQUEST(&sc->rx, req_prod + i); + + if (sc->copying_receiver == 0) { + gnttab_grant_foreign_transfer_ref(ref, + sc->xbdev->otherend_id, + pfn); + rx_pfn_array[nr_flips] = PFNTOMFN(pfn); + if (!xen_feature(XENFEAT_auto_translated_physmap)) { + /* Remove this page before passing + * back to Xen. + */ + set_phys_to_machine(pfn, INVALID_P2M_ENTRY); + MULTI_update_va_mapping(&rx_mcl[i], + vaddr, 0, 0); + } + nr_flips++; + } else { + gnttab_grant_foreign_access_ref(ref, + sc->xbdev->otherend_id, + PFNTOMFN(pfn), + 0); + } + req->id = id; + req->gref = ref; - - RING_GET_REQUEST(&sc->rx, req_prod + i)->id = id; - ref = gnttab_claim_grant_reference(&sc->gref_rx_head); - PANIC_IF((signed short)ref < 0); - sc->grant_rx_ref[id] = ref; - gnttab_grant_foreign_transfer_ref(ref, - sc->xbdev->otherend_id); - RING_GET_REQUEST(&sc->rx, req_prod + i)->gref = ref; - - - rx_pfn_array[i] = vtomach(mtod(m_new,vm_offset_t)) >> PAGE_SHIFT; - - /* Remove this page from pseudo phys map before passing back to Xen. */ - xen_phys_machine[((unsigned long)m_new->m_ext.ext_args >> PAGE_SHIFT)] - = INVALID_P2M_ENTRY; - - rx_mcl[i].op = __HYPERVISOR_update_va_mapping; - rx_mcl[i].args[0] = (unsigned long)mtod(m_new,vm_offset_t); - rx_mcl[i].args[1] = 0; - rx_mcl[i].args[2] = 0; - rx_mcl[i].args[3] = 0; - + rx_pfn_array[i] = vtomach(mtod(m_new,vm_offset_t)) >> PAGE_SHIFT; } KASSERT(i, ("no mbufs processed")); /* should have returned earlier */ - KASSERT(sc->xn_rx_batchlen == 0, ("not all mbufs processed")); - sc->xn_rx_batch = sc->xn_rx_batchtail = NULL; - + KASSERT(mbufq_len(&sc->xn_rx_batch) == 0, ("not all mbufs processed")); /* * We may have allocated buffers which have entries outstanding - in the page * update queue -- make sure we flush those first! */ + * in the page * update queue -- make sure we flush those first! + */ PT_UPDATES_FLUSH(); - - /* After all PTEs have been zapped we blow away stale TLB entries. */ - rx_mcl[i-1].args[MULTI_UVMFLAGS_INDEX] = UVMF_TLB_FLUSH|UVMF_LOCAL; - - /* Give away a batch of pages. */ - rx_mcl[i].op = __HYPERVISOR_memory_op; - rx_mcl[i].args[0] = XENMEM_decrease_reservation; - rx_mcl[i].args[1] = (unsigned long)&reservation; - - reservation.extent_start = rx_pfn_array; - reservation.nr_extents = i; - reservation.extent_order = 0; - reservation.address_bits = 0; - reservation.domid = DOMID_SELF; - + if (nr_flips != 0) { #ifdef notyet - /* Tell the ballon driver what is going on. */ - balloon_update_driver_allowance(i); + /* Tell the ballon driver what is going on. */ + balloon_update_driver_allowance(i); #endif + set_xen_guest_handle(reservation.extent_start, rx_pfn_array); + reservation.nr_extents = i; + reservation.extent_order = 0; + reservation.address_bits = 0; + reservation.domid = DOMID_SELF; + + if (!xen_feature(XENFEAT_auto_translated_physmap)) { + + /* After all PTEs have been zapped, flush the TLB. */ + rx_mcl[i-1].args[MULTI_UVMFLAGS_INDEX] = + UVMF_TLB_FLUSH|UVMF_ALL; - /* Zap PTEs and give away pages in one big multicall. */ - (void)HYPERVISOR_multicall(rx_mcl, i+1); + /* Give away a batch of pages. */ + rx_mcl[i].op = __HYPERVISOR_memory_op; + rx_mcl[i].args[0] = XENMEM_decrease_reservation; + rx_mcl[i].args[1] = (unsigned long)&reservation; + /* Zap PTEs and give away pages in one big multicall. */ + (void)HYPERVISOR_multicall(rx_mcl, i+1); - /* Check return status of HYPERVISOR_dom_mem_op(). */ - if (unlikely(rx_mcl[i].result != i)) - panic("Unable to reduce memory reservation\n"); - + /* Check return status of HYPERVISOR_dom_mem_op(). */ + if (unlikely(rx_mcl[i].result != i)) + panic("Unable to reduce memory reservation\n"); + + } else { + if (HYPERVISOR_memory_op(XENMEM_decrease_reservation, + &reservation) != i) + panic("Unable to reduce memory reservation\n"); + } + } else { + wmb(); + } + /* Above is a suitable barrier to ensure backend will see requests. */ sc->rx.req_prod_pvt = req_prod + i; - RING_PUSH_REQUESTS(&sc->rx); - - /* Adjust our floating fill target if we risked running out of buffers. */ - if ( ((req_prod - sc->rx.sring->rsp_prod) < (sc->rx_target / 4)) && - ((sc->rx_target *= 2) > sc->rx_max_target) ) - sc->rx_target = sc->rx_max_target; +push: + RING_PUSH_REQUESTS_AND_CHECK_NOTIFY(&sc->rx, notify); + if (notify) + notify_remote_via_irq(sc->irq); } static void @@ -704,9 +842,8 @@ unsigned long mfn; grant_ref_t ref; - XN_RX_LOCK_ASSERT(np); - if (np->backend_state != BEST_CONNECTED) + if (!netfront_carrier_ok(np)) return; ifp = np->xn_ifp; @@ -752,7 +889,7 @@ m = (struct mbuf *)np->xn_cdata.xn_rx_chain[rx->id]; if (m->m_next) panic("mbuf is already part of a valid mbuf chain"); - ADD_ID_TO_FREELIST(np->xn_rx_free_idxs, rx->id); + add_id_to_freelist(np->xn_cdata.xn_rx_chain, rx->id); m->m_data += rx->offset;/* (rx->addr & PAGE_MASK); */ m->m_pkthdr.len = m->m_len = rx->status; @@ -847,7 +984,7 @@ XN_TX_LOCK_ASSERT(np); - if (np->backend_state != BEST_CONNECTED) + if (!netfront_carrier_ok(np)) return; ifp = np->xn_ifp; @@ -878,7 +1015,7 @@ np->grant_tx_ref[id] = GRANT_INVALID_REF; np->xn_cdata.xn_tx_chain[id] = NULL; - ADD_ID_TO_FREELIST(np->xn_tx_free_idxs, id); + add_id_to_freelist(np->xn_cdata.xn_tx_chain, id); m_freem(m); } np->tx.rsp_cons = prod; @@ -919,7 +1056,7 @@ while (np->rx.rsp_cons != np->rx.sring->rsp_prod && - np->user_state == UST_OPEN && + likely(netfront_carrier_ok(np)) && ifp->if_drv_flags & IFF_DRV_RUNNING) { XN_RX_LOCK(np); @@ -975,7 +1112,7 @@ tx_bytes = 0; - if (sc->backend_state != BEST_CONNECTED) + if (!netfront_carrier_ok(sc)) >>> TRUNCATED FOR MAIL (1000 lines) <<< From owner-p4-projects@FreeBSD.ORG Fri Jan 4 15:15:07 2008 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id EA89D16A46D; Fri, 4 Jan 2008 15:15:06 +0000 (UTC) Delivered-To: perforce@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id AFBBE16A469 for ; Fri, 4 Jan 2008 15:15:06 +0000 (UTC) (envelope-from gonzo@FreeBSD.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id 9F63A13C47E for ; Fri, 4 Jan 2008 15:15:06 +0000 (UTC) (envelope-from gonzo@FreeBSD.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.1/8.14.1) with ESMTP id m04FF6gr005675 for ; Fri, 4 Jan 2008 15:15:06 GMT (envelope-from gonzo@FreeBSD.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.1/8.14.1/Submit) id m04FF6iB005672 for perforce@freebsd.org; Fri, 4 Jan 2008 15:15:06 GMT (envelope-from gonzo@FreeBSD.org) Date: Fri, 4 Jan 2008 15:15:06 GMT Message-Id: <200801041515.m04FF6iB005672@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to gonzo@FreeBSD.org using -f From: Oleksandr Tymoshenko To: Perforce Change Reviews Cc: Subject: PERFORCE change 132484 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 04 Jan 2008 15:15:07 -0000 http://perforce.freebsd.org/chv.cgi?CH=132484 Change 132484 by gonzo@gonzo_jeeves on 2008/01/04 15:14:35 o Use __ASSEMBLER__ macro to exclude C-part of setjmp.h, it's either this way or we'll have to duplicate setjmp constants in asm.h Affected files ... .. //depot/projects/mips2-jnpr/src/sys/mips/include/setjmp.h#4 edit Differences ... ==== //depot/projects/mips2-jnpr/src/sys/mips/include/setjmp.h#4 (text+ko) ==== @@ -47,11 +47,13 @@ * internally to avoid some run-time errors for mismatches. */ #ifndef _LOCORE +#ifndef __ASSEMBLER__ #if __BSD_VISIBLE || __POSIX_VISIBLE || __XSI_VISIBLE typedef struct _sigjmp_buf { long _sjb[_JBLEN + 1]; } sigjmp_buf[1]; #endif typedef struct _jmp_buf { long _jb[_JBLEN + 1]; } jmp_buf[1]; -#endif +#endif /* __ASSEMBLER__ */ +#endif /* _LOCORE */ #endif /* _MACHINE_SETJMP_H_ */ From owner-p4-projects@FreeBSD.ORG Fri Jan 4 15:25:19 2008 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 436E616A41B; Fri, 4 Jan 2008 15:25:19 +0000 (UTC) Delivered-To: perforce@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 085A616A417 for ; Fri, 4 Jan 2008 15:25:19 +0000 (UTC) (envelope-from raj@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id ECADA13C447 for ; Fri, 4 Jan 2008 15:25:18 +0000 (UTC) (envelope-from raj@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.1/8.14.1) with ESMTP id m04FPIlF011291 for ; Fri, 4 Jan 2008 15:25:18 GMT (envelope-from raj@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.1/8.14.1/Submit) id m04FPIrt011288 for perforce@freebsd.org; Fri, 4 Jan 2008 15:25:18 GMT (envelope-from raj@freebsd.org) Date: Fri, 4 Jan 2008 15:25:18 GMT Message-Id: <200801041525.m04FPIrt011288@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to raj@freebsd.org using -f From: Rafal Jaworowski To: Perforce Change Reviews Cc: Subject: PERFORCE change 132485 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 04 Jan 2008 15:25:19 -0000 http://perforce.freebsd.org/chv.cgi?CH=132485 Change 132485 by raj@raj_mimi on 2008/01/04 15:24:25 Temporary fix to avoid confusion of 'kstack0' symbol and make e500 kernel operational again. kstack0 area requires further improvements (space for kstack0 is now statically defined within kernel body, does not have guard pages etc., which should be fixed) Affected files ... .. //depot/projects/e500/sys/powerpc/booke/locore.S#3 edit .. //depot/projects/e500/sys/powerpc/booke/machdep.c#4 edit Differences ... ==== //depot/projects/e500/sys/powerpc/booke/locore.S#3 (text+ko) ==== @@ -255,8 +255,8 @@ /* * Setup a temporary stack */ - lis %r1, kstack0@ha - addi %r1, %r1, kstack0@l + lis %r1, kstack0_space@ha + addi %r1, %r1, kstack0_space@l addi %r1, %r1, (16384 - 256) /* @@ -466,7 +466,7 @@ /************************************************************************/ .data .align 4 -GLOBAL(kstack0) +GLOBAL(kstack0_space) .space 16384 /* ==== //depot/projects/e500/sys/powerpc/booke/machdep.c#4 (text+ko) ==== @@ -153,6 +153,8 @@ extern void *trapcode, *trapsize; +extern unsigned char kstack0_space[]; + struct kva_md_info kmi; struct pcpu __pcpu[MAXCPU]; struct trapframe frame0; @@ -406,7 +408,7 @@ init_param2(physmem); /* Finish setting up thread0. */ - thread0.td_kstack = (uintptr_t)kstack0; + thread0.td_kstack = (vm_offset_t)kstack0_space; thread0.td_pcb = (struct pcb *) (thread0.td_kstack + KSTACK_PAGES * PAGE_SIZE) - 1; bzero((void *)thread0.td_pcb, sizeof(struct pcb)); From owner-p4-projects@FreeBSD.ORG Fri Jan 4 15:38:35 2008 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 7AD9016A419; Fri, 4 Jan 2008 15:38:35 +0000 (UTC) Delivered-To: perforce@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 3EFF216A417 for ; Fri, 4 Jan 2008 15:38:35 +0000 (UTC) (envelope-from raj@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id 1779713C4D1 for ; Fri, 4 Jan 2008 15:38:35 +0000 (UTC) (envelope-from raj@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.1/8.14.1) with ESMTP id m04FcYHU012183 for ; Fri, 4 Jan 2008 15:38:34 GMT (envelope-from raj@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.1/8.14.1/Submit) id m04FcYRu012180 for perforce@freebsd.org; Fri, 4 Jan 2008 15:38:34 GMT (envelope-from raj@freebsd.org) Date: Fri, 4 Jan 2008 15:38:34 GMT Message-Id: <200801041538.m04FcYRu012180@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to raj@freebsd.org using -f From: Rafal Jaworowski To: Perforce Change Reviews Cc: Subject: PERFORCE change 132487 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 04 Jan 2008 15:38:35 -0000 http://perforce.freebsd.org/chv.cgi?CH=132487 Change 132487 by raj@raj_mimi on 2008/01/04 15:38:32 Remove AIM leftover pmap.c (now became mmu_oea.c) Affected files ... .. //depot/projects/e500/sys/powerpc/aim/pmap.c#2 delete Differences ... From owner-p4-projects@FreeBSD.ORG Fri Jan 4 15:40:38 2008 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 3A3D816A468; Fri, 4 Jan 2008 15:40:38 +0000 (UTC) Delivered-To: perforce@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id F3C3316A41B for ; Fri, 4 Jan 2008 15:40:37 +0000 (UTC) (envelope-from raj@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id E49CA13C442 for ; Fri, 4 Jan 2008 15:40:37 +0000 (UTC) (envelope-from raj@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.1/8.14.1) with ESMTP id m04FebCQ012374 for ; Fri, 4 Jan 2008 15:40:37 GMT (envelope-from raj@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.1/8.14.1/Submit) id m04FebjE012371 for perforce@freebsd.org; Fri, 4 Jan 2008 15:40:37 GMT (envelope-from raj@freebsd.org) Date: Fri, 4 Jan 2008 15:40:37 GMT Message-Id: <200801041540.m04FebjE012371@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to raj@freebsd.org using -f From: Rafal Jaworowski To: Perforce Change Reviews Cc: Subject: PERFORCE change 132490 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 04 Jan 2008 15:40:38 -0000 http://perforce.freebsd.org/chv.cgi?CH=132490 Change 132490 by raj@raj_mimi on 2008/01/04 15:39:44 Some cosmetics.. Affected files ... .. //depot/projects/e500/sys/dev/tsec/if_tsec.c#4 edit .. //depot/projects/e500/sys/powerpc/booke/machdep.c#5 edit .. //depot/projects/e500/sys/powerpc/mpc85xx/nexus.c#2 edit Differences ... ==== //depot/projects/e500/sys/dev/tsec/if_tsec.c#4 (text+ko) ==== @@ -895,7 +895,7 @@ if (id == 0) return (ENXIO); - device_set_desc(dev, "TSEC Ethernet Controller"); + device_set_desc(dev, "Three-Speed Ethernet Controller"); return (BUS_PROBE_DEFAULT); } ==== //depot/projects/e500/sys/powerpc/booke/machdep.c#5 (text+ko) ==== @@ -274,7 +274,6 @@ debugf(" ccsrbar = 0x%08x\n", bootinfo->bar_base); debugf(" cpu_clk = 0x%08x\n", bootinfo->cpu_clk); debugf(" bus_clk = 0x%08x\n", bootinfo->bus_clk); - debugf(" baudrate = 0x%08x\n", bootinfo->baudrate); debugf(" eth0_addr = "); for (i = 0; i < 6; i++) @@ -285,8 +284,6 @@ for (i = 0; i < 6; i++) debugf("%02x ", bootinfo->eth1_addr[i]); debugf("\n"); - - debugf(" eth_speed = %d\n", bootinfo->eth_speed); } void ==== //depot/projects/e500/sys/powerpc/mpc85xx/nexus.c#2 (text+ko) ==== @@ -120,7 +120,7 @@ */ device_add_child(dev, "ocpbus", 0); - device_set_desc(dev, "PPC e500 Nexus device"); + device_set_desc(dev, "MPC85xx Nexus device"); return (0); } From owner-p4-projects@FreeBSD.ORG Fri Jan 4 15:48:59 2008 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id D647016A46D; Fri, 4 Jan 2008 15:48:58 +0000 (UTC) Delivered-To: perforce@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 9A72516A41B; Fri, 4 Jan 2008 15:48:57 +0000 (UTC) (envelope-from flata@magnesium.net) Received: from toxic.magnesium.net (toxic.magnesium.net [207.154.84.15]) by mx1.freebsd.org (Postfix) with ESMTP id C5AEF13C500; Fri, 4 Jan 2008 15:48:57 +0000 (UTC) (envelope-from flata@magnesium.net) Received: by toxic.magnesium.net (Postfix, from userid 1212) id 3ECB2DA881; Fri, 4 Jan 2008 07:18:13 -0800 (PST) Date: Fri, 4 Jan 2008 05:18:13 -1000 From: Juli Mallett To: Oleksandr Tymoshenko Message-ID: <20080104151813.GA79941@toxic.magnesium.net> References: <200801041515.m04FF6iB005672@repoman.freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <200801041515.m04FF6iB005672@repoman.freebsd.org> User-Agent: Mutt/1.5.17 (2007-11-01) Cc: Perforce Change Reviews Subject: Re: PERFORCE change 132484 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 04 Jan 2008 15:48:59 -0000 _LOCORE is supposed to cover that (but it might should be spelled LOCORE?) * Oleksandr Tymoshenko [ 2008-01-04 ] [ PERFORCE change 132484 for review ] > http://perforce.freebsd.org/chv.cgi?CH=132484 > > Change 132484 by gonzo@gonzo_jeeves on 2008/01/04 15:14:35 > > o Use __ASSEMBLER__ macro to exclude C-part of setjmp.h, > it's either this way or we'll have to duplicate setjmp constants > in asm.h > > Affected files ... > > .. //depot/projects/mips2-jnpr/src/sys/mips/include/setjmp.h#4 edit > > Differences ... > > ==== //depot/projects/mips2-jnpr/src/sys/mips/include/setjmp.h#4 (text+ko) ==== > > @@ -47,11 +47,13 @@ > * internally to avoid some run-time errors for mismatches. > */ > #ifndef _LOCORE > +#ifndef __ASSEMBLER__ > #if __BSD_VISIBLE || __POSIX_VISIBLE || __XSI_VISIBLE > typedef struct _sigjmp_buf { long _sjb[_JBLEN + 1]; } sigjmp_buf[1]; > #endif > > typedef struct _jmp_buf { long _jb[_JBLEN + 1]; } jmp_buf[1]; > -#endif > +#endif /* __ASSEMBLER__ */ > +#endif /* _LOCORE */ > > #endif /* _MACHINE_SETJMP_H_ */ -- From owner-p4-projects@FreeBSD.ORG Fri Jan 4 15:58:31 2008 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 3E3D416A419; Fri, 4 Jan 2008 15:58:31 +0000 (UTC) Delivered-To: perforce@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 02F8216A421; Fri, 4 Jan 2008 15:58:31 +0000 (UTC) (envelope-from flata@magnesium.net) Received: from toxic.magnesium.net (toxic.magnesium.net [207.154.84.15]) by mx1.freebsd.org (Postfix) with ESMTP id E351613C455; Fri, 4 Jan 2008 15:58:30 +0000 (UTC) (envelope-from flata@magnesium.net) Received: by toxic.magnesium.net (Postfix, from userid 1212) id CC68BDA821; Fri, 4 Jan 2008 07:59:36 -0800 (PST) Date: Fri, 4 Jan 2008 05:59:36 -1000 From: Juli Mallett To: Oleksandr Tymoshenko Message-ID: <20080104155936.GA81255@toxic.magnesium.net> References: <200801041515.m04FF6iB005672@repoman.freebsd.org> <20080104151813.GA79941@toxic.magnesium.net> <477E562E.2030605@freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <477E562E.2030605@freebsd.org> User-Agent: Mutt/1.5.17 (2007-11-01) Cc: Perforce Change Reviews Subject: Re: PERFORCE change 132484 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 04 Jan 2008 15:58:31 -0000 * Oleksandr Tymoshenko [ 2008-01-04 ] [ Re: PERFORCE change 132484 for review ] > Juli Mallett wrote: >> _LOCORE is supposed to cover that (but it might should be spelled LOCORE?) > _LOCORE is for kernel-land assembler AFAIK, but this file is used > in userland. ah, I see. I misunderstood. Thanks! From owner-p4-projects@FreeBSD.ORG Fri Jan 4 16:04:02 2008 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id B7AD816A47A; Fri, 4 Jan 2008 16:04:02 +0000 (UTC) Delivered-To: perforce@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 7D38216A468 for ; Fri, 4 Jan 2008 16:04:02 +0000 (UTC) (envelope-from gonzo@freebsd.org) Received: from bugor.portaone.com (bugor.portaone.com [65.61.203.147]) by mx1.freebsd.org (Postfix) with ESMTP id 6403D13C474 for ; Fri, 4 Jan 2008 16:04:02 +0000 (UTC) (envelope-from gonzo@freebsd.org) Received: from mail.pbxpress.com ([65.61.203.142] helo=leaf.pbxpress.com) by bugor.portaone.com (8.11.3/8.11.3) with ESMTP (TLSv1:AES256-SHA:256)id 1JAoqJ-000B0y-Lo; Fri, 04 Jan 2008 07:52:19 -0800 Received: from jeeves.bluezbox.com (k3-gw.portaone.com [193.28.87.193]) (authenticated bits=0) by leaf.pbxpress.com (8.13.3/8.13.3) with ESMTP id m04FqV83080477 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Fri, 4 Jan 2008 07:52:37 -0800 (PST) (envelope-from gonzo@freebsd.org) Message-ID: <477E562E.2030605@freebsd.org> Date: Fri, 04 Jan 2008 17:52:14 +0200 From: Oleksandr Tymoshenko User-Agent: Thunderbird 2.0.0.6 (X11/20070907) MIME-Version: 1.0 To: Juli Mallett References: <200801041515.m04FF6iB005672@repoman.freebsd.org> <20080104151813.GA79941@toxic.magnesium.net> In-Reply-To: <20080104151813.GA79941@toxic.magnesium.net> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Status: No, recieved from trusted server Cc: Perforce Change Reviews Subject: Re: PERFORCE change 132484 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 04 Jan 2008 16:04:03 -0000 Juli Mallett wrote: > _LOCORE is supposed to cover that (but it might should be spelled LOCORE?) _LOCORE is for kernel-land assembler AFAIK, but this file is used in userland. -- gonzo From owner-p4-projects@FreeBSD.ORG Fri Jan 4 16:21:23 2008 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 72AD116A420; Fri, 4 Jan 2008 16:21:23 +0000 (UTC) Delivered-To: perforce@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 3746516A417 for ; Fri, 4 Jan 2008 16:21:23 +0000 (UTC) (envelope-from raj@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id 2775B13C45B for ; Fri, 4 Jan 2008 16:21:23 +0000 (UTC) (envelope-from raj@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.1/8.14.1) with ESMTP id m04GLNNI015902 for ; Fri, 4 Jan 2008 16:21:23 GMT (envelope-from raj@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.1/8.14.1/Submit) id m04GLMae015899 for perforce@freebsd.org; Fri, 4 Jan 2008 16:21:22 GMT (envelope-from raj@freebsd.org) Date: Fri, 4 Jan 2008 16:21:22 GMT Message-Id: <200801041621.m04GLMae015899@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to raj@freebsd.org using -f From: Rafal Jaworowski To: Perforce Change Reviews Cc: Subject: PERFORCE change 132492 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 04 Jan 2008 16:21:23 -0000 http://perforce.freebsd.org/chv.cgi?CH=132492 Change 132492 by raj@raj_mimi on 2008/01/04 16:21:01 E500 pmap cleanup: Local routines -> static, eleminate unused code, style fixes. Affected files ... .. //depot/projects/e500/sys/powerpc/booke/pmap.c#5 edit .. //depot/projects/e500/sys/powerpc/include/tlb.h#2 edit Differences ... ==== //depot/projects/e500/sys/powerpc/booke/pmap.c#5 (text+ko) ==== @@ -191,15 +191,17 @@ /* Next free entry in the TLB1 */ static unsigned int tlb1_idx; +static tlbtid_t tid_alloc(struct pmap *); static void tid_flush(tlbtid_t); extern void tlb1_inval_va(vm_offset_t); extern void tlb0_inval_va(vm_offset_t); -extern void remap_ccsrbar(vm_offset_t, vm_offset_t, vm_offset_t); - static void tlb_print_entry(int, u_int32_t, u_int32_t, u_int32_t, u_int32_t); +static int tlb1_set_entry(vm_offset_t, vm_offset_t, vm_size_t, u_int32_t); +static void __tlb1_set_entry(unsigned int, vm_offset_t, vm_offset_t, + vm_size_t, u_int32_t, unsigned int, unsigned int); static void tlb1_write_entry(unsigned int); static int tlb1_iomapped(int, vm_paddr_t, vm_size_t, vm_offset_t *); static vm_size_t tlb1_mapin_region(vm_offset_t, vm_offset_t, vm_size_t); @@ -208,6 +210,9 @@ static unsigned int size2tsize(vm_size_t); static unsigned int ilog2(unsigned int); +static void set_mas4_defaults(void); + +static void tlb0_inval_entry(vm_offset_t, unsigned int); static inline unsigned int tlb0_tableidx(vm_offset_t, unsigned int); static void tlb0_write_entry(unsigned int, unsigned int); static void tlb0_flush_entry(pmap_t, vm_offset_t); @@ -274,10 +279,10 @@ static __inline int pmap_track_modified(pmap_t pmap, vm_offset_t va) { - if (pmap == kernel_pmap) + if (pmap == kernel_pmap) return ((va < kmi.clean_sva) || (va >= kmi.clean_eva)); else - return (1); + return (1); } /* Return number of entries in TLB0. */ @@ -436,7 +441,7 @@ KASSERT((pdir_idx <= (VM_MAXUSER_ADDRESS / PDIR_SIZE)), ("ptbl_free: invalid pdir_idx")); - + ptbl = pmap->pm_pdir[pdir_idx]; //debugf("ptbl_free: ptbl = 0x%08x\n", (u_int32_t)ptbl); @@ -707,7 +712,7 @@ /* Get the page table pointer. */ ptbl = pmap->pm_pdir[pdir_idx]; - + if (ptbl) { /* * Check if there is valid mapping for requested @@ -1533,7 +1538,7 @@ hold_flag = PTBL_HOLD_FLAG(pmap); //debugf("pmap_remove: hold_flag = %d\n", hold_flag); - + vm_page_lock_queues(); PMAP_LOCK(pmap); for (; va < endva; va += PAGE_SIZE) { @@ -1979,7 +1984,7 @@ if ((pte = pte_find(pv->pv_pmap, pv->pv_va)) != NULL) { if (!PTE_ISVALID(pte)) goto make_sure_to_unlock; - + if (!pmap_track_modified(pv->pv_pmap, pv->pv_va)) goto make_sure_to_unlock; @@ -2197,7 +2202,7 @@ vm_offset_t va; /* - * This currently does not work for entries that + * This currently does not work for entries that * overlap TLB1 entries. */ for (i = 0; i < tlb1_idx; i ++) { @@ -2314,7 +2319,7 @@ * Allocate a TID. If necessary, steal one from someone else. * The new TID is flushed from the TLB before returning. */ -tlbtid_t +static tlbtid_t tid_alloc(pmap_t pmap) { tlbtid_t tid; @@ -2336,7 +2341,7 @@ */ tid = next_tid; while (tidbusy[tid] != NULL) { - if (tid == next_tid) + if (tid == next_tid) break; if (tid == TID_MAX) @@ -2368,10 +2373,11 @@ return tid; } +#if 0 /* * Free this pmap's TID. */ -void +static void tid_free(pmap_t pmap) { tlbtid_t oldtid; @@ -2395,8 +2401,10 @@ tidbusy[oldtid] = NULL; tid_flush(oldtid); } +#endif -void +#ifdef DEBUG +static void tid_print_busy(void) { int i; @@ -2409,6 +2417,7 @@ } } +#endif /* DEBUG */ /**************************************************************************/ /* TLB0 handling */ @@ -2440,7 +2449,7 @@ tsize = (mas1 & MAS1_TSIZE_MASK) >> MAS1_TSIZE_SHIFT; size = 0; - if (tsize) + if (tsize) size = tsize2size(tsize); debugf("%3d: (%s) [AS=%d] " @@ -2468,7 +2477,7 @@ tlb0_write_entry(unsigned int idx, unsigned int way) { u_int32_t mas0, mas7, nv; - + /* Clear high order RPN bits. */ mas7 = 0; @@ -2477,7 +2486,7 @@ nv = mas0 & (TLB0_NWAYS - 1); /* Select entry. */ - mas0 = MAS0_TLBSEL(0) | MAS0_ESEL(way) | nv; + mas0 = MAS0_TLBSEL(0) | MAS0_ESEL(way) | nv; //debugf("tlb0_write_entry: s (idx=%d way=%d mas0=0x%08x " // "mas1=0x%08x mas2=0x%08x mas3=0x%08x)\n", @@ -2501,7 +2510,7 @@ /* * Invalidate TLB0 entry, clear correspondig tlb0 table element. */ -void +static void tlb0_inval_entry(vm_offset_t va, unsigned int way) { int idx = tlb0_tableidx(va, way); @@ -2567,35 +2576,36 @@ mtx_unlock_spin(&tlb0_mutex); } +#ifdef DEBUG /* Print out tlb0 entries for given va. */ -void +static void tlb0_print_tlbentries_va(vm_offset_t va) { - u_int32_t mas0, mas1, mas2, mas3, mas7; - int way, idx; + u_int32_t mas0, mas1, mas2, mas3, mas7; + int way, idx; - debugf("TLB0 entries for va = 0x%08x:\n", va); - for (way = 0; way < TLB0_NWAYS; way ++) { - mas0 = MAS0_TLBSEL(0) | MAS0_ESEL(way); - mtspr(SPR_MAS0, mas0); - __asm volatile("isync"); + debugf("TLB0 entries for va = 0x%08x:\n", va); + for (way = 0; way < TLB0_NWAYS; way ++) { + mas0 = MAS0_TLBSEL(0) | MAS0_ESEL(way); + mtspr(SPR_MAS0, mas0); + __asm volatile("isync"); - mas2 = va & MAS2_EPN; - mtspr(SPR_MAS2, mas2); - __asm volatile("isync; tlbre"); + mas2 = va & MAS2_EPN; + mtspr(SPR_MAS2, mas2); + __asm volatile("isync; tlbre"); - mas1 = mfspr(SPR_MAS1); - mas2 = mfspr(SPR_MAS2); - mas3 = mfspr(SPR_MAS3); - mas7 = mfspr(SPR_MAS7); + mas1 = mfspr(SPR_MAS1); + mas2 = mfspr(SPR_MAS2); + mas3 = mfspr(SPR_MAS3); + mas7 = mfspr(SPR_MAS7); - idx = tlb0_tableidx(va, way); - tlb_print_entry(idx, mas1, mas2, mas3, mas7); - } + idx = tlb0_tableidx(va, way); + tlb_print_entry(idx, mas1, mas2, mas3, mas7); + } } /* Print out contents of the MAS registers for each TLB0 entry */ -void +static void tlb0_print_tlbentries(void) { u_int32_t mas0, mas1, mas2, mas3, mas7; @@ -2626,7 +2636,7 @@ } /* Print out kernel tlb0[] table. */ -void +static void tlb0_print_entries(void) { int i; @@ -2637,6 +2647,7 @@ tlb0[i].mas2, tlb0[i].mas3, 0); } } +#endif /* DEBUG */ /**************************************************************************/ /* TLB1 handling */ @@ -2649,7 +2660,7 @@ tlb1_write_entry(unsigned int idx) { u_int32_t mas0, mas7; - + //debugf("tlb1_write_entry: s\n"); /* Clear high order RPN bits */ @@ -2725,7 +2736,7 @@ * Entry TID is set to _tid which must not exceed 8 bit value. * Entry TS is set to either 0 or MAS1_TS based on provided _ts. */ -void +static void __tlb1_set_entry(unsigned int idx, vm_offset_t va, vm_offset_t pa, vm_size_t size, u_int32_t flags, unsigned int _tid, unsigned int _ts) { @@ -2763,7 +2774,7 @@ * Entries are created starting from index 0 (current free entry is * kept in tlb1_idx) and are not supposed to be invalidated. */ -int +static int tlb1_set_entry(vm_offset_t va, vm_offset_t pa, vm_size_t size, u_int32_t flags) { @@ -2791,7 +2802,7 @@ tlb1_inval_entry(unsigned int idx) { vm_offset_t va; - + va = tlb1[idx].mas2 & MAS2_EPN; tlb1[idx].mas1 = 0; /* !MAS1_VALID */ @@ -2920,7 +2931,7 @@ * Setup MAS4 defaults. * These values are loaded to MAS0-2 on a TLB miss. */ -void +static void set_mas4_defaults(void) { u_int32_t mas4; ==== //depot/projects/e500/sys/powerpc/include/tlb.h#2 (text+ko) ==== @@ -132,31 +132,11 @@ typedef u_int8_t tlbtid_t; struct pmap; -int tlb1_set_entry(vm_offset_t, vm_offset_t, - vm_size_t, u_int32_t); - -void __tlb1_set_entry(unsigned int, vm_offset_t, vm_offset_t, - vm_size_t, u_int32_t, unsigned int, unsigned int); - void tlb1_inval_entry(unsigned int); - void tlb1_init(vm_offset_t); - -void tlb0_print_tlbentries_va(vm_offset_t); void tlb1_print_entries(void); void tlb1_print_tlbentries(void); -void tlb0_inval_entry(vm_offset_t, unsigned int); - -void tlb0_print_entries(void); -void tlb0_print_tlbentries(void); - -void tid_print_busy(void); - -void set_mas4_defaults(void); - -tlbtid_t tid_alloc(struct pmap *); -void tid_free(struct pmap *); #endif /* !LOCORE */ #endif /* _MACHINE_TLB_H_ */ From owner-p4-projects@FreeBSD.ORG Fri Jan 4 16:37:40 2008 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 4FEBE16A46D; Fri, 4 Jan 2008 16:37:40 +0000 (UTC) Delivered-To: perforce@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 1466F16A46B for ; Fri, 4 Jan 2008 16:37:40 +0000 (UTC) (envelope-from gonzo@FreeBSD.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id 05BCE13C455 for ; Fri, 4 Jan 2008 16:37:40 +0000 (UTC) (envelope-from gonzo@FreeBSD.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.1/8.14.1) with ESMTP id m04Gbdcq016596 for ; Fri, 4 Jan 2008 16:37:39 GMT (envelope-from gonzo@FreeBSD.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.1/8.14.1/Submit) id m04GbdT4016593 for perforce@freebsd.org; Fri, 4 Jan 2008 16:37:39 GMT (envelope-from gonzo@FreeBSD.org) Date: Fri, 4 Jan 2008 16:37:39 GMT Message-Id: <200801041637.m04GbdT4016593@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to gonzo@FreeBSD.org using -f From: Oleksandr Tymoshenko To: Perforce Change Reviews Cc: Subject: PERFORCE change 132493 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 04 Jan 2008 16:37:40 -0000 http://perforce.freebsd.org/chv.cgi?CH=132493 Change 132493 by gonzo@gonzo_jeeves on 2008/01/04 16:37:32 o Rempove NTOHL/NTOHS/etc... macroses, they came from NetBSD land o Add definition for __ntohl/__ntohs/etc... macroses for LE build o Some cosmetics Affected files ... .. //depot/projects/mips2-jnpr/src/sys/mips/include/endian.h#5 edit Differences ... ==== //depot/projects/mips2-jnpr/src/sys/mips/include/endian.h#5 (text+ko) ==== @@ -111,33 +111,21 @@ /* * Define the order of 32-bit words in 64-bit words. */ -#if _BYTE_ORDER == LITTLE_ENDIAN -#define _QUAD_HIGHWORD 1 -#define _QUAD_LOWWORD 0 -#endif - #if _BYTE_ORDER == BIG_ENDIAN #define _QUAD_HIGHWORD 0 #define _QUAD_LOWWORD 1 -#endif - -#if _BYTE_ORDER == BIG_ENDIAN #define __htonl(x) ((__uint32_t)(x)) #define __htons(x) ((__uint16_t)(x)) #define __ntohl(x) ((__uint32_t)(x)) #define __ntohs(x) ((__uint16_t)(x)) -#endif - - -/* - * Macros for network/external number representation conversion. - */ - -#define NTOHL(x) (x) = __ntohl((x)) -#define NTOHS(x) (x) = __ntohs((x)) -#define HTONQ(x) (x) = __htonq((x)) -#define HTONL(x) (x) = __htonl((x)) -#define HTONS(x) (x) = __htons((x)) +#else +#define _QUAD_HIGHWORD 1 +#define _QUAD_LOWWORD 0 +#define __ntohl(x) (__bswap32(x)) +#define __ntohs(x) (__bswap16(x)) +#define __htonl(x) (__bswap32(x)) +#define __htons(x) (__bswap16(x)) +#endif /* _BYTE_ORDER == BIG_ENDIAN */ #endif /* !_POSIX_SOURCE */ #endif /* !_MACHINE_ENDIAN_H_ */ From owner-p4-projects@FreeBSD.ORG Fri Jan 4 17:11:17 2008 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 8CB7616A419; Fri, 4 Jan 2008 17:11:17 +0000 (UTC) Delivered-To: perforce@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 521FB16A417 for ; Fri, 4 Jan 2008 17:11:17 +0000 (UTC) (envelope-from gonzo@FreeBSD.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id 2C57D13C44B for ; Fri, 4 Jan 2008 17:11:17 +0000 (UTC) (envelope-from gonzo@FreeBSD.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.1/8.14.1) with ESMTP id m04HBGwN029005 for ; Fri, 4 Jan 2008 17:11:16 GMT (envelope-from gonzo@FreeBSD.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.1/8.14.1/Submit) id m04HBGPG029002 for perforce@freebsd.org; Fri, 4 Jan 2008 17:11:16 GMT (envelope-from gonzo@FreeBSD.org) Date: Fri, 4 Jan 2008 17:11:16 GMT Message-Id: <200801041711.m04HBGPG029002@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to gonzo@FreeBSD.org using -f From: Oleksandr Tymoshenko To: Perforce Change Reviews Cc: Subject: PERFORCE change 132497 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 04 Jan 2008 17:11:17 -0000 http://perforce.freebsd.org/chv.cgi?CH=132497 Change 132497 by gonzo@gonzo_jeeves on 2008/01/04 17:11:07 o I believe MK_ZFS is more appropriate variable to be checked in this case. Affected files ... .. //depot/projects/mips2-jnpr/src/usr.bin/fstat/Makefile#2 edit Differences ... ==== //depot/projects/mips2-jnpr/src/usr.bin/fstat/Makefile#2 (text+ko) ==== @@ -13,7 +13,7 @@ CFLAGS+=-D_KVM_VNODE -.if ${MK_CDDL} != "no" +.if ${MK_ZFS} != "no" CFLAGS+= -DZFS OBJS+= zfs/zfs.o SUBDIR= zfs From owner-p4-projects@FreeBSD.ORG Fri Jan 4 18:12:29 2008 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 6695316A46D; Fri, 4 Jan 2008 18:12:29 +0000 (UTC) Delivered-To: perforce@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 0F13016A46B for ; Fri, 4 Jan 2008 18:12:29 +0000 (UTC) (envelope-from raj@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id 00F8513C455 for ; Fri, 4 Jan 2008 18:12:29 +0000 (UTC) (envelope-from raj@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.1/8.14.1) with ESMTP id m04ICSfi032854 for ; Fri, 4 Jan 2008 18:12:28 GMT (envelope-from raj@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.1/8.14.1/Submit) id m04ICScs032851 for perforce@freebsd.org; Fri, 4 Jan 2008 18:12:28 GMT (envelope-from raj@freebsd.org) Date: Fri, 4 Jan 2008 18:12:28 GMT Message-Id: <200801041812.m04ICScs032851@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to raj@freebsd.org using -f From: Rafal Jaworowski To: Perforce Change Reviews Cc: Subject: PERFORCE change 132500 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 04 Jan 2008 18:12:29 -0000 http://perforce.freebsd.org/chv.cgi?CH=132500 Change 132500 by raj@raj_mimi on 2008/01/04 18:12:24 E500 pmap: initial conversion to the kobj-based pmap dispatcher scheme. Needs further work. Affected files ... .. //depot/projects/e500/sys/powerpc/booke/machdep.c#6 edit .. //depot/projects/e500/sys/powerpc/booke/pmap.c#6 edit .. //depot/projects/e500/sys/powerpc/include/mmuvar.h#2 edit Differences ... ==== //depot/projects/e500/sys/powerpc/booke/machdep.c#6 (text+ko) ==== @@ -125,6 +125,7 @@ #include #include #include +#include #include #include #include @@ -394,8 +395,10 @@ if (boothowto & RB_KDB) kdb_enter("Boot flags requested debugger"); #endif + kobj_machdep_init(); /* Initialise virtual memory. */ + pmap_mmu_install(MMU_TYPE_BOOKE, 0); pmap_bootstrap(startkernel, end); debugf("MSR = 0x%08x\n", mfmsr()); //tlb1_print_entries(); ==== //depot/projects/e500/sys/powerpc/booke/pmap.c#6 (text+ko) ==== @@ -1,4 +1,5 @@ /*- + * Copyright (C) 2007 Semihalf, Rafal Jaworowski * Copyright (C) 2006 Semihalf, Marian Balakowicz * All rights reserved. * @@ -29,22 +30,22 @@ * a few other pmap modules from the FreeBSD tree. */ /* - * E500 pmap implementation notes: + * VM layout notes: * * Kernel and user threads run within one common virtual address space * defined by AS=0. * * Virtual address space layout: * ----------------------------- - * 0x0000_0000 - 0xbfffefff : user process - * 0xc000_0000 - 0xc1ffffff : kerel reserved + * 0x0000_0000 - 0xbfff_efff : user process + * 0xc000_0000 - 0xc1ff_ffff : kerel reserved * 0xc000_0000 - kernelend : kernel code &data - * 0xc1ff_c000 - 0xc2000000 : kstack0 - * 0xc200_0000 - 0xffefffff : KVA + * 0xc1ff_c000 - 0xc200_0000 : kstack0 + * 0xc200_0000 - 0xffef_ffff : KVA * 0xc200_0000 - 0xc200_3fff : reserved for page zero/copy * 0xc200_4000 - ptbl buf end: reserved for ptbl bufs * ptbl buf end- 0xffef_ffff : actual free KVA space - * 0xfff0_0000 - 0xffffffff : CCSRBAR region + * 0xfff0_0000 - 0xffff_ffff : I/O devices region */ #include @@ -81,8 +82,14 @@ #include #include #include +#include #include +#include "mmu_if.h" + +#define DEBUG +#undef DEBUG + #ifdef DEBUG #define debugf(fmt, args...) printf(fmt, ##args) #else @@ -101,53 +108,39 @@ /* Kernel physical load address. */ extern uint32_t kernload; -/* Message buffer. */ -struct msgbuf *msgbufp; - -/* Map of physical memory regions. */ -vm_offset_t phys_avail[128]; -u_int phys_avail_count; - #define MEM_REGIONS 8 struct mem_region availmem_regions[MEM_REGIONS]; int availmem_regions_sz; -/* First and last available kernel virtual addresses. */ -vm_offset_t virtual_avail; -vm_offset_t virtual_end; -vm_offset_t kernel_vm_end; +/* Reserved KVA space and mutex for mmu_booke_zero_page. */ +static vm_offset_t zero_page_va; +static struct mtx zero_page_mutex; -/* Reserved KVA space and mutex for pmap_zero_page. */ -vm_offset_t pmap_zero_page_va; -struct mtx pmap_zero_page_mutex; - /* - * Reserved KVA space for pmap_zero_page_idle. This is used - * by idle thred only, no mutex required. + * Reserved KVA space for mmu_booke_zero_page_idle. This is used + * by idle thred only, no lock required. */ -vm_offset_t pmap_zero_page_idle_va; +static vm_offset_t zero_page_idle_va; -/* Reserved KVA space and mutex for pmap_copy_page. */ -vm_offset_t pmap_copy_page_src_va; -vm_offset_t pmap_copy_page_dst_va; -struct mtx pmap_copy_page_mutex; +/* Reserved KVA space and mutex for mmu_booke_copy_page. */ +static vm_offset_t copy_page_src_va; +static vm_offset_t copy_page_dst_va; +static struct mtx copy_page_mutex; /**************************************************************************/ /* PMAP */ /**************************************************************************/ -static void pmap_enter_locked(pmap_t, vm_offset_t, vm_page_t, vm_prot_t, boolean_t); - -/* Kernel pmap */ -struct pmap kernel_pmap_store; +static void mmu_booke_enter_locked(mmu_t, pmap_t, vm_offset_t, vm_page_t, + vm_prot_t, boolean_t); unsigned int kptbl_min; /* Index of the first kernel ptbl. */ unsigned int kernel_ptbls; /* Number of KVA ptbls. */ -int pmap_pagedaemon_waken; +static int pagedaemon_waken; /* - * If user pmap is processed with pmap_remove and the resident count + * If user pmap is processed with mmu_booke_remove and the resident count * drops to 0, there are no more pages to remove, so we need not continue. */ #define PMAP_REMOVE_DONE(pmap) \ @@ -160,7 +153,7 @@ /**************************************************************************/ /* Translation ID busy table */ -volatile pmap_t tidbusy[TID_MAX + 1]; +static volatile pmap_t tidbusy[TID_MAX + 1]; /* * Actual maximum number of TLB0 entries. @@ -174,14 +167,14 @@ #define TLB0_NWAYS (tlb0_nways) #define TLB0_ENTRIES_PER_WAY (tlb0_nentries_per_way) -/* Pointer to kernel tlb0 table, allocated in pmap_bootstrap() */ +/* Pointer to kernel tlb0 table, allocated in mmu_booke_bootstrap() */ tlb_entry_t *tlb0; /* * Spinlock to assure proper locking between threads and * between tlb miss handler and kernel. */ -struct mtx tlb0_mutex; +static struct mtx tlb0_mutex; #define TLB1_SIZE 16 @@ -233,23 +226,22 @@ #define PMAP_SHPGPERPROC 200 #endif -static vm_paddr_t pte_vatopa(pmap_t, vm_offset_t); - static void ptbl_init(void); static struct ptbl_buf *ptbl_buf_alloc(void); static void ptbl_buf_free(struct ptbl_buf *); static void ptbl_free_pmap_ptbl(pmap_t, pte_t *); -static void ptbl_alloc(pmap_t, unsigned int); -static void ptbl_free(pmap_t, unsigned int); -static void ptbl_hold(pmap_t, unsigned int); -static int ptbl_unhold(pmap_t, unsigned int); +static void ptbl_alloc(mmu_t, pmap_t, unsigned int); +static void ptbl_free(mmu_t, pmap_t, unsigned int); +static void ptbl_hold(mmu_t, pmap_t, unsigned int); +static int ptbl_unhold(mmu_t, pmap_t, unsigned int); -static pte_t *pte_find(pmap_t, vm_offset_t); -static void pte_enter(pmap_t, vm_page_t, vm_offset_t, u_int32_t); -static int pte_remove(pmap_t, vm_offset_t, u_int8_t); +static vm_paddr_t pte_vatopa(mmu_t, pmap_t, vm_offset_t); +static pte_t *pte_find(mmu_t, pmap_t, vm_offset_t); +void pte_enter(mmu_t, pmap_t, vm_page_t, vm_offset_t, u_int32_t); +static int pte_remove(mmu_t, pmap_t, vm_offset_t, u_int8_t); -static pv_entry_t pv_alloc(void); +pv_entry_t pv_alloc(void); static void pv_free(pv_entry_t); static void pv_insert(pmap_t, vm_offset_t, vm_page_t); static void pv_remove(pmap_t, vm_offset_t, vm_page_t); @@ -267,17 +259,122 @@ static struct mtx ptbl_buf_freelist_lock; /* Base address of kva space allocated fot ptbl bufs. */ -vm_offset_t ptbl_buf_pool_vabase; +static vm_offset_t ptbl_buf_pool_vabase; /* Pointer to ptbl_buf structures. */ -struct ptbl_buf *ptbl_bufs; +static struct ptbl_buf *ptbl_bufs; + +/* + * Kernel MMU interface + */ +vm_offset_t mmu_booke_addr_hint(mmu_t, vm_object_t, vm_offset_t, vm_size_t); +void mmu_booke_change_wiring(mmu_t, pmap_t, vm_offset_t, boolean_t); +void mmu_booke_clear_modify(mmu_t, vm_page_t); +void mmu_booke_clear_reference(mmu_t, vm_page_t); +void mmu_booke_copy(pmap_t, pmap_t, vm_offset_t, vm_size_t, vm_offset_t); +void mmu_booke_copy_page(mmu_t, vm_page_t, vm_page_t); +void mmu_booke_enter(mmu_t, pmap_t, vm_offset_t, vm_page_t, vm_prot_t, boolean_t); +void mmu_booke_enter_object(mmu_t, pmap_t, vm_offset_t, vm_offset_t, + vm_page_t, vm_prot_t); +void mmu_booke_enter_quick(mmu_t, pmap_t, vm_offset_t, vm_page_t, vm_prot_t); +vm_paddr_t mmu_booke_extract(mmu_t, pmap_t, vm_offset_t); +vm_page_t mmu_booke_extract_and_hold(mmu_t, pmap_t, vm_offset_t, vm_prot_t); +void mmu_booke_init(mmu_t); +boolean_t mmu_booke_is_modified(mmu_t, vm_page_t); +boolean_t mmu_booke_is_prefaultable(mmu_t, pmap_t, vm_offset_t); +boolean_t mmu_booke_ts_referenced(mmu_t, vm_page_t); +vm_offset_t mmu_booke_map(mmu_t, vm_offset_t *, vm_offset_t, vm_offset_t, int); +int mmu_booke_mincore(mmu_t, pmap_t, vm_offset_t); +void mmu_booke_object_init_pt(mmu_t, pmap_t, vm_offset_t, vm_object_t, + vm_pindex_t, vm_size_t); +boolean_t mmu_booke_page_exists_quick(mmu_t, pmap_t, vm_page_t); +void mmu_booke_page_init(vm_page_t); +void mmu_booke_pinit(mmu_t, pmap_t); +void mmu_booke_pinit0(mmu_t, pmap_t); +void mmu_booke_protect(mmu_t, pmap_t, vm_offset_t, vm_offset_t, vm_prot_t); +void mmu_booke_qenter(mmu_t, vm_offset_t, vm_page_t *, int); +void mmu_booke_qremove(mmu_t, vm_offset_t, int); +void mmu_booke_release(mmu_t, pmap_t); +void mmu_booke_remove(mmu_t, pmap_t, vm_offset_t, vm_offset_t); +void mmu_booke_remove_all(mmu_t, vm_page_t); +void mmu_booke_remove_write(mmu_t, vm_page_t); +void mmu_booke_zero_page(mmu_t, vm_page_t); +void mmu_booke_zero_page_area(mmu_t, vm_page_t, int, int); +void mmu_booke_zero_page_idle(mmu_t, vm_page_t); +void mmu_booke_activate(mmu_t, struct thread *); +void mmu_booke_deactivate(mmu_t, struct thread *); +void mmu_booke_bootstrap(mmu_t, vm_offset_t, vm_offset_t); +void *mmu_booke_mapdev(mmu_t, vm_offset_t, vm_size_t); +void mmu_booke_unmapdev(mmu_t, vm_offset_t, vm_size_t); +vm_offset_t mmu_booke_kextract(mmu_t, vm_offset_t); +void mmu_booke_kenter(mmu_t, vm_offset_t, vm_offset_t); +void mmu_booke_kremove(mmu_t, vm_offset_t); +boolean_t mmu_booke_dev_direct_mapped(mmu_t, vm_offset_t, vm_size_t); +boolean_t mmu_booke_page_executable(mmu_t, vm_page_t); + +static mmu_method_t mmu_booke_methods[] = { + /* pmap dispatcher interface */ + MMUMETHOD(mmu_addr_hint, mmu_booke_addr_hint), + MMUMETHOD(mmu_change_wiring, mmu_booke_change_wiring), + MMUMETHOD(mmu_clear_modify, mmu_booke_clear_modify), + MMUMETHOD(mmu_clear_reference, mmu_booke_clear_reference), + MMUMETHOD(mmu_copy, mmu_booke_copy), + MMUMETHOD(mmu_copy_page, mmu_booke_copy_page), + MMUMETHOD(mmu_enter, mmu_booke_enter), + MMUMETHOD(mmu_enter_object, mmu_booke_enter_object), + MMUMETHOD(mmu_enter_quick, mmu_booke_enter_quick), + MMUMETHOD(mmu_extract, mmu_booke_extract), + MMUMETHOD(mmu_extract_and_hold, mmu_booke_extract_and_hold), + MMUMETHOD(mmu_init, mmu_booke_init), + MMUMETHOD(mmu_is_modified, mmu_booke_is_modified), + MMUMETHOD(mmu_is_prefaultable, mmu_booke_is_prefaultable), + MMUMETHOD(mmu_ts_referenced, mmu_booke_ts_referenced), + MMUMETHOD(mmu_map, mmu_booke_map), + MMUMETHOD(mmu_mincore, mmu_booke_mincore), + MMUMETHOD(mmu_object_init_pt, mmu_booke_object_init_pt), + MMUMETHOD(mmu_page_exists_quick,mmu_booke_page_exists_quick), + MMUMETHOD(mmu_page_init, mmu_booke_page_init), + MMUMETHOD(mmu_pinit, mmu_booke_pinit), + MMUMETHOD(mmu_pinit0, mmu_booke_pinit0), + MMUMETHOD(mmu_protect, mmu_booke_protect), + MMUMETHOD(mmu_qenter, mmu_booke_qenter), + MMUMETHOD(mmu_qremove, mmu_booke_qremove), + MMUMETHOD(mmu_release, mmu_booke_release), + MMUMETHOD(mmu_remove, mmu_booke_remove), + MMUMETHOD(mmu_remove_all, mmu_booke_remove_all), + MMUMETHOD(mmu_remove_write, mmu_booke_remove_write), + MMUMETHOD(mmu_zero_page, mmu_booke_zero_page), + MMUMETHOD(mmu_zero_page_area, mmu_booke_zero_page_area), + MMUMETHOD(mmu_zero_page_idle, mmu_booke_zero_page_idle), + MMUMETHOD(mmu_activate, mmu_booke_activate), + MMUMETHOD(mmu_deactivate, mmu_booke_deactivate), + + /* Internal interfaces */ + MMUMETHOD(mmu_bootstrap, mmu_booke_bootstrap), + MMUMETHOD(mmu_dev_direct_mapped,mmu_booke_dev_direct_mapped), + MMUMETHOD(mmu_mapdev, mmu_booke_mapdev), + MMUMETHOD(mmu_kenter, mmu_booke_kenter), + MMUMETHOD(mmu_kextract, mmu_booke_kextract), +/* MMUMETHOD(mmu_kremove, mmu_booke_kremove), */ + MMUMETHOD(mmu_page_executable, mmu_booke_page_executable), + MMUMETHOD(mmu_unmapdev, mmu_booke_unmapdev), + + { 0, 0 } +}; + +static mmu_def_t booke_mmu = { + MMU_TYPE_BOOKE, + mmu_booke_methods, + 0 +}; +MMU_DEF(booke_mmu); /* * This routine defines the region(s) of memory that should * not be tested for the modified bit. */ static __inline int -pmap_track_modified(pmap_t pmap, vm_offset_t va) +mmu_booke_track_modified(pmap_t pmap, vm_offset_t va) { if (pmap == kernel_pmap) return ((va < kmi.clean_sva) || (va >= kmi.clean_eva)); @@ -379,7 +476,7 @@ /* Allocate page table. */ static void -ptbl_alloc(pmap_t pmap, unsigned int pdir_idx) +ptbl_alloc(mmu_t mmu, pmap_t pmap, unsigned int pdir_idx) { vm_page_t mtbl[PTBL_PAGES]; vm_page_t m; @@ -414,8 +511,9 @@ mtbl[i] = m; } - /* Mapin allocated pages into kernel_pmap. */ - pmap_qenter((vm_offset_t)pmap->pm_pdir[pdir_idx], mtbl, PTBL_PAGES); + /* Map in allocated pages into kernel_pmap. */ + mmu_booke_qenter(mmu, (vm_offset_t)pmap->pm_pdir[pdir_idx], mtbl, + PTBL_PAGES); /* Zero whole ptbl. */ bzero((caddr_t)pmap->pm_pdir[pdir_idx], PTBL_PAGES * PAGE_SIZE); @@ -428,7 +526,7 @@ /* Free ptbl pages and invalidate pdir entry. */ static void -ptbl_free(pmap_t pmap, unsigned int pdir_idx) +ptbl_free(mmu_t mmu, pmap_t pmap, unsigned int pdir_idx) { pte_t *ptbl; vm_paddr_t pa; @@ -449,11 +547,11 @@ for (i = 0; i < PTBL_PAGES; i++) { va = ((vm_offset_t)ptbl + (i * PAGE_SIZE)); - pa = pte_vatopa(kernel_pmap, va); + pa = pte_vatopa(mmu, kernel_pmap, va); m = PHYS_TO_VM_PAGE(pa); vm_page_free_zero(m); atomic_subtract_int(&cnt.v_wire_count, 1); - pmap_kremove(va); + mmu_booke_kremove(mmu, va); } ptbl_free_pmap_ptbl(pmap, ptbl); @@ -469,7 +567,7 @@ * Return 1 if ptbl pages were freed. */ static int -ptbl_unhold(pmap_t pmap, unsigned int pdir_idx) +ptbl_unhold(mmu_t mmu, pmap_t pmap, unsigned int pdir_idx) { pte_t *ptbl; vm_paddr_t pa; @@ -492,7 +590,7 @@ /* decrement hold count */ for (i = 0; i < PTBL_PAGES; i++) { - pa = pte_vatopa(kernel_pmap, (vm_offset_t)ptbl + (i * PAGE_SIZE)); + pa = pte_vatopa(mmu, kernel_pmap, (vm_offset_t)ptbl + (i * PAGE_SIZE)); m = PHYS_TO_VM_PAGE(pa); m->wire_count--; } @@ -503,7 +601,7 @@ * the last page. */ if (m->wire_count == 0) { - ptbl_free(pmap, pdir_idx); + ptbl_free(mmu, pmap, pdir_idx); //debugf("ptbl_unhold: e (freed ptbl)\n"); return (1); @@ -518,7 +616,7 @@ * new pte entry is being inserted into ptbl. */ static void -ptbl_hold(pmap_t pmap, unsigned int pdir_idx) +ptbl_hold(mmu_t mmu, pmap_t pmap, unsigned int pdir_idx) { vm_paddr_t pa; pte_t *ptbl; @@ -537,7 +635,7 @@ KASSERT((ptbl != NULL), ("ptbl_hold: null ptbl")); for (i = 0; i < PTBL_PAGES; i++) { - pa = pte_vatopa(kernel_pmap, (vm_offset_t)ptbl + (i * PAGE_SIZE)); + pa = pte_vatopa(mmu, kernel_pmap, (vm_offset_t)ptbl + (i * PAGE_SIZE)); m = PHYS_TO_VM_PAGE(pa); m->wire_count++; } @@ -546,22 +644,22 @@ } /* Allocate pv_entry structure. */ -static __inline pv_entry_t +pv_entry_t pv_alloc(void) { pv_entry_t pv; - //debugf("pv_alloc: s\n"); + debugf("pv_alloc: s\n"); pv_entry_count++; if ((pv_entry_count > pv_entry_high_water) && - (pmap_pagedaemon_waken == 0)) { - pmap_pagedaemon_waken = 1; + (pagedaemon_waken == 0)) { + pagedaemon_waken = 1; wakeup (&vm_pages_needed); } pv = uma_zalloc(pvzone, M_NOWAIT); - //debugf("pv_alloc: s\n"); + debugf("pv_alloc: e\n"); return (pv); } @@ -585,7 +683,8 @@ pv_entry_t pve; //int su = (pmap == kernel_pmap); - //debugf("pv_insert: s (su = %d pmap = 0x%08x va = 0x%08x)\n", su, (u_int32_t)pmap, va); + //debugf("pv_insert: s (su = %d pmap = 0x%08x va = 0x%08x m = 0x%08x)\n", su, + // (u_int32_t)pmap, va, (u_int32_t)m); pve = pv_alloc(); if (pve == NULL) @@ -597,6 +696,7 @@ /* add to pv_list */ PMAP_LOCK_ASSERT(pmap, MA_OWNED); mtx_assert(&vm_page_queue_mtx, MA_OWNED); + TAILQ_INSERT_TAIL(&m->md.pv_list, pve, pv_link); //debugf("pv_insert: e\n"); @@ -638,7 +738,7 @@ * Return 1 if ptbl pages were freed, otherwise return 0. */ static int -pte_remove(pmap_t pmap, vm_offset_t va, u_int8_t flags) +pte_remove(mmu_t mmu, pmap_t pmap, vm_offset_t va, u_int8_t flags) { unsigned int pdir_idx = PDIR_IDX(va); unsigned int ptbl_idx = PTBL_IDX(va); @@ -670,7 +770,7 @@ /* Handle modified pages. */ if (PTE_ISMODIFIED(pte)) { - if (pmap_track_modified(pmap, va)) + if (mmu_booke_track_modified(pmap, va)) vm_page_dirty(m); } @@ -689,7 +789,7 @@ if (flags & PTBL_UNHOLD) { //debugf("pte_remove: e (unhold)\n"); - return (ptbl_unhold(pmap, pdir_idx)); + return (ptbl_unhold(mmu, pmap, pdir_idx)); } //debugf("pte_remove: e\n"); @@ -699,8 +799,8 @@ /* * Insert PTE for a given page and virtual address. */ -static void -pte_enter(pmap_t pmap, vm_page_t m, vm_offset_t va, u_int32_t flags) +void +pte_enter(mmu_t mmu, pmap_t pmap, vm_page_t m, vm_offset_t va, u_int32_t flags) { unsigned int pdir_idx = PDIR_IDX(va); unsigned int ptbl_idx = PTBL_IDX(va); @@ -720,18 +820,18 @@ */ pte = &pmap->pm_pdir[pdir_idx][ptbl_idx]; if (PTE_ISVALID(pte)) { - pte_remove(pmap, va, PTBL_HOLD); + pte_remove(mmu, pmap, va, PTBL_HOLD); } else { /* * pte is not used, increment hold count * for ptbl pages. */ if (pmap != kernel_pmap) - ptbl_hold(pmap, pdir_idx); + ptbl_hold(mmu, pmap, pdir_idx); } } else { /* Allocate page table pages. */ - ptbl_alloc(pmap, pdir_idx); + ptbl_alloc(mmu, pmap, pdir_idx); } /* Flush entry from TLB. */ @@ -763,12 +863,12 @@ /* Return the pa for the given pmap/va. */ static vm_paddr_t -pte_vatopa(pmap_t pmap, vm_offset_t va) +pte_vatopa(mmu_t mmu, pmap_t pmap, vm_offset_t va) { vm_paddr_t pa = 0; pte_t *pte; - pte = pte_find(pmap, va); + pte = pte_find(mmu, pmap, va); if ((pte != NULL) && PTE_ISVALID(pte)) pa = (PTE_PA(pte) | (va & PTE_PA_MASK)); return (pa); @@ -776,7 +876,7 @@ /* Get a pointer to a PTE in a page table. */ static pte_t * -pte_find(pmap_t pmap, vm_offset_t va) +pte_find(mmu_t mmu, pmap_t pmap, vm_offset_t va) { unsigned int pdir_idx = PDIR_IDX(va); unsigned int ptbl_idx = PTBL_IDX(va); @@ -797,16 +897,17 @@ * This is called during e500_init, before the system is really initialized. */ void -pmap_bootstrap(vm_offset_t kernelstart, vm_offset_t kernelend) +mmu_booke_bootstrap(mmu_t mmu, vm_offset_t kernelstart, vm_offset_t kernelend) { vm_offset_t phys_kernelend; struct mem_region *mp, *mp1; int cnt, i, j; u_int s, e, sz; + u_int phys_avail_count; vm_size_t physsz, hwphyssz; vm_offset_t kernel_pdir; - debugf("pmap_bootstrap: entered\n"); + debugf("mmu_booke_bootstrap: entered\n"); /* Align kernel start and end address (kernel image). */ kernelstart = trunc_page(kernelstart); @@ -861,18 +962,18 @@ virtual_end = VM_MAX_KERNEL_ADDRESS; /* Allocate KVA space for page zero/copy operations. */ - pmap_zero_page_va = virtual_avail; + zero_page_va = virtual_avail; virtual_avail += PAGE_SIZE; - pmap_zero_page_idle_va = virtual_avail; + zero_page_idle_va = virtual_avail; virtual_avail += PAGE_SIZE; - pmap_copy_page_src_va = virtual_avail; + copy_page_src_va = virtual_avail; virtual_avail += PAGE_SIZE; - pmap_copy_page_dst_va = virtual_avail; + copy_page_dst_va = virtual_avail; virtual_avail += PAGE_SIZE; /* Initialize page zero/copy mutexes. */ - mtx_init(&pmap_zero_page_mutex, "pmap_zero_page", NULL, MTX_DEF); - mtx_init(&pmap_copy_page_mutex, "pmap_copy_page", NULL, MTX_DEF); + mtx_init(&zero_page_mutex, "mmu_booke_zero_page", NULL, MTX_DEF); + mtx_init(©_page_mutex, "mmu_booke_copy_page", NULL, MTX_DEF); /* Initialize tlb0 table mutex. */ mtx_init(&tlb0_mutex, "tlb0", NULL, MTX_SPIN | MTX_RECURSE); @@ -894,8 +995,8 @@ debugf(" kernelend = 0x%08x\n", kernelend); debugf(" kernel size = 0x%08x\n", kernelend - kernelstart); - if (sizeof(phys_avail)/sizeof(phys_avail[0]) < availmem_regions_sz) - panic("pmap_bootstrap: phys_avail too small"); + if (sizeof(phys_avail) / sizeof(phys_avail[0]) < availmem_regions_sz) + panic("mmu_booke_bootstrap: phys_avail too small"); /* * Removed kernel physical address range from avail @@ -1032,19 +1133,19 @@ /* Initialize TLB0 handling. */ tlb0_init(); - debugf("pmap_bootstrap: exit\n"); + debugf("mmu_booke_bootstrap: exit\n"); } /* * Get the physical page address for the given pmap/virtual address. */ vm_paddr_t -pmap_extract(pmap_t pmap, vm_offset_t va) +mmu_booke_extract(mmu_t mmu, pmap_t pmap, vm_offset_t va) { vm_paddr_t pa; PMAP_LOCK(pmap); - pa = pte_vatopa(pmap, va); + pa = pte_vatopa(mmu, pmap, va); PMAP_UNLOCK(pmap); return (pa); @@ -1055,9 +1156,9 @@ * kernel virtual address. */ vm_paddr_t -pmap_kextract(vm_offset_t va) +mmu_booke_kextract(mmu_t mmu, vm_offset_t va) { - return pte_vatopa(kernel_pmap, va); + return pte_vatopa(mmu, kernel_pmap, va); } /* @@ -1066,11 +1167,11 @@ * system needs to map virtual memory. */ void -pmap_init(void) +mmu_booke_init(mmu_t mmu) { int shpgperproc = PMAP_SHPGPERPROC; - //debugf("pmap_init: s\n"); + //debugf("mmu_booke_init: s\n"); /* * Initialize the address space (zone) for the pv entries. Set a @@ -1094,7 +1195,7 @@ /* Initialize ptbl allocation. */ ptbl_init(); - //debugf("pmap_init: e\n"); + //debugf("mmu_booke_init: e\n"); } /* @@ -1103,58 +1204,58 @@ * references recorded. Existing mappings in the region are overwritten. */ void -pmap_qenter(vm_offset_t sva, vm_page_t *m, int count) +mmu_booke_qenter(mmu_t mmu, vm_offset_t sva, vm_page_t *m, int count) { vm_offset_t va; - //debugf("pmap_qenter: s (sva = 0x%08x count = %d)\n", sva, count); + //debugf("mmu_booke_qenter: s (sva = 0x%08x count = %d)\n", sva, count); va = sva; while (count-- > 0) { - pmap_kenter(va, VM_PAGE_TO_PHYS(*m)); + mmu_booke_kenter(mmu, va, VM_PAGE_TO_PHYS(*m)); va += PAGE_SIZE; m++; } - //debugf("pmap_qenter: e\n"); + //debugf("mmu_booke_qenter: e\n"); } /* * Remove page mappings from kernel virtual address space. Intended for - * temporary mappings entered by pmap_qenter. + * temporary mappings entered by mmu_booke_qenter. */ void -pmap_qremove(vm_offset_t sva, int count) +mmu_booke_qremove(mmu_t mmu, vm_offset_t sva, int count) { vm_offset_t va; - //debugf("pmap_qremove: s (sva = 0x%08x count = %d)\n", sva, count); + //debugf("mmu_booke_qremove: s (sva = 0x%08x count = %d)\n", sva, count); va = sva; while (count-- > 0) { - pmap_kremove(va); + mmu_booke_kremove(mmu, va); va += PAGE_SIZE; } - //debugf("pmap_qremove: e\n"); + //debugf("mmu_booke_qremove: e\n"); } /* * Map a wired page into kernel virtual address space. */ void -pmap_kenter(vm_offset_t va, vm_offset_t pa) +mmu_booke_kenter(mmu_t mmu, vm_offset_t va, vm_offset_t pa) { unsigned int pdir_idx = PDIR_IDX(va); unsigned int ptbl_idx = PTBL_IDX(va); u_int32_t flags; pte_t *pte; - //debugf("pmap_kenter: s (pdir_idx = %d ptbl_idx = %d va=0x%08x pa=0x%08x)\n", + //debugf("mmu_booke_kenter: s (pdir_idx = %d ptbl_idx = %d va=0x%08x pa=0x%08x)\n", // pdir_idx, ptbl_idx, va, pa); KASSERT(((va >= VM_MIN_KERNEL_ADDRESS) && (va <= VM_MAX_KERNEL_ADDRESS)), - ("pmap_kenter: invalid va")); + ("mmu_booke_kenter: invalid va")); #if 0 /* assume IO mapping, set I, G bits */ @@ -1178,7 +1279,7 @@ pte = &(kernel_pmap->pm_pdir[pdir_idx][ptbl_idx]); if (PTE_ISVALID(pte)) { - //debugf("pmap_kenter: replacing entry!\n"); + //debugf("mmu_booke_kenter: replacing entry!\n"); /* Flush entry from TLB0 */ tlb0_flush_entry(kernel_pmap, va); @@ -1187,7 +1288,7 @@ pte->rpn = pa & ~PTE_PA_MASK; pte->flags = flags; - //debugf("pmap_kenter: pdir_idx = %d ptbl_idx = %d va=0x%08x " + //debugf("mmu_booke_kenter: pdir_idx = %d ptbl_idx = %d va=0x%08x " // "pa=0x%08x rpn=0x%08x flags=0x%08x\n", // pdir_idx, ptbl_idx, va, pa, pte->rpn, pte->flags); @@ -1196,28 +1297,28 @@ __syncicache((void *)va, PAGE_SIZE); } - //debugf("pmap_kenter: e\n"); + //debugf("mmu_booke_kenter: e\n"); } /* * Remove a page from kernel page table. */ void -pmap_kremove(vm_offset_t va) +mmu_booke_kremove(mmu_t mmu, vm_offset_t va) { unsigned int pdir_idx = PDIR_IDX(va); unsigned int ptbl_idx = PTBL_IDX(va); pte_t *pte; - //debugf("pmap_kremove: s (va = 0x%08x)\n", va); + //debugf("mmu_booke_kremove: s (va = 0x%08x)\n", va); KASSERT(((va >= VM_MIN_KERNEL_ADDRESS) && (va <= VM_MAX_KERNEL_ADDRESS)), - ("pmap_kremove: invalid va")); + ("mmu_booke_kremove: invalid va")); pte = &(kernel_pmap->pm_pdir[pdir_idx][ptbl_idx]); if (!PTE_ISVALID(pte)) { - //debugf("pmap_kremove: e (invalid pte)\n"); + //debugf("mmu_booke_kremove: e (invalid pte)\n"); return; } @@ -1227,37 +1328,37 @@ pte->flags = 0; pte->rpn = 0; - //debugf("pmap_kremove: e\n"); + //debugf("mmu_booke_kremove: e\n"); } /* * Initialize the pmap associated with process 0. */ void -pmap_pinit0(pmap_t pmap) +mmu_booke_pinit0(mmu_t mmu, pmap_t pmap) { - //debugf("pmap_pinit0: s (pmap = 0x%08x)\n", (u_int32_t)pmap); - pmap_pinit(pmap); + //debugf("mmu_booke_pinit0: s (pmap = 0x%08x)\n", (u_int32_t)pmap); + mmu_booke_pinit(mmu, pmap); PCPU_SET(curpmap, pmap); - //debugf("pmap_pinit0: e\n"); + //debugf("mmu_booke_pinit0: e\n"); } /* * Initialize a preallocated and zeroed pmap structure, * such as one in a vmspace structure. */ -int -pmap_pinit(pmap_t pmap) +void +mmu_booke_pinit(mmu_t mmu, pmap_t pmap) { //struct thread *td; //struct proc *p; //td = PCPU_GET(curthread); //p = td->td_proc; - //debugf("pmap_pinit: s (pmap = 0x%08x)\n", (u_int32_t)pmap); - //printf("pmap_pinit: proc %d '%s'\n", p->p_pid, p->p_comm); + //debugf("mmu_booke_pinit: s (pmap = 0x%08x)\n", (u_int32_t)pmap); + //printf("mmu_booke_pinit: proc %d '%s'\n", p->p_pid, p->p_comm); - KASSERT((pmap != kernel_pmap), ("pmap_pinit: initializing kernel_pmap")); + KASSERT((pmap != kernel_pmap), ("mmu_booke_pinit: initializing kernel_pmap")); PMAP_LOCK_INIT(pmap); pmap->pm_tid = 0; @@ -1267,30 +1368,31 @@ TAILQ_INIT(&pmap->ptbl_list); - //debugf("pmap_pinit: e\n"); - return (1); + //debugf("mmu_booke_pinit: e\n"); } /* * Release any resources held by the given physical map. - * Called when a pmap initialized by pmap_pinit is being released. + * Called when a pmap initialized by mmu_booke_pinit is being released. * Should only be called if the map contains no valid mappings. */ void -pmap_release(pmap_t pmap) +mmu_booke_release(mmu_t mmu, pmap_t pmap) { - //debugf("pmap_release: s\n"); + //debugf("mmu_booke_release: s\n"); PMAP_LOCK_DESTROY(pmap); - //debugf("pmap_release: e\n"); + //debugf("mmu_booke_release: e\n"); } +#if 0 /* Not needed, kernel page tables are statically allocated. */ void -pmap_growkernel(vm_offset_t maxkvaddr) +mmu_booke_growkernel(vm_offset_t maxkvaddr) { } +#endif /* * Insert the given physical page at the specified virtual address in the @@ -1298,19 +1400,19 @@ * will be wired down. */ void -pmap_enter(pmap_t pmap, vm_offset_t va, vm_page_t m, vm_prot_t prot, - boolean_t wired) +mmu_booke_enter(mmu_t mmu, pmap_t pmap, vm_offset_t va, vm_page_t m, + vm_prot_t prot, boolean_t wired) { vm_page_lock_queues(); PMAP_LOCK(pmap); - pmap_enter_locked(pmap, va, m, prot, wired); + mmu_booke_enter_locked(mmu, pmap, va, m, prot, wired); vm_page_unlock_queues(); PMAP_UNLOCK(pmap); } static void -pmap_enter_locked(pmap_t pmap, vm_offset_t va, vm_page_t m, vm_prot_t prot, - boolean_t wired) +mmu_booke_enter_locked(mmu_t mmu, pmap_t pmap, vm_offset_t va, vm_page_t m, + vm_prot_t prot, boolean_t wired) { pte_t *pte; vm_paddr_t pa; @@ -1321,17 +1423,17 @@ su = (pmap == kernel_pmap); sync = 0; - //debugf("pmap_enter_locked: s (pmap=0x%08x su=%d tid=%d m=0x%08x va=0x%08x " + //debugf("mmu_booke_enter_locked: s (pmap=0x%08x su=%d tid=%d m=0x%08x va=0x%08x " // "pa=0x%08x prot=0x%08x wired=%d)\n", // (u_int32_t)pmap, su, pmap->pm_tid, // (u_int32_t)m, va, pa, prot, wired); if (su) { KASSERT(((va >= virtual_avail) && (va <= VM_MAX_KERNEL_ADDRESS)), - ("pmap_enter_locked: kernel pmap, non kernel va")); + ("mmu_booke_enter_locked: kernel pmap, non kernel va")); } else { KASSERT((va <= VM_MAXUSER_ADDRESS), - ("pmap_enter_locked: user pmap, non user va")); + ("mmu_booke_enter_locked: user pmap, non user va")); } PMAP_LOCK_ASSERT(pmap, MA_OWNED); @@ -1340,10 +1442,10 @@ * If there is an existing mapping, and the physical address has not * changed, must be protection or wiring change. */ - if (((pte = pte_find(pmap, va)) != NULL) && + if (((pte = pte_find(mmu, pmap, va)) != NULL) && (PTE_ISVALID(pte)) && (PTE_PA(pte) == pa)) { - //debugf("pmap_enter_locked: update\n"); + //debugf("mmu_booke_enter_locked: update\n"); /* Wiring change, just update stats. */ if (wired) { @@ -1371,7 +1473,7 @@ } else { /* Handle modified pages, sense modify status. */ if (PTE_ISMODIFIED(pte)) { - if (pmap_track_modified(pmap, va)) + if (mmu_booke_track_modified(pmap, va)) vm_page_dirty(m); } } @@ -1395,9 +1497,9 @@ * physical address, pte_enter() will delete the old mapping. */ //if ((pte != NULL) && PTE_ISVALID(pte)) - // debugf("pmap_enter_locked: replace\n"); + // debugf("mmu_booke_enter_locked: replace\n"); //else - // debugf("pmap_enter_locked: new\n"); + // debugf("mmu_booke_enter_locked: new\n"); /* Now set up the flags and install the new mapping. */ flags = (PTE_SR | PTE_VALID); @@ -1423,7 +1525,7 @@ flags |= PTE_WIRED; } - pte_enter(pmap, m, va, flags); + pte_enter(mmu, pmap, m, va, flags); /* Flush the real memory from the instruction cache. */ if (prot & VM_PROT_EXECUTE) @@ -1440,16 +1542,16 @@ pmap = PCPU_GET(curpmap); va = 0; - pte = pte_find(pmap, va); + pte = pte_find(mmu, pmap, va); KASSERT(pte == NULL, ("%s:%d", __func__, __LINE__)); flags = PTE_SR | PTE_VALID | PTE_UR; - pte_enter(pmap, m, va, flags); + pte_enter(mmu, pmap, m, va, flags); __syncicache((void *)va, PAGE_SIZE); - pte_remove(pmap, va, PTBL_UNHOLD); + pte_remove(mmu, pmap, va, PTBL_UNHOLD); } - //debugf("pmap_enter_locked: e\n"); + //debugf("mmu_booke_enter_locked: e\n"); } /* @@ -1465,8 +1567,8 @@ * corresponding offset from m_start are mapped. */ void -pmap_enter_object(pmap_t pmap, vm_offset_t start, vm_offset_t end, vm_page_t m_start, - vm_prot_t prot) +mmu_booke_enter_object(mmu_t mmu, pmap_t pmap, vm_offset_t start, >>> TRUNCATED FOR MAIL (1000 lines) <<< From owner-p4-projects@FreeBSD.ORG Fri Jan 4 18:17:26 2008 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id E560A16A468; Fri, 4 Jan 2008 18:17:25 +0000 (UTC) Delivered-To: perforce@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id A819216A41B; Fri, 4 Jan 2008 18:17:25 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from speedfactory.net (mail.speedfactory.net [66.23.216.219]) by mx1.freebsd.org (Postfix) with ESMTP id 41C5313C43E; Fri, 4 Jan 2008 18:17:24 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from server.baldwin.cx (unverified [66.23.211.162]) by speedfactory.net (SurgeMail 3.8q) with ESMTP id 227295698-1834499 for multiple; Fri, 04 Jan 2008 13:15:33 -0500 Received: from localhost.corp.yahoo.com (john@localhost [127.0.0.1]) (authenticated bits=0) by server.baldwin.cx (8.13.8/8.13.8) with ESMTP id m04IHLIh040985; Fri, 4 Jan 2008 13:17:21 -0500 (EST) (envelope-from jhb@freebsd.org) From: John Baldwin To: Warner Losh Date: Fri, 4 Jan 2008 13:14:36 -0500 User-Agent: KMail/1.9.6 References: <200801032108.m03L8GQA029462@repoman.freebsd.org> In-Reply-To: <200801032108.m03L8GQA029462@repoman.freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-15" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200801041314.36713.jhb@freebsd.org> X-Greylist: Sender succeeded SMTP AUTH authentication, not delayed by milter-greylist-2.0.2 (server.baldwin.cx [127.0.0.1]); Fri, 04 Jan 2008 13:17:21 -0500 (EST) X-Virus-Scanned: ClamAV 0.91.2/5363/Fri Jan 4 08:37:27 2008 on server.baldwin.cx X-Virus-Status: Clean X-Spam-Status: No, score=-4.4 required=4.2 tests=ALL_TRUSTED,AWL,BAYES_00 autolearn=ham version=3.1.3 X-Spam-Checker-Version: SpamAssassin 3.1.3 (2006-06-01) on server.baldwin.cx Cc: Perforce Change Reviews Subject: Re: PERFORCE change 132425 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 04 Jan 2008 18:17:26 -0000 On Thursday 03 January 2008 04:08:16 pm Warner Losh wrote: > http://perforce.freebsd.org/chv.cgi?CH=132425 > > Change 132425 by imp@imp_paco-paco on 2008/01/03 21:08:04 > > Trap compiles now. not 100% sure of the changes, so we should have > many eyes look here... > > Affected files ... > > .. //depot/projects/mips2-jnpr/src/sys/mips/mips/trap.c#5 edit > > Differences ... > > ==== //depot/projects/mips2-jnpr/src/sys/mips/mips/trap.c#5 (text+ko) ==== > > @@ -824,7 +811,7 @@ > STOPEVENT(p, S_SCX, code); > > PTRACESTOP_SC(p, td, S_PT_SCX); > - > +#ifdef GONE_IN_7 > WITNESS_WARN(WARN_PANIC, NULL, "System call %s returning", > (code >= 0 && code < SYS_MAXSYSCALL) ? > syscallnames[code] : "???"); The witness warn should still be around in 7, but it is a bit earlier after the system call returns just before calling userret(). > @@ -833,7 +820,7 @@ > if (curthread->td_flags & (TDF_ASTPENDING|TDF_NEEDRESCHED)) { > ast(trapframe); > } > - > +#endif ast() is also still relevant in 7 as well. What normally happens is that you have the following in assembly: trap_entry: setup regs call trap jmp exittrap syscall_entry: setup regs call syscall jmp exittrap exittrap: get ready to return from trap disable interrupts if returning to kernel jmp kernel asts: if no ASTs are pending jmp kernel enable interrupts call ast disable interrupts jmp asts kernel: restore registers reti or some such. You could do it in C if you wanted, but the idea is you want to only return to userland once you've verified you have no ASTs with interrupts disabled. If you get any AST's while returning to userland it's due to SMP and you will get an IPI that will post with 'reti' finishes. -- John Baldwin From owner-p4-projects@FreeBSD.ORG Fri Jan 4 18:21:22 2008 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 4E3E616A41A; Fri, 4 Jan 2008 18:21:22 +0000 (UTC) Delivered-To: perforce@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 135B116A417; Fri, 4 Jan 2008 18:21:22 +0000 (UTC) (envelope-from imp@bsdimp.com) Received: from harmony.bsdimp.com (bsdimp.com [199.45.160.85]) by mx1.freebsd.org (Postfix) with ESMTP id CDCD313C465; Fri, 4 Jan 2008 18:21:21 +0000 (UTC) (envelope-from imp@bsdimp.com) Received: from localhost (localhost [127.0.0.1]) by harmony.bsdimp.com (8.14.1/8.14.1) with ESMTP id m04IIvWC024902; Fri, 4 Jan 2008 11:18:57 -0700 (MST) (envelope-from imp@bsdimp.com) Date: Fri, 04 Jan 2008 11:19:26 -0700 (MST) Message-Id: <20080104.111926.-108774279.imp@bsdimp.com> To: gonzo@freebsd.org From: "M. Warner Losh" In-Reply-To: <200801041711.m04HBGPG029002@repoman.freebsd.org> References: <200801041711.m04HBGPG029002@repoman.freebsd.org> X-Mailer: Mew version 5.2 on Emacs 21.3 / Mule 5.0 (SAKAKI) Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit Cc: perforce@freebsd.org Subject: Re: PERFORCE change 132497 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 04 Jan 2008 18:21:22 -0000 In message: <200801041711.m04HBGPG029002@repoman.freebsd.org> Oleksandr Tymoshenko writes: : http://perforce.freebsd.org/chv.cgi?CH=132497 : : Change 132497 by gonzo@gonzo_jeeves on 2008/01/04 17:11:07 : : o I believe MK_ZFS is more appropriate variable to be checked : in this case. I thought this was more a case of 'exclude all CDDL code' rather than being tied to ZFS. Warner : Affected files ... : : .. //depot/projects/mips2-jnpr/src/usr.bin/fstat/Makefile#2 edit : : Differences ... : : ==== //depot/projects/mips2-jnpr/src/usr.bin/fstat/Makefile#2 (text+ko) ==== : : @@ -13,7 +13,7 @@ : : CFLAGS+=-D_KVM_VNODE : : -.if ${MK_CDDL} != "no" : +.if ${MK_ZFS} != "no" : CFLAGS+= -DZFS : OBJS+= zfs/zfs.o : SUBDIR= zfs : From owner-p4-projects@FreeBSD.ORG Fri Jan 4 18:21:24 2008 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 5711B16A4AB; Fri, 4 Jan 2008 18:21:24 +0000 (UTC) Delivered-To: perforce@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 1A5FA16A46B; Fri, 4 Jan 2008 18:21:22 +0000 (UTC) (envelope-from imp@bsdimp.com) Received: from harmony.bsdimp.com (bsdimp.com [199.45.160.85]) by mx1.freebsd.org (Postfix) with ESMTP id 53AA713C467; Fri, 4 Jan 2008 18:21:22 +0000 (UTC) (envelope-from imp@bsdimp.com) Received: from localhost (localhost [127.0.0.1]) by harmony.bsdimp.com (8.14.1/8.14.1) with ESMTP id m04II772024899; Fri, 4 Jan 2008 11:18:07 -0700 (MST) (envelope-from imp@bsdimp.com) Date: Fri, 04 Jan 2008 11:18:36 -0700 (MST) Message-Id: <20080104.111836.857606070.imp@bsdimp.com> To: gonzo@freebsd.org From: "M. Warner Losh" In-Reply-To: <200801041637.m04GbdT4016593@repoman.freebsd.org> References: <200801041637.m04GbdT4016593@repoman.freebsd.org> X-Mailer: Mew version 5.2 on Emacs 21.3 / Mule 5.0 (SAKAKI) Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit Cc: perforce@freebsd.org Subject: Re: PERFORCE change 132493 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 04 Jan 2008 18:21:24 -0000 I think that the NTOHL, et al, macros came from 4.2BSD and we need to keep them. Warner In message: <200801041637.m04GbdT4016593@repoman.freebsd.org> Oleksandr Tymoshenko writes: : http://perforce.freebsd.org/chv.cgi?CH=132493 : : Change 132493 by gonzo@gonzo_jeeves on 2008/01/04 16:37:32 : : o Rempove NTOHL/NTOHS/etc... macroses, they came from NetBSD land : o Add definition for __ntohl/__ntohs/etc... macroses for LE build : o Some cosmetics : : Affected files ... : : .. //depot/projects/mips2-jnpr/src/sys/mips/include/endian.h#5 edit : : Differences ... : : ==== //depot/projects/mips2-jnpr/src/sys/mips/include/endian.h#5 (text+ko) ==== : : @@ -111,33 +111,21 @@ : /* : * Define the order of 32-bit words in 64-bit words. : */ : -#if _BYTE_ORDER == LITTLE_ENDIAN : -#define _QUAD_HIGHWORD 1 : -#define _QUAD_LOWWORD 0 : -#endif : - : #if _BYTE_ORDER == BIG_ENDIAN : #define _QUAD_HIGHWORD 0 : #define _QUAD_LOWWORD 1 : -#endif : - : -#if _BYTE_ORDER == BIG_ENDIAN : #define __htonl(x) ((__uint32_t)(x)) : #define __htons(x) ((__uint16_t)(x)) : #define __ntohl(x) ((__uint32_t)(x)) : #define __ntohs(x) ((__uint16_t)(x)) : -#endif : - : - : -/* : - * Macros for network/external number representation conversion. : - */ : - : -#define NTOHL(x) (x) = __ntohl((x)) : -#define NTOHS(x) (x) = __ntohs((x)) : -#define HTONQ(x) (x) = __htonq((x)) : -#define HTONL(x) (x) = __htonl((x)) : -#define HTONS(x) (x) = __htons((x)) : +#else : +#define _QUAD_HIGHWORD 1 : +#define _QUAD_LOWWORD 0 : +#define __ntohl(x) (__bswap32(x)) : +#define __ntohs(x) (__bswap16(x)) : +#define __htonl(x) (__bswap32(x)) : +#define __htons(x) (__bswap16(x)) : +#endif /* _BYTE_ORDER == BIG_ENDIAN */ : : #endif /* !_POSIX_SOURCE */ : #endif /* !_MACHINE_ENDIAN_H_ */ : From owner-p4-projects@FreeBSD.ORG Fri Jan 4 18:32:03 2008 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 735DB16A418; Fri, 4 Jan 2008 18:32:03 +0000 (UTC) Delivered-To: perforce@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 390C716A41B for ; Fri, 4 Jan 2008 18:32:03 +0000 (UTC) (envelope-from gonzo@freebsd.org) Received: from bugor.portaone.com (bugor.portaone.com [65.61.203.147]) by mx1.freebsd.org (Postfix) with ESMTP id 21CFC13C468 for ; Fri, 4 Jan 2008 18:32:03 +0000 (UTC) (envelope-from gonzo@freebsd.org) Received: from mail.pbxpress.com ([65.61.203.142] helo=leaf.pbxpress.com) by bugor.portaone.com (8.11.3/8.11.3) with ESMTP (TLSv1:AES256-SHA:256)id 1JArKs-0003LD-K5; Fri, 04 Jan 2008 10:32:02 -0800 Received: from jeeves.bluezbox.com (k3-gw.portaone.com [193.28.87.193]) (authenticated bits=0) by leaf.pbxpress.com (8.13.3/8.13.3) with ESMTP id m04IWIfl083157 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Fri, 4 Jan 2008 10:32:20 -0800 (PST) (envelope-from gonzo@freebsd.org) Message-ID: <477E7BA1.9000105@freebsd.org> Date: Fri, 04 Jan 2008 20:32:01 +0200 From: Oleksandr Tymoshenko User-Agent: Thunderbird 2.0.0.6 (X11/20070907) MIME-Version: 1.0 To: "M. Warner Losh" References: <200801041637.m04GbdT4016593@repoman.freebsd.org> <20080104.111836.857606070.imp@bsdimp.com> In-Reply-To: <20080104.111836.857606070.imp@bsdimp.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Status: No, recieved from trusted server Cc: Perforce Change Reviews Subject: Re: PERFORCE change 132493 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 04 Jan 2008 18:32:03 -0000 M. Warner Losh wrote: > I think that the NTOHL, et al, macros came from 4.2BSD and we need to > keep them. I checked before removing them - there are no such macroses in other platforms code, though they are defined in pf(4) code with explicit #ifdef __FreeBSD__, libpcap, ntpd and tcpdump code. NetBSD has them defined in sys/endian.h, so I took it they're not FreeBSD-scecific. -- gonzo From owner-p4-projects@FreeBSD.ORG Fri Jan 4 18:40:43 2008 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id EDAE016A419; Fri, 4 Jan 2008 18:40:42 +0000 (UTC) Delivered-To: perforce@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id B08F316A417; Fri, 4 Jan 2008 18:40:42 +0000 (UTC) (envelope-from brooks@lor.one-eyed-alien.net) Received: from lor.one-eyed-alien.net (cl-162.ewr-01.us.sixxs.net [IPv6:2001:4830:1200:a1::2]) by mx1.freebsd.org (Postfix) with ESMTP id 2D12A13C459; Fri, 4 Jan 2008 18:40:42 +0000 (UTC) (envelope-from brooks@lor.one-eyed-alien.net) Received: from lor.one-eyed-alien.net (localhost [127.0.0.1]) by lor.one-eyed-alien.net (8.14.1/8.13.8) with ESMTP id m04IeatS045098; Fri, 4 Jan 2008 12:40:36 -0600 (CST) (envelope-from brooks@lor.one-eyed-alien.net) Received: (from brooks@localhost) by lor.one-eyed-alien.net (8.14.1/8.13.8/Submit) id m04IeakB045097; Fri, 4 Jan 2008 12:40:36 -0600 (CST) (envelope-from brooks) Date: Fri, 4 Jan 2008 12:40:36 -0600 From: Brooks Davis To: "M. Warner Losh" Message-ID: <20080104184036.GB44815@lor.one-eyed-alien.net> References: <200801041711.m04HBGPG029002@repoman.freebsd.org> <20080104.111926.-108774279.imp@bsdimp.com> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="NDin8bjvE/0mNLFQ" Content-Disposition: inline In-Reply-To: <20080104.111926.-108774279.imp@bsdimp.com> User-Agent: Mutt/1.5.16 (2007-06-09) X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-3.0 (lor.one-eyed-alien.net [127.0.0.1]); Fri, 04 Jan 2008 12:40:37 -0600 (CST) Cc: gonzo@freebsd.org, perforce@freebsd.org Subject: Re: PERFORCE change 132497 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 04 Jan 2008 18:40:43 -0000 --NDin8bjvE/0mNLFQ Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Fri, Jan 04, 2008 at 11:19:26AM -0700, M. Warner Losh wrote: > In message: <200801041711.m04HBGPG029002@repoman.freebsd.org> > Oleksandr Tymoshenko writes: > : http://perforce.freebsd.org/chv.cgi?CH=3D132497 > :=20 > : Change 132497 by gonzo@gonzo_jeeves on 2008/01/04 17:11:07 > :=20 > : o I believe MK_ZFS is more appropriate variable to be checked > : in this case. >=20 > I thought this was more a case of 'exclude all CDDL code' rather than > being tied to ZFS. ${MK_CDDL} =3D=3D "no" absolutely needs to cause ZFS bits to not build. I'm not sure if ${MK_CDDL} =3D=3D "no" implies ${MK_ZFS} !=3D "no". If so this= is OK, if not it isn't. -- Brooks > Warner >=20 > : Affected files ... > :=20 > : .. //depot/projects/mips2-jnpr/src/usr.bin/fstat/Makefile#2 edit > :=20 > : Differences ... > :=20 > : =3D=3D=3D=3D //depot/projects/mips2-jnpr/src/usr.bin/fstat/Makefile#2 (= text+ko) =3D=3D=3D=3D > :=20 > : @@ -13,7 +13,7 @@ > : =20 > : CFLAGS+=3D-D_KVM_VNODE > : =20 > : -.if ${MK_CDDL} !=3D "no" > : +.if ${MK_ZFS} !=3D "no" > : CFLAGS+=3D -DZFS > : OBJS+=3D zfs/zfs.o > : SUBDIR=3D zfs > :=20 >=20 --NDin8bjvE/0mNLFQ Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.6 (FreeBSD) iD8DBQFHfn2kXY6L6fI4GtQRAppgAJ9QpvBkC8V539jW5pooqk8kHPSlKQCdEBj3 RUXMZedaJ5BDZF7ZEpzaK3k= =4i0l -----END PGP SIGNATURE----- --NDin8bjvE/0mNLFQ-- From owner-p4-projects@FreeBSD.ORG Fri Jan 4 18:44:39 2008 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 2F64216A420; Fri, 4 Jan 2008 18:44:39 +0000 (UTC) Delivered-To: perforce@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id E986016A41B for ; Fri, 4 Jan 2008 18:44:38 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from speedfactory.net (mail.speedfactory.net [66.23.216.219]) by mx1.freebsd.org (Postfix) with ESMTP id 8F12213C45D for ; Fri, 4 Jan 2008 18:44:38 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from server.baldwin.cx (unverified [66.23.211.162]) by speedfactory.net (SurgeMail 3.8q) with ESMTP id 227301258-1834499 for multiple; Fri, 04 Jan 2008 13:42:41 -0500 Received: from localhost.corp.yahoo.com (john@localhost [127.0.0.1]) (authenticated bits=0) by server.baldwin.cx (8.13.8/8.13.8) with ESMTP id m04IiTF4041197; Fri, 4 Jan 2008 13:44:29 -0500 (EST) (envelope-from jhb@freebsd.org) From: John Baldwin To: "M. Warner Losh" Date: Fri, 4 Jan 2008 13:43:18 -0500 User-Agent: KMail/1.9.6 References: <200801041711.m04HBGPG029002@repoman.freebsd.org> <20080104.111926.-108774279.imp@bsdimp.com> In-Reply-To: <20080104.111926.-108774279.imp@bsdimp.com> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200801041343.19320.jhb@freebsd.org> X-Greylist: Sender succeeded SMTP AUTH authentication, not delayed by milter-greylist-2.0.2 (server.baldwin.cx [127.0.0.1]); Fri, 04 Jan 2008 13:44:29 -0500 (EST) X-Virus-Scanned: ClamAV 0.91.2/5363/Fri Jan 4 08:37:27 2008 on server.baldwin.cx X-Virus-Status: Clean X-Spam-Status: No, score=-4.4 required=4.2 tests=ALL_TRUSTED,AWL,BAYES_00 autolearn=ham version=3.1.3 X-Spam-Checker-Version: SpamAssassin 3.1.3 (2006-06-01) on server.baldwin.cx Cc: gonzo@freebsd.org, perforce@freebsd.org Subject: Re: PERFORCE change 132497 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 04 Jan 2008 18:44:39 -0000 On Friday 04 January 2008 01:19:26 pm M. Warner Losh wrote: > In message: <200801041711.m04HBGPG029002@repoman.freebsd.org> > Oleksandr Tymoshenko writes: > : http://perforce.freebsd.org/chv.cgi?CH=132497 > : > : Change 132497 by gonzo@gonzo_jeeves on 2008/01/04 17:11:07 > : > : o I believe MK_ZFS is more appropriate variable to be checked > : in this case. > > I thought this was more a case of 'exclude all CDDL code' rather than > being tied to ZFS. > > Warner I dunno, I think gonzo@ might be right. It's ZFS support for fstat and I think disabling CDDL would disable ZFS as a side effect? > : Affected files ... > : > : .. //depot/projects/mips2-jnpr/src/usr.bin/fstat/Makefile#2 edit > : > : Differences ... > : > : ==== //depot/projects/mips2-jnpr/src/usr.bin/fstat/Makefile#2 (text+ko) ==== > : > : @@ -13,7 +13,7 @@ > : > : CFLAGS+=-D_KVM_VNODE > : > : -.if ${MK_CDDL} != "no" > : +.if ${MK_ZFS} != "no" > : CFLAGS+= -DZFS > : OBJS+= zfs/zfs.o > : SUBDIR= zfs > : > -- John Baldwin From owner-p4-projects@FreeBSD.ORG Fri Jan 4 18:44:44 2008 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 7A57516A474; Fri, 4 Jan 2008 18:44:44 +0000 (UTC) Delivered-To: perforce@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 3FE5116A417 for ; Fri, 4 Jan 2008 18:44:44 +0000 (UTC) (envelope-from gonzo@freebsd.org) Received: from bugor.portaone.com (bugor.portaone.com [65.61.203.147]) by mx1.freebsd.org (Postfix) with ESMTP id 2741813C46A for ; Fri, 4 Jan 2008 18:44:44 +0000 (UTC) (envelope-from gonzo@freebsd.org) Received: from mail.pbxpress.com ([65.61.203.142] helo=leaf.pbxpress.com) by bugor.portaone.com (8.11.3/8.11.3) with ESMTP (TLSv1:AES256-SHA:256)id 1JArX9-0004DF-VM; Fri, 04 Jan 2008 10:44:43 -0800 Received: from jeeves.bluezbox.com (k3-gw.portaone.com [193.28.87.193]) (authenticated bits=0) by leaf.pbxpress.com (8.13.3/8.13.3) with ESMTP id m04Ij0wC083393 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Fri, 4 Jan 2008 10:45:02 -0800 (PST) (envelope-from gonzo@freebsd.org) Message-ID: <477E7E9A.9060400@freebsd.org> Date: Fri, 04 Jan 2008 20:44:42 +0200 From: Oleksandr Tymoshenko User-Agent: Thunderbird 2.0.0.6 (X11/20070907) MIME-Version: 1.0 To: "M. Warner Losh" References: <200801041711.m04HBGPG029002@repoman.freebsd.org> <20080104.111926.-108774279.imp@bsdimp.com> In-Reply-To: <20080104.111926.-108774279.imp@bsdimp.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Status: No, recieved from trusted server Cc: perforce@freebsd.org Subject: Re: PERFORCE change 132497 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 04 Jan 2008 18:44:44 -0000 M. Warner Losh wrote: > In message: <200801041711.m04HBGPG029002@repoman.freebsd.org> > Oleksandr Tymoshenko writes: > : http://perforce.freebsd.org/chv.cgi?CH=132497 > : > : Change 132497 by gonzo@gonzo_jeeves on 2008/01/04 17:11:07 > : > : o I believe MK_ZFS is more appropriate variable to be checked > : in this case. > > I thought this was more a case of 'exclude all CDDL code' rather than > being tied to ZFS. This particular case is strictly ZFS-related. Also, WITHOUT_CDDL implies WITHOUT_ZFS in bsd.own.mk, so it's just more precise check. -- gonzo From owner-p4-projects@FreeBSD.ORG Fri Jan 4 20:31:14 2008 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id F3BD216A420; Fri, 4 Jan 2008 20:31:13 +0000 (UTC) Delivered-To: perforce@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id B99A916A419 for ; Fri, 4 Jan 2008 20:31:13 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id A99D813C44B for ; Fri, 4 Jan 2008 20:31:13 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.1/8.14.1) with ESMTP id m04KVD2j043678 for ; Fri, 4 Jan 2008 20:31:13 GMT (envelope-from jhb@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.1/8.14.1/Submit) id m04KVDaI043675 for perforce@freebsd.org; Fri, 4 Jan 2008 20:31:13 GMT (envelope-from jhb@freebsd.org) Date: Fri, 4 Jan 2008 20:31:13 GMT Message-Id: <200801042031.m04KVDaI043675@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to jhb@freebsd.org using -f From: John Baldwin To: Perforce Change Reviews Cc: Subject: PERFORCE change 132507 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 04 Jan 2008 20:31:14 -0000 http://perforce.freebsd.org/chv.cgi?CH=132507 Change 132507 by jhb@jhb_mutex on 2008/01/04 20:30:50 Update. Affected files ... .. //depot/projects/smpng/sys/notes#96 edit Differences ... ==== //depot/projects/smpng/sys/notes#96 (text+ko) ==== @@ -40,21 +40,10 @@ - Remove some bogus atomic_load_acq()'s and add ia32_pause()'s to stop_cpus() and restart_cpus(). - Untested -- Cleanup the SMP rendezvous code to properly use membar's to ensure function - pointers are up to date before deferencing them. - - Untested - Don't allow kthreads to get signalled and do bad things - Untested - Change amd64 to use [ls]fence instructions for memory barriers. - Untested (and no hardware, maybe peter can test) -- Add a kproc API that does what kthread does right now -- Add a real kthread API that creates just another thread inside of a kproc - - Figure out what needs to be done to make a new kthread.. should each - kproc have one ksegroup and one kse per cpu? - - Do I just add the kse's when the first new thread is created? - - Consolidate most of the kernel procs into a 'system' kernel proc that - would be pid 0. - - Stick all the 'idle threads' in a single 'idle' kernel proc. - kill taskqueue_swi in favor of taskqueue_thread since the only thing swi buys is being able to swi_sched() from a fast handler, but that doesn't make sense because you can't actually enqueue a task onto its queue from @@ -81,6 +70,5 @@ - jhb_needresched - scheduler fun - jhb_preemption - preemption - jhb_proc - proc locking -- jhb_proc_slock - per-process spin lock Space reserved for child branches: From owner-p4-projects@FreeBSD.ORG Fri Jan 4 20:37:21 2008 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 1B47D16A496; Fri, 4 Jan 2008 20:37:21 +0000 (UTC) Delivered-To: perforce@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id B766716A419 for ; Fri, 4 Jan 2008 20:37:20 +0000 (UTC) (envelope-from imp@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id A7A0F13C45D for ; Fri, 4 Jan 2008 20:37:20 +0000 (UTC) (envelope-from imp@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.1/8.14.1) with ESMTP id m04KbKTY044073 for ; Fri, 4 Jan 2008 20:37:20 GMT (envelope-from imp@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.1/8.14.1/Submit) id m04KbK9A044070 for perforce@freebsd.org; Fri, 4 Jan 2008 20:37:20 GMT (envelope-from imp@freebsd.org) Date: Fri, 4 Jan 2008 20:37:20 GMT Message-Id: <200801042037.m04KbK9A044070@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to imp@freebsd.org using -f From: Warner Losh To: Perforce Change Reviews Cc: Subject: PERFORCE change 132510 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 04 Jan 2008 20:37:21 -0000 http://perforce.freebsd.org/chv.cgi?CH=132510 Change 132510 by imp@imp_paco-paco on 2008/01/04 20:36:53 Fix pmap_kernel() undefined references. Affected files ... .. //depot/projects/mips2-jnpr/src/sys/mips/include/pmap.h#7 edit Differences ... ==== //depot/projects/mips2-jnpr/src/sys/mips/include/pmap.h#7 (text+ko) ==== @@ -167,9 +167,9 @@ extern u_int need_wired_tlb_page_pool; #define pmap_page_is_mapped(m) (!TAILQ_EMPTY(&(m)->md.pv_list)) +#define pmap_kernel() kernel_pmap void pmap_bootstrap(void); -pmap_t pmap_kernel(void); void *pmap_mapdev(vm_offset_t, vm_size_t); void pmap_unmapdev(vm_offset_t, vm_size_t); vm_offset_t pmap_steal_memory(vm_size_t size); From owner-p4-projects@FreeBSD.ORG Fri Jan 4 20:54:39 2008 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id D4FF816A421; Fri, 4 Jan 2008 20:54:38 +0000 (UTC) Delivered-To: perforce@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 9AB2716A419 for ; Fri, 4 Jan 2008 20:54:38 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id 8957013C442 for ; Fri, 4 Jan 2008 20:54:38 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.1/8.14.1) with ESMTP id m04KscmX061026 for ; Fri, 4 Jan 2008 20:54:38 GMT (envelope-from hselasky@FreeBSD.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.1/8.14.1/Submit) id m04KscgP061023 for perforce@freebsd.org; Fri, 4 Jan 2008 20:54:38 GMT (envelope-from hselasky@FreeBSD.org) Date: Fri, 4 Jan 2008 20:54:38 GMT Message-Id: <200801042054.m04KscgP061023@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky To: Perforce Change Reviews Cc: Subject: PERFORCE change 132511 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 04 Jan 2008 20:54:39 -0000 http://perforce.freebsd.org/chv.cgi?CH=132511 Change 132511 by hselasky@hselasky_laptop001 on 2008/01/04 20:54:28 Style change by "usb_style.sh". Affected files ... .. //depot/projects/usb/src/sys/dev/usb/usb_template_cdce.c#4 edit Differences ... ==== //depot/projects/usb/src/sys/dev/usb/usb_template_cdce.c#4 (text+ko) ==== @@ -48,7 +48,7 @@ STRING_ETH_MAX, }; -#define STRING_LANG \ +#define STRING_LANG \ 0x09, 0x04, /* American English */ #define STRING_MAC \ @@ -56,7 +56,7 @@ '4', 0, '5', 0, '6', 0, '7', 0, \ '8', 0, '9', 0, 'A', 0, 'B', 0, -#define STRING_ETH_CONTROL \ +#define STRING_ETH_CONTROL \ 'U', 0, 'S', 0, 'B', 0, ' ', 0, \ 'E', 0, 't', 0, 'h', 0, 'e', 0, \ 'r', 0, 'n', 0, 'e', 0, 't', 0, \ @@ -65,7 +65,7 @@ 't', 0, 'e', 0, 'r', 0, 'f', 0, \ 'a', 0, 'c', 0, 'e', 0, -#define STRING_ETH_DATA \ +#define STRING_ETH_DATA \ 'U', 0, 'S', 0, 'B', 0, ' ', 0, \ 'E', 0, 't', 0, 'h', 0, 'e', 0, \ 'r', 0, 'n', 0, 'e', 0, 't', 0, \ @@ -74,27 +74,27 @@ 't', 0, 'e', 0, 'r', 0, 'f', 0, \ 'a', 0, 'c', 0, 'e', 0, -#define STRING_ETH_CONFIG \ +#define STRING_ETH_CONFIG \ 'D', 0, 'e', 0, 'f', 0, 'a', 0, \ 'u', 0, 'l', 0, 't', 0, ' ', 0, \ 'c', 0, 'o', 0, 'n', 0, 'f', 0, \ 'i', 0, 'g', 0, -#define STRING_ETH_VENDOR \ +#define STRING_ETH_VENDOR \ 'F', 0, 'r', 0, 'e', 0, 'e', 0, \ 'B', 0, 'S', 0, 'D', 0, ' ', 0, \ 'f', 0, 'o', 0, 'u', 0, 'n', 0, \ 'd', 0, 'a', 0, 't', 0, 'i', 0, \ 'o', 0, 'n', 0, -#define STRING_ETH_PRODUCT \ +#define STRING_ETH_PRODUCT \ 'U', 0, 'S', 0, 'B', 0, ' ', 0, \ 'E', 0, 't', 0, 'h', 0, 'e', 0, \ 'r', 0, 'n', 0, 'e', 0, 't', 0, \ ' ', 0, 'A', 0, 'd', 0, 'a', 0, \ 'p', 0, 't', 0, 'e', 0, 'r', 0, -#define STRING_ETH_SERIAL \ +#define STRING_ETH_SERIAL \ 'D', 0, 'e', 0, 'c', 0, 'e', 0, \ 'm', 0, 'b', 0, 'e', 0, 'r', 0, \ ' ', 0, '2', 0, '0', 0, '0', 0, \ From owner-p4-projects@FreeBSD.ORG Fri Jan 4 20:56:41 2008 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id B92F116A419; Fri, 4 Jan 2008 20:56:41 +0000 (UTC) Delivered-To: perforce@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 6A7EA16A420 for ; Fri, 4 Jan 2008 20:56:41 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id 405C813C4CE for ; Fri, 4 Jan 2008 20:56:41 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.1/8.14.1) with ESMTP id m04Kufrd061174 for ; Fri, 4 Jan 2008 20:56:41 GMT (envelope-from hselasky@FreeBSD.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.1/8.14.1/Submit) id m04KufCq061171 for perforce@freebsd.org; Fri, 4 Jan 2008 20:56:41 GMT (envelope-from hselasky@FreeBSD.org) Date: Fri, 4 Jan 2008 20:56:41 GMT Message-Id: <200801042056.m04KufCq061171@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky To: Perforce Change Reviews Cc: Subject: PERFORCE change 132513 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 04 Jan 2008 20:56:42 -0000 http://perforce.freebsd.org/chv.cgi?CH=132513 Change 132513 by hselasky@hselasky_laptop001 on 2008/01/04 20:56:40 Correct MAC address used by CDC ethernet. Affected files ... .. //depot/projects/usb/src/sys/dev/usb/usb_template_cdce.c#5 edit Differences ... ==== //depot/projects/usb/src/sys/dev/usb/usb_template_cdce.c#5 (text+ko) ==== @@ -52,7 +52,7 @@ 0x09, 0x04, /* American English */ #define STRING_MAC \ - '0', 0, '1', 0, '2', 0, '3', 0, \ + '2', 0, 'A', 0, '2', 0, '3', 0, \ '4', 0, '5', 0, '6', 0, '7', 0, \ '8', 0, '9', 0, 'A', 0, 'B', 0, From owner-p4-projects@FreeBSD.ORG Fri Jan 4 21:05:51 2008 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 1132A16A420; Fri, 4 Jan 2008 21:05:51 +0000 (UTC) Delivered-To: perforce@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id CA40516A419 for ; Fri, 4 Jan 2008 21:05:50 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id B896113C478 for ; Fri, 4 Jan 2008 21:05:50 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.1/8.14.1) with ESMTP id m04L5oG4062825 for ; Fri, 4 Jan 2008 21:05:50 GMT (envelope-from hselasky@FreeBSD.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.1/8.14.1/Submit) id m04L5oZo062822 for perforce@freebsd.org; Fri, 4 Jan 2008 21:05:50 GMT (envelope-from hselasky@FreeBSD.org) Date: Fri, 4 Jan 2008 21:05:50 GMT Message-Id: <200801042105.m04L5oZo062822@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky To: Perforce Change Reviews Cc: Subject: PERFORCE change 132514 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 04 Jan 2008 21:05:51 -0000 http://perforce.freebsd.org/chv.cgi?CH=132514 Change 132514 by hselasky@hselasky_laptop001 on 2008/01/04 21:05:10 Some fixes for CDC ethernet: o I should have used "m_defrag" instead of "m_pullup". Else nothings works properly :-( This introduce some copying of data, but that is not a problem right now. It is currently impossible that USB can support mbuf fragments like ethernet drivers do, but I could send these fragments accross like short terminated USB packets. That will not be backwards compatible, though I will save copying of data and will be useful in general. o Make sure the Device gets a different MAC address than the Host. o if_cdce has been tested and verified to work properly. Affected files ... .. //depot/projects/usb/src/sys/dev/usb/if_cdce.c#44 edit Differences ... ==== //depot/projects/usb/src/sys/dev/usb/if_cdce.c#44 (text+ko) ==== @@ -433,6 +433,13 @@ } eaddr[i / 2] |= c; } + + if (uaa->usb_mode == USB_MODE_DEVICE) { + /* + * Do not use the same MAC address like the peer ! + */ + eaddr[5] ^= 0xFF; + } } ifp = if_alloc(IFT_ETHER); @@ -580,6 +587,7 @@ struct cdce_softc *sc = xfer->priv_sc; struct ifnet *ifp = sc->sc_ifp; struct mbuf *m; + struct mbuf *mt; uint32_t crc; uint32_t x; @@ -648,14 +656,18 @@ } m->m_pkthdr.len += 4; } + if (m->m_len != m->m_pkthdr.len) { + mt = m_defrag(m, M_DONTWAIT); + if (mt == NULL) { + m_freem(m); + ifp->if_oerrors++; + continue; + } + m = mt; + } if (m->m_pkthdr.len > MCLBYTES) { m->m_pkthdr.len = MCLBYTES; } - m = m_pullup(m, m->m_pkthdr.len); - if (m == NULL) { - ifp->if_oerrors++; - continue; - } sc->sc_tx_mbufs[x] = m; xfer->frlengths[x] = m->m_len; @@ -695,7 +707,6 @@ goto done; } #endif - usbd_start_hardware(xfer); done: From owner-p4-projects@FreeBSD.ORG Fri Jan 4 21:14:00 2008 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 4483716A419; Fri, 4 Jan 2008 21:14:00 +0000 (UTC) Delivered-To: perforce@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id C4F9216A417 for ; Fri, 4 Jan 2008 21:13:59 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id B26FD13C455 for ; Fri, 4 Jan 2008 21:13:59 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.1/8.14.1) with ESMTP id m04LDxa1063123 for ; Fri, 4 Jan 2008 21:13:59 GMT (envelope-from hselasky@FreeBSD.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.1/8.14.1/Submit) id m04LDx0K063120 for perforce@freebsd.org; Fri, 4 Jan 2008 21:13:59 GMT (envelope-from hselasky@FreeBSD.org) Date: Fri, 4 Jan 2008 21:13:59 GMT Message-Id: <200801042113.m04LDx0K063120@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky To: Perforce Change Reviews Cc: Subject: PERFORCE change 132516 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 04 Jan 2008 21:14:00 -0000 http://perforce.freebsd.org/chv.cgi?CH=132516 Change 132516 by hselasky@hselasky_laptop001 on 2008/01/04 21:13:48 Final version of the generic USS820 DCI driver. The driver has been tested and works fine. Affected files ... .. //depot/projects/usb/src/sys/dev/usb/uss820_dci.c#4 edit Differences ... ==== //depot/projects/usb/src/sys/dev/usb/uss820_dci.c#4 (text+ko) ==== @@ -1,5 +1,5 @@ /*- - * Copyright (c) 2007 Hans Petter Selasky + * Copyright (c) 2008 Hans Petter Selasky * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -23,3 +23,2666 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. */ + +/* + * This file contains the driver for the USS820 series USB Device + * Controller + * + * NOTE: The datasheet does not document everything! + */ + +#include +#include +#include +#include +#include +#include +#include + +#define usbd_config_td_cc uss820_dci_config_copy +#define usbd_config_td_softc uss820_dci_softc + +#include +#include +#include +#include + +#define USS820_DCI_BUS2SC(bus) \ + ((struct uss820_dci_softc *)(((uint8_t *)(bus)) - \ + POINTER_TO_UNSIGNED(&(((struct uss820_dci_softc *)0)->sc_bus)))) + +#ifdef USB_DEBUG +#define DPRINTFN(n,fmt,...) do { \ + if (uss820_dcidebug > (n)) { \ + printf("%s: " fmt, __FUNCTION__,## __VA_ARGS__); \ + } \ +} while (0) + +static int uss820_dcidebug = 0; + +SYSCTL_NODE(_hw_usb, OID_AUTO, uss820_dci, CTLFLAG_RW, 0, "USB uss820_dci"); +SYSCTL_INT(_hw_usb_uss820_dci, OID_AUTO, debug, CTLFLAG_RW, + &uss820_dcidebug, 0, "uss820_dci debug level"); +#else +#define DPRINTFN(...) do { } while (0) +#endif + +#define USS820_DCI_INTR_ENDPT 1 + +/* prototypes */ + +struct usbd_bus_methods uss820_dci_bus_methods; +struct usbd_pipe_methods uss820_dci_device_bulk_methods; +struct usbd_pipe_methods uss820_dci_device_ctrl_methods; +struct usbd_pipe_methods uss820_dci_device_intr_methods; +struct usbd_pipe_methods uss820_dci_device_isoc_fs_methods; +struct usbd_pipe_methods uss820_dci_root_ctrl_methods; +struct usbd_pipe_methods uss820_dci_root_intr_methods; + +static uss820_dci_cmd_t uss820_dci_setup_rx; +static uss820_dci_cmd_t uss820_dci_data_rx; +static uss820_dci_cmd_t uss820_dci_data_tx; +static uss820_dci_cmd_t uss820_dci_data_tx_sync; +static void uss820_dci_device_done(struct usbd_xfer *xfer, usbd_status_t error); +static void uss820_dci_do_poll(struct usbd_bus *bus); +static void uss820_dci_root_ctrl_poll(struct uss820_dci_softc *sc); +static void uss820_dci_standard_done(struct usbd_xfer *xfer); +static void uss820_dci_intr_set(struct usbd_xfer *xfer, uint8_t set); + +static usbd_std_root_transfer_func_t uss820_dci_root_intr_done; +static usbd_std_root_transfer_func_t uss820_dci_root_ctrl_done; +static usbd_config_td_command_t uss820_dci_root_ctrl_task; + +/* + * Here is a list of what the USS820D chip can support. The main + * limitation is that the sum of the buffer sizes must be less than + * 1120 bytes. + */ +static const struct usbd_hw_ep_profile + uss820_dci_ep_profile[] = { + + [0] = { + .max_frame_size = 32, + .is_simplex = 0, + .support_control = 1, + }, + [1] = { + .max_frame_size = 64, + .is_simplex = 0, + .support_multi_buffer = 1, + .support_bulk = 1, + .support_interrupt = 1, + .support_in = 1, + .support_out = 1, + }, + [2] = { + .max_frame_size = 8, + .is_simplex = 0, + .support_multi_buffer = 1, + .support_bulk = 1, + .support_interrupt = 1, + .support_in = 1, + .support_out = 1, + }, + [3] = { + .max_frame_size = 256, + .is_simplex = 0, + .support_multi_buffer = 1, + .support_isochronous = 1, + .support_in = 1, + .support_out = 1, + }, +}; + +static void +uss820_dci_get_hw_ep_profile(struct usbd_device *udev, + const struct usbd_hw_ep_profile **ppf, uint8_t ep_addr) +{ + if (ep_addr == 0) { + *ppf = uss820_dci_ep_profile + 0; + } else if (ep_addr < 5) { + *ppf = uss820_dci_ep_profile + 1; + } else if (ep_addr < 7) { + *ppf = uss820_dci_ep_profile + 2; + } else if (ep_addr == 7) { + *ppf = uss820_dci_ep_profile + 3; + } else { + *ppf = NULL; + } + return; +} + +static void +uss820_dci_pull_up(struct uss820_dci_softc *sc) +{ + uint8_t temp; + + /* pullup D+, if possible */ + + if (!sc->sc_flags.d_pulled_up && + sc->sc_flags.port_powered) { + sc->sc_flags.d_pulled_up = 1; + + DPRINTFN(0, "\n"); + + temp = USS820_READ_1(sc, USS820_MCSR); + temp |= USS820_MCSR_DPEN; + USS820_WRITE_1(sc, USS820_MCSR, temp); + } + return; +} + +static void +uss820_dci_pull_down(struct uss820_dci_softc *sc) +{ + uint8_t temp; + + /* pulldown D+, if possible */ + + if (sc->sc_flags.d_pulled_up) { + sc->sc_flags.d_pulled_up = 0; + + DPRINTFN(0, "\n"); + + temp = USS820_READ_1(sc, USS820_MCSR); + temp &= ~USS820_MCSR_DPEN; + USS820_WRITE_1(sc, USS820_MCSR, temp); + } + return; +} + +static void +uss820_dci_wakeup_peer(struct uss820_dci_softc *sc) +{ + if (!(sc->sc_flags.status_suspend)) { + return; + } + DPRINTFN(-1, "not supported\n"); + + return; +} + +static void +uss820_dci_rem_wakeup_set(struct usbd_device *udev, uint8_t is_on) +{ + struct uss820_dci_softc *sc; + uint8_t temp; + + DPRINTFN(4, "is_on=%u\n", is_on); + + mtx_assert(&(udev->bus->mtx), MA_OWNED); + + sc = USS820_DCI_BUS2SC(udev->bus); + + temp = USS820_READ_1(sc, USS820_SCR); + + if (is_on) { + temp |= USS820_SCR_RWUPE; + } else { + temp &= ~USS820_SCR_RWUPE; + } + + USS820_WRITE_1(sc, USS820_SCR, temp); + + return; +} + +static void +uss820_dci_set_address(struct uss820_dci_softc *sc, uint8_t addr) +{ + DPRINTFN(4, "addr=%d\n", addr); + + USS820_WRITE_1(sc, USS820_FADDR, addr); + + return; +} + +static uint8_t +uss820_dci_setup_rx(struct uss820_dci_td *td) +{ + struct uss820_dci_softc *sc; + usb_device_request_t req; + uint16_t count; + uint8_t rx_stat; + uint8_t temp; + + /* select the correct endpoint */ + bus_space_write_1(td->io_tag, td->io_hdl, + td->ep_reg, td->ep_index); + + /* read out FIFO status */ + rx_stat = bus_space_read_1(td->io_tag, td->io_hdl, + td->rx_stat_reg); + + /* get pointer to softc */ + sc = td->pc->xfer->usb_sc; + + DPRINTFN(4, "rx_stat=0x%02x rem=%u\n", rx_stat, td->remainder); + + if (!(rx_stat & USS820_RXSTAT_RXSETUP)) { + /* abort any ongoing transfer */ + if (!td->did_stall) { + DPRINTFN(4, "stalling\n"); + + /* set stall */ + + temp = USS820_READ_1(sc, USS820_EPCON); + + temp |= (USS820_EPCON_TXSTL | + USS820_EPCON_RXSTL); + + USS820_WRITE_SHARED_1(sc, USS820_EPCON, temp); + + td->did_stall = 1; + } + goto not_complete; + } + /* clear stall and all I/O */ + temp = USS820_READ_1(sc, USS820_EPCON); + + temp &= ~(USS820_EPCON_TXSTL | + USS820_EPCON_RXSTL | + USS820_EPCON_RXIE | + USS820_EPCON_TXOE); + + USS820_WRITE_SHARED_1(sc, USS820_EPCON, temp); + + /* clear end overwrite flag */ + rx_stat &= ~USS820_RXSTAT_EDOVW; + USS820_WRITE_SHARED_1(sc, USS820_RXSTAT, rx_stat); + + /* get the packet byte count */ + count = bus_space_read_1(td->io_tag, td->io_hdl, + td->rx_count_low_reg); + count |= (bus_space_read_1(td->io_tag, td->io_hdl, + td->rx_count_high_reg) << 8); + count &= 0x3FF; + + /* verify data length */ + if (count != td->remainder) { + DPRINTFN(-1, "Invalid SETUP packet " + "length, %d bytes\n", count); + goto not_complete; + } + if (count != sizeof(req)) { + DPRINTFN(-1, "Unsupported SETUP packet " + "length, %d bytes\n", count); + goto not_complete; + } + /* receive data */ + bus_space_read_multi_1(td->io_tag, td->io_hdl, + td->rx_fifo_reg, (void *)&req, sizeof(req)); + + /* read out FIFO status */ + rx_stat = bus_space_read_1(td->io_tag, td->io_hdl, + td->rx_stat_reg); + + if (rx_stat & (USS820_RXSTAT_EDOVW | + USS820_RXSTAT_STOVW)) { + DPRINTFN(0, "new SETUP packet received\n"); + return (1); /* not complete */ + } + /* clear receive setup bit */ + rx_stat &= ~(USS820_RXSTAT_RXSETUP | + USS820_RXSTAT_EDOVW | + USS820_RXSTAT_STOVW); + USS820_WRITE_SHARED_1(sc, USS820_RXSTAT, rx_stat); + + /* set RXFFRC bit */ + temp = bus_space_read_1(td->io_tag, td->io_hdl, + td->rx_cntl_reg); + temp |= USS820_RXCON_RXFFRC; + bus_space_write_1(td->io_tag, td->io_hdl, + td->rx_cntl_reg, temp); + + /* copy data into real buffer */ + usbd_copy_in(td->pc, 0, &req, sizeof(req)); + + td->offset = sizeof(req); + td->remainder = 0; + + /* sneak peek the set address */ + if ((req.bmRequestType == UT_WRITE_DEVICE) && + (req.bRequest == UR_SET_ADDRESS)) { + sc->sc_dv_addr = req.wValue[0] & 0x7F; + } else { + sc->sc_dv_addr = 0xFF; + } + return (0); /* complete */ + +not_complete: + /* clear end overwrite flag, if any */ + if (rx_stat & USS820_RXSTAT_RXSETUP) { + rx_stat &= ~(USS820_RXSTAT_EDOVW | + USS820_RXSTAT_STOVW | + USS820_RXSTAT_RXSETUP); + USS820_WRITE_SHARED_1(sc, USS820_RXSTAT, rx_stat); + } + return (1); /* not complete */ + +} + +static void +uss820_dci_shared_write(struct uss820_dci_td *td, uint8_t reg, + uint8_t val) +{ + bus_space_write_1(td->io_tag, td->io_hdl, td->pend_reg, 1); + bus_space_write_1(td->io_tag, td->io_hdl, reg, val); + bus_space_write_1(td->io_tag, td->io_hdl, td->pend_reg, 0); + return; +} + +static uint8_t +uss820_dci_data_rx(struct uss820_dci_td *td) +{ + struct usbd_page_search buf_res; + uint16_t count; + uint8_t rx_flag; + uint8_t rx_stat; + uint8_t rx_cntl; + uint8_t ep_con; + uint8_t to; + uint8_t got_short; + + to = 2; /* don't loop forever! */ + got_short = 0; + + /* select the correct endpoint */ + bus_space_write_1(td->io_tag, td->io_hdl, td->ep_reg, td->ep_index); + + /* check if any of the FIFO banks have data */ +repeat: + /* read out FIFO flag */ + rx_flag = bus_space_read_1(td->io_tag, td->io_hdl, + td->rx_flag_reg); + /* read out FIFO status */ + rx_stat = bus_space_read_1(td->io_tag, td->io_hdl, + td->rx_stat_reg); + + DPRINTFN(4, "rx_stat=0x%02x rem=%u\n", rx_stat, td->remainder); + + if (rx_stat & (USS820_RXSTAT_RXSETUP | + USS820_RXSTAT_RXSOVW | + USS820_RXSTAT_EDOVW)) { + if (td->remainder == 0) { + /* + * We are actually complete and have + * received the next SETUP + */ + DPRINTFN(4, "faking complete\n"); + return (0); /* complete */ + } + /* + * USB Host Aborted the transfer. + */ + td->error = 1; + return (0); /* complete */ + } + /* check for errors */ + if (rx_flag & (USS820_RXFLG_RXOVF | + USS820_RXFLG_RXURF)) { + DPRINTFN(4, "overflow or underflow\n"); + /* should not happen */ + td->error = 1; + return (0); /* complete */ + } + /* check status */ + if (!(rx_flag & (USS820_RXFLG_RXFIF0 | + USS820_RXFLG_RXFIF1))) { + + /* read out EPCON register */ + ep_con = bus_space_read_1(td->io_tag, + td->io_hdl, td->ep_con_reg); + /* enable RX input */ + if (!(ep_con & USS820_EPCON_RXIE)) { + ep_con |= USS820_EPCON_RXIE; + uss820_dci_shared_write(td, td->ep_con_reg, ep_con); + } + return (1); /* not complete */ + } + /* get the packet byte count */ + count = bus_space_read_1(td->io_tag, td->io_hdl, + td->rx_count_low_reg); + + count |= (bus_space_read_1(td->io_tag, td->io_hdl, + td->rx_count_high_reg) << 8); + count &= 0x3FF; + + /* verify the packet byte count */ + if (count != td->max_packet_size) { + if (count < td->max_packet_size) { + /* we have a short packet */ + td->short_pkt = 1; + got_short = 1; + } else { + /* invalid USB packet */ + td->error = 1; + return (0); /* we are complete */ + } + } + /* verify the packet byte count */ + if (count > td->remainder) { + /* invalid USB packet */ + td->error = 1; + return (0); /* we are complete */ + } + while (count > 0) { + usbd_get_page(td->pc, td->offset, &buf_res); + + /* get correct length */ + if (buf_res.length > count) { + buf_res.length = count; + } + /* receive data */ + bus_space_read_multi_1(td->io_tag, td->io_hdl, + td->rx_fifo_reg, buf_res.buffer, buf_res.length); + + /* update counters */ + count -= buf_res.length; + td->offset += buf_res.length; + td->remainder -= buf_res.length; + } + + /* set RXFFRC bit */ + rx_cntl = bus_space_read_1(td->io_tag, td->io_hdl, + td->rx_cntl_reg); + rx_cntl |= USS820_RXCON_RXFFRC; + bus_space_write_1(td->io_tag, td->io_hdl, + td->rx_cntl_reg, rx_cntl); + + /* check if we are complete */ + if ((td->remainder == 0) || got_short) { + if (td->short_pkt) { + /* we are complete */ + return (0); + } + /* else need to receive a zero length packet */ + } + if (--to) { + goto repeat; + } + return (1); /* not complete */ +} + +static uint8_t +uss820_dci_data_tx(struct uss820_dci_td *td) +{ + struct usbd_page_search buf_res; + uint16_t count; + uint16_t count_copy; + uint8_t rx_stat; + uint8_t tx_flag; + uint8_t ep_con; + uint8_t to; + + /* select the correct endpoint */ + bus_space_write_1(td->io_tag, td->io_hdl, + td->ep_reg, td->ep_index); + + to = 2; /* don't loop forever! */ + +repeat: + /* read out TX FIFO flags */ + tx_flag = bus_space_read_1(td->io_tag, td->io_hdl, + td->tx_flag_reg); + + /* read out RX FIFO status last */ + rx_stat = bus_space_read_1(td->io_tag, td->io_hdl, + td->rx_stat_reg); + + DPRINTFN(4, "rx_stat=0x%02x tx_flag=0x%02x rem=%u\n", + rx_stat, tx_flag, td->remainder); + + if (rx_stat & (USS820_RXSTAT_RXSETUP | + USS820_RXSTAT_RXSOVW | + USS820_RXSTAT_EDOVW)) { + /* + * The current transfer was aborted + * by the USB Host + */ + td->error = 1; + return (0); /* complete */ + } + if (tx_flag & (USS820_TXFLG_TXOVF | + USS820_TXFLG_TXURF)) { + td->error = 1; + return (0); /* complete */ + } + if (tx_flag & USS820_TXFLG_TXFIF0) { + if (tx_flag & USS820_TXFLG_TXFIF1) { + return (1); /* not complete */ + } + } + if ((!td->support_multi_buffer) && + (tx_flag & (USS820_TXFLG_TXFIF0 | + USS820_TXFLG_TXFIF1))) { + return (1); /* not complete */ + } + count = td->max_packet_size; + if (td->remainder < count) { + /* we have a short packet */ + td->short_pkt = 1; + count = td->remainder; + } + count_copy = count; + while (count > 0) { + + usbd_get_page(td->pc, td->offset, &buf_res); + + /* get correct length */ + if (buf_res.length > count) { + buf_res.length = count; + } + /* transmit data */ + bus_space_write_multi_1(td->io_tag, td->io_hdl, + td->tx_fifo_reg, buf_res.buffer, buf_res.length); + + /* update counters */ + count -= buf_res.length; + td->offset += buf_res.length; + td->remainder -= buf_res.length; + } + + /* post-write high packet byte count first */ + bus_space_write_1(td->io_tag, td->io_hdl, + td->tx_count_high_reg, count_copy >> 8); + + /* post-write low packet byte count last */ + bus_space_write_1(td->io_tag, td->io_hdl, + td->tx_count_low_reg, count_copy); + + /* read out EPCON register */ + ep_con = bus_space_read_1(td->io_tag, td->io_hdl, + td->ep_con_reg); + /* + * Enable TX output, which must happen after that we have written + * data into the FIFO. This is undocumented. + */ + if (!(ep_con & USS820_EPCON_TXOE)) { + ep_con |= USS820_EPCON_TXOE; + uss820_dci_shared_write(td, td->ep_con_reg, ep_con); + } + /* check remainder */ + if (td->remainder == 0) { + if (td->short_pkt) { + return (0); /* complete */ + } + /* else we need to transmit a short packet */ + } + if (--to) { + goto repeat; + } + return (1); /* not complete */ +} + +static uint8_t +uss820_dci_data_tx_sync(struct uss820_dci_td *td) +{ + struct uss820_dci_softc *sc; + uint8_t rx_stat; + uint8_t tx_flag; + + /* select the correct endpoint */ + bus_space_write_1(td->io_tag, td->io_hdl, + td->ep_reg, td->ep_index); + + /* read out TX FIFO flag */ + tx_flag = bus_space_read_1(td->io_tag, td->io_hdl, + td->tx_flag_reg); + + /* read out RX FIFO status last */ + rx_stat = bus_space_read_1(td->io_tag, td->io_hdl, + td->rx_stat_reg); + + DPRINTFN(4, "rx_stat=0x%02x rem=%u\n", rx_stat, td->remainder); + + if (rx_stat & (USS820_RXSTAT_RXSETUP | + USS820_RXSTAT_RXSOVW | + USS820_RXSTAT_EDOVW)) { + DPRINTFN(4, "faking complete\n"); + /* Race condition */ + return (0); /* complete */ + } + DPRINTFN(4, "tx_flag=0x%02x rem=%u\n", + tx_flag, td->remainder); + + if (tx_flag & (USS820_TXFLG_TXOVF | + USS820_TXFLG_TXURF)) { + td->error = 1; + return (0); /* complete */ + } + if (tx_flag & (USS820_TXFLG_TXFIF0 | + USS820_TXFLG_TXFIF1)) { + return (1); /* not complete */ + } + sc = td->pc->xfer->usb_sc; + if (sc->sc_dv_addr != 0xFF) { + /* write function address */ + uss820_dci_set_address(sc, sc->sc_dv_addr); + } + return (0); /* complete */ +} + +static uint8_t +uss820_dci_xfer_do_fifo(struct usbd_xfer *xfer) +{ + struct uss820_dci_td *td; + + DPRINTFN(8, "\n"); + + td = xfer->td_transfer_cache; + while (1) { + if ((td->func) (td)) { + /* operation in progress */ + break; + } + if (((void *)td) == xfer->td_transfer_last) { + goto done; + } + if (td->error) { + goto done; + } else if (td->remainder > 0) { + /* + * We had a short transfer. If there is no alternate + * next, stop processing ! + */ + if (!td->alt_next) { + goto done; + } + } + /* + * Fetch the next transfer descriptor. + */ + td = td->obj_next; + xfer->td_transfer_cache = td; + } + return (1); /* not complete */ + +done: + /* compute all actual lengths */ + + uss820_dci_standard_done(xfer); + + return (0); /* complete */ +} + +static void +uss820_dci_interrupt_poll(struct uss820_dci_softc *sc) +{ + struct usbd_xfer *xfer; + + LIST_FOREACH(xfer, &sc->sc_bus.intr_list_head, interrupt_list) { + if (!uss820_dci_xfer_do_fifo(xfer)) { + /* queue callback for execution */ + usbd_callback_wrapper(xfer, NULL, + USBD_CONTEXT_CALLBACK); + } + } + return; +} + +static void +uss820_dci_wait_suspend(struct uss820_dci_softc *sc, uint8_t on) +{ + uint8_t scr; + uint8_t scratch; + + scr = USS820_READ_1(sc, USS820_SCR); + scratch = USS820_READ_1(sc, USS820_SCRATCH); + + if (on) { + scr |= USS820_SCR_IE_SUSP; + scratch &= ~USS820_SCRATCH_IE_RESUME; + } else { + scr &= ~USS820_SCR_IE_SUSP; + scratch |= USS820_SCRATCH_IE_RESUME; + } + + USS820_WRITE_1(sc, USS820_SCR, scr); + USS820_WRITE_1(sc, USS820_SCRATCH, scratch); + return; +} + +void +uss820_dci_interrupt(struct uss820_dci_softc *sc) +{ + uint8_t ssr; + uint8_t event; + + mtx_lock(&(sc->sc_bus.mtx)); + + ssr = USS820_READ_1(sc, USS820_SSR); + + ssr &= (USS820_SSR_SUSPEND | + USS820_SSR_RESUME | + USS820_SSR_RESET); + + /* acknowledge all interrupts */ + + USS820_WRITE_SHARED_1(sc, USS820_SSR, 0); + + /* check for any bus state change interrupts */ + + if (ssr) { + + event = 0; + + if (ssr & USS820_SSR_RESET) { + sc->sc_flags.status_bus_reset = 1; + sc->sc_flags.status_suspend = 0; + sc->sc_flags.change_suspend = 0; + sc->sc_flags.change_connect = 1; + + /* disable resume interrupt */ + uss820_dci_wait_suspend(sc, 1); + + event = 1; + } + /* + * If "RESUME" and "SUSPEND" is set at the same time + * we interpret that like "RESUME". Resume is set when + * there is at least 3 milliseconds of inactivity on + * the USB BUS. + */ + if (ssr & USS820_SSR_RESUME) { + if (sc->sc_flags.status_suspend) { + sc->sc_flags.status_suspend = 0; + sc->sc_flags.change_suspend = 1; + /* disable resume interrupt */ + uss820_dci_wait_suspend(sc, 1); + event = 1; + } + } else if (ssr & USS820_SSR_SUSPEND) { + if (!sc->sc_flags.status_suspend) { + sc->sc_flags.status_suspend = 1; + sc->sc_flags.change_suspend = 1; + /* enable resume interrupt */ + uss820_dci_wait_suspend(sc, 0); + event = 1; + } + } + if (event) { + + DPRINTFN(0, "real bus interrupt 0x%02x\n", ssr); + + /* complete root HUB interrupt endpoint */ + + usbd_std_root_transfer(&(sc->sc_root_intr), + &uss820_dci_root_intr_done); + } + } + /* acknowledge all SBI interrupts */ + USS820_WRITE_SHARED_1(sc, USS820_SBI, 0); + + /* acknowledge all SBI1 interrupts */ + USS820_WRITE_SHARED_1(sc, USS820_SBI1, 0); + + /* poll all active transfers */ + uss820_dci_interrupt_poll(sc); + + mtx_unlock(&(sc->sc_bus.mtx)); + + return; +} + +static void +uss820_dci_setup_standard_chain_sub(struct uss820_std_temp *temp) +{ + struct uss820_dci_td *td; + + /* get current Transfer Descriptor */ + td = temp->td_next; + temp->td = td; + + /* prepare for next TD */ + temp->td_next = td->obj_next; + + /* fill out the Transfer Descriptor */ + td->func = temp->func; + td->pc = temp->pc; + td->offset = temp->offset; + td->remainder = temp->len; + td->error = 0; + td->did_stall = 0; + td->short_pkt = temp->short_pkt; + td->alt_next = temp->setup_alt_next; + return; +} + +static void +uss820_dci_setup_standard_chain(struct usbd_xfer *xfer) +{ + struct uss820_std_temp temp; + struct uss820_dci_softc *sc; + struct uss820_dci_td *td; + uint32_t x; + uint8_t need_sync; + uint8_t ep_no; + + DPRINTFN(8, "addr=%d endpt=%d sumlen=%d speed=%d\n", + xfer->address, UE_GET_ADDR(xfer->endpoint), + xfer->sumlen, usbd_get_speed(xfer->udev)); + + temp.max_frame_size = xfer->max_frame_size; + + td = xfer->td_start[0]; + xfer->td_transfer_first = td; + xfer->td_transfer_cache = td; + + /* setup temp */ + + temp.td = NULL; + temp.td_next = xfer->td_start[0]; + temp.setup_alt_next = xfer->flags_int.short_frames_ok; + temp.offset = 0; + + sc = xfer->usb_sc; + ep_no = (xfer->endpoint & UE_ADDR); + + /* check if we should prepend a setup message */ + + if (xfer->flags_int.control_xfr) { + if (xfer->flags_int.control_hdr) { + + temp.func = &uss820_dci_setup_rx; + temp.len = xfer->frlengths[0]; + temp.pc = xfer->frbuffers + 0; + temp.short_pkt = temp.len ? 1 : 0; + + uss820_dci_setup_standard_chain_sub(&temp); + } + x = 1; + } else { + x = 0; + } + + if (x != xfer->nframes) { + if (xfer->endpoint & UE_DIR_IN) { + temp.func = &uss820_dci_data_tx; + need_sync = 1; + } else { + temp.func = &uss820_dci_data_rx; + need_sync = 0; + } + + /* setup "pc" pointer */ + temp.pc = xfer->frbuffers + x; + } else { + need_sync = 0; + } + + while (x != xfer->nframes) { + + /* DATA0 / DATA1 message */ + + temp.len = xfer->frlengths[x]; + + x++; + + if (x == xfer->nframes) { + temp.setup_alt_next = 0; + } + if (temp.len == 0) { + + /* make sure that we send an USB packet */ + + temp.short_pkt = 0; + + } else { + + /* regular data transfer */ + + temp.short_pkt = (xfer->flags.force_short_xfer) ? 0 : 1; + } + + uss820_dci_setup_standard_chain_sub(&temp); + + if (xfer->flags_int.isochronous_xfr) { + temp.offset += temp.len; + } else { + /* get next Page Cache pointer */ + temp.pc = xfer->frbuffers + x; + } + } + + /* always setup a valid "pc" pointer for status and sync */ + temp.pc = xfer->frbuffers + 0; + + /* check if we need to sync */ + if (need_sync && !xfer->flags_int.isochronous_xfr) { + + /* we need a SYNC point after TX */ + temp.func = &uss820_dci_data_tx_sync; + temp.len = 0; + temp.short_pkt = 0; + + uss820_dci_setup_standard_chain_sub(&temp); + } + /* check if we should append a status stage */ + + if (xfer->flags_int.control_xfr && + !xfer->flags_int.control_act) { + + /* + * Send a DATA1 message and invert the current + * endpoint direction. + */ + if (xfer->endpoint & UE_DIR_IN) { + temp.func = &uss820_dci_data_rx; + need_sync = 0; + } else { + temp.func = &uss820_dci_data_tx; + need_sync = 1; + } + temp.len = 0; + temp.short_pkt = 0; + + uss820_dci_setup_standard_chain_sub(&temp); + if (need_sync) { + /* we need a SYNC point after TX */ + temp.func = &uss820_dci_data_tx_sync; + temp.len = 0; + temp.short_pkt = 0; + + uss820_dci_setup_standard_chain_sub(&temp); + } + } + /* must have at least one frame! */ + td = temp.td; + xfer->td_transfer_last = td; + + return; +} + +static void +uss820_dci_timeout(struct usbd_xfer *xfer) +{ >>> TRUNCATED FOR MAIL (1000 lines) <<< From owner-p4-projects@FreeBSD.ORG Fri Jan 4 21:16:02 2008 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 8D21E16A420; Fri, 4 Jan 2008 21:16:02 +0000 (UTC) Delivered-To: perforce@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 5234416A418 for ; Fri, 4 Jan 2008 21:16:02 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id 4088D13C46A for ; Fri, 4 Jan 2008 21:16:02 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.1/8.14.1) with ESMTP id m04LG1ou063390 for ; Fri, 4 Jan 2008 21:16:01 GMT (envelope-from hselasky@FreeBSD.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.1/8.14.1/Submit) id m04LG1Zr063387 for perforce@freebsd.org; Fri, 4 Jan 2008 21:16:01 GMT (envelope-from hselasky@FreeBSD.org) Date: Fri, 4 Jan 2008 21:16:01 GMT Message-Id: <200801042116.m04LG1Zr063387@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky To: Perforce Change Reviews Cc: Subject: PERFORCE change 132517 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 04 Jan 2008 21:16:02 -0000 http://perforce.freebsd.org/chv.cgi?CH=132517 Change 132517 by hselasky@hselasky_laptop001 on 2008/01/04 21:15:04 Some additions to the transfer descriptor. Affected files ... .. //depot/projects/usb/src/sys/dev/usb/uss820_dci.h#5 edit Differences ... ==== //depot/projects/usb/src/sys/dev/usb/uss820_dci.h#5 (text+ko) ==== @@ -283,6 +283,7 @@ uint32_t remainder; uint16_t max_packet_size; uint8_t rx_stat_reg; + uint8_t tx_stat_reg; uint8_t rx_flag_reg; uint8_t tx_flag_reg; uint8_t rx_fifo_reg; @@ -293,7 +294,9 @@ uint8_t tx_count_high_reg; uint8_t rx_cntl_reg; uint8_t tx_cntl_reg; + uint8_t ep_con_reg; uint8_t ep_reg; + uint8_t pend_reg; uint8_t ep_index; uint8_t error:1; uint8_t alt_next:1; From owner-p4-projects@FreeBSD.ORG Fri Jan 4 21:19:06 2008 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 0977E16A46D; Fri, 4 Jan 2008 21:19:06 +0000 (UTC) Delivered-To: perforce@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id C29C916A468 for ; Fri, 4 Jan 2008 21:19:05 +0000 (UTC) (envelope-from imp@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id B122613C45A for ; Fri, 4 Jan 2008 21:19:05 +0000 (UTC) (envelope-from imp@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.1/8.14.1) with ESMTP id m04LJ5tw063695 for ; Fri, 4 Jan 2008 21:19:05 GMT (envelope-from imp@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.1/8.14.1/Submit) id m04LJ5qs063692 for perforce@freebsd.org; Fri, 4 Jan 2008 21:19:05 GMT (envelope-from imp@freebsd.org) Date: Fri, 4 Jan 2008 21:19:05 GMT Message-Id: <200801042119.m04LJ5qs063692@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to imp@freebsd.org using -f From: Warner Losh To: Perforce Change Reviews Cc: Subject: PERFORCE change 132518 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 04 Jan 2008 21:19:06 -0000 http://perforce.freebsd.org/chv.cgi?CH=132518 Change 132518 by imp@imp_paco-paco on 2008/01/04 21:18:12 We need the floating page alloc/free routines reguardless. Affected files ... .. //depot/projects/mips2-jnpr/src/sys/mips/mips/pmap.c#13 edit Differences ... ==== //depot/projects/mips2-jnpr/src/sys/mips/mips/pmap.c#13 (text+ko) ==== @@ -181,9 +181,7 @@ static int init_pte_prot(vm_offset_t va, vm_page_t m, vm_prot_t prot); static void pmap_TLB_invalidate_kernel(vm_offset_t); static void pmap_TLB_update_kernel(vm_offset_t, pt_entry_t); -#ifdef VM_ALLOC_WIRED_TLB_PG_POOL static void pmap_init_fpage(void); -#endif #ifdef SMP static void pmap_invalidate_page_action(void *arg); static void pmap_invalidate_all_action(void *arg); @@ -338,11 +336,9 @@ pmap_init(void) { -#ifdef VM_ALLOC_WIRED_TLB_PG_POOL if (need_wired_tlb_page_pool) { pmap_init_fpage(); } -#endif /* * Initialize the address space (zone) for the pv entries. Set a @@ -685,7 +681,6 @@ /* * Create the floating pages, aka FPAGES! */ -#ifdef VM_ALLOC_WIRED_TLB_PG_POOL static void pmap_init_fpage() { @@ -805,7 +800,6 @@ * Should there be any flush operation at the end? */ } -#endif /* Revision 1.507 * From owner-p4-projects@FreeBSD.ORG Fri Jan 4 21:24:12 2008 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 2376C16A475; Fri, 4 Jan 2008 21:24:12 +0000 (UTC) Delivered-To: perforce@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id DD21016A469 for ; Fri, 4 Jan 2008 21:24:11 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id AC91113C459 for ; Fri, 4 Jan 2008 21:24:11 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.1/8.14.1) with ESMTP id m04LOBZo064004 for ; Fri, 4 Jan 2008 21:24:11 GMT (envelope-from hselasky@FreeBSD.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.1/8.14.1/Submit) id m04LOBEk064001 for perforce@freebsd.org; Fri, 4 Jan 2008 21:24:11 GMT (envelope-from hselasky@FreeBSD.org) Date: Fri, 4 Jan 2008 21:24:11 GMT Message-Id: <200801042124.m04LOBEk064001@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky To: Perforce Change Reviews Cc: Subject: PERFORCE change 132522 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 04 Jan 2008 21:24:12 -0000 http://perforce.freebsd.org/chv.cgi?CH=132522 Change 132522 by hselasky@hselasky_laptop001 on 2008/01/04 21:24:02 Add pccard interface for the USS820. Don't expect too much performance. ID's will be added later. Affected files ... .. //depot/projects/usb/src/sys/dev/usb/uss820_dci_pccard.c#1 add Differences ... From owner-p4-projects@FreeBSD.ORG Fri Jan 4 21:29:17 2008 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id B541916A468; Fri, 4 Jan 2008 21:29:17 +0000 (UTC) Delivered-To: perforce@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 7B32B16A417 for ; Fri, 4 Jan 2008 21:29:17 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id 50E0E13C447 for ; Fri, 4 Jan 2008 21:29:17 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.1/8.14.1) with ESMTP id m04LTHrF064164 for ; Fri, 4 Jan 2008 21:29:17 GMT (envelope-from hselasky@FreeBSD.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.1/8.14.1/Submit) id m04LTHvd064161 for perforce@freebsd.org; Fri, 4 Jan 2008 21:29:17 GMT (envelope-from hselasky@FreeBSD.org) Date: Fri, 4 Jan 2008 21:29:17 GMT Message-Id: <200801042129.m04LTHvd064161@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky To: Perforce Change Reviews Cc: Subject: PERFORCE change 132523 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 04 Jan 2008 21:29:18 -0000 http://perforce.freebsd.org/chv.cgi?CH=132523 Change 132523 by hselasky@hselasky_laptop001 on 2008/01/04 21:28:29 This file has been renamed to "if_rumfw.h" and does no longer exist. Affected files ... .. //depot/projects/usb/src/sys/dev/usb/rt2573_ucode.h#2 delete Differences ... From owner-p4-projects@FreeBSD.ORG Fri Jan 4 21:32:21 2008 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id D98C916A418; Fri, 4 Jan 2008 21:32:20 +0000 (UTC) Delivered-To: perforce@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 9EAAF16A420 for ; Fri, 4 Jan 2008 21:32:20 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id 8CFE113C44B for ; Fri, 4 Jan 2008 21:32:20 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.1/8.14.1) with ESMTP id m04LWK7Z064313 for ; Fri, 4 Jan 2008 21:32:20 GMT (envelope-from hselasky@FreeBSD.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.1/8.14.1/Submit) id m04LWKqS064310 for perforce@freebsd.org; Fri, 4 Jan 2008 21:32:20 GMT (envelope-from hselasky@FreeBSD.org) Date: Fri, 4 Jan 2008 21:32:20 GMT Message-Id: <200801042132.m04LWKqS064310@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky To: Perforce Change Reviews Cc: Subject: PERFORCE change 132524 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 04 Jan 2008 21:32:21 -0000 http://perforce.freebsd.org/chv.cgi?CH=132524 Change 132524 by hselasky@hselasky_laptop001 on 2008/01/04 21:31:42 Hook in the USS820 driver. Affected files ... .. //depot/projects/usb/src/sys/dev/usb/usb.c#30 edit Differences ... ==== //depot/projects/usb/src/sys/dev/usb/usb.c#30 (text+ko) ==== @@ -123,6 +123,7 @@ DRIVER_MODULE(usb, uhci, usb_driver, usb_devclass, 0, 0); DRIVER_MODULE(usb, ehci, usb_driver, usb_devclass, 0, 0); DRIVER_MODULE(usb, at91_udp, usb_driver, usb_devclass, 0, 0); +DRIVER_MODULE(usb, uss820, usb_driver, usb_devclass, 0, 0); MODULE_DEPEND(usb, usb, 1, 1, 1); MODULE_VERSION(usb, 1); From owner-p4-projects@FreeBSD.ORG Fri Jan 4 21:34:23 2008 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 673B516A46B; Fri, 4 Jan 2008 21:34:23 +0000 (UTC) Delivered-To: perforce@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 2CA7A16A421 for ; Fri, 4 Jan 2008 21:34:23 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id 1A74913C465 for ; Fri, 4 Jan 2008 21:34:23 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.1/8.14.1) with ESMTP id m04LYMgO064424 for ; Fri, 4 Jan 2008 21:34:22 GMT (envelope-from hselasky@FreeBSD.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.1/8.14.1/Submit) id m04LYM8f064421 for perforce@freebsd.org; Fri, 4 Jan 2008 21:34:22 GMT (envelope-from hselasky@FreeBSD.org) Date: Fri, 4 Jan 2008 21:34:22 GMT Message-Id: <200801042134.m04LYM8f064421@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky To: Perforce Change Reviews Cc: Subject: PERFORCE change 132525 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 04 Jan 2008 21:34:23 -0000 http://perforce.freebsd.org/chv.cgi?CH=132525 Change 132525 by hselasky@hselasky_laptop001 on 2008/01/04 21:33:25 Style changes. Affected files ... .. //depot/projects/usb/src/sys/dev/usb/if_ural.c#50 edit Differences ... ==== //depot/projects/usb/src/sys/dev/usb/if_ural.c#50 (text+ko) ==== @@ -122,111 +122,44 @@ static usbd_config_td_command_t ural_cfg_stop; static usbd_config_td_command_t ural_cfg_amrr_timeout; -static void -ural_cfg_do_request(struct ural_softc *sc, usb_device_request_t *req, - void *data); -static void - ural_cfg_set_testmode(struct ural_softc *sc); - -static void -ural_cfg_eeprom_read(struct ural_softc *sc, uint16_t addr, - void *buf, uint16_t len); -static uint16_t - ural_cfg_read(struct ural_softc *sc, uint16_t reg); - -static void -ural_cfg_read_multi(struct ural_softc *sc, uint16_t reg, - void *buf, uint16_t len); -static void - ural_cfg_write(struct ural_softc *sc, uint16_t reg, uint16_t val); - -static void -ural_cfg_write_multi(struct ural_softc *sc, uint16_t reg, - void *buf, uint16_t len); -static void - ural_cfg_bbp_write(struct ural_softc *sc, uint8_t reg, uint8_t val); - -static uint8_t - ural_cfg_bbp_read(struct ural_softc *sc, uint8_t reg); - -static void - ural_cfg_rf_write(struct ural_softc *sc, uint8_t reg, uint32_t val); - -static void - ural_end_of_commands(struct ural_softc *sc); - -static const char * - ural_get_rf(int rev); - -static int - ural_rxrate(struct ural_rx_desc *desc); - -static uint16_t - ural_ack_rate(struct ieee80211com *ic, uint16_t rate); - -static uint16_t -ural_txtime(struct ural_softc *sc, uint16_t len, uint16_t rate, - uint32_t flags); - -static uint8_t - ural_plcp_signal(uint16_t rate); - -static void -ural_setup_tx_desc(struct ural_softc *sc, uint32_t flags, uint16_t len, - uint16_t rate); -static void - ural_watchdog(void *arg); - -static void - ural_init_cb(void *arg); - -static int - ural_ioctl_cb(struct ifnet *ifp, u_long cmd, caddr_t data); - -static void - ural_start_cb(struct ifnet *ifp); - -static int - ural_media_change_cb(struct ifnet *ifp); - -static int - ural_reset_cb(struct ifnet *ifp); - -static int - ural_newstate_cb(struct ieee80211com *ic, enum ieee80211_state nstate, int arg); - +static void ural_cfg_do_request(struct ural_softc *sc, usb_device_request_t *req, void *data); +static void ural_cfg_set_testmode(struct ural_softc *sc); +static void ural_cfg_eeprom_read(struct ural_softc *sc, uint16_t addr, void *buf, uint16_t len); +static uint16_t ural_cfg_read(struct ural_softc *sc, uint16_t reg); +static void ural_cfg_read_multi(struct ural_softc *sc, uint16_t reg, void *buf, uint16_t len); +static void ural_cfg_write(struct ural_softc *sc, uint16_t reg, uint16_t val); +static void ural_cfg_write_multi(struct ural_softc *sc, uint16_t reg, void *buf, uint16_t len); +static void ural_cfg_bbp_write(struct ural_softc *sc, uint8_t reg, uint8_t val); +static uint8_t ural_cfg_bbp_read(struct ural_softc *sc, uint8_t reg); +static void ural_cfg_rf_write(struct ural_softc *sc, uint8_t reg, uint32_t val); +static void ural_end_of_commands(struct ural_softc *sc); +static const char *ural_get_rf(int rev); +static int ural_rxrate(struct ural_rx_desc *desc); +static uint16_t ural_ack_rate(struct ieee80211com *ic, uint16_t rate); +static uint16_t ural_txtime(struct ural_softc *sc, uint16_t len, uint16_t rate, uint32_t flags); +static uint8_t ural_plcp_signal(uint16_t rate); +static void ural_setup_tx_desc(struct ural_softc *sc, uint32_t flags, uint16_t len, uint16_t rate); +static void ural_watchdog(void *arg); +static void ural_init_cb(void *arg); +static int ural_ioctl_cb(struct ifnet *ifp, u_long cmd, caddr_t data); +static void ural_start_cb(struct ifnet *ifp); +static int ural_media_change_cb(struct ifnet *ifp); +static int ural_reset_cb(struct ifnet *ifp); +static int ural_newstate_cb(struct ieee80211com *ic, enum ieee80211_state nstate, int arg); static void ural_std_command(struct ieee80211com *ic, usbd_config_td_command_t *func); static void ural_scan_start_cb(struct ieee80211com *); static void ural_scan_end_cb(struct ieee80211com *); static void ural_set_channel_cb(struct ieee80211com *); +static void ural_cfg_tx_bcn(struct ural_softc *sc); +static void ural_cfg_disable_rf_tune(struct ural_softc *sc); +static void ural_cfg_set_bssid(struct ural_softc *sc, uint8_t *bssid); +static void ural_cfg_set_macaddr(struct ural_softc *sc, uint8_t *addr); +static void ural_cfg_set_txantenna(struct ural_softc *sc, uint8_t antenna); +static void ural_cfg_set_rxantenna(struct ural_softc *sc, uint8_t antenna); +static void ural_cfg_read_eeprom(struct ural_softc *sc); +static uint8_t ural_cfg_bbp_init(struct ural_softc *sc); +static void ural_cfg_amrr_start(struct ural_softc *sc); -static void - ural_cfg_tx_bcn(struct ural_softc *sc); - -static void - ural_cfg_disable_rf_tune(struct ural_softc *sc); - -static void - ural_cfg_set_bssid(struct ural_softc *sc, uint8_t *bssid); - -static void - ural_cfg_set_macaddr(struct ural_softc *sc, uint8_t *addr); - -static void - ural_cfg_set_txantenna(struct ural_softc *sc, uint8_t antenna); - -static void - ural_cfg_set_rxantenna(struct ural_softc *sc, uint8_t antenna); - -static void - ural_cfg_read_eeprom(struct ural_softc *sc); - -static uint8_t - ural_cfg_bbp_init(struct ural_softc *sc); - -static void - ural_cfg_amrr_start(struct ural_softc *sc); - /* various supported device vendors/products */ static const struct usb_devno ural_devs[] = { {USB_VENDOR_ASUS, USB_PRODUCT_ASUS_WL167G}, @@ -2005,7 +1938,8 @@ struct ural_config_copy *cc, uint16_t refcount) { enum { - N_RF5222 = (sizeof(ural_rf5222) / sizeof(ural_rf5222[0]))}; + N_RF5222 = (sizeof(ural_rf5222) / sizeof(ural_rf5222[0])), + }; uint32_t i; uint32_t chan; uint8_t power; @@ -2446,7 +2380,8 @@ ural_cfg_bbp_init(struct ural_softc *sc) { enum { - N_DEF_BBP = (sizeof(ural_def_bbp) / sizeof(ural_def_bbp[0]))}; + N_DEF_BBP = (sizeof(ural_def_bbp) / sizeof(ural_def_bbp[0])), + }; uint16_t i; uint8_t to; @@ -2516,7 +2451,8 @@ struct ural_config_copy *cc, uint16_t refcount) { enum { - N_DEF_MAC = (sizeof(ural_def_mac) / sizeof(ural_def_mac[0]))}; + N_DEF_MAC = (sizeof(ural_def_mac) / sizeof(ural_def_mac[0])), + }; uint16_t tmp; uint16_t i; uint8_t to; From owner-p4-projects@FreeBSD.ORG Fri Jan 4 21:37:27 2008 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id EA9D316A419; Fri, 4 Jan 2008 21:37:26 +0000 (UTC) Delivered-To: perforce@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 97A2416A417 for ; Fri, 4 Jan 2008 21:37:26 +0000 (UTC) (envelope-from jb@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id 8574113C448 for ; Fri, 4 Jan 2008 21:37:26 +0000 (UTC) (envelope-from jb@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.1/8.14.1) with ESMTP id m04LbQsI064704 for ; Fri, 4 Jan 2008 21:37:26 GMT (envelope-from jb@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.1/8.14.1/Submit) id m04LbQxF064701 for perforce@freebsd.org; Fri, 4 Jan 2008 21:37:26 GMT (envelope-from jb@freebsd.org) Date: Fri, 4 Jan 2008 21:37:26 GMT Message-Id: <200801042137.m04LbQxF064701@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to jb@freebsd.org using -f From: John Birrell To: Perforce Change Reviews Cc: Subject: PERFORCE change 132526 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 04 Jan 2008 21:37:27 -0000 http://perforce.freebsd.org/chv.cgi?CH=132526 Change 132526 by jb@jb_freebsd1 on 2008/01/04 21:36:46 Pass the trapframe pointer to the clock hook function so we get to use the registers. Make the cyclic_clock() function machine-specific in case we need to do it differently on other arches. Save the pc in the cpu structure array. Pass the pc and upc to the profile provider probes so they are available to DTrace scripts as arg0 and arg1 in exactly the same way as they are on Solaris. Affected files ... .. //depot/projects/dtrace/src/sys/amd64/amd64/local_apic.c#13 edit .. //depot/projects/dtrace/src/sys/cddl/amd64/cyclic_machdep.c#8 edit .. //depot/projects/dtrace/src/sys/cddl/dev/profile/profile.c#5 edit .. //depot/projects/dtrace/src/sys/cddl/kern/cyclic.c#8 edit .. //depot/projects/dtrace/src/sys/compat/opensolaris/sys/cpuvar.h#6 edit .. //depot/projects/dtrace/src/sys/sys/dtrace_bsd.h#10 edit Differences ... ==== //depot/projects/dtrace/src/sys/amd64/amd64/local_apic.c#13 (text+ko) ==== @@ -682,10 +682,10 @@ */ int cpu = PCPU_GET(cpuid); if (lapic_cyclic_clock_func[cpu] != NULL) - (*lapic_cyclic_clock_func[cpu])(); + (*lapic_cyclic_clock_func[cpu])(frame); #endif -/* Fire hardclock at hz. */ + /* Fire hardclock at hz. */ la->la_hard_ticks += hz; if (la->la_hard_ticks >= lapic_timer_hz) { la->la_hard_ticks -= lapic_timer_hz; ==== //depot/projects/dtrace/src/sys/cddl/amd64/cyclic_machdep.c#8 (text+ko) ==== @@ -30,7 +30,6 @@ static void disable(cyb_arg_t); static void reprogram(cyb_arg_t, hrtime_t); static void xcall(cyb_arg_t, cpu_t *, cyc_func_t, void *); -static void cyclic_clock(void); static cyc_backend_t be = { NULL, /* cyb_configure */ @@ -74,6 +73,31 @@ cyclic_uninit(); } +static hrtime_t exp_due[SMP_MAXCPU]; + +/* + * This function is the one registered by the machine dependent + * initialiser as the callback for high speed timer events. + */ +static void +cyclic_clock(struct trapframe *frame) +{ + cpu_t *c = &solaris_cpu[curcpu]; + + if (c->cpu_cyclic != NULL && gethrtime() >= exp_due[curcpu]) { + if (TRAPF_USERMODE(frame)) { + c->cpu_profile_pc = 0; + c->cpu_profile_upc = TRAPF_PC(frame); + } else { + c->cpu_profile_pc = TRAPF_PC(frame); + c->cpu_profile_upc = 0; + } + + /* Fire any timers that are due. */ + cyclic_fire(c); + } +} + static void enable(cyb_arg_t arg) { /* Register the cyclic clock callback function. */ @@ -86,7 +110,6 @@ lapic_cyclic_clock_func[curcpu] = NULL; } -static hrtime_t exp_due[SMP_MAXCPU]; static void reprogram(cyb_arg_t arg, hrtime_t exp) { exp_due[curcpu] = exp; @@ -104,4 +127,3 @@ smp_rendezvous_cpus((cpumask_t) (1 << c->cpuid), NULL, func, NULL, param); } - ==== //depot/projects/dtrace/src/sys/cddl/dev/profile/profile.c#5 (text+ko) ==== @@ -198,29 +198,23 @@ profile_probe_percpu_t *pcpu = arg; profile_probe_t *prof = pcpu->profc_probe; hrtime_t late; + solaris_cpu_t *c = &solaris_cpu[curcpu]; late = dtrace_gethrtime() - pcpu->profc_expected; pcpu->profc_expected += pcpu->profc_interval; -#ifdef DOODAD - dtrace_probe(prof->prof_id, CPU->cpu_profile_pc, - CPU->cpu_profile_upc, late, 0, 0); -#else - dtrace_probe(prof->prof_id, 0, 0, late, 0, 0); -#endif + dtrace_probe(prof->prof_id, c->cpu_profile_pc, + c->cpu_profile_upc, late, 0, 0); } static void profile_tick(void *arg) { profile_probe_t *prof = arg; + solaris_cpu_t *c = &solaris_cpu[curcpu]; -#ifdef DOODAD - dtrace_probe(prof->prof_id, CPU->cpu_profile_pc, - CPU->cpu_profile_upc, 0, 0, 0); -#else - dtrace_probe(prof->prof_id, 0, 0, 0, 0, 0); -#endif + dtrace_probe(prof->prof_id, c->cpu_profile_pc, + c->cpu_profile_upc, 0, 0, 0); } static void ==== //depot/projects/dtrace/src/sys/cddl/kern/cyclic.c#8 (text+ko) ==== @@ -333,6 +333,7 @@ #include #include #include +#include static kmem_cache_t *cyclic_id_cache; static cyc_id_t *cyclic_id_head; @@ -1415,20 +1416,6 @@ SYSUNINIT(cyclic_unregister, SI_SUB_CYCLIC, SI_ORDER_SECOND, cyclic_unload, NULL); -/* - * This function is the one registered by the machine dependent - * initialiser as the callback for high speed timer events. - */ -static void -cyclic_clock(void) -{ - cpu_t *c = &solaris_cpu[curcpu]; - - if (c->cpu_cyclic != NULL && gethrtime() >= exp_due[curcpu]) - /* Fire any timers that are due. */ - cyclic_fire(c); -} - /* ARGSUSED */ static int cyclic_modevent(module_t mod __unused, int type, void *data __unused) ==== //depot/projects/dtrace/src/sys/compat/opensolaris/sys/cpuvar.h#6 (text+ko) ==== @@ -39,6 +39,8 @@ struct cyc_cpu *cpu_cyclic; uint32_t cpu_flags; uint_t cpu_intr_actv; + uintptr_t cpu_profile_pc; + uintptr_t cpu_profile_upc; } solaris_cpu_t; /* Some code may choose to redefine this if pcpu_t would be more useful. */ ==== //depot/projects/dtrace/src/sys/sys/dtrace_bsd.h#10 (text+ko) ==== @@ -38,7 +38,7 @@ * Cyclic clock function type definition used to hook the cyclic * subsystem into the appropriate timer interrupt. */ -typedef void (*cyclic_clock_func_t)(void); +typedef void (*cyclic_clock_func_t)(struct trapframe *); /* * These external variables are actually machine-dependent, so From owner-p4-projects@FreeBSD.ORG Fri Jan 4 21:39:29 2008 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 8B7EC16A4A1; Fri, 4 Jan 2008 21:39:29 +0000 (UTC) Delivered-To: perforce@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 518CB16A49C for ; Fri, 4 Jan 2008 21:39:29 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id 26D8813C455 for ; Fri, 4 Jan 2008 21:39:29 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.1/8.14.1) with ESMTP id m04LdSP6064785 for ; Fri, 4 Jan 2008 21:39:28 GMT (envelope-from hselasky@FreeBSD.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.1/8.14.1/Submit) id m04LdSh3064782 for perforce@freebsd.org; Fri, 4 Jan 2008 21:39:28 GMT (envelope-from hselasky@FreeBSD.org) Date: Fri, 4 Jan 2008 21:39:28 GMT Message-Id: <200801042139.m04LdSh3064782@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky To: Perforce Change Reviews Cc: Subject: PERFORCE change 132528 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 04 Jan 2008 21:39:29 -0000 http://perforce.freebsd.org/chv.cgi?CH=132528 Change 132528 by hselasky@hselasky_laptop001 on 2008/01/04 21:38:40 Remove unused file. Affected files ... .. //depot/projects/usb/src/sys/dev/usb/uss820_dci_pci.c#4 delete Differences ... From owner-p4-projects@FreeBSD.ORG Fri Jan 4 22:06:58 2008 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 3EFD916A420; Fri, 4 Jan 2008 22:06:58 +0000 (UTC) Delivered-To: perforce@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 0416716A41A for ; Fri, 4 Jan 2008 22:06:58 +0000 (UTC) (envelope-from swise@FreeBSD.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id E599313C459 for ; Fri, 4 Jan 2008 22:06:57 +0000 (UTC) (envelope-from swise@FreeBSD.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.1/8.14.1) with ESMTP id m04M6vMB067106 for ; Fri, 4 Jan 2008 22:06:57 GMT (envelope-from swise@FreeBSD.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.1/8.14.1/Submit) id m04M6vej067103 for perforce@freebsd.org; Fri, 4 Jan 2008 22:06:57 GMT (envelope-from swise@FreeBSD.org) Date: Fri, 4 Jan 2008 22:06:57 GMT Message-Id: <200801042206.m04M6vej067103@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to swise@FreeBSD.org using -f From: Steve Wise To: Perforce Change Reviews Cc: Subject: PERFORCE change 132531 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 04 Jan 2008 22:06:58 -0000 http://perforce.freebsd.org/chv.cgi?CH=132531 Change 132531 by swise@swise:vic10:iwarp on 2008/01/04 22:06:24 Add tcb dump to cxgbtool. Affected files ... .. //depot/projects/iwarp/usr.sbin/cxgbtool/cxgbtool.c#3 edit Differences ... ==== //depot/projects/iwarp/usr.sbin/cxgbtool/cxgbtool.c#3 (text+ko) ==== @@ -858,26 +858,25 @@ } #endif -#ifdef notyet static int get_tcb2(unsigned int tcb_idx, const char *iff_name) { uint64_t *d; unsigned int i; - struct toetool_mem_range *op; + struct ch_mem_range op; - op = malloc(sizeof(*op) + TCB_SIZE); - if (!op) + op.buf = malloc(TCB_SIZE); + if (!op.buf) err(1, "get TCB"); + memset(op.buf, 0xaa, TCB_SIZE); - op->cmd = TOETOOL_GET_MEM; - op->mem_id = MEM_CM; - op->addr = tcb_idx * TCB_SIZE; - op->len = TCB_SIZE; + op.mem_id = MEM_CM; + op.addr = tcb_idx * TCB_SIZE; + op.len = TCB_SIZE; - if (doit(iff_name, op) < 0) + if (doit(iff_name, CHELSIO_GET_MEM, &op) < 0) err(1, "get TCB"); - for (d = (uint64_t *)op->buf, i = 0; i < TCB_SIZE / 32; i++) { + for (d = (uint64_t *)op.buf, i = 0; i < TCB_SIZE / 32; i++) { printf("%2u:", i); printf(" %08x %08x %08x %08x", (uint32_t)d[1], (uint32_t)(d[1] >> 32), (uint32_t)d[0], @@ -888,7 +887,7 @@ (uint32_t)(d[0] >> 32)); d += 2; } - free(op); + free(op.buf); return 0; } @@ -900,19 +899,23 @@ if (argc != start_arg + 1) return -1; - op.cmd = TOETOOL_GET_TCB; if (get_int_arg(argv[start_arg], &op.tcb_index)) return -1; +#if 0 + op.cmd = CHELSIO_GET_TCB; /* * If this operation isn't directly supported by the driver we may * still be able to read TCBs using the generic memory dump operation. */ - if (doit(iff_name, &op) < 0) { + if (doit(iff_name, CHELSIO_GET_TCB, &op) < 0) { if (errno != EOPNOTSUPP) err(1, "get TCB"); return get_tcb2(op.tcb_index, iff_name); } +#else + return get_tcb2(op.tcb_index, iff_name); +#endif for (d = op.tcb_data, i = 0; i < TCB_WORDS; i += 8) { int j; @@ -924,7 +927,7 @@ } return 0; } -#endif + #ifdef WRC /* * The following defines, typedefs and structures are defined in the FW and @@ -1862,8 +1865,6 @@ r = conf_pm(argc, argv, 3, iff_name); else if (!strcmp(argv[2], "tcam")) r = conf_tcam(argc, argv, 3, iff_name); - else if (!strcmp(argv[2], "tcb")) - r = get_tcb(argc, argv, 3, iff_name); #endif #ifdef WRC else if (!strcmp(argv[2], "wrc")) @@ -1873,6 +1874,8 @@ else if (!strcmp(argv[2], "regdump")) r = dump_regs(argc, argv, 3, iff_name); #ifdef CHELSIO_INTERNAL + else if (!strcmp(argv[2], "tcb")) + r = get_tcb(argc, argv, 3, iff_name); else if (!strcmp(argv[2], "memdump")) r = dump_mc7(argc, argv, 3, iff_name); else if (!strcmp(argv[2], "meminfo")) From owner-p4-projects@FreeBSD.ORG Fri Jan 4 22:29:21 2008 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 3577A16A46B; Fri, 4 Jan 2008 22:29:21 +0000 (UTC) Delivered-To: perforce@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id ED8C316A41B for ; Fri, 4 Jan 2008 22:29:20 +0000 (UTC) (envelope-from gonzo@FreeBSD.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id DAD8413C4EB for ; Fri, 4 Jan 2008 22:29:20 +0000 (UTC) (envelope-from gonzo@FreeBSD.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.1/8.14.1) with ESMTP id m04MTKGv068238 for ; Fri, 4 Jan 2008 22:29:20 GMT (envelope-from gonzo@FreeBSD.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.1/8.14.1/Submit) id m04MTKJg068235 for perforce@freebsd.org; Fri, 4 Jan 2008 22:29:20 GMT (envelope-from gonzo@FreeBSD.org) Date: Fri, 4 Jan 2008 22:29:20 GMT Message-Id: <200801042229.m04MTKJg068235@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to gonzo@FreeBSD.org using -f From: Oleksandr Tymoshenko To: Perforce Change Reviews Cc: Subject: PERFORCE change 132532 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 04 Jan 2008 22:29:21 -0000 http://perforce.freebsd.org/chv.cgi?CH=132532 Change 132532 by gonzo@gonzo_jeeves on 2008/01/04 22:29:00 o Add R_TYPE macro to make rtld-elf buildable again. Affected files ... .. //depot/projects/mips2-jnpr/src/sys/mips/include/elf.h#4 edit Differences ... ==== //depot/projects/mips2-jnpr/src/sys/mips/include/elf.h#4 (text+ko) ==== @@ -147,6 +147,8 @@ #define R_MIPS_CALLHI16 30 /* upper 16 bit GOT entry for function */ #define R_MIPS_CALLLO16 31 /* lower 16 bit GOT entry for function */ +#define R_TYPE(name) __CONCAT(R_MIPS_,name) + /* Define "machine" characteristics */ #define ELF_TARG_CLASS ELFCLASS32 #define ELF_TARG_DATA ELFDATA2MSB From owner-p4-projects@FreeBSD.ORG Fri Jan 4 22:49:42 2008 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 464EB16A419; Fri, 4 Jan 2008 22:49:42 +0000 (UTC) Delivered-To: perforce@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 0C39316A417 for ; Fri, 4 Jan 2008 22:49:42 +0000 (UTC) (envelope-from gonzo@FreeBSD.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id D502013C455 for ; Fri, 4 Jan 2008 22:49:41 +0000 (UTC) (envelope-from gonzo@FreeBSD.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.1/8.14.1) with ESMTP id m04MnfOw069294 for ; Fri, 4 Jan 2008 22:49:41 GMT (envelope-from gonzo@FreeBSD.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.1/8.14.1/Submit) id m04Mnfua069291 for perforce@freebsd.org; Fri, 4 Jan 2008 22:49:41 GMT (envelope-from gonzo@FreeBSD.org) Date: Fri, 4 Jan 2008 22:49:41 GMT Message-Id: <200801042249.m04Mnfua069291@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to gonzo@FreeBSD.org using -f From: Oleksandr Tymoshenko To: Perforce Change Reviews Cc: Subject: PERFORCE change 132533 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 04 Jan 2008 22:49:42 -0000 http://perforce.freebsd.org/chv.cgi?CH=132533 Change 132533 by gonzo@gonzo_jeeves on 2008/01/04 22:48:49 o Set FLT_ROUNDS to -1 for softfloat case Affected files ... .. //depot/projects/mips2-jnpr/src/sys/mips/include/float.h#4 edit Differences ... ==== //depot/projects/mips2-jnpr/src/sys/mips/include/float.h#4 (text+ko) ==== @@ -42,7 +42,11 @@ __END_DECLS #define FLT_RADIX 2 /* b */ +#ifdef SOFTFLOAT +#define FLT_ROUNDS -1 +#else #define FLT_ROUNDS __flt_rounds() /* FP addition rounds to nearest */ +#endif #define FLT_MANT_DIG 24 /* p */ #define FLT_EPSILON 1.19209290E-07F /* b**(1-p) */ From owner-p4-projects@FreeBSD.ORG Fri Jan 4 23:01:56 2008 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id CF0BF16A419; Fri, 4 Jan 2008 23:01:55 +0000 (UTC) Delivered-To: perforce@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 947DC16A417 for ; Fri, 4 Jan 2008 23:01:55 +0000 (UTC) (envelope-from gonzo@FreeBSD.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id 812A013C455 for ; Fri, 4 Jan 2008 23:01:55 +0000 (UTC) (envelope-from gonzo@FreeBSD.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.1/8.14.1) with ESMTP id m04N1tfd070173 for ; Fri, 4 Jan 2008 23:01:55 GMT (envelope-from gonzo@FreeBSD.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.1/8.14.1/Submit) id m04N1tVW070170 for perforce@freebsd.org; Fri, 4 Jan 2008 23:01:55 GMT (envelope-from gonzo@FreeBSD.org) Date: Fri, 4 Jan 2008 23:01:55 GMT Message-Id: <200801042301.m04N1tVW070170@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to gonzo@FreeBSD.org using -f From: Oleksandr Tymoshenko To: Perforce Change Reviews Cc: Subject: PERFORCE change 132534 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 04 Jan 2008 23:01:56 -0000 http://perforce.freebsd.org/chv.cgi?CH=132534 Change 132534 by gonzo@gonzo_jeeves on 2008/01/04 23:01:44 o Define MACHINE and MACHINE_ARCH properly o Get rid of several netbsdism that prevented userland from successfull build. Affected files ... .. //depot/projects/mips2-jnpr/src/sys/mips/include/param.h#5 edit Differences ... ==== //depot/projects/mips2-jnpr/src/sys/mips/include/param.h#5 (text+ko) ==== @@ -51,8 +51,12 @@ #endif #endif +#ifndef MACHINE +#define MACHINE "mips" +#endif +#ifndef MACHINE_ARCH #define MACHINE_ARCH "mips" -#define _MACHINE_ARCH mips +#endif /* * OBJFORMAT_NAMES is a comma-separated list of the object formats @@ -115,10 +119,6 @@ #define CLBYTES (CLSIZE * NBPG) #define CLSIZELOG2 0 -/* NOTE: SSIZE, SINCR and UPAGES must be multiples of CLSIZE */ -#define SSIZE 1 /* initial stack size/NBPG */ -#define SINCR 1 /* increment of stack/NBPG */ - /* * NOTE: In FreeBSD, Uarea's don't have a fixed address. * Therefore, any code imported from OpenBSD which depends on From owner-p4-projects@FreeBSD.ORG Fri Jan 4 23:29:24 2008 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 8AB5D16A420; Fri, 4 Jan 2008 23:29:24 +0000 (UTC) Delivered-To: perforce@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 5085116A417 for ; Fri, 4 Jan 2008 23:29:24 +0000 (UTC) (envelope-from gonzo@FreeBSD.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id 3C60A13C45D for ; Fri, 4 Jan 2008 23:29:24 +0000 (UTC) (envelope-from gonzo@FreeBSD.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.1/8.14.1) with ESMTP id m04NTNG4073333 for ; Fri, 4 Jan 2008 23:29:23 GMT (envelope-from gonzo@FreeBSD.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.1/8.14.1/Submit) id m04NTN19073330 for perforce@freebsd.org; Fri, 4 Jan 2008 23:29:23 GMT (envelope-from gonzo@FreeBSD.org) Date: Fri, 4 Jan 2008 23:29:23 GMT Message-Id: <200801042329.m04NTN19073330@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to gonzo@FreeBSD.org using -f From: Oleksandr Tymoshenko To: Perforce Change Reviews Cc: Subject: PERFORCE change 132536 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 04 Jan 2008 23:29:24 -0000 http://perforce.freebsd.org/chv.cgi?CH=132536 Change 132536 by gonzo@gonzo_jeeves on 2008/01/04 23:29:15 o Get rid of intrmask_t, use uint32_t instead. intrmask_t seems to be obsolete type and confuses userland pieces that try to access kernelland strucutures like kdump/fstat/... o Replace u_int32_t with uint32_t Approved by: bsdimp Affected files ... .. //depot/projects/mips2-jnpr/src/sys/mips/include/clock.h#6 edit .. //depot/projects/mips2-jnpr/src/sys/mips/include/intr.h#5 edit .. //depot/projects/mips2-jnpr/src/sys/mips/mips/interrupt.c#5 edit Differences ... ==== //depot/projects/mips2-jnpr/src/sys/mips/include/clock.h#6 (text+ko) ==== @@ -30,7 +30,7 @@ /* Standard MIPS Processors - count runs at 1/2 of the CPU pipeline frequency */ #define MIPS_COUNT_DIVIDER 2 -extern intrmask_t clockintr(intrmask_t, struct clockframe *); +extern uint32_t clockintr(uint32_t, struct clockframe *); #define wall_cmos_clock 0 #define adjkerntz 0 ==== //depot/projects/mips2-jnpr/src/sys/mips/include/intr.h#5 (text+ko) ==== @@ -53,8 +53,8 @@ #define INTRCNT_PE 3 /* irq 4 */ #define INTRCNT_PICNIC 4 /* irq 5 */ -extern intrmask_t idle_mask; -extern void (*mips_ack_interrupt)(int, intrmask_t); +extern uint32_t idle_mask; +extern void (*mips_ack_interrupt)(int, uint32_t); typedef int ih_func_t(void *); @@ -74,9 +74,9 @@ extern struct mips_intr_handler intr_handlers[]; struct trapframe; -void mips_set_intr(int pri, intrmask_t mask, - intrmask_t (*int_hand)(intrmask_t, struct trapframe *)); -intrmask_t mips_handle_interrupts(intrmask_t pending, struct trapframe *cf); +void mips_set_intr(int pri, uint32_t mask, + uint32_t (*int_hand)(uint32_t, struct trapframe *)); +uint32_t mips_handle_interrupts(uint32_t pending, struct trapframe *cf); void intr_enable_source(uintptr_t irq); struct trapframe * mips_get_trapframe(void *ih_arg); int inthand_add(const char *name, u_int irq, void (*handler)(void *), ==== //depot/projects/mips2-jnpr/src/sys/mips/mips/interrupt.c#5 (text+ko) ==== @@ -70,8 +70,8 @@ #include #include -intrmask_t idle_mask; -void (*mips_ack_interrupt)(int, intrmask_t); +uint32_t idle_mask; +void (*mips_ack_interrupt)(int, uint32_t); struct mips_intr_handler intr_handlers[16]; /* @@ -123,7 +123,7 @@ mips_interrupt(struct trapframe *trapframe) { struct thread *td = curthread; - u_int32_t cause, pending; + uint32_t cause, pending; /* * Paranoic? Perhaps. But if we got here with the enable @@ -299,11 +299,11 @@ /* * Process interrupts. The parameter pending has non-masked interrupts. */ -intrmask_t -mips_handle_interrupts (intrmask_t pending, struct trapframe *cf) +uint32_t +mips_handle_interrupts (uint32_t pending, struct trapframe *cf) { struct mips_intr_handler *ih; - intrmask_t catched, vm; + uint32_t catched, vm; volatile long *ih_count; int v; /* @@ -368,11 +368,11 @@ /* * spllower case : turning on additional INT bits */ -u_int32_t -updateimask(intrmask_t newcpl) +uint32_t +updateimask(uint32_t newcpl) { - intrmask_t tmp_cpl; - u_int32_t tmp_reg; + uint32_t tmp_cpl; + uint32_t tmp_reg; unsigned int ic_reg, new_ic_reg; unsigned int sr_reg, new_sr_reg; @@ -396,11 +396,11 @@ /* * splraise case */ -u_int32_t -raiseimask(intrmask_t newcpl) +uint32_t +raiseimask(uint32_t newcpl) { - intrmask_t tmp_cpl; - u_int32_t tmp_reg, tmp2, tmp3; + uint32_t tmp_cpl; + uint32_t tmp_reg, tmp2, tmp3; unsigned int ic_reg; unsigned int sr_reg; From owner-p4-projects@FreeBSD.ORG Sat Jan 5 03:34:36 2008 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 8DB1F16A469; Sat, 5 Jan 2008 03:34:36 +0000 (UTC) Delivered-To: perforce@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 5329C16A421 for ; Sat, 5 Jan 2008 03:34:36 +0000 (UTC) (envelope-from imp@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id 3980713C45D for ; Sat, 5 Jan 2008 03:34:36 +0000 (UTC) (envelope-from imp@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.1/8.14.1) with ESMTP id m053YamG001423 for ; Sat, 5 Jan 2008 03:34:36 GMT (envelope-from imp@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.1/8.14.1/Submit) id m053YaFF001420 for perforce@freebsd.org; Sat, 5 Jan 2008 03:34:36 GMT (envelope-from imp@freebsd.org) Date: Sat, 5 Jan 2008 03:34:36 GMT Message-Id: <200801050334.m053YaFF001420@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to imp@freebsd.org using -f From: Warner Losh To: Perforce Change Reviews Cc: Subject: PERFORCE change 132539 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 05 Jan 2008 03:34:36 -0000 http://perforce.freebsd.org/chv.cgi?CH=132539 Change 132539 by imp@imp_paco-paco on 2008/01/05 03:34:31 Hook in the tlb functions. More undefines bite the dust... Affected files ... .. //depot/projects/mips2-jnpr/src/sys/conf/files.mips#5 edit .. //depot/projects/mips2-jnpr/src/sys/mips/mips/tlb.S#3 edit Differences ... ==== //depot/projects/mips2-jnpr/src/sys/conf/files.mips#5 (text+ko) ==== @@ -64,6 +64,7 @@ mips/mips/fp.S standard mips/mips/pm_machdep.c standard mips/mips/swtch.S standard +mips/mips/tlb.S standard mips/mips/busdma_machdep.c standard #mips/mips/cache.c standard ==== //depot/projects/mips2-jnpr/src/sys/mips/mips/tlb.S#3 (text+ko) ==== @@ -57,10 +57,11 @@ #include #include +#include #include #include -#include "assym.S" +#include "assym.s" .set noreorder # Noreorder is default style! .set mips3 From owner-p4-projects@FreeBSD.ORG Sat Jan 5 04:34:39 2008 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 8DDAA16A474; Sat, 5 Jan 2008 04:34:39 +0000 (UTC) Delivered-To: perforce@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 5044916A46D for ; Sat, 5 Jan 2008 04:34:39 +0000 (UTC) (envelope-from jb@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id 3D2A113C447 for ; Sat, 5 Jan 2008 04:34:39 +0000 (UTC) (envelope-from jb@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.1/8.14.1) with ESMTP id m054YdN3005217 for ; Sat, 5 Jan 2008 04:34:39 GMT (envelope-from jb@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.1/8.14.1/Submit) id m054YdD8005192 for perforce@freebsd.org; Sat, 5 Jan 2008 04:34:39 GMT (envelope-from jb@freebsd.org) Date: Sat, 5 Jan 2008 04:34:39 GMT Message-Id: <200801050434.m054YdD8005192@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to jb@freebsd.org using -f From: John Birrell To: Perforce Change Reviews Cc: Subject: PERFORCE change 132540 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 05 Jan 2008 04:34:39 -0000 http://perforce.freebsd.org/chv.cgi?CH=132540 Change 132540 by jb@jb_freebsd1 on 2008/01/05 04:34:38 Add SMP to the CFLAGS to make these build properly when built individually rather than as part of a buildkernel. I'll need to revise this when I get up to the arches that are UP only. For now I'll settle for the SMP case working properly because it is the harder one to solve. Affected files ... .. //depot/projects/dtrace/src/sys/modules/cyclic/Makefile#8 edit .. //depot/projects/dtrace/src/sys/modules/dtrace/dtrace/Makefile#12 edit Differences ... ==== //depot/projects/dtrace/src/sys/modules/cyclic/Makefile#8 (text+ko) ==== @@ -12,7 +12,7 @@ -I${.CURDIR}/../.. \ -I${.CURDIR}/../../cddl/${MACHINE_ARCH} -CFLAGS+= -DDEBUG=1 +CFLAGS+= -DSMP -DDEBUG=1 IGNORE_PRAGMA= 1 ==== //depot/projects/dtrace/src/sys/modules/dtrace/dtrace/Makefile#12 (text+ko) ==== @@ -26,7 +26,7 @@ -I${.CURDIR}/../../../contrib/opensolaris/uts/common \ -I${.CURDIR}/../../.. -DDIS_MEM -CFLAGS+= -DDEBUG +CFLAGS+= -DSMP -DDEBUG EXPORT_SYMS= dtrace_register \ dtrace_unregister \ From owner-p4-projects@FreeBSD.ORG Sat Jan 5 04:36:42 2008 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id EE5AC16A419; Sat, 5 Jan 2008 04:36:41 +0000 (UTC) Delivered-To: perforce@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id B3BC916A477 for ; Sat, 5 Jan 2008 04:36:41 +0000 (UTC) (envelope-from jb@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id A10E113C448 for ; Sat, 5 Jan 2008 04:36:41 +0000 (UTC) (envelope-from jb@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.1/8.14.1) with ESMTP id m054afIL005321 for ; Sat, 5 Jan 2008 04:36:41 GMT (envelope-from jb@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.1/8.14.1/Submit) id m054afn3005318 for perforce@freebsd.org; Sat, 5 Jan 2008 04:36:41 GMT (envelope-from jb@freebsd.org) Date: Sat, 5 Jan 2008 04:36:41 GMT Message-Id: <200801050436.m054afn3005318@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to jb@freebsd.org using -f From: John Birrell To: Perforce Change Reviews Cc: Subject: PERFORCE change 132541 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 05 Jan 2008 04:36:42 -0000 http://perforce.freebsd.org/chv.cgi?CH=132541 Change 132541 by jb@jb_freebsd1 on 2008/01/05 04:36:14 Add the printf buffer option to clean up output a bit. Affected files ... .. //depot/projects/dtrace/src/sys/amd64/conf/GENERIC#29 edit Differences ... ==== //depot/projects/dtrace/src/sys/amd64/conf/GENERIC#29 (text+ko) ==== @@ -62,6 +62,7 @@ options KBD_INSTALL_CDEV # install a CDEV entry in /dev options STOP_NMI # Stop CPUS using NMI instead of IPI options AUDIT # Security event auditing +options PRINTF_BUFR_SIZE=128 # Prevent printf output being interspersed. # Debugging for use in -current options KDB # Enable kernel debugger support. From owner-p4-projects@FreeBSD.ORG Sat Jan 5 04:37:43 2008 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 435D116A41A; Sat, 5 Jan 2008 04:37:43 +0000 (UTC) Delivered-To: perforce@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 08F0D16A418 for ; Sat, 5 Jan 2008 04:37:43 +0000 (UTC) (envelope-from jb@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id D20E213C44B for ; Sat, 5 Jan 2008 04:37:42 +0000 (UTC) (envelope-from jb@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.1/8.14.1) with ESMTP id m054bg4g005406 for ; Sat, 5 Jan 2008 04:37:42 GMT (envelope-from jb@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.1/8.14.1/Submit) id m054bgNQ005403 for perforce@freebsd.org; Sat, 5 Jan 2008 04:37:42 GMT (envelope-from jb@freebsd.org) Date: Sat, 5 Jan 2008 04:37:42 GMT Message-Id: <200801050437.m054bgNQ005403@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to jb@freebsd.org using -f From: John Birrell To: Perforce Change Reviews Cc: Subject: PERFORCE change 132542 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 05 Jan 2008 04:37:43 -0000 http://perforce.freebsd.org/chv.cgi?CH=132542 Change 132542 by jb@jb_freebsd1 on 2008/01/05 04:37:17 Enable the CPU setup code. Affected files ... .. //depot/projects/dtrace/src/sys/contrib/opensolaris/uts/common/dtrace/dtrace.c#12 edit Differences ... ==== //depot/projects/dtrace/src/sys/contrib/opensolaris/uts/common/dtrace/dtrace.c#12 (text) ==== @@ -14479,6 +14479,7 @@ { dtrace_probe_foreach(offsetof(dtrace_pops_t, dtps_resume)); } +#endif static int dtrace_cpu_setup(cpu_setup_t what, processorid_t cpu) @@ -14539,6 +14540,7 @@ return (0); } +#if defined(sun) static void dtrace_cpu_setup_initial(processorid_t cpu) { From owner-p4-projects@FreeBSD.ORG Sat Jan 5 04:40:46 2008 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 7F26A16A46C; Sat, 5 Jan 2008 04:40:46 +0000 (UTC) Delivered-To: perforce@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 44BFA16A469 for ; Sat, 5 Jan 2008 04:40:46 +0000 (UTC) (envelope-from jb@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id 32CB813C45A for ; Sat, 5 Jan 2008 04:40:46 +0000 (UTC) (envelope-from jb@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.1/8.14.1) with ESMTP id m054ekYo005616 for ; Sat, 5 Jan 2008 04:40:46 GMT (envelope-from jb@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.1/8.14.1/Submit) id m054ekJn005613 for perforce@freebsd.org; Sat, 5 Jan 2008 04:40:46 GMT (envelope-from jb@freebsd.org) Date: Sat, 5 Jan 2008 04:40:46 GMT Message-Id: <200801050440.m054ekJn005613@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to jb@freebsd.org using -f From: John Birrell To: Perforce Change Reviews Cc: Subject: PERFORCE change 132543 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 05 Jan 2008 04:40:46 -0000 http://perforce.freebsd.org/chv.cgi?CH=132543 Change 132543 by jb@jb_freebsd1 on 2008/01/05 04:39:50 Remove my home-grown completion spin thingies and use the magical qualities of smp_no_rendevous_barrier (which aren't at all obvious). I'll need to revise this later for arches that are only UP. Affected files ... .. //depot/projects/dtrace/src/sys/cddl/amd64/cyclic_machdep.c#9 edit .. //depot/projects/dtrace/src/sys/cddl/kern/cyclic.c#9 edit .. //depot/projects/dtrace/src/sys/compat/opensolaris/sys/cyclic_impl.h#3 edit Differences ... ==== //depot/projects/dtrace/src/sys/cddl/amd64/cyclic_machdep.c#9 (text+ko) ==== @@ -125,5 +125,5 @@ (*func)(param); else smp_rendezvous_cpus((cpumask_t) (1 << c->cpuid), NULL, - func, NULL, param); + func, smp_no_rendevous_barrier, param); } ==== //depot/projects/dtrace/src/sys/cddl/kern/cyclic.c#9 (text+ko) ==== @@ -481,9 +481,6 @@ cyc_backend_t *be = cpu->cyp_backend; be->cyb_enable(be->cyb_arg); - - /* Ack to cross call */ - argp->cyx_wait = 0; } static void @@ -493,14 +490,9 @@ cyc_xcallarg_t arg; arg.cyx_cpu = cpu; - arg.cyx_wait = 1; /* Cross call to the target CPU */ be->cyb_xcall(be->cyb_arg, cpu->cyp_cpu, cyclic_enable_xcall, &arg); - - /* Spin while waiting for the target CPU to ack the cross call */ - while (arg.cyx_wait == 1) - /* spin */ ; } static void @@ -511,9 +503,6 @@ cyc_backend_t *be = cpu->cyp_backend; be->cyb_disable(be->cyb_arg); - - /* Ack to cross call */ - argp->cyx_wait = 0; } static void @@ -523,14 +512,9 @@ cyc_xcallarg_t arg; arg.cyx_cpu = cpu; - arg.cyx_wait = 1; /* Cross call to the target CPU */ be->cyb_xcall(be->cyb_arg, cpu->cyp_cpu, cyclic_disable_xcall, &arg); - - /* Spin while waiting for the target CPU to ack the cross call */ - while (arg.cyx_wait == 1) - /* spin */ ; } static void @@ -541,9 +525,6 @@ cyc_backend_t *be = cpu->cyp_backend; be->cyb_reprogram(be->cyb_arg, argp->cyx_exp); - - /* Ack to cross call */ - argp->cyx_wait = 0; } static void @@ -554,14 +535,9 @@ arg.cyx_cpu = cpu; arg.cyx_exp = exp; - arg.cyx_wait = 1; /* Cross call to the target CPU */ be->cyb_xcall(be->cyb_arg, cpu->cyp_cpu, cyclic_reprogram_xcall, &arg); - - /* Spin while waiting for the target CPU to ack the cross call */ - while (arg.cyx_wait == 1) - /* spin */ ; } /* ==== //depot/projects/dtrace/src/sys/compat/opensolaris/sys/cyclic_impl.h#3 (text+ko) ==== @@ -289,7 +289,6 @@ typedef struct cyc_xcallarg { cyc_cpu_t *cyx_cpu; hrtime_t cyx_exp; - volatile int cyx_wait; } cyc_xcallarg_t; #define CY_DEFAULT_PERCPU 1 From owner-p4-projects@FreeBSD.ORG Sat Jan 5 04:41:48 2008 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id EC39116A468; Sat, 5 Jan 2008 04:41:47 +0000 (UTC) Delivered-To: perforce@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id B1DC716A46C for ; Sat, 5 Jan 2008 04:41:47 +0000 (UTC) (envelope-from jb@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id A031C13C458 for ; Sat, 5 Jan 2008 04:41:47 +0000 (UTC) (envelope-from jb@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.1/8.14.1) with ESMTP id m054flsQ005676 for ; Sat, 5 Jan 2008 04:41:47 GMT (envelope-from jb@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.1/8.14.1/Submit) id m054flAu005673 for perforce@freebsd.org; Sat, 5 Jan 2008 04:41:47 GMT (envelope-from jb@freebsd.org) Date: Sat, 5 Jan 2008 04:41:47 GMT Message-Id: <200801050441.m054flAu005673@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to jb@freebsd.org using -f From: John Birrell To: Perforce Change Reviews Cc: Subject: PERFORCE change 132544 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 05 Jan 2008 04:41:48 -0000 http://perforce.freebsd.org/chv.cgi?CH=132544 Change 132544 by jb@jb_freebsd1 on 2008/01/05 04:41:40 Add a SYSINIT to setup the APs. The boot CPU is setup in the load function itself rather than waiting for the SYSINIT which happens late in the boot process. Affected files ... .. //depot/projects/dtrace/src/sys/cddl/dev/dtrace/dtrace_load.c#23 edit Differences ... ==== //depot/projects/dtrace/src/sys/cddl/dev/dtrace/dtrace_load.c#23 (text+ko) ==== @@ -23,6 +23,26 @@ */ static void +dtrace_ap_start(void *dummy) +{ + int i; + + mutex_enter(&cpu_lock); + + /* Setup the rest of the CPUs. */ + for (i = 1; i <= mp_maxid; i++) { + if (pcpu_find(i) == NULL) + continue; + + (void) dtrace_cpu_setup(CPU_CONFIG, i); + } + + mutex_exit(&cpu_lock); +} + +SYSINIT(dtrace_ap_start, SI_SUB_SMP, SI_ORDER_ANY, dtrace_ap_start, NULL); + +static void dtrace_load(void *dummy) { dtrace_provider_id_t id; @@ -59,9 +79,6 @@ mutex_enter(&cpu_lock); #ifdef DOODAD - dtrace_modload = dtrace_module_loaded; - dtrace_modunload = dtrace_module_unloaded; - dtrace_cpu_init = dtrace_cpu_setup_initial; dtrace_helpers_cleanup = dtrace_helpers_destroy; dtrace_helpers_fork = dtrace_helpers_duplicate; dtrace_cpustart_init = dtrace_suspend; @@ -71,10 +88,8 @@ dtrace_kreloc_init = dtrace_suspend; dtrace_kreloc_fini = dtrace_resume; - register_cpu_setup_func((cpu_setup_func_t *)dtrace_cpu_setup, NULL); - +#endif ASSERT(MUTEX_HELD(&cpu_lock)); -#endif dtrace_arena = vmem_create("dtrace", (void *)1, UINT32_MAX, 1, NULL, NULL, NULL, 0, VM_SLEEP | VMC_IDENTIFIER); @@ -150,6 +165,13 @@ mutex_exit(&dtrace_lock); mutex_exit(&dtrace_provider_lock); + mutex_enter(&cpu_lock); + + /* Setup the boot CPU */ + (void) dtrace_cpu_setup(CPU_CONFIG, 0); + + mutex_exit(&cpu_lock); + /* Enable device cloning. */ clone_setup(&dtrace_clones); From owner-p4-projects@FreeBSD.ORG Sat Jan 5 04:42:51 2008 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 5DFF916A420; Sat, 5 Jan 2008 04:42:49 +0000 (UTC) Delivered-To: perforce@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id DECA716A480 for ; Sat, 5 Jan 2008 04:42:48 +0000 (UTC) (envelope-from jb@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id CD3DA13C43E for ; Sat, 5 Jan 2008 04:42:48 +0000 (UTC) (envelope-from jb@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.1/8.14.1) with ESMTP id m054gmxl005722 for ; Sat, 5 Jan 2008 04:42:48 GMT (envelope-from jb@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.1/8.14.1/Submit) id m054gmTh005719 for perforce@freebsd.org; Sat, 5 Jan 2008 04:42:48 GMT (envelope-from jb@freebsd.org) Date: Sat, 5 Jan 2008 04:42:48 GMT Message-Id: <200801050442.m054gmTh005719@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to jb@freebsd.org using -f From: John Birrell To: Perforce Change Reviews Cc: Subject: PERFORCE change 132545 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 05 Jan 2008 04:42:51 -0000 http://perforce.freebsd.org/chv.cgi?CH=132545 Change 132545 by jb@jb_freebsd1 on 2008/01/05 04:42:27 Use a time function based on the TSC, not the per-CPU cycle counter. Affected files ... .. //depot/projects/dtrace/src/sys/cddl/dev/profile/profile.c#6 edit Differences ... ==== //depot/projects/dtrace/src/sys/cddl/dev/profile/profile.c#6 (text+ko) ==== @@ -200,7 +200,7 @@ hrtime_t late; solaris_cpu_t *c = &solaris_cpu[curcpu]; - late = dtrace_gethrtime() - pcpu->profc_expected; + late = gethrtime() - pcpu->profc_expected; pcpu->profc_expected += pcpu->profc_interval; dtrace_probe(prof->prof_id, c->cpu_profile_pc, @@ -403,7 +403,7 @@ hdlr->cyh_arg = pcpu; when->cyt_interval = prof->prof_interval; - when->cyt_when = dtrace_gethrtime() + when->cyt_interval; + when->cyt_when = gethrtime() + when->cyt_interval; pcpu->profc_expected = when->cyt_when; pcpu->profc_interval = when->cyt_interval; @@ -436,7 +436,7 @@ hdlr.cyh_arg = prof; when.cyt_interval = prof->prof_interval; - when.cyt_when = dtrace_gethrtime() + when.cyt_interval; + when.cyt_when = gethrtime() + when.cyt_interval; } else { ASSERT(prof->prof_kind == PROF_PROFILE); omni.cyo_online = profile_online; From owner-p4-projects@FreeBSD.ORG Sat Jan 5 04:44:51 2008 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id A73B016A479; Sat, 5 Jan 2008 04:44:51 +0000 (UTC) Delivered-To: perforce@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 6C5AD16A418 for ; Sat, 5 Jan 2008 04:44:51 +0000 (UTC) (envelope-from jb@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id 5A40513C459 for ; Sat, 5 Jan 2008 04:44:51 +0000 (UTC) (envelope-from jb@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.1/8.14.1) with ESMTP id m054ipcr005780 for ; Sat, 5 Jan 2008 04:44:51 GMT (envelope-from jb@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.1/8.14.1/Submit) id m054ipaD005777 for perforce@freebsd.org; Sat, 5 Jan 2008 04:44:51 GMT (envelope-from jb@freebsd.org) Date: Sat, 5 Jan 2008 04:44:51 GMT Message-Id: <200801050444.m054ipaD005777@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to jb@freebsd.org using -f From: John Birrell To: Perforce Change Reviews Cc: Subject: PERFORCE change 132546 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 05 Jan 2008 04:44:51 -0000 http://perforce.freebsd.org/chv.cgi?CH=132546 Change 132546 by jb@jb_freebsd1 on 2008/01/05 04:44:49 Get the CPU cross-calls working. This is a milestone. The profile provider can now fire probes on each CPU and the DTrace module does the right thing. :-) Affected files ... .. //depot/projects/dtrace/src/sys/cddl/dev/dtrace/amd64/dtrace_subr.c#4 edit Differences ... ==== //depot/projects/dtrace/src/sys/cddl/dev/dtrace/amd64/dtrace_subr.c#4 (text+ko) ==== @@ -33,6 +33,7 @@ #include #include #include +#include #include #include #include @@ -168,52 +169,42 @@ (*func)(0, kernelbase); } -#ifdef DOODAD -static int -dtrace_xcall_func(dtrace_xcall_t func, void *arg) -{ - (*func)(arg); - - return (0); -} -#endif void dtrace_xcall(processorid_t cpu, dtrace_xcall_t func, void *arg) { -#ifdef DOODAD - cpuset_t set; + cpumask_t cpus; + + critical_enter(); + + if (cpu == DTRACE_CPUALL) + cpus = all_cpus; + else + cpus = (cpumask_t) (1 << cpu); - CPUSET_ZERO(set); + /* If the current CPU is in the set, call the function directly: */ + if ((cpus & (1 << curcpu)) != 0) { + (*func)(arg); - if (cpu == DTRACE_CPUALL) { - CPUSET_ALL(set); - } else { - CPUSET_ADD(set, cpu); + /* Mask the current CPU from the set */ + cpus &= ~(1 << curcpu); } - kpreempt_disable(); - xc_sync((xc_arg_t)func, (xc_arg_t)arg, 0, X_CALL_HIPRI, set, - (xc_func_t)dtrace_xcall_func); - kpreempt_enable(); -#else - critical_enter(); - (*func)(arg); + /* If there are any CPUs in the set, cross-call to those CPUs */ + if (cpus != 0) + smp_rendezvous_cpus(cpus, NULL, func, smp_no_rendevous_barrier, arg); + critical_exit(); -#endif } -#ifdef DOODAD -void +static void dtrace_sync_func(void) -{} -#endif +{ +} void dtrace_sync(void) { -#ifdef DOODAD dtrace_xcall(DTRACE_CPUALL, (dtrace_xcall_t)dtrace_sync_func, NULL); -#endif } #ifdef DOODAD From owner-p4-projects@FreeBSD.ORG Sat Jan 5 04:48:57 2008 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 5D05416A481; Sat, 5 Jan 2008 04:48:56 +0000 (UTC) Delivered-To: perforce@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id CCA5616A474 for ; Sat, 5 Jan 2008 04:48:55 +0000 (UTC) (envelope-from jb@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id BA5B613C448 for ; Sat, 5 Jan 2008 04:48:55 +0000 (UTC) (envelope-from jb@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.1/8.14.1) with ESMTP id m054mtct014867 for ; Sat, 5 Jan 2008 04:48:55 GMT (envelope-from jb@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.1/8.14.1/Submit) id m054mtm0014864 for perforce@freebsd.org; Sat, 5 Jan 2008 04:48:55 GMT (envelope-from jb@freebsd.org) Date: Sat, 5 Jan 2008 04:48:55 GMT Message-Id: <200801050448.m054mtm0014864@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to jb@freebsd.org using -f From: John Birrell To: Perforce Change Reviews Cc: Subject: PERFORCE change 132547 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 05 Jan 2008 04:48:57 -0000 http://perforce.freebsd.org/chv.cgi?CH=132547 Change 132547 by jb@jb_freebsd1 on 2008/01/05 04:48:08 IFC Affected files ... .. //depot/projects/dtrace/doc/en_US.ISO8859-1/articles/contributors/contrib.additional.sgml#57 integrate .. //depot/projects/dtrace/doc/en_US.ISO8859-1/articles/contributors/contrib.committers.sgml#36 integrate .. //depot/projects/dtrace/doc/en_US.ISO8859-1/flyer/flyer.tex#6 integrate .. //depot/projects/dtrace/doc/en_US.ISO8859-1/share/sgml/authors.ent#28 integrate .. //depot/projects/dtrace/doc/hu_HU.ISO8859-2/flyer/flyer.tex#2 integrate .. //depot/projects/dtrace/doc/share/pgpkeys/pgpkeys-developers.sgml#29 integrate .. //depot/projects/dtrace/doc/share/pgpkeys/pgpkeys.ent#28 integrate .. //depot/projects/dtrace/doc/share/pgpkeys/wxs.key#1 branch .. //depot/projects/dtrace/ports/MOVED#60 integrate .. //depot/projects/dtrace/src/share/man/man4/Makefile#26 integrate .. //depot/projects/dtrace/src/share/man/man4/edsc.4#2 integrate .. //depot/projects/dtrace/src/share/man/man4/ipmi.4#8 integrate .. //depot/projects/dtrace/src/share/man/man4/mxge.4#5 integrate .. //depot/projects/dtrace/src/share/man/man4/pci.4#6 integrate .. //depot/projects/dtrace/src/share/man/man4/pcib.4#1 branch .. //depot/projects/dtrace/src/share/man/man4/snd_envy24.4#4 integrate .. //depot/projects/dtrace/src/share/man/man4/snd_envy24ht.4#4 integrate .. //depot/projects/dtrace/src/share/man/man4/snd_hda.4#7 integrate .. //depot/projects/dtrace/src/share/man/man4/snd_spicds.4#5 integrate .. //depot/projects/dtrace/src/share/man/man5/linsysfs.5#6 integrate .. //depot/projects/dtrace/src/sys/vm/vm_map.c#14 integrate .. //depot/projects/dtrace/src/usr.bin/netstat/inet.c#9 integrate .. //depot/projects/dtrace/www/en/developers.sgml#26 integrate .. //depot/projects/dtrace/www/en/news/2006/Makefile#1 branch .. //depot/projects/dtrace/www/en/news/2006/news.xml#1 branch .. //depot/projects/dtrace/www/en/news/2006/press.xml#1 branch .. //depot/projects/dtrace/www/en/news/Makefile#5 integrate .. //depot/projects/dtrace/www/share/sgml/libcommon.xsl#4 integrate .. //depot/projects/dtrace/www/share/sgml/news.xml#32 integrate .. //depot/projects/dtrace/www/share/sgml/press.xml#19 integrate .. //depot/projects/dtrace/www/share/sgml/templates.oldnewsflash.xsl#4 integrate .. //depot/projects/dtrace/www/share/sgml/templates.oldpress.xsl#4 integrate Differences ... ==== //depot/projects/dtrace/doc/en_US.ISO8859-1/articles/contributors/contrib.additional.sgml#57 (text+ko) ==== @@ -1,4 +1,4 @@ - + + aaron@FreeBSD.org"> @@ -1058,6 +1058,8 @@ wes@FreeBSD.org"> +wxs@FreeBSD.org"> + whiteside@acm.org"> wilko@FreeBSD.org"> ==== //depot/projects/dtrace/doc/hu_HU.ISO8859-2/flyer/flyer.tex#2 (text+ko) ==== @@ -1,4 +1,4 @@ -% Copyright (c) 2004-2007 Marc Fonvieille +% Copyright (c) 2004-2008 Marc Fonvieille % All rights reserved. % % Redistribution and use in source and binary forms, with or without @@ -22,7 +22,7 @@ % OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF % SUCH DAMAGE. % -% $FreeBSD: doc/hu_HU.ISO8859-2/flyer/flyer.tex,v 1.1 2007/12/16 14:03:45 gabor Exp $ +% $FreeBSD: doc/hu_HU.ISO8859-2/flyer/flyer.tex,v 1.2 2008/01/04 13:41:37 gabor Exp $ % % FreeBSD Flyer % Use make FORMAT (with FORMAT: pdf, ps or dvi) to build the flyer. @@ -31,7 +31,7 @@ % the \logo variable. By default the Beastie layout is enabled. % % The FreeBSD Hungarian Documentation Project -% Original Revision: r1.15 +% Original Revision: r1.16 % Translated by: Gabor Kovesdan \documentclass[11pt]{article} \usepackage[T1]{fontenc} @@ -198,7 +198,7 @@ % % Copyrights \begin{center} -\tiny \copyright 2004-2007 A FreeBSD Projekt\\ +\tiny \copyright 2004-2008 A FreeBSD Projekt\\ \ifthenelse{\equal{\logo}{true}}{ A FreeBSD és a FreeBSD Logo a FreeBSD Alapítvány bejegyzett védjegyei.\\} {A FreeBSD a FreeBSD Alapítvány bejegyzett védjegye.\\} ==== //depot/projects/dtrace/doc/share/pgpkeys/pgpkeys-developers.sgml#29 (text+ko) ==== @@ -1,7 +1,7 @@ @@ -944,6 +944,11 @@ &pgpkey.gshapiro; + + &a.wxs; + &pgpkey.wxs; + + &a.arun; &pgpkey.arun; ==== //depot/projects/dtrace/doc/share/pgpkeys/pgpkeys.ent#28 (text+ko) ==== @@ -1,5 +1,5 @@ - + @@ -272,6 +272,7 @@ + ==== //depot/projects/dtrace/ports/MOVED#60 (text+ko) ==== @@ -1,7 +1,7 @@ # # MOVED - a list of (recently) moved or removed ports # -# $FreeBSD: ports/MOVED,v 1.1526 2008/01/01 22:41:52 marcus Exp $ +# $FreeBSD: ports/MOVED,v 1.1527 2008/01/04 18:34:11 alepulver Exp $ # # Each entry consists of a single line containing the following four # fields in the order named, separated with the pipe (`|') character: @@ -1530,7 +1530,6 @@ net/openldap21-sasl-client|net/openldap22-sasl-client|2005-07-17|removed EOL version of OpenLDAP net/openldap21-sasl-server|net/openldap22-sasl-server|2005-07-17|removed EOL version of OpenLDAP net/openldap21-server|net/openldap22-server|2005-07-17|removed EOL version of OpenLDAP -devel/aegis||2005-07-18|install problems; upstream authors did not respond devel/linux-understand_ada||2005-07-18|unfetchable; new version requires support contract devel/linux-understand_c||2005-07-18|unfetchable; new version requires support contract devel/linux-understand_java||2005-07-18|unfetchable; new version requires support contract ==== //depot/projects/dtrace/src/share/man/man4/Makefile#26 (text+ko) ==== @@ -1,5 +1,5 @@ # @(#)Makefile 8.1 (Berkeley) 6/18/93 -# $FreeBSD: src/share/man/man4/Makefile,v 1.401 2007/12/26 11:35:06 rwatson Exp $ +# $FreeBSD: src/share/man/man4/Makefile,v 1.402 2008/01/04 08:26:22 imp Exp $ MAN= aac.4 \ acpi.4 \ @@ -259,6 +259,7 @@ pccard.4 \ pccbb.4 \ pci.4 \ + pcib.4 \ pcic.4 \ pcm.4 \ pcn.4 \ ==== //depot/projects/dtrace/src/share/man/man4/edsc.4#2 (text+ko) ==== @@ -30,7 +30,7 @@ .\" SUCH DAMAGE. .\" .\" From: @(#)lo.4 8.1 (Berkeley) 6/5/93 -.\" $FreeBSD: src/share/man/man4/edsc.4,v 1.1 2007/03/26 04:39:18 yar Exp $ +.\" $FreeBSD: src/share/man/man4/edsc.4,v 1.2 2008/01/04 12:55:02 gabor Exp $ .\" .Dd March 25, 2007 .Dt EDSC 4 @@ -88,7 +88,7 @@ device was derived from the .Xr disc 4 device and first appeared in -.Fx 7.0 . +.Fx 6.3 . This manpage was adapted from .Xr disc 4 . .Sh CAVEATS ==== //depot/projects/dtrace/src/share/man/man4/ipmi.4#8 (text) ==== @@ -23,7 +23,7 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.\" $FreeBSD: src/share/man/man4/ipmi.4,v 1.8 2007/07/16 17:03:48 ambrisko Exp $ +.\" $FreeBSD: src/share/man/man4/ipmi.4,v 1.9 2008/01/04 12:55:23 gabor Exp $ .\" .Dd July 10, 2007 .Dt IPMI 4 @@ -186,7 +186,7 @@ The .Nm driver first appeared in -.Fx 7.0 . +.Fx 6.3 . .Sh AUTHORS .An -nosplit The ==== //depot/projects/dtrace/src/share/man/man4/mxge.4#5 (text+ko) ==== @@ -29,7 +29,7 @@ .\" .\" * Other names and brands may be claimed as the property of others. .\" -.\" $FreeBSD: src/share/man/man4/mxge.4,v 1.7 2007/01/30 08:17:45 brueffer Exp $ +.\" $FreeBSD: src/share/man/man4/mxge.4,v 1.8 2008/01/04 12:55:54 gabor Exp $ .\" .Dd September 15, 2006 .Dt MXGE 4 @@ -142,7 +142,7 @@ The .Nm device driver first appeared in -.Fx 7.0 . +.Fx 6.3 . .Sh AUTHORS The .Nm ==== //depot/projects/dtrace/src/share/man/man4/pci.4#6 (text+ko) ==== @@ -22,9 +22,9 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.\" $FreeBSD: src/share/man/man4/pci.4,v 1.19 2007/09/30 11:05:12 marius Exp $ +.\" $FreeBSD: src/share/man/man4/pci.4,v 1.20 2008/01/04 08:19:52 imp Exp $ .\" -.Dd September 30, 2007 +.Dd January 3, 2008 .Dt PCI 4 .Os .Sh NAME @@ -54,13 +54,21 @@ device. If used improperly, this driver can allow userland applications to crash a machine or cause data loss. +.Pp +The +.Nm +driver implements the pci bus in the kernel. +It enumerates and devices on the pci bus and gives pci client drivers the +chance to attach to them. +It assigns resources to children, when the BIOS doesn't. +It takes care of routing interrupts when necessary. +It reprobes the unattached pci children when pci client drivers are dynamically +loaded at runtime. .Sh KERNEL CONFIGURATION -It is only necessary to specify one +The .Nm -controller in the kernel. -Additional -.Tn PCI -busses are handled automatically as they are encountered. +device is included in the kernel as described in the SYNOPSIS section. +The pci driver cannot be built as a kld. .Sh IOCTLS The following .Xr ioctl 2 ==== //depot/projects/dtrace/src/share/man/man4/snd_envy24.4#4 (text+ko) ==== @@ -22,7 +22,7 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.\" $FreeBSD: src/share/man/man4/snd_envy24.4,v 1.3 2006/09/30 17:19:22 netchild Exp $ +.\" $FreeBSD: src/share/man/man4/snd_envy24.4,v 1.4 2008/01/04 12:56:24 gabor Exp $ .\" .Dd September 30, 2006 .Dt SND_ENVY24 4 @@ -71,7 +71,7 @@ The .Nm device driver first appeared in -.Fx 7.0 . +.Fx 6.3 . .Sh AUTHORS .An -nosplit The ==== //depot/projects/dtrace/src/share/man/man4/snd_envy24ht.4#4 (text+ko) ==== @@ -22,7 +22,7 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.\" $FreeBSD: src/share/man/man4/snd_envy24ht.4,v 1.2 2007/05/28 15:57:22 joel Exp $ +.\" $FreeBSD: src/share/man/man4/snd_envy24ht.4,v 1.3 2008/01/04 12:56:45 gabor Exp $ .\" .Dd May 28, 2007 .Dt SND_ENVY24HT 4 @@ -91,7 +91,7 @@ The .Nm device driver first appeared in -.Fx 7.0 . +.Fx 6.3 . .Sh AUTHORS .An -nosplit The ==== //depot/projects/dtrace/src/share/man/man4/snd_hda.4#7 (text+ko) ==== @@ -22,7 +22,7 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.\" $FreeBSD: src/share/man/man4/snd_hda.4,v 1.12 2007/07/14 12:35:29 joel Exp $ +.\" $FreeBSD: src/share/man/man4/snd_hda.4,v 1.13 2008/01/04 12:57:06 gabor Exp $ .\" .Dd July 14, 2007 .Dt SND_HDA 4 @@ -234,7 +234,7 @@ The .Nm device driver first appeared in -.Fx 7.0 . +.Fx 6.3 . .Sh AUTHORS .An -nosplit The ==== //depot/projects/dtrace/src/share/man/man4/snd_spicds.4#5 (text+ko) ==== @@ -22,7 +22,7 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.\" $FreeBSD: src/share/man/man4/snd_spicds.4,v 1.3 2007/05/28 16:00:08 joel Exp $ +.\" $FreeBSD: src/share/man/man4/snd_spicds.4,v 1.4 2008/01/04 12:57:34 gabor Exp $ .\" .Dd May 28, 2007 .Dt SND_SPICDS 4 @@ -75,7 +75,7 @@ The .Nm device driver first appeared in -.Fx 7.0 . +.Fx 6.3 . .Sh AUTHORS .An -nosplit The ==== //depot/projects/dtrace/src/share/man/man5/linsysfs.5#6 (text) ==== @@ -1,7 +1,7 @@ .\" Written by Garrett Wollman .\" This file is in the public domain. .\" -.\" $FreeBSD: src/share/man/man5/linsysfs.5,v 1.6 2007/02/05 22:45:58 ambrisko Exp $ +.\" $FreeBSD: src/share/man/man5/linsysfs.5,v 1.7 2008/01/04 12:58:09 gabor Exp $ .\" .Dd February 5, 2007 .Dt LINSYSFS 5 @@ -82,7 +82,7 @@ The .Nm driver first appeared in -.Fx 7.0 . +.Fx 6.2 . .Sh AUTHORS .An -nosplit The ==== //depot/projects/dtrace/src/sys/vm/vm_map.c#14 (text+ko) ==== @@ -63,7 +63,7 @@ */ #include -__FBSDID("$FreeBSD: src/sys/vm/vm_map.c,v 1.391 2007/11/07 21:56:58 pjd Exp $"); +__FBSDID("$FreeBSD: src/sys/vm/vm_map.c,v 1.392 2008/01/04 04:33:13 kib Exp $"); #include #include @@ -2712,7 +2712,9 @@ cow &= ~orient; KASSERT(orient != 0, ("No stack grow direction")); - if (addrbos < vm_map_min(map) || addrbos > map->max_offset) + if (addrbos < vm_map_min(map) || + addrbos > vm_map_max(map) || + addrbos + max_ssize < addrbos) return (KERN_NO_SPACE); init_ssize = (max_ssize < sgrowsiz) ? max_ssize : sgrowsiz; ==== //depot/projects/dtrace/src/usr.bin/netstat/inet.c#9 (text+ko) ==== @@ -38,7 +38,7 @@ #endif #include -__FBSDID("$FreeBSD: src/usr.bin/netstat/inet.c,v 1.80 2008/01/02 23:26:11 obrien Exp $"); +__FBSDID("$FreeBSD: src/usr.bin/netstat/inet.c,v 1.82 2008/01/04 03:09:28 obrien Exp $"); #include #include @@ -366,8 +366,7 @@ #endif /* INET6 */ || (af1 == AF_UNSPEC && ((inp->inp_vflag & INP_IPV4) == 0 #ifdef INET6 - && (inp->inp_vflag & - INP_IPV6) == 0 + && (inp->inp_vflag & INP_IPV6) == 0 #endif /* INET6 */ )) ) @@ -405,14 +404,14 @@ printf("%-8.8s ", "Tcpcb"); if (Lflag) printf("%-5.5s %-14.14s %-22.22s\n", - "Proto", "Listen", "Local Address"); + "Proto", "Listen", "Local Address"); else printf((Aflag && !Wflag) ? "%-5.5s %-6.6s %-6.6s %-18.18s %-18.18s %s\n" : "%-5.5s %-6.6s %-6.6s %-22.22s %-22.22s %s\n", - "Proto", "Recv-Q", "Send-Q", - "Local Address", "Foreign Address", - "(state)"); + "Proto", "Recv-Q", "Send-Q", + "Local Address", "Foreign Address", + "(state)"); first = 0; } if (Lflag && so->so_qlimit == 0) @@ -425,77 +424,73 @@ } #ifdef INET6 if ((inp->inp_vflag & INP_IPV6) != 0) - vchar = ((inp->inp_vflag & INP_IPV4) != 0) - ? "46" : "6 "; + vchar = ((inp->inp_vflag & INP_IPV4) != 0) ? + "46" : "6 "; else #endif - vchar = ((inp->inp_vflag & INP_IPV4) != 0) - ? "4 " : " "; + vchar = ((inp->inp_vflag & INP_IPV4) != 0) ? + "4 " : " "; printf("%-3.3s%-2.2s ", name, vchar); if (Lflag) { char buf1[15]; snprintf(buf1, 15, "%d/%d/%d", so->so_qlen, - so->so_incqlen, so->so_qlimit); + so->so_incqlen, so->so_qlimit); printf("%-14.14s ", buf1); } else { - printf("%6u %6u ", - so->so_rcv.sb_cc, - so->so_snd.sb_cc); + printf("%6u %6u ", so->so_rcv.sb_cc, so->so_snd.sb_cc); } if (numeric_port) { if (inp->inp_vflag & INP_IPV4) { inetprint(&inp->inp_laddr, (int)inp->inp_lport, - name, 1); + name, 1); if (!Lflag) inetprint(&inp->inp_faddr, - (int)inp->inp_fport, name, 1); + (int)inp->inp_fport, name, 1); } #ifdef INET6 else if (inp->inp_vflag & INP_IPV6) { inet6print(&inp->in6p_laddr, - (int)inp->inp_lport, name, 1); + (int)inp->inp_lport, name, 1); if (!Lflag) inet6print(&inp->in6p_faddr, - (int)inp->inp_fport, name, 1); + (int)inp->inp_fport, name, 1); } /* else nothing printed now */ #endif /* INET6 */ } else if (inp->inp_flags & INP_ANONPORT) { if (inp->inp_vflag & INP_IPV4) { inetprint(&inp->inp_laddr, (int)inp->inp_lport, - name, 1); + name, 1); if (!Lflag) inetprint(&inp->inp_faddr, - (int)inp->inp_fport, name, 0); + (int)inp->inp_fport, name, 0); } #ifdef INET6 else if (inp->inp_vflag & INP_IPV6) { inet6print(&inp->in6p_laddr, - (int)inp->inp_lport, name, 1); + (int)inp->inp_lport, name, 1); if (!Lflag) inet6print(&inp->in6p_faddr, - (int)inp->inp_fport, name, 0); + (int)inp->inp_fport, name, 0); } /* else nothing printed now */ #endif /* INET6 */ } else { if (inp->inp_vflag & INP_IPV4) { inetprint(&inp->inp_laddr, (int)inp->inp_lport, - name, 0); + name, 0); if (!Lflag) inetprint(&inp->inp_faddr, - (int)inp->inp_fport, name, - inp->inp_lport != - inp->inp_fport); + (int)inp->inp_fport, name, + inp->inp_lport != inp->inp_fport); } #ifdef INET6 else if (inp->inp_vflag & INP_IPV6) { inet6print(&inp->in6p_laddr, - (int)inp->inp_lport, name, 0); + (int)inp->inp_lport, name, 0); if (!Lflag) inet6print(&inp->in6p_faddr, - (int)inp->inp_fport, name, - inp->inp_lport != - inp->inp_fport); + (int)inp->inp_fport, name, + inp->inp_lport != inp->inp_fport); } /* else nothing printed now */ #endif /* INET6 */ } @@ -505,24 +500,25 @@ else { printf("%s", tcpstates[tp->t_state]); #if defined(TF_NEEDSYN) && defined(TF_NEEDFIN) - /* Show T/TCP `hidden state' */ - if (tp->t_flags & (TF_NEEDSYN|TF_NEEDFIN)) - putchar('*'); + /* Show T/TCP `hidden state' */ + if (tp->t_flags & (TF_NEEDSYN|TF_NEEDFIN)) + putchar('*'); #endif /* defined(TF_NEEDSYN) && defined(TF_NEEDFIN) */ - } + } } putchar('\n'); } if (xig != oxig && xig->xig_gen != oxig->xig_gen) { if (oxig->xig_count > xig->xig_count) { printf("Some %s sockets may have been deleted.\n", - name); + name); } else if (oxig->xig_count < xig->xig_count) { printf("Some %s sockets may have been created.\n", - name); + name); } else { - printf("Some %s sockets may have been created or deleted.\n", - name); + printf( + "Some %s sockets may have been created or deleted.\n", + name); } } free(buf); @@ -569,34 +565,34 @@ printf(m, tcpstat.f, pluralies(tcpstat.f)) p(tcps_sndtotal, "\t%lu packet%s sent\n"); - p2(tcps_sndpack,tcps_sndbyte, - "\t\t%lu data packet%s (%lu byte%s)\n"); + p2(tcps_sndpack,tcps_sndbyte, "\t\t%lu data packet%s (%lu byte%s)\n"); p2(tcps_sndrexmitpack, tcps_sndrexmitbyte, - "\t\t%lu data packet%s (%lu byte%s) retransmitted\n"); + "\t\t%lu data packet%s (%lu byte%s) retransmitted\n"); p(tcps_sndrexmitbad, - "\t\t%lu data packet%s unnecessarily retransmitted\n"); + "\t\t%lu data packet%s unnecessarily retransmitted\n"); p(tcps_mturesent, "\t\t%lu resend%s initiated by MTU discovery\n"); p2a(tcps_sndacks, tcps_delack, - "\t\t%lu ack-only packet%s (%lu delayed)\n"); + "\t\t%lu ack-only packet%s (%lu delayed)\n"); p(tcps_sndurg, "\t\t%lu URG only packet%s\n"); p(tcps_sndprobe, "\t\t%lu window probe packet%s\n"); p(tcps_sndwinup, "\t\t%lu window update packet%s\n"); p(tcps_sndctrl, "\t\t%lu control packet%s\n"); p(tcps_rcvtotal, "\t%lu packet%s received\n"); - p2(tcps_rcvackpack, tcps_rcvackbyte, "\t\t%lu ack%s (for %lu byte%s)\n"); + p2(tcps_rcvackpack, tcps_rcvackbyte, + "\t\t%lu ack%s (for %lu byte%s)\n"); p(tcps_rcvdupack, "\t\t%lu duplicate ack%s\n"); p(tcps_rcvacktoomuch, "\t\t%lu ack%s for unsent data\n"); p2(tcps_rcvpack, tcps_rcvbyte, - "\t\t%lu packet%s (%lu byte%s) received in-sequence\n"); + "\t\t%lu packet%s (%lu byte%s) received in-sequence\n"); p2(tcps_rcvduppack, tcps_rcvdupbyte, - "\t\t%lu completely duplicate packet%s (%lu byte%s)\n"); + "\t\t%lu completely duplicate packet%s (%lu byte%s)\n"); p(tcps_pawsdrop, "\t\t%lu old duplicate packet%s\n"); p2(tcps_rcvpartduppack, tcps_rcvpartdupbyte, - "\t\t%lu packet%s with some dup. data (%lu byte%s duped)\n"); + "\t\t%lu packet%s with some dup. data (%lu byte%s duped)\n"); p2(tcps_rcvoopack, tcps_rcvoobyte, - "\t\t%lu out-of-order packet%s (%lu byte%s)\n"); + "\t\t%lu out-of-order packet%s (%lu byte%s)\n"); p2(tcps_rcvpackafterwin, tcps_rcvbyteafterwin, - "\t\t%lu packet%s (%lu byte%s) of data after window\n"); + "\t\t%lu packet%s (%lu byte%s) of data after window\n"); p(tcps_rcvwinprobe, "\t\t%lu window probe%s\n"); p(tcps_rcvwinupd, "\t\t%lu window update packet%s\n"); p(tcps_rcvafterclose, "\t\t%lu packet%s received after close\n"); @@ -611,20 +607,21 @@ p(tcps_badrst, "\t%lu ignored RSTs in the window%s\n"); p(tcps_connects, "\t%lu connection%s established (including accepts)\n"); p2(tcps_closed, tcps_drops, - "\t%lu connection%s closed (including %lu drop%s)\n"); + "\t%lu connection%s closed (including %lu drop%s)\n"); p(tcps_cachedrtt, "\t\t%lu connection%s updated cached RTT on close\n"); p(tcps_cachedrttvar, - "\t\t%lu connection%s updated cached RTT variance on close\n"); + "\t\t%lu connection%s updated cached RTT variance on close\n"); p(tcps_cachedssthresh, - "\t\t%lu connection%s updated cached ssthresh on close\n"); + "\t\t%lu connection%s updated cached ssthresh on close\n"); p(tcps_conndrops, "\t%lu embryonic connection%s dropped\n"); p2(tcps_rttupdated, tcps_segstimed, - "\t%lu segment%s updated rtt (of %lu attempt%s)\n"); + "\t%lu segment%s updated rtt (of %lu attempt%s)\n"); p(tcps_rexmttimeo, "\t%lu retransmit timeout%s\n"); p(tcps_timeoutdrop, "\t\t%lu connection%s dropped by rexmit timeout\n"); p(tcps_persisttimeo, "\t%lu persist timeout%s\n"); p(tcps_persistdrop, "\t\t%lu connection%s dropped by persist timeout\n"); - p(tcps_finwait2_drops, "\t%lu Connection%s (fin_wait_2) dropped because of timeout\n"); + p(tcps_finwait2_drops, + "\t%lu Connection%s (fin_wait_2) dropped because of timeout\n"); p(tcps_keeptimeo, "\t%lu keepalive timeout%s\n"); p(tcps_keepprobe, "\t\t%lu keepalive probe%s sent\n"); p(tcps_keepdrops, "\t\t%lu connection%s dropped by keepalive\n"); @@ -649,11 +646,11 @@ p(tcps_sack_recovery_episode, "\t%lu SACK recovery episode%s\n"); p(tcps_sack_rexmits, - "\t%lu segment rexmit%s in SACK recovery episodes\n"); + "\t%lu segment rexmit%s in SACK recovery episodes\n"); p(tcps_sack_rexmit_bytes, - "\t%lu byte rexmit%s in SACK recovery episodes\n"); + "\t%lu byte rexmit%s in SACK recovery episodes\n"); p(tcps_sack_rcv_blocks, - "\t%lu SACK option%s (SACK blocks) received\n"); + "\t%lu SACK option%s (SACK blocks) received\n"); p(tcps_sack_send_blocks, "\t%lu SACK option%s (SACK blocks) sent\n"); p1a(tcps_sack_sboverflow, "\t%lu SACK scoreboard overflow\n"); @@ -823,12 +820,12 @@ putchar('\n'); p(ips_cantforward, "\t%lu packet%s not forwardable\n"); p(ips_notmember, - "\t%lu packet%s received for unknown multicast group\n"); + "\t%lu packet%s received for unknown multicast group\n"); p(ips_redirectsent, "\t%lu redirect%s sent\n"); p(ips_localout, "\t%lu packet%s sent from this host\n"); p(ips_rawout, "\t%lu packet%s sent with fabricated ip header\n"); p(ips_odropped, - "\t%lu output packet%s dropped due to no bufs, etc.\n"); + "\t%lu output packet%s dropped due to no bufs, etc.\n"); p(ips_noroute, "\t%lu output packet%s discarded due to no route\n"); p(ips_fragmented, "\t%lu output datagram%s fragmented\n"); p(ips_ofragments, "\t%lu fragment%s created\n"); @@ -931,8 +928,8 @@ icmpstat.icps_outhist[i]); } p(icps_badcode, "\t%lu message%s with bad code fields\n"); - p(icps_tooshort, "\t%lu message%s < minimum length\n"); - p(icps_checksum, "\t%lu bad checksum%s\n"); + p(icps_tooshort, "\t%lu message%s less than the minimum length\n"); + p(icps_checksum, "\t%lu message%s with bad checksum\n"); p(icps_badlen, "\t%lu message%s with bad length\n"); p1a(icps_bmcastecho, "\t%lu multicast echo requests ignored\n"); p1a(icps_bmcasttstamp, "\t%lu multicast timestamp requests ignored\n"); @@ -944,10 +941,10 @@ } if (icmpnames[i] != NULL) printf("\t\t%s: %lu\n", icmpnames[i], - icmpstat.icps_inhist[i]); + icmpstat.icps_inhist[i]); else printf("\t\tunknown ICMP #%d: %lu\n", i, - icmpstat.icps_inhist[i]); + icmpstat.icps_inhist[i]); } p(icps_reflect, "\t%lu message response%s generated\n"); p2(icps_badaddr, "\t%lu invalid return address%s\n"); @@ -992,13 +989,16 @@ #define py(f, m) if (igmpstat.f || sflag <= 1) \ printf(m, igmpstat.f, igmpstat.f != 1 ? "ies" : "y") p(igps_rcv_total, "\t%u message%s received\n"); - p(igps_rcv_tooshort, "\t%u message%s received with too few bytes\n"); - p(igps_rcv_badsum, "\t%u message%s received with bad checksum\n"); - py(igps_rcv_queries, "\t%u membership quer%s received\n"); - py(igps_rcv_badqueries, "\t%u membership quer%s received with invalid field(s)\n"); - p(igps_rcv_reports, "\t%u membership report%s received\n"); - p(igps_rcv_badreports, "\t%u membership report%s received with invalid field(s)\n"); - p(igps_rcv_ourreports, "\t%u membership report%s received for groups to which we belong\n"); + p(igps_rcv_tooshort, "\t%u message%s received with too few bytes\n"); + p(igps_rcv_badsum, "\t%u message%s received with bad checksum\n"); + py(igps_rcv_queries, "\t%u membership quer%s received\n"); + py(igps_rcv_badqueries, + "\t%u membership quer%s received with invalid field(s)\n"); + p(igps_rcv_reports, "\t%u membership report%s received\n"); + p(igps_rcv_badreports, + "\t%u membership report%s received with invalid field(s)\n"); + p(igps_rcv_ourreports, +"\t%u membership report%s received for groups to which we belong\n"); p(igps_snd_reports, "\t%u membership report%s sent\n"); #undef p #undef py @@ -1042,7 +1042,8 @@ p(pims_rcv_badversion, "\t%ju message%s received with bad version\n"); p(pims_rcv_registers_msgs, "\t%ju data register message%s received\n"); p(pims_rcv_registers_bytes, "\t%ju data register byte%s received\n"); - p(pims_rcv_registers_wrongiif, "\t%ju data register message%s received on wrong iif\n"); + p(pims_rcv_registers_wrongiif, + "\t%ju data register message%s received on wrong iif\n"); p(pims_rcv_badregisters, "\t%ju bad register%s received\n"); p(pims_snd_registers_msgs, "\t%ju data register message%s sent\n"); p(pims_snd_registers_bytes, "\t%ju data register byte%s sent\n"); ==== //depot/projects/dtrace/www/en/developers.sgml#26 (text+ko) ==== @@ -6,7 +6,7 @@ us to update author names, or the representation of those names (such as adding email addresses), by just editing a single file. -$FreeBSD: www/en/developers.sgml,v 1.180 2007/12/28 06:16:05 weongyo Exp $ +$FreeBSD: www/en/developers.sgml,v 1.181 2008/01/04 16:22:54 wxs Exp $ --> @@ -531,6 +531,7 @@ + ==== //depot/projects/dtrace/www/en/news/Makefile#5 (text+ko) ==== @@ -1,4 +1,4 @@ -# $FreeBSD: www/en/news/Makefile,v 1.47 2007/03/15 16:21:15 murray Exp $ +# $FreeBSD: www/en/news/Makefile,v 1.48 2008/01/04 21:16:27 jkois Exp $ .if exists(../Makefile.conf) .include "../Makefile.conf" @@ -43,6 +43,7 @@ SUBDIR+= 2003 SUBDIR+= 2004 SUBDIR+= 2005 +SUBDIR+= 2006 SUBDIR+= status .include "${WEB_PREFIX}/share/mk/web.site.mk" ==== //depot/projects/dtrace/www/share/sgml/libcommon.xsl#4 (text+ko) ==== @@ -1,7 +1,7 @@ - +

Old announcements: + 2006, 2005, 2004, 2003, @@ -320,7 +321,7 @@ - News Home + News Home ==== //depot/projects/dtrace/www/share/sgml/news.xml#32 (text+ko) ==== @@ -20,11 +20,27 @@ - $FreeBSD: www/share/sgml/news.xml,v 1.133 2007/12/31 14:32:15 danger Exp $ + $FreeBSD: www/share/sgml/news.xml,v 1.135 2008/01/04 21:16:27 jkois Exp $ + 2008 + + + 1 + + + 4 + +

New committer: Wesley Shields + (ports)

+ + + + + + 2007 @@ -833,982 +849,4 @@ - - 2006 - - 12 - - - 27 - -

New committer: Jordan Sissel - (src)

-
- - - FreeBSD 6.2-RC2 Available - -

The second release candidate of FreeBSD 6.2 has been announced. - ISO images and distributions for Tier-1 architectures are now available on most of the - - FreeBSD mirror sites.

-
-
- - - 26 - -

New committer: Dryice Liu - (ports)

-
-
- - - 22 - -

New committer: Juergen Lock - (ports)

-
-
- - - 10 - - Podcast Interview with FreeBSD Developer Joseph Koshy - -

In his latest bsdtalk - podcast, Will Backman interviews FreeBSD Developer Joseph Koshy - about his recent work on libElf. The podcast is - available at - - http://cisx1.uma.maine.edu/~wbackman/bsdtalk/bsdtalk087.mp3.

-
-
- - - 7 - - Podcast Interview with FreeBSD Developer Kip Macy - -

In his latest bsdtalk - podcast, Will Backman interviews FreeBSD Developer Kip Macy - about the FreeBSD/sun4v port. The podcast is - available at - - http://cisx1.uma.maine.edu/~wbackman/bsdtalk/bsdtalk086.mp3.

-
-
- - - 5 - -

New committer: Nicola Vitale - (ports)

-
- - - New committer: <a href="mailto:gabor@FreeBSD.org">Gábor Kövesdán</a> - (ports). An SoC2006 alumnus. - -

Gábor Kövesdán, a - successful student from last year's Summer of Code - program, has continued working with the FreeBSD Project - and is now a full ports/ committer.

- -
>>> TRUNCATED FOR MAIL (1000 lines) <<< From owner-p4-projects@FreeBSD.ORG Sat Jan 5 06:02:12 2008 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 66F6616A496; Sat, 5 Jan 2008 06:02:12 +0000 (UTC) Delivered-To: perforce@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 2C42916A480 for ; Sat, 5 Jan 2008 06:02:12 +0000 (UTC) (envelope-from imp@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id 2235E13C461 for ; Sat, 5 Jan 2008 06:02:12 +0000 (UTC) (envelope-from imp@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.1/8.14.1) with ESMTP id m0562CTY019145 for ; Sat, 5 Jan 2008 06:02:12 GMT (envelope-from imp@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.1/8.14.1/Submit) id m0562Beh019142 for perforce@freebsd.org; Sat, 5 Jan 2008 06:02:11 GMT (envelope-from imp@freebsd.org) Date: Sat, 5 Jan 2008 06:02:11 GMT Message-Id: <200801050602.m0562Beh019142@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to imp@freebsd.org using -f From: Warner Losh To: Perforce Change Reviews Cc: Subject: PERFORCE change 132550 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 05 Jan 2008 06:02:12 -0000 http://perforce.freebsd.org/chv.cgi?CH=132550 Change 132550 by imp@imp_paco-paco on 2008/01/05 06:02:00 cpuinit removed. Likely its needed, but not here. Start using #ifdef UNIMPLEMENTED so we can add that to the options file later and try to catch all the places I think we need to go back and implement later. too bad I didn't do it before now... Affected files ... .. //depot/projects/mips2-jnpr/src/sys/mips/include/cpuconf.h#3 delete .. //depot/projects/mips2-jnpr/src/sys/mips/include/md_var.h#6 edit .. //depot/projects/mips2-jnpr/src/sys/mips/mips/machdep.c#7 edit Differences ... ==== //depot/projects/mips2-jnpr/src/sys/mips/include/md_var.h#6 (text+ko) ==== @@ -61,6 +61,7 @@ void cpu_identify(void); void mips_cpu_init(void); +void mips_proc0_init(void); /* Platform call-downs. */ void platform_identify(void); ==== //depot/projects/mips2-jnpr/src/sys/mips/mips/machdep.c#7 (text+ko) ==== @@ -94,7 +94,6 @@ #endif #include -#include #include #include @@ -133,7 +132,9 @@ #endif vm_offset_t phys_avail[10]; +#ifdef UNIMPLEMENTED struct platform platform; +#endif vm_paddr_t mips_wired_tlb_physmem_start; vm_paddr_t mips_wired_tlb_physmem_end; @@ -551,19 +552,21 @@ default: break; } - +#ifdef UNIMPLEMENTED if (cputype >= ncpuinit) { platform_not_supported(cputype); /* NOTREACHED */ } cpuinit[cputype].init(cputype); - +#endif /* Do basic tuning, hz etc */ init_param1(); hardware_basic_init(); +#ifdef UNIMPLEMENTED snprintf(cpu_model, sizeof(cpu_model), "%s", platform.model); +#endif #if BOOTINFO_DEBUG printf("boothowto = %x, bootdev = %x\n", boothowto, bootdev); From owner-p4-projects@FreeBSD.ORG Sat Jan 5 06:09:20 2008 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id D8C3516A47C; Sat, 5 Jan 2008 06:09:19 +0000 (UTC) Delivered-To: perforce@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 9D11C16A476 for ; Sat, 5 Jan 2008 06:09:19 +0000 (UTC) (envelope-from imp@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id 947A413C43E for ; Sat, 5 Jan 2008 06:09:19 +0000 (UTC) (envelope-from imp@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.1/8.14.1) with ESMTP id m0569JwB020578 for ; Sat, 5 Jan 2008 06:09:19 GMT (envelope-from imp@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.1/8.14.1/Submit) id m0569J77020575 for perforce@freebsd.org; Sat, 5 Jan 2008 06:09:19 GMT (envelope-from imp@freebsd.org) Date: Sat, 5 Jan 2008 06:09:19 GMT Message-Id: <200801050609.m0569J77020575@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to imp@freebsd.org using -f From: Warner Losh To: Perforce Change Reviews Cc: Subject: PERFORCE change 132551 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 05 Jan 2008 06:09:20 -0000 http://perforce.freebsd.org/chv.cgi?CH=132551 Change 132551 by imp@imp_paco-paco on 2008/01/05 06:08:46 Provide some more FreeBSD 7.x and later required functions. Affected files ... .. //depot/projects/mips2-jnpr/src/sys/mips/mips/machdep.c#8 edit Differences ... ==== //depot/projects/mips2-jnpr/src/sys/mips/mips/machdep.c#8 (text+ko) ==== @@ -86,6 +86,7 @@ #if 0 #include #endif +#include #include #include #ifdef DDB @@ -120,6 +121,7 @@ int cpu_clock; SYSCTL_INT(_hw, OID_AUTO, clockrate, CTLFLAG_RD, &cpu_clock, 0, "CPU instruction clock rate"); +int clocks_running = 0; vm_offset_t kstack0; @@ -671,3 +673,22 @@ printf("Kernel dumps not implemented on this architecture\n"); } + +void +cpu_initclocks() +{ + tick_init(); + clocks_running = 1; +} + +void +cpu_startprofclock(void) +{ + +} + +void +cpu_stopprofclock(void) +{ + +} From owner-p4-projects@FreeBSD.ORG Sat Jan 5 06:34:47 2008 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id C7D6E16A46E; Sat, 5 Jan 2008 06:34:47 +0000 (UTC) Delivered-To: perforce@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 6D62116A46B for ; Sat, 5 Jan 2008 06:34:47 +0000 (UTC) (envelope-from imp@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id 6612D13C4D5 for ; Sat, 5 Jan 2008 06:34:47 +0000 (UTC) (envelope-from imp@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.1/8.14.1) with ESMTP id m056Ylnh021819 for ; Sat, 5 Jan 2008 06:34:47 GMT (envelope-from imp@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.1/8.14.1/Submit) id m056YlnT021816 for perforce@freebsd.org; Sat, 5 Jan 2008 06:34:47 GMT (envelope-from imp@freebsd.org) Date: Sat, 5 Jan 2008 06:34:47 GMT Message-Id: <200801050634.m056YlnT021816@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to imp@freebsd.org using -f From: Warner Losh To: Perforce Change Reviews Cc: Subject: PERFORCE change 132553 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 05 Jan 2008 06:34:48 -0000 http://perforce.freebsd.org/chv.cgi?CH=132553 Change 132553 by imp@imp_paco-paco on 2008/01/05 06:33:50 Implement the newly required pmap functions. We now have no pmap undefined symbols. Affected files ... .. //depot/projects/mips2-jnpr/src/sys/mips/include/pmap.h#8 edit .. //depot/projects/mips2-jnpr/src/sys/mips/mips/pmap.c#14 edit Differences ... ==== //depot/projects/mips2-jnpr/src/sys/mips/include/pmap.h#8 (text+ko) ==== @@ -137,6 +137,7 @@ TAILQ_ENTRY(pv_entry) pv_list; TAILQ_ENTRY(pv_entry) pv_plist; vm_page_t pv_ptem; /* VM page for pte */ + boolean_t pv_wired; /* whether this entry is wired */ } *pv_entry_t; ==== //depot/projects/mips2-jnpr/src/sys/mips/mips/pmap.c#14 (text+ko) ==== @@ -65,6 +65,10 @@ * and to when physical maps must be made correct. */ +/* XXXimp + * mips2 has a pmap_initialized, but we don't use it here. Why? + */ + #include __FBSDID("$FreeBSD$"); @@ -172,7 +176,7 @@ static void pmap_remove_entry(struct pmap *pmap, vm_page_t m, vm_offset_t va); static boolean_t pmap_testbit(vm_page_t m, int bit); static void pmap_insert_entry(pmap_t pmap, vm_offset_t va, vm_page_t mpte, - vm_page_t m); + vm_page_t m, boolean_t wired); static vm_page_t pmap_allocpte(pmap_t pmap, vm_offset_t va, int flags); @@ -1275,7 +1279,8 @@ * (pmap, va). */ static void -pmap_insert_entry(pmap_t pmap, vm_offset_t va, vm_page_t mpte, vm_page_t m) +pmap_insert_entry(pmap_t pmap, vm_offset_t va, vm_page_t mpte, vm_page_t m, + boolean_t wired) { pv_entry_t pv; @@ -1286,6 +1291,7 @@ pv->pv_va = va; pv->pv_pmap = pmap; pv->pv_ptem = mpte; + pv->pv_wired = wired; PMAP_LOCK_ASSERT(pmap, MA_OWNED); mtx_assert(&vm_page_queue_mtx, MA_OWNED); @@ -1687,7 +1693,7 @@ * called at interrupt time. */ if((m->flags & (PG_FICTITIOUS|PG_UNMANAGED)) == 0) { - pmap_insert_entry(pmap, va, mpte, m); + pmap_insert_entry(pmap, va, mpte, m, wired); } /* @@ -1846,7 +1852,7 @@ * called at interrupt time. */ if ((m->flags & (PG_FICTITIOUS|PG_UNMANAGED)) == 0) - pmap_insert_entry(pmap, va, mpte, m); + pmap_insert_entry(pmap, va, mpte, m, FALSE); /* * Increment counters @@ -1916,6 +1922,34 @@ */ /* + * Maps a sequence of resident pages belonging to the same object. + * The sequence begins with the given page m_start. This page is + * mapped at the given virtual address start. Each subsequent page is + * mapped at a virtual address that is offset from start by the same + * amount as the page is offset from m_start within the object. The + * last page in the sequence is the page with the largest offset from + * m_start that can be mapped at a virtual address less than the given + * virtual address end. Not every virtual page between start and end + * is mapped; only those for which a resident page exists with the + * corresponding offset from m_start are mapped. + */ +void +pmap_enter_object(pmap_t pmap, vm_offset_t start, vm_offset_t end, + vm_page_t m_start, vm_prot_t prot) +{ + vm_page_t m; + vm_pindex_t diff, psize; + + psize = atop(end - start); + m = m_start; + while (m != NULL && (diff = m->pindex - m_start->pindex) < psize) { + pmap_enter(pmap, start + ptoa(diff), m, prot & + (VM_PROT_READ | VM_PROT_EXECUTE), FALSE); + m = TAILQ_NEXT(m, listq); + } +} + +/* * pmap_object_init_pt preloads the ptes for a given object * into the specified pmap. This eliminates the blast of soft * faults on process startup and immediately after an mmap. @@ -2117,6 +2151,43 @@ } } +/* + * Returns true if the pmap's pv is one of the first + * 16 pvs linked to from this page. This count may + * be changed upwards or downwards in the future; it + * is only necessary that true be returned for a small + * subset of pmaps for proper page aging. + */ +boolean_t +pmap_page_exists_quick(pmap_t pmap, vm_page_t m) +{ + pv_entry_t pv; + int loops = 0; + + if (m->flags & PG_FICTITIOUS) + return FALSE; + + vm_page_lock_queues(); + PMAP_LOCK(pmap); + + /* + * Not found, check current mappings returning immediately if found. + */ + TAILQ_FOREACH(pv, &m->md.pv_list, pv_list) { + if (pv->pv_pmap == pmap) { + PMAP_UNLOCK(pmap); + vm_page_unlock_queues(); + return TRUE; + } + loops++; + if (loops >= 16) + break; + } + PMAP_UNLOCK(pmap); + vm_page_unlock_queues(); + return (FALSE); +} + #define PMAP_REMOVE_PAGES_CURPROC_ONLY /* * Remove all pages from specified address space @@ -2298,6 +2369,60 @@ } /* + * pmap_page_wired_mappings: + * + * Return the number of managed mappings to the given physical page + * that are wired. + */ +int +pmap_page_wired_mappings(vm_page_t m) +{ + pv_entry_t pv; + int count; + + count = 0; + if ((m->flags & PG_FICTITIOUS) != 0) + return (count); + mtx_assert(&vm_page_queue_mtx, MA_OWNED); + TAILQ_FOREACH(pv, &m->md.pv_list, pv_list) + if (pv->pv_wired) + count++; + return (count); +} + +/* + * Clear the write and modified bits in each of the given page's mappings. + */ +void +pmap_remove_write(vm_page_t m) +{ + pv_entry_t pv, npv; + vm_offset_t va; + pt_entry_t *pte; + + if ((m->flags & PG_WRITEABLE) == 0) + return; + + /* + * Loop over all current mappings + * setting/clearing as appropos. + */ + for (pv = TAILQ_FIRST(&m->md.pv_list); pv; pv = npv) + { + npv = TAILQ_NEXT(pv, pv_plist); + pte = pmap_pte(pv->pv_pmap, pv->pv_va); + + if ((pte == NULL) || !mips_pg_v(*pte)) + panic("page on pm_pvlist has no pte\n"); + + va = pv->pv_va; + pmap_protect(pv->pv_pmap, va, va + PAGE_SIZE, + VM_PROT_READ | VM_PROT_EXECUTE); + } + vm_page_flag_clear(m, PG_WRITEABLE); +} + +/* * pmap_ts_referenced: * * Return the count of reference bits for a page, clearing all of them. From owner-p4-projects@FreeBSD.ORG Sat Jan 5 06:36:50 2008 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id C07BA16A468; Sat, 5 Jan 2008 06:36:50 +0000 (UTC) Delivered-To: perforce@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 85B7A16A420 for ; Sat, 5 Jan 2008 06:36:50 +0000 (UTC) (envelope-from imp@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id 7ED6713C4D5 for ; Sat, 5 Jan 2008 06:36:50 +0000 (UTC) (envelope-from imp@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.1/8.14.1) with ESMTP id m056aodr022006 for ; Sat, 5 Jan 2008 06:36:50 GMT (envelope-from imp@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.1/8.14.1/Submit) id m056aoXW022003 for perforce@freebsd.org; Sat, 5 Jan 2008 06:36:50 GMT (envelope-from imp@freebsd.org) Date: Sat, 5 Jan 2008 06:36:50 GMT Message-Id: <200801050636.m056aoXW022003@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to imp@freebsd.org using -f From: Warner Losh To: Perforce Change Reviews Cc: Subject: PERFORCE change 132554 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 05 Jan 2008 06:36:51 -0000 http://perforce.freebsd.org/chv.cgi?CH=132554 Change 132554 by imp@imp_paco-paco on 2008/01/05 06:36:07 casuword and casuword32 now defined. Affected files ... .. //depot/projects/mips2-jnpr/src/sys/mips/mips/support.S#4 edit Differences ... ==== //depot/projects/mips2-jnpr/src/sys/mips/mips/support.S#4 (text+ko) ==== @@ -474,6 +474,29 @@ END(suword) /* + * casuword(9) + * u_long casuword(u_long *p, u_long oldval, u_long newval) + */ +ENTRY(casuword) + break + li v0, -1 + jr ra + nop +END(casuword) + +/* + * casuword32(9) + * uint32_t casuword(uint32_t *p, uint32_t oldval, + * uint32_t newval) + */ +ENTRY(casuword32) + break + li v0, -1 + jr ra + nop +END(casuword32) + +/* * Have to flush instruction cache afterwards. */ LEAF(suiword) From owner-p4-projects@FreeBSD.ORG Sat Jan 5 07:42:59 2008 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 64C7816A47F; Sat, 5 Jan 2008 07:42:59 +0000 (UTC) Delivered-To: perforce@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 294FD16A417 for ; Sat, 5 Jan 2008 07:42:59 +0000 (UTC) (envelope-from jb@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id 2742113C455 for ; Sat, 5 Jan 2008 07:42:59 +0000 (UTC) (envelope-from jb@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.1/8.14.1) with ESMTP id m057gxHk025952 for ; Sat, 5 Jan 2008 07:42:59 GMT (envelope-from jb@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.1/8.14.1/Submit) id m057gwj3025949 for perforce@freebsd.org; Sat, 5 Jan 2008 07:42:59 GMT (envelope-from jb@freebsd.org) Date: Sat, 5 Jan 2008 07:42:59 GMT Message-Id: <200801050742.m057gwj3025949@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to jb@freebsd.org using -f From: John Birrell To: Perforce Change Reviews Cc: Subject: PERFORCE change 132557 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 05 Jan 2008 07:42:59 -0000 http://perforce.freebsd.org/chv.cgi?CH=132557 Change 132557 by jb@jb_freebsd1 on 2008/01/05 07:42:25 Add cyclic, opensolaris and dtrace modules to i386 (arch) too. Add MK_CDDL test for the purests. Affected files ... .. //depot/projects/dtrace/src/sys/modules/Makefile#35 edit Differences ... ==== //depot/projects/dtrace/src/sys/modules/Makefile#35 (text+ko) ==== @@ -383,8 +383,15 @@ _cp= cp _cpufreq= cpufreq _cs= cs +.if ${MK_CDDL} != "no" || defined(ALL_MODULES) +_cyclic= cyclic +_cyclic_test= cyclic_test +.endif _digi= digi _drm= drm +.if ${MK_CDDL} != "no" || defined(ALL_MODULES) +_dtrace= dtrace +.endif _ed= ed _elink= elink _em= em @@ -413,6 +420,9 @@ _nwfs= nwfs .endif _oltr= oltr +.if ${MK_CDDL} != "no" || defined(ALL_MODULES) +_opensolaris= opensolaris +.endif _pccard= pccard _pcfclock= pcfclock _pecoff= pecoff @@ -508,11 +518,15 @@ _ciss= ciss _coretemp= coretemp _cpufreq= cpufreq +.if ${MK_CDDL} != "no" || defined(ALL_MODULES) _cyclic= cyclic _cyclic_test= cyclic_test +.endif _digi= digi _drm= drm +.if ${MK_CDDL} != "no" || defined(ALL_MODULES) _dtrace= dtrace +.endif _ed= ed _em= em _exca= exca @@ -540,7 +554,9 @@ _nve= nve _nvram= nvram _nxge= nxge +.if ${MK_CDDL} != "no" || defined(ALL_MODULES) _opensolaris= opensolaris +.endif _pccard= pccard _rr232x= rr232x _safe= safe From owner-p4-projects@FreeBSD.ORG Sat Jan 5 07:48:05 2008 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 8455516A46B; Sat, 5 Jan 2008 07:48:05 +0000 (UTC) Delivered-To: perforce@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 49F6616A418 for ; Sat, 5 Jan 2008 07:48:05 +0000 (UTC) (envelope-from kmacy@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id 487E413C44B for ; Sat, 5 Jan 2008 07:48:05 +0000 (UTC) (envelope-from kmacy@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.1/8.14.1) with ESMTP id m057m5d3026152 for ; Sat, 5 Jan 2008 07:48:05 GMT (envelope-from kmacy@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.1/8.14.1/Submit) id m057m5tN026149 for perforce@freebsd.org; Sat, 5 Jan 2008 07:48:05 GMT (envelope-from kmacy@freebsd.org) Date: Sat, 5 Jan 2008 07:48:05 GMT Message-Id: <200801050748.m057m5tN026149@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to kmacy@freebsd.org using -f From: Kip Macy To: Perforce Change Reviews Cc: Subject: PERFORCE change 132558 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 05 Jan 2008 07:48:05 -0000 http://perforce.freebsd.org/chv.cgi?CH=132558 Change 132558 by kmacy@pandemonium:kmacy:xen31 on 2008/01/05 07:47:38 return error in initialization failure set initial state to initializing Affected files ... .. //depot/projects/xen31/sys/xen/xenbus/xenbus_probe.c#5 edit Differences ... ==== //depot/projects/xen31/sys/xen/xenbus/xenbus_probe.c#5 (text+ko) ==== @@ -600,7 +600,11 @@ char *tmpstring; XenbusState state = xenbus_read_driver_state(nodename); + + if (bus->error) + return (bus->error); + if (state != XenbusStateInitialising) { /* Device is not new, so ignore it. This can happen if a device is going away after switching to Closed. */ @@ -612,6 +616,7 @@ if (!xendev) return -ENOMEM; memset(xendev, 0, sizeof(*xendev)); + xendev->state = XenbusStateInitialising; /* Copy the strings into the extra space. */ From owner-p4-projects@FreeBSD.ORG Sat Jan 5 07:49:07 2008 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 6B05816A49C; Sat, 5 Jan 2008 07:49:07 +0000 (UTC) Delivered-To: perforce@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 3088916A47C for ; Sat, 5 Jan 2008 07:49:07 +0000 (UTC) (envelope-from kmacy@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id 15E8613C43E for ; Sat, 5 Jan 2008 07:49:07 +0000 (UTC) (envelope-from kmacy@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.1/8.14.1) with ESMTP id m057n6aA026207 for ; Sat, 5 Jan 2008 07:49:06 GMT (envelope-from kmacy@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.1/8.14.1/Submit) id m057n6hW026204 for perforce@freebsd.org; Sat, 5 Jan 2008 07:49:06 GMT (envelope-from kmacy@freebsd.org) Date: Sat, 5 Jan 2008 07:49:06 GMT Message-Id: <200801050749.m057n6hW026204@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to kmacy@freebsd.org using -f From: Kip Macy To: Perforce Change Reviews Cc: Subject: PERFORCE change 132559 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 05 Jan 2008 07:49:07 -0000 http://perforce.freebsd.org/chv.cgi?CH=132559 Change 132559 by kmacy@pandemonium:kmacy:xen31 on 2008/01/05 07:48:17 make clusters PAGE_SIZE to facilitate page flipping Affected files ... .. //depot/projects/xen31/sys/i386/conf/XEN#3 edit Differences ... ==== //depot/projects/xen31/sys/i386/conf/XEN#3 (text+ko) ==== @@ -192,3 +192,4 @@ options XEN nooption NATIVE nodevice atpic +options MCLSHIFT=12 From owner-p4-projects@FreeBSD.ORG Sat Jan 5 07:49:08 2008 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 487BF16A535; Sat, 5 Jan 2008 07:49:07 +0000 (UTC) Delivered-To: perforce@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 3F7D616A47D for ; Sat, 5 Jan 2008 07:49:07 +0000 (UTC) (envelope-from kmacy@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id 3DAF613C45A for ; Sat, 5 Jan 2008 07:49:07 +0000 (UTC) (envelope-from kmacy@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.1/8.14.1) with ESMTP id m057n60n026213 for ; Sat, 5 Jan 2008 07:49:06 GMT (envelope-from kmacy@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.1/8.14.1/Submit) id m057n6NB026210 for perforce@freebsd.org; Sat, 5 Jan 2008 07:49:06 GMT (envelope-from kmacy@freebsd.org) Date: Sat, 5 Jan 2008 07:49:06 GMT Message-Id: <200801050749.m057n6NB026210@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to kmacy@freebsd.org using -f From: Kip Macy To: Perforce Change Reviews Cc: Subject: PERFORCE change 132560 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 05 Jan 2008 07:49:08 -0000 http://perforce.freebsd.org/chv.cgi?CH=132560 Change 132560 by kmacy@pandemonium:kmacy:xen31 on 2008/01/05 07:48:51 add convenience macro for checking for initial domain Affected files ... .. //depot/projects/xen31/sys/i386/include/xen/hypervisor.h#4 edit Differences ... ==== //depot/projects/xen31/sys/i386/include/xen/hypervisor.h#4 (text+ko) ==== @@ -31,6 +31,12 @@ #define MULTI_UVMDOMID_INDEX 4 #endif +#ifdef CONFIG_XEN_PRIVILEGED_GUEST +#define is_initial_xendomain() (xen_start_info->flags & SIF_INITDOMAIN) +#else +#define is_initial_xendomain() 0 +#endif + extern start_info_t *xen_start_info; extern uint64_t get_system_time(int ticks); From owner-p4-projects@FreeBSD.ORG Sat Jan 5 07:55:14 2008 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 465D116A46B; Sat, 5 Jan 2008 07:55:14 +0000 (UTC) Delivered-To: perforce@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 0C1A016A478 for ; Sat, 5 Jan 2008 07:55:14 +0000 (UTC) (envelope-from kmacy@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id 0A01913C457 for ; Sat, 5 Jan 2008 07:55:14 +0000 (UTC) (envelope-from kmacy@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.1/8.14.1) with ESMTP id m057tDHw026479 for ; Sat, 5 Jan 2008 07:55:13 GMT (envelope-from kmacy@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.1/8.14.1/Submit) id m057tDt9026476 for perforce@freebsd.org; Sat, 5 Jan 2008 07:55:13 GMT (envelope-from kmacy@freebsd.org) Date: Sat, 5 Jan 2008 07:55:13 GMT Message-Id: <200801050755.m057tDt9026476@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to kmacy@freebsd.org using -f From: Kip Macy To: Perforce Change Reviews Cc: Subject: PERFORCE change 132561 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 05 Jan 2008 07:55:14 -0000 http://perforce.freebsd.org/chv.cgi?CH=132561 Change 132561 by kmacy@pandemonium:kmacy:xen31 on 2008/01/05 07:54:19 fix sleeping with lock held issue by making port lock a separate sx lock (needed for xenbus interaction) Affected files ... .. //depot/projects/xen31/sys/dev/xen/netfront/netfront.c#3 edit Differences ... ==== //depot/projects/xen31/sys/dev/xen/netfront/netfront.c#3 (text+ko) ==== @@ -24,6 +24,7 @@ #include #include #include +#include #include #include @@ -192,6 +193,7 @@ struct mtx tx_lock; struct mtx rx_lock; + struct sx sc_lock; unsigned int handle; unsigned int irq; @@ -219,8 +221,6 @@ int rx_ring_ref; uint8_t mac[ETHER_ADDR_LEN]; struct xn_chain_data xn_cdata; /* mbufs */ - unsigned short xn_rx_free_idxs[NET_RX_RING_SIZE+1]; - unsigned short xn_tx_free_idxs[NET_RX_RING_SIZE+1]; struct mbuf_head xn_rx_batch; /* head of the batch queue */ int xn_if_flags; @@ -232,21 +232,24 @@ #define XN_LOCK_INIT(_sc, _name) \ mtx_init(&(_sc)->tx_lock, #_name"_tx", "network transmit lock", MTX_DEF); \ - mtx_init(&(_sc)->rx_lock, #_name"_rx", "network receive lock", MTX_DEF); + mtx_init(&(_sc)->rx_lock, #_name"_rx", "network receive lock", MTX_DEF); \ + sx_init(&(_sc)->sc_lock, #_name"_rx") + #define XN_RX_LOCK(_sc) mtx_lock(&(_sc)->rx_lock) #define XN_RX_UNLOCK(_sc) mtx_unlock(&(_sc)->rx_lock) + #define XN_TX_LOCK(_sc) mtx_lock(&(_sc)->tx_lock) #define XN_TX_UNLOCK(_sc) mtx_unlock(&(_sc)->tx_lock) -#define XN_LOCK(_sc) mtx_lock(&(_sc)->tx_lock); \ - mtx_lock(&(_sc)->rx_lock); -#define XN_UNLOCK(_sc) mtx_unlock(&(_sc)->rx_lock); \ - mtx_unlock(&(_sc)->tx_lock) -#define XN_LOCK_ASSERT(_sc) mtx_assert(&(_sc)->rx_lock, MA_OWNED); \ - mtx_assert(&(_sc)->tx_lock, MA_OWNED); + +#define XN_LOCK(_sc) sx_xlock(&(_sc)->sc_lock); +#define XN_UNLOCK(_sc) sx_xunlock(&(_sc)->sc_lock); + +#define XN_LOCK_ASSERT(_sc) sx_assert(&(_sc)->sc_lock, SX_LOCKED); #define XN_RX_LOCK_ASSERT(_sc) mtx_assert(&(_sc)->rx_lock, MA_OWNED); #define XN_TX_LOCK_ASSERT(_sc) mtx_assert(&(_sc)->tx_lock, MA_OWNED); #define XN_LOCK_DESTROY(_sc) mtx_destroy(&(_sc)->rx_lock); \ - mtx_destroy(&(_sc)->tx_lock); + mtx_destroy(&(_sc)->tx_lock); \ + sx_destroy(&(_sc)->sc_lock); #define netfront_carrier_on(netif) ((netif)->carrier = 1) #define netfront_carrier_off(netif) ((netif)->carrier = 0) @@ -323,9 +326,8 @@ return 0; M_MOVE_PKTHDR(m, buf); - - MCLGET (m, M_DONTWAIT); - + + m_cljget(m, M_DONTWAIT, MJUMPAGESIZE); m->m_pkthdr.len = buf->m_pkthdr.len; m->m_len = buf->m_len; m_copydata(buf, 0, buf->m_pkthdr.len, mtod(m,caddr_t) ); @@ -380,6 +382,8 @@ struct ifnet *ifp; struct netfront_info *info; + printf("netfront_probe() \n"); + err = create_netdev(dev, &ifp); if (err) { xenbus_dev_fatal(dev, err, "creating netdev"); @@ -389,12 +393,6 @@ info = ifp->if_softc; dev->dev_driver_data = info; - err = talk_to_backend(dev, info); - if (err) { - free(info, M_DEVBUF); - dev->dev_driver_data = NULL; - return err; - } return 0; } @@ -414,7 +412,7 @@ DPRINTK("%s\n", dev->nodename); netif_disconnect_backend(info); - return talk_to_backend(dev, info); + return (0); } @@ -467,12 +465,16 @@ message = "writing request-rx-copy"; goto abort_transaction; } - err = xenbus_printf(xbt, dev->nodename, "feature-rx-notify", "%d", 1); if (err) { message = "writing feature-rx-notify"; goto abort_transaction; } + err = xenbus_printf(xbt, dev->nodename, "feature-no-csum-offload", "%d", 1); + if (err) { + message = "writing feature-no-csum-offload"; + goto abort_transaction; + } err = xenbus_printf(xbt, dev->nodename, "feature-sg", "%d", 1); if (err) { message = "writing feature-sg"; @@ -535,7 +537,6 @@ goto fail; info->tx_ring_ref = err; - rxs = (netif_rx_sring_t *)malloc(PAGE_SIZE, M_DEVBUF, M_NOWAIT|M_ZERO); if (!rxs) { err = ENOMEM; @@ -572,18 +573,17 @@ return err; } - /** * Callback received when the backend's state changes. */ -static void backend_changed(struct xenbus_device *dev, +static void +backend_changed(struct xenbus_device *dev, XenbusState backend_state) { struct netfront_info *sc = dev->dev_driver_data; DPRINTK("\n"); - switch (backend_state) { case XenbusStateInitialising: case XenbusStateInitialised: @@ -658,7 +658,7 @@ for (i = 1; i <= NET_TX_RING_SIZE; i++) { m = np->xn_cdata.xn_tx_chain[i]; - if (m == NULL) + if (((unsigned long)m) < KERNBASE) continue; gnttab_grant_foreign_access_ref( np->grant_tx_ref[i], np->xbdev->otherend_id, @@ -738,9 +738,8 @@ break; m_new->m_ext.ext_args = (vm_paddr_t *)(uintptr_t)vtophys(m_new->m_ext.ext_buf); - id = xennet_rxidx(req_prod + 1); + id = xennet_rxidx(req_prod + i); - KASSERT(id != 0, ("alloc_rx_buffers: found free receive index of 0\n")); PANIC_IF(sc->xn_cdata.xn_rx_chain[id] != NULL); sc->xn_cdata.xn_rx_chain[id] = m_new; @@ -1165,7 +1164,9 @@ if (notify) notify_remote_via_irq(sc->irq); + XN_TX_LOCK(sc); xn_txeof(sc); + XN_TX_UNLOCK(sc); if (RING_FULL(&sc->tx)) { sc->tx_full = 1; @@ -1357,6 +1358,8 @@ netif_rx_request_t *req; unsigned int feature_rx_copy, feature_rx_flip; + printf("network_connect\n"); + np = ifp->if_softc; err = xenbus_scanf(XBT_NIL, np->xbdev->otherend, "feature-rx-copy", "%u", &feature_rx_copy); @@ -1375,10 +1378,11 @@ np->copying_receiver = ((MODPARM_rx_copy && feature_rx_copy) || (MODPARM_rx_flip && !feature_rx_flip)); - XN_LOCK(np); - /* Recovery procedure: */ + err = talk_to_backend(np->xbdev, np); + if (err) + return (err); /* Step 1: Reinitialise variables. */ netif_release_tx_bufs(np); @@ -1418,7 +1422,9 @@ */ netfront_carrier_on(np); notify_remote_via_irq(np->irq); + XN_TX_LOCK(np); xn_txeof(np); + XN_TX_UNLOCK(np); network_alloc_rx_buffers(np); XN_UNLOCK(np); @@ -1458,7 +1464,10 @@ int err; struct ifnet *ifp; - np = (struct netfront_info *)malloc(sizeof(struct netfront_info), M_DEVBUF, M_WAITOK); + np = (struct netfront_info *)malloc(sizeof(struct netfront_info), M_DEVBUF, M_NOWAIT); + if (np == NULL) + return (ENOMEM); + memset(np, 0, sizeof(struct netfront_info)); np->xbdev = dev; @@ -1470,22 +1479,22 @@ /* Initialise {tx,rx}_skbs to be a free chain containing every entry. */ for (i = 0; i <= NET_TX_RING_SIZE; i++) { - np->xn_tx_free_idxs[i] = (i+1); - np->grant_tx_ref[i] = GRANT_INVALID_REF; + np->tx_mbufs[i] = (void *) ((unsigned long) i+1); + np->grant_tx_ref[i] = GRANT_INVALID_REF; } for (i = 0; i <= NET_RX_RING_SIZE; i++) { - np->xn_rx_free_idxs[i] = (i+1); - np->grant_rx_ref[i] = GRANT_INVALID_REF; + np->rx_mbufs[i] = NULL; + np->grant_rx_ref[i] = GRANT_INVALID_REF; } /* A grant for every tx ring slot */ - if (gnttab_alloc_grant_references(NET_TX_RING_SIZE, + if (gnttab_alloc_grant_references(TX_MAX_TARGET, &np->gref_tx_head) < 0) { printf("#### netfront can't alloc tx grant refs\n"); err = ENOMEM; goto exit; } /* A grant for every rx ring slot */ - if (gnttab_alloc_grant_references(NET_RX_RING_SIZE, + if (gnttab_alloc_grant_references(RX_MAX_TARGET, &np->gref_rx_head) < 0) { printf("#### netfront can't alloc rx grant refs\n"); gnttab_free_grant_references(np->gref_tx_head); @@ -1624,14 +1633,15 @@ static void netif_init(void *unused) { - if (xen_start_info->flags & SIF_INITDOMAIN) - return; + if (!is_running_on_xen()) + return; + + if (is_initial_xendomain()) + return; - IPRINTK("Initialising virtual ethernet driver.\n"); + IPRINTK("Initialising virtual ethernet driver.\n"); - xenbus_register_frontend(&netfront); - - + xenbus_register_frontend(&netfront); } SYSINIT(xennetif, SI_SUB_PSEUDO, SI_ORDER_ANY, netif_init, NULL) From owner-p4-projects@FreeBSD.ORG Sat Jan 5 08:02:23 2008 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id BEC4216A474; Sat, 5 Jan 2008 08:02:22 +0000 (UTC) Delivered-To: perforce@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 96B0E16A46C for ; Sat, 5 Jan 2008 08:02:21 +0000 (UTC) (envelope-from evilpete@gmail.com) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id 934B413C461 for ; Sat, 5 Jan 2008 08:02:21 +0000 (UTC) (envelope-from evilpete@gmail.com) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.1/8.14.1) with ESMTP id m0582LMm026722 for ; Sat, 5 Jan 2008 08:02:21 GMT (envelope-from evilpete@gmail.com) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.1/8.14.1/Submit) id m0582LY8026719 for perforce@freebsd.org; Sat, 5 Jan 2008 08:02:21 GMT (envelope-from evilpete@gmail.com) Date: Sat, 5 Jan 2008 08:02:21 GMT Message-Id: <200801050802.m0582LY8026719@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to evilpete@gmail.com using -f From: Peter Wemm To: Perforce Change Reviews Cc: Subject: PERFORCE change 132562 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 05 Jan 2008 08:02:23 -0000 http://perforce.freebsd.org/chv.cgi?CH=132562 Change 132562 by peter@peter_overcee on 2008/01/05 08:01:48 IFC @132548 Affected files ... .. //depot/projects/hammer/lib/libc/stdlib/malloc.3#18 integrate .. //depot/projects/hammer/lib/libc/stdlib/malloc.c#40 integrate .. //depot/projects/hammer/share/man/man4/Makefile#101 integrate .. //depot/projects/hammer/share/man/man4/edsc.4#2 integrate .. //depot/projects/hammer/share/man/man4/ipmi.4#5 integrate .. //depot/projects/hammer/share/man/man4/mxge.4#4 integrate .. //depot/projects/hammer/share/man/man4/pci.4#9 integrate .. //depot/projects/hammer/share/man/man4/pcib.4#1 branch .. //depot/projects/hammer/share/man/man4/snd_envy24.4#3 integrate .. //depot/projects/hammer/share/man/man4/snd_envy24ht.4#3 integrate .. //depot/projects/hammer/share/man/man4/snd_hda.4#7 integrate .. //depot/projects/hammer/share/man/man4/snd_spicds.4#3 integrate .. //depot/projects/hammer/share/man/man5/boot.config.5#2 integrate .. //depot/projects/hammer/share/man/man5/linsysfs.5#4 integrate .. //depot/projects/hammer/sys/kern/sched_ule.c#90 integrate .. //depot/projects/hammer/sys/vm/vm_map.c#67 integrate .. //depot/projects/hammer/usr.bin/netstat/inet.c#25 integrate Differences ... ==== //depot/projects/hammer/lib/libc/stdlib/malloc.3#18 (text+ko) ==== @@ -30,9 +30,9 @@ .\" SUCH DAMAGE. .\" .\" @(#)malloc.3 8.1 (Berkeley) 6/4/93 -.\" $FreeBSD: src/lib/libc/stdlib/malloc.3,v 1.75 2007/12/27 23:29:44 jasone Exp $ +.\" $FreeBSD: src/lib/libc/stdlib/malloc.3,v 1.76 2008/01/03 23:22:13 jasone Exp $ .\" -.Dd December 27, 2007 +.Dd January 3, 2008 .Dt MALLOC 3 .Os .Sh NAME @@ -245,7 +245,7 @@ Use .Xr mmap 2 to acquire anonymously mapped memory. -This option is disabled by default. +This option is enabled by default. If both the .Dq D and @@ -335,24 +335,24 @@ to obtain memory, which is suboptimal for several reasons, including race conditions, increased fragmentation, and artificial limitations on maximum usable memory. -This allocator uses +This allocator uses both .Xr sbrk 2 -by default in order to facilitate resource limits, but it can be configured at -run time to use -.Xr sbrk 2 -and/or -.Xr mmap 2 . +and +.Xr mmap 2 +by default, but it can be configured at run time to use only one or the other. If resource limits are not a primary concern, the preferred configuration is .Ev MALLOC_OPTIONS=dM or .Ev MALLOC_OPTIONS=DM . When so configured, the .Ar datasize -resource limit has little practical effect for typical applications. -The +resource limit has little practical effect for typical applications; use +.Ev MALLOC_OPTIONS=Dm +if that is a concern. +Regardless of allocator configuration, the .Ar vmemoryuse -resource limit, however, can be used to bound the total virtual memory used by -a process, as described in +resource limit can be used to bound the total virtual memory used by a +process, as described in .Xr limits 1 . .Pp This allocator uses multiple arenas in order to reduce lock contention for ==== //depot/projects/hammer/lib/libc/stdlib/malloc.c#40 (text+ko) ==== @@ -1,5 +1,5 @@ /*- - * Copyright (C) 2006,2007 Jason Evans . + * Copyright (C) 2006-2008 Jason Evans . * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -131,10 +131,10 @@ * unnecessary, but we are burdened by history and the lack of resource limits * for anonymous mapped memory. */ -#define MALLOC_DSS +#define MALLOC_DSS #include -__FBSDID("$FreeBSD: src/lib/libc/stdlib/malloc.c,v 1.160 2007/12/31 06:19:48 jasone Exp $"); +__FBSDID("$FreeBSD: src/lib/libc/stdlib/malloc.c,v 1.161 2008/01/03 23:22:13 jasone Exp $"); #include "libc_private.h" #ifdef MALLOC_DEBUG @@ -821,7 +821,7 @@ #endif #ifdef MALLOC_DSS static bool opt_dss = true; -static bool opt_mmap = false; +static bool opt_mmap = true; #endif static bool opt_hint = false; #ifdef MALLOC_LAZY_FREE @@ -1646,6 +1646,7 @@ return (NULL); /* Clean up unneeded leading/trailing space. */ + offset = CHUNK_ADDR2OFFSET(ret); if (offset != 0) { /* Leading space. */ pages_unmap(ret, chunksize - offset); @@ -1661,11 +1662,11 @@ pages_unmap((void *)((uintptr_t)ret + size), chunksize); } + } else { + /* Clean up unneeded leading space. */ + pages_unmap(ret, chunksize - offset); + ret = (void *)((uintptr_t)ret + (chunksize - offset)); } - - /* Clean up unneeded leading space. */ - pages_unmap(ret, chunksize - offset); - ret = (void *)((uintptr_t)ret + (chunksize - offset)); } return (ret); ==== //depot/projects/hammer/share/man/man4/Makefile#101 (text+ko) ==== @@ -1,5 +1,5 @@ # @(#)Makefile 8.1 (Berkeley) 6/18/93 -# $FreeBSD: src/share/man/man4/Makefile,v 1.401 2007/12/26 11:35:06 rwatson Exp $ +# $FreeBSD: src/share/man/man4/Makefile,v 1.402 2008/01/04 08:26:22 imp Exp $ MAN= aac.4 \ acpi.4 \ @@ -259,6 +259,7 @@ pccard.4 \ pccbb.4 \ pci.4 \ + pcib.4 \ pcic.4 \ pcm.4 \ pcn.4 \ ==== //depot/projects/hammer/share/man/man4/edsc.4#2 (text+ko) ==== @@ -30,7 +30,7 @@ .\" SUCH DAMAGE. .\" .\" From: @(#)lo.4 8.1 (Berkeley) 6/5/93 -.\" $FreeBSD: src/share/man/man4/edsc.4,v 1.1 2007/03/26 04:39:18 yar Exp $ +.\" $FreeBSD: src/share/man/man4/edsc.4,v 1.2 2008/01/04 12:55:02 gabor Exp $ .\" .Dd March 25, 2007 .Dt EDSC 4 @@ -88,7 +88,7 @@ device was derived from the .Xr disc 4 device and first appeared in -.Fx 7.0 . +.Fx 6.3 . This manpage was adapted from .Xr disc 4 . .Sh CAVEATS ==== //depot/projects/hammer/share/man/man4/ipmi.4#5 (text) ==== @@ -23,7 +23,7 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.\" $FreeBSD: src/share/man/man4/ipmi.4,v 1.8 2007/07/16 17:03:48 ambrisko Exp $ +.\" $FreeBSD: src/share/man/man4/ipmi.4,v 1.9 2008/01/04 12:55:23 gabor Exp $ .\" .Dd July 10, 2007 .Dt IPMI 4 @@ -186,7 +186,7 @@ The .Nm driver first appeared in -.Fx 7.0 . +.Fx 6.3 . .Sh AUTHORS .An -nosplit The ==== //depot/projects/hammer/share/man/man4/mxge.4#4 (text+ko) ==== @@ -29,7 +29,7 @@ .\" .\" * Other names and brands may be claimed as the property of others. .\" -.\" $FreeBSD: src/share/man/man4/mxge.4,v 1.7 2007/01/30 08:17:45 brueffer Exp $ +.\" $FreeBSD: src/share/man/man4/mxge.4,v 1.8 2008/01/04 12:55:54 gabor Exp $ .\" .Dd September 15, 2006 .Dt MXGE 4 @@ -142,7 +142,7 @@ The .Nm device driver first appeared in -.Fx 7.0 . +.Fx 6.3 . .Sh AUTHORS The .Nm ==== //depot/projects/hammer/share/man/man4/pci.4#9 (text+ko) ==== @@ -22,9 +22,9 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.\" $FreeBSD: src/share/man/man4/pci.4,v 1.19 2007/09/30 11:05:12 marius Exp $ +.\" $FreeBSD: src/share/man/man4/pci.4,v 1.20 2008/01/04 08:19:52 imp Exp $ .\" -.Dd September 30, 2007 +.Dd January 3, 2008 .Dt PCI 4 .Os .Sh NAME @@ -54,13 +54,21 @@ device. If used improperly, this driver can allow userland applications to crash a machine or cause data loss. +.Pp +The +.Nm +driver implements the pci bus in the kernel. +It enumerates and devices on the pci bus and gives pci client drivers the +chance to attach to them. +It assigns resources to children, when the BIOS doesn't. +It takes care of routing interrupts when necessary. +It reprobes the unattached pci children when pci client drivers are dynamically +loaded at runtime. .Sh KERNEL CONFIGURATION -It is only necessary to specify one +The .Nm -controller in the kernel. -Additional -.Tn PCI -busses are handled automatically as they are encountered. +device is included in the kernel as described in the SYNOPSIS section. +The pci driver cannot be built as a kld. .Sh IOCTLS The following .Xr ioctl 2 ==== //depot/projects/hammer/share/man/man4/snd_envy24.4#3 (text+ko) ==== @@ -22,7 +22,7 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.\" $FreeBSD: src/share/man/man4/snd_envy24.4,v 1.3 2006/09/30 17:19:22 netchild Exp $ +.\" $FreeBSD: src/share/man/man4/snd_envy24.4,v 1.4 2008/01/04 12:56:24 gabor Exp $ .\" .Dd September 30, 2006 .Dt SND_ENVY24 4 @@ -71,7 +71,7 @@ The .Nm device driver first appeared in -.Fx 7.0 . +.Fx 6.3 . .Sh AUTHORS .An -nosplit The ==== //depot/projects/hammer/share/man/man4/snd_envy24ht.4#3 (text+ko) ==== @@ -22,7 +22,7 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.\" $FreeBSD: src/share/man/man4/snd_envy24ht.4,v 1.2 2007/05/28 15:57:22 joel Exp $ +.\" $FreeBSD: src/share/man/man4/snd_envy24ht.4,v 1.3 2008/01/04 12:56:45 gabor Exp $ .\" .Dd May 28, 2007 .Dt SND_ENVY24HT 4 @@ -91,7 +91,7 @@ The .Nm device driver first appeared in -.Fx 7.0 . +.Fx 6.3 . .Sh AUTHORS .An -nosplit The ==== //depot/projects/hammer/share/man/man4/snd_hda.4#7 (text+ko) ==== @@ -22,7 +22,7 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.\" $FreeBSD: src/share/man/man4/snd_hda.4,v 1.12 2007/07/14 12:35:29 joel Exp $ +.\" $FreeBSD: src/share/man/man4/snd_hda.4,v 1.13 2008/01/04 12:57:06 gabor Exp $ .\" .Dd July 14, 2007 .Dt SND_HDA 4 @@ -234,7 +234,7 @@ The .Nm device driver first appeared in -.Fx 7.0 . +.Fx 6.3 . .Sh AUTHORS .An -nosplit The ==== //depot/projects/hammer/share/man/man4/snd_spicds.4#3 (text+ko) ==== @@ -22,7 +22,7 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.\" $FreeBSD: src/share/man/man4/snd_spicds.4,v 1.3 2007/05/28 16:00:08 joel Exp $ +.\" $FreeBSD: src/share/man/man4/snd_spicds.4,v 1.4 2008/01/04 12:57:34 gabor Exp $ .\" .Dd May 28, 2007 .Dt SND_SPICDS 4 @@ -75,7 +75,7 @@ The .Nm device driver first appeared in -.Fx 7.0 . +.Fx 6.3 . .Sh AUTHORS .An -nosplit The ==== //depot/projects/hammer/share/man/man5/boot.config.5#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/share/man/man5/boot.config.5,v 1.1 2007/08/14 15:25:32 danger Exp $ +.\" $FreeBSD: src/share/man/man5/boot.config.5,v 1.2 2008/01/03 20:54:34 danger Exp $ .Dd May 13, 2007 .Dt BOOT.CONFIG 5 .Os @@ -78,11 +78,11 @@ # echo "1:ad(1,a)/boot/loader" > /boot.config .Ed .Pp -will instruct the second boot stage of -.Xr loader 8 -on the first disk to boot with the third boot stage of -.Xr loader 8 -from the second disk. +will instruct the second stage of +.Xr boot 8 +on the first disk to boot with the third +.Xr boot 8 +stage from the second disk. .Pp The command: .Bd -literal -offset indent ==== //depot/projects/hammer/share/man/man5/linsysfs.5#4 (text) ==== @@ -1,7 +1,7 @@ .\" Written by Garrett Wollman .\" This file is in the public domain. .\" -.\" $FreeBSD: src/share/man/man5/linsysfs.5,v 1.6 2007/02/05 22:45:58 ambrisko Exp $ +.\" $FreeBSD: src/share/man/man5/linsysfs.5,v 1.7 2008/01/04 12:58:09 gabor Exp $ .\" .Dd February 5, 2007 .Dt LINSYSFS 5 @@ -82,7 +82,7 @@ The .Nm driver first appeared in -.Fx 7.0 . +.Fx 6.2 . .Sh AUTHORS .An -nosplit The ==== //depot/projects/hammer/sys/kern/sched_ule.c#90 (text+ko) ==== @@ -36,7 +36,7 @@ */ #include -__FBSDID("$FreeBSD: src/sys/kern/sched_ule.c,v 1.220 2007/12/21 23:30:18 wkoszek Exp $"); +__FBSDID("$FreeBSD: src/sys/kern/sched_ule.c,v 1.221 2008/01/05 04:47:31 jeff Exp $"); #include "opt_hwpmc_hooks.h" #include "opt_sched.h" @@ -2186,17 +2186,16 @@ tdq->tdq_ridx = tdq->tdq_idx; } ts = td->td_sched; - /* - * We only do slicing code for TIMESHARE threads. - */ - if (td->td_pri_class != PRI_TIMESHARE) + if (td->td_pri_class & PRI_FIFO_BIT) return; - /* - * We used a tick; charge it to the thread so that we can compute our - * interactivity. - */ - td->td_sched->ts_runtime += tickincr; - sched_interact_update(td); + if (td->td_pri_class == PRI_TIMESHARE) { + /* + * We used a tick; charge it to the thread so + * that we can compute our interactivity. + */ + td->td_sched->ts_runtime += tickincr; + sched_interact_update(td); + } /* * We used up one time slice. */ ==== //depot/projects/hammer/sys/vm/vm_map.c#67 (text+ko) ==== @@ -63,7 +63,7 @@ */ #include -__FBSDID("$FreeBSD: src/sys/vm/vm_map.c,v 1.391 2007/11/07 21:56:58 pjd Exp $"); +__FBSDID("$FreeBSD: src/sys/vm/vm_map.c,v 1.392 2008/01/04 04:33:13 kib Exp $"); #include #include @@ -2696,7 +2696,9 @@ cow &= ~orient; KASSERT(orient != 0, ("No stack grow direction")); - if (addrbos < vm_map_min(map) || addrbos > map->max_offset) + if (addrbos < vm_map_min(map) || + addrbos > vm_map_max(map) || + addrbos + max_ssize < addrbos) return (KERN_NO_SPACE); init_ssize = (max_ssize < sgrowsiz) ? max_ssize : sgrowsiz; ==== //depot/projects/hammer/usr.bin/netstat/inet.c#25 (text+ko) ==== @@ -38,7 +38,7 @@ #endif #include -__FBSDID("$FreeBSD: src/usr.bin/netstat/inet.c,v 1.80 2008/01/02 23:26:11 obrien Exp $"); +__FBSDID("$FreeBSD: src/usr.bin/netstat/inet.c,v 1.82 2008/01/04 03:09:28 obrien Exp $"); #include #include @@ -366,8 +366,7 @@ #endif /* INET6 */ || (af1 == AF_UNSPEC && ((inp->inp_vflag & INP_IPV4) == 0 #ifdef INET6 - && (inp->inp_vflag & - INP_IPV6) == 0 + && (inp->inp_vflag & INP_IPV6) == 0 #endif /* INET6 */ )) ) @@ -405,14 +404,14 @@ printf("%-8.8s ", "Tcpcb"); if (Lflag) printf("%-5.5s %-14.14s %-22.22s\n", - "Proto", "Listen", "Local Address"); + "Proto", "Listen", "Local Address"); else printf((Aflag && !Wflag) ? "%-5.5s %-6.6s %-6.6s %-18.18s %-18.18s %s\n" : "%-5.5s %-6.6s %-6.6s %-22.22s %-22.22s %s\n", - "Proto", "Recv-Q", "Send-Q", - "Local Address", "Foreign Address", - "(state)"); + "Proto", "Recv-Q", "Send-Q", + "Local Address", "Foreign Address", + "(state)"); first = 0; } if (Lflag && so->so_qlimit == 0) @@ -425,77 +424,73 @@ } #ifdef INET6 if ((inp->inp_vflag & INP_IPV6) != 0) - vchar = ((inp->inp_vflag & INP_IPV4) != 0) - ? "46" : "6 "; + vchar = ((inp->inp_vflag & INP_IPV4) != 0) ? + "46" : "6 "; else #endif - vchar = ((inp->inp_vflag & INP_IPV4) != 0) - ? "4 " : " "; + vchar = ((inp->inp_vflag & INP_IPV4) != 0) ? + "4 " : " "; printf("%-3.3s%-2.2s ", name, vchar); if (Lflag) { char buf1[15]; snprintf(buf1, 15, "%d/%d/%d", so->so_qlen, - so->so_incqlen, so->so_qlimit); + so->so_incqlen, so->so_qlimit); printf("%-14.14s ", buf1); } else { - printf("%6u %6u ", - so->so_rcv.sb_cc, - so->so_snd.sb_cc); + printf("%6u %6u ", so->so_rcv.sb_cc, so->so_snd.sb_cc); } if (numeric_port) { if (inp->inp_vflag & INP_IPV4) { inetprint(&inp->inp_laddr, (int)inp->inp_lport, - name, 1); + name, 1); if (!Lflag) inetprint(&inp->inp_faddr, - (int)inp->inp_fport, name, 1); + (int)inp->inp_fport, name, 1); } #ifdef INET6 else if (inp->inp_vflag & INP_IPV6) { inet6print(&inp->in6p_laddr, - (int)inp->inp_lport, name, 1); + (int)inp->inp_lport, name, 1); if (!Lflag) inet6print(&inp->in6p_faddr, - (int)inp->inp_fport, name, 1); + (int)inp->inp_fport, name, 1); } /* else nothing printed now */ #endif /* INET6 */ } else if (inp->inp_flags & INP_ANONPORT) { if (inp->inp_vflag & INP_IPV4) { inetprint(&inp->inp_laddr, (int)inp->inp_lport, - name, 1); + name, 1); if (!Lflag) inetprint(&inp->inp_faddr, - (int)inp->inp_fport, name, 0); + (int)inp->inp_fport, name, 0); } #ifdef INET6 else if (inp->inp_vflag & INP_IPV6) { inet6print(&inp->in6p_laddr, - (int)inp->inp_lport, name, 1); + (int)inp->inp_lport, name, 1); if (!Lflag) inet6print(&inp->in6p_faddr, - (int)inp->inp_fport, name, 0); + (int)inp->inp_fport, name, 0); } /* else nothing printed now */ #endif /* INET6 */ } else { if (inp->inp_vflag & INP_IPV4) { inetprint(&inp->inp_laddr, (int)inp->inp_lport, - name, 0); + name, 0); if (!Lflag) inetprint(&inp->inp_faddr, - (int)inp->inp_fport, name, - inp->inp_lport != - inp->inp_fport); + (int)inp->inp_fport, name, + inp->inp_lport != inp->inp_fport); } #ifdef INET6 else if (inp->inp_vflag & INP_IPV6) { inet6print(&inp->in6p_laddr, - (int)inp->inp_lport, name, 0); + (int)inp->inp_lport, name, 0); if (!Lflag) inet6print(&inp->in6p_faddr, - (int)inp->inp_fport, name, - inp->inp_lport != - inp->inp_fport); + (int)inp->inp_fport, name, + inp->inp_lport != inp->inp_fport); } /* else nothing printed now */ #endif /* INET6 */ } @@ -505,24 +500,25 @@ else { printf("%s", tcpstates[tp->t_state]); #if defined(TF_NEEDSYN) && defined(TF_NEEDFIN) - /* Show T/TCP `hidden state' */ - if (tp->t_flags & (TF_NEEDSYN|TF_NEEDFIN)) - putchar('*'); + /* Show T/TCP `hidden state' */ + if (tp->t_flags & (TF_NEEDSYN|TF_NEEDFIN)) + putchar('*'); #endif /* defined(TF_NEEDSYN) && defined(TF_NEEDFIN) */ - } + } } putchar('\n'); } if (xig != oxig && xig->xig_gen != oxig->xig_gen) { if (oxig->xig_count > xig->xig_count) { printf("Some %s sockets may have been deleted.\n", - name); + name); } else if (oxig->xig_count < xig->xig_count) { printf("Some %s sockets may have been created.\n", - name); + name); } else { - printf("Some %s sockets may have been created or deleted.\n", - name); + printf( + "Some %s sockets may have been created or deleted.\n", + name); } } free(buf); @@ -569,34 +565,34 @@ printf(m, tcpstat.f, pluralies(tcpstat.f)) p(tcps_sndtotal, "\t%lu packet%s sent\n"); - p2(tcps_sndpack,tcps_sndbyte, - "\t\t%lu data packet%s (%lu byte%s)\n"); + p2(tcps_sndpack,tcps_sndbyte, "\t\t%lu data packet%s (%lu byte%s)\n"); p2(tcps_sndrexmitpack, tcps_sndrexmitbyte, - "\t\t%lu data packet%s (%lu byte%s) retransmitted\n"); + "\t\t%lu data packet%s (%lu byte%s) retransmitted\n"); p(tcps_sndrexmitbad, - "\t\t%lu data packet%s unnecessarily retransmitted\n"); + "\t\t%lu data packet%s unnecessarily retransmitted\n"); p(tcps_mturesent, "\t\t%lu resend%s initiated by MTU discovery\n"); p2a(tcps_sndacks, tcps_delack, - "\t\t%lu ack-only packet%s (%lu delayed)\n"); + "\t\t%lu ack-only packet%s (%lu delayed)\n"); p(tcps_sndurg, "\t\t%lu URG only packet%s\n"); p(tcps_sndprobe, "\t\t%lu window probe packet%s\n"); p(tcps_sndwinup, "\t\t%lu window update packet%s\n"); p(tcps_sndctrl, "\t\t%lu control packet%s\n"); p(tcps_rcvtotal, "\t%lu packet%s received\n"); - p2(tcps_rcvackpack, tcps_rcvackbyte, "\t\t%lu ack%s (for %lu byte%s)\n"); + p2(tcps_rcvackpack, tcps_rcvackbyte, + "\t\t%lu ack%s (for %lu byte%s)\n"); p(tcps_rcvdupack, "\t\t%lu duplicate ack%s\n"); p(tcps_rcvacktoomuch, "\t\t%lu ack%s for unsent data\n"); p2(tcps_rcvpack, tcps_rcvbyte, - "\t\t%lu packet%s (%lu byte%s) received in-sequence\n"); + "\t\t%lu packet%s (%lu byte%s) received in-sequence\n"); p2(tcps_rcvduppack, tcps_rcvdupbyte, - "\t\t%lu completely duplicate packet%s (%lu byte%s)\n"); + "\t\t%lu completely duplicate packet%s (%lu byte%s)\n"); p(tcps_pawsdrop, "\t\t%lu old duplicate packet%s\n"); p2(tcps_rcvpartduppack, tcps_rcvpartdupbyte, - "\t\t%lu packet%s with some dup. data (%lu byte%s duped)\n"); + "\t\t%lu packet%s with some dup. data (%lu byte%s duped)\n"); p2(tcps_rcvoopack, tcps_rcvoobyte, - "\t\t%lu out-of-order packet%s (%lu byte%s)\n"); + "\t\t%lu out-of-order packet%s (%lu byte%s)\n"); p2(tcps_rcvpackafterwin, tcps_rcvbyteafterwin, - "\t\t%lu packet%s (%lu byte%s) of data after window\n"); + "\t\t%lu packet%s (%lu byte%s) of data after window\n"); p(tcps_rcvwinprobe, "\t\t%lu window probe%s\n"); p(tcps_rcvwinupd, "\t\t%lu window update packet%s\n"); p(tcps_rcvafterclose, "\t\t%lu packet%s received after close\n"); @@ -611,20 +607,21 @@ p(tcps_badrst, "\t%lu ignored RSTs in the window%s\n"); p(tcps_connects, "\t%lu connection%s established (including accepts)\n"); p2(tcps_closed, tcps_drops, - "\t%lu connection%s closed (including %lu drop%s)\n"); + "\t%lu connection%s closed (including %lu drop%s)\n"); p(tcps_cachedrtt, "\t\t%lu connection%s updated cached RTT on close\n"); p(tcps_cachedrttvar, - "\t\t%lu connection%s updated cached RTT variance on close\n"); + "\t\t%lu connection%s updated cached RTT variance on close\n"); p(tcps_cachedssthresh, - "\t\t%lu connection%s updated cached ssthresh on close\n"); + "\t\t%lu connection%s updated cached ssthresh on close\n"); p(tcps_conndrops, "\t%lu embryonic connection%s dropped\n"); p2(tcps_rttupdated, tcps_segstimed, - "\t%lu segment%s updated rtt (of %lu attempt%s)\n"); + "\t%lu segment%s updated rtt (of %lu attempt%s)\n"); p(tcps_rexmttimeo, "\t%lu retransmit timeout%s\n"); p(tcps_timeoutdrop, "\t\t%lu connection%s dropped by rexmit timeout\n"); p(tcps_persisttimeo, "\t%lu persist timeout%s\n"); p(tcps_persistdrop, "\t\t%lu connection%s dropped by persist timeout\n"); - p(tcps_finwait2_drops, "\t%lu Connection%s (fin_wait_2) dropped because of timeout\n"); + p(tcps_finwait2_drops, + "\t%lu Connection%s (fin_wait_2) dropped because of timeout\n"); p(tcps_keeptimeo, "\t%lu keepalive timeout%s\n"); p(tcps_keepprobe, "\t\t%lu keepalive probe%s sent\n"); p(tcps_keepdrops, "\t\t%lu connection%s dropped by keepalive\n"); @@ -649,11 +646,11 @@ p(tcps_sack_recovery_episode, "\t%lu SACK recovery episode%s\n"); p(tcps_sack_rexmits, - "\t%lu segment rexmit%s in SACK recovery episodes\n"); + "\t%lu segment rexmit%s in SACK recovery episodes\n"); p(tcps_sack_rexmit_bytes, - "\t%lu byte rexmit%s in SACK recovery episodes\n"); + "\t%lu byte rexmit%s in SACK recovery episodes\n"); p(tcps_sack_rcv_blocks, - "\t%lu SACK option%s (SACK blocks) received\n"); + "\t%lu SACK option%s (SACK blocks) received\n"); p(tcps_sack_send_blocks, "\t%lu SACK option%s (SACK blocks) sent\n"); p1a(tcps_sack_sboverflow, "\t%lu SACK scoreboard overflow\n"); @@ -823,12 +820,12 @@ putchar('\n'); p(ips_cantforward, "\t%lu packet%s not forwardable\n"); p(ips_notmember, - "\t%lu packet%s received for unknown multicast group\n"); + "\t%lu packet%s received for unknown multicast group\n"); p(ips_redirectsent, "\t%lu redirect%s sent\n"); p(ips_localout, "\t%lu packet%s sent from this host\n"); p(ips_rawout, "\t%lu packet%s sent with fabricated ip header\n"); p(ips_odropped, - "\t%lu output packet%s dropped due to no bufs, etc.\n"); + "\t%lu output packet%s dropped due to no bufs, etc.\n"); p(ips_noroute, "\t%lu output packet%s discarded due to no route\n"); p(ips_fragmented, "\t%lu output datagram%s fragmented\n"); p(ips_ofragments, "\t%lu fragment%s created\n"); @@ -931,8 +928,8 @@ icmpstat.icps_outhist[i]); } p(icps_badcode, "\t%lu message%s with bad code fields\n"); - p(icps_tooshort, "\t%lu message%s < minimum length\n"); - p(icps_checksum, "\t%lu bad checksum%s\n"); + p(icps_tooshort, "\t%lu message%s less than the minimum length\n"); + p(icps_checksum, "\t%lu message%s with bad checksum\n"); p(icps_badlen, "\t%lu message%s with bad length\n"); p1a(icps_bmcastecho, "\t%lu multicast echo requests ignored\n"); p1a(icps_bmcasttstamp, "\t%lu multicast timestamp requests ignored\n"); @@ -944,10 +941,10 @@ } if (icmpnames[i] != NULL) printf("\t\t%s: %lu\n", icmpnames[i], - icmpstat.icps_inhist[i]); + icmpstat.icps_inhist[i]); else printf("\t\tunknown ICMP #%d: %lu\n", i, - icmpstat.icps_inhist[i]); + icmpstat.icps_inhist[i]); } p(icps_reflect, "\t%lu message response%s generated\n"); p2(icps_badaddr, "\t%lu invalid return address%s\n"); @@ -992,13 +989,16 @@ #define py(f, m) if (igmpstat.f || sflag <= 1) \ printf(m, igmpstat.f, igmpstat.f != 1 ? "ies" : "y") p(igps_rcv_total, "\t%u message%s received\n"); - p(igps_rcv_tooshort, "\t%u message%s received with too few bytes\n"); - p(igps_rcv_badsum, "\t%u message%s received with bad checksum\n"); - py(igps_rcv_queries, "\t%u membership quer%s received\n"); - py(igps_rcv_badqueries, "\t%u membership quer%s received with invalid field(s)\n"); - p(igps_rcv_reports, "\t%u membership report%s received\n"); - p(igps_rcv_badreports, "\t%u membership report%s received with invalid field(s)\n"); - p(igps_rcv_ourreports, "\t%u membership report%s received for groups to which we belong\n"); + p(igps_rcv_tooshort, "\t%u message%s received with too few bytes\n"); + p(igps_rcv_badsum, "\t%u message%s received with bad checksum\n"); + py(igps_rcv_queries, "\t%u membership quer%s received\n"); + py(igps_rcv_badqueries, + "\t%u membership quer%s received with invalid field(s)\n"); + p(igps_rcv_reports, "\t%u membership report%s received\n"); + p(igps_rcv_badreports, + "\t%u membership report%s received with invalid field(s)\n"); + p(igps_rcv_ourreports, +"\t%u membership report%s received for groups to which we belong\n"); p(igps_snd_reports, "\t%u membership report%s sent\n"); #undef p #undef py @@ -1042,7 +1042,8 @@ p(pims_rcv_badversion, "\t%ju message%s received with bad version\n"); p(pims_rcv_registers_msgs, "\t%ju data register message%s received\n"); p(pims_rcv_registers_bytes, "\t%ju data register byte%s received\n"); - p(pims_rcv_registers_wrongiif, "\t%ju data register message%s received on wrong iif\n"); + p(pims_rcv_registers_wrongiif, + "\t%ju data register message%s received on wrong iif\n"); p(pims_rcv_badregisters, "\t%ju bad register%s received\n"); p(pims_snd_registers_msgs, "\t%ju data register message%s sent\n"); p(pims_snd_registers_bytes, "\t%ju data register byte%s sent\n"); From owner-p4-projects@FreeBSD.ORG Sat Jan 5 12:36:10 2008 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id DE1DF16A4EF; Sat, 5 Jan 2008 12:36:09 +0000 (UTC) Delivered-To: perforce@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 8510016A4D5 for ; Sat, 5 Jan 2008 12:36:09 +0000 (UTC) (envelope-from rdivacky@FreeBSD.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id 8A5A013C459 for ; Sat, 5 Jan 2008 12:36:08 +0000 (UTC) (envelope-from rdivacky@FreeBSD.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.1/8.14.1) with ESMTP id m05Ca8Lc088174 for ; Sat, 5 Jan 2008 12:36:08 GMT (envelope-from rdivacky@FreeBSD.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.1/8.14.1/Submit) id m05Ca7pH088171 for perforce@freebsd.org; Sat, 5 Jan 2008 12:36:07 GMT (envelope-from rdivacky@FreeBSD.org) Date: Sat, 5 Jan 2008 12:36:07 GMT Message-Id: <200801051236.m05Ca7pH088171@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to rdivacky@FreeBSD.org using -f From: Roman Divacky To: Perforce Change Reviews Cc: Subject: PERFORCE change 132570 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 05 Jan 2008 12:36:10 -0000 http://perforce.freebsd.org/chv.cgi?CH=132570 Change 132570 by rdivacky@rdivacky_witten on 2008/01/05 12:35:36 IFC Affected files ... .. //depot/projects/soc2007/rdivacky/linux_at/sys/amd64/amd64/pmap.c#7 integrate .. //depot/projects/soc2007/rdivacky/linux_at/sys/arm/arm/pmap.c#6 integrate .. //depot/projects/soc2007/rdivacky/linux_at/sys/cam/cam_xpt.c#7 integrate .. //depot/projects/soc2007/rdivacky/linux_at/sys/dev/acpica/acpi_thermal.c#3 integrate .. //depot/projects/soc2007/rdivacky/linux_at/sys/dev/ata/ata-all.h#4 integrate .. //depot/projects/soc2007/rdivacky/linux_at/sys/dev/ata/ata-disk.c#5 integrate .. //depot/projects/soc2007/rdivacky/linux_at/sys/dev/cxgb/cxgb_l2t.c#4 integrate .. //depot/projects/soc2007/rdivacky/linux_at/sys/dev/ed/if_ed_pci.c#2 integrate .. //depot/projects/soc2007/rdivacky/linux_at/sys/dev/ed/if_ed_rtl80x9.c#2 integrate .. //depot/projects/soc2007/rdivacky/linux_at/sys/dev/ichwd/ichwd.c#4 integrate .. //depot/projects/soc2007/rdivacky/linux_at/sys/dev/ichwd/ichwd.h#4 integrate .. //depot/projects/soc2007/rdivacky/linux_at/sys/i386/i386/machdep.c#6 integrate .. //depot/projects/soc2007/rdivacky/linux_at/sys/i386/i386/pmap.c#6 integrate .. //depot/projects/soc2007/rdivacky/linux_at/sys/ia64/ia64/pmap.c#6 integrate .. //depot/projects/soc2007/rdivacky/linux_at/sys/kern/imgact_elf.c#6 integrate .. //depot/projects/soc2007/rdivacky/linux_at/sys/kern/kern_descrip.c#10 integrate .. //depot/projects/soc2007/rdivacky/linux_at/sys/kern/kern_mib.c#4 integrate .. //depot/projects/soc2007/rdivacky/linux_at/sys/kern/kern_tc.c#3 integrate .. //depot/projects/soc2007/rdivacky/linux_at/sys/kern/sched_ule.c#8 integrate .. //depot/projects/soc2007/rdivacky/linux_at/sys/kern/subr_lock.c#6 integrate .. //depot/projects/soc2007/rdivacky/linux_at/sys/kern/subr_smp.c#6 integrate .. //depot/projects/soc2007/rdivacky/linux_at/sys/kern/uipc_debug.c#3 integrate .. //depot/projects/soc2007/rdivacky/linux_at/sys/kern/uipc_usrreq.c#6 integrate .. //depot/projects/soc2007/rdivacky/linux_at/sys/kern/vfs_mount.c#8 integrate .. //depot/projects/soc2007/rdivacky/linux_at/sys/kern/vfs_vnops.c#6 integrate .. //depot/projects/soc2007/rdivacky/linux_at/sys/net/ieee8023ad_lacp.c#6 integrate .. //depot/projects/soc2007/rdivacky/linux_at/sys/net/ieee8023ad_lacp.h#5 integrate .. //depot/projects/soc2007/rdivacky/linux_at/sys/net/if_lagg.c#6 integrate .. //depot/projects/soc2007/rdivacky/linux_at/sys/net/netisr.h#2 integrate .. //depot/projects/soc2007/rdivacky/linux_at/sys/netinet/if_ether.c#4 integrate .. //depot/projects/soc2007/rdivacky/linux_at/sys/netinet/if_ether.h#3 integrate .. //depot/projects/soc2007/rdivacky/linux_at/sys/pc98/cbus/pckbd.c#2 integrate .. //depot/projects/soc2007/rdivacky/linux_at/sys/powerpc/powerpc/pmap_dispatch.c#3 integrate .. //depot/projects/soc2007/rdivacky/linux_at/sys/sparc64/sparc64/pmap.c#6 integrate .. //depot/projects/soc2007/rdivacky/linux_at/sys/sun4v/sun4v/pmap.c#5 integrate .. //depot/projects/soc2007/rdivacky/linux_at/sys/sys/sysctl.h#5 integrate .. //depot/projects/soc2007/rdivacky/linux_at/sys/ufs/ffs/ffs_balloc.c#4 integrate .. //depot/projects/soc2007/rdivacky/linux_at/sys/ufs/ffs/ffs_vnops.c#6 integrate .. //depot/projects/soc2007/rdivacky/linux_at/sys/vm/pmap.h#3 integrate .. //depot/projects/soc2007/rdivacky/linux_at/sys/vm/vm_fault.c#9 integrate .. //depot/projects/soc2007/rdivacky/linux_at/sys/vm/vm_kern.c#3 integrate .. //depot/projects/soc2007/rdivacky/linux_at/sys/vm/vm_map.c#5 integrate .. //depot/projects/soc2007/rdivacky/linux_at/sys/vm/vm_page.c#9 integrate Differences ... ==== //depot/projects/soc2007/rdivacky/linux_at/sys/amd64/amd64/pmap.c#7 (text+ko) ==== @@ -77,7 +77,7 @@ */ #include -__FBSDID("$FreeBSD: src/sys/amd64/amd64/pmap.c,v 1.599 2007/12/09 21:00:35 alc Exp $"); +__FBSDID("$FreeBSD: src/sys/amd64/amd64/pmap.c,v 1.601 2008/01/03 07:34:32 alc Exp $"); /* * Manages physical address maps. @@ -1554,7 +1554,7 @@ /* We need a new PDP entry */ nkpg = vm_page_alloc(NULL, nkpt, VM_ALLOC_NOOBJ | VM_ALLOC_SYSTEM | VM_ALLOC_WIRED); - if (!nkpg) + if (nkpg == NULL) panic("pmap_growkernel: no memory to grow kernel"); pmap_zero_page(nkpg); paddr = VM_PAGE_TO_PHYS(nkpg); @@ -1572,12 +1572,9 @@ continue; } - /* - * This index is bogus, but out of the way - */ - nkpg = vm_page_alloc(NULL, nkpt, + nkpg = vm_page_alloc(NULL, pmap_pde_pindex(kernel_vm_end), VM_ALLOC_NOOBJ | VM_ALLOC_SYSTEM | VM_ALLOC_WIRED); - if (!nkpg) + if (nkpg == NULL) panic("pmap_growkernel: no memory to grow kernel"); nkpt++; @@ -2253,8 +2250,8 @@ * insert this page into the given map NOW. */ void -pmap_enter(pmap_t pmap, vm_offset_t va, vm_page_t m, vm_prot_t prot, - boolean_t wired) +pmap_enter(pmap_t pmap, vm_offset_t va, vm_prot_t access, vm_page_t m, + vm_prot_t prot, boolean_t wired) { vm_paddr_t pa; pd_entry_t *pde; ==== //depot/projects/soc2007/rdivacky/linux_at/sys/arm/arm/pmap.c#6 (text+ko) ==== @@ -147,7 +147,7 @@ #include "opt_vm.h" #include -__FBSDID("$FreeBSD: src/sys/arm/arm/pmap.c,v 1.93 2007/12/11 20:35:44 cognet Exp $"); +__FBSDID("$FreeBSD: src/sys/arm/arm/pmap.c,v 1.96 2008/01/03 07:34:33 alc Exp $"); #include #include #include @@ -3170,11 +3170,10 @@ #if defined(PMAP_DEBUG) /* - * XXX this makes pmap_page_protect(NONE) illegal for non-managed - * pages! + * XXX This makes pmap_remove_all() illegal for non-managed pages! */ if (m->flags & PG_FICTITIOUS) { - panic("pmap_page_protect: illegal for unmanaged page, va: 0x%x", VM_PAGE_TO_PHYS(m)); + panic("pmap_remove_all: illegal for unmanaged page, va: 0x%x", VM_PAGE_TO_PHYS(m)); } #endif @@ -3325,8 +3324,8 @@ */ void -pmap_enter(pmap_t pmap, vm_offset_t va, vm_page_t m, vm_prot_t prot, - boolean_t wired) +pmap_enter(pmap_t pmap, vm_offset_t va, vm_prot_t access, vm_page_t m, + vm_prot_t prot, boolean_t wired) { vm_page_lock_queues(); ==== //depot/projects/soc2007/rdivacky/linux_at/sys/cam/cam_xpt.c#7 (text+ko) ==== @@ -28,7 +28,7 @@ */ #include -__FBSDID("$FreeBSD: src/sys/cam/cam_xpt.c,v 1.192 2007/12/16 07:49:44 scottl Exp $"); +__FBSDID("$FreeBSD: src/sys/cam/cam_xpt.c,v 1.193 2008/01/02 01:45:31 obrien Exp $"); #include #include @@ -172,12 +172,12 @@ * identify, and removed when a device fails to respond after a number * of retries, or a bus rescan finds the device missing. */ -struct cam_et { +struct cam_et { TAILQ_HEAD(, cam_ed) ed_entries; TAILQ_ENTRY(cam_et) links; - struct cam_eb *bus; + struct cam_eb *bus; target_id_t target_id; - u_int32_t refcount; + u_int32_t refcount; u_int generation; struct timeval last_reset; }; @@ -187,7 +187,7 @@ * are created by calls to xpt_bus_register and deleted by calls to * xpt_bus_deregister. */ -struct cam_eb { +struct cam_eb { TAILQ_HEAD(, cam_et) et_entries; TAILQ_ENTRY(cam_eb) links; path_id_t path_id; @@ -275,7 +275,7 @@ static const char seagate[] = "SEAGATE"; static const char microp[] = "MICROP"; -static struct xpt_quirk_entry xpt_quirk_table[] = +static struct xpt_quirk_entry xpt_quirk_table[] = { { /* Reports QUEUE FULL for temporary resource shortages */ @@ -315,12 +315,12 @@ * * For future reference, the drive with the problem was: * QUANTUM QM39100TD-SW N1B0 - * + * * It's possible that Quantum will fix the problem in later * firmware revisions. If that happens, the quirk entry * will need to be made specific to the firmware revisions * with the problem. - * + * */ /* Reports QUEUE FULL for temporary resource shortages */ { T_DIRECT, SIP_MEDIA_FIXED, quantum, "QM39100*", "*" }, @@ -351,7 +351,7 @@ /* * The Seagate Medalist Pro drives have very poor write * performance with anything more than 2 tags. - * + * * Reported by: Paul van der Zwan * Drive: * @@ -406,7 +406,7 @@ /*quirks*/0, /*mintags*/0, /*maxtags*/0 }, { - /* Broken tagged queuing drive */ + /* Broken tagged queuing drive */ { T_DIRECT, SIP_MEDIA_FIXED, "CONNER", "CFP2107*", "*" }, /*quirks*/0, /*mintags*/0, /*maxtags*/0 }, @@ -924,7 +924,7 @@ */ retval = xpt_schedule_dev(&bus->sim->devq->alloc_queue, &dev->alloc_ccb_entry.pinfo, - CAMQ_GET_HEAD(&dev->drvq)->priority); + CAMQ_GET_HEAD(&dev->drvq)->priority); } else { retval = 0; } @@ -1025,7 +1025,7 @@ mtx_lock(&xsoftc.xpt_lock); xsoftc.flags |= XPT_FLAG_OPEN; mtx_unlock(&xsoftc.xpt_lock); - + return(0); } @@ -1225,7 +1225,7 @@ * (or rather should be) impossible for the device peripheral driver * list to change since we look at the whole thing in one pass, and * we do it with lock protection. - * + * */ case CAMGETPASSTHRU: { union ccb *ccb; @@ -1280,7 +1280,7 @@ ccb->cgdl.unit_number = 0; error = ENOENT; break; - } + } /* * Run through every peripheral instance of this driver @@ -1318,7 +1318,7 @@ periph = SLIST_NEXT(periph, periph_links), i++) { /* * Check to see whether we have a - * passthrough device or not. + * passthrough device or not. */ if (strcmp(periph->periph_name, "pass") == 0) { /* @@ -1638,7 +1638,7 @@ struct periph_list *periph_head; periph_head = &device->periphs; - + /* Release the slot for this peripheral */ camq_resize(&device->drvq, device->drvq.array_size - 1); @@ -1867,7 +1867,7 @@ continue; /* - * If we get to this point, the user definitely wants + * If we get to this point, the user definitely wants * information on this bus. So tell the caller to copy the * data out. */ @@ -1945,7 +1945,7 @@ /* set the copy flag */ retval |= DM_RET_COPY; - + /* * If we've already decided on an action, go ahead * and return. @@ -1980,7 +1980,7 @@ continue; /* - * If we get to this point, the user definitely wants + * If we get to this point, the user definitely wants * information on this device. So tell the caller to copy * the data out. */ @@ -2103,7 +2103,7 @@ continue; /* - * If we get to this point, the user definitely wants + * If we get to this point, the user definitely wants * information on this peripheral. So tell the caller to * copy the data out. */ @@ -2167,7 +2167,7 @@ */ if (spaceleft < sizeof(struct dev_match_result)) { bzero(&cdm->pos, sizeof(cdm->pos)); - cdm->pos.position_type = + cdm->pos.position_type = CAM_DEV_POS_EDT | CAM_DEV_POS_BUS; cdm->pos.cookie.bus = bus; @@ -2298,7 +2298,7 @@ */ if (spaceleft < sizeof(struct dev_match_result)) { bzero(&cdm->pos, sizeof(cdm->pos)); - cdm->pos.position_type = + cdm->pos.position_type = CAM_DEV_POS_EDT | CAM_DEV_POS_BUS | CAM_DEV_POS_TARGET | CAM_DEV_POS_DEVICE; @@ -2309,7 +2309,7 @@ cdm->pos.generations[CAM_TARGET_GENERATION] = device->target->bus->generation; cdm->pos.cookie.device = device; - cdm->pos.generations[CAM_DEV_GENERATION] = + cdm->pos.generations[CAM_DEV_GENERATION] = device->target->generation; cdm->status = CAM_DEV_MATCH_MORE; return(0); @@ -2407,7 +2407,7 @@ */ if (spaceleft < sizeof(struct dev_match_result)) { bzero(&cdm->pos, sizeof(cdm->pos)); - cdm->pos.position_type = + cdm->pos.position_type = CAM_DEV_POS_EDT | CAM_DEV_POS_BUS | CAM_DEV_POS_TARGET | CAM_DEV_POS_DEVICE | CAM_DEV_POS_PERIPH; @@ -2419,7 +2419,7 @@ cdm->pos.generations[CAM_TARGET_GENERATION] = periph->path->bus->generation; cdm->pos.cookie.device = periph->path->device; - cdm->pos.generations[CAM_DEV_GENERATION] = + cdm->pos.generations[CAM_DEV_GENERATION] = periph->path->target->generation; cdm->pos.cookie.periph = periph; cdm->pos.generations[CAM_PERIPH_GENERATION] = @@ -2545,7 +2545,7 @@ pdrv = NULL; bzero(&cdm->pos, sizeof(cdm->pos)); - cdm->pos.position_type = + cdm->pos.position_type = CAM_DEV_POS_PDRV | CAM_DEV_POS_PDPTR | CAM_DEV_POS_PERIPH; @@ -3139,7 +3139,7 @@ start_ccb->ccb_h.status = CAM_REQ_CMP; break; } - } + } if (XPT_FC_IS_QUEUED(abort_ccb) && (abort_ccb->ccb_h.pinfo.index == CAM_DONEQ_INDEX)) { /* @@ -3204,7 +3204,7 @@ bcopy(dev->serial_num, cgd->serial_num, dev->serial_num_len); } - break; + break; } case XPT_GDEV_STATS: { @@ -3257,17 +3257,17 @@ /* * Check and see if the list has changed since the user * last requested a list member. If so, tell them that the - * list has changed, and therefore they need to start over + * list has changed, and therefore they need to start over * from the beginning. */ - if ((cgdl->index != 0) && + if ((cgdl->index != 0) && (cgdl->generation != device->generation)) { cgdl->status = CAM_GDEVLIST_LIST_CHANGED; break; } /* - * Traverse the list of peripherals and attempt to find + * Traverse the list of peripherals and attempt to find * the requested peripheral. */ for (nperiph = SLIST_FIRST(periph_head), i = 0; @@ -3496,7 +3496,7 @@ */ start_ccb->ccb_h.flags &= ~CAM_DEV_QFREEZE; } else { - + dev->flags |= CAM_DEV_REL_ON_COMPLETE; start_ccb->ccb_h.flags |= CAM_DEV_QFREEZE; } @@ -3509,7 +3509,7 @@ start_ccb->ccb_h.flags &= ~CAM_DEV_QFREEZE; } else { - + dev->flags |= CAM_DEV_REL_ON_QUEUE_EMPTY; start_ccb->ccb_h.flags |= CAM_DEV_QFREEZE; } @@ -3584,7 +3584,7 @@ xpt_polled_action(union ccb *start_ccb) { u_int32_t timeout; - struct cam_sim *sim; + struct cam_sim *sim; struct cam_devq *devq; struct cam_ed *dev; @@ -3601,18 +3601,18 @@ * can get it before us while we simulate interrupts. */ dev->ccbq.devq_openings--; - dev->ccbq.dev_openings--; - + dev->ccbq.dev_openings--; + while(((devq != NULL && devq->send_openings <= 0) || dev->ccbq.dev_openings < 0) && (--timeout > 0)) { DELAY(1000); (*(sim->sim_poll))(sim); camisr_runqueue(&sim->sim_doneq); } - + dev->ccbq.devq_openings++; dev->ccbq.dev_openings++; - + if (timeout != 0) { xpt_action(start_ccb); while(--timeout > 0) { @@ -3636,7 +3636,7 @@ start_ccb->ccb_h.status = CAM_RESRC_UNAVAIL; } } - + /* * Schedule a peripheral driver to receive a ccb when it's * target device has space for more transactions. @@ -3759,7 +3759,7 @@ union ccb *work_ccb; struct cam_periph *drv; struct camq *drvq; - + qinfo = (struct cam_ed_qinfo *)camq_remove(&devq->alloc_queue, CAMQ_HEAD); device = qinfo->device; @@ -3796,7 +3796,7 @@ */ break; } - + if (drvq->entries > 0) { /* We have more work. Attempt to reschedule */ xpt_schedule_dev_allocq(bus, device); @@ -3811,7 +3811,7 @@ struct cam_devq *devq; CAM_DEBUG_PRINT(CAM_DEBUG_XPT, ("xpt_run_dev_sendq\n")); - + devq = bus->sim->devq; devq->send_queue.qfrozen_cnt++; @@ -3858,8 +3858,8 @@ * available. */ device->qfrozen_cnt++; - STAILQ_INSERT_TAIL(&xsoftc.highpowerq, - &work_ccb->ccb_h, + STAILQ_INSERT_TAIL(&xsoftc.highpowerq, + &work_ccb->ccb_h, xpt_links.stqe); mtx_unlock(&xsoftc.xpt_lock); @@ -3879,8 +3879,8 @@ cam_ccbq_send_ccb(&device->ccbq, work_ccb); devq->send_openings--; - devq->send_active++; - + devq->send_active++; + if (device->ccbq.queue.entries > 0) xpt_schedule_dev_sendq(bus, device); @@ -4549,7 +4549,7 @@ bus = path->bus; - if (async_code == AC_BUS_RESET) { + if (async_code == AC_BUS_RESET) { /* Update our notion of when the last reset occurred */ microtime(&bus->last_reset); } @@ -4576,7 +4576,7 @@ next_device = TAILQ_NEXT(device, links); - if (path->device != device + if (path->device != device && path->device->lun_id != CAM_LUN_WILDCARD && device->lun_id != CAM_LUN_WILDCARD) continue; @@ -4588,7 +4588,7 @@ path, async_arg); } } - + /* * If this wasn't a fully wildcarded async, tell all * clients that want all async events. @@ -4722,7 +4722,7 @@ sim->devq->send_queue.qfrozen_cnt += count; if (sim->devq->active_dev != NULL) { struct ccb_hdr *ccbh; - + ccbh = TAILQ_LAST(&sim->devq->active_dev->ccbq.active_ccbs, ccb_hdr_tailq); if (ccbh && ccbh->status == CAM_REQ_INPROG) @@ -5278,7 +5278,7 @@ scan_info->counter--; } } - + for (i = 0; i <= max_target; i++) { cam_status status; if (i == initiator_id) @@ -5367,7 +5367,7 @@ } } else { struct cam_ed *device; - + device = request_ccb->ccb_h.path->device; if ((device->quirk->quirks & CAM_QUIRK_NOLUNS) == 0) { @@ -5394,7 +5394,7 @@ done = 0; if (scan_info->cpi->hba_misc & PIM_SEQSCAN) { scan_info->counter++; - if (scan_info->counter == + if (scan_info->counter == scan_info->cpi->initiator_id) { scan_info->counter++; } @@ -5506,7 +5506,7 @@ CAM_DEBUG(request_ccb->ccb_h.path, CAM_DEBUG_TRACE, ("xpt_scan_lun\n")); - + xpt_setup_ccb(&cpi.ccb_h, path, /*priority*/1); cpi.ccb_h.func_code = XPT_PATH_INQ; xpt_action((union ccb *)&cpi); @@ -5616,7 +5616,7 @@ if (softc == NULL) { printf("proberegister: Unable to probe new device. " - "Unable to allocate softc\n"); + "Unable to allocate softc\n"); return(CAM_REQ_CMP_ERR); } TAILQ_INIT(&softc->request_ccbs); @@ -5661,7 +5661,7 @@ * condition pending. It will not report the unit attention in * response to an inquiry, which may leave invalid transfer * negotiations in effect. The TUR will reveal the unit attention - * condition. Only send the TUR for lun 0, since some devices + * condition. Only send the TUR for lun 0, since some devices * will get confused by commands other than inquiry to non-existent * luns. If you think a device has gone away start your scan from * lun 0. This will insure that any bogus transfer settings are @@ -5736,7 +5736,7 @@ * whether we still have the same device. */ if ((periph->path->device->flags & CAM_DEV_UNCONFIGURED) == 0) { - + MD5Init(&softc->context); MD5Update(&softc->context, (unsigned char *)inq_buf, sizeof(struct scsi_inquiry_data)); @@ -5748,7 +5748,7 @@ softc->flags |= PROBE_SERIAL_CKSUM; } MD5Final(softc->digest, &softc->context); - } + } if (softc->action == PROBE_INQUIRY) inquiry_len = SHORT_INQUIRY_LENGTH; @@ -5762,7 +5762,7 @@ * safe. */ inquiry_len = roundup2(inquiry_len, 2); - + if (softc->action == PROBE_INQUIRY_BASIC_DV1 || softc->action == PROBE_INQUIRY_BASIC_DV2) { inq_buf = malloc(inquiry_len, M_CAMXPT, M_NOWAIT); @@ -6024,7 +6024,7 @@ inq_buf = &path->device->inq_data; periph_qual = SID_QUAL(inq_buf); - + switch(periph_qual) { case SID_QUAL_LU_CONNECTED: { @@ -6044,7 +6044,7 @@ + offsetof(struct scsi_inquiry_data, additional_length) + 1; if (softc->action == PROBE_INQUIRY - && len > SHORT_INQUIRY_LENGTH) { + && len > SHORT_INQUIRY_LENGTH) { softc->action = PROBE_FULL_INQUIRY; xpt_release_ccb(done_ccb); xpt_schedule(periph, priority); @@ -6177,7 +6177,7 @@ xpt_release_devq(done_ccb->ccb_h.path, /*count*/1, /*run_queue*/TRUE); } - + /* * Let's see if we have seen this device before. */ @@ -6186,7 +6186,7 @@ u_int8_t digest[16]; MD5Init(&context); - + MD5Update(&context, (unsigned char *)&path->device->inq_data, sizeof(struct scsi_inquiry_data)); @@ -6289,7 +6289,7 @@ if (bcmp(nbuf, &path->device->inq_data, SHORT_INQUIRY_LENGTH)) { xpt_print(path, "inquiry data fails comparison at DV%d step\n", - softc->action == PROBE_INQUIRY_BASIC_DV1? 1 : 2); + softc->action == PROBE_INQUIRY_BASIC_DV1 ? 1 : 2); if (proberequestbackoff(periph, path->device)) { path->device->flags &= ~CAM_DEV_IN_DV; softc->action = PROBE_TUR_FOR_NEGOTIATION; @@ -6417,7 +6417,7 @@ if (otherdev != path->device) break; } - + if (otherdev != NULL) { /* * Initially assume the same versioning as @@ -6533,7 +6533,7 @@ * SCSI protocol. */ if (cts->protocol != PROTO_SCSI) { - if (async_update == FALSE) + if (async_update == FALSE) (*(sim->sim_action))(sim, (union ccb *)cts); return; } @@ -6734,14 +6734,14 @@ crs.ccb_h.func_code = XPT_REL_SIMQ; crs.release_flags = RELSIM_RELEASE_AFTER_QEMPTY; crs.openings - = crs.release_timeout + = crs.release_timeout = crs.qfrozen_cnt = 0; xpt_action((union ccb *)&crs); } } } - if (async_update == FALSE) + if (async_update == FALSE) (*(sim->sim_action))(sim, (union ccb *)cts); } @@ -6802,7 +6802,7 @@ crs.ccb_h.func_code = XPT_REL_SIMQ; crs.release_flags = RELSIM_RELEASE_AFTER_QEMPTY; crs.openings - = crs.release_timeout + = crs.release_timeout = crs.qfrozen_cnt = 0; xpt_action((union ccb *)&crs); @@ -7189,7 +7189,7 @@ */ xsoftc.num_highpower++; - /* + /* * Any high powered commands queued up? */ if (send_ccb != NULL) { @@ -7214,12 +7214,12 @@ ccb_h->path->bus->sim->devq->send_active--; ccb_h->path->bus->sim->devq->send_openings++; } - + if (((dev->flags & CAM_DEV_REL_ON_COMPLETE) != 0 && (ccb_h->status&CAM_STATUS_MASK) != CAM_REQUEUE_REQ) || ((dev->flags & CAM_DEV_REL_ON_QUEUE_EMPTY) != 0 && (dev->ccbq.dev_active == 0))) { - + xpt_release_devq(ccb_h->path, /*count*/1, /*run_queue*/TRUE); } @@ -7241,7 +7241,7 @@ /*run_queue*/TRUE); ccb_h->status &= ~CAM_RELEASE_SIMQ; runq = FALSE; - } + } if ((ccb_h->flags & CAM_DEV_QFRZDIS) && (ccb_h->status & CAM_DEV_QFRZN)) { @@ -7264,7 +7264,7 @@ ccb->ccb_h.status = CAM_DEV_NOT_THERE; xpt_done(ccb); } - + static void dead_sim_poll(struct cam_sim *sim) { ==== //depot/projects/soc2007/rdivacky/linux_at/sys/dev/acpica/acpi_thermal.c#3 (text+ko) ==== @@ -26,7 +26,7 @@ */ #include -__FBSDID("$FreeBSD: src/sys/dev/acpica/acpi_thermal.c,v 1.66 2007/12/24 16:32:14 ume Exp $"); +__FBSDID("$FreeBSD: src/sys/dev/acpica/acpi_thermal.c,v 1.67 2007/12/31 15:56:03 jhb Exp $"); #include "opt_acpi.h" #include @@ -914,7 +914,7 @@ for (;;) { /* If the number of devices has changed, re-evaluate. */ - if (devclass_get_maxunit(acpi_tz_devclass) != devcount) { + if (devclass_get_count(acpi_tz_devclass) != devcount) { if (devs != NULL) { free(devs, M_TEMP); free(sc, M_TEMP); ==== //depot/projects/soc2007/rdivacky/linux_at/sys/dev/ata/ata-all.h#4 (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-all.h,v 1.126 2007/12/13 11:47:36 sos Exp $ + * $FreeBSD: src/sys/dev/ata/ata-all.h,v 1.127 2008/01/02 20:31:14 phk Exp $ */ /* ATA register defines */ @@ -579,56 +579,34 @@ /* macros to hide busspace uglyness */ #define ATA_INB(res, offset) \ - bus_space_read_1(rman_get_bustag((res)), \ - rman_get_bushandle((res)), (offset)) + bus_read_1((res), (offset)) #define ATA_INW(res, offset) \ - bus_space_read_2(rman_get_bustag((res)), \ - rman_get_bushandle((res)), (offset)) + bus_read_2((res), (offset)) #define ATA_INL(res, offset) \ - bus_space_read_4(rman_get_bustag((res)), \ - rman_get_bushandle((res)), (offset)) + bus_read_4((res), (offset)) #define ATA_INSW(res, offset, addr, count) \ - bus_space_read_multi_2(rman_get_bustag((res)), \ - rman_get_bushandle((res)), \ - (offset), (addr), (count)) + bus_read_multi_2((res), (offset), (addr), (count)) #define ATA_INSW_STRM(res, offset, addr, count) \ - bus_space_read_multi_stream_2(rman_get_bustag((res)), \ - rman_get_bushandle((res)), \ - (offset), (addr), (count)) + bus_read_multi_stream_2((res), (offset), (addr), (count)) #define ATA_INSL(res, offset, addr, count) \ - bus_space_read_multi_4(rman_get_bustag((res)), \ - rman_get_bushandle((res)), \ - (offset), (addr), (count)) + bus_read_multi_4((res), (offset), (addr), (count)) #define ATA_INSL_STRM(res, offset, addr, count) \ - bus_space_read_multi_stream_4(rman_get_bustag((res)), \ - rman_get_bushandle((res)), \ - (offset), (addr), (count)) + bus_read_multi_stream_4((res), (offset), (addr), (count)) #define ATA_OUTB(res, offset, value) \ - bus_space_write_1(rman_get_bustag((res)), \ - rman_get_bushandle((res)), (offset), (value)) + bus_write_1((res), (offset), (value)) #define ATA_OUTW(res, offset, value) \ - bus_space_write_2(rman_get_bustag((res)), \ - rman_get_bushandle((res)), (offset), (value)) + bus_write_2((res), (offset), (value)) #define ATA_OUTL(res, offset, value) \ - bus_space_write_4(rman_get_bustag((res)), \ - rman_get_bushandle((res)), (offset), (value)) + bus_write_4((res), (offset), (value)) #define ATA_OUTSW(res, offset, addr, count) \ - bus_space_write_multi_2(rman_get_bustag((res)), \ - rman_get_bushandle((res)), \ - (offset), (addr), (count)) + bus_write_multi_2((res), (offset), (addr), (count)) #define ATA_OUTSW_STRM(res, offset, addr, count) \ - bus_space_write_multi_stream_2(rman_get_bustag((res)), \ - rman_get_bushandle((res)), \ - (offset), (addr), (count)) + bus_write_multi_stream_2((res), (offset), (addr), (count)) #define ATA_OUTSL(res, offset, addr, count) \ - bus_space_write_multi_4(rman_get_bustag((res)), \ - rman_get_bushandle((res)), \ - (offset), (addr), (count)) + bus_write_multi_4((res), (offset), (addr), (count)) #define ATA_OUTSL_STRM(res, offset, addr, count) \ - bus_space_write_multi_stream_4(rman_get_bustag((res)), \ - rman_get_bushandle((res)), \ - (offset), (addr), (count)) + bus_write_multi_stream_4((res), (offset), (addr), (count)) #define ATA_IDX_INB(ch, idx) \ ATA_INB(ch->r_io[idx].res, ch->r_io[idx].offset) ==== //depot/projects/soc2007/rdivacky/linux_at/sys/dev/ata/ata-disk.c#5 (text+ko) ==== @@ -25,7 +25,7 @@ */ #include -__FBSDID("$FreeBSD: src/sys/dev/ata/ata-disk.c,v 1.205 2007/11/23 08:17:14 sos Exp $"); +__FBSDID("$FreeBSD: src/sys/dev/ata/ata-disk.c,v 1.206 2008/01/02 20:33:54 phk Exp $"); #include "opt_ata.h" #include @@ -162,6 +162,9 @@ adp->disk->d_unit = device_get_unit(dev); if (atadev->param.support.command2 & ATA_SUPPORT_FLUSHCACHE) adp->disk->d_flags = DISKFLAG_CANFLUSHCACHE; + if ((atadev->param.support.command2 & ATA_SUPPORT_CFA) || + atadev->param.config == ATA_PROTO_CFA) + adp->disk->d_flags = DISKFLAG_CANDELETE; snprintf(adp->disk->d_ident, sizeof(adp->disk->d_ident), "ad:%s", atadev->param.serial); disk_create(adp->disk, DISK_VERSION); @@ -274,6 +277,12 @@ else request->u.ata.command = ATA_WRITE; break; + case BIO_DELETE: + request->flags = ATA_R_CONTROL; + request->u.ata.command = ATA_CFA_ERASE; + request->transfersize = 0; + request->donecount = bp->bio_bcount; + break; case BIO_FLUSH: request->u.ata.lba = 0; request->u.ata.count = 0; ==== //depot/projects/soc2007/rdivacky/linux_at/sys/dev/cxgb/cxgb_l2t.c#4 (text+ko) ==== @@ -28,7 +28,7 @@ ***************************************************************************/ #include -__FBSDID("$FreeBSD: src/sys/dev/cxgb/cxgb_l2t.c,v 1.5 2007/12/17 08:17:49 kmacy Exp $"); +__FBSDID("$FreeBSD: src/sys/dev/cxgb/cxgb_l2t.c,v 1.6 2007/12/31 23:48:06 julian Exp $"); #include #include @@ -183,7 +183,8 @@ again: switch (e->state) { case L2T_STATE_STALE: /* entry is stale, kick off revalidation */ - arpresolve2(rt->rt_ifp, rt, (struct sockaddr *)&sin, e->dmac); + arpresolve(rt->rt_ifp, rt, NULL, + (struct sockaddr *)&sin, e->dmac); mtx_lock(&e->lock); if (e->state == L2T_STATE_STALE) e->state = L2T_STATE_VALID; @@ -208,8 +209,9 @@ * A better way would be to use a work request to retry L2T * entries when there's no memory. */ - printf("doing arpresolve2 on 0x%x \n", e->addr); - if (arpresolve2(rt->rt_ifp, rt, (struct sockaddr *)&sin, e->dmac) == 0) { + printf("doing arpresolve on 0x%x \n", e->addr); + if (arpresolve(rt->rt_ifp, rt, NULL, + (struct sockaddr *)&sin, e->dmac) == 0) { printf("mac=%x:%x:%x:%x:%x:%x\n", e->dmac[0], e->dmac[1], e->dmac[2], e->dmac[3], e->dmac[4], e->dmac[5]); @@ -223,7 +225,7 @@ m_freem(m); mtx_unlock(&e->lock); } else - printf("arpresolve2 returned non-zero\n"); + printf("arpresolve returned non-zero\n"); } return 0; } @@ -245,7 +247,8 @@ again: switch (e->state) { case L2T_STATE_STALE: /* entry is stale, kick off revalidation */ - arpresolve2(rt->rt_ifp, rt, (struct sockaddr *)&sin, e->dmac); + arpresolve(rt->rt_ifp, rt, NULL, + (struct sockaddr *)&sin, e->dmac); mtx_lock(&e->lock); if (e->state == L2T_STATE_STALE) { e->state = L2T_STATE_VALID; @@ -270,7 +273,8 @@ * A better way would be to use a work request to retry L2T * entries when there's no memory. */ - arpresolve2(rt->rt_ifp, rt, (struct sockaddr *)&sin, e->dmac); + arpresolve(rt->rt_ifp, rt, NULL, + (struct sockaddr *)&sin, e->dmac); } return; ==== //depot/projects/soc2007/rdivacky/linux_at/sys/dev/ed/if_ed_pci.c#2 (text+ko) ==== @@ -18,7 +18,7 @@ */ #include -__FBSDID("$FreeBSD: src/sys/dev/ed/if_ed_pci.c,v 1.49 2007/02/23 12:18:38 piso Exp $"); +__FBSDID("$FreeBSD: src/sys/dev/ed/if_ed_pci.c,v 1.50 2007/12/31 03:29:02 imp Exp $"); #include #include @@ -49,14 +49,20 @@ const char *desc; } pci_ids[] = { - { ED_RTL8029_PCI_ID, "RealTek 8029" }, - { 0x50004a14, "NetVin 5000" }, + { ED_RTL8029_PCI_ID, "RealTek 8029" }, /* Needs realtek full duplex */ + { 0x50004a14, "NetVin NV5000SC" }, { 0x09401050, "ProLAN" }, - { 0x140111f6, "Compex" }, - { 0x30008e2e, "KTI" }, + { 0x140111f6, "Compex RL2000" }, + { 0x30008e2e, "KTI ET32P2" }, { 0x19808c4a, "Winbond W89C940" }, { 0x0e3410bd, "Surecom NE-34" }, - { 0x09261106, "VIA VT86C926" }, + { 0x09261106, "VIA VT86C926" }, /* only do 16-bit */ + { 0x5a5a1050, "Winbond W89C940F" }, +#if 0 + /* Holtek needs special lovin', disabled by default */ + { 0x005812c3, "Holtek HT80232" }, /* Only 16-bit I/O, Holtek fdx */ + { 0x559812c3, "Holtek HT80229" }, /* Only 32-bit I/O, Holtek fdx, STOP_PG_60? */ +#endif { 0x00000000, NULL } }; ==== //depot/projects/soc2007/rdivacky/linux_at/sys/dev/ed/if_ed_rtl80x9.c#2 (text+ko) ==== @@ -31,7 +31,7 @@ #include >>> TRUNCATED FOR MAIL (1000 lines) <<< From owner-p4-projects@FreeBSD.ORG Sat Jan 5 19:45:40 2008 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 5045D16A421; Sat, 5 Jan 2008 19:45:40 +0000 (UTC) Delivered-To: perforce@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id E140116A417 for ; Sat, 5 Jan 2008 19:45:39 +0000 (UTC) (envelope-from jb@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id BEAEF13C465 for ; Sat, 5 Jan 2008 19:45:39 +0000 (UTC) (envelope-from jb@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.1/8.14.1) with ESMTP id m05JjduJ001498 for ; Sat, 5 Jan 2008 19:45:39 GMT (envelope-from jb@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.1/8.14.1/Submit) id m05Jjdu3001495 for perforce@freebsd.org; Sat, 5 Jan 2008 19:45:39 GMT (envelope-from jb@freebsd.org) Date: Sat, 5 Jan 2008 19:45:39 GMT Message-Id: <200801051945.m05Jjdu3001495@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to jb@freebsd.org using -f From: John Birrell To: Perforce Change Reviews Cc: Subject: PERFORCE change 132572 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 05 Jan 2008 19:45:40 -0000 http://perforce.freebsd.org/chv.cgi?CH=132572 Change 132572 by jb@jb_freebsd1 on 2008/01/05 19:45:23 Add the type argument to the dtrace_trap() call. Affected files ... .. //depot/projects/dtrace/src/sys/i386/i386/trap.c#25 edit Differences ... ==== //depot/projects/dtrace/src/sys/i386/i386/trap.c#25 (text+ko) ==== @@ -251,7 +251,7 @@ * function can return normally. */ if (dtrace_trap_func != NULL) - if ((*dtrace_trap_func)(frame)) + if ((*dtrace_trap_func)(frame, type)) goto out; #endif From owner-p4-projects@FreeBSD.ORG Sat Jan 5 19:48:43 2008 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 4B17E16A41A; Sat, 5 Jan 2008 19:48:43 +0000 (UTC) Delivered-To: perforce@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 10FA616A418 for ; Sat, 5 Jan 2008 19:48:43 +0000 (UTC) (envelope-from jb@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id 06A1413C478 for ; Sat, 5 Jan 2008 19:48:43 +0000 (UTC) (envelope-from jb@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.1/8.14.1) with ESMTP id m05Jmg8N001569 for ; Sat, 5 Jan 2008 19:48:42 GMT (envelope-from jb@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.1/8.14.1/Submit) id m05Jmgpk001566 for perforce@freebsd.org; Sat, 5 Jan 2008 19:48:42 GMT (envelope-from jb@freebsd.org) Date: Sat, 5 Jan 2008 19:48:42 GMT Message-Id: <200801051948.m05Jmgpk001566@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to jb@freebsd.org using -f From: John Birrell To: Perforce Change Reviews Cc: Subject: PERFORCE change 132573 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 05 Jan 2008 19:48:43 -0000 http://perforce.freebsd.org/chv.cgi?CH=132573 Change 132573 by jb@jb_freebsd1 on 2008/01/05 19:48:32 Update to match the amd64 implementation. Affected files ... .. //depot/projects/dtrace/src/sys/i386/i386/local_apic.c#15 edit Differences ... ==== //depot/projects/dtrace/src/sys/i386/i386/local_apic.c#15 (text+ko) ==== @@ -68,7 +68,7 @@ #ifdef KDTRACE_HOOKS #include -cyclic_clock_func_t lapic_cyclic_clock_func; +cyclic_clock_func_t lapic_cyclic_clock_func[MAXCPU]; #endif /* Sanity checks on IDT vectors. */ @@ -676,6 +676,17 @@ (*la->la_timer_count)++; critical_enter(); +#ifdef KDTRACE_HOOKS + /* + * If the DTrace hooks are configured and a callback function + * has been registered, then call it to process the high speed + * timers. + */ + int cpu = PCPU_GET(cpuid); + if (lapic_cyclic_clock_func[cpu] != NULL) + (*lapic_cyclic_clock_func[cpu])(frame); +#endif + /* Fire hardclock at hz. */ la->la_hard_ticks += hz; if (la->la_hard_ticks >= lapic_timer_hz) { @@ -684,19 +695,6 @@ hardclock(TRAPF_USERMODE(frame), TRAPF_PC(frame)); else hardclock_cpu(TRAPF_USERMODE(frame)); - -#ifdef KDTRACE_HOOKS - /* - * If the DTrace hooks are configured and a callback - * function has been registered, then call it to process - * the high speed timers. If this function is registered - * here, then there mustn't be a High Performance Event - * Timer (HPET) on the CPU. A HPET provides higher - * performance timer interrupts. - */ - if (lapic_cyclic_clock_func != NULL) - (*lapic_cyclic_clock_func)(); -#endif } /* Fire statclock at stathz. */ From owner-p4-projects@FreeBSD.ORG Sat Jan 5 21:28:09 2008 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id EBB0216A420; Sat, 5 Jan 2008 21:28:08 +0000 (UTC) Delivered-To: perforce@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id AEFC916A41A for ; Sat, 5 Jan 2008 21:28:08 +0000 (UTC) (envelope-from gonzo@FreeBSD.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id A8EFA13C448 for ; Sat, 5 Jan 2008 21:28:08 +0000 (UTC) (envelope-from gonzo@FreeBSD.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.1/8.14.1) with ESMTP id m05LS8hB030825 for ; Sat, 5 Jan 2008 21:28:08 GMT (envelope-from gonzo@FreeBSD.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.1/8.14.1/Submit) id m05LS8Ni030822 for perforce@freebsd.org; Sat, 5 Jan 2008 21:28:08 GMT (envelope-from gonzo@FreeBSD.org) Date: Sat, 5 Jan 2008 21:28:08 GMT Message-Id: <200801052128.m05LS8Ni030822@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to gonzo@FreeBSD.org using -f From: Oleksandr Tymoshenko To: Perforce Change Reviews Cc: Subject: PERFORCE change 132580 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 05 Jan 2008 21:28:09 -0000 http://perforce.freebsd.org/chv.cgi?CH=132580 Change 132580 by gonzo@gonzo_jeeves on 2008/01/05 21:27:24 o Uncomment cpu_est_clockrate, make it return ENXIO on the moment. Affected files ... .. //depot/projects/mips2-jnpr/src/sys/mips/mips/machdep.c#9 edit Differences ... ==== //depot/projects/mips2-jnpr/src/sys/mips/mips/machdep.c#9 (text+ko) ==== @@ -218,16 +218,13 @@ ; } -#if 0 -/*XXXimp: This seems like a vestage of something in the J! kernel */ /* Get current clock frequency for the given cpu id. */ int cpu_est_clockrate(int cpu_id, uint64_t *rate) { - return (cpu_clock); + return (ENXIO); } -#endif /* * Shutdown the CPU as much as possible From owner-p4-projects@FreeBSD.ORG Sat Jan 5 21:29:10 2008 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 39DC616A41B; Sat, 5 Jan 2008 21:29:10 +0000 (UTC) Delivered-To: perforce@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id F341916A41A for ; Sat, 5 Jan 2008 21:29:09 +0000 (UTC) (envelope-from gonzo@FreeBSD.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id D50F613C461 for ; Sat, 5 Jan 2008 21:29:09 +0000 (UTC) (envelope-from gonzo@FreeBSD.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.1/8.14.1) with ESMTP id m05LT9I5030875 for ; Sat, 5 Jan 2008 21:29:09 GMT (envelope-from gonzo@FreeBSD.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.1/8.14.1/Submit) id m05LT9Co030872 for perforce@freebsd.org; Sat, 5 Jan 2008 21:29:09 GMT (envelope-from gonzo@FreeBSD.org) Date: Sat, 5 Jan 2008 21:29:09 GMT Message-Id: <200801052129.m05LT9Co030872@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to gonzo@FreeBSD.org using -f From: Oleksandr Tymoshenko To: Perforce Change Reviews Cc: Subject: PERFORCE change 132581 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 05 Jan 2008 21:29:10 -0000 http://perforce.freebsd.org/chv.cgi?CH=132581 Change 132581 by gonzo@gonzo_jeeves on 2008/01/05 21:28:15 o Add cpu_thread_free implementation Affected files ... .. //depot/projects/mips2-jnpr/src/sys/mips/mips/vm_machdep.c#5 edit Differences ... ==== //depot/projects/mips2-jnpr/src/sys/mips/mips/vm_machdep.c#5 (text+ko) ==== @@ -203,6 +203,11 @@ } void +cpu_thread_free(struct thread *td) +{ +} + +void cpu_thread_clean(struct thread *td) { } From owner-p4-projects@FreeBSD.ORG Sat Jan 5 21:31:12 2008 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 5D53016A46C; Sat, 5 Jan 2008 21:31:12 +0000 (UTC) Delivered-To: perforce@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 21E7D16A420 for ; Sat, 5 Jan 2008 21:31:12 +0000 (UTC) (envelope-from gonzo@FreeBSD.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id 1BDFC13C442 for ; Sat, 5 Jan 2008 21:31:12 +0000 (UTC) (envelope-from gonzo@FreeBSD.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.1/8.14.1) with ESMTP id m05LVCjg031362 for ; Sat, 5 Jan 2008 21:31:12 GMT (envelope-from gonzo@FreeBSD.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.1/8.14.1/Submit) id m05LVC7n031357 for perforce@freebsd.org; Sat, 5 Jan 2008 21:31:12 GMT (envelope-from gonzo@FreeBSD.org) Date: Sat, 5 Jan 2008 21:31:12 GMT Message-Id: <200801052131.m05LVC7n031357@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to gonzo@FreeBSD.org using -f From: Oleksandr Tymoshenko To: Perforce Change Reviews Cc: Subject: PERFORCE change 132582 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 05 Jan 2008 21:31:12 -0000 http://perforce.freebsd.org/chv.cgi?CH=132582 Change 132582 by gonzo@gonzo_jeeves on 2008/01/05 21:30:40 o thread_user_enter comes with KSE enabled Affected files ... .. //depot/projects/mips2-jnpr/src/sys/mips/mips/trap.c#6 edit Differences ... ==== //depot/projects/mips2-jnpr/src/sys/mips/mips/trap.c#6 (text+ko) ==== @@ -648,8 +648,10 @@ PCPU_LAZY_INC(cnt.v_syscall); if (td->td_ucred != p->p_ucred) cred_update_thread(td); +#ifdef KSE if (p->p_flag & P_SA) thread_user_enter(td); +#endif /* compute next PC after syscall instruction */ tpc = trapframe->pc; /* Remember if restart */ if (DELAYBRANCH(trapframe->cause)) { /* Check BD bit */ From owner-p4-projects@FreeBSD.ORG Sat Jan 5 21:45:28 2008 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 33AA316A418; Sat, 5 Jan 2008 21:45:28 +0000 (UTC) Delivered-To: perforce@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id D46F316A473 for ; Sat, 5 Jan 2008 21:45:27 +0000 (UTC) (envelope-from jb@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id CE2B213C455 for ; Sat, 5 Jan 2008 21:45:27 +0000 (UTC) (envelope-from jb@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.1/8.14.1) with ESMTP id m05LjRQG033700 for ; Sat, 5 Jan 2008 21:45:27 GMT (envelope-from jb@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.1/8.14.1/Submit) id m05LjRTL033696 for perforce@freebsd.org; Sat, 5 Jan 2008 21:45:27 GMT (envelope-from jb@freebsd.org) Date: Sat, 5 Jan 2008 21:45:27 GMT Message-Id: <200801052145.m05LjRTL033696@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to jb@freebsd.org using -f From: John Birrell To: Perforce Change Reviews Cc: Subject: PERFORCE change 132584 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 05 Jan 2008 21:45:28 -0000 http://perforce.freebsd.org/chv.cgi?CH=132584 Change 132584 by jb@jb_freebsd1 on 2008/01/05 21:44:43 Implement DTrace's virtual time. Affected files ... .. //depot/projects/dtrace/src/sys/cddl/dev/dtrace/dtrace_load.c#24 edit .. //depot/projects/dtrace/src/sys/cddl/dev/dtrace/dtrace_unload.c#20 edit .. //depot/projects/dtrace/src/sys/cddl/dev/dtrace/dtrace_vtime.c#3 edit .. //depot/projects/dtrace/src/sys/kern/sched_4bsd.c#29 edit .. //depot/projects/dtrace/src/sys/kern/sched_ule.c#22 edit .. //depot/projects/dtrace/src/sys/sys/dtrace_bsd.h#11 edit .. //depot/projects/dtrace/src/sys/sys/proc.h#29 edit Differences ... ==== //depot/projects/dtrace/src/sys/cddl/dev/dtrace/dtrace_load.c#24 (text+ko) ==== @@ -50,10 +50,8 @@ /* Hook into the trap handler. */ dtrace_trap_func = dtrace_trap; -#ifdef DOODAD /* Hang our hook for thread switches. */ dtrace_vtime_switch_func = dtrace_vtime_switch; -#endif /* * XXX This is a short term hack to avoid having to comment ==== //depot/projects/dtrace/src/sys/cddl/dev/dtrace/dtrace_unload.c#20 (text+ko) ==== @@ -163,10 +163,8 @@ * Reset our hook for thread switches, but ensure that vtime isn't * active first. */ -#ifdef DOODAD dtrace_vtime_active = 0; dtrace_vtime_switch_func = NULL; -#endif /* Unhook from the trap handler. */ dtrace_trap_func = NULL; ==== //depot/projects/dtrace/src/sys/cddl/dev/dtrace/dtrace_vtime.c#3 (text+ko) ==== @@ -27,7 +27,6 @@ void dtrace_vtime_enable(void) { -#ifdef DOODAD dtrace_vtime_state_t state, nstate = 0; do { @@ -50,13 +49,11 @@ } while (dtrace_cas32((uint32_t *)&dtrace_vtime_active, state, nstate) != state); -#endif } void dtrace_vtime_disable(void) { -#ifdef DOODAD dtrace_vtime_state_t state, nstate = 0; do { @@ -79,34 +76,24 @@ } while (dtrace_cas32((uint32_t *)&dtrace_vtime_active, state, nstate) != state); -#endif } void dtrace_vtime_switch(kthread_t *next) { -#ifdef DOODAD dtrace_icookie_t cookie; hrtime_t ts; - if (tnf_tracing_active) { - tnf_thread_switch(next); - - if (dtrace_vtime_active == DTRACE_VTIME_INACTIVE_TNF) - return; - } - cookie = dtrace_interrupt_disable(); ts = dtrace_gethrtime(); - if (curthread->td_dtrace_start != 0) { - curthread->td_dtrace_vtime += ts - curthread->td_dtrace_start; - curthread->td_dtrace_start = 0; + if (curthread->t_dtrace_start != 0) { + curthread->t_dtrace_vtime += ts - curthread->t_dtrace_start; + curthread->t_dtrace_start = 0; } if (next != NULL) - next->td_dtrace_start = ts; + next->t_dtrace_start = ts; dtrace_interrupt_enable(cookie); -#endif } ==== //depot/projects/dtrace/src/sys/kern/sched_4bsd.c#29 (text+ko) ==== @@ -59,6 +59,10 @@ #include #endif +#ifdef KDTRACE_HOOKS +#include +#endif + /* * INVERSE_ESTCPU_WEIGHT is only suitable for statclock() frequencies in * the range 100-256 Hz (approximately). @@ -880,6 +884,16 @@ #endif /* I feel sleepy */ lock_profile_release_lock(&sched_lock.lock_object); +#ifdef KDTRACE + /* + * If DTrace has set the active vtime enum to anything + * other than INACTIVE (0), then it should have set the + * function to call. + */ + if (dtrace_vtime_active) + (*dtrace_vtime_switch_func)(newtd); +#endif + cpu_switch(td, newtd, td->td_lock); lock_profile_obtain_lock_success(&sched_lock.lock_object, 0, 0, __FILE__, __LINE__); ==== //depot/projects/dtrace/src/sys/kern/sched_ule.c#22 (text+ko) ==== @@ -68,6 +68,10 @@ #include #endif +#ifdef KDTRACE_HOOKS +#include +#endif + #include #include @@ -1896,6 +1900,17 @@ #endif lock_profile_release_lock(&TDQ_LOCKPTR(tdq)->lock_object); TDQ_LOCKPTR(tdq)->mtx_lock = (uintptr_t)newtd; + +#ifdef KDTRACE + /* + * If DTrace has set the active vtime enum to anything + * other than INACTIVE (0), then it should have set the + * function to call. + */ + if (dtrace_vtime_active) + (*dtrace_vtime_switch_func)(newtd); +#endif + cpu_switch(td, newtd, mtx); /* * We may return from cpu_switch on a different cpu. However, ==== //depot/projects/dtrace/src/sys/sys/dtrace_bsd.h#11 (text+ko) ==== @@ -33,6 +33,7 @@ /* Forward definitions: */ struct trapframe; +struct thread; /* * Cyclic clock function type definition used to hook the cyclic @@ -65,6 +66,12 @@ /* Global variable in trap.c */ extern dtrace_invop_func_t dtrace_invop_func; +/* Virtual time hook function type. */ +typedef void (*dtrace_vtime_switch_func_t)(struct thread *); + +extern int dtrace_vtime_active; +extern dtrace_vtime_switch_func_t dtrace_vtime_switch_func; + /* * Functions which allow the dtrace module to check that the kernel * hooks have been compiled with sufficient space for it's private ==== //depot/projects/dtrace/src/sys/sys/proc.h#29 (text+ko) ==== @@ -445,11 +445,6 @@ #define TD_SET_RUNQ(td) (td)->td_state = TDS_RUNQ #define TD_SET_CAN_RUN(td) (td)->td_state = TDS_CAN_RUN -typedef void (*dtrace_vtime_switch_func_t)(struct thread *); - -extern int dtrace_vtime_active; -extern dtrace_vtime_switch_func_t dtrace_vtime_switch_func; - /* * An upcall is used when returning to userland. If a thread does not have * an upcall on return to userland the thread exports its context and exits. From owner-p4-projects@FreeBSD.ORG Sat Jan 5 21:58:25 2008 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 2096F16A421; Sat, 5 Jan 2008 21:58:25 +0000 (UTC) Delivered-To: perforce@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id DA7C216A41B for ; Sat, 5 Jan 2008 21:58:24 +0000 (UTC) (envelope-from jb@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id D56DD13C442 for ; Sat, 5 Jan 2008 21:58:24 +0000 (UTC) (envelope-from jb@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.1/8.14.1) with ESMTP id m05LwOBS035319 for ; Sat, 5 Jan 2008 21:58:24 GMT (envelope-from jb@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.1/8.14.1/Submit) id m05LwOIo035316 for perforce@freebsd.org; Sat, 5 Jan 2008 21:58:24 GMT (envelope-from jb@freebsd.org) Date: Sat, 5 Jan 2008 21:58:24 GMT Message-Id: <200801052158.m05LwOIo035316@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to jb@freebsd.org using -f From: John Birrell To: Perforce Change Reviews Cc: Subject: PERFORCE change 132586 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 05 Jan 2008 21:58:25 -0000 http://perforce.freebsd.org/chv.cgi?CH=132586 Change 132586 by jb@jb_freebsd1 on 2008/01/05 21:57:24 Update to match the amd64 version. Affected files ... .. //depot/projects/dtrace/src/sys/cddl/dev/dtrace/i386/dtrace_subr.c#6 edit Differences ... ==== //depot/projects/dtrace/src/sys/cddl/dev/dtrace/i386/dtrace_subr.c#6 (text+ko) ==== @@ -163,52 +163,42 @@ (*func)(0, kernelbase); } -#ifdef DOODAD -static int -dtrace_xcall_func(dtrace_xcall_t func, void *arg) -{ - (*func)(arg); - - return (0); -} -#endif void dtrace_xcall(processorid_t cpu, dtrace_xcall_t func, void *arg) { -#ifdef DOODAD - cpuset_t set; + cpumask_t cpus; + + critical_enter(); + + if (cpu == DTRACE_CPUALL) + cpus = all_cpus; + else + cpus = (cpumask_t) (1 << cpu); - CPUSET_ZERO(set); + /* If the current CPU is in the set, call the function directly: */ + if ((cpus & (1 << curcpu)) != 0) { + (*func)(arg); - if (cpu == DTRACE_CPUALL) { - CPUSET_ALL(set); - } else { - CPUSET_ADD(set, cpu); + /* Mask the current CPU from the set */ + cpus &= ~(1 << curcpu); } - kpreempt_disable(); - xc_sync((xc_arg_t)func, (xc_arg_t)arg, 0, X_CALL_HIPRI, set, - (xc_func_t)dtrace_xcall_func); - kpreempt_enable(); -#else - critical_enter(); - (*func)(arg); + /* If there are any CPUs in the set, cross-call to those CPUs */ + if (cpus != 0) + smp_rendezvous_cpus(cpus, NULL, func, smp_no_rendevous_barrier, arg); + critical_exit(); -#endif } -#ifdef DOODAD void dtrace_sync_func(void) -{} -#endif +{ +} void dtrace_sync(void) { -#ifdef DOODAD dtrace_xcall(DTRACE_CPUALL, (dtrace_xcall_t)dtrace_sync_func, NULL); -#endif } #ifdef DOODAD From owner-p4-projects@FreeBSD.ORG Sat Jan 5 21:59:26 2008 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 6555E16A469; Sat, 5 Jan 2008 21:59:26 +0000 (UTC) Delivered-To: perforce@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 2AC7116A41A for ; Sat, 5 Jan 2008 21:59:26 +0000 (UTC) (envelope-from jb@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id 24F5D13C458 for ; Sat, 5 Jan 2008 21:59:26 +0000 (UTC) (envelope-from jb@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.1/8.14.1) with ESMTP id m05LxQ09035370 for ; Sat, 5 Jan 2008 21:59:26 GMT (envelope-from jb@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.1/8.14.1/Submit) id m05LxPAh035367 for perforce@freebsd.org; Sat, 5 Jan 2008 21:59:25 GMT (envelope-from jb@freebsd.org) Date: Sat, 5 Jan 2008 21:59:25 GMT Message-Id: <200801052159.m05LxPAh035367@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to jb@freebsd.org using -f From: John Birrell To: Perforce Change Reviews Cc: Subject: PERFORCE change 132587 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 05 Jan 2008 21:59:26 -0000 http://perforce.freebsd.org/chv.cgi?CH=132587 Change 132587 by jb@jb_freebsd1 on 2008/01/05 21:59:02 Update to match the amd64 implementation. Affected files ... .. //depot/projects/dtrace/src/sys/cddl/i386/cyclic_machdep.c#7 edit Differences ... ==== //depot/projects/dtrace/src/sys/cddl/i386/cyclic_machdep.c#7 (text+ko) ==== @@ -1,5 +1,5 @@ /*- - * Copyright 2006 John Birrell + * Copyright 2007-2008 John Birrell * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions @@ -26,193 +26,104 @@ * */ -#include -#include -#include -#include -#include -#include -#include -#include - -extern cyclic_clock_func_t lapic_cyclic_clock_func; - -static cyb_arg_t configure(cpu_t *); -static void unconfigure(cyb_arg_t); static void enable(cyb_arg_t); static void disable(cyb_arg_t); static void reprogram(cyb_arg_t, hrtime_t); -static void softint(cyb_arg_t, cyc_level_t); -static cyc_cookie_t set_level(cyb_arg_t, cyc_level_t); -static void restore_level(cyb_arg_t, cyc_cookie_t); static void xcall(cyb_arg_t, cpu_t *, cyc_func_t, void *); -static void suspend(cyb_arg_t); -static void resume(cyb_arg_t); static cyc_backend_t be = { - configure, - unconfigure, + NULL, /* cyb_configure */ + NULL, /* cyb_unconfigure */ enable, disable, reprogram, - softint, - set_level, - restore_level, xcall, - suspend, - resume, NULL /* cyb_arg_t cyb_arg */ }; -static hrtime_t resolution; -static int hpet_present = 0; -static void *cyclic_lock_ih; -static void *cyclic_low_ih; - -/* - * Software interrupt callbacks. - */ static void -cyclic_swi_low(void *dummy) +cyclic_ap_start(void *dummy) { - cpu_t *c = pcpu_find(curcpu); - - c->pc_intr_actv |= (1 << CY_LOW_LEVEL); - - cyclic_softint(c, CY_LOW_LEVEL); - - c->pc_intr_actv &= ~(1 << CY_LOW_LEVEL); + /* Initialise the rest of the CPUs. */ + cyclic_mp_init(); } -static void -cyclic_swi_lock(void *dummy) -{ - cpu_t *c = pcpu_find(curcpu); - - c->pc_intr_actv |= (1 << CY_LOCK_LEVEL); +SYSINIT(cyclic_ap_start, SI_SUB_SMP, SI_ORDER_ANY, cyclic_ap_start, NULL); - cyclic_softint(c, CY_LOCK_LEVEL); - - c->pc_intr_actv &= ~(1 << CY_LOCK_LEVEL); -} - /* * Machine dependent cyclic subsystem initialisation. */ -void -cyclic_machdep_init() +static void +cyclic_machdep_init(void) { - /* Default the resolution. */ - resolution = ticks * 1000000; - - /* XXX Need to check here if the HPET is available. */ - - /* - * Add a software interrupt handlers for low priority cyclic - * events. - */ - swi_add(&clk_intr_event, "low cyclic", cyclic_swi_low, NULL, - SWI_TQ, 0, &cyclic_low_ih); - swi_add(&clk_intr_event, "lock cyclic", cyclic_swi_lock, NULL, - SWI_TQ_FAST, 0, &cyclic_lock_ih); - /* Register the cyclic backend. */ - cyclic_init(&be, resolution); - - /* If the HPET isn't present, use the slow method. */ - if (!hpet_present) - /* Register the cyclic clock callback function. */ - lapic_cyclic_clock_func = cyclic_clock; + cyclic_init(&be); } -void -cyclic_machdep_uninit() +static void +cyclic_machdep_uninit(void) { - /* Reset the cyclic clock callback hook. */ - lapic_cyclic_clock_func = NULL; + int i; + + for (i = 0; i <= mp_maxid; i++) + /* Reset the cyclic clock callback hook. */ + lapic_cyclic_clock_func[i] = NULL; /* De-register the cyclic backend. */ cyclic_uninit(); +} - /* Remove the software interrupt handlers. */ - swi_remove(cyclic_low_ih); - swi_remove(cyclic_lock_ih); -} +static hrtime_t exp_due[SMP_MAXCPU]; -static cyb_arg_t configure(cpu_t *c) +/* + * This function is the one registered by the machine dependent + * initialiser as the callback for high speed timer events. + */ +static void +cyclic_clock(struct trapframe *frame) { - /* XXX Configure the HPET if it is present. */ + cpu_t *c = &solaris_cpu[curcpu]; - return (NULL); -} + if (c->cpu_cyclic != NULL && gethrtime() >= exp_due[curcpu]) { + if (TRAPF_USERMODE(frame)) { + c->cpu_profile_pc = 0; + c->cpu_profile_upc = TRAPF_PC(frame); + } else { + c->cpu_profile_pc = TRAPF_PC(frame); + c->cpu_profile_upc = 0; + } -static void unconfigure(cyb_arg_t arg) -{ - /* XXX Unconfigure the HPET if it is present. */ - + /* Fire any timers that are due. */ + cyclic_fire(c); + } } static void enable(cyb_arg_t arg) { - /* XXX Enable the HPET if it is present. */ + /* Register the cyclic clock callback function. */ + lapic_cyclic_clock_func[curcpu] = cyclic_clock; } static void disable(cyb_arg_t arg) { - /* XXX Disable the HPET if it is present. */ + /* Reset the cyclic clock callback function. */ + lapic_cyclic_clock_func[curcpu] = NULL; } -static void reprogram(cyb_arg_t arg, hrtime_t interval) +static void reprogram(cyb_arg_t arg, hrtime_t exp) { - /* XXX Reprogram the HPET if it is present. */ + exp_due[curcpu] = exp; } -static void softint(cyb_arg_t arg, cyc_level_t level) -{ - /* - * Schedule the software interrupt processing at the - * requested level. - */ - switch (level) { - case CY_LOW_LEVEL: - swi_sched(cyclic_low_ih, 0); - break; - case CY_LOCK_LEVEL: - swi_sched(cyclic_lock_ih, 0); - break; - default: - printf("%s:%s(%d): unexpected soft level %d\n",__FUNCTION__,__FILE__,__LINE__,level); - break; - } -} - -static cyc_cookie_t set_level(cyb_arg_t arg, cyc_level_t level) -{ - return (intr_disable()); -} - -static void restore_level(cyb_arg_t arg, cyc_cookie_t cookie) -{ - intr_restore(cookie); -} - static void xcall(cyb_arg_t arg, cpu_t *c, cyc_func_t func, void *param) { /* * If the target CPU is the current one, just call the * function. This covers the non-SMP case. */ - if (c == pcpu_find(curcpu)) + if (c == &solaris_cpu[curcpu]) (*func)(param); else - printf("%s:%s(%d): Need to have a way to execute the function on another CPU\n",__FUNCTION__,__FILE__,__LINE__); -} - -static void suspend(cyb_arg_t arg) -{ + smp_rendezvous_cpus((cpumask_t) (1 << c->cpuid), NULL, + func, smp_no_rendevous_barrier, param); } - -static void resume(cyb_arg_t arg) -{ -} - From owner-p4-projects@FreeBSD.ORG Sat Jan 5 22:03:31 2008 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id DD75516A41B; Sat, 5 Jan 2008 22:03:30 +0000 (UTC) Delivered-To: perforce@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id A301F16A421 for ; Sat, 5 Jan 2008 22:03:30 +0000 (UTC) (envelope-from jb@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id 85E1D13C458 for ; Sat, 5 Jan 2008 22:03:30 +0000 (UTC) (envelope-from jb@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.1/8.14.1) with ESMTP id m05M3UdH037798 for ; Sat, 5 Jan 2008 22:03:30 GMT (envelope-from jb@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.1/8.14.1/Submit) id m05M3U8p037795 for perforce@freebsd.org; Sat, 5 Jan 2008 22:03:30 GMT (envelope-from jb@freebsd.org) Date: Sat, 5 Jan 2008 22:03:30 GMT Message-Id: <200801052203.m05M3U8p037795@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to jb@freebsd.org using -f From: John Birrell To: Perforce Change Reviews Cc: Subject: PERFORCE change 132588 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 05 Jan 2008 22:03:31 -0000 http://perforce.freebsd.org/chv.cgi?CH=132588 Change 132588 by jb@jb_freebsd1 on 2008/01/05 22:03:08 Add the DTrace hooks. Affected files ... .. //depot/projects/dtrace/src/sys/i386/conf/GENERIC#27 edit Differences ... ==== //depot/projects/dtrace/src/sys/i386/conf/GENERIC#27 (text+ko) ==== @@ -62,6 +62,7 @@ options KBD_INSTALL_CDEV # install a CDEV entry in /dev options STOP_NMI # Stop CPUS using NMI instead of IPI options AUDIT # Security event auditing +options KDTRACE_HOOKS # DTrace hooks required to load DTrace modules # Debugging for use in -current options KDB # Enable kernel debugger support. From owner-p4-projects@FreeBSD.ORG Sat Jan 5 22:07:35 2008 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 78AEB16A47B; Sat, 5 Jan 2008 22:07:35 +0000 (UTC) Delivered-To: perforce@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 3D8FD16A420 for ; Sat, 5 Jan 2008 22:07:35 +0000 (UTC) (envelope-from jb@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id 1E35D13C4E1 for ; Sat, 5 Jan 2008 22:07:35 +0000 (UTC) (envelope-from jb@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.1/8.14.1) with ESMTP id m05M7YGd037947 for ; Sat, 5 Jan 2008 22:07:34 GMT (envelope-from jb@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.1/8.14.1/Submit) id m05M7YoP037944 for perforce@freebsd.org; Sat, 5 Jan 2008 22:07:34 GMT (envelope-from jb@freebsd.org) Date: Sat, 5 Jan 2008 22:07:34 GMT Message-Id: <200801052207.m05M7YoP037944@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to jb@freebsd.org using -f From: John Birrell To: Perforce Change Reviews Cc: Subject: PERFORCE change 132589 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 05 Jan 2008 22:07:35 -0000 http://perforce.freebsd.org/chv.cgi?CH=132589 Change 132589 by jb@jb_freebsd1 on 2008/01/05 22:07:32 Get the dates right. Doh. Affected files ... .. //depot/projects/dtrace/src/sys/cddl/i386/cyclic_machdep.c#8 edit Differences ... ==== //depot/projects/dtrace/src/sys/cddl/i386/cyclic_machdep.c#8 (text+ko) ==== @@ -1,5 +1,5 @@ /*- - * Copyright 2007-2008 John Birrell + * Copyright 2006-2008 John Birrell * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions From owner-p4-projects@FreeBSD.ORG Sat Jan 5 22:19:50 2008 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 02C8B16A420; Sat, 5 Jan 2008 22:19:50 +0000 (UTC) Delivered-To: perforce@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id BCDD516A418 for ; Sat, 5 Jan 2008 22:19:49 +0000 (UTC) (envelope-from jb@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id B8C2813C47E for ; Sat, 5 Jan 2008 22:19:49 +0000 (UTC) (envelope-from jb@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.1/8.14.1) with ESMTP id m05MJnOq039530 for ; Sat, 5 Jan 2008 22:19:49 GMT (envelope-from jb@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.1/8.14.1/Submit) id m05MJno7039527 for perforce@freebsd.org; Sat, 5 Jan 2008 22:19:49 GMT (envelope-from jb@freebsd.org) Date: Sat, 5 Jan 2008 22:19:49 GMT Message-Id: <200801052219.m05MJno7039527@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to jb@freebsd.org using -f From: John Birrell To: Perforce Change Reviews Cc: Subject: PERFORCE change 132590 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 05 Jan 2008 22:19:50 -0000 http://perforce.freebsd.org/chv.cgi?CH=132590 Change 132590 by jb@jb_freebsd1 on 2008/01/05 22:19:41 Update the Function Boundary Trace (fbt) provider makefile. Affected files ... .. //depot/projects/dtrace/src/sys/modules/dtrace/fbt/Makefile#3 edit Differences ... ==== //depot/projects/dtrace/src/sys/modules/dtrace/fbt/Makefile#3 (text+ko) ==== @@ -4,12 +4,10 @@ KMOD= fbt SRCS= fbt.c -SRCS+= bus_if.h device_if.h vnode_if.h +SRCS+= vnode_if.h -CFLAGS+= -I${.CURDIR}/../../../cddl/dev/fbt \ +CFLAGS+= -I${.CURDIR}/../../../compat/opensolaris \ -I${.CURDIR}/../../../contrib/opensolaris/uts/common \ - -I${.CURDIR}/../../../contrib/opensolaris/compat \ - -I${.CURDIR}/../../../contrib \ -I${.CURDIR}/../../.. .include From owner-p4-projects@FreeBSD.ORG Sat Jan 5 22:27:01 2008 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 7B59716A419; Sat, 5 Jan 2008 22:27:01 +0000 (UTC) Delivered-To: perforce@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 4114516A418 for ; Sat, 5 Jan 2008 22:27:01 +0000 (UTC) (envelope-from jb@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id 2553813C458 for ; Sat, 5 Jan 2008 22:27:01 +0000 (UTC) (envelope-from jb@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.1/8.14.1) with ESMTP id m05MR11J040903 for ; Sat, 5 Jan 2008 22:27:01 GMT (envelope-from jb@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.1/8.14.1/Submit) id m05MR17w040900 for perforce@freebsd.org; Sat, 5 Jan 2008 22:27:01 GMT (envelope-from jb@freebsd.org) Date: Sat, 5 Jan 2008 22:27:01 GMT Message-Id: <200801052227.m05MR17w040900@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to jb@freebsd.org using -f From: John Birrell To: Perforce Change Reviews Cc: Subject: PERFORCE change 132591 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 05 Jan 2008 22:27:01 -0000 http://perforce.freebsd.org/chv.cgi?CH=132591 Change 132591 by jb@jb_freebsd1 on 2008/01/05 22:26:00 Build the Functon Boundary Trace (fbt) provider on amd64 and i386. Remove the Statically Defined Trace (sdt) provider for now. Affected files ... .. //depot/projects/dtrace/src/sys/modules/dtrace/Makefile#21 edit Differences ... ==== //depot/projects/dtrace/src/sys/modules/dtrace/Makefile#21 (text+ko) ==== @@ -9,9 +9,10 @@ prototype \ systrace -.if ${MACHINE_ARCH} == "i386" -SUBDIR+= fbt \ - sdt +.if ${MACHINE_ARCH} == "amd64" +SUBDIR+= fbt +.elif ${MACHINE_ARCH} == "i386" +SUBDIR+= fbt .endif .include From owner-p4-projects@FreeBSD.ORG Sat Jan 5 22:30:05 2008 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id DA32C16A421; Sat, 5 Jan 2008 22:30:04 +0000 (UTC) Delivered-To: perforce@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 9F86416A419 for ; Sat, 5 Jan 2008 22:30:04 +0000 (UTC) (envelope-from jb@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id 9BB2813C459 for ; Sat, 5 Jan 2008 22:30:04 +0000 (UTC) (envelope-from jb@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.1/8.14.1) with ESMTP id m05MU4bb041034 for ; Sat, 5 Jan 2008 22:30:04 GMT (envelope-from jb@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.1/8.14.1/Submit) id m05MU4wr041031 for perforce@freebsd.org; Sat, 5 Jan 2008 22:30:04 GMT (envelope-from jb@freebsd.org) Date: Sat, 5 Jan 2008 22:30:04 GMT Message-Id: <200801052230.m05MU4wr041031@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to jb@freebsd.org using -f From: John Birrell To: Perforce Change Reviews Cc: Subject: PERFORCE change 132592 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 05 Jan 2008 22:30:05 -0000 http://perforce.freebsd.org/chv.cgi?CH=132592 Change 132592 by jb@jb_freebsd1 on 2008/01/05 22:29:33 Add some more DTrace fields to the Solaris-compatible per-cpu structure. Affected files ... .. //depot/projects/dtrace/src/sys/compat/opensolaris/sys/cpuvar.h#7 edit Differences ... ==== //depot/projects/dtrace/src/sys/compat/opensolaris/sys/cpuvar.h#7 (text+ko) ==== @@ -41,6 +41,9 @@ uint_t cpu_intr_actv; uintptr_t cpu_profile_pc; uintptr_t cpu_profile_upc; + uintptr_t cpu_dtrace_caller; /* DTrace: caller, if any */ + hrtime_t cpu_dtrace_chillmark; /* DTrace: chill mark time */ + hrtime_t cpu_dtrace_chilled; /* DTrace: total chill time */ } solaris_cpu_t; /* Some code may choose to redefine this if pcpu_t would be more useful. */ From owner-p4-projects@FreeBSD.ORG Sat Jan 5 22:41:16 2008 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 6CC4D16A420; Sat, 5 Jan 2008 22:41:16 +0000 (UTC) Delivered-To: perforce@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 323C916A418 for ; Sat, 5 Jan 2008 22:41:16 +0000 (UTC) (envelope-from jb@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id 2F0A013C458 for ; Sat, 5 Jan 2008 22:41:16 +0000 (UTC) (envelope-from jb@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.1/8.14.1) with ESMTP id m05MfGRH042971 for ; Sat, 5 Jan 2008 22:41:16 GMT (envelope-from jb@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.1/8.14.1/Submit) id m05MfF3l042966 for perforce@freebsd.org; Sat, 5 Jan 2008 22:41:15 GMT (envelope-from jb@freebsd.org) Date: Sat, 5 Jan 2008 22:41:15 GMT Message-Id: <200801052241.m05MfF3l042966@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to jb@freebsd.org using -f From: John Birrell To: Perforce Change Reviews Cc: Subject: PERFORCE change 132593 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 05 Jan 2008 22:41:16 -0000 http://perforce.freebsd.org/chv.cgi?CH=132593 Change 132593 by jb@jb_freebsd1 on 2008/01/05 22:41:03 Rough update to the current design. It compiles and links. WIP. Affected files ... .. //depot/projects/dtrace/src/sys/cddl/dev/fbt/fbt.c#5 edit Differences ... ==== //depot/projects/dtrace/src/sys/cddl/dev/fbt/fbt.c#5 (text+ko) ==== @@ -18,7 +18,7 @@ * * CDDL HEADER END * - * Portions Copyright 2006 John Birrell jb@freebsd.org + * Portions Copyright 2006-2008 John Birrell jb@freebsd.org * * $FreeBSD$ * @@ -32,7 +32,6 @@ #include #include #include -#include #include #include #include @@ -60,7 +59,7 @@ #include #include -#include +#include MALLOC_DECLARE(M_FBT); MALLOC_DEFINE(M_FBT, "fbt", "Function Boundary Tracing"); @@ -168,7 +167,7 @@ static int fbt_invop(uintptr_t addr, uintptr_t *stack, uintptr_t rval) { - struct pcpu *cpu = pcpu_find(curcpu); + solaris_cpu_t *cpu = &solaris_cpu[curcpu]; uintptr_t stack0, stack1, stack2, stack3, stack4; fbt_probe_t *fbt = fbt_probetab[FBT_ADDR2NDX(addr)]; @@ -185,7 +184,7 @@ * disabled. */ DTRACE_CPUFLAG_SET(CPU_DTRACE_NOFAULT); - cpu->pc_dtrace_caller = stack[i++]; + cpu->cpu_dtrace_caller = stack[i++]; stack0 = stack[i++]; stack1 = stack[i++]; stack2 = stack[i++]; @@ -197,11 +196,11 @@ dtrace_probe(fbt->fbtp_id, stack0, stack1, stack2, stack3, stack4); - cpu->pc_dtrace_caller = 0; + cpu->cpu_dtrace_caller = 0; } else { dtrace_probe(fbt->fbtp_id, fbt->fbtp_roffset, rval, 0, 0, 0); - cpu->pc_dtrace_caller = 0; + cpu->cpu_dtrace_caller = 0; } return (fbt->fbtp_rval); @@ -232,6 +231,7 @@ return (0); } +#ifdef DOODAD /* * Still trying to narrow down why some of these things are * being called from the probe context. At the moment I suspect @@ -269,6 +269,7 @@ strncmp(name, "spinlock", 8) == 0 || strcmp(name, "pcpu_find") == 0) /* used in stack() impl */ return (0); +#endif /* * These filters are set by sysctl to help debugging the initial @@ -595,6 +596,10 @@ static void fbt_load(void *dummy) { + /* Create the /dev/dtrace/fbt entry. */ + fbt_cdev = make_dev(&fbt_cdevsw, 0, UID_ROOT, GID_WHEEL, 0600, + "dtrace/fbt"); + /* Default the probe table size if not specified. */ if (fbt_probetab_size == 0) fbt_probetab_size = FBT_PROBETAB_SIZE; @@ -644,13 +649,9 @@ switch (type) { case MOD_LOAD: - /* Create the /dev/dtrace/fbt entry. */ - fbt_cdev = make_dev(&fbt_cdevsw, 0, UID_ROOT, GID_WHEEL, 0600, - "dtrace/fbt"); break; case MOD_UNLOAD: - error = fbt_unload(); break; case MOD_SHUTDOWN: @@ -672,8 +673,10 @@ return (0); } -SYSINIT(fbt_load, SI_SUB_DTRACE_PROVIDER, SI_ORDER_ANY, fbt_load, NULL) +SYSINIT(fbt_load, SI_SUB_DTRACE_PROVIDER, SI_ORDER_ANY, fbt_load, NULL); +SYSUNINIT(fbt_unload, SI_SUB_DTRACE_PROVIDER, SI_ORDER_ANY, fbt_unload, NULL); DEV_MODULE(fbt, fbt_modevent, NULL); MODULE_VERSION(fbt, 1); MODULE_DEPEND(fbt, dtrace, 1, 1, 1); +MODULE_DEPEND(fbt, opensolaris, 1, 1, 1);