CVS commit: src/sys/ufs/ufs
Module Name:src Committed By: tsutsui Date: Sun Jan 29 08:49:02 UTC 2012 Modified Files: src/sys/ufs/ufs: ufs_vfsops.c Log Message: Fix errors in !defined(QUOTA) !defined(QUOTA2) case. To generate a diff of this commit: cvs rdiff -u -r1.48 -r1.49 src/sys/ufs/ufs/ufs_vfsops.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/ufs/ufs/ufs_vfsops.c diff -u src/sys/ufs/ufs/ufs_vfsops.c:1.48 src/sys/ufs/ufs/ufs_vfsops.c:1.49 --- src/sys/ufs/ufs/ufs_vfsops.c:1.48 Sun Jan 29 07:16:54 2012 +++ src/sys/ufs/ufs/ufs_vfsops.c Sun Jan 29 08:49:01 2012 @@ -1,4 +1,4 @@ -/* $NetBSD: ufs_vfsops.c,v 1.48 2012/01/29 07:16:54 dholland Exp $ */ +/* $NetBSD: ufs_vfsops.c,v 1.49 2012/01/29 08:49:01 tsutsui Exp $ */ /* * Copyright (c) 1991, 1993, 1994 @@ -37,7 +37,7 @@ */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: ufs_vfsops.c,v 1.48 2012/01/29 07:16:54 dholland Exp $); +__KERNEL_RCSID(0, $NetBSD: ufs_vfsops.c,v 1.49 2012/01/29 08:49:01 tsutsui Exp $); #if defined(_KERNEL_OPT) #include opt_ffs.h @@ -102,15 +102,13 @@ ufs_root(struct mount *mp, struct vnode int ufs_quotactl(struct mount *mp, struct vfs_quotactl_args *args) { - struct lwp *l = curlwp; #if !defined(QUOTA) !defined(QUOTA2) (void) mp; - (void) cmddict; - (void) dummy; - (void) l; + (void) args; return (EOPNOTSUPP); #else + struct lwp *l = curlwp; int error; /* Mark the mount busy, as we're passing it to kauth(9). */
CVS commit: src/lib/libperfuse
Module Name:src Committed By: dholland Date: Sun Jan 29 09:01:31 UTC 2012 Modified Files: src/lib/libperfuse: debug.c Log Message: Fix 32-bit build To generate a diff of this commit: cvs rdiff -u -r1.9 -r1.10 src/lib/libperfuse/debug.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/lib/libperfuse/debug.c diff -u src/lib/libperfuse/debug.c:1.9 src/lib/libperfuse/debug.c:1.10 --- src/lib/libperfuse/debug.c:1.9 Sun Jan 29 06:22:01 2012 +++ src/lib/libperfuse/debug.c Sun Jan 29 09:01:31 2012 @@ -1,4 +1,4 @@ -/* $NetBSD: debug.c,v 1.9 2012/01/29 06:22:01 manu Exp $ */ +/* $NetBSD: debug.c,v 1.10 2012/01/29 09:01:31 dholland Exp $ */ /*- * Copyright (c) 2010 Emmanuel Dreyfus. All rights reserved. @@ -220,8 +220,8 @@ perfuse_trace_dump(pu, fp) TAILQ_FOREACH(pt, ps-ps_trace, pt_list) { const char *quote = pt-pt_path[0] != '\0' ? \ : ; - fprintf(fp, %ld.%09ld %s %s%s%s %s , - pt-pt_start.tv_sec, pt-pt_start.tv_nsec, + fprintf(fp, %lld.%09ld %s %s%s%s %s , + (long long)pt-pt_start.tv_sec, pt-pt_start.tv_nsec, perfuse_opname(pt-pt_opcode), quote, pt-pt_path, quote, pt-pt_extra); @@ -233,8 +233,9 @@ perfuse_trace_dump(pu, fp) ts.tv_nsec = 0; /* delint */ timespecsub(pt-pt_end, pt-pt_start, ts); - fprintf(fp, error = %d elapsed = %ld.%09lu , -pt-pt_error, ts.tv_sec, ts.tv_nsec); + fprintf(fp, error = %d elapsed = %lld.%09lu , +pt-pt_error, (long long)ts.tv_sec, +ts.tv_nsec); count[pt-pt_opcode]++; timespecadd(ts_total[pt-pt_opcode], @@ -267,11 +268,12 @@ perfuse_trace_dump(pu, fp) min = 0; } - fprintf(fp, %s\t%d\t%ld.%09ld\t%ld.%09ld\t%ld.%09ld\t\n, + fprintf(fp, %s\t%d\t%lld.%09ld\t%lld.%09ld\t%lld.%09ld\t\n, perfuse_opname(i), count[i], - min, ts_min[i].tv_nsec, - (time_t)(avg / 10L), (long)(avg % 10L), - ts_max[i].tv_sec, ts_max[i].tv_nsec); + (long long)min, ts_min[i].tv_nsec, + (long long)(time_t)(avg / 10L), + (long)(avg % 10L), + (long long)ts_max[i].tv_sec, ts_max[i].tv_nsec); } (void)fflush(fp);
CVS commit: src/sys/arch/arm/xscale
Module Name:src Committed By: tsutsui Date: Sun Jan 29 09:08:05 UTC 2012 Modified Files: src/sys/arch/arm/xscale: pxa2x0_dmac.c Log Message: Handle PXA25x specific DMAC constraints. From kiyohara@. To generate a diff of this commit: cvs rdiff -u -r1.9 -r1.10 src/sys/arch/arm/xscale/pxa2x0_dmac.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/arm/xscale/pxa2x0_dmac.c diff -u src/sys/arch/arm/xscale/pxa2x0_dmac.c:1.9 src/sys/arch/arm/xscale/pxa2x0_dmac.c:1.10 --- src/sys/arch/arm/xscale/pxa2x0_dmac.c:1.9 Wed Nov 23 23:07:29 2011 +++ src/sys/arch/arm/xscale/pxa2x0_dmac.c Sun Jan 29 09:08:04 2012 @@ -1,4 +1,4 @@ -/* $NetBSD: pxa2x0_dmac.c,v 1.9 2011/11/23 23:07:29 jmcneill Exp $ */ +/* $NetBSD: pxa2x0_dmac.c,v 1.10 2012/01/29 09:08:04 tsutsui Exp $ */ /* * Copyright (c) 2003, 2005 Wasabi Systems, Inc. @@ -766,24 +766,39 @@ static inline int dmac_validate_desc(struct dmac_xfer_desc *xd, size_t *psize, bool *misaligned_flag) { + bus_dma_segment_t *dma_segs = xd-xd_dma_segs; + bus_addr_t periph_end; + bus_size_t align; size_t size; - int i; + int i, nsegs = xd-xd_nsegs; /* * Make sure the transfer parameters are acceptable. */ if (xd-xd_addr_hold - (xd-xd_nsegs != 1 || xd-xd_dma_segs[0].ds_len == 0)) + (nsegs != 1 || dma_segs[0].ds_len == 0)) return (EINVAL); - for (i = 0, size = 0; i xd-xd_nsegs; i++) { - if (xd-xd_dma_segs[i].ds_addr 0x7) { + periph_end = CPU_IS_PXA270 ? PXA270_PERIPH_END : PXA250_PERIPH_END; + for (i = 0, size = 0; i nsegs; i++) { + if (dma_segs[i].ds_addr = PXA2X0_PERIPH_START + dma_segs[i].ds_addr + dma_segs[i].ds_len periph_end) + /* Internal Peripherals. */ + align = 0x03; + else /* Companion-Chip/External Peripherals/External Memory. */ + align = 0x07; + /* + * : + * Also PXA27x has more constraints by pairs Source/Target. + */ + + if (dma_segs[i].ds_addr align) { if (!CPU_IS_PXA270) return (EFAULT); *misaligned_flag = true; } - size += xd-xd_dma_segs[i].ds_len; + size += dma_segs[i].ds_len; } *psize = size;
CVS commit: src/doc
Module Name:src Committed By: tsutsui Date: Sun Jan 29 10:28:13 UTC 2012 Modified Files: src/doc: CHANGES Log Message: Note zaurus SL-C700/750/760/860 suuport. To generate a diff of this commit: cvs rdiff -u -r1.1658 -r1.1659 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.1658 src/doc/CHANGES:1.1659 --- src/doc/CHANGES:1.1658 Sat Jan 28 19:49:33 2012 +++ src/doc/CHANGES Sun Jan 29 10:28:13 2012 @@ -1,4 +1,4 @@ -# LIST OF CHANGES FROM LAST RELEASE: $Revision: 1.1658 $ +# LIST OF CHANGES FROM LAST RELEASE: $Revision: 1.1659 $ # # # [Note: This file does not mention every change made to the NetBSD source tree. @@ -1221,3 +1221,5 @@ Changes from NetBSD 5.0 to NetBSD 6.0: kernel: Remove ltsleep(9) and wakeup_one(9). [rmind 20120128] TrouSerS: Import trousers-0.3.8 [christos 20120127] tpm-tools: Import tpm-tools-1.3.7.1 [christos 20120128] + zaurus: Add PXA25x based Zaurus SL-C700/750/760/860 suuport + ported by TOYOKURA Atsushi. [tsutsui 20120129]
CVS commit: src/sys/arch
Module Name:src Committed By: tsutsui Date: Sun Jan 29 10:29:53 UTC 2012 Modified Files: src/sys/arch: README Log Message: NetBSD/zaurus now supports SL-C7x0/860/1000/3x00. To generate a diff of this commit: cvs rdiff -u -r1.57 -r1.58 src/sys/arch/README 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/README diff -u src/sys/arch/README:1.57 src/sys/arch/README:1.58 --- src/sys/arch/README:1.57 Mon Jan 9 13:51:54 2012 +++ src/sys/arch/README Sun Jan 29 10:29:53 2012 @@ -1,4 +1,4 @@ -$NetBSD: README,v 1.57 2012/01/09 13:51:54 phx Exp $ +$NetBSD: README,v 1.58 2012/01/29 10:29:53 tsutsui Exp $ acorn26 arm 2509 Acorn ARM2- and ARM3-based machines acorn32 arm 2008 Acorn computers Ltd. ARM 6/7/SA based machines @@ -56,7 +56,7 @@ sun3 m68k 19930625 Sun m680[23]0 based m vax vax 19940802 Digital Equipment Corp. VAX machines x68k m68k 19960505 Sharp X68000, X68030 xen xen 20040311 Xen virtual machine monitor -zaurus arm 20061217 Sharp Zaurus C3x00 PDAs +zaurus arm 20061217 Sharp Zaurus C7x0/860/1000/3x00 PDAs Generic cpu features shared among multiple ports arm: ARM CPU based platform files
CVS commit: src/sys/arch
Module Name:src Committed By: tsutsui Date: Sun Jan 29 10:32:53 UTC 2012 Modified Files: src/sys/arch: README Log Message: OMRON was Tateisi Electronics, not Tateishi Electric. http://www.omron.com/about/corporate/history/chronicle/ To generate a diff of this commit: cvs rdiff -u -r1.58 -r1.59 src/sys/arch/README 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/README diff -u src/sys/arch/README:1.58 src/sys/arch/README:1.59 --- src/sys/arch/README:1.58 Sun Jan 29 10:29:53 2012 +++ src/sys/arch/README Sun Jan 29 10:32:53 2012 @@ -1,4 +1,4 @@ -$NetBSD: README,v 1.58 2012/01/29 10:29:53 tsutsui Exp $ +$NetBSD: README,v 1.59 2012/01/29 10:32:53 tsutsui Exp $ acorn26 arm 2509 Acorn ARM2- and ARM3-based machines acorn32 arm 2008 Acorn computers Ltd. ARM 6/7/SA based machines @@ -30,7 +30,7 @@ ia64 ia64 Intel Itanium/Itanium ibmnws powerpc IBM Network Station Thin Clients iyonix arm 20040713 Castle Technology xscale based workstations landisk sh3el 20060901 SH4 processor based NAS appliances by I-O DATA -luna68k m68k 2105 LUNA product line of OMRON Tateishi Electric +luna68k m68k 2105 LUNA product line of OMRON Tateisi Electronics mac68k m68k 19930929 Apple Macintosh macppc powerpc,powerpc64 19980515 Apple Power Macintosh and clones mipsco mipseb 2812 MIPS Corp Magnum 3000 computers
CVS commit: src/etc/etc.zaurus
Module Name:src Committed By: tsutsui Date: Sun Jan 29 10:36:33 UTC 2012 Modified Files: src/etc/etc.zaurus: Makefile.inc Log Message: Build additional C700 kernel (for now). To generate a diff of this commit: cvs rdiff -u -r1.6 -r1.7 src/etc/etc.zaurus/Makefile.inc Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/etc/etc.zaurus/Makefile.inc diff -u src/etc/etc.zaurus/Makefile.inc:1.6 src/etc/etc.zaurus/Makefile.inc:1.7 --- src/etc/etc.zaurus/Makefile.inc:1.6 Thu Mar 5 10:28:02 2009 +++ src/etc/etc.zaurus/Makefile.inc Sun Jan 29 10:36:33 2012 @@ -1,9 +1,10 @@ -# $NetBSD: Makefile.inc,v 1.6 2009/03/05 10:28:02 nonaka Exp $ +# $NetBSD: Makefile.inc,v 1.7 2012/01/29 10:36:33 tsutsui Exp $ # # etc.zaurus/Makefile.inc -- zaurus-specific etc Makefile targets # KERNEL_SETS= GENERIC +KERNEL_SETS+= C700 BUILD_KERNELS= INSTALL
CVS commit: src/sys/dev/pci
Module Name:src Committed By: drochner Date: Sun Jan 29 11:31:38 UTC 2012 Modified Files: src/sys/dev/pci: pci_subr.c pcivar.h ppb.c Log Message: extend the pci_aprint_devinfo slightly to cover the cases commonly used by drivers: a short name for the quiet/naive case and a string to override the pcidevs based name by one provided by the driver, ride on yesterday's kernel minor version bump To generate a diff of this commit: cvs rdiff -u -r1.89 -r1.90 src/sys/dev/pci/pci_subr.c cvs rdiff -u -r1.97 -r1.98 src/sys/dev/pci/pcivar.h cvs rdiff -u -r1.48 -r1.49 src/sys/dev/pci/ppb.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/pci/pci_subr.c diff -u src/sys/dev/pci/pci_subr.c:1.89 src/sys/dev/pci/pci_subr.c:1.90 --- src/sys/dev/pci/pci_subr.c:1.89 Thu Jan 26 21:17:28 2012 +++ src/sys/dev/pci/pci_subr.c Sun Jan 29 11:31:38 2012 @@ -1,4 +1,4 @@ -/* $NetBSD: pci_subr.c,v 1.89 2012/01/26 21:17:28 drochner Exp $ */ +/* $NetBSD: pci_subr.c,v 1.90 2012/01/29 11:31:38 drochner Exp $ */ /* * Copyright (c) 1997 Zubin D. Dittia. All rights reserved. @@ -40,7 +40,7 @@ */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: pci_subr.c,v 1.89 2012/01/26 21:17:28 drochner Exp $); +__KERNEL_RCSID(0, $NetBSD: pci_subr.c,v 1.90 2012/01/29 11:31:38 drochner Exp $); #ifdef _KERNEL_OPT #include opt_pci.h @@ -423,14 +423,27 @@ pci_devinfo(pcireg_t id_reg, pcireg_t cl #ifdef _KERNEL void -pci_aprint_devinfo(const struct pci_attach_args *pa) +pci_aprint_devinfo_fancy(const struct pci_attach_args *pa, const char *naive, + const char *known, int addrev) { char devinfo[256]; - pci_devinfo(pa-pa_id, pa-pa_class, 0, devinfo, sizeof(devinfo)); - aprint_normal(: %s (rev. 0x%02x)\n, devinfo, - PCI_REVISION(pa-pa_class)); - aprint_naive(\n); + if (known) { + aprint_normal(: %s, known); + if (addrev) + aprint_normal( (rev. 0x%02x), + PCI_REVISION(pa-pa_class)); + aprint_normal(\n); + } else { + pci_devinfo(pa-pa_id, pa-pa_class, 0, + devinfo, sizeof(devinfo)); + aprint_normal(: %s (rev. 0x%02x)\n, devinfo, + PCI_REVISION(pa-pa_class)); + } + if (naive) + aprint_naive(: %s\n, naive); + else + aprint_naive(\n); } #endif Index: src/sys/dev/pci/pcivar.h diff -u src/sys/dev/pci/pcivar.h:1.97 src/sys/dev/pci/pcivar.h:1.98 --- src/sys/dev/pci/pcivar.h:1.97 Thu Jan 26 21:17:28 2012 +++ src/sys/dev/pci/pcivar.h Sun Jan 29 11:31:38 2012 @@ -1,4 +1,4 @@ -/* $NetBSD: pcivar.h,v 1.97 2012/01/26 21:17:28 drochner Exp $ */ +/* $NetBSD: pcivar.h,v 1.98 2012/01/29 11:31:38 drochner Exp $ */ /* * Copyright (c) 1996, 1997 Christopher G. Demetriou. All rights reserved. @@ -283,7 +283,10 @@ int pci_probe_device(struct pci_softc *, int (*)(const struct pci_attach_args *), struct pci_attach_args *); void pci_devinfo(pcireg_t, pcireg_t, int, char *, size_t); -void pci_aprint_devinfo(const struct pci_attach_args *); +void pci_aprint_devinfo_fancy(const struct pci_attach_args *, + const char *, const char *, int); +#define pci_aprint_devinfo(pap, naive) \ + pci_aprint_devinfo_fancy(pap, naive, NULL, 0); void pci_conf_print(pci_chipset_tag_t, pcitag_t, void (*)(pci_chipset_tag_t, pcitag_t, const pcireg_t *)); const struct pci_quirkdata * Index: src/sys/dev/pci/ppb.c diff -u src/sys/dev/pci/ppb.c:1.48 src/sys/dev/pci/ppb.c:1.49 --- src/sys/dev/pci/ppb.c:1.48 Thu Jan 26 21:17:28 2012 +++ src/sys/dev/pci/ppb.c Sun Jan 29 11:31:38 2012 @@ -1,4 +1,4 @@ -/* $NetBSD: ppb.c,v 1.48 2012/01/26 21:17:28 drochner Exp $ */ +/* $NetBSD: ppb.c,v 1.49 2012/01/29 11:31:38 drochner Exp $ */ /* * Copyright (c) 1996, 1998 Christopher G. Demetriou. All rights reserved. @@ -31,7 +31,7 @@ */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: ppb.c,v 1.48 2012/01/26 21:17:28 drochner Exp $); +__KERNEL_RCSID(0, $NetBSD: ppb.c,v 1.49 2012/01/29 11:31:38 drochner Exp $); #include sys/param.h #include sys/systm.h @@ -159,7 +159,7 @@ ppbattach(device_t parent, device_t self struct pcibus_attach_args pba; pcireg_t busdata; - pci_aprint_devinfo(pa); + pci_aprint_devinfo(pa, NULL); sc-sc_pc = pc; sc-sc_tag = pa-pa_tag;
CVS commit: src/usr.sbin/perfused
Module Name:src Committed By: wiz Date: Sun Jan 29 11:32:23 UTC 2012 Modified Files: src/usr.sbin/perfused: perfused.8 Log Message: New sentence, new line. Remove trailing whitespace. Bump PKGREVISION for previous. To generate a diff of this commit: cvs rdiff -u -r1.10 -r1.11 src/usr.sbin/perfused/perfused.8 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/usr.sbin/perfused/perfused.8 diff -u src/usr.sbin/perfused/perfused.8:1.10 src/usr.sbin/perfused/perfused.8:1.11 --- src/usr.sbin/perfused/perfused.8:1.10 Sun Jan 29 06:22:02 2012 +++ src/usr.sbin/perfused/perfused.8 Sun Jan 29 11:32:23 2012 @@ -1,4 +1,4 @@ -.\ $NetBSD: perfused.8,v 1.10 2012/01/29 06:22:02 manu Exp $ +.\ $NetBSD: perfused.8,v 1.11 2012/01/29 11:32:23 wiz Exp $ .\ .\ Copyright (c) 2010 Emmanuel Dreyfus. All rights reserved. .\ @@ -23,7 +23,7 @@ .\ ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE .\ POSSIBILITY OF SUCH DAMAGE. .\ -.Dd August 12, 2010 +.Dd January 29, 2012 .Dt PERFUSED 8 .Os .Sh NAME @@ -126,8 +126,9 @@ If the flag was used, toggle debug output. Do nothing otherwise. .It Dv SIGUSR1 -Toggle FUSE operation dump on and off. When toggling off, the trace -is is stored in +Toggle FUSE operation dump on and off. +When toggling off, the trace +is is stored in .Pa /var/run/perfuse-xxx.trace (xxx is the filesystem mount point). .El
CVS commit: src/sys/arch/x86/x86
Module Name:src Committed By: cherry Date: Sun Jan 29 11:37:08 UTC 2012 Modified Files: src/sys/arch/x86/x86: pmap.c Log Message: Remove apte related shootdowns. To generate a diff of this commit: cvs rdiff -u -r1.157 -r1.158 src/sys/arch/x86/x86/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/x86/pmap.c diff -u src/sys/arch/x86/x86/pmap.c:1.157 src/sys/arch/x86/x86/pmap.c:1.158 --- src/sys/arch/x86/x86/pmap.c:1.157 Sat Jan 28 08:57:09 2012 +++ src/sys/arch/x86/x86/pmap.c Sun Jan 29 11:37:08 2012 @@ -1,4 +1,4 @@ -/* $NetBSD: pmap.c,v 1.157 2012/01/28 08:57:09 cherry Exp $ */ +/* $NetBSD: pmap.c,v 1.158 2012/01/29 11:37:08 cherry Exp $ */ /*- * Copyright (c) 2008, 2010 The NetBSD Foundation, Inc. @@ -171,7 +171,7 @@ */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: pmap.c,v 1.157 2012/01/28 08:57:09 cherry Exp $); +__KERNEL_RCSID(0, $NetBSD: pmap.c,v 1.158 2012/01/29 11:37:08 cherry Exp $); #include opt_user_ldt.h #include opt_lockdebug.h @@ -1869,12 +1869,6 @@ pmap_free_ptp(struct pmap *pmap, struct int level; vaddr_t invaladdr; pd_entry_t opde; -#ifdef XEN - struct pmap *curpmap = vm_map_pmap(curlwp-l_proc-p_vmspace-vm_map); -#ifdef MULTIPROCESSOR - vaddr_t invaladdr2; -#endif -#endif KASSERT(pmap != pmap_kernel()); KASSERT(mutex_owned(pmap-pm_lock)); @@ -1901,16 +1895,8 @@ pmap_free_ptp(struct pmap *pmap, struct # endif /*__x86_64__ */ invaladdr = level == 1 ? (vaddr_t)ptes : (vaddr_t)pdes[level - 2]; - pmap_tlb_shootdown(curpmap, invaladdr + index * PAGE_SIZE, + pmap_tlb_shootdown(pmap, invaladdr + index * PAGE_SIZE, opde, TLBSHOOT_FREE_PTP1); -# if defined(MULTIPROCESSOR) - invaladdr2 = level == 1 ? (vaddr_t)PTE_BASE : - (vaddr_t)normal_pdes[level - 2]; - if (pmap != curpmap || invaladdr != invaladdr2) { - pmap_tlb_shootdown(pmap, invaladdr2 + index * PAGE_SIZE, - opde, TLBSHOOT_FREE_PTP2); - } -# endif /* MULTIPROCESSOR */ #else /* XEN */ invaladdr = level == 1 ? (vaddr_t)ptes : (vaddr_t)pdes[level - 2];
CVS commit: src/sys/arch/x86/x86
Module Name:src Committed By: cherry Date: Sun Jan 29 11:37:44 UTC 2012 Modified Files: src/sys/arch/x86/x86: pmap.c Log Message: remove obsolete comment To generate a diff of this commit: cvs rdiff -u -r1.158 -r1.159 src/sys/arch/x86/x86/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/x86/pmap.c diff -u src/sys/arch/x86/x86/pmap.c:1.158 src/sys/arch/x86/x86/pmap.c:1.159 --- src/sys/arch/x86/x86/pmap.c:1.158 Sun Jan 29 11:37:08 2012 +++ src/sys/arch/x86/x86/pmap.c Sun Jan 29 11:37:44 2012 @@ -1,4 +1,4 @@ -/* $NetBSD: pmap.c,v 1.158 2012/01/29 11:37:08 cherry Exp $ */ +/* $NetBSD: pmap.c,v 1.159 2012/01/29 11:37:44 cherry Exp $ */ /*- * Copyright (c) 2008, 2010 The NetBSD Foundation, Inc. @@ -171,7 +171,7 @@ */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: pmap.c,v 1.158 2012/01/29 11:37:08 cherry Exp $); +__KERNEL_RCSID(0, $NetBSD: pmap.c,v 1.159 2012/01/29 11:37:44 cherry Exp $); #include opt_user_ldt.h #include opt_lockdebug.h @@ -2348,10 +2348,6 @@ pmap_destroy(struct pmap *pmap) KASSERT(TAILQ_EMPTY(pmap-pm_obj[i].memq)); } - /* - * MULTIPROCESSOR -- no need to flush out of other processors' - * APTE space because we do that in pmap_unmap_ptes(). - */ pool_cache_put(pmap_pdp_cache, pmap-pm_pdir); #ifdef USER_LDT
CVS commit: src/lib/libc/sys
Module Name:src Committed By: wiz Date: Sun Jan 29 11:44:54 UTC 2012 Modified Files: src/lib/libc/sys: clone.2 Log Message: Add Nm for __clone, man page is already linked to that name. Noted by Abhinav Upadhyay. To generate a diff of this commit: cvs rdiff -u -r1.12 -r1.13 src/lib/libc/sys/clone.2 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/sys/clone.2 diff -u src/lib/libc/sys/clone.2:1.12 src/lib/libc/sys/clone.2:1.13 --- src/lib/libc/sys/clone.2:1.12 Tue May 4 06:13:43 2010 +++ src/lib/libc/sys/clone.2 Sun Jan 29 11:44:54 2012 @@ -1,4 +1,4 @@ -.\ $NetBSD: clone.2,v 1.12 2010/05/04 06:13:43 jruoho Exp $ +.\ $NetBSD: clone.2,v 1.13 2012/01/29 11:44:54 wiz Exp $ .\ .\ Copyright (c) 2001 The NetBSD Foundation, Inc. .\ All rights reserved. @@ -31,7 +31,8 @@ .Dt CLONE 2 .Os .Sh NAME -.Nm clone +.Nm clone , +.Nm __clone .Nd spawn new process with options .Sh LIBRARY .Lb libc
CVS commit: src/sys/arch/x86/x86
Module Name:src Committed By: drochner Date: Sun Jan 29 11:45:37 UTC 2012 Modified Files: src/sys/arch/x86/x86: pmap.c Log Message: don't mess with the PDP pool cache before it is initialized, prevents at least LOCKDEBUG panics To generate a diff of this commit: cvs rdiff -u -r1.159 -r1.160 src/sys/arch/x86/x86/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/x86/pmap.c diff -u src/sys/arch/x86/x86/pmap.c:1.159 src/sys/arch/x86/x86/pmap.c:1.160 --- src/sys/arch/x86/x86/pmap.c:1.159 Sun Jan 29 11:37:44 2012 +++ src/sys/arch/x86/x86/pmap.c Sun Jan 29 11:45:37 2012 @@ -1,4 +1,4 @@ -/* $NetBSD: pmap.c,v 1.159 2012/01/29 11:37:44 cherry Exp $ */ +/* $NetBSD: pmap.c,v 1.160 2012/01/29 11:45:37 drochner Exp $ */ /*- * Copyright (c) 2008, 2010 The NetBSD Foundation, Inc. @@ -171,7 +171,7 @@ */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: pmap.c,v 1.159 2012/01/29 11:37:44 cherry Exp $); +__KERNEL_RCSID(0, $NetBSD: pmap.c,v 1.160 2012/01/29 11:45:37 drochner Exp $); #include opt_user_ldt.h #include opt_lockdebug.h @@ -4275,7 +4275,7 @@ pmap_growkernel(vaddr_t maxkvaddr) mutex_exit(kpm-pm_lock); splx(s); - if (invalidate) { + if (invalidate pmap_initialized) { /* Invalidate the PDP cache. */ pool_cache_invalidate(pmap_pdp_cache); }
CVS commit: src/sys/external/bsd/drm/dist/bsd-core
Module Name:src Committed By: drochner Date: Sun Jan 29 11:49:02 UTC 2012 Modified Files: src/sys/external/bsd/drm/dist/bsd-core: drm_bufs.c Log Message: remove incomplete conversion to kmem_alloc -- inconsistent use leads at least to diagnostic panics To generate a diff of this commit: cvs rdiff -u -r1.9 -r1.10 src/sys/external/bsd/drm/dist/bsd-core/drm_bufs.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/external/bsd/drm/dist/bsd-core/drm_bufs.c diff -u src/sys/external/bsd/drm/dist/bsd-core/drm_bufs.c:1.9 src/sys/external/bsd/drm/dist/bsd-core/drm_bufs.c:1.10 --- src/sys/external/bsd/drm/dist/bsd-core/drm_bufs.c:1.9 Fri Jan 27 19:48:40 2012 +++ src/sys/external/bsd/drm/dist/bsd-core/drm_bufs.c Sun Jan 29 11:49:02 2012 @@ -36,10 +36,6 @@ #include dev/pci/pcireg.h #endif -#if defined(__NetBSD__) -#include sys/kmem.h -#endif - #include drmP.h /* Allocation of PCI memory resources (framebuffer, registers, etc.) for @@ -188,11 +184,7 @@ int drm_addmap(struct drm_device * dev, map-mtrr = 1; break; case _DRM_SHM: -#if defined(__NetBSD__) - map-handle = kmem_alloc(map-size, KM_NOSLEEP); -#else map-handle = malloc(map-size, DRM_MEM_MAPS, M_NOWAIT); -#endif DRM_DEBUG(%lu %d %p\n, map-size, drm_order(map-size), map-handle); if (!map-handle) { @@ -206,11 +198,7 @@ int drm_addmap(struct drm_device * dev, DRM_LOCK(); if (dev-lock.hw_lock != NULL) { DRM_UNLOCK(); -#if defined(__NetBSD__) -kmem_free(map-handle, map-size); -#else free(map-handle, DRM_MEM_MAPS); -#endif free(map, DRM_MEM_MAPS); return EBUSY; } @@ -350,11 +338,7 @@ void drm_rmmap(struct drm_device *dev, d } break; case _DRM_SHM: -#if defined(__NetBSD__) - kmem_free(map-handle, map-size); -#else free(map-handle, DRM_MEM_MAPS); -#endif break; case _DRM_AGP: case _DRM_SCATTER_GATHER:
CVS commit: src/sys/arch/sparc/sparc
Module Name:src Committed By: para Date: Sun Jan 29 11:49:58 UTC 2012 Modified Files: src/sys/arch/sparc/sparc: pmap.c Log Message: fix sparc after kmem_map is gone To generate a diff of this commit: cvs rdiff -u -r1.347 -r1.348 src/sys/arch/sparc/sparc/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/sparc/sparc/pmap.c diff -u src/sys/arch/sparc/sparc/pmap.c:1.347 src/sys/arch/sparc/sparc/pmap.c:1.348 --- src/sys/arch/sparc/sparc/pmap.c:1.347 Sat Oct 22 21:00:40 2011 +++ src/sys/arch/sparc/sparc/pmap.c Sun Jan 29 11:49:58 2012 @@ -1,4 +1,4 @@ -/* $NetBSD: pmap.c,v 1.347 2011/10/22 21:00:40 mrg Exp $ */ +/* $NetBSD: pmap.c,v 1.348 2012/01/29 11:49:58 para Exp $ */ /* * Copyright (c) 1996 @@ -56,7 +56,7 @@ */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: pmap.c,v 1.347 2011/10/22 21:00:40 mrg Exp $); +__KERNEL_RCSID(0, $NetBSD: pmap.c,v 1.348 2012/01/29 11:49:58 para Exp $); #include opt_ddb.h #include opt_kgdb.h @@ -880,7 +880,7 @@ pgt_page_alloc(struct pool *pp, int flag return (NULL); /* Allocate virtual memory */ - va = uvm_km_alloc(kmem_map, PAGE_SIZE, 0, UVM_KMF_VAONLY | + va = uvm_km_alloc(kernel_map, PAGE_SIZE, 0, UVM_KMF_VAONLY | ((flags PR_WAITOK) ? 0 : UVM_KMF_NOWAIT | UVM_KMF_TRYLOCK)); if (va == 0) { uvm_pagefree(pg); @@ -917,7 +917,7 @@ pgt_page_free(struct pool *pp, void *v) KASSERT(rv); uvm_pagefree(PHYS_TO_VM_PAGE(pa)); pmap_kremove(va, PAGE_SIZE); - uvm_km_free(kmem_map, va, PAGE_SIZE, UVM_KMF_VAONLY); + uvm_km_free(kernel_map, va, PAGE_SIZE, UVM_KMF_VAONLY); } #endif /* SUN4M || SUN4D */
CVS commit: src/sys/ufs/ufs
Module Name:src Committed By: para Date: Sun Jan 29 11:59:14 UTC 2012 Modified Files: src/sys/ufs/ufs: ufs_quota.c Log Message: sprinkel some #ifdef QUOTA2 to avoid unused variables To generate a diff of this commit: cvs rdiff -u -r1.104 -r1.105 src/sys/ufs/ufs/ufs_quota.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/ufs/ufs/ufs_quota.c diff -u src/sys/ufs/ufs/ufs_quota.c:1.104 src/sys/ufs/ufs/ufs_quota.c:1.105 --- src/sys/ufs/ufs/ufs_quota.c:1.104 Sun Jan 29 07:16:53 2012 +++ src/sys/ufs/ufs/ufs_quota.c Sun Jan 29 11:59:14 2012 @@ -1,4 +1,4 @@ -/* $NetBSD: ufs_quota.c,v 1.104 2012/01/29 07:16:53 dholland Exp $ */ +/* $NetBSD: ufs_quota.c,v 1.105 2012/01/29 11:59:14 para Exp $ */ /* * Copyright (c) 1982, 1986, 1990, 1993, 1995 @@ -35,7 +35,7 @@ */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: ufs_quota.c,v 1.104 2012/01/29 07:16:53 dholland Exp $); +__KERNEL_RCSID(0, $NetBSD: ufs_quota.c,v 1.105 2012/01/29 11:59:14 para Exp $); #if defined(_KERNEL_OPT) #include opt_quota.h @@ -430,7 +430,9 @@ static int quota_handle_cmd_cursoropen(struct mount *mp, struct lwp *l, struct vfs_quotactl_args *args) { +#ifdef QUOTA2 struct ufsmount *ump = VFSTOUFS(mp); +#endif struct quotakcursor *cursor; int error; @@ -456,7 +458,9 @@ static int quota_handle_cmd_cursorclose(struct mount *mp, struct lwp *l, struct vfs_quotactl_args *args) { +#ifdef QUOTA2 struct ufsmount *ump = VFSTOUFS(mp); +#endif struct quotakcursor *cursor; int error; @@ -482,7 +486,9 @@ static int quota_handle_cmd_cursorskipidtype(struct mount *mp, struct lwp *l, struct vfs_quotactl_args *args) { +#ifdef QUOTA2 struct ufsmount *ump = VFSTOUFS(mp); +#endif struct quotakcursor *cursor; int idtype; int error; @@ -505,7 +511,9 @@ static int quota_handle_cmd_cursoratend(struct mount *mp, struct lwp *l, struct vfs_quotactl_args *args) { +#ifdef QUOTA2 struct ufsmount *ump = VFSTOUFS(mp); +#endif struct quotakcursor *cursor; int *ret; int error; @@ -528,7 +536,9 @@ static int quota_handle_cmd_cursorrewind(struct mount *mp, struct lwp *l, struct vfs_quotactl_args *args) { +#ifdef QUOTA2 struct ufsmount *ump = VFSTOUFS(mp); +#endif struct quotakcursor *cursor; int error;
CVS commit: src/sys/uvm
Module Name:src Committed By: para Date: Sun Jan 29 12:37:01 UTC 2012 Modified Files: src/sys/uvm: uvm_km.c Log Message: size kmem_arena more sanely for small memory machines To generate a diff of this commit: cvs rdiff -u -r1.112 -r1.113 src/sys/uvm/uvm_km.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_km.c diff -u src/sys/uvm/uvm_km.c:1.112 src/sys/uvm/uvm_km.c:1.113 --- src/sys/uvm/uvm_km.c:1.112 Fri Jan 27 19:48:41 2012 +++ src/sys/uvm/uvm_km.c Sun Jan 29 12:37:01 2012 @@ -1,4 +1,4 @@ -/* $NetBSD: uvm_km.c,v 1.112 2012/01/27 19:48:41 para Exp $ */ +/* $NetBSD: uvm_km.c,v 1.113 2012/01/29 12:37:01 para Exp $ */ /* * Copyright (c) 1997 Charles D. Cranor and Washington University. @@ -120,7 +120,7 @@ */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: uvm_km.c,v 1.112 2012/01/27 19:48:41 para Exp $); +__KERNEL_RCSID(0, $NetBSD: uvm_km.c,v 1.113 2012/01/29 12:37:01 para Exp $); #include opt_uvmhist.h @@ -168,7 +168,7 @@ uvm_km_bootstrap(vaddr_t start, vaddr_t vaddr_t base = VM_MIN_KERNEL_ADDRESS; kmemsize = MIN(vsize_t)(end - start)) / 3) * 2), - vsize_t)uvmexp.npages) * PAGE_SIZE) / 3)); + vsize_t)uvmexp.npages) * PAGE_SIZE))); kmemsize = round_page(kmemsize); /*
CVS commit: src/sys/arch/x68k/x68k
Module Name:src Committed By: isaki Date: Sun Jan 29 12:43:00 UTC 2012 Modified Files: src/sys/arch/x68k/x68k: machdep.c Log Message: Make it compile with EM_DEBUG (..here, EM_ is EXTENDED_MEMORY). To generate a diff of this commit: cvs rdiff -u -r1.180 -r1.181 src/sys/arch/x68k/x68k/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/x68k/x68k/machdep.c diff -u src/sys/arch/x68k/x68k/machdep.c:1.180 src/sys/arch/x68k/x68k/machdep.c:1.181 --- src/sys/arch/x68k/x68k/machdep.c:1.180 Sat Jan 21 20:19:55 2012 +++ src/sys/arch/x68k/x68k/machdep.c Sun Jan 29 12:43:00 2012 @@ -1,4 +1,4 @@ -/* $NetBSD: machdep.c,v 1.180 2012/01/21 20:19:55 tsutsui Exp $ */ +/* $NetBSD: machdep.c,v 1.181 2012/01/29 12:43:00 isaki Exp $ */ /* * Copyright (c) 1988 University of Utah. @@ -39,7 +39,7 @@ */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: machdep.c,v 1.180 2012/01/21 20:19:55 tsutsui Exp $); +__KERNEL_RCSID(0, $NetBSD: machdep.c,v 1.181 2012/01/29 12:43:00 isaki Exp $); #include opt_ddb.h #include opt_kgdb.h @@ -992,8 +992,8 @@ mem_exists(void *mem, u_long basemax) void *begin_check, *end_check; label_t faultbuf; - DPRINTF((Enter mem_exists(%p, %x)\n, mem, basemax)); - DPRINTF(( pmap_enter(%p, %p) for target... , mem_v, mem)); + DPRINTF((Enter mem_exists(%p, %lx)\n, mem, basemax)); + DPRINTF(( pmap_enter(% PRIxVADDR , %p) for target... , mem_v, mem)); pmap_enter(pmap_kernel(), mem_v, (paddr_t)mem, VM_PROT_READ|VM_PROT_WRITE, VM_PROT_READ|PMAP_WIRED); pmap_update(pmap_kernel()); @@ -1001,7 +1001,7 @@ mem_exists(void *mem, u_long basemax) /* only 24bits are significant on normal X680x0 systems */ base = (void *)((u_long)mem 0x00FF); - DPRINTF(( pmap_enter(%p, %p) for shadow... , base_v, base)); + DPRINTF(( pmap_enter(% PRIxVADDR , %p) for shadow... , base_v, base)); pmap_enter(pmap_kernel(), base_v, (paddr_t)base, VM_PROT_READ|VM_PROT_WRITE, VM_PROT_READ|PMAP_WIRED); pmap_update(pmap_kernel());
CVS commit: src/sys/kern
Module Name:src Committed By: para Date: Sun Jan 29 13:38:15 UTC 2012 Modified Files: src/sys/kern: subr_vmem.c Log Message: move condvar calls under interlock protection call uvm_kick_pdaemon in case we can sleep and no space in arena To generate a diff of this commit: cvs rdiff -u -r1.67 -r1.68 src/sys/kern/subr_vmem.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_vmem.c diff -u src/sys/kern/subr_vmem.c:1.67 src/sys/kern/subr_vmem.c:1.68 --- src/sys/kern/subr_vmem.c:1.67 Sat Jan 28 23:05:48 2012 +++ src/sys/kern/subr_vmem.c Sun Jan 29 13:38:15 2012 @@ -1,4 +1,4 @@ -/* $NetBSD: subr_vmem.c,v 1.67 2012/01/28 23:05:48 rmind Exp $ */ +/* $NetBSD: subr_vmem.c,v 1.68 2012/01/29 13:38:15 para Exp $ */ /*- * Copyright (c)2006,2007,2008,2009 YAMAMOTO Takashi, @@ -34,7 +34,7 @@ */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: subr_vmem.c,v 1.67 2012/01/28 23:05:48 rmind Exp $); +__KERNEL_RCSID(0, $NetBSD: subr_vmem.c,v 1.68 2012/01/29 13:38:15 para Exp $); #if defined(_KERNEL) #include opt_ddb.h @@ -1247,6 +1247,13 @@ retry: } /* XXX */ + if ((flags VM_SLEEP) != 0) { + uvm_kick_pdaemon(); + VMEM_LOCK(vm); + VMEM_CONDVAR_WAIT(vm); + VMEM_UNLOCK(vm); + goto retry; + } fail: bt_free(vm, btnew); bt_free(vm, btnew2); @@ -1385,10 +1392,16 @@ vmem_xfree(vmem_t *vm, vmem_addr_t addr, bt_remseg(vm, t); LIST_INSERT_HEAD(tofree, t, bt_freelist); vm-vm_size -= spansize; +#if defined(_KERNEL) + VMEM_CONDVAR_BROADCAST(vm); +#endif /* defined(_KERNEL) */ VMEM_UNLOCK(vm); (*vm-vm_releasefn)(vm-vm_arg, spanaddr, spansize); } else { bt_insfree(vm, bt); +#if defined(_KERNEL) + VMEM_CONDVAR_BROADCAST(vm); +#endif /* defined(_KERNEL) */ VMEM_UNLOCK(vm); } @@ -1397,9 +1410,6 @@ vmem_xfree(vmem_t *vm, vmem_addr_t addr, LIST_REMOVE(t, bt_freelist); bt_free(vm, t); } -#if defined(_KERNEL) - VMEM_CONDVAR_BROADCAST(vm); -#endif /* defined(_KERNEL) */ } /* @@ -1471,7 +1481,6 @@ vmem_rehash_all(struct work *wk, void *d if (desired current * 2 || desired * 2 current) { vmem_rehash(vm, desired, VM_NOSLEEP); } - VMEM_CONDVAR_BROADCAST(vm); } mutex_exit(vmem_list_lock);
CVS commit: src/sys/rump/librump/rumpkern
Module Name:src Committed By: njoly Date: Sun Jan 29 14:57:32 UTC 2012 Modified Files: src/sys/rump/librump/rumpkern: rump.c vm.c Log Message: Move pool subsystem init from rump__init() to uvm_init(), following kernel code. Fix RUMP_LOCKDEBUG early panic. To generate a diff of this commit: cvs rdiff -u -r1.238 -r1.239 src/sys/rump/librump/rumpkern/rump.c cvs rdiff -u -r1.121 -r1.122 src/sys/rump/librump/rumpkern/vm.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/rump/librump/rumpkern/rump.c diff -u src/sys/rump/librump/rumpkern/rump.c:1.238 src/sys/rump/librump/rumpkern/rump.c:1.239 --- src/sys/rump/librump/rumpkern/rump.c:1.238 Sun Dec 4 19:24:59 2011 +++ src/sys/rump/librump/rumpkern/rump.c Sun Jan 29 14:57:31 2012 @@ -1,4 +1,4 @@ -/* $NetBSD: rump.c,v 1.238 2011/12/04 19:24:59 jym Exp $ */ +/* $NetBSD: rump.c,v 1.239 2012/01/29 14:57:31 njoly Exp $ */ /* * Copyright (c) 2007-2011 Antti Kantee. All Rights Reserved. @@ -26,7 +26,7 @@ */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: rump.c,v 1.238 2011/12/04 19:24:59 jym Exp $); +__KERNEL_RCSID(0, $NetBSD: rump.c,v 1.239 2012/01/29 14:57:31 njoly Exp $); #include sys/systm.h #define ELFSIZE ARCH_ELFSIZE @@ -300,7 +300,6 @@ rump__init(int rump_version) kernconfig_lock_init(); prop_kern_init(); - pool_subsystem_init(); kmem_init(); uvm_ra_init(); Index: src/sys/rump/librump/rumpkern/vm.c diff -u src/sys/rump/librump/rumpkern/vm.c:1.121 src/sys/rump/librump/rumpkern/vm.c:1.122 --- src/sys/rump/librump/rumpkern/vm.c:1.121 Fri Jan 27 19:48:41 2012 +++ src/sys/rump/librump/rumpkern/vm.c Sun Jan 29 14:57:31 2012 @@ -1,4 +1,4 @@ -/* $NetBSD: vm.c,v 1.121 2012/01/27 19:48:41 para Exp $ */ +/* $NetBSD: vm.c,v 1.122 2012/01/29 14:57:31 njoly Exp $ */ /* * Copyright (c) 2007-2011 Antti Kantee. All Rights Reserved. @@ -41,7 +41,7 @@ */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: vm.c,v 1.121 2012/01/27 19:48:41 para Exp $); +__KERNEL_RCSID(0, $NetBSD: vm.c,v 1.122 2012/01/29 14:57:31 njoly Exp $); #include sys/param.h #include sys/atomic.h @@ -330,6 +330,7 @@ uvm_init(void) kernel_map-pmap = pmap_kernel(); + pool_subsystem_init(); vmem_bootstrap(); kmem_arena = vmem_create(kmem, 0, 1024*1024, PAGE_SIZE, NULL, NULL, NULL,
CVS commit: src/sys/arch/amiga/pci
Module Name:src Committed By: para Date: Sun Jan 29 15:32:52 UTC 2012 Modified Files: src/sys/arch/amiga/pci: mppb.c p5pb.c Log Message: adapt to extent(9) changes To generate a diff of this commit: cvs rdiff -u -r1.5 -r1.6 src/sys/arch/amiga/pci/mppb.c cvs rdiff -u -r1.7 -r1.8 src/sys/arch/amiga/pci/p5pb.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/amiga/pci/mppb.c diff -u src/sys/arch/amiga/pci/mppb.c:1.5 src/sys/arch/amiga/pci/mppb.c:1.6 --- src/sys/arch/amiga/pci/mppb.c:1.5 Thu Jan 19 00:14:08 2012 +++ src/sys/arch/amiga/pci/mppb.c Sun Jan 29 15:32:52 2012 @@ -1,4 +1,4 @@ -/* $NetBSD: mppb.c,v 1.5 2012/01/19 00:14:08 rkujawa Exp $ */ +/* $NetBSD: mppb.c,v 1.6 2012/01/29 15:32:52 para Exp $ */ /*- * Copyright (c) 2011 The NetBSD Foundation, Inc. @@ -168,9 +168,9 @@ mppb_attach(device_t parent, device_t se #ifdef PCI_NETBSD_CONFIGURE ioext = extent_create(mppbio, MPPB_IO_BASE, - MPPB_IO_BASE + MPPB_IO_SIZE, M_DEVBUF, NULL, 0, EX_NOWAIT); + MPPB_IO_BASE + MPPB_IO_SIZE, NULL, 0, EX_NOWAIT); memext = extent_create(mppbmem, MPPB_MEM_BASE, - MPPB_MEM_BASE + MPPB_MEM_SIZE, M_DEVBUF, NULL, 0, EX_NOWAIT); + MPPB_MEM_BASE + MPPB_MEM_SIZE, NULL, 0, EX_NOWAIT); #ifdef MPPB_DEBUG aprint_normal(mppb: reconfiguring the bus!\n); Index: src/sys/arch/amiga/pci/p5pb.c diff -u src/sys/arch/amiga/pci/p5pb.c:1.7 src/sys/arch/amiga/pci/p5pb.c:1.8 --- src/sys/arch/amiga/pci/p5pb.c:1.7 Tue Jan 24 00:20:45 2012 +++ src/sys/arch/amiga/pci/p5pb.c Sun Jan 29 15:32:52 2012 @@ -1,4 +1,4 @@ -/* $NetBSD: p5pb.c,v 1.7 2012/01/24 00:20:45 rkujawa Exp $ */ +/* $NetBSD: p5pb.c,v 1.8 2012/01/29 15:32:52 para Exp $ */ /*- * Copyright (c) 2011, 2012 The NetBSD Foundation, Inc. @@ -452,11 +452,11 @@ p5pb_bus_reconfigure(struct p5pb_softc * pc = sc-apc; - ioext = extent_create(p5pbio, 0, P5BUS_PCI_IO_SIZE, M_DEVBUF, NULL, 0, - EX_NOWAIT); + ioext = extent_create(p5pbio, 0, P5BUS_PCI_IO_SIZE, NULL, 0, + EX_NOWAIT); memext = extent_create(p5pbmem, sc-pci_mem_lowest, - sc-pci_mem_highest, M_DEVBUF, NULL, 0, EX_NOWAIT); + sc-pci_mem_highest, NULL, 0, EX_NOWAIT); if ( (!ioext) || (!memext) ) return false;
CVS commit: src/distrib/notes
Module Name:src Committed By: phx Date: Sun Jan 29 15:54:36 UTC 2012 Modified Files: src/distrib/notes: Makefile Added Files: src/distrib/notes/ofppc: Makefile contents hardware install legal prep upgrade xfer Log Message: Introduce some initial documentation for NetBSD/ofppc. To generate a diff of this commit: cvs rdiff -u -r1.42 -r1.43 src/distrib/notes/Makefile cvs rdiff -u -r0 -r1.1 src/distrib/notes/ofppc/Makefile \ src/distrib/notes/ofppc/contents src/distrib/notes/ofppc/hardware \ src/distrib/notes/ofppc/install src/distrib/notes/ofppc/legal \ src/distrib/notes/ofppc/prep src/distrib/notes/ofppc/upgrade \ src/distrib/notes/ofppc/xfer Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/distrib/notes/Makefile diff -u src/distrib/notes/Makefile:1.42 src/distrib/notes/Makefile:1.43 --- src/distrib/notes/Makefile:1.42 Wed Jan 26 01:18:44 2011 +++ src/distrib/notes/Makefile Sun Jan 29 15:54:35 2012 @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.42 2011/01/26 01:18:44 pooka Exp $ +# $NetBSD: Makefile,v 1.43 2012/01/29 15:54:35 phx Exp $ # .include bsd.own.mk @@ -36,6 +36,7 @@ SUBDIR+= mvme68k SUBDIR+= news68k SUBDIR+= newsmips SUBDIR+= next68k +SUBDIR+= ofppc SUBDIR+= pmax SUBDIR+= prep SUBDIR+= sandpoint Added files: Index: src/distrib/notes/ofppc/Makefile diff -u /dev/null src/distrib/notes/ofppc/Makefile:1.1 --- /dev/null Sun Jan 29 15:54:36 2012 +++ src/distrib/notes/ofppc/Makefile Sun Jan 29 15:54:35 2012 @@ -0,0 +1,5 @@ +# $NetBSD: Makefile,v 1.1 2012/01/29 15:54:35 phx Exp $ + +MERGED_SRCS+= ${COMMON}/sysinst ${COMMON}/upgrade ${COMMON}/xfer + +.include bsd.man.mk Index: src/distrib/notes/ofppc/contents diff -u /dev/null src/distrib/notes/ofppc/contents:1.1 --- /dev/null Sun Jan 29 15:54:36 2012 +++ src/distrib/notes/ofppc/contents Sun Jan 29 15:54:35 2012 @@ -0,0 +1,275 @@ +.\ $NetBSD: contents,v 1.1 2012/01/29 15:54:35 phx Exp $ +.\ +.\ Copyright (c) 1999-2012 The NetBSD Foundation, Inc. +.\ 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 THE NETBSD FOUNDATION, INC. 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 THE FOUNDATION 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. +.\ +. +.Ss2 NetBSD/\*M subdirectory structure +The \*M-specific portion of the +.Nx +\*V release is found in the +.Pa \*M +subdirectory of the distribution: +.ie \n[FOR_RELEASE] .Pa \.../NetBSD-\*V/\*M/ . +.el .Pa Pf \.../arch/\*M/snapshot/ Ar mmdd/ . +It contains the following files and directories: +.Pp +.(tag INSTALL.html -compact \ top level +. It Pa INSTALL.html +. It Pa INSTALL.ps +. It Pa INSTALL.txt +. It Pa INSTALL.more +Installation notes in various file formats, including this file. +The +.Pa \.more +file contains underlined text using the +.Xr more 1 +conventions for indicating italic and bold display. +. +.\ MD binary and installation directories --- +. +. It Pa binary/ +. +. (tag kernel/ -compact \ binary/ +. +. It Pa kernel/ +. +. (tag netbsd.gz -compact \ binary/kernel +. +. It Pa netbsd-GENERIC.gz +A gzipped +.Nx +kernel containing code for everything supported in this release. +. +. It Pa netbsd-INSTALL.gz +A gzipped kernel for installing or upgrading +.Nx +on your hardware. +. +. tag) \ binary/kernel/ +. +. It Pa sets/ +. +\*M binary distribution sets; +see below. +. +. tag) \ binary/ +. +. It Pa installation/ +. +. (tag miniroot/ -compact \ installation/ +. +. It Pa netboot/ +. +. (tag netboot -compact \ installtion/netboot +. +. It Pa netbsd-GENERIC.gz +A gzipped +.Nx +kernel containing code for everything supported in this release. +. +. It Pa netbsd-INSTALL.gz +A gzipped kernel for installing or upgrading +.Nx +on your hardware. +. It Pa ofwboot +A bootloader,
CVS commit: src/distrib/utils/sysinst/arch/ofppc
Module Name:src Committed By: phx Date: Sun Jan 29 16:01:37 UTC 2012 Modified Files: src/distrib/utils/sysinst/arch/ofppc: md.c md.h Log Message: Add support for RDB-partitioned disks. When an RDB block was found on the disk we cannot change the disk layout, and everything which has to do with MBR partitioning will be skipped. To generate a diff of this commit: cvs rdiff -u -r1.10 -r1.11 src/distrib/utils/sysinst/arch/ofppc/md.c cvs rdiff -u -r1.6 -r1.7 src/distrib/utils/sysinst/arch/ofppc/md.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/distrib/utils/sysinst/arch/ofppc/md.c diff -u src/distrib/utils/sysinst/arch/ofppc/md.c:1.10 src/distrib/utils/sysinst/arch/ofppc/md.c:1.11 --- src/distrib/utils/sysinst/arch/ofppc/md.c:1.10 Fri Nov 4 11:27:04 2011 +++ src/distrib/utils/sysinst/arch/ofppc/md.c Sun Jan 29 16:01:36 2012 @@ -1,4 +1,4 @@ -/* $NetBSD: md.c,v 1.10 2011/11/04 11:27:04 martin Exp $ */ +/* $NetBSD: md.c,v 1.11 2012/01/29 16:01:36 phx Exp $ */ /* * Copyright 1997 Piermont Information Systems Inc. @@ -36,6 +36,7 @@ #include sys/param.h #include sys/sysctl.h +#include sys/disklabel_rdb.h #include stdio.h #include util.h #include machine/cpu.h @@ -46,12 +47,16 @@ #include menu_defs.h #include endian.h +static int check_rdb(void); +static uint32_t rdbchksum(void *); + /* We use MBR_PTYPE_PREP like port-prep does. */ static int nonewfsmsdos = 0, nobootfix = 0, noprepfix=0; static int bootpart_fat12 = PART_BOOT_FAT12; static int bootpart_binfo = PART_BOOT_BINFO; static int bootpart_prep = PART_BOOT_PREP; static int bootinfo_mbr = 1; +static int rdb_found = 0; /* bootstart/bootsize are for the fat */ int binfostart, binfosize, bprepstart, bprepsize; @@ -64,12 +69,17 @@ md_init(void) void md_init_set_status(int flags) { + (void)flags; } int md_get_info(void) { + + if (check_rdb()) + return 1; + return set_bios_geom_with_mbr_guess(); } @@ -88,6 +98,41 @@ md_make_bsd_partitions(void) int no_swap = 0; partinfo *p; + if (rdb_found) { + /* + * We found RDB partitions on the disk, which cannot be + * modified by rewriting the disklabel. + * So just use what we have got. + */ + for (part = 0; part maxpart; part++) { + if (PI_ISBSDFS(bsdlabel[part])) { +bsdlabel[part].pi_flags |= +PIF_NEWFS | PIF_MOUNT; + +if (part == PART_A) + strcpy(bsdlabel[part].pi_mount, /); + } + } + + part_bsd = part_raw = getrawpartition(); + if (part_raw == -1) + part_raw = PART_C; /* for sanity... */ + bsdlabel[part_raw].pi_offset = 0; + bsdlabel[part_raw].pi_size = dlsize; + + set_sizemultname_meg(); +rdb_edit_check: + if (edit_and_check_label(bsdlabel, maxpart, part_raw, + part_bsd) == 0) { + msg_display(MSG_abort); + return 0; + } + if (md_check_partitions() == 0) + goto rdb_edit_check; + + return 1; + } + /* * Initialize global variables that track space used on this disk. * Standard 4.4BSD 8-partition labels always cover whole disk. @@ -223,6 +268,9 @@ md_check_partitions(void) { int part, fprep=0, ffat=0; + if (rdb_found) + return 1; + /* we need to find a boot partition, otherwise we can't create * our msdos fs boot partition. We make the assumption that * the user hasn't done something stupid, like move it away @@ -259,6 +307,10 @@ md_check_partitions(void) int md_pre_disklabel(void) { + + if (rdb_found) + return 0; + msg_display(MSG_dofdisk); /* write edited MBR onto disk. */ @@ -278,7 +330,7 @@ md_post_disklabel(void) { char bootdev[100]; - if (bootstart == 0 || bootsize == 0) + if (bootstart == 0 || bootsize == 0 || rdb_found) return 0; snprintf(bootdev, sizeof bootdev, /dev/r%s%c, diskdev, @@ -307,7 +359,7 @@ md_post_extract(void) char bootdev[100], bootbdev[100], version[64]; /* if we can't make it bootable, just punt */ - if (nobootfix noprepfix) + if ((nobootfix noprepfix) || rdb_found) return 0; snprintf(version, sizeof version, NetBSD/%s %s, MACH, REL); @@ -353,6 +405,7 @@ md_post_extract(void) void md_cleanup_install(void) { + #ifndef DEBUG enable_rc_conf(); #endif @@ -365,6 +418,9 @@ md_pre_update(void) mbr_info_t *ext; int i; + if (check_rdb()) + return 1; + read_mbr(diskdev, mbr); /* do a sanity check of the partition table */ for (ext = mbr; ext; ext = ext-extended) { @@ -400,6 +456,7 @@ md_pre_update(void) int md_update(void) { + nonewfsmsdos = 1; md_post_newfs(); return 1; @@ -543,8 +600,56 @@ md_mbr_use_wholedisk(mbr_info_t *mbri) return 1; } +const char *md_disklabel_cmd(void) +{ + + /* we cannot rewrite an RDB disklabel */ + if (rdb_found) + return echo No disklabel; + + return disklabel -w -r; +} + +static int +check_rdb(void) +{ + char buf[512], diskpath[MAXPATHLEN]; + struct rdblock *rdb; + off_t blk; + int fd; + + /* Find out if this disk has a valid RDB, before continuing. */ + rdb =
CVS commit: src/sys/arch/sun3/sun3
Module Name:src Committed By: para Date: Sun Jan 29 16:24:01 UTC 2012 Modified Files: src/sys/arch/sun3/sun3: dvma.c Log Message: adapt to recent changes in uvm To generate a diff of this commit: cvs rdiff -u -r1.37 -r1.38 src/sys/arch/sun3/sun3/dvma.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/sun3/sun3/dvma.c diff -u src/sys/arch/sun3/sun3/dvma.c:1.37 src/sys/arch/sun3/sun3/dvma.c:1.38 --- src/sys/arch/sun3/sun3/dvma.c:1.37 Fri Jan 27 18:53:03 2012 +++ src/sys/arch/sun3/sun3/dvma.c Sun Jan 29 16:24:01 2012 @@ -1,4 +1,4 @@ -/* $NetBSD: dvma.c,v 1.37 2012/01/27 18:53:03 para Exp $ */ +/* $NetBSD: dvma.c,v 1.38 2012/01/29 16:24:01 para Exp $ */ /*- * Copyright (c) 1996 The NetBSD Foundation, Inc. @@ -30,7 +30,7 @@ */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: dvma.c,v 1.37 2012/01/27 18:53:03 para Exp $); +__KERNEL_RCSID(0, $NetBSD: dvma.c,v 1.38 2012/01/29 16:24:01 para Exp $); #include sys/param.h #include sys/systm.h @@ -82,11 +82,13 @@ dvma_init(void) * dvma_extent manages things handled in interrupt * context. */ - phys_map = uvm_map_create(pmap_kernel(), - DVMA_MAP_BASE, DVMA_MAP_END, 0); + phys_map = kmem_alloc(sizeof(struct vm_map), KM_SLEEP); if (phys_map == NULL) panic(unable to create DVMA map); + uvm_map_setup(phys_map, DVMA_MAP_BASE, DVMA_MAP_END, 0); + phys_map-pmap = pmap_kernel(); + /* * Reserve the DVMA space used for segment remapping. * The remainder of phys_map is used for DVMA scratch
CVS commit: src/sys/arch/sun3/sun3
Module Name:src Committed By: para Date: Sun Jan 29 16:24:51 UTC 2012 Modified Files: src/sys/arch/sun3/sun3: pmap.c Log Message: convert from malloc(9) to kmem(9) To generate a diff of this commit: cvs rdiff -u -r1.166 -r1.167 src/sys/arch/sun3/sun3/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/sun3/sun3/pmap.c diff -u src/sys/arch/sun3/sun3/pmap.c:1.166 src/sys/arch/sun3/sun3/pmap.c:1.167 --- src/sys/arch/sun3/sun3/pmap.c:1.166 Fri Jun 3 17:03:53 2011 +++ src/sys/arch/sun3/sun3/pmap.c Sun Jan 29 16:24:51 2012 @@ -1,4 +1,4 @@ -/* $NetBSD: pmap.c,v 1.166 2011/06/03 17:03:53 tsutsui Exp $ */ +/* $NetBSD: pmap.c,v 1.167 2012/01/29 16:24:51 para Exp $ */ /*- * Copyright (c) 1996 The NetBSD Foundation, Inc. @@ -80,7 +80,7 @@ */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: pmap.c,v 1.166 2011/06/03 17:03:53 tsutsui Exp $); +__KERNEL_RCSID(0, $NetBSD: pmap.c,v 1.167 2012/01/29 16:24:51 para Exp $); #include opt_ddb.h #include opt_pmap_debug.h @@ -88,7 +88,7 @@ __KERNEL_RCSID(0, $NetBSD: pmap.c,v 1.1 #include sys/param.h #include sys/systm.h #include sys/proc.h -#include sys/malloc.h +#include sys/kmem.h #include sys/pool.h #include sys/queue.h #include sys/kcore.h @@ -1849,7 +1849,7 @@ void pmap_user_init(pmap_t pmap) { int i; - pmap-pm_segmap = malloc(sizeof(char)*NUSEG, M_VMPMAP, M_WAITOK); + pmap-pm_segmap = kmem_alloc(sizeof(char)*NUSEG, KM_SLEEP); for (i = 0; i NUSEG; i++) { pmap-pm_segmap[i] = SEGINV; } @@ -1900,7 +1900,7 @@ pmap_release(struct pmap *pmap) #endif context_free(pmap); } - free(pmap-pm_segmap, M_VMPMAP); + kmem_free(pmap-pm_segmap, sizeof(char)*NUSEG); pmap-pm_segmap = NULL; splx(s);
CVS commit: src/sys/kern
Module Name:src Committed By: rmind Date: Sun Jan 29 17:27:37 UTC 2012 Modified Files: src/sys/kern: subr_vmem.c Log Message: - vmem_xalloc: remove call to uvm_kick_pdaemon() as it is not right. - Reduce some #ifdefs. Misc. To generate a diff of this commit: cvs rdiff -u -r1.68 -r1.69 src/sys/kern/subr_vmem.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_vmem.c diff -u src/sys/kern/subr_vmem.c:1.68 src/sys/kern/subr_vmem.c:1.69 --- src/sys/kern/subr_vmem.c:1.68 Sun Jan 29 13:38:15 2012 +++ src/sys/kern/subr_vmem.c Sun Jan 29 17:27:37 2012 @@ -1,4 +1,4 @@ -/* $NetBSD: subr_vmem.c,v 1.68 2012/01/29 13:38:15 para Exp $ */ +/* $NetBSD: subr_vmem.c,v 1.69 2012/01/29 17:27:37 rmind Exp $ */ /*- * Copyright (c)2006,2007,2008,2009 YAMAMOTO Takashi, @@ -34,7 +34,7 @@ */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: subr_vmem.c,v 1.68 2012/01/29 13:38:15 para Exp $); +__KERNEL_RCSID(0, $NetBSD: subr_vmem.c,v 1.69 2012/01/29 17:27:37 rmind Exp $); #if defined(_KERNEL) #include opt_ddb.h @@ -99,6 +99,7 @@ VMEM_EVCNT_DEFINE(bt_inuse) #define LOCK_DECL(name) /* nothing */ #define CONDVAR_DECL(name) /* nothing */ #define VMEM_CONDVAR_INIT(vm, wchan) /* nothing */ +#define VMEM_CONDVAR_BROADCAST(vm) /* nothing */ #define mutex_init(a, b, c) /* nothing */ #define mutex_destroy(a) /* nothing */ #define mutex_enter(a) /* nothing */ @@ -809,14 +810,11 @@ vmem_import(vmem_t *vm, vmem_size_t size if (vm-vm_flags VM_XIMPORT) { rc = ((vmem_ximport_t *)vm-vm_importfn)(vm-vm_arg, size, size, flags, addr); - if (rc != 0) { - return ENOMEM; - } } else { rc = (vm-vm_importfn)(vm-vm_arg, size, flags, addr); - if (rc != 0) { - return ENOMEM; - } + } + if (rc) { + return ENOMEM; } if (vmem_add1(vm, addr, size, flags, BT_TYPE_SPAN) != 0) { @@ -1231,8 +1229,7 @@ retry: goto retry_strat; } #endif - if (align != vm-vm_quantum_mask + 1 || phase != 0 || - nocross != 0) { + if (align != vm-vm_quantum_mask + 1 || phase != 0 || nocross != 0) { /* * XXX should try to import a region large enough to @@ -1248,7 +1245,6 @@ retry: /* XXX */ if ((flags VM_SLEEP) != 0) { - uvm_kick_pdaemon(); VMEM_LOCK(vm); VMEM_CONDVAR_WAIT(vm); VMEM_UNLOCK(vm); @@ -1392,16 +1388,12 @@ vmem_xfree(vmem_t *vm, vmem_addr_t addr, bt_remseg(vm, t); LIST_INSERT_HEAD(tofree, t, bt_freelist); vm-vm_size -= spansize; -#if defined(_KERNEL) VMEM_CONDVAR_BROADCAST(vm); -#endif /* defined(_KERNEL) */ VMEM_UNLOCK(vm); (*vm-vm_releasefn)(vm-vm_arg, spanaddr, spansize); } else { bt_insfree(vm, bt); -#if defined(_KERNEL) VMEM_CONDVAR_BROADCAST(vm); -#endif /* defined(_KERNEL) */ VMEM_UNLOCK(vm); }
CVS commit: src/sys/arch/i386/conf
Module Name:src Committed By: hannken Date: Sun Jan 29 18:29:12 UTC 2012 Modified Files: src/sys/arch/i386/conf: INSTALL_FLOPPY Log Message: Add virtio driver to INSTALL_FLOPPY. Requested by Matthias Scheler t...@netbsd.org for particular cases like http://mail-index.netbsd.org/netbsd-users/2011/09/13/msg009128.html To generate a diff of this commit: cvs rdiff -u -r1.14 -r1.15 src/sys/arch/i386/conf/INSTALL_FLOPPY 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/i386/conf/INSTALL_FLOPPY diff -u src/sys/arch/i386/conf/INSTALL_FLOPPY:1.14 src/sys/arch/i386/conf/INSTALL_FLOPPY:1.15 --- src/sys/arch/i386/conf/INSTALL_FLOPPY:1.14 Tue Nov 22 21:25:20 2011 +++ src/sys/arch/i386/conf/INSTALL_FLOPPY Sun Jan 29 18:29:11 2012 @@ -1,4 +1,4 @@ -# $NetBSD: INSTALL_FLOPPY,v 1.14 2011/11/22 21:25:20 tls Exp $ +# $NetBSD: INSTALL_FLOPPY,v 1.15 2012/01/29 18:29:11 hannken Exp $ # # INSTALL - Installation kernel. # @@ -740,6 +740,11 @@ url* at uhub? port ? # Realtek RTL8150L # Planetconnect Satellite receiver driver. #satlink0 at isa? port 0x300 drq 1 +# Virtio devices +virtio* at pci? dev ? function ? # Virtio PCI device +viomb* at virtio? # Virtio memory balloon device +ld* at virtio? # Virtio disk device +vioif* at virtio? # Virtio network device # Pull in optional local configuration cinclude arch/i386/conf/INSTALL.local
CVS commit: src/sys/sys
Module Name:src Committed By: roy Date: Sun Jan 29 18:33:07 UTC 2012 Modified Files: src/sys/sys: socket.h Log Message: Allow using CMSG_NXTHDR with -Wcast-align. If various checks are omitted, the CMSG_NXTHDR macro expands to (struct cmsghdr *)((char *)(cmsg) + \ _ALIGN(((struct cmsghdr *)(cmsg))-cmsg_len)) Although there is no alignment problem (assuming cmsg is properly aligned and _ALIGN is correct), this violates -Wcast-align on strict-alignment architectures. Therefore an intermediate cast to void * is appropriate here. There is no workaround other than not using -Wcast-align. Taken from FreeBSD commit r220742 by jilles To generate a diff of this commit: cvs rdiff -u -r1.105 -r1.106 src/sys/sys/socket.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/sys/socket.h diff -u src/sys/sys/socket.h:1.105 src/sys/sys/socket.h:1.106 --- src/sys/sys/socket.h:1.105 Wed Jan 25 00:28:35 2012 +++ src/sys/sys/socket.h Sun Jan 29 18:33:07 2012 @@ -1,4 +1,4 @@ -/* $NetBSD: socket.h,v 1.105 2012/01/25 00:28:35 christos Exp $ */ +/* $NetBSD: socket.h,v 1.106 2012/01/29 18:33:07 roy Exp $ */ /* * Copyright (C) 1995, 1996, 1997, and 1998 WIDE Project. @@ -544,7 +544,7 @@ struct cmsghdr { __CMSG_ALIGN(sizeof(struct cmsghdr)) \ (((char *)(mhdr)-msg_control) + (mhdr)-msg_controllen)) ? \ (struct cmsghdr *)0 : \ - (struct cmsghdr *)((char *)(cmsg) + \ + (struct cmsghdr *)(void *)((char *)(cmsg) + \ __CMSG_ALIGN((cmsg)-cmsg_len))) /*
CVS commit: src/sys/arch/i386/conf
Module Name:src Committed By: jakllsch Date: Sun Jan 29 18:55:13 UTC 2012 Modified Files: src/sys/arch/i386/conf: ALL Log Message: options MALLOC_DEBUG is no longer expected to compile, but has not yet been removed. Avoid compiling it here. To generate a diff of this commit: cvs rdiff -u -r1.330 -r1.331 src/sys/arch/i386/conf/ALL 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/i386/conf/ALL diff -u src/sys/arch/i386/conf/ALL:1.330 src/sys/arch/i386/conf/ALL:1.331 --- src/sys/arch/i386/conf/ALL:1.330 Sat Jan 14 12:30:12 2012 +++ src/sys/arch/i386/conf/ALL Sun Jan 29 18:55:12 2012 @@ -1,4 +1,4 @@ -# $NetBSD: ALL,v 1.330 2012/01/14 12:30:12 tron Exp $ +# $NetBSD: ALL,v 1.331 2012/01/29 18:55:12 jakllsch Exp $ # From NetBSD: GENERIC,v 1.787 2006/10/01 18:37:54 bouyer Exp # # ALL machine description file @@ -17,7 +17,7 @@ include arch/i386/conf/std.i386 options INCLUDE_CONFIG_FILE # embed config file in kernel binary -#ident ALL-$Revision: 1.330 $ +#ident ALL-$Revision: 1.331 $ maxusers 64 # estimated number of users @@ -2136,7 +2136,6 @@ options LOAD_DEBUG_INFO options LOCKF_DEBUG options LPT_DEBUG options MAGMA_DEBUG -options MALLOC_DEBUG options MAPLE_DEBUG options MB8795_DEBUG options MCDDEBUG
CVS commit: src/sys
Module Name:src Committed By: rmind Date: Sun Jan 29 19:08:26 UTC 2012 Modified Files: src/sys/kern: subr_kcpuset.c src/sys/sys: kcpuset.h Log Message: - Add kcpuset_isotherset() and kcpuset_countset(). - Fix KC_NFIELDS_EARLY. Make kcpuset_isset() return bool. To generate a diff of this commit: cvs rdiff -u -r1.3 -r1.4 src/sys/kern/subr_kcpuset.c cvs rdiff -u -r1.3 -r1.4 src/sys/sys/kcpuset.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/kern/subr_kcpuset.c diff -u src/sys/kern/subr_kcpuset.c:1.3 src/sys/kern/subr_kcpuset.c:1.4 --- src/sys/kern/subr_kcpuset.c:1.3 Sun Aug 7 21:38:32 2011 +++ src/sys/kern/subr_kcpuset.c Sun Jan 29 19:08:26 2012 @@ -1,4 +1,4 @@ -/* $NetBSD: subr_kcpuset.c,v 1.3 2011/08/07 21:38:32 rmind Exp $ */ +/* $NetBSD: subr_kcpuset.c,v 1.4 2012/01/29 19:08:26 rmind Exp $ */ /*- * Copyright (c) 2011 The NetBSD Foundation, Inc. @@ -41,7 +41,7 @@ */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: subr_kcpuset.c,v 1.3 2011/08/07 21:38:32 rmind Exp $); +__KERNEL_RCSID(0, $NetBSD: subr_kcpuset.c,v 1.4 2012/01/29 19:08:26 rmind Exp $); #include sys/param.h #include sys/types.h @@ -87,7 +87,7 @@ static int kc_last_idx = 0; static bool kc_initialised = false; #define KC_BITSIZE_EARLY sizeof(kc_bits_early[0]) -#define KC_NFIELDS_EARLY (KC_BITSIZE_EARLY KC_SHIFT) +#define KC_NFIELDS_EARLY 1 /* * The size of whole bitset fields and amount of fields. @@ -113,6 +113,7 @@ kcpuset_sysinit(void) /* Set a kcpuset_t sizes. */ kc_nfields = (KC_MAXCPUS KC_SHIFT); kc_bitsize = sizeof(uint32_t) * kc_nfields; + KASSERT(kc_nfields != 0 kc_bitsize != 0); kc_cache = pool_cache_init(sizeof(kcpuset_impl_t) + kc_bitsize, coherency_unit, 0, 0, kcpuset, NULL, IPL_NONE, NULL, NULL, NULL); @@ -232,19 +233,11 @@ kcpuset_destroy(kcpuset_t *kcp) } /* - * Routines to copy or reference/unreference the CPU set. + * Routines to reference/unreference the CPU set. * Note: early boot case is not supported by these routines. */ void -kcpuset_copy(kcpuset_t *dkcp, kcpuset_t *skcp) -{ - - KASSERT(!kc_initialised || KC_GETSTRUCT(dkcp)-kc_refcnt == 1); - memcpy(dkcp, skcp, kc_bitsize); -} - -void kcpuset_use(kcpuset_t *kcp) { kcpuset_impl_t *kc = KC_GETSTRUCT(kcp); @@ -311,9 +304,9 @@ kcpuset_copyout(kcpuset_t *kcp, cpuset_t } /* - * Routines to change bit field - zero, fill, set, unset, etc. + * Routines to change bit field - zero, fill, copy, set, unset, etc. */ - + void kcpuset_zero(kcpuset_t *kcp) { @@ -333,6 +326,15 @@ kcpuset_fill(kcpuset_t *kcp) } void +kcpuset_copy(kcpuset_t *dkcp, kcpuset_t *skcp) +{ + + KASSERT(!kc_initialised || KC_GETSTRUCT(dkcp)-kc_refcnt 0); + KASSERT(!kc_initialised || KC_GETSTRUCT(dkcp)-kc_next == NULL); + memcpy(dkcp, skcp, kc_bitsize); +} + +void kcpuset_set(kcpuset_t *kcp, cpuid_t i) { const size_t j = i KC_SHIFT; @@ -354,7 +356,7 @@ kcpuset_clear(kcpuset_t *kcp, cpuid_t i) kcp-bits[j] = ~(1 (i KC_MASK)); } -int +bool kcpuset_isset(kcpuset_t *kcp, cpuid_t i) { const size_t j = i KC_SHIFT; @@ -368,6 +370,21 @@ kcpuset_isset(kcpuset_t *kcp, cpuid_t i) } bool +kcpuset_isotherset(kcpuset_t *kcp, cpuid_t i) +{ + const size_t j2 = i KC_SHIFT; + const uint32_t mask = ~(1 (i KC_MASK)); + + for (size_t j = 0; j kc_nfields; j++) { + const uint32_t bits = kcp-bits[j]; + if (bits (j != j2 || (bits mask) != 0)) { + return true; + } + } + return false; +} + +bool kcpuset_iszero(kcpuset_t *kcp) { @@ -395,6 +412,17 @@ kcpuset_merge(kcpuset_t *kcp1, kcpuset_t } } +int +kcpuset_countset(kcpuset_t *kcp) +{ + int count = 0; + + for (size_t j = 0; j kc_nfields; j++) { + count += popcount32(kcp-bits[j]); + } + return count; +} + /* * Routines to set/clear the flags atomically. */ Index: src/sys/sys/kcpuset.h diff -u src/sys/sys/kcpuset.h:1.3 src/sys/sys/kcpuset.h:1.4 --- src/sys/sys/kcpuset.h:1.3 Mon Aug 8 17:53:29 2011 +++ src/sys/sys/kcpuset.h Sun Jan 29 19:08:26 2012 @@ -1,4 +1,4 @@ -/* $NetBSD: kcpuset.h,v 1.3 2011/08/08 17:53:29 matt Exp $ */ +/* $NetBSD: kcpuset.h,v 1.4 2012/01/29 19:08:26 rmind Exp $ */ /*- * Copyright (c) 2008, 2011 The NetBSD Foundation, Inc. @@ -56,10 +56,12 @@ void kcpuset_fill(kcpuset_t *); void kcpuset_set(kcpuset_t *, cpuid_t); void kcpuset_clear(kcpuset_t *, cpuid_t); -int kcpuset_isset(kcpuset_t *, cpuid_t); +bool kcpuset_isset(kcpuset_t *, cpuid_t); +bool kcpuset_isotherset(kcpuset_t *, cpuid_t); bool kcpuset_iszero(kcpuset_t *); bool kcpuset_match(const kcpuset_t *, const kcpuset_t *); void kcpuset_merge(kcpuset_t *, kcpuset_t *); +int kcpuset_countset(kcpuset_t *); void kcpuset_atomic_set(kcpuset_t *, cpuid_t); void kcpuset_atomic_clear(kcpuset_t *, cpuid_t);
CVS commit: src/sys/sys
Module Name:src Committed By: dholland Date: Sun Jan 29 19:36:15 UTC 2012 Modified Files: src/sys/sys: quota.h quotactl.h Log Message: Move the semantic restriction codes from sys/quotactl.h to sys/quota.h; they're meant to be used by applications and were stuffed into the wrong place by accident last week and got committed that way yesterday. To generate a diff of this commit: cvs rdiff -u -r1.10 -r1.11 src/sys/sys/quota.h cvs rdiff -u -r1.30 -r1.31 src/sys/sys/quotactl.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/sys/quota.h diff -u src/sys/sys/quota.h:1.10 src/sys/sys/quota.h:1.11 --- src/sys/sys/quota.h:1.10 Sun Jan 29 06:43:34 2012 +++ src/sys/sys/quota.h Sun Jan 29 19:36:14 2012 @@ -1,4 +1,4 @@ -/* $NetBSD: quota.h,v 1.10 2012/01/29 06:43:34 dholland Exp $ */ +/* $NetBSD: quota.h,v 1.11 2012/01/29 19:36:14 dholland Exp $ */ /*- * Copyright (c) 2010 Manuel Bouyer * All rights reserved. @@ -47,6 +47,15 @@ /* time value for no time */ #define QUOTA_NOTIME ((time_t)-1) +/* + * Semantic restrictions. These are hints applications can use + * to help produce comprehensible error diagnostics when something + * unsupported is attempted. + */ +#define QUOTA_RESTRICT_NEEDSQUOTACHECK 0x1 /* quotacheck(8) required */ +#define QUOTA_RESTRICT_UNIFORMGRACE 0x2 /* grace time is global */ +#define QUOTA_RESTRICT_32BIT 0x4 /* values limited to 2^32 */ + /* * Structure used to describe the key part of a quota record. Index: src/sys/sys/quotactl.h diff -u src/sys/sys/quotactl.h:1.30 src/sys/sys/quotactl.h:1.31 --- src/sys/sys/quotactl.h:1.30 Sun Jan 29 07:13:43 2012 +++ src/sys/sys/quotactl.h Sun Jan 29 19:36:14 2012 @@ -1,4 +1,4 @@ -/* $NetBSD: quotactl.h,v 1.30 2012/01/29 07:13:43 dholland Exp $ */ +/* $NetBSD: quotactl.h,v 1.31 2012/01/29 19:36:14 dholland Exp $ */ /*- * Copyright (c) 2011 The NetBSD Foundation, Inc. * All rights reserved. @@ -40,13 +40,6 @@ /* Size of random quota strings */ #define QUOTA_NAMELEN 32 -/* - * Restrictions for qs_restrictions. - */ -#define QUOTA_RESTRICT_NEEDSQUOTACHECK 0x1 /* quotacheck(8) required */ -#define QUOTA_RESTRICT_UNIFORMGRACE 0x2 /* grace time is global */ -#define QUOTA_RESTRICT_32BIT 0x4 /* values limited to 2^32 */ - /* * Structure for QUOTACTL_STAT. */ @@ -54,7 +47,7 @@ struct quotastat { char qs_implname[QUOTA_NAMELEN]; unsigned qs_numidtypes; unsigned qs_numobjtypes; - unsigned qs_restrictions; + unsigned qs_restrictions; /* semantic restriction codes */ }; /*
CVS commit: src/sys/arch/arm/arm32
Module Name:src Committed By: he Date: Sun Jan 29 20:16:17 UTC 2012 Modified Files: src/sys/arch/arm/arm32: pmap.c Log Message: Only declare helper variable which is only used in KASSERT() if DIAGNOSTIC is defined, to avoid variable defined but never used warning if DIAGNOSTIC isn't defined, and KASSERT() expands to nothing. To generate a diff of this commit: cvs rdiff -u -r1.227 -r1.228 src/sys/arch/arm/arm32/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/arm/arm32/pmap.c diff -u src/sys/arch/arm/arm32/pmap.c:1.227 src/sys/arch/arm/arm32/pmap.c:1.228 --- src/sys/arch/arm/arm32/pmap.c:1.227 Sat Jan 28 16:16:41 2012 +++ src/sys/arch/arm/arm32/pmap.c Sun Jan 29 20:16:16 2012 @@ -1,4 +1,4 @@ -/* $NetBSD: pmap.c,v 1.227 2012/01/28 16:16:41 matt Exp $ */ +/* $NetBSD: pmap.c,v 1.228 2012/01/29 20:16:16 he Exp $ */ /* * Copyright 2003 Wasabi Systems, Inc. @@ -211,7 +211,7 @@ #include machine/param.h #include arm/arm32/katelib.h -__KERNEL_RCSID(0, $NetBSD: pmap.c,v 1.227 2012/01/28 16:16:41 matt Exp $); +__KERNEL_RCSID(0, $NetBSD: pmap.c,v 1.228 2012/01/29 20:16:16 he Exp $); #ifdef PMAP_DEBUG @@ -3342,7 +3342,9 @@ pmap_kenter_pa(vaddr_t va, paddr_t pa, v PMAPCOUNT(kenter_remappings); #ifdef PMAP_CACHE_VIPT opg = PHYS_TO_VM_PAGE(l2pte_pa(opte)); +#ifdef DIAGNOSTIC struct vm_page_md *omd = VM_PAGE_TO_MD(opg); +#endif if (opg) { KASSERT(opg != pg); KASSERT((omd-pvh_attrs PVF_KMPAGE) == 0);
CVS commit: src/sys/kern
Module Name:src Committed By: he Date: Sun Jan 29 20:20:18 UTC 2012 Modified Files: src/sys/kern: subr_pool.c Log Message: Use the same style for initialization of pool_allocator_kmem under POOL_SUBPAGE as all the other poll_allocator structs. Fixes build problem for acorn26. To generate a diff of this commit: cvs rdiff -u -r1.192 -r1.193 src/sys/kern/subr_pool.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_pool.c diff -u src/sys/kern/subr_pool.c:1.192 src/sys/kern/subr_pool.c:1.193 --- src/sys/kern/subr_pool.c:1.192 Sat Jan 28 00:00:06 2012 +++ src/sys/kern/subr_pool.c Sun Jan 29 20:20:18 2012 @@ -1,4 +1,4 @@ -/* $NetBSD: subr_pool.c,v 1.192 2012/01/28 00:00:06 rmind Exp $ */ +/* $NetBSD: subr_pool.c,v 1.193 2012/01/29 20:20:18 he Exp $ */ /*- * Copyright (c) 1997, 1999, 2000, 2002, 2007, 2008, 2010 @@ -32,7 +32,7 @@ */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: subr_pool.c,v 1.192 2012/01/28 00:00:06 rmind Exp $); +__KERNEL_RCSID(0, $NetBSD: subr_pool.c,v 1.193 2012/01/29 20:20:18 he Exp $); #include opt_ddb.h #include opt_pool.h @@ -2752,7 +2752,9 @@ void *pool_subpage_alloc(struct pool *, void pool_subpage_free(struct pool *, void *); struct pool_allocator pool_allocator_kmem = { - pool_subpage_alloc, pool_subpage_free, POOL_SUBPAGE, + .pa_alloc = pool_subpage_alloc, + .pa_free = pool_subpage_free, + .pa_pagesz = POOL_SUBPAGE }; void *pool_subpage_alloc_nointr(struct pool *, int);
CVS commit: src/sys
Module Name:src Committed By: rmind Date: Sun Jan 29 22:55:40 UTC 2012 Modified Files: src/sys/kern: init_main.c kern_cpu.c kern_idle.c subr_pserialize.c sys_sched.c src/sys/sys: cpu.h cpu_data.h Log Message: - Add mi_cpu_init() and initialise cpu_lock and kcpuset_attached/running there. - Add kcpuset_running which gets set in idle_loop(). - Use kcpuset_running in pserialize_perform(). To generate a diff of this commit: cvs rdiff -u -r1.439 -r1.440 src/sys/kern/init_main.c cvs rdiff -u -r1.54 -r1.55 src/sys/kern/kern_cpu.c cvs rdiff -u -r1.24 -r1.25 src/sys/kern/kern_idle.c cvs rdiff -u -r1.4 -r1.5 src/sys/kern/subr_pserialize.c cvs rdiff -u -r1.38 -r1.39 src/sys/kern/sys_sched.c cvs rdiff -u -r1.34 -r1.35 src/sys/sys/cpu.h cvs rdiff -u -r1.33 -r1.34 src/sys/sys/cpu_data.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/kern/init_main.c diff -u src/sys/kern/init_main.c:1.439 src/sys/kern/init_main.c:1.440 --- src/sys/kern/init_main.c:1.439 Tue Jan 24 20:03:36 2012 +++ src/sys/kern/init_main.c Sun Jan 29 22:55:40 2012 @@ -1,4 +1,4 @@ -/* $NetBSD: init_main.c,v 1.439 2012/01/24 20:03:36 christos Exp $ */ +/* $NetBSD: init_main.c,v 1.440 2012/01/29 22:55:40 rmind Exp $ */ /*- * Copyright (c) 2008, 2009 The NetBSD Foundation, Inc. @@ -97,7 +97,7 @@ */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: init_main.c,v 1.439 2012/01/24 20:03:36 christos Exp $); +__KERNEL_RCSID(0, $NetBSD: init_main.c,v 1.440 2012/01/29 22:55:40 rmind Exp $); #include opt_ddb.h #include opt_ipsec.h @@ -304,7 +304,7 @@ main(void) kernel_lock_init(); once_init(); - mutex_init(cpu_lock, MUTEX_DEFAULT, IPL_NONE); + mi_cpu_init(); kernconfig_lock_init(); kthread_sysinit(); Index: src/sys/kern/kern_cpu.c diff -u src/sys/kern/kern_cpu.c:1.54 src/sys/kern/kern_cpu.c:1.55 --- src/sys/kern/kern_cpu.c:1.54 Tue Jan 17 10:47:27 2012 +++ src/sys/kern/kern_cpu.c Sun Jan 29 22:55:40 2012 @@ -1,4 +1,4 @@ -/* $NetBSD: kern_cpu.c,v 1.54 2012/01/17 10:47:27 cegger Exp $ */ +/* $NetBSD: kern_cpu.c,v 1.55 2012/01/29 22:55:40 rmind Exp $ */ /*- * Copyright (c) 2007, 2008, 2009, 2010, 2012 The NetBSD Foundation, Inc. @@ -56,7 +56,7 @@ */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: kern_cpu.c,v 1.54 2012/01/17 10:47:27 cegger Exp $); +__KERNEL_RCSID(0, $NetBSD: kern_cpu.c,v 1.55 2012/01/29 22:55:40 rmind Exp $); #include opt_cpu_ucode.h @@ -110,13 +110,31 @@ int ncpu __read_mostly; int ncpuonline __read_mostly; bool mp_online __read_mostly; -kcpuset_t * kcpuset_attached __read_mostly; +/* Note: set on mi_cpu_attach() and idle_loop(). */ +kcpuset_t * kcpuset_attached __read_mostly = NULL; +kcpuset_t * kcpuset_running __read_mostly = NULL; struct cpuqueue cpu_queue __cacheline_aligned = CIRCLEQ_HEAD_INITIALIZER(cpu_queue); static struct cpu_info **cpu_infos __read_mostly; +/* + * mi_cpu_init: early initialisation of MI CPU related structures. + * + * Note: may not block and memory allocator is not yet available. + */ +void +mi_cpu_init(void) +{ + + mutex_init(cpu_lock, MUTEX_DEFAULT, IPL_NONE); + + kcpuset_create(kcpuset_attached, true); + kcpuset_create(kcpuset_running, true); + kcpuset_set(kcpuset_running, 0); +} + int mi_cpu_attach(struct cpu_info *ci) { @@ -125,6 +143,8 @@ mi_cpu_attach(struct cpu_info *ci) KASSERT(maxcpus 0); ci-ci_index = ncpu; + kcpuset_set(kcpuset_attached, cpu_index(ci)); + CIRCLEQ_INSERT_TAIL(cpu_queue, ci, ci_data.cpu_qchain); TAILQ_INIT(ci-ci_data.cpu_ld_locks); __cpu_simple_lock_init(ci-ci_data.cpu_ld_lock); @@ -136,10 +156,8 @@ mi_cpu_attach(struct cpu_info *ci) if (__predict_false(cpu_infos == NULL)) { cpu_infos = kmem_zalloc(sizeof(cpu_infos[0]) * maxcpus, KM_SLEEP); - kcpuset_create(kcpuset_attached, true); } cpu_infos[cpu_index(ci)] = ci; - kcpuset_set(kcpuset_attached, ci-ci_index); sched_cpuattach(ci); Index: src/sys/kern/kern_idle.c diff -u src/sys/kern/kern_idle.c:1.24 src/sys/kern/kern_idle.c:1.25 --- src/sys/kern/kern_idle.c:1.24 Mon Jan 17 07:13:31 2011 +++ src/sys/kern/kern_idle.c Sun Jan 29 22:55:40 2012 @@ -1,4 +1,4 @@ -/* $NetBSD: kern_idle.c,v 1.24 2011/01/17 07:13:31 uebayasi Exp $ */ +/* $NetBSD: kern_idle.c,v 1.25 2012/01/29 22:55:40 rmind Exp $ */ /*- * Copyright (c)2002, 2006, 2007 YAMAMOTO Takashi, @@ -28,7 +28,7 @@ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: kern_idle.c,v 1.24 2011/01/17 07:13:31 uebayasi Exp $); +__KERNEL_RCSID(0, $NetBSD: kern_idle.c,v 1.25 2012/01/29 22:55:40 rmind Exp $); #include sys/param.h #include sys/cpu.h @@ -49,6 +49,7 @@ idle_loop(void *dummy) struct schedstate_percpu *spc; struct lwp *l = curlwp; + kcpuset_atomic_set(kcpuset_running, cpu_index(ci)); ci-ci_data.cpu_onproc = l; /* Update start time for this thread. */ Index: src/sys/kern/subr_pserialize.c diff -u
CVS commit: src/lib/csu/arch/sh3
Module Name:src Committed By: uwe Date: Sun Jan 29 23:27:24 UTC 2012 Modified Files: src/lib/csu/arch/sh3: crt0.S Log Message: Since it's in a separate file now, we cannot use direct branch to label. To generate a diff of this commit: cvs rdiff -u -r1.2 -r1.3 src/lib/csu/arch/sh3/crt0.S Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/lib/csu/arch/sh3/crt0.S diff -u src/lib/csu/arch/sh3/crt0.S:1.2 src/lib/csu/arch/sh3/crt0.S:1.3 --- src/lib/csu/arch/sh3/crt0.S:1.2 Sat Jan 28 12:21:13 2012 +++ src/lib/csu/arch/sh3/crt0.S Sun Jan 29 23:27:24 2012 @@ -1,4 +1,4 @@ -/* $NetBSD: crt0.S,v 1.2 2012/01/28 12:21:13 uwe Exp $ */ +/* $NetBSD: crt0.S,v 1.3 2012/01/29 23:27:24 uwe Exp $ */ /* * Copyright (c) 1998 Christos Zoulas @@ -37,7 +37,7 @@ #include machine/asm.h -RCSID($NetBSD: crt0.S,v 1.2 2012/01/28 12:21:13 uwe Exp $) +RCSID($NetBSD: crt0.S,v 1.3 2012/01/29 23:27:24 uwe Exp $) STRONG_ALIAS(_start,__start) @@ -48,6 +48,10 @@ STRONG_ALIAS(_start,__start) * written in C. */ _ENTRY(__start) + mov.l .L___start, r0 mov.l r9, @-sp - bra ___start + braf r0 mov.l r8, @-sp + + .p2align 2 +.L___start: .long _C_LABEL(___start)
CVS commit: src
Module Name:src Committed By: joerg Date: Sun Jan 29 23:29:01 UTC 2012 Modified Files: src/distrib/sets/lists/base: ad.mips64eb ad.mips64el md.amd64 md.sparc64 shl.mi src/distrib/sets/lists/comp: ad.mips64eb ad.mips64el md.amd64 md.sparc64 shl.mi src/external/public-domain/sqlite/lib: shlib_version Log Message: Bump libsqlite3 minor version for new functions in 3.7.10. To generate a diff of this commit: cvs rdiff -u -r1.78 -r1.79 src/distrib/sets/lists/base/ad.mips64eb cvs rdiff -u -r1.77 -r1.78 src/distrib/sets/lists/base/ad.mips64el cvs rdiff -u -r1.152 -r1.153 src/distrib/sets/lists/base/md.amd64 cvs rdiff -u -r1.143 -r1.144 src/distrib/sets/lists/base/md.sparc64 cvs rdiff -u -r1.612 -r1.613 src/distrib/sets/lists/base/shl.mi cvs rdiff -u -r1.65 -r1.66 src/distrib/sets/lists/comp/ad.mips64eb \ src/distrib/sets/lists/comp/ad.mips64el cvs rdiff -u -r1.151 -r1.152 src/distrib/sets/lists/comp/md.amd64 cvs rdiff -u -r1.134 -r1.135 src/distrib/sets/lists/comp/md.sparc64 cvs rdiff -u -r1.205 -r1.206 src/distrib/sets/lists/comp/shl.mi cvs rdiff -u -r1.1 -r1.2 src/external/public-domain/sqlite/lib/shlib_version 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/base/ad.mips64eb diff -u src/distrib/sets/lists/base/ad.mips64eb:1.78 src/distrib/sets/lists/base/ad.mips64eb:1.79 --- src/distrib/sets/lists/base/ad.mips64eb:1.78 Sun Jan 22 18:36:14 2012 +++ src/distrib/sets/lists/base/ad.mips64eb Sun Jan 29 23:29:00 2012 @@ -1,4 +1,4 @@ -# $NetBSD: ad.mips64eb,v 1.78 2012/01/22 18:36:14 christos Exp $ +# $NetBSD: ad.mips64eb,v 1.79 2012/01/29 23:29:00 joerg Exp $ ./libexec/ld.elf_so-64base-compat-shlib compat,pic ./libexec/ld.elf_so-o32base-sysutil-bin compat,pic ./usr/lib/64 base-compat-lib @@ -238,7 +238,7 @@ ./usr/lib/64/libsl.so.5base-compat-shlib compat,pic,kerberos ./usr/lib/64/libsl.so.5.0 base-compat-shlib compat,pic,kerberos ./usr/lib/64/libsqlite3.so.1 base-compat-shlib compat,pic -./usr/lib/64/libsqlite3.so.1.0 base-compat-shlib compat,pic +./usr/lib/64/libsqlite3.so.1.1 base-compat-shlib compat,pic ./usr/lib/64/libss.so.6base-compat-shlib obsolete ./usr/lib/64/libss.so.6.0 base-compat-shlib obsolete ./usr/lib/64/libssh.so.18 base-compat-shlib compat,pic,crypto @@ -534,7 +534,7 @@ ./usr/lib/o32/libsl.so.5 base-compat-shlib compat,pic,kerberos ./usr/lib/o32/libsl.so.5.0 base-compat-shlib compat,pic,kerberos ./usr/lib/o32/libsqlite3.so.1 base-compat-shlib compat,pic -./usr/lib/o32/libsqlite3.so.1.0 base-compat-shlib compat,pic +./usr/lib/o32/libsqlite3.so.1.1 base-compat-shlib compat,pic ./usr/lib/o32/libss.so.6 base-compat-shlib obsolete ./usr/lib/o32/libss.so.6.0 base-compat-shlib obsolete ./usr/lib/o32/libssh.so.18 base-compat-shlib compat,pic,crypto Index: src/distrib/sets/lists/base/ad.mips64el diff -u src/distrib/sets/lists/base/ad.mips64el:1.77 src/distrib/sets/lists/base/ad.mips64el:1.78 --- src/distrib/sets/lists/base/ad.mips64el:1.77 Sun Jan 22 18:36:15 2012 +++ src/distrib/sets/lists/base/ad.mips64el Sun Jan 29 23:29:00 2012 @@ -1,4 +1,4 @@ -# $NetBSD: ad.mips64el,v 1.77 2012/01/22 18:36:15 christos Exp $ +# $NetBSD: ad.mips64el,v 1.78 2012/01/29 23:29:00 joerg Exp $ ./libexec/ld.elf_so-64base-compat-shlib compat,pic ./libexec/ld.elf_so-o32base-sysutil-bin compat,pic ./usr/lib/64 base-compat-lib @@ -238,7 +238,7 @@ ./usr/lib/64/libsl.so.5base-compat-shlib compat,pic,kerberos ./usr/lib/64/libsl.so.5.0 base-compat-shlib compat,pic,kerberos ./usr/lib/64/libsqlite3.so.1 base-compat-shlib compat,pic -./usr/lib/64/libsqlite3.so.1.0 base-compat-shlib compat,pic +./usr/lib/64/libsqlite3.so.1.1 base-compat-shlib compat,pic ./usr/lib/64/libss.so.6base-compat-shlib obsolete ./usr/lib/64/libss.so.6.0 base-compat-shlib obsolete ./usr/lib/64/libssh.so.18 base-compat-shlib compat,pic,crypto @@ -534,7 +534,7 @@ ./usr/lib/o32/libsl.so.5 base-compat-shlib compat,pic,kerberos ./usr/lib/o32/libsl.so.5.0 base-compat-shlib compat,pic,kerberos ./usr/lib/o32/libsqlite3.so.1 base-compat-shlib compat,pic -./usr/lib/o32/libsqlite3.so.1.0 base-compat-shlib compat,pic +./usr/lib/o32/libsqlite3.so.1.1 base-compat-shlib compat,pic ./usr/lib/o32/libss.so.6 base-compat-shlib obsolete ./usr/lib/o32/libss.so.6.0 base-compat-shlib obsolete ./usr/lib/o32/libssh.so.18 base-compat-shlib compat,pic,crypto Index: src/distrib/sets/lists/base/md.amd64 diff -u src/distrib/sets/lists/base/md.amd64:1.152 src/distrib/sets/lists/base/md.amd64:1.153 --- src/distrib/sets/lists/base/md.amd64:1.152 Fri Jan 27 08:47:52 2012 +++ src/distrib/sets/lists/base/md.amd64 Sun Jan 29 23:29:00 2012 @@ -1,4 +1,4 @@ -# $NetBSD: md.amd64,v 1.152 2012/01/27 08:47:52 jnemeth Exp $ +# $NetBSD: md.amd64,v 1.153 2012/01/29 23:29:00 joerg Exp $ ./dev/lms0
CVS commit: src/sys/sys
Module Name:src Committed By: dholland Date: Mon Jan 30 00:56:20 UTC 2012 Modified Files: src/sys/sys: quota.h Log Message: Add QUOTA_RESTRICT_READONLY, for the nfs quota access code. To generate a diff of this commit: cvs rdiff -u -r1.11 -r1.12 src/sys/sys/quota.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/sys/quota.h diff -u src/sys/sys/quota.h:1.11 src/sys/sys/quota.h:1.12 --- src/sys/sys/quota.h:1.11 Sun Jan 29 19:36:14 2012 +++ src/sys/sys/quota.h Mon Jan 30 00:56:19 2012 @@ -1,4 +1,4 @@ -/* $NetBSD: quota.h,v 1.11 2012/01/29 19:36:14 dholland Exp $ */ +/* $NetBSD: quota.h,v 1.12 2012/01/30 00:56:19 dholland Exp $ */ /*- * Copyright (c) 2010 Manuel Bouyer * All rights reserved. @@ -55,6 +55,7 @@ #define QUOTA_RESTRICT_NEEDSQUOTACHECK 0x1 /* quotacheck(8) required */ #define QUOTA_RESTRICT_UNIFORMGRACE 0x2 /* grace time is global */ #define QUOTA_RESTRICT_32BIT 0x4 /* values limited to 2^32 */ +#define QUOTA_RESTRICT_READONLY 0x8 /* updates not supported */ /*
CVS commit: src/sys/dev/wscons
Module Name:src Committed By: rmind Date: Mon Jan 30 01:54:08 UTC 2012 Modified Files: src/sys/dev/wscons: wsmux.c Log Message: wsmux_getmux: do not increment nwsmux if allocation fails (might cause buffer overflow). Simplify slightly. To generate a diff of this commit: cvs rdiff -u -r1.53 -r1.54 src/sys/dev/wscons/wsmux.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/wscons/wsmux.c diff -u src/sys/dev/wscons/wsmux.c:1.53 src/sys/dev/wscons/wsmux.c:1.54 --- src/sys/dev/wscons/wsmux.c:1.53 Fri Feb 13 22:41:04 2009 +++ src/sys/dev/wscons/wsmux.c Mon Jan 30 01:54:08 2012 @@ -1,4 +1,4 @@ -/* $NetBSD: wsmux.c,v 1.53 2009/02/13 22:41:04 apb Exp $ */ +/* $NetBSD: wsmux.c,v 1.54 2012/01/30 01:54:08 rmind Exp $ */ /* * Copyright (c) 1998, 2005 The NetBSD Foundation, Inc. @@ -37,7 +37,7 @@ */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: wsmux.c,v 1.53 2009/02/13 22:41:04 apb Exp $); +__KERNEL_RCSID(0, $NetBSD: wsmux.c,v 1.54 2012/01/30 01:54:08 rmind Exp $); #include opt_compat_netbsd.h #include opt_modular.h @@ -141,36 +141,29 @@ wsmuxattach(int n) } /* Keep track of all muxes that have been allocated */ +static struct wsmux_softc **wsmuxdevs = NULL; static int nwsmux = 0; -static struct wsmux_softc **wsmuxdevs; /* Return mux n, create if necessary */ struct wsmux_softc * wsmux_getmux(int n) { struct wsmux_softc *sc; - int i; - void *new; n = WSMUXDEV(n); /* limit range */ /* Make sure there is room for mux n in the table */ if (n = nwsmux) { - i = nwsmux; - nwsmux = n + 1; - if (i != 0) - new = realloc(wsmuxdevs, nwsmux * sizeof (*wsmuxdevs), - M_DEVBUF, M_NOWAIT); - else - new = malloc(nwsmux * sizeof (*wsmuxdevs), - M_DEVBUF, M_NOWAIT); + void *new; + + new = realloc(wsmuxdevs, (n + 1) * sizeof(*wsmuxdevs), + M_DEVBUF, M_ZERO | M_NOWAIT); if (new == NULL) { printf(wsmux_getmux: no memory for mux %d\n, n); - return (NULL); + return NULL; } wsmuxdevs = new; - for (; i nwsmux; i++) - wsmuxdevs[i] = NULL; + nwsmux = n + 1; } sc = wsmuxdevs[n];
CVS commit: src/sys/kern
Module Name:src Committed By: rmind Date: Mon Jan 30 01:56:48 UTC 2012 Modified Files: src/sys/kern: kern_malloc.c Log Message: - kern_realloc: fix a recent regression, use correct size of current allocation. - kern_malloc: constify. To generate a diff of this commit: cvs rdiff -u -r1.135 -r1.136 src/sys/kern/kern_malloc.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/kern_malloc.c diff -u src/sys/kern/kern_malloc.c:1.135 src/sys/kern/kern_malloc.c:1.136 --- src/sys/kern/kern_malloc.c:1.135 Sat Jan 28 23:09:06 2012 +++ src/sys/kern/kern_malloc.c Mon Jan 30 01:56:47 2012 @@ -1,4 +1,4 @@ -/* $NetBSD: kern_malloc.c,v 1.135 2012/01/28 23:09:06 rmind Exp $ */ +/* $NetBSD: kern_malloc.c,v 1.136 2012/01/30 01:56:47 rmind Exp $ */ /* * Copyright (c) 1987, 1991, 1993 @@ -66,7 +66,7 @@ */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: kern_malloc.c,v 1.135 2012/01/28 23:09:06 rmind Exp $); +__KERNEL_RCSID(0, $NetBSD: kern_malloc.c,v 1.136 2012/01/30 01:56:47 rmind Exp $); #include sys/param.h #include sys/proc.h @@ -91,7 +91,8 @@ struct malloc_type *kmemstatistics; kmutex_t malloc_lock; struct malloc_header { - size_t mh_size; + /* Total size, include the header. */ + size_t mh_size; }; /* @@ -106,10 +107,9 @@ void * kern_malloc(unsigned long size, struct malloc_type *ksp, int flags) #endif /* MALLOCLOG */ { + const int kmflags = (flags M_NOWAIT) ? KM_NOSLEEP : KM_SLEEP; + const size_t allocsize = sizeof(struct malloc_header) + size; struct malloc_header *mh; - int kmflags = ((flags M_NOWAIT) != 0 - ? KM_NOSLEEP : KM_SLEEP); - size_t allocsize = sizeof(struct malloc_header) + size; void *p; p = kmem_intr_alloc(allocsize, kmflags); @@ -178,7 +178,7 @@ kern_realloc(void *curaddr, unsigned lon mh = curaddr; mh--; - cursize = mh-mh_size; + cursize = mh-mh_size - sizeof(struct malloc_header); /* * If we already actually have as much as they want, we're done.
CVS commit: src/sys/arch
Module Name:src Committed By: mrg Date: Mon Jan 30 04:25:15 UTC 2012 Modified Files: src/sys/arch/sparc/dev: ebus.c sbus.c src/sys/arch/sparc64/dev: ebus.c sbus.c Log Message: avoid writing 1 byte beyond the end of the string promlib.c has given us. instead of forcing a nul byte afterwards, KASSERT() that the final byte already is a nul. if there are broken proms... well, we can fix them. this, plus one more change, allows my SS20 to boot multiuser. To generate a diff of this commit: cvs rdiff -u -r1.33 -r1.34 src/sys/arch/sparc/dev/ebus.c cvs rdiff -u -r1.75 -r1.76 src/sys/arch/sparc/dev/sbus.c cvs rdiff -u -r1.59 -r1.60 src/sys/arch/sparc64/dev/ebus.c cvs rdiff -u -r1.92 -r1.93 src/sys/arch/sparc64/dev/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/arch/sparc/dev/ebus.c diff -u src/sys/arch/sparc/dev/ebus.c:1.33 src/sys/arch/sparc/dev/ebus.c:1.34 --- src/sys/arch/sparc/dev/ebus.c:1.33 Mon Jul 18 00:31:13 2011 +++ src/sys/arch/sparc/dev/ebus.c Mon Jan 30 04:25:14 2012 @@ -1,4 +1,4 @@ -/* $NetBSD: ebus.c,v 1.33 2011/07/18 00:31:13 mrg Exp $ */ +/* $NetBSD: ebus.c,v 1.34 2012/01/30 04:25:14 mrg Exp $ */ /* * Copyright (c) 1999, 2000 Matthew R. Green @@ -32,7 +32,7 @@ */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: ebus.c,v 1.33 2011/07/18 00:31:13 mrg Exp $); +__KERNEL_RCSID(0, $NetBSD: ebus.c,v 1.34 2012/01/30 04:25:14 mrg Exp $); #if defined(DEBUG) !defined(EBUS_DEBUG) #define EBUS_DEBUG @@ -332,7 +332,7 @@ ebus_setup_attach_args(struct ebus_softc err = prom_getprop(node, name, 1, n, ea-ea_name); if (err != 0) return (err); - ea-ea_name[n] = '\0'; + KASSERT(ea-ea_name[n-1] == '\0'); ea-ea_node = node; ea-ea_bustag = bustag; Index: src/sys/arch/sparc/dev/sbus.c diff -u src/sys/arch/sparc/dev/sbus.c:1.75 src/sys/arch/sparc/dev/sbus.c:1.76 --- src/sys/arch/sparc/dev/sbus.c:1.75 Fri Jul 1 18:50:41 2011 +++ src/sys/arch/sparc/dev/sbus.c Mon Jan 30 04:25:14 2012 @@ -1,4 +1,4 @@ -/* $NetBSD: sbus.c,v 1.75 2011/07/01 18:50:41 dyoung Exp $ */ +/* $NetBSD: sbus.c,v 1.76 2012/01/30 04:25:14 mrg Exp $ */ /*- * Copyright (c) 1998 The NetBSD Foundation, Inc. @@ -74,7 +74,7 @@ */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: sbus.c,v 1.75 2011/07/01 18:50:41 dyoung Exp $); +__KERNEL_RCSID(0, $NetBSD: sbus.c,v 1.76 2012/01/30 04:25:14 mrg Exp $); #include sys/param.h #include sys/malloc.h @@ -444,7 +444,7 @@ sbus_setup_attach_args(struct sbus_softc error = prom_getprop(node, name, 1, n, sa-sa_name); if (error != 0) return (error); - sa-sa_name[n] = '\0'; + KASSERT(sa-sa_name[n-1] == '\0'); sa-sa_bustag = bustag; sa-sa_dmatag = dmatag; Index: src/sys/arch/sparc64/dev/ebus.c diff -u src/sys/arch/sparc64/dev/ebus.c:1.59 src/sys/arch/sparc64/dev/ebus.c:1.60 --- src/sys/arch/sparc64/dev/ebus.c:1.59 Wed Jul 20 12:06:00 2011 +++ src/sys/arch/sparc64/dev/ebus.c Mon Jan 30 04:25:15 2012 @@ -1,4 +1,4 @@ -/* $NetBSD: ebus.c,v 1.59 2011/07/20 12:06:00 macallan Exp $ */ +/* $NetBSD: ebus.c,v 1.60 2012/01/30 04:25:15 mrg Exp $ */ /* * Copyright (c) 1999, 2000, 2001 Matthew R. Green @@ -27,7 +27,7 @@ */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: ebus.c,v 1.59 2011/07/20 12:06:00 macallan Exp $); +__KERNEL_RCSID(0, $NetBSD: ebus.c,v 1.60 2012/01/30 04:25:15 mrg Exp $); #include opt_ddb.h @@ -226,7 +226,7 @@ ebus_setup_attach_args(struct ebus_softc rv = prom_getprop(node, name, 1, n, ea-ea_name); if (rv != 0) return (rv); - ea-ea_name[n] = '\0'; + KASSERT(ea-ea_name[n-1] == '\0'); ea-ea_node = node; ea-ea_bustag = sc-sc_childbustag; Index: src/sys/arch/sparc64/dev/sbus.c diff -u src/sys/arch/sparc64/dev/sbus.c:1.92 src/sys/arch/sparc64/dev/sbus.c:1.93 --- src/sys/arch/sparc64/dev/sbus.c:1.92 Sun Sep 4 12:17:14 2011 +++ src/sys/arch/sparc64/dev/sbus.c Mon Jan 30 04:25:15 2012 @@ -1,4 +1,4 @@ -/* $NetBSD: sbus.c,v 1.92 2011/09/04 12:17:14 nakayama Exp $ */ +/* $NetBSD: sbus.c,v 1.93 2012/01/30 04:25:15 mrg Exp $ */ /* * Copyright (c) 1999-2002 Eduardo Horvath @@ -34,7 +34,7 @@ */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: sbus.c,v 1.92 2011/09/04 12:17:14 nakayama Exp $); +__KERNEL_RCSID(0, $NetBSD: sbus.c,v 1.93 2012/01/30 04:25:15 mrg Exp $); #include opt_ddb.h @@ -315,7 +315,7 @@ sbus_setup_attach_args(struct sbus_softc error = prom_getprop(node, name, 1, n, sa-sa_name); if (error != 0) return (error); - sa-sa_name[n] = '\0'; + KASSERT(sa-sa_name[n-1] == '\0'); sa-sa_bustag = bustag; sa-sa_dmatag = dmatag;
CVS commit: src/sys/kern
Module Name:src Committed By: mrg Date: Mon Jan 30 05:42:54 UTC 2012 Modified Files: src/sys/kern: kern_malloc.c Log Message: make sure that the 'struct malloc' header on allocations is properly aligned to (ALIGNBYTES+1). this ensures that the memory that malloc(9) returns is correctly aligned for the platform. this change has an effect on hppa, ia64, sparc and sparc64. necessary on sparc for 8-byte load/store instructions. with this my SS20 boots multiuser again. To generate a diff of this commit: cvs rdiff -u -r1.136 -r1.137 src/sys/kern/kern_malloc.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/kern_malloc.c diff -u src/sys/kern/kern_malloc.c:1.136 src/sys/kern/kern_malloc.c:1.137 --- src/sys/kern/kern_malloc.c:1.136 Mon Jan 30 01:56:47 2012 +++ src/sys/kern/kern_malloc.c Mon Jan 30 05:42:54 2012 @@ -1,4 +1,4 @@ -/* $NetBSD: kern_malloc.c,v 1.136 2012/01/30 01:56:47 rmind Exp $ */ +/* $NetBSD: kern_malloc.c,v 1.137 2012/01/30 05:42:54 mrg Exp $ */ /* * Copyright (c) 1987, 1991, 1993 @@ -66,7 +66,7 @@ */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: kern_malloc.c,v 1.136 2012/01/30 01:56:47 rmind Exp $); +__KERNEL_RCSID(0, $NetBSD: kern_malloc.c,v 1.137 2012/01/30 05:42:54 mrg Exp $); #include sys/param.h #include sys/proc.h @@ -93,7 +93,7 @@ kmutex_t malloc_lock; struct malloc_header { /* Total size, include the header. */ size_t mh_size; -}; +} __aligned(ALIGNBYTES+1); /* * Allocate a block of memory
CVS commit: src
Module Name:src Committed By: dholland Date: Mon Jan 30 06:00:49 UTC 2012 Modified Files: src/lib/libquota: quota_proplib.c src/usr.bin/quota: quota.c Log Message: Remove an old, no longer necessary hack from libquota and handle the relevant case properly in usr.bin/quota. To generate a diff of this commit: cvs rdiff -u -r1.7 -r1.8 src/lib/libquota/quota_proplib.c cvs rdiff -u -r1.44 -r1.45 src/usr.bin/quota/quota.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/lib/libquota/quota_proplib.c diff -u src/lib/libquota/quota_proplib.c:1.7 src/lib/libquota/quota_proplib.c:1.8 --- src/lib/libquota/quota_proplib.c:1.7 Wed Jan 25 01:22:56 2012 +++ src/lib/libquota/quota_proplib.c Mon Jan 30 06:00:49 2012 @@ -1,4 +1,4 @@ -/* $NetBSD: quota_proplib.c,v 1.7 2012/01/25 01:22:56 dholland Exp $ */ +/* $NetBSD: quota_proplib.c,v 1.8 2012/01/30 06:00:49 dholland Exp $ */ /*- * Copyright (c) 2011 Manuel Bouyer * All rights reserved. @@ -26,7 +26,7 @@ */ #include sys/cdefs.h -__RCSID($NetBSD: quota_proplib.c,v 1.7 2012/01/25 01:22:56 dholland Exp $); +__RCSID($NetBSD: quota_proplib.c,v 1.8 2012/01/30 06:00:49 dholland Exp $); #include stdlib.h #include string.h @@ -367,6 +367,11 @@ __quota_proplib_get(struct quotahandle * /* as far as I can tell this is required here - dholland */ prop_object_release(cmds); +#if 0 + printf(message to kernel:\n%s\n, + prop_dictionary_externalize(dict)); +#endif + /* * Convert it to an XML turd for transfer. */ @@ -419,6 +424,11 @@ __quota_proplib_get(struct quotahandle * return -1; } +#if 0 + printf(reply from kernel:\n%s\n, + prop_dictionary_externalize(dict)); +#endif + /* * Now unpack the response. */ @@ -458,15 +468,6 @@ __quota_proplib_get(struct quotahandle * return -1; } - if (error8 == ENODEV) { - /* XXX this currently means quotas are not enabled */ - /* XXX but there's currently no way to fail in quota_open */ - /* XXX in that case */ - quotaval_clear(qv); - prop_object_release(dict); - return 0; - } - if (error8) { /* this means the RPC action failed */ prop_object_release(dict); Index: src/usr.bin/quota/quota.c diff -u src/usr.bin/quota/quota.c:1.44 src/usr.bin/quota/quota.c:1.45 --- src/usr.bin/quota/quota.c:1.44 Mon Jan 9 15:35:44 2012 +++ src/usr.bin/quota/quota.c Mon Jan 30 06:00:49 2012 @@ -1,4 +1,4 @@ -/* $NetBSD: quota.c,v 1.44 2012/01/09 15:35:44 dholland Exp $ */ +/* $NetBSD: quota.c,v 1.45 2012/01/30 06:00:49 dholland Exp $ */ /* * Copyright (c) 1980, 1990, 1993 @@ -42,7 +42,7 @@ __COPYRIGHT(@(#) Copyright (c) 1980, 19 #if 0 static char sccsid[] = @(#)quota.c 8.4 (Berkeley) 4/28/95; #else -__RCSID($NetBSD: quota.c,v 1.44 2012/01/09 15:35:44 dholland Exp $); +__RCSID($NetBSD: quota.c,v 1.45 2012/01/30 06:00:49 dholland Exp $); #endif #endif /* not lint */ @@ -546,7 +546,7 @@ getprivs(id_t id, int idtype) for (j=0; jqup-numqvs; j++) { qk.qk_objtype = j; if (quota_get(qup-qh, qk, qup-qvs[j]) 0) { -if (errno != ENOENT) { +if (errno != ENOENT errno != ENODEV) { warn(%s: quota_get (objtype %u), fst[i].f_mntonname, j); }
CVS commit: src/usr.bin/quota
Module Name:src Committed By: dholland Date: Mon Jan 30 06:02:12 UTC 2012 Modified Files: src/usr.bin/quota: quotautil.c Log Message: Don't strlcpy from a string buffer to itself; the behavior is not defined. To generate a diff of this commit: cvs rdiff -u -r1.4 -r1.5 src/usr.bin/quota/quotautil.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/usr.bin/quota/quotautil.c diff -u src/usr.bin/quota/quotautil.c:1.4 src/usr.bin/quota/quotautil.c:1.5 --- src/usr.bin/quota/quotautil.c:1.4 Wed Jan 25 01:24:07 2012 +++ src/usr.bin/quota/quotautil.c Mon Jan 30 06:02:12 2012 @@ -1,4 +1,4 @@ -/* $NetBSD: quotautil.c,v 1.4 2012/01/25 01:24:07 dholland Exp $ */ +/* $NetBSD: quotautil.c,v 1.5 2012/01/30 06:02:12 dholland Exp $ */ /* * Copyright (c) 1980, 1990, 1993 @@ -42,7 +42,7 @@ __COPYRIGHT(@(#) Copyright (c) 1980, 19 #if 0 static char sccsid[] = @(#)quota.c 8.4 (Berkeley) 4/28/95; #else -__RCSID($NetBSD: quotautil.c,v 1.4 2012/01/25 01:24:07 dholland Exp $); +__RCSID($NetBSD: quotautil.c,v 1.5 2012/01/30 06:02:12 dholland Exp $); #endif #endif /* not lint */ @@ -76,6 +76,7 @@ hasquota(char *buf, size_t len, struct f char *opt; char *cp = NULL; static char initname, usrname[100], grpname[100]; + char optbuf[256]; if (!initname) { (void)snprintf(usrname, sizeof(usrname), %s%s, @@ -84,8 +85,8 @@ hasquota(char *buf, size_t len, struct f qfextension[GRPQUOTA], qfname); initname = 1; } - strlcpy(buf, fs-fs_mntops, len); - for (opt = strtok(buf, ,); opt; opt = strtok(NULL, ,)) { + strlcpy(optbuf, fs-fs_mntops, sizeof(optbuf)); + for (opt = strtok(optbuf, ,); opt; opt = strtok(NULL, ,)) { if ((cp = strchr(opt, '=')) != NULL) *cp++ = '\0'; if (type == USRQUOTA strcmp(opt, usrname) == 0)
CVS commit: src/sys/arch/powerpc/include
Module Name:src Committed By: matt Date: Mon Jan 30 06:04:32 UTC 2012 Modified Files: src/sys/arch/powerpc/include: param.h Log Message: PowerPC wants 16-byte aligned stacks (for AltiVec). To generate a diff of this commit: cvs rdiff -u -r1.26 -r1.27 src/sys/arch/powerpc/include/param.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/powerpc/include/param.h diff -u src/sys/arch/powerpc/include/param.h:1.26 src/sys/arch/powerpc/include/param.h:1.27 --- src/sys/arch/powerpc/include/param.h:1.26 Tue Jan 24 20:03:37 2012 +++ src/sys/arch/powerpc/include/param.h Mon Jan 30 06:04:32 2012 @@ -1,4 +1,4 @@ -/* $NetBSD: param.h,v 1.26 2012/01/24 20:03:37 christos Exp $ */ +/* $NetBSD: param.h,v 1.27 2012/01/30 06:04:32 matt Exp $ */ /*- * Copyright (C) 1995, 1996 Wolfgang Solfrank. @@ -53,6 +53,9 @@ #define MACHINE_ARCH powerpc #define MID_MACHINE MID_POWERPC +/* PowerPC-specific macro to align a stack pointer (downwards). */ +#define STACK_ALIGNBYTES (16 - 1) /* AltiVec */ + #ifdef PPC_IBM4XX #define PGSHIFT 14 /* Use 16KB to reduce TLB thrashing */ #define UPAGES 1
CVS commit: src/usr.bin/quota
Module Name:src Committed By: dholland Date: Mon Jan 30 06:14:43 UTC 2012 Modified Files: src/usr.bin/quota: quotautil.c quotautil.h Log Message: Remove stray p in identifier name. This has (as far as I can tell) prevented quotacheck and other old-style quota bits from working since last March. Use a correct declaration in the header file, so that if something similar happens again affected programs will fail to link instead of failing to work. This kind of nonsense is why I like -Wl,-warn-common. To generate a diff of this commit: cvs rdiff -u -r1.5 -r1.6 src/usr.bin/quota/quotautil.c cvs rdiff -u -r1.3 -r1.4 src/usr.bin/quota/quotautil.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/usr.bin/quota/quotautil.c diff -u src/usr.bin/quota/quotautil.c:1.5 src/usr.bin/quota/quotautil.c:1.6 --- src/usr.bin/quota/quotautil.c:1.5 Mon Jan 30 06:02:12 2012 +++ src/usr.bin/quota/quotautil.c Mon Jan 30 06:14:43 2012 @@ -1,4 +1,4 @@ -/* $NetBSD: quotautil.c,v 1.5 2012/01/30 06:02:12 dholland Exp $ */ +/* $NetBSD: quotautil.c,v 1.6 2012/01/30 06:14:43 dholland Exp $ */ /* * Copyright (c) 1980, 1990, 1993 @@ -42,7 +42,7 @@ __COPYRIGHT(@(#) Copyright (c) 1980, 19 #if 0 static char sccsid[] = @(#)quota.c 8.4 (Berkeley) 4/28/95; #else -__RCSID($NetBSD: quotautil.c,v 1.5 2012/01/30 06:02:12 dholland Exp $); +__RCSID($NetBSD: quotautil.c,v 1.6 2012/01/30 06:14:43 dholland Exp $); #endif #endif /* not lint */ @@ -65,7 +65,7 @@ __RCSID($NetBSD: quotautil.c,v 1.5 2012 #include quotautil.h const char *qfextension[] = INITQFNAMES; -const char *qfnamep = QUOTAFILENAME; +const char *qfname = QUOTAFILENAME; /* * Check to see if a particular quota is to be enabled. Index: src/usr.bin/quota/quotautil.h diff -u src/usr.bin/quota/quotautil.h:1.3 src/usr.bin/quota/quotautil.h:1.4 --- src/usr.bin/quota/quotautil.h:1.3 Thu Mar 24 17:05:46 2011 +++ src/usr.bin/quota/quotautil.h Mon Jan 30 06:14:43 2012 @@ -1,7 +1,7 @@ -/* $NetBSD: quotautil.h,v 1.3 2011/03/24 17:05:46 bouyer Exp $ */ +/* $NetBSD: quotautil.h,v 1.4 2012/01/30 06:14:43 dholland Exp $ */ -const char *qfextension[MAXQUOTAS]; -const char *qfname; +extern const char *qfextension[MAXQUOTAS]; +extern const char *qfname; struct fstab; int hasquota(char *, size_t, struct fstab *, int); int oneof(const char *, char *[], int);
CVS commit: src/lib/libquota
Module Name:src Committed By: dholland Date: Mon Jan 30 06:15:22 UTC 2012 Modified Files: src/lib/libquota: quota_oldfiles.c Log Message: Fix silly bug reading fstab. To generate a diff of this commit: cvs rdiff -u -r1.3 -r1.4 src/lib/libquota/quota_oldfiles.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/lib/libquota/quota_oldfiles.c diff -u src/lib/libquota/quota_oldfiles.c:1.3 src/lib/libquota/quota_oldfiles.c:1.4 --- src/lib/libquota/quota_oldfiles.c:1.3 Wed Jan 25 17:43:37 2012 +++ src/lib/libquota/quota_oldfiles.c Mon Jan 30 06:15:22 2012 @@ -1,4 +1,4 @@ -/* $NetBSD: quota_oldfiles.c,v 1.3 2012/01/25 17:43:37 dholland Exp $ */ +/* $NetBSD: quota_oldfiles.c,v 1.4 2012/01/30 06:15:22 dholland Exp $ */ /* * Copyright (c) 1980, 1990, 1993 @@ -119,7 +119,7 @@ static int __quota_oldfiles_fill_fstabentry(const struct fstab *fs, struct oldfiles_fstabentry *ofe) { - char buf[sizeof(fs-fs_mntops)]; + char buf[256]; char *opt, *state, *s; int serrno; int ret = 0;
CVS commit: src/lib/libquota
Module Name:src Committed By: dholland Date: Mon Jan 30 06:39:26 UTC 2012 Modified Files: src/lib/libquota: quota_nfs.c Log Message: Remove redundant break statement. To generate a diff of this commit: cvs rdiff -u -r1.1 -r1.2 src/lib/libquota/quota_nfs.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/lib/libquota/quota_nfs.c diff -u src/lib/libquota/quota_nfs.c:1.1 src/lib/libquota/quota_nfs.c:1.2 --- src/lib/libquota/quota_nfs.c:1.1 Mon Jan 9 15:29:56 2012 +++ src/lib/libquota/quota_nfs.c Mon Jan 30 06:39:26 2012 @@ -1,4 +1,4 @@ -/* $NetBSD: quota_nfs.c,v 1.1 2012/01/09 15:29:56 dholland Exp $ */ +/* $NetBSD: quota_nfs.c,v 1.2 2012/01/30 06:39:26 dholland Exp $ */ /*- * Copyright (c) 2011 Manuel Bouyer * All rights reserved. @@ -26,7 +26,7 @@ */ #include sys/cdefs.h -__RCSID($NetBSD: quota_nfs.c,v 1.1 2012/01/09 15:29:56 dholland Exp $); +__RCSID($NetBSD: quota_nfs.c,v 1.2 2012/01/30 06:39:26 dholland Exp $); #include sys/types.h #include sys/param.h /* XXX for DEV_BSIZE */ @@ -199,7 +199,6 @@ __quota_nfs_get(struct quotahandle *qh, case Q_NOQUOTA: quotaval_clear(qv); return 0; - break; case Q_EPERM: errno = EACCES; return -1;