CVS commit: src/sys/arch/x86/include
Module Name:src Committed By: jym Date: Wed Nov 23 01:16:56 UTC 2011 Modified Files: src/sys/arch/x86/include: pmap.h Log Message: No more users of xpmap_update(). Use pmap_pte_*() functions now. To generate a diff of this commit: cvs rdiff -u -r1.47 -r1.48 src/sys/arch/x86/include/pmap.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/x86/include/pmap.h diff -u src/sys/arch/x86/include/pmap.h:1.47 src/sys/arch/x86/include/pmap.h:1.48 --- src/sys/arch/x86/include/pmap.h:1.47 Wed Nov 23 00:56:56 2011 +++ src/sys/arch/x86/include/pmap.h Wed Nov 23 01:16:55 2011 @@ -1,4 +1,4 @@ -/* $NetBSD: pmap.h,v 1.47 2011/11/23 00:56:56 jym Exp $ */ +/* $NetBSD: pmap.h,v 1.48 2011/11/23 01:16:55 jym Exp $ */ /* * Copyright (c) 1997 Charles D. Cranor and Washington University. @@ -440,22 +440,6 @@ xpmap_ptetomach(pt_entry_t *pte) return (paddr_t) (((*up_pte) & PG_FRAME) + (((vaddr_t) pte) & (~PG_FRAME & ~VA_SIGN_MASK))); } -/* - * xpmap_update() - * Update an active pt entry with Xen - * Equivalent to *pte = npte - */ - -static __inline void -xpmap_update (pt_entry_t *pte, pt_entry_t npte) -{ -int s = splvm(); - -xpq_queue_pte_update(xpmap_ptetomach(pte), npte); -xpq_flush_queue(); -splx(s); -} - /* Xen helpers to change bits of a pte */ #define XPMAP_UPDATE_DIRECT 1 /* Update direct map entry flags too */
CVS commit: src/sys/arch/amd64/amd64
Module Name:src Committed By: jym Date: Wed Nov 23 01:15:02 UTC 2011 Modified Files: src/sys/arch/amd64/amd64: db_memrw.c Log Message: Kill dependency to xpmap_update(), and use setbits/clearbits to update kernel PTE rights. To generate a diff of this commit: cvs rdiff -u -r1.8 -r1.9 src/sys/arch/amd64/amd64/db_memrw.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/amd64/amd64/db_memrw.c diff -u src/sys/arch/amd64/amd64/db_memrw.c:1.8 src/sys/arch/amd64/amd64/db_memrw.c:1.9 --- src/sys/arch/amd64/amd64/db_memrw.c:1.8 Mon Dec 20 00:25:24 2010 +++ src/sys/arch/amd64/amd64/db_memrw.c Wed Nov 23 01:15:02 2011 @@ -1,4 +1,4 @@ -/* $NetBSD: db_memrw.c,v 1.8 2010/12/20 00:25:24 matt Exp $ */ +/* $NetBSD: db_memrw.c,v 1.9 2011/11/23 01:15:02 jym Exp $ */ /*- * Copyright (c) 1996, 2000 The NetBSD Foundation, Inc. @@ -51,9 +51,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: db_memrw.c,v 1.8 2010/12/20 00:25:24 matt Exp $"); - -#include "opt_xen.h" +__KERNEL_RCSID(0, "$NetBSD: db_memrw.c,v 1.9 2011/11/23 01:15:02 jym Exp $"); #include #include @@ -99,7 +97,7 @@ db_read_bytes(vaddr_t addr, size_t size, static void db_write_text(vaddr_t addr, size_t size, const char *data) { - pt_entry_t *pte, oldpte, tmppte; + pt_entry_t *ppte, pte; vaddr_t pgva; size_t limit; char *dst; @@ -113,10 +111,10 @@ db_write_text(vaddr_t addr, size_t size, /* * Get the PTE for the page. */ - pte = kvtopte(addr); - oldpte = *pte; + ppte = kvtopte(addr); + pte = *ppte; - if ((oldpte & PG_V) == 0) { + if ((pte & PG_V) == 0) { printf(" address %p not a valid page\n", dst); return; } @@ -124,7 +122,7 @@ db_write_text(vaddr_t addr, size_t size, /* * Get the VA for the page. */ - if (oldpte & PG_PS) + if (pte & PG_PS) pgva = (vaddr_t)dst & PG_LGFRAME; else pgva = x86_trunc_page(dst); @@ -134,7 +132,7 @@ db_write_text(vaddr_t addr, size_t size, * with this mapping and subtract it from the * total size. */ - if (oldpte & PG_PS) + if (pte & PG_PS) limit = NBPD_L2 - ((vaddr_t)dst & (NBPD_L2 - 1)); else limit = PAGE_SIZE - ((vaddr_t)dst & PGOFSET); @@ -142,12 +140,11 @@ db_write_text(vaddr_t addr, size_t size, limit = size; size -= limit; - tmppte = (oldpte & ~PG_KR) | PG_KW; -#ifdef XEN - xpmap_update(pte, tmppte); -#else - *pte = tmppte; -#endif + /* + * Make the kernel text page writable. + */ + pmap_pte_clearbits(ppte, PG_KR); + pmap_pte_setbits(ppte, PG_KW); pmap_update_pg(pgva); /* @@ -158,14 +155,10 @@ db_write_text(vaddr_t addr, size_t size, *dst++ = *data++; /* - * Restore the old PTE. + * Turn the page back to read-only. */ -#ifdef XEN - xpmap_update(pte, oldpte); -#else - *pte = oldpte; -#endif - + pmap_pte_clearbits(ppte, PG_KW); + pmap_pte_setbits(ppte, PG_KR); pmap_update_pg(pgva); } while (size != 0);
CVS commit: src/sys/uvm
Module Name:src Committed By: matt Date: Wed Nov 23 01:07:50 UTC 2011 Modified Files: src/sys/uvm: uvm_glue.c Log Message: When allocating a page for a kernel stack and PMAP_ALLOC_POOLPAGE is defined, use it. (allows a MIPS N32 kernel to boot when there is memory outside of KSEG0). To generate a diff of this commit: cvs rdiff -u -r1.151 -r1.152 src/sys/uvm/uvm_glue.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/uvm/uvm_glue.c diff -u src/sys/uvm/uvm_glue.c:1.151 src/sys/uvm/uvm_glue.c:1.152 --- src/sys/uvm/uvm_glue.c:1.151 Sat Jul 2 01:26:29 2011 +++ src/sys/uvm/uvm_glue.c Wed Nov 23 01:07:50 2011 @@ -1,4 +1,4 @@ -/* $NetBSD: uvm_glue.c,v 1.151 2011/07/02 01:26:29 matt Exp $ */ +/* $NetBSD: uvm_glue.c,v 1.152 2011/11/23 01:07:50 matt Exp $ */ /* * Copyright (c) 1997 Charles D. Cranor and Washington University. @@ -62,7 +62,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: uvm_glue.c,v 1.151 2011/07/02 01:26:29 matt Exp $"); +__KERNEL_RCSID(0, "$NetBSD: uvm_glue.c,v 1.152 2011/11/23 01:07:50 matt Exp $"); #include "opt_kgdb.h" #include "opt_kstack.h" @@ -245,8 +245,13 @@ uarea_poolpage_alloc(struct pool *pp, in struct vm_page *pg; vaddr_t va; +#if defined(PMAP_ALLOC_POOLPAGE) + pg = PMAP_ALLOC_POOLPAGE( + ((flags & PR_WAITOK) == 0 ? UVM_KMF_NOWAIT : 0)); +#else pg = uvm_pagealloc(NULL, 0, NULL, ((flags & PR_WAITOK) == 0 ? UVM_KMF_NOWAIT : 0)); +#endif if (pg == NULL) return NULL; va = PMAP_MAP_POOLPAGE(VM_PAGE_TO_PHYS(pg));
CVS commit: src/sys/uvm
Module Name:src Committed By: matt Date: Wed Nov 23 01:00:52 UTC 2011 Modified Files: src/sys/uvm: uvm_map.c Log Message: When allocating pages for kernel map entries and PMAP_ALLOC_POOLPAGE is defined, use it. (allows a MIPS N32 kernel to boot when there is memory outside of KSEG0). To generate a diff of this commit: cvs rdiff -u -r1.305 -r1.306 src/sys/uvm/uvm_map.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/uvm/uvm_map.c diff -u src/sys/uvm/uvm_map.c:1.305 src/sys/uvm/uvm_map.c:1.306 --- src/sys/uvm/uvm_map.c:1.305 Tue Sep 27 01:02:39 2011 +++ src/sys/uvm/uvm_map.c Wed Nov 23 01:00:52 2011 @@ -1,4 +1,4 @@ -/* $NetBSD: uvm_map.c,v 1.305 2011/09/27 01:02:39 jym Exp $ */ +/* $NetBSD: uvm_map.c,v 1.306 2011/11/23 01:00:52 matt Exp $ */ /* * Copyright (c) 1997 Charles D. Cranor and Washington University. @@ -66,7 +66,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: uvm_map.c,v 1.305 2011/09/27 01:02:39 jym Exp $"); +__KERNEL_RCSID(0, "$NetBSD: uvm_map.c,v 1.306 2011/11/23 01:00:52 matt Exp $"); #include "opt_ddb.h" #include "opt_uvmhist.h" @@ -4710,8 +4710,13 @@ again: * for simplicity, always allocate one page chunk of them at once. */ +#ifdef PMAP_ALLOC_POOLPAGE + pg = PMAP_ALLOC_POOLPAGE( + (flags & UVM_KMF_NOWAIT) != 0 ? UVM_PGA_USERESERVE : 0); +#else pg = uvm_pagealloc(NULL, 0, NULL, (flags & UVM_KMF_NOWAIT) != 0 ? UVM_PGA_USERESERVE : 0); +#endif if (__predict_false(pg == NULL)) { if (flags & UVM_FLAG_NOWAIT) return NULL;
CVS commit: src/sys/arch
Module Name:src Committed By: jym Date: Wed Nov 23 00:56:56 UTC 2011 Modified Files: src/sys/arch/x86/include: pmap.h src/sys/arch/xen/include: xenpmap.h src/sys/arch/xen/x86: xen_pmap.c Log Message: Move Xen-specific functions to Xen pmap. Requested by cherry@. Un'ifdef XEN in xen_pmap.c, it is always defined there. To generate a diff of this commit: cvs rdiff -u -r1.46 -r1.47 src/sys/arch/x86/include/pmap.h cvs rdiff -u -r1.31 -r1.32 src/sys/arch/xen/include/xenpmap.h cvs rdiff -u -r1.9 -r1.10 src/sys/arch/xen/x86/xen_pmap.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/x86/include/pmap.h diff -u src/sys/arch/x86/include/pmap.h:1.46 src/sys/arch/x86/include/pmap.h:1.47 --- src/sys/arch/x86/include/pmap.h:1.46 Sun Nov 20 19:41:27 2011 +++ src/sys/arch/x86/include/pmap.h Wed Nov 23 00:56:56 2011 @@ -1,4 +1,4 @@ -/* $NetBSD: pmap.h,v 1.46 2011/11/20 19:41:27 jym Exp $ */ +/* $NetBSD: pmap.h,v 1.47 2011/11/23 00:56:56 jym Exp $ */ /* * Copyright (c) 1997 Charles D. Cranor and Washington University. @@ -456,24 +456,14 @@ xpmap_update (pt_entry_t *pte, pt_entry_ splx(s); } - /* Xen helpers to change bits of a pte */ #define XPMAP_UPDATE_DIRECT 1 /* Update direct map entry flags too */ paddr_t vtomach(vaddr_t); #define vtomfn(va) (vtomach(va) >> PAGE_SHIFT) -void pmap_xen_resume(void); -void pmap_xen_suspend(void); - void pmap_apte_flush(struct pmap *); void pmap_unmap_apdp(void); - -#ifdef PAE -void pmap_map_recursive_entries(void); -void pmap_unmap_recursive_entries(void); -#endif /* PAE */ - #endif /* XEN */ /* pmap functions with machine addresses */ Index: src/sys/arch/xen/include/xenpmap.h diff -u src/sys/arch/xen/include/xenpmap.h:1.31 src/sys/arch/xen/include/xenpmap.h:1.32 --- src/sys/arch/xen/include/xenpmap.h:1.31 Tue Nov 8 17:16:52 2011 +++ src/sys/arch/xen/include/xenpmap.h Wed Nov 23 00:56:56 2011 @@ -1,4 +1,4 @@ -/* $NetBSD: xenpmap.h,v 1.31 2011/11/08 17:16:52 cherry Exp $ */ +/* $NetBSD: xenpmap.h,v 1.32 2011/11/23 00:56:56 jym Exp $ */ /* * @@ -53,6 +53,13 @@ void xen_bcast_tlbflush(void); void xen_mcast_invlpg(vaddr_t, uint32_t); void xen_bcast_invlpg(vaddr_t); +void pmap_xen_resume(void); +void pmap_xen_suspend(void); + +#ifdef PAE +void pmap_map_recursive_entries(void); +void pmap_unmap_recursive_entries(void); +#endif /* PAE */ #define xpq_queue_pin_l1_table(pa) \ xpq_queue_pin_table(pa, MMUEXT_PIN_L1_TABLE) Index: src/sys/arch/xen/x86/xen_pmap.c diff -u src/sys/arch/xen/x86/xen_pmap.c:1.9 src/sys/arch/xen/x86/xen_pmap.c:1.10 --- src/sys/arch/xen/x86/xen_pmap.c:1.9 Sun Nov 20 19:41:27 2011 +++ src/sys/arch/xen/x86/xen_pmap.c Wed Nov 23 00:56:56 2011 @@ -1,4 +1,4 @@ -/* $NetBSD: xen_pmap.c,v 1.9 2011/11/20 19:41:27 jym Exp $ */ +/* $NetBSD: xen_pmap.c,v 1.10 2011/11/23 00:56:56 jym Exp $ */ /* * Copyright (c) 2007 Manuel Bouyer. @@ -102,7 +102,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: xen_pmap.c,v 1.9 2011/11/20 19:41:27 jym Exp $"); +__KERNEL_RCSID(0, "$NetBSD: xen_pmap.c,v 1.10 2011/11/23 00:56:56 jym Exp $"); #include "opt_user_ldt.h" #include "opt_lockdebug.h" @@ -137,10 +137,9 @@ __KERNEL_RCSID(0, "$NetBSD: xen_pmap.c,v #include #include -#ifdef XEN #include #include -#endif +#include #define COUNT(x) /* nothing */
CVS commit: [jmcneill-audiomp3] src/sys
Module Name:src Committed By: jmcneill Date: Tue Nov 22 22:47:12 UTC 2011 Modified Files: src/sys/arch/amiga/dev [jmcneill-audiomp3]: aucc.c repulse.c toccata.c src/sys/arch/arm/iomd [jmcneill-audiomp3]: vidcaudio.c src/sys/arch/arm/xscale [jmcneill-audiomp3]: pxa2x0_ac97.c src/sys/arch/dreamcast/dev/g2 [jmcneill-audiomp3]: aica.c src/sys/arch/hp700/gsc [jmcneill-audiomp3]: harmony.c src/sys/arch/hpcmips/vr [jmcneill-audiomp3]: vraiu.c src/sys/arch/macppc/dev [jmcneill-audiomp3]: awacs.c snapper.c src/sys/arch/prep/isa [jmcneill-audiomp3]: paud_isa.c src/sys/arch/sgimips/hpc [jmcneill-audiomp3]: haltwo.c src/sys/arch/sgimips/mace [jmcneill-audiomp3]: mavb.c src/sys/arch/sparc/dev [jmcneill-audiomp3]: audioamd.c src/sys/arch/x68k/dev [jmcneill-audiomp3]: vs.c src/sys/arch/zaurus/dev [jmcneill-audiomp3]: zaudio.c src/sys/dev [jmcneill-audiomp3]: audio_if.h src/sys/dev/bluetooth [jmcneill-audiomp3]: btsco.c src/sys/dev/ebus [jmcneill-audiomp3]: cs4231_ebus.c src/sys/dev/ic [jmcneill-audiomp3]: tms320av110.c src/sys/dev/isa [jmcneill-audiomp3]: aria.c ess.c gus.c pas.c sb.c wss.c ym.c src/sys/dev/isapnp [jmcneill-audiomp3]: gus_isapnp.c src/sys/dev/pci [jmcneill-audiomp3]: auacer.c auich.c auixp.c autri.c auvia.c azalia.c cmpci.c cs4280.c cs4281.c eap.c emuxki.c esa.c esm.c eso.c fms.c gcscaudio.c neo.c sv.c yds.c src/sys/dev/sbus [jmcneill-audiomp3]: cs4231_sbus.c src/sys/dev/tc [jmcneill-audiomp3]: bba.c src/sys/dev/usb [jmcneill-audiomp3]: uaudio.c Log Message: get rid of unused 'powerstate' callback in audio_hw_if To generate a diff of this commit: cvs rdiff -u -r1.40.104.1 -r1.40.104.2 src/sys/arch/amiga/dev/aucc.c cvs rdiff -u -r1.17.4.2 -r1.17.4.3 src/sys/arch/amiga/dev/repulse.c cvs rdiff -u -r1.14.4.1 -r1.14.4.2 src/sys/arch/amiga/dev/toccata.c cvs rdiff -u -r1.46.40.1 -r1.46.40.2 src/sys/arch/arm/iomd/vidcaudio.c cvs rdiff -u -r1.9.4.2 -r1.9.4.3 src/sys/arch/arm/xscale/pxa2x0_ac97.c cvs rdiff -u -r1.21.4.1 -r1.21.4.2 src/sys/arch/dreamcast/dev/g2/aica.c cvs rdiff -u -r1.23.4.1 -r1.23.4.2 src/sys/arch/hp700/gsc/harmony.c cvs rdiff -u -r1.12.80.1 -r1.12.80.2 src/sys/arch/hpcmips/vr/vraiu.c cvs rdiff -u -r1.40.6.1 -r1.40.6.2 src/sys/arch/macppc/dev/awacs.c cvs rdiff -u -r1.36.10.1 -r1.36.10.2 src/sys/arch/macppc/dev/snapper.c cvs rdiff -u -r1.14.4.1 -r1.14.4.2 src/sys/arch/prep/isa/paud_isa.c cvs rdiff -u -r1.20.4.1 -r1.20.4.2 src/sys/arch/sgimips/hpc/haltwo.c cvs rdiff -u -r1.7.4.3 -r1.7.4.4 src/sys/arch/sgimips/mace/mavb.c cvs rdiff -u -r1.26.4.2 -r1.26.4.3 src/sys/arch/sparc/dev/audioamd.c cvs rdiff -u -r1.34.4.1 -r1.34.4.2 src/sys/arch/x68k/dev/vs.c cvs rdiff -u -r1.15.4.2 -r1.15.4.3 src/sys/arch/zaurus/dev/zaudio.c cvs rdiff -u -r1.66.14.2 -r1.66.14.3 src/sys/dev/audio_if.h cvs rdiff -u -r1.24.6.1 -r1.24.6.2 src/sys/dev/bluetooth/btsco.c cvs rdiff -u -r1.34.4.2 -r1.34.4.3 src/sys/dev/ebus/cs4231_ebus.c cvs rdiff -u -r1.21.36.1 -r1.21.36.2 src/sys/dev/ic/tms320av110.c cvs rdiff -u -r1.33.10.1 -r1.33.10.2 src/sys/dev/isa/aria.c cvs rdiff -u -r1.78.10.2 -r1.78.10.3 src/sys/dev/isa/ess.c cvs rdiff -u -r1.106.4.1 -r1.106.4.2 src/sys/dev/isa/gus.c cvs rdiff -u -r1.68.10.1 -r1.68.10.2 src/sys/dev/isa/pas.c cvs rdiff -u -r1.88.40.1 -r1.88.40.2 src/sys/dev/isa/sb.c cvs rdiff -u -r1.69.4.1 -r1.69.4.2 src/sys/dev/isa/wss.c cvs rdiff -u -r1.41.4.1 -r1.41.4.2 src/sys/dev/isa/ym.c cvs rdiff -u -r1.35.14.1 -r1.35.14.2 src/sys/dev/isapnp/gus_isapnp.c cvs rdiff -u -r1.28.10.1 -r1.28.10.2 src/sys/dev/pci/auacer.c cvs rdiff -u -r1.138.10.1 -r1.138.10.2 src/sys/dev/pci/auich.c cvs rdiff -u -r1.34.12.1 -r1.34.12.2 src/sys/dev/pci/auixp.c cvs rdiff -u -r1.46.12.1 -r1.46.12.2 src/sys/dev/pci/autri.c cvs rdiff -u -r1.73.10.1 -r1.73.10.2 src/sys/dev/pci/auvia.c cvs rdiff -u -r1.77.4.1 -r1.77.4.2 src/sys/dev/pci/azalia.c cvs rdiff -u -r1.42.14.1 -r1.42.14.2 src/sys/dev/pci/cmpci.c cvs rdiff -u -r1.61.6.1 -r1.61.6.2 src/sys/dev/pci/cs4280.c cvs rdiff -u -r1.44.12.1 -r1.44.12.2 src/sys/dev/pci/cs4281.c cvs rdiff -u -r1.92.36.1 -r1.92.36.2 src/sys/dev/pci/eap.c cvs rdiff -u -r1.59.14.3 -r1.59.14.4 src/sys/dev/pci/emuxki.c cvs rdiff -u -r1.54.12.1 -r1.54.12.2 src/sys/dev/pci/esa.c cvs rdiff -u -r1.53.12.1 -r1.53.12.2 src/sys/dev/pci/esm.c cvs rdiff -u -r1.57.14.1 -r1.57.14.2 src/sys/dev/pci/eso.c cvs rdiff -u -r1.38.10.1 -r1.38.10.2 src/sys/dev/pci/fms.c cvs rdiff -u -r1.7.4.3 -r1.7.4.4 src/sys/dev/pci/gcscaudio.c cvs rdiff -u -r1.45.12.1 -r1.45.12.2 src/sys/dev/pci/neo.c cvs rdiff -u -r1.44.14.1 -r1.44.14.2 src/sys/dev/pci/sv.c cvs rdiff -u -r1.50.10.1 -r1.50.10.2 src/sys/dev/pci/yds.c cvs rdiff -u -r1.48.4.3 -r1.48.4.4 src/sys/dev/sbus/cs4231_sbus.c cvs rdiff -u -r1.38.4.1 -r1.38.4.2 src/sys/dev/tc/bba.c cvs rdiff -u -r1.120.10.1 -r1.120.10.2 src/sys/dev/usb/uaudio.c Please note that diffs
CVS commit: src/external/historical/nawk/dist
Module Name:src Committed By: christos Date: Tue Nov 22 22:30:22 UTC 2011 Modified Files: src/external/historical/nawk/dist: run.c Log Message: - make decimal conversions use the maximum width integers available on the architecture. - make signed and unsigned code consistent. To generate a diff of this commit: cvs rdiff -u -r1.3 -r1.4 src/external/historical/nawk/dist/run.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/external/historical/nawk/dist/run.c diff -u src/external/historical/nawk/dist/run.c:1.3 src/external/historical/nawk/dist/run.c:1.4 --- src/external/historical/nawk/dist/run.c:1.3 Mon Apr 18 11:23:28 2011 +++ src/external/historical/nawk/dist/run.c Tue Nov 22 17:30:22 2011 @@ -37,6 +37,7 @@ THIS SOFTWARE. #include #include #include +#include #include "awk.h" #include "awkgram.h" @@ -882,12 +883,15 @@ int format(char **pbuf, int *pbufsize, c case 'd': case 'i': flag = 'd'; if(*(s-1) == 'l') break; - *(t-1) = 'l'; + *(t-1) = 'j'; *t = 'd'; *++t = '\0'; break; case 'o': case 'x': case 'X': case 'u': flag = *(s-1) == 'l' ? 'd' : 'u'; + *(t-1) = 'j'; + *t = *s; + *++t = '\0'; break; case 's': flag = 's'; @@ -920,8 +924,8 @@ int format(char **pbuf, int *pbufsize, c snprintf(p, BUFSZ(p), "%s", t); break; case 'f': snprintf(p, BUFSZ(p), fmt, getfval(x)); break; - case 'd': snprintf(p, BUFSZ(p), fmt, (long) getfval(x)); break; - case 'u': snprintf(p, BUFSZ(p), fmt, (int) getfval(x)); break; + case 'd': snprintf(p, BUFSZ(p), fmt, (intmax_t) getfval(x)); break; + case 'u': snprintf(p, BUFSZ(p), fmt, (uintmax_t) getfval(x)); break; case 's': t = getsval(x); n = strlen(t);
CVS commit: src/sys/kern
Module Name:src Committed By: christos Date: Tue Nov 22 21:25:05 UTC 2011 Modified Files: src/sys/kern: subr_prf.c Log Message: Increment the source buffer when we overflow so that we don't get stuck in an infinite loop. To generate a diff of this commit: cvs rdiff -u -r1.145 -r1.146 src/sys/kern/subr_prf.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/kern/subr_prf.c diff -u src/sys/kern/subr_prf.c:1.145 src/sys/kern/subr_prf.c:1.146 --- src/sys/kern/subr_prf.c:1.145 Sun Nov 20 20:44:26 2011 +++ src/sys/kern/subr_prf.c Tue Nov 22 16:25:04 2011 @@ -1,4 +1,4 @@ -/* $NetBSD: subr_prf.c,v 1.145 2011/11/21 01:44:26 christos Exp $ */ +/* $NetBSD: subr_prf.c,v 1.146 2011/11/22 21:25:04 christos Exp $ */ /*- * Copyright (c) 1986, 1988, 1991, 1993 @@ -37,7 +37,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: subr_prf.c,v 1.145 2011/11/21 01:44:26 christos Exp $"); +__KERNEL_RCSID(0, "$NetBSD: subr_prf.c,v 1.146 2011/11/22 21:25:04 christos Exp $"); #include "opt_ddb.h" #include "opt_ipkdb.h" @@ -1144,6 +1144,8 @@ vsnprintf(char *bf, size_t size, const c if (oflags == TOBUFONLY) { \ if ((vp == NULL) || (sbuf < tailp)) \ *sbuf++ = (C); \ + else \ + sbuf++; \ } else { \ putchar((C), oflags, vp);\ }\
CVS commit: src
Module Name:src Committed By: cheusov Date: Tue Nov 22 20:22:10 UTC 2011 Modified Files: src/distrib/sets/lists/tests: mi src/tests/util/awk: Makefile t_awk.sh Added Files: src/tests/util/awk: d_assign_NF.awk d_assign_NF.in d_assign_NF.out Log Message: Regression tests for awk(1) (PR 44063) To generate a diff of this commit: cvs rdiff -u -r1.425 -r1.426 src/distrib/sets/lists/tests/mi cvs rdiff -u -r1.2 -r1.3 src/tests/util/awk/Makefile cvs rdiff -u -r0 -r1.1 src/tests/util/awk/d_assign_NF.awk \ src/tests/util/awk/d_assign_NF.in src/tests/util/awk/d_assign_NF.out cvs rdiff -u -r1.6 -r1.7 src/tests/util/awk/t_awk.sh Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/distrib/sets/lists/tests/mi diff -u src/distrib/sets/lists/tests/mi:1.425 src/distrib/sets/lists/tests/mi:1.426 --- src/distrib/sets/lists/tests/mi:1.425 Mon Nov 21 23:50:44 2011 +++ src/distrib/sets/lists/tests/mi Tue Nov 22 20:22:09 2011 @@ -1,4 +1,4 @@ -# $NetBSD: mi,v 1.425 2011/11/21 23:50:44 joerg Exp $ +# $NetBSD: mi,v 1.426 2011/11/22 20:22:09 cheusov Exp $ # # Note: don't delete entries from here - mark them as "obsolete" instead. # @@ -2713,6 +2713,9 @@ ./usr/tests/util/Atffile tests-util-tests ./usr/tests/util/awktests-util-tests ./usr/tests/util/awk/Atffile tests-util-tests +./usr/tests/util/awk/d_assign_NF.awk tests-util-tests +./usr/tests/util/awk/d_assign_NF.in tests-util-tests +./usr/tests/util/awk/d_assign_NF.out tests-util-tests ./usr/tests/util/awk/d_big_regexp.awk tests-util-tests ./usr/tests/util/awk/d_big_regexp.in tests-util-tests ./usr/tests/util/awk/d_big_regexp.out tests-util-tests Index: src/tests/util/awk/Makefile diff -u src/tests/util/awk/Makefile:1.2 src/tests/util/awk/Makefile:1.3 --- src/tests/util/awk/Makefile:1.2 Sat Apr 30 11:24:14 2011 +++ src/tests/util/awk/Makefile Tue Nov 22 20:22:10 2011 @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.2 2011/04/30 11:24:14 alnsn Exp $ +# $NetBSD: Makefile,v 1.3 2011/11/22 20:22:10 cheusov Exp $ NOMAN= # defined @@ -29,5 +29,8 @@ FILES+= d_tolower.out FILES+= d_toupper.awk FILES+= d_toupper.in FILES+= d_toupper.out +FILES+= d_assign_NF.awk +FILES+= d_assign_NF.in +FILES+= d_assign_NF.out .include Index: src/tests/util/awk/t_awk.sh diff -u src/tests/util/awk/t_awk.sh:1.6 src/tests/util/awk/t_awk.sh:1.7 --- src/tests/util/awk/t_awk.sh:1.6 Mon May 2 08:30:21 2011 +++ src/tests/util/awk/t_awk.sh Tue Nov 22 20:22:10 2011 @@ -1,4 +1,4 @@ -# $NetBSD: t_awk.sh,v 1.6 2011/05/02 08:30:21 jruoho Exp $ +# $NetBSD: t_awk.sh,v 1.7 2011/11/22 20:22:10 cheusov Exp $ # # Copyright (c) 2008, 2009 The NetBSD Foundation, Inc. # All rights reserved. @@ -98,6 +98,16 @@ period_body() h_check period -v x=0.5 } +atf_test_case assign_NF +assign_NF_head() +{ + atf_set "descr" 'Checks that assign to NF changes $0 and $n (PR/44063)' +} +assign_NF_body() +{ + h_check assign_NF +} + atf_init_test_cases() { atf_add_test_case big_regexp @@ -105,4 +115,5 @@ atf_init_test_cases() atf_add_test_case string1 atf_add_test_case multibyte atf_add_test_case period + atf_add_test_case assign_NF } Added files: Index: src/tests/util/awk/d_assign_NF.awk diff -u /dev/null src/tests/util/awk/d_assign_NF.awk:1.1 --- /dev/null Tue Nov 22 20:22:10 2011 +++ src/tests/util/awk/d_assign_NF.awk Tue Nov 22 20:22:10 2011 @@ -0,0 +1,16 @@ +# $NetBSD: d_assign_NF.awk,v 1.1 2011/11/22 20:22:10 cheusov Exp $ + +{ + NF = 2 + print "$0=`" $0 "`" + print "$3=`" $3 "`" + print "$4=`" $4 "`" + NF = 3 + print "$0=`" $0 "`" + print "$3=`" $3 "`" + print "$4=`" $4 "`" + NF = 4 + print "$0=`" $0 "`" + print "$3=`" $3 "`" + print "$4=`" $4 "`" +} Index: src/tests/util/awk/d_assign_NF.in diff -u /dev/null src/tests/util/awk/d_assign_NF.in:1.1 --- /dev/null Tue Nov 22 20:22:10 2011 +++ src/tests/util/awk/d_assign_NF.in Tue Nov 22 20:22:10 2011 @@ -0,0 +1 @@ + 12 3 Index: src/tests/util/awk/d_assign_NF.out diff -u /dev/null src/tests/util/awk/d_assign_NF.out:1.1 --- /dev/null Tue Nov 22 20:22:10 2011 +++ src/tests/util/awk/d_assign_NF.out Tue Nov 22 20:22:10 2011 @@ -0,0 +1,9 @@ +$0=`1 2` +$3=`` +$4=`` +$0=`1 2 ` +$3=`` +$4=`` +$0=`1 2 ` +$3=`` +$4=``
CVS commit: src/sys/dev/isapnp
Module Name:src Committed By: jakllsch Date: Tue Nov 22 19:33:38 UTC 2011 Modified Files: src/sys/dev/isapnp: wss_isapnp.c Log Message: Set "mode" to 2 at the correct time. Fixes recording on some isapnp(4) wss(4) chips. To generate a diff of this commit: cvs rdiff -u -r1.26 -r1.27 src/sys/dev/isapnp/wss_isapnp.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/dev/isapnp/wss_isapnp.c diff -u src/sys/dev/isapnp/wss_isapnp.c:1.26 src/sys/dev/isapnp/wss_isapnp.c:1.27 --- src/sys/dev/isapnp/wss_isapnp.c:1.26 Thu Jun 2 14:12:25 2011 +++ src/sys/dev/isapnp/wss_isapnp.c Tue Nov 22 19:33:38 2011 @@ -1,4 +1,4 @@ -/* $NetBSD: wss_isapnp.c,v 1.26 2011/06/02 14:12:25 tsutsui Exp $ */ +/* $NetBSD: wss_isapnp.c,v 1.27 2011/11/22 19:33:38 jakllsch Exp $ */ /* * Copyright (c) 1997, 1999 The NetBSD Foundation, Inc. @@ -30,7 +30,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: wss_isapnp.c,v 1.26 2011/06/02 14:12:25 tsutsui Exp $"); +__KERNEL_RCSID(0, "$NetBSD: wss_isapnp.c,v 1.27 2011/11/22 19:33:38 jakllsch Exp $"); #include #include @@ -144,7 +144,6 @@ wss_isapnp_attach(device_t parent, devic /* Set up AD1848 I/O handle. */ ac->sc_iot = sc->sc_iot; ac->sc_ioh = sc->sc_ioh; - ac->mode = 2; sc->sc_ad1848.sc_ic = ipa->ipa_ic; @@ -162,6 +161,8 @@ wss_isapnp_attach(device_t parent, devic aprint_error_dev(self, "%s %s", ipa->ipa_devident, ipa->ipa_devclass); + ac->mode = 2; + wssattach(sc); /* set up OPL I/O handle for ISAPNP boards w/o MAD */
CVS commit: src/sys/dev/ic
Module Name:src Committed By: garbled Date: Tue Nov 22 18:42:57 UTC 2011 Modified Files: src/sys/dev/ic: rtl8169.c rtl81x9reg.h rtl81x9var.h Log Message: Add support to recognize the 8168E model of this chip. Taken from FreeBSD To generate a diff of this commit: cvs rdiff -u -r1.133 -r1.134 src/sys/dev/ic/rtl8169.c cvs rdiff -u -r1.41 -r1.42 src/sys/dev/ic/rtl81x9reg.h cvs rdiff -u -r1.51 -r1.52 src/sys/dev/ic/rtl81x9var.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/dev/ic/rtl8169.c diff -u src/sys/dev/ic/rtl8169.c:1.133 src/sys/dev/ic/rtl8169.c:1.134 --- src/sys/dev/ic/rtl8169.c:1.133 Wed Jul 28 23:30:21 2010 +++ src/sys/dev/ic/rtl8169.c Tue Nov 22 18:42:56 2011 @@ -1,4 +1,4 @@ -/* $NetBSD: rtl8169.c,v 1.133 2010/07/28 23:30:21 msaitoh Exp $ */ +/* $NetBSD: rtl8169.c,v 1.134 2011/11/22 18:42:56 garbled Exp $ */ /* * Copyright (c) 1997, 1998-2003 @@ -33,7 +33,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: rtl8169.c,v 1.133 2010/07/28 23:30:21 msaitoh Exp $"); +__KERNEL_RCSID(0, "$NetBSD: rtl8169.c,v 1.134 2011/11/22 18:42:56 garbled Exp $"); /* $FreeBSD: /repoman/r/ncvs/src/sys/dev/re/if_re.c,v 1.20 2004/04/11 20:34:08 ru Exp $ */ /* @@ -601,6 +601,11 @@ re_attach(struct rtk_softc *sc) */ sc->sc_quirk |= RTKQ_NOJUMBO; break; + case RTK_HWREV_8168E: + sc->sc_quirk |= RTKQ_DESCV2 | RTKQ_NOEECMD | + RTKQ_MACSTAT | RTKQ_CMDSTOP | RTKQ_PHYWAKE_PM | + RTKQ_NOJUMBO; + break; case RTK_HWREV_8100E: case RTK_HWREV_8100E_SPIN2: case RTK_HWREV_8101E: @@ -659,6 +664,10 @@ re_attach(struct rtk_softc *sc) } } + /* Take PHY out of power down mode. */ + if ((sc->sc_quirk & RTKQ_PHYWAKE_PM) != 0) + CSR_WRITE_1(sc, RTK_PMCH, CSR_READ_1(sc, RTK_PMCH) | 0x80); + aprint_normal_dev(sc->sc_dev, "Ethernet address %s\n", ether_sprintf(eaddr)); Index: src/sys/dev/ic/rtl81x9reg.h diff -u src/sys/dev/ic/rtl81x9reg.h:1.41 src/sys/dev/ic/rtl81x9reg.h:1.42 --- src/sys/dev/ic/rtl81x9reg.h:1.41 Fri Apr 9 10:40:59 2010 +++ src/sys/dev/ic/rtl81x9reg.h Tue Nov 22 18:42:57 2011 @@ -1,4 +1,4 @@ -/* $NetBSD: rtl81x9reg.h,v 1.41 2010/04/09 10:40:59 nonaka Exp $ */ +/* $NetBSD: rtl81x9reg.h,v 1.42 2011/11/22 18:42:57 garbled Exp $ */ /* * Copyright (c) 1997, 1998 @@ -130,6 +130,7 @@ #define RTK_CSIAR 0x0068 #define RTK_TBI_LPAR 0x006A #define RTK_GMEDIASTAT 0x006C /* 8 bits */ +#define RTK_PMCH 0x006F /* 8 bits */ #define RTK_EPHYAR 0x0080 #define RTK_LDPS 0x0082 /* Link Down Power Saving */ #define RTK_DBG_REG 0x00D1 @@ -161,6 +162,7 @@ #define RTK_HWREV_8103E 0x24C0 #define RTK_HWREV_8168D 0x2800 #define RTK_HWREV_8168DP 0x2880 +#define RTK_HWREV_8168E 0x2C00 #define RTK_HWREV_8168_SPIN1 0x3000 #define RTK_HWREV_8100E 0x3080 #define RTK_HWREV_8101E 0x3400 Index: src/sys/dev/ic/rtl81x9var.h diff -u src/sys/dev/ic/rtl81x9var.h:1.51 src/sys/dev/ic/rtl81x9var.h:1.52 --- src/sys/dev/ic/rtl81x9var.h:1.51 Sat Nov 19 22:51:22 2011 +++ src/sys/dev/ic/rtl81x9var.h Tue Nov 22 18:42:57 2011 @@ -1,4 +1,4 @@ -/* $NetBSD: rtl81x9var.h,v 1.51 2011/11/19 22:51:22 tls Exp $ */ +/* $NetBSD: rtl81x9var.h,v 1.52 2011/11/22 18:42:57 garbled Exp $ */ /* * Copyright (c) 1997, 1998 @@ -195,6 +195,7 @@ struct rtk_softc { #define RTKQ_NOEECMD 0x0080 /* unusable EEPROM command */ #define RTKQ_MACSTAT 0x0100 /* set MACSTAT_DIS on init */ #define RTKQ_CMDSTOP 0x0200 /* set STOPREQ on stop */ +#define RTKQ_PHYWAKE_PM 0x0400 /* wake PHY from power down */ bus_dma_tag_t sc_dmat;
CVS commit: [jmcneill-audiomp3] src/sys/dev
Module Name:src Committed By: macallan Date: Tue Nov 22 18:29:06 UTC 2011 Modified Files: src/sys/dev [jmcneill-audiomp3]: TODO.audiomp Log Message: audiocs at sbus works on sparc and sparc64 To generate a diff of this commit: cvs rdiff -u -r1.1.2.26 -r1.1.2.27 src/sys/dev/TODO.audiomp Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/dev/TODO.audiomp diff -u src/sys/dev/TODO.audiomp:1.1.2.26 src/sys/dev/TODO.audiomp:1.1.2.27 --- src/sys/dev/TODO.audiomp:1.1.2.26 Tue Nov 22 05:56:43 2011 +++ src/sys/dev/TODO.audiomp Tue Nov 22 18:29:06 2011 @@ -51,7 +51,7 @@ dev/pci/neo.c done dev/pci/sv.c done dev/pci/yds.c done dev/pci/hdaudio/hdafg.c done port-i386, port-amd64 -dev/sbus/cs4231_sbus.c done +dev/sbus/cs4231_sbus.c done port-sparc, port-sparc64 dev/sbus/dbri.c done port-sparc dev/tc/bba.c done dev/usb/uaudio.c done port-amd64
CVS commit: src/share/mk
Module Name:src Committed By: apb Date: Tue Nov 22 18:25:48 UTC 2011 Modified Files: src/share/mk: bsd.clean.mk Log Message: Use :Q to deal with the case that CLEANFILES or CLEANDIRFILES contains quoted substrings (such as file names with spaces). Problem reported by Joseph Koshy, who also provided the important part of the fix. To generate a diff of this commit: cvs rdiff -u -r1.4 -r1.5 src/share/mk/bsd.clean.mk Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/share/mk/bsd.clean.mk diff -u src/share/mk/bsd.clean.mk:1.4 src/share/mk/bsd.clean.mk:1.5 --- src/share/mk/bsd.clean.mk:1.4 Wed Oct 5 12:34:04 2011 +++ src/share/mk/bsd.clean.mk Tue Nov 22 18:25:48 2011 @@ -1,4 +1,4 @@ -# $NetBSD: bsd.clean.mk,v 1.4 2011/10/05 12:34:04 apb Exp $ +# $NetBSD: bsd.clean.mk,v 1.5 2011/11/22 18:25:48 apb Exp $ # # @@ -44,18 +44,27 @@ __docleandir: .PHONY .MADE __cleanuse CL # If the list of files is empty, then the commands # reduce to "true", with an "@" prefix to prevent echoing. # +# The use of :M* is needed to handle the case that CLEANFILES +# or CLEANDIRFILES is not completely empty but contains spaces. +# This can easily happen when CLEANFILES or CLEANDIRFILES is set +# from other variables that happen to be empty.) +# +# The use of :Q is needed to handle the case that CLEANFILES +# or CLEANDIRFILES contains quoted strings, such as +# CLEANFILES = "filename with spaces". +# __cleanuse: .USE .if 0 # print "# clean CLEANFILES" for debugging - ${"${.ALLSRC:@v@${${v}:M*}@}" == "":?@true:${_MKMSG} \ + ${"${.ALLSRC:@v@${${v}:M*}@:Q}" == "":?@true:${_MKMSG} \ "clean" ${.ALLSRC} } .endif .for _d in ${"${.OBJDIR}" == "${.CURDIR}" || "${MKCLEANSRC}" == "no" \ :? ${.OBJDIR} \ : ${.OBJDIR} ${.CURDIR} } - ${"${.ALLSRC:@v@${${v}:M*}@}" == "":?@true: \ + ${"${.ALLSRC:@v@${${v}:M*}@:Q}" == "":?@true: \ (cd ${_d} && rm -f ${.ALLSRC:@v@${${v}}@} || true) } .if "${MKCLEANVERIFY}" == "yes" - @${"${.ALLSRC:@v@${${v}:M*}@}" == "":?true: \ + @${"${.ALLSRC:@v@${${v}:M*}@:Q}" == "":?true: \ bad="\$(cd ${_d} && ls -d ${.ALLSRC:@v@${${v}}@} 2>/dev/null)"; \ if test -n "\$bad"; then \ echo "Failed to remove files from ${_d}:" ; \
CVS commit: [jmcneill-audiomp3] src/sys/dev/sbus
Module Name:src Committed By: macallan Date: Tue Nov 22 17:36:01 UTC 2011 Modified Files: src/sys/dev/sbus [jmcneill-audiomp3]: cs4231_sbus.c Log Message: we need to initialize the locks before using them Now this works on my Ultra 1 To generate a diff of this commit: cvs rdiff -u -r1.48.4.2 -r1.48.4.3 src/sys/dev/sbus/cs4231_sbus.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/dev/sbus/cs4231_sbus.c diff -u src/sys/dev/sbus/cs4231_sbus.c:1.48.4.2 src/sys/dev/sbus/cs4231_sbus.c:1.48.4.3 --- src/sys/dev/sbus/cs4231_sbus.c:1.48.4.2 Sun Nov 20 11:41:53 2011 +++ src/sys/dev/sbus/cs4231_sbus.c Tue Nov 22 17:36:01 2011 @@ -1,4 +1,4 @@ -/* $NetBSD: cs4231_sbus.c,v 1.48.4.2 2011/11/20 11:41:53 mrg Exp $ */ +/* $NetBSD: cs4231_sbus.c,v 1.48.4.3 2011/11/22 17:36:01 macallan Exp $ */ /*- * Copyright (c) 1998, 1999, 2002, 2007 The NetBSD Foundation, Inc. @@ -30,7 +30,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: cs4231_sbus.c,v 1.48.4.2 2011/11/20 11:41:53 mrg Exp $"); +__KERNEL_RCSID(0, "$NetBSD: cs4231_sbus.c,v 1.48.4.3 2011/11/22 17:36:01 macallan Exp $"); #include "audio.h" #if NAUDIO > 0 @@ -161,9 +161,9 @@ cs4231_sbus_attach(device_t parent, devi sbsc->sc_bt = sc->sc_bustag = sa->sa_bustag; sc->sc_dmatag = sa->sa_dmatag; - sbsc->sc_pint = sparc_softintr_establish(IPL_VM, + sbsc->sc_pint = sparc_softintr_establish(IPL_SCHED, (void *)cs4231_sbus_pint, sc); - sbsc->sc_rint = sparc_softintr_establish(IPL_VM, + sbsc->sc_rint = sparc_softintr_establish(IPL_SCHED, (void *)cs4231_sbus_rint, sc); /* @@ -188,6 +188,7 @@ cs4231_sbus_attach(device_t parent, devi cs4231_common_attach(sc, self, bh); printf("\n"); + ad1848_init_locks(&sc->sc_ad1848, IPL_SCHED); /* Establish interrupt channel */ if (sa->sa_nintr) bus_intr_establish(sa->sa_bustag,
CVS commit: src/sys/arch/sandpoint/sandpoint
Module Name:src Committed By: phx Date: Tue Nov 22 16:56:29 UTC 2011 Modified Files: src/sys/arch/sandpoint/sandpoint: machdep.c Log Message: Print "Model:" information with oea_startup(). To generate a diff of this commit: cvs rdiff -u -r1.58 -r1.59 src/sys/arch/sandpoint/sandpoint/machdep.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/sandpoint/sandpoint/machdep.c diff -u src/sys/arch/sandpoint/sandpoint/machdep.c:1.58 src/sys/arch/sandpoint/sandpoint/machdep.c:1.59 --- src/sys/arch/sandpoint/sandpoint/machdep.c:1.58 Sat Aug 13 21:04:05 2011 +++ src/sys/arch/sandpoint/sandpoint/machdep.c Tue Nov 22 16:56:29 2011 @@ -1,4 +1,4 @@ -/* $NetBSD: machdep.c,v 1.58 2011/08/13 21:04:05 christos Exp $ */ +/* $NetBSD: machdep.c,v 1.59 2011/11/22 16:56:29 phx Exp $ */ /* * Copyright (C) 1995, 1996 Wolfgang Solfrank. @@ -32,7 +32,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.58 2011/08/13 21:04:05 christos Exp $"); +__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.59 2011/11/22 16:56:29 phx Exp $"); #include "opt_compat_netbsd.h" #include "opt_ddb.h" @@ -230,13 +230,15 @@ mem_regions(struct mem_region **mem, str void cpu_startup(void) { - int msr; + struct btinfo_prodfamily *bi_prod; void *baseaddr; + int msr; /* * Do common startup. */ - oea_startup(NULL); + bi_prod = lookup_bootinfo(BTINFO_PRODFAMILY); + oea_startup(bi_prod != NULL ? bi_prod->name : NULL); /* * Prepare EPIC and install external interrupt handler.
CVS commit: src/doc
Module Name:src Committed By: joerg Date: Tue Nov 22 15:30:17 UTC 2011 Modified Files: src/doc: CHANGES Log Message: ARM and M68K TLS support To generate a diff of this commit: cvs rdiff -u -r1.1629 -r1.1630 src/doc/CHANGES Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/doc/CHANGES diff -u src/doc/CHANGES:1.1629 src/doc/CHANGES:1.1630 --- src/doc/CHANGES:1.1629 Mon Nov 21 14:39:47 2011 +++ src/doc/CHANGES Tue Nov 22 15:30:17 2011 @@ -1,4 +1,4 @@ -# LIST OF CHANGES FROM LAST RELEASE: <$Revision: 1.1629 $> +# LIST OF CHANGES FROM LAST RELEASE: <$Revision: 1.1630 $> # # # [Note: This file does not mention every change made to the NetBSD source tree. @@ -1173,3 +1173,5 @@ Changes from NetBSD 5.0 to NetBSD 6.0: x68k: Remove pow(4) and rtcalarm(8) [isaki 2019] news68k: Add preliminary PROM function based framebuffer text console support. [tsutsui 2020] + arm: Add TLS (thread local storage) support. [joerg 2018] + m68k: Add TLS (thread local storage) support. [joerg 2022]
CVS commit: src
Module Name:src Committed By: joerg Date: Tue Nov 22 15:25:28 UTC 2011 Modified Files: src/lib/libc/arch/m68k: Makefile.inc src/lib/libc/arch/m68k/gen: Makefile.inc _lwp.c src/libexec/ld.elf_so/arch/m68k: mdreloc.c src/sys/arch/m68k/include: mcontext.h types.h Added Files: src/lib/libc/arch/m68k/sys: __m68k_read_tp.S Log Message: Add TLS support for m68k. To generate a diff of this commit: cvs rdiff -u -r1.13 -r1.14 src/lib/libc/arch/m68k/Makefile.inc cvs rdiff -u -r1.30 -r1.31 src/lib/libc/arch/m68k/gen/Makefile.inc cvs rdiff -u -r1.6 -r1.7 src/lib/libc/arch/m68k/gen/_lwp.c cvs rdiff -u -r0 -r1.1 src/lib/libc/arch/m68k/sys/__m68k_read_tp.S cvs rdiff -u -r1.28 -r1.29 src/libexec/ld.elf_so/arch/m68k/mdreloc.c cvs rdiff -u -r1.8 -r1.9 src/sys/arch/m68k/include/mcontext.h cvs rdiff -u -r1.29 -r1.30 src/sys/arch/m68k/include/types.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/lib/libc/arch/m68k/Makefile.inc diff -u src/lib/libc/arch/m68k/Makefile.inc:1.13 src/lib/libc/arch/m68k/Makefile.inc:1.14 --- src/lib/libc/arch/m68k/Makefile.inc:1.13 Sat Feb 9 02:41:06 2008 +++ src/lib/libc/arch/m68k/Makefile.inc Tue Nov 22 15:25:28 2011 @@ -1,6 +1,6 @@ -# $NetBSD: Makefile.inc,v 1.13 2008/02/09 02:41:06 mrg Exp $ +# $NetBSD: Makefile.inc,v 1.14 2011/11/22 15:25:28 joerg Exp $ -SRCS+= __sigaction14_sigtramp.c __sigtramp2.S __mmap.S +SRCS+= __sigaction14_sigtramp.c __sigtramp2.S __m68k_read_tp.S __mmap.S ASM+= _lwp_getprivate.S mremap.S Index: src/lib/libc/arch/m68k/gen/Makefile.inc diff -u src/lib/libc/arch/m68k/gen/Makefile.inc:1.30 src/lib/libc/arch/m68k/gen/Makefile.inc:1.31 --- src/lib/libc/arch/m68k/gen/Makefile.inc:1.30 Sun Dec 6 07:12:17 2009 +++ src/lib/libc/arch/m68k/gen/Makefile.inc Tue Nov 22 15:25:28 2011 @@ -1,4 +1,4 @@ -# $NetBSD: Makefile.inc,v 1.30 2009/12/06 07:12:17 uebayasi Exp $ +# $NetBSD: Makefile.inc,v 1.31 2011/11/22 15:25:28 joerg Exp $ SRCS+= alloca.S fabs.S @@ -26,6 +26,7 @@ SRCS+= ashlsi3.S ashrsi3.S \ negdf2.S negsf2.S SRCS+= bswap16.S bswap32.S bswap64.S SRCS+= _lwp.c +CPPFLAGS._lwp.c += -D_LIBC_SOURCE # 68000-based machines build with a libgcc that includes # much of the (soft)float and integer support that would Index: src/lib/libc/arch/m68k/gen/_lwp.c diff -u src/lib/libc/arch/m68k/gen/_lwp.c:1.6 src/lib/libc/arch/m68k/gen/_lwp.c:1.7 --- src/lib/libc/arch/m68k/gen/_lwp.c:1.6 Thu Feb 24 04:28:42 2011 +++ src/lib/libc/arch/m68k/gen/_lwp.c Tue Nov 22 15:25:28 2011 @@ -1,4 +1,4 @@ -/* $NetBSD: _lwp.c,v 1.6 2011/02/24 04:28:42 joerg Exp $ */ +/* $NetBSD: _lwp.c,v 1.7 2011/11/22 15:25:28 joerg Exp $ */ /*- * Copyright (c) 2001 The NetBSD Foundation, Inc. @@ -31,18 +31,19 @@ #include #if defined(LIBC_SCCS) && !defined(lint) -__RCSID("$NetBSD: _lwp.c,v 1.6 2011/02/24 04:28:42 joerg Exp $"); +__RCSID("$NetBSD: _lwp.c,v 1.7 2011/11/22 15:25:28 joerg Exp $"); #endif /* LIBC_SCCS and not lint */ #include "namespace.h" #include +#include #include #include #include void _lwp_makecontext(ucontext_t *u, void (*start)(void *), -void *arg, void *private, caddr_t stack_base, size_t stack_size) +void *arg, void *tcb, caddr_t stack_base, size_t stack_size) { void **sp; @@ -60,6 +61,7 @@ _lwp_makecontext(ucontext_t *u, void (*s *--sp = (void *) _lwp_exit; u->uc_mcontext.__gregs[_REG_A7] = (int) sp; - u->uc_mcontext._mc_tlsbase = (uintptr_t)private; + u->uc_mcontext._mc_tlsbase = (uintptr_t)tcb + TLS_TP_OFFSET + + sizeof(struct tls_tcb); u->uc_flags |= _UC_TLSBASE; } Index: src/libexec/ld.elf_so/arch/m68k/mdreloc.c diff -u src/libexec/ld.elf_so/arch/m68k/mdreloc.c:1.28 src/libexec/ld.elf_so/arch/m68k/mdreloc.c:1.29 --- src/libexec/ld.elf_so/arch/m68k/mdreloc.c:1.28 Fri Mar 25 18:07:05 2011 +++ src/libexec/ld.elf_so/arch/m68k/mdreloc.c Tue Nov 22 15:25:28 2011 @@ -1,13 +1,13 @@ -/* $NetBSD: mdreloc.c,v 1.28 2011/03/25 18:07:05 joerg Exp $ */ +/* $NetBSD: mdreloc.c,v 1.29 2011/11/22 15:25:28 joerg Exp $ */ #include #ifndef lint -__RCSID("$NetBSD: mdreloc.c,v 1.28 2011/03/25 18:07:05 joerg Exp $"); +__RCSID("$NetBSD: mdreloc.c,v 1.29 2011/11/22 15:25:28 joerg Exp $"); #endif /* not lint */ #include #ifndef lint -__RCSID("$NetBSD: mdreloc.c,v 1.28 2011/03/25 18:07:05 joerg Exp $"); +__RCSID("$NetBSD: mdreloc.c,v 1.29 2011/11/22 15:25:28 joerg Exp $"); #endif /* not lint */ #include @@ -126,6 +126,47 @@ _rtld_relocate_nonplt_objects(Obj_Entry rdbg(("COPY (avoid in main)")); break; + case R_TYPE(TLS_DTPMOD32): + def = _rtld_find_symdef(symnum, obj, &defobj, false); + if (def == NULL) +return -1; + + *where = (Elf_Addr)defobj->tlsindex; + rdbg(("DTPMOD32 %s in %s --> %p in %s", + obj->strtab + obj->symtab[symnum].st_name, + obj->path, (void *)*where, defobj->path)); + break; + + case R_TYPE(TLS_DTPREL32): + def = _rtld_find_symdef
CVS commit: src/sys/arch/news68k
Module Name:src Committed By: tsutsui Date: Tue Nov 22 14:31:02 UTC 2011 Modified Files: src/sys/arch/news68k/dev: kbc.c ms_hb.c timer_hb.c src/sys/arch/news68k/news68k: bus_space.c machdep.c Log Message: Remove more now unnecessary IIOV() conversion. XXX: we should have proper PA to VA macro for TT mappings for readability To generate a diff of this commit: cvs rdiff -u -r1.12 -r1.13 src/sys/arch/news68k/dev/kbc.c cvs rdiff -u -r1.13 -r1.14 src/sys/arch/news68k/dev/ms_hb.c cvs rdiff -u -r1.18 -r1.19 src/sys/arch/news68k/dev/timer_hb.c cvs rdiff -u -r1.10 -r1.11 src/sys/arch/news68k/news68k/bus_space.c cvs rdiff -u -r1.96 -r1.97 src/sys/arch/news68k/news68k/machdep.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/news68k/dev/kbc.c diff -u src/sys/arch/news68k/dev/kbc.c:1.12 src/sys/arch/news68k/dev/kbc.c:1.13 --- src/sys/arch/news68k/dev/kbc.c:1.12 Wed May 14 13:29:28 2008 +++ src/sys/arch/news68k/dev/kbc.c Tue Nov 22 14:31:02 2011 @@ -1,4 +1,4 @@ -/* $NetBSD: kbc.c,v 1.12 2008/05/14 13:29:28 tsutsui Exp $ */ +/* $NetBSD: kbc.c,v 1.13 2011/11/22 14:31:02 tsutsui Exp $ */ /*- * Copyright (C) 2001 Izumi Tsutsui. All rights reserved. @@ -25,7 +25,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: kbc.c,v 1.12 2008/05/14 13:29:28 tsutsui Exp $"); +__KERNEL_RCSID(0, "$NetBSD: kbc.c,v 1.13 2011/11/22 14:31:02 tsutsui Exp $"); #include #include @@ -65,7 +65,7 @@ static int kbc_match(device_t parent, cf if (ha->ha_address == (u_int)-1) return 0; - addr = IIOV(ha->ha_address); /* XXX */ + addr = ha->ha_address; /* XXX */ if (badaddr((void *)addr, 1)) return 0; Index: src/sys/arch/news68k/dev/ms_hb.c diff -u src/sys/arch/news68k/dev/ms_hb.c:1.13 src/sys/arch/news68k/dev/ms_hb.c:1.14 --- src/sys/arch/news68k/dev/ms_hb.c:1.13 Wed May 14 13:29:28 2008 +++ src/sys/arch/news68k/dev/ms_hb.c Tue Nov 22 14:31:02 2011 @@ -1,4 +1,4 @@ -/* $NetBSD: ms_hb.c,v 1.13 2008/05/14 13:29:28 tsutsui Exp $ */ +/* $NetBSD: ms_hb.c,v 1.14 2011/11/22 14:31:02 tsutsui Exp $ */ /*- * Copyright (c) 2001 Izumi Tsutsui. All rights reserved. @@ -51,7 +51,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: ms_hb.c,v 1.13 2008/05/14 13:29:28 tsutsui Exp $"); +__KERNEL_RCSID(0, "$NetBSD: ms_hb.c,v 1.14 2011/11/22 14:31:02 tsutsui Exp $"); #include #include @@ -103,7 +103,7 @@ ms_hb_match(device_t parent, cfdata_t cf if (ha->ha_address == (u_int)-1) return 0; - addr = IIOV(ha->ha_address); /* XXX */ + addr = ha->ha_address; /* XXX */ if (badaddr((void *)addr, 1)) return 0; Index: src/sys/arch/news68k/dev/timer_hb.c diff -u src/sys/arch/news68k/dev/timer_hb.c:1.18 src/sys/arch/news68k/dev/timer_hb.c:1.19 --- src/sys/arch/news68k/dev/timer_hb.c:1.18 Mon Dec 20 00:25:40 2010 +++ src/sys/arch/news68k/dev/timer_hb.c Tue Nov 22 14:31:02 2011 @@ -1,4 +1,4 @@ -/* $NetBSD: timer_hb.c,v 1.18 2010/12/20 00:25:40 matt Exp $ */ +/* $NetBSD: timer_hb.c,v 1.19 2011/11/22 14:31:02 tsutsui Exp $ */ /*- * Copyright (c) 1996 The NetBSD Foundation, Inc. @@ -30,7 +30,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: timer_hb.c,v 1.18 2010/12/20 00:25:40 matt Exp $"); +__KERNEL_RCSID(0, "$NetBSD: timer_hb.c,v 1.19 2011/11/22 14:31:02 tsutsui Exp $"); #include #include @@ -106,7 +106,7 @@ timer_hb_attach(device_t parent, device_ if (ha->ha_ipl != TIMER_LEVEL) panic("clock_hb_attach: wrong interrupt level"); - ctrl_timer = (uint8_t *)IIOV(ha->ha_address); /* XXX needs bus_space */ + ctrl_timer = (uint8_t *)(ha->ha_address); /* XXX needs bus_space */ printf("\n"); Index: src/sys/arch/news68k/news68k/bus_space.c diff -u src/sys/arch/news68k/news68k/bus_space.c:1.10 src/sys/arch/news68k/news68k/bus_space.c:1.11 --- src/sys/arch/news68k/news68k/bus_space.c:1.10 Mon Apr 28 20:23:30 2008 +++ src/sys/arch/news68k/news68k/bus_space.c Tue Nov 22 14:31:02 2011 @@ -1,4 +1,4 @@ -/* $NetBSD: bus_space.c,v 1.10 2008/04/28 20:23:30 martin Exp $ */ +/* $NetBSD: bus_space.c,v 1.11 2011/11/22 14:31:02 tsutsui Exp $ */ /*- * Copyright (c) 1998 The NetBSD Foundation, Inc. @@ -35,7 +35,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: bus_space.c,v 1.10 2008/04/28 20:23:30 martin Exp $"); +__KERNEL_RCSID(0, "$NetBSD: bus_space.c,v 1.11 2011/11/22 14:31:02 tsutsui Exp $"); #include #include @@ -57,7 +57,7 @@ bus_space_map(bus_space_tag_t t, bus_add * Intio space is direct-mapped in pmap_bootstrap(); just * do the translation. */ - *bshp = (bus_space_handle_t)IIOV(bpa); + *bshp = (bus_space_handle_t)bpa; return 0; } Index: src/sys/arch/news68k/news68k/machdep.c diff -u src/sys/arch/news68k/news68k/machdep.c:1.96 src/sys/arch/news68k/news68k/machdep.c:1.97 --- src/sys/arch/news68k/news68k/machdep.c:1.96 Sun Nov 20 15:38:00 2011 +++ src/sys/arch/news68k/news68k/machdep.c Tue Nov 22 14:31:02 2011 @@ -1,4 +1,4 @@ -/* $NetBSD: machdep.c,v 1.96 2011/
CVS commit: src/sys/arch
Module Name:src Committed By: he Date: Tue Nov 22 12:11:39 UTC 2011 Modified Files: src/sys/arch/evbarm/conf: TWINTAIL src/sys/arch/sbmips/conf: GENERIC Log Message: Bump SYMTAB_SPACE so that the symbol table fits again. To generate a diff of this commit: cvs rdiff -u -r1.45 -r1.46 src/sys/arch/evbarm/conf/TWINTAIL cvs rdiff -u -r1.83 -r1.84 src/sys/arch/sbmips/conf/GENERIC Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/evbarm/conf/TWINTAIL diff -u src/sys/arch/evbarm/conf/TWINTAIL:1.45 src/sys/arch/evbarm/conf/TWINTAIL:1.46 --- src/sys/arch/evbarm/conf/TWINTAIL:1.45 Fri Sep 30 04:05:07 2011 +++ src/sys/arch/evbarm/conf/TWINTAIL Tue Nov 22 12:11:39 2011 @@ -1,4 +1,4 @@ -# $NetBSD: TWINTAIL,v 1.45 2011/09/30 04:05:07 he Exp $ +# $NetBSD: TWINTAIL,v 1.46 2011/11/22 12:11:39 he Exp $ # # TWINTAIL -- Genetec corp. G4255EB-X002 Evaluation Board Kernel # @@ -141,7 +141,7 @@ options DIAGNOSTIC # internally consist #options KGDB #options DEBUG_KGDB makeoptions DEBUG="-g -O2" # compile full symbol table -options SYMTAB_SPACE=61 +options SYMTAB_SPACE=62 #options AUDIO_DEBUG=2 config netbsd root on ? type ? Index: src/sys/arch/sbmips/conf/GENERIC diff -u src/sys/arch/sbmips/conf/GENERIC:1.83 src/sys/arch/sbmips/conf/GENERIC:1.84 --- src/sys/arch/sbmips/conf/GENERIC:1.83 Thu Jun 30 20:09:35 2011 +++ src/sys/arch/sbmips/conf/GENERIC Tue Nov 22 12:11:39 2011 @@ -1,10 +1,10 @@ -# $NetBSD: GENERIC,v 1.83 2011/06/30 20:09:35 wiz Exp $ +# $NetBSD: GENERIC,v 1.84 2011/11/22 12:11:39 he Exp $ include "arch/sbmips/conf/std.sbmips" options INCLUDE_CONFIG_FILE # embed config file in kernel binary -#ident "GENERIC-$Revision: 1.83 $" +#ident "GENERIC-$Revision: 1.84 $" #options LOCKDEBUG # XXX XXX XXX XXX #options DEBUG # extra kernel debugging support @@ -33,7 +33,7 @@ options SYSCTL_INCLUDE_DESCR # Include options DDB # kernel dynamic debugger options DDB_HISTORY_SIZE=100 # enable history editing in DDB #makeoptions DEBUG="-g" # compile full symbol table -options SYMTAB_SPACE=38 # size for embedded symbol table +options SYMTAB_SPACE=39 # size for embedded symbol table # Compatibility options options COMPAT_43 # compatibility with 4.3BSD binaries
CVS commit: [jmcneill-audiomp3] src/sys/dev
Module Name:src Committed By: mrg Date: Tue Nov 22 11:50:02 UTC 2011 Modified Files: src/sys/dev [jmcneill-audiomp3]: sequencer.c Log Message: more steps towards making this work: - avoid using uninitialised memory to get a pointer, this fixes hangs in sequencerwrite() and general mayhem when it corrupts random other memory. - re-take sc->lock in sequencewrite() when continuing from the main loop. To generate a diff of this commit: cvs rdiff -u -r1.52.14.3 -r1.52.14.4 src/sys/dev/sequencer.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/dev/sequencer.c diff -u src/sys/dev/sequencer.c:1.52.14.3 src/sys/dev/sequencer.c:1.52.14.4 --- src/sys/dev/sequencer.c:1.52.14.3 Tue Nov 22 07:57:23 2011 +++ src/sys/dev/sequencer.c Tue Nov 22 11:50:02 2011 @@ -1,4 +1,4 @@ -/* $NetBSD: sequencer.c,v 1.52.14.3 2011/11/22 07:57:23 mrg Exp $ */ +/* $NetBSD: sequencer.c,v 1.52.14.4 2011/11/22 11:50:02 mrg Exp $ */ /* * Copyright (c) 1998, 2008 The NetBSD Foundation, Inc. @@ -55,7 +55,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: sequencer.c,v 1.52.14.3 2011/11/22 07:57:23 mrg Exp $"); +__KERNEL_RCSID(0, "$NetBSD: sequencer.c,v 1.52.14.4 2011/11/22 11:50:02 mrg Exp $"); #include "sequencer.h" @@ -240,7 +240,7 @@ sequenceropen(dev_t dev, int flags, int if ((error = sequencer_enter(dev, &sc)) != 0) return error; - sc = &seqdevs[unit]; + KASSERT(sc == &seqdevs[unit]); if (sc->isopen != 0) { sequencer_exit(sc); return EBUSY; @@ -296,7 +296,7 @@ sequenceropen(dev_t dev, int flags, int seq_reset(sc); sequencer_exit(sc); - DPRINTF(("sequenceropen: mode=%d, nmidi=%d\n", sc->mode, sc->nmidi)); + DPRINTF(("%s: mode=%d, nmidi=%d\n", __func__, sc->mode, sc->nmidi)); return 0; } @@ -310,7 +310,7 @@ seq_drain(struct sequencer_softc *sc) DPRINTFN(3, ("seq_drain: %p, len=%d\n", sc, SEQ_QLEN(&sc->outq))); seq_startoutput(sc); error = 0; - while(!SEQ_QEMPTY(&sc->outq) && !error) + while (!SEQ_QEMPTY(&sc->outq) && !error) error = cv_timedwait_sig(&sc->wchan, &sc->lock, 60*hz); return (error); } @@ -357,7 +357,7 @@ seq_startoutput(struct sequencer_softc * if (sc->timeout) return; DPRINTFN(4, ("seq_startoutput: %p, len=%d\n", sc, SEQ_QLEN(q))); - while(!SEQ_QEMPTY(q) && !sc->timeout) { + while (!SEQ_QEMPTY(q) && !sc->timeout) { SEQ_QGET(q, cmd); seq_do_command(sc, &cmd); } @@ -410,7 +410,6 @@ static int seq_input_event(struct sequencer_softc *sc, seq_event_t *cmd) { struct sequencer_queue *q; - proc_t *p; KASSERT(mutex_owned(&sc->lock)); @@ -427,6 +426,8 @@ seq_input_event(struct sequencer_softc * cv_broadcast(&sc->rchan); selnotify(&sc->rsel, 0, NOTE_SUBMIT); if (sc->async != 0) { + proc_t *p; + mutex_enter(proc_lock); if ((p = proc_find(sc->async)) != NULL) psignal(p, SIGIO); @@ -448,6 +449,7 @@ seq_softintr(void *addr) sc = addr; mutex_enter(&sc->lock); + qi.qi_ptr = pcq_get(sc->pcq); if (qi.qi_ptr == NULL) { mutex_exit(&sc->lock); @@ -516,9 +518,10 @@ sequencerread(dev_t dev, struct uio *uio DPRINTFN(20, ("sequencerread: %"PRIx64", count=%d, ioflag=%x\n", dev, (int)uio->uio_resid, ioflag)); - q = &sc->inq; if ((error = sequencer_enter(dev, &sc)) != 0) return error; + q = &sc->inq; + if (sc->mode == SEQ_OLD) { sequencer_exit(sc); DPRINTFN(-1,("sequencerread: old read\n")); @@ -563,22 +566,24 @@ sequencerwrite(dev_t dev, struct uio *ui DPRINTFN(2, ("sequencerwrite: %"PRIx64", count=%d\n", dev, (int)uio->uio_resid)); - q = &sc->outq; - if ((error = sequencer_enter(dev, &sc)) != 0) return error; + q = &sc->outq; + size = sc->mode == SEQ_NEW ? sizeof cmdbuf : SEQOLD_CMDSIZE; while (uio->uio_resid >= size && error == 0) { mutex_exit(&sc->lock); error = uiomove(&cmdbuf, size, uio); if (error == 0) { if (sc->mode == SEQ_OLD && seq_to_new(&cmdbuf, uio)) { +mutex_enter(&sc->lock); continue; } if (cmdbuf.tag == SEQ_FULLSIZE) { /* We do it like OSS does, asynchronously */ error = seq_do_fullsize(sc, &cmdbuf, uio); if (error == 0) { + mutex_enter(&sc->lock); continue; } } @@ -1297,6 +1302,9 @@ midiseq_in(struct midi_dev *md, u_char * struct sequencer_softc *sc; sequencer_pcqitem_t qi; + DPRINTFN(2, ("midiseq_in: %p %02x %02x %02x\n", + md, msg[0], msg[1], msg[2])); + sc = md->seq; qi.qi_msg[0] = msg[0];
CVS commit: src/doc
Module Name:src Committed By: wiz Date: Tue Nov 22 09:06:47 UTC 2011 Modified Files: src/doc: 3RDPARTY Log Message: binutils-2.22 out To generate a diff of this commit: cvs rdiff -u -r1.887 -r1.888 src/doc/3RDPARTY Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/doc/3RDPARTY diff -u src/doc/3RDPARTY:1.887 src/doc/3RDPARTY:1.888 --- src/doc/3RDPARTY:1.887 Wed Nov 9 19:08:59 2011 +++ src/doc/3RDPARTY Tue Nov 22 09:06:47 2011 @@ -1,4 +1,4 @@ -# $NetBSD: 3RDPARTY,v 1.887 2011/11/09 19:08:59 tron Exp $ +# $NetBSD: 3RDPARTY,v 1.888 2011/11/22 09:06:47 wiz Exp $ # # This file contains a list of the software that has been integrated into # NetBSD where we are not the primary maintainer. @@ -133,7 +133,7 @@ Todo[5]: Reconcile the doc directory. Package: binutils Version: 2.21.1a -Current Vers: 2.21.1a +Current Vers: 2.22 Maintainer: FSF Archive Site: ftp://ftp.gnu.org/gnu/binutils/ Home Page: http://www.gnu.org/software/binutils/
CVS commit: [jmcneill-audiomp3] src/sys/arch/shark/ofw
Module Name:src Committed By: mrg Date: Tue Nov 22 08:58:48 UTC 2011 Modified Files: src/sys/arch/shark/ofw [jmcneill-audiomp3]: ofw.c Log Message: IPL_AUDIO is no more To generate a diff of this commit: cvs rdiff -u -r1.56 -r1.56.4.1 src/sys/arch/shark/ofw/ofw.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/shark/ofw/ofw.c diff -u src/sys/arch/shark/ofw/ofw.c:1.56 src/sys/arch/shark/ofw/ofw.c:1.56.4.1 --- src/sys/arch/shark/ofw/ofw.c:1.56 Tue Jul 19 15:07:43 2011 +++ src/sys/arch/shark/ofw/ofw.c Tue Nov 22 08:58:48 2011 @@ -1,4 +1,4 @@ -/* $NetBSD: ofw.c,v 1.56 2011/07/19 15:07:43 dyoung Exp $ */ +/* $NetBSD: ofw.c,v 1.56.4.1 2011/11/22 08:58:48 mrg Exp $ */ /* * Copyright 1997 @@ -41,7 +41,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: ofw.c,v 1.56 2011/07/19 15:07:43 dyoung Exp $"); +__KERNEL_RCSID(0, "$NetBSD: ofw.c,v 1.56.4.1 2011/11/22 08:58:48 mrg Exp $"); #include #include @@ -332,8 +332,8 @@ ofw_boot(int howto, char *bootstr) printf("ipl_bio=%08x ipl_net=%08x ipl_tty=%08x ipl_vm=%08x\n", irqmasks[IPL_BIO], irqmasks[IPL_NET], irqmasks[IPL_TTY], irqmasks[IPL_VM]); - printf("ipl_audio=%08x ipl_clock=%08x ipl_none=%08x\n", - irqmasks[IPL_AUDIO], irqmasks[IPL_CLOCK], irqmasks[IPL_NONE]); + printf("ipl_clock=%08x ipl_none=%08x\n", + irqmasks[IPL_CLOCK], irqmasks[IPL_NONE]); dump_spl_masks(); #endif
CVS commit: [jmcneill-audiomp3] src/sys/dev
Module Name:src Committed By: mrg Date: Tue Nov 22 08:55:44 UTC 2011 Modified Files: src/sys/dev [jmcneill-audiomp3]: midictl.c Log Message: - make this not crash with "midiplay -l" anymore by killing store_thread() with kthread_exit() instead of return - adjust wait channels to be unique - add some asserts that insert it not called while destroy is in progress - note some probably dead code with KASSERT(FALSE) for now To generate a diff of this commit: cvs rdiff -u -r1.6.32.2 -r1.6.32.3 src/sys/dev/midictl.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/dev/midictl.c diff -u src/sys/dev/midictl.c:1.6.32.2 src/sys/dev/midictl.c:1.6.32.3 --- src/sys/dev/midictl.c:1.6.32.2 Tue Nov 22 06:11:12 2011 +++ src/sys/dev/midictl.c Tue Nov 22 08:55:44 2011 @@ -1,4 +1,4 @@ -/* $NetBSD: midictl.c,v 1.6.32.2 2011/11/22 06:11:12 mrg Exp $ */ +/* $NetBSD: midictl.c,v 1.6.32.3 2011/11/22 08:55:44 mrg Exp $ */ /*- * Copyright (c) 2006, 2008 The NetBSD Foundation, Inc. @@ -29,7 +29,7 @@ * POSSIBILITY OF SUCH DAMAGE. */ #include -__KERNEL_RCSID(0, "$NetBSD: midictl.c,v 1.6.32.2 2011/11/22 06:11:12 mrg Exp $"); +__KERNEL_RCSID(0, "$NetBSD: midictl.c,v 1.6.32.3 2011/11/22 08:55:44 mrg Exp $"); /* * See midictl.h for an overview of the purpose and use of this module. @@ -188,9 +188,9 @@ midictl_open(midictl *mc) return ENOMEM; } s->lock = mc->lock; - cv_init(&s->cv, "midictl"); + cv_init(&s->cv, "midictlv"); error = kthread_create(PRI_NONE, KTHREAD_MPSAFE, NULL, store_thread, - s, NULL, "midictl"); + s, NULL, "midictlt"); if (error != 0) { printf("midictl: cannot create kthread, error = %d\n", error); cv_destroy(&s->cv); @@ -225,6 +225,7 @@ midictl_change(midictl *mc, uint_fast8_t _Bool islsb, present; KASSERT(mutex_owned(mc->lock)); + KASSERT(!mc->store->destroy); switch ( ctlval[0] ) { /* @@ -352,6 +353,7 @@ midictl_read(midictl *mc, uint_fast8_t c _Bool islsb, present; KASSERT(mutex_owned(mc->lock)); + KASSERT(!mc->store->destroy); key = ctlr; c = classify(&key, &islsb); @@ -388,6 +390,7 @@ midictl_rpn_read(midictl *mc, uint_fast8 { KASSERT(mutex_owned(mc->lock)); + KASSERT(!mc->store->destroy); return read14(mc, chan, RPN, ctlr, dflt); } @@ -398,6 +401,7 @@ midictl_nrpn_read(midictl *mc, uint_fast { KASSERT(mutex_owned(mc->lock)); + KASSERT(!mc->store->destroy); return read14(mc, chan, NRPN, ctlr, dflt); } @@ -550,7 +554,7 @@ store_thread(void *arg) cv_destroy(&s->cv); kmem_free(s->table, sizeof(*s->table)lock); if (newtbl == NULL) { - kpause("midictl", false, hz, s->lock); + kpause("midictls", false, hz, s->lock); return; } + /* + * If s->lgcapacity is changed from what we saved int oldlgcap + * then someone else has already done this for us. + * XXXMRG but only function changes s->lgcapacity from its + * initial value, and it is called singled threaded from the + * main store_thread(), so this code seems dead to me. + */ if (oldlgcap != s->lgcapacity) { + KASSERT(FALSE); mutex_exit(s->lock); kmem_free(newtbl, sizeof(*newtbl) << newlgcap); mutex_enter(s->lock); return; } - for ( oidx = 1 0 ; ) { - if (!(s->table[oidx] & IS_USED) ) + for (oidx = 1 << s->lgcapacity ; oidx-- > 0 ; ) { + if (!(s->table[oidx] & IS_USED)) continue; - if ( s->table[oidx] & IS_CTL7 ) + if (s->table[oidx] & IS_CTL7) mask = 0x; else mask = 0x3f;