CVS commit: src/sys/arch/arc/conf
Module Name:src Committed By: he Date: Mon Dec 7 08:50:01 UTC 2009 Modified Files: src/sys/arch/arc/conf: RAMDISK Log Message: Can't negate a now non-existent file system (PORTALFS was removed). To generate a diff of this commit: cvs rdiff -u -r1.77 -r1.78 src/sys/arch/arc/conf/RAMDISK 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/arc/conf/RAMDISK diff -u src/sys/arch/arc/conf/RAMDISK:1.77 src/sys/arch/arc/conf/RAMDISK:1.78 --- src/sys/arch/arc/conf/RAMDISK:1.77 Fri Feb 6 18:50:26 2009 +++ src/sys/arch/arc/conf/RAMDISK Mon Dec 7 08:50:01 2009 @@ -1,4 +1,4 @@ -# $NetBSD: RAMDISK,v 1.77 2009/02/06 18:50:26 jym Exp $ +# $NetBSD: RAMDISK,v 1.78 2009/12/07 08:50:01 he Exp $ # # memory disk based configuration file for MIPS R4x00 ARC Systems # @@ -38,7 +38,6 @@ no file-system KERNFS no file-system NULLFS no file-system OVERLAY -no file-system PORTAL no file-system UMAPFS no file-system UNION no file-system TMPFS
CVS commit: src/sys/arch
Module Name:src Committed By: pooka Date: Mon Dec 7 08:57:38 UTC 2009 Modified Files: src/sys/arch/ews4800mips/conf: RAMDISK src/sys/arch/mac68k/conf: SMALLRAM Log Message: remove rest of 'no file-system PORTAL' (portalfs kernel driver was removed) To generate a diff of this commit: cvs rdiff -u -r1.11 -r1.12 src/sys/arch/ews4800mips/conf/RAMDISK cvs rdiff -u -r1.35 -r1.36 src/sys/arch/mac68k/conf/SMALLRAM 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/ews4800mips/conf/RAMDISK diff -u src/sys/arch/ews4800mips/conf/RAMDISK:1.11 src/sys/arch/ews4800mips/conf/RAMDISK:1.12 --- src/sys/arch/ews4800mips/conf/RAMDISK:1.11 Fri Feb 6 18:50:27 2009 +++ src/sys/arch/ews4800mips/conf/RAMDISK Mon Dec 7 08:57:38 2009 @@ -1,4 +1,4 @@ -# $NetBSD: RAMDISK,v 1.11 2009/02/06 18:50:27 jym Exp $ +# $NetBSD: RAMDISK,v 1.12 2009/12/07 08:57:38 pooka Exp $ # # kernel config file with memory disk for installation # @@ -40,7 +40,6 @@ no file-system KERNFS no file-system NULLFS no file-system OVERLAY -no file-system PORTAL no file-system UMAPFS no file-system UNION no file-system PTYFS Index: src/sys/arch/mac68k/conf/SMALLRAM diff -u src/sys/arch/mac68k/conf/SMALLRAM:1.35 src/sys/arch/mac68k/conf/SMALLRAM:1.36 --- src/sys/arch/mac68k/conf/SMALLRAM:1.35 Thu Nov 27 15:44:04 2008 +++ src/sys/arch/mac68k/conf/SMALLRAM Mon Dec 7 08:57:38 2009 @@ -1,4 +1,4 @@ -# $NetBSD: SMALLRAM,v 1.35 2008/11/27 15:44:04 hauke Exp $ +# $NetBSD: SMALLRAM,v 1.36 2009/12/07 08:57:38 pooka Exp $ # # This is an example of how to configure a small, efficient kernel for # a system with limited RAM. Even so it's capable of doing quite a @@ -53,7 +53,6 @@ no file-system KERNFS no file-system NULLFS no file-system OVERLAY -no file-system PORTAL no file-system PROCFS no file-system UMAPFS no file-system UNION
CVS commit: src/sys/arch/evbarm/conf
Module Name:src Committed By: kiyohara Date: Mon Dec 7 08:58:49 UTC 2009 Modified Files: src/sys/arch/evbarm/conf: GUMSTIX Log Message: Remove null-line. To generate a diff of this commit: cvs rdiff -u -r1.41 -r1.42 src/sys/arch/evbarm/conf/GUMSTIX Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/evbarm/conf/GUMSTIX diff -u src/sys/arch/evbarm/conf/GUMSTIX:1.41 src/sys/arch/evbarm/conf/GUMSTIX:1.42 --- src/sys/arch/evbarm/conf/GUMSTIX:1.41 Sun Dec 6 12:23:24 2009 +++ src/sys/arch/evbarm/conf/GUMSTIX Mon Dec 7 08:58:48 2009 @@ -1,4 +1,4 @@ -# $NetBSD: GUMSTIX,v 1.41 2009/12/06 12:23:24 kiyohara Exp $ +# $NetBSD: GUMSTIX,v 1.42 2009/12/07 08:58:48 kiyohara Exp $ # # GUMSTIX -- Gumstix. Inc. gumstix platforms kernel # @@ -406,7 +406,6 @@ #pseudo-device swdmover # softare dmover(9) back-end #pseudo-device dmoverio # /dev/dmover dmover(9) interface - # userland interface to drivers, including autoconf and properties retrieval pseudo-device drvctl
CVS commit: [matt-nb5-mips64] src/gnu/dist/binutils/bfd
Module Name:src Committed By: skrll Date: Mon Dec 7 09:57:19 UTC 2009 Modified Files: src/gnu/dist/binutils/bfd [matt-nb5-mips64]: elf.c elf64-mips.c Log Message: Recognize $L as a local symbol only for mips64. To generate a diff of this commit: cvs rdiff -u -r1.6.32.1 -r1.6.32.2 src/gnu/dist/binutils/bfd/elf.c cvs rdiff -u -r1.1.1.3 -r1.1.1.3.32.1 src/gnu/dist/binutils/bfd/elf64-mips.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/gnu/dist/binutils/bfd/elf.c diff -u src/gnu/dist/binutils/bfd/elf.c:1.6.32.1 src/gnu/dist/binutils/bfd/elf.c:1.6.32.2 --- src/gnu/dist/binutils/bfd/elf.c:1.6.32.1 Sat Sep 12 00:50:21 2009 +++ src/gnu/dist/binutils/bfd/elf.c Mon Dec 7 09:57:19 2009 @@ -6312,10 +6312,6 @@ if (name[0] == '.' name[1] == 'L') return TRUE; - /* Normal local symbols start with ``$L''. */ - if (name[0] == '$' name[1] == 'L') -return TRUE; - /* At least some SVR4 compilers (e.g., UnixWare 2.1 cc) generate DWARF debugging symbols starting with ``..''. */ if (name[0] == '.' name[1] == '.') Index: src/gnu/dist/binutils/bfd/elf64-mips.c diff -u src/gnu/dist/binutils/bfd/elf64-mips.c:1.1.1.3 src/gnu/dist/binutils/bfd/elf64-mips.c:1.1.1.3.32.1 --- src/gnu/dist/binutils/bfd/elf64-mips.c:1.1.1.3 Thu Feb 2 20:46:55 2006 +++ src/gnu/dist/binutils/bfd/elf64-mips.c Mon Dec 7 09:57:19 2009 @@ -122,6 +122,8 @@ (bfd *, asymbol *, bfd_boolean, char **, bfd_vma *); static bfd_boolean mips_elf64_object_p (bfd *); +static bfd_boolean mips_elf64_is_local_label_name + (bfd *, const char *); static irix_compat_t elf64_mips_irix_compat (bfd *); static bfd_boolean elf64_mips_grok_prstatus @@ -2884,7 +2886,18 @@ bfd_default_set_arch_mach (abfd, bfd_arch_mips, mach); return TRUE; } + +/* MIPS ELF local labels start with $L. */ +static bfd_boolean +mips_elf64_is_local_label_name (bfd *abfd, const char *name) +{ + if (name[0] == '$' name[1] == 'L') +return TRUE; + /* We accept the generic ELF local label syntax as well. */ + return _bfd_elf_is_local_label_name (abfd, name); +} + /* Depending on the target vector we generate some version of Irix executables or normal MIPS ELF ABI executables. */ static irix_compat_t @@ -3098,9 +3111,8 @@ #define elf_backend_write_section _bfd_mips_elf_write_section -/* We don't set bfd_elf64_bfd_is_local_label_name because the 32-bit - MIPS-specific function only applies to IRIX5, which had no 64-bit - ABI. */ +#define bfd_elf64_bfd_is_local_label_name \ +mips_elf64_is_local_label_name #define bfd_elf64_find_nearest_line _bfd_mips_elf_find_nearest_line #define bfd_elf64_new_section_hook _bfd_mips_elf_new_section_hook #define bfd_elf64_set_section_contents _bfd_mips_elf_set_section_contents
CVS commit: src/external/gpl3/binutils/dist/bfd
Module Name:src Committed By: skrll Date: Mon Dec 7 10:00:21 UTC 2009 Modified Files: src/external/gpl3/binutils/dist/bfd: elf64-mips.c Log Message: Recognize $L as a local symbol for mips64. To generate a diff of this commit: cvs rdiff -u -r1.1.1.1 -r1.2 src/external/gpl3/binutils/dist/bfd/elf64-mips.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/external/gpl3/binutils/dist/bfd/elf64-mips.c diff -u src/external/gpl3/binutils/dist/bfd/elf64-mips.c:1.1.1.1 src/external/gpl3/binutils/dist/bfd/elf64-mips.c:1.2 --- src/external/gpl3/binutils/dist/bfd/elf64-mips.c:1.1.1.1 Tue Aug 18 09:26:01 2009 +++ src/external/gpl3/binutils/dist/bfd/elf64-mips.c Mon Dec 7 10:00:21 2009 @@ -122,6 +122,8 @@ (bfd *, asymbol *, bfd_boolean, char **, bfd_vma *); static bfd_boolean mips_elf64_object_p (bfd *); +static bfd_boolean mips_elf64_is_local_label_name + (bfd *, const char *); static irix_compat_t elf64_mips_irix_compat (bfd *); static bfd_boolean elf64_mips_grok_prstatus @@ -3025,7 +3027,18 @@ bfd_default_set_arch_mach (abfd, bfd_arch_mips, mach); return TRUE; } + +/* MIPS ELF local labels start with $L. */ +static bfd_boolean +mips_elf64_is_local_label_name (bfd *abfd, const char *name) +{ + if (name[0] == '$' name[1] == 'L') +return TRUE; + /* We accept the generic ELF local label syntax as well. */ + return _bfd_elf_is_local_label_name (abfd, name); +} + /* Depending on the target vector we generate some version of Irix executables or normal MIPS ELF ABI executables. */ static irix_compat_t @@ -3248,9 +3261,8 @@ #define elf_backend_write_section _bfd_mips_elf_write_section -/* We don't set bfd_elf64_bfd_is_local_label_name because the 32-bit - MIPS-specific function only applies to IRIX5, which had no 64-bit - ABI. */ +#define bfd_elf64_bfd_is_local_label_name \ +mips_elf64_is_local_label_name #define bfd_elf64_find_nearest_line _bfd_mips_elf_find_nearest_line #define bfd_elf64_find_inliner_info _bfd_mips_elf_find_inliner_info #define bfd_elf64_new_section_hook _bfd_mips_elf_new_section_hook
CVS commit: src/etc/etc.landisk
Module Name:src Committed By: nonaka Date: Mon Dec 7 10:03:37 UTC 2009 Modified Files: src/etc/etc.landisk: MAKEDEV.conf Log Message: remove init entry. add floppy entry. To generate a diff of this commit: cvs rdiff -u -r1.3 -r1.4 src/etc/etc.landisk/MAKEDEV.conf 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.landisk/MAKEDEV.conf diff -u src/etc/etc.landisk/MAKEDEV.conf:1.3 src/etc/etc.landisk/MAKEDEV.conf:1.4 --- src/etc/etc.landisk/MAKEDEV.conf:1.3 Mon Apr 27 08:06:02 2009 +++ src/etc/etc.landisk/MAKEDEV.conf Mon Dec 7 10:03:37 2009 @@ -1,23 +1,12 @@ -# $NetBSD: MAKEDEV.conf,v 1.3 2009/04/27 08:06:02 nonaka Exp $ - -init) - makedev std wscons wd0 wd1 sd0 sd1 sd2 sd3 - makedev tty0 tty1 - makedev cd0 cd1 vnd0 - makedev bpf - makedev ccd0 md0 random - makedev cgd0 cgd1 - makedev raid0 - makedev usbs - makedev pci0 - makedev ipty - makedev sysmon - makedev local - ;; +# $NetBSD: MAKEDEV.conf,v 1.4 2009/12/07 10:03:37 nonaka Exp $ all_md) makedev init - makedev tty2 tty3 + makedev std + makedev wscons + makedev wd0 wd1 sd0 sd1 sd2 sd3 + makedev cd0 cd1 vnd0 + makedev tty0 tty1 tty2 tty3 makedev audio makedev music rmidi0 rmidi1 rmidi2 rmidi3 rmidi4 rmidi5 rmidi6 rmidi7 makedev scsibus0 @@ -26,8 +15,25 @@ makedev kttcp makedev nsmb makedev cfs + makedev bpf + makedev ccd0 md0 random + makedev cgd0 cgd1 + makedev raid0 + makedev usbs + makedev pci0 + makedev ipty + makedev sysmon ;; +floppy) + makedev std + makedev wd0 wd1 wd2 wd3 md0 + makedev sd0 sd1 sd2 sd3 cd0 + makedev ccd0 + makedev opty + makedev tty0 tty1 +;; + ramdisk) makedev floppy md0 ;;
CVS commit: src/sys/arch/sparc64/dev
Module Name:src Committed By: nakayama Date: Mon Dec 7 11:14:27 UTC 2009 Modified Files: src/sys/arch/sparc64/dev: iommu.c Log Message: Avoid use of iommu_dvmamap_unload in error path. It is too expensive since it contains data cache flushing. Some driver (tlp(4) with DM9201 on Netra X1) can only handle one DMA segment, so it was called frequently. To generate a diff of this commit: cvs rdiff -u -r1.91 -r1.92 src/sys/arch/sparc64/dev/iommu.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/sparc64/dev/iommu.c diff -u src/sys/arch/sparc64/dev/iommu.c:1.91 src/sys/arch/sparc64/dev/iommu.c:1.92 --- src/sys/arch/sparc64/dev/iommu.c:1.91 Sun Dec 6 13:39:22 2009 +++ src/sys/arch/sparc64/dev/iommu.c Mon Dec 7 11:14:27 2009 @@ -1,4 +1,4 @@ -/* $NetBSD: iommu.c,v 1.91 2009/12/06 13:39:22 nakayama Exp $ */ +/* $NetBSD: iommu.c,v 1.92 2009/12/07 11:14:27 nakayama Exp $ */ /* * Copyright (c) 1999, 2000 Matthew R. Green @@ -59,7 +59,7 @@ */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: iommu.c,v 1.91 2009/12/06 13:39:22 nakayama Exp $); +__KERNEL_RCSID(0, $NetBSD: iommu.c,v 1.92 2009/12/07 11:14:27 nakayama Exp $); #include opt_ddb.h @@ -727,9 +727,10 @@ bmask = ~(boundary - 1); if ((pglist = segs[0]._ds_mlist) == NULL) { - u_long prev_va = 0UL; + u_long prev_va = 0UL, last_va = dvmaddr; paddr_t prev_pa = 0; int end = 0, offset; + bus_size_t len = size; /* * This segs is made up of individual physical @@ -737,8 +738,6 @@ * _bus_dmamap_load_mbuf(). Ignore the mlist and * load each one individually. */ - map-dm_mapsize = size; - j = 0; needsflush = 0; for (i = 0; i nsegs ; i++) { @@ -747,7 +746,7 @@ offset = (pa PGOFSET); pa = trunc_page(pa); dvmaddr = trunc_page(dvmaddr); - left = min(size, segs[i].ds_len); + left = min(len, segs[i].ds_len); DPRINTF(IDB_INFO, (iommu_dvmamap_load_raw: converting physseg %d start %lx size %lx\n, i, @@ -773,8 +772,9 @@ (long)map-dm_segs[j].ds_len)); } else { if (j = map-_dm_segcnt) { - iommu_dvmamap_unload(t, map); - return (EFBIG); + iommu_remove(is, map-_dm_dvmastart, + last_va - map-_dm_dvmastart); + goto fail; } map-dm_segs[j].ds_addr = sgstart; map-dm_segs[j].ds_len = left; @@ -795,8 +795,9 @@ (long)map-dm_segs[j].ds_addr, (long)map-dm_segs[j].ds_len)); if (++j = map-_dm_segcnt) { - iommu_dvmamap_unload(t, map); - return (EFBIG); + iommu_remove(is, map-_dm_dvmastart, + last_va - map-_dm_dvmastart); + goto fail; } sgstart = roundup(sgstart, boundary); map-dm_segs[j].ds_addr = sgstart; @@ -822,14 +823,16 @@ } dvmaddr += pagesz; pa += pagesz; +last_va = dvmaddr; } - size -= left; + len -= left; ++j; } if (needsflush) iommu_strbuf_flush_done(sb); + map-dm_mapsize = size; map-dm_nsegs = j; #ifdef DIAGNOSTIC { int seg; @@ -853,7 +856,6 @@ * This was allocated with bus_dmamem_alloc. * The pages are on a `pglist'. */ - map-dm_mapsize = size; i = 0; sgstart = dvmaddr; sgend = sgstart + size - 1; @@ -867,14 +869,7 @@ (long)map-dm_segs[i].ds_len)); if (++i = map-_dm_segcnt) { /* Too many segments. Fail the operation. */ - s = splhigh(); - /* How can this fail? And if it does what can we do? */ - err = extent_free(is-is_dvmamap, -dvmaddr, sgsize, EX_NOWAIT); - map-_dm_dvmastart = 0; - map-_dm_dvmasize = 0; - splx(s); - return (EFBIG); + goto fail; } sgstart = roundup(sgstart, boundary); map-dm_segs[i].ds_addr = sgstart; @@ -919,6 +914,16 @@ } #endif return (0); + +fail: + s = splhigh(); + /* How can this fail? And if it does what can we do? */ + err = extent_free(is-is_dvmamap, map-_dm_dvmastart, sgsize, + EX_NOWAIT); + map-_dm_dvmastart = 0; + map-_dm_dvmasize = 0; + splx(s); + return (EFBIG); }
CVS commit: src/sys/arch/sparc64/dev
Module Name:src Committed By: nakayama Date: Mon Dec 7 11:18:38 UTC 2009 Modified Files: src/sys/arch/sparc64/dev: iommu.c Log Message: Calculate DVMA pages correctly. To generate a diff of this commit: cvs rdiff -u -r1.92 -r1.93 src/sys/arch/sparc64/dev/iommu.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/sparc64/dev/iommu.c diff -u src/sys/arch/sparc64/dev/iommu.c:1.92 src/sys/arch/sparc64/dev/iommu.c:1.93 --- src/sys/arch/sparc64/dev/iommu.c:1.92 Mon Dec 7 11:14:27 2009 +++ src/sys/arch/sparc64/dev/iommu.c Mon Dec 7 11:18:38 2009 @@ -1,4 +1,4 @@ -/* $NetBSD: iommu.c,v 1.92 2009/12/07 11:14:27 nakayama Exp $ */ +/* $NetBSD: iommu.c,v 1.93 2009/12/07 11:18:38 nakayama Exp $ */ /* * Copyright (c) 1999, 2000 Matthew R. Green @@ -59,7 +59,7 @@ */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: iommu.c,v 1.92 2009/12/07 11:14:27 nakayama Exp $); +__KERNEL_RCSID(0, $NetBSD: iommu.c,v 1.93 2009/12/07 11:18:38 nakayama Exp $); #include opt_ddb.h @@ -682,17 +682,18 @@ */ map-dm_nsegs = 0; /* Count up the total number of pages we need */ - pa = segs[0].ds_addr; + pa = trunc_page(segs[0].ds_addr); sgsize = 0; left = size; - for (i = 0; left i nsegs; i++) { + for (i = 0; left 0 i nsegs; i++) { if (round_page(pa) != round_page(segs[i].ds_addr)) - sgsize = round_page(sgsize); + sgsize = round_page(sgsize) + + (segs[i].ds_addr PGOFSET); sgsize += min(left, segs[i].ds_len); left -= segs[i].ds_len; pa = segs[i].ds_addr + segs[i].ds_len; } - sgsize = round_page(sgsize) + PAGE_SIZE; /* XXX reserve extra dvma page */ + sgsize = round_page(sgsize); s = splhigh(); /* @@ -766,6 +767,8 @@ ((offset == 0) || (pa == prev_pa))) { /* Just append to the previous segment. */ map-dm_segs[--j].ds_len += left; +/* Restore sgstart for boundary check */ +sgstart = map-dm_segs[j].ds_addr; DPRINTF(IDB_INFO, (iommu_dvmamap_load_raw: appending seg %d start %lx size %lx\n, j, (long)map-dm_segs[j].ds_addr, @@ -799,7 +802,7 @@ last_va - map-_dm_dvmastart); goto fail; } -sgstart = roundup(sgstart, boundary); +sgstart += map-dm_segs[j-1].ds_len; map-dm_segs[j].ds_addr = sgstart; map-dm_segs[j].ds_len = sgend - sgstart + 1; } @@ -871,7 +874,7 @@ /* Too many segments. Fail the operation. */ goto fail; } - sgstart = roundup(sgstart, boundary); + sgstart += map-dm_segs[i-1].ds_len; map-dm_segs[i].ds_addr = sgstart; } DPRINTF(IDB_INFO, (iommu_dvmamap_load_raw:
CVS commit: src/sys/arch/sparc64/dev
Module Name:src Committed By: nakayama Date: Mon Dec 7 11:24:30 UTC 2009 Modified Files: src/sys/arch/sparc64/dev: iommu.c Log Message: Add comment about an uncorrectable DMA error sometimes observed on tlp(4) on Netra X1, and its workaround. Also add membar_storestore, from OpenBSD. To generate a diff of this commit: cvs rdiff -u -r1.93 -r1.94 src/sys/arch/sparc64/dev/iommu.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/sparc64/dev/iommu.c diff -u src/sys/arch/sparc64/dev/iommu.c:1.93 src/sys/arch/sparc64/dev/iommu.c:1.94 --- src/sys/arch/sparc64/dev/iommu.c:1.93 Mon Dec 7 11:18:38 2009 +++ src/sys/arch/sparc64/dev/iommu.c Mon Dec 7 11:24:30 2009 @@ -1,4 +1,4 @@ -/* $NetBSD: iommu.c,v 1.93 2009/12/07 11:18:38 nakayama Exp $ */ +/* $NetBSD: iommu.c,v 1.94 2009/12/07 11:24:30 nakayama Exp $ */ /* * Copyright (c) 1999, 2000 Matthew R. Green @@ -59,7 +59,7 @@ */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: iommu.c,v 1.93 2009/12/07 11:18:38 nakayama Exp $); +__KERNEL_RCSID(0, $NetBSD: iommu.c,v 1.94 2009/12/07 11:24:30 nakayama Exp $); #include opt_ddb.h @@ -349,8 +349,17 @@ else len -= PAGE_SIZE; - /* XXX Zero-ing the entry would not require RMW */ + /* + * XXX Zero-ing the entry would not require RMW + * + * Disabling valid bit while a page is used by a device + * causes an uncorrectable DMA error. + * Workaround to avoid an uncorrectable DMA error is + * eliminating the next line, but the page is mapped + * until the next iommu_enter call. + */ is-is_tsb[IOTSBSLOT(va,is-is_tsbsize)] = ~IOTTE_V; + membar_storestore(); bus_space_write_8(is-is_bustag, is-is_iommu, IOMMUREG(iommu_flush), va); va += PAGE_SIZE;
CVS commit: src/sys/arch/sparc64/sparc64
Module Name:src Committed By: nakayama Date: Mon Dec 7 11:28:37 UTC 2009 Modified Files: src/sys/arch/sparc64/sparc64: machdep.c Log Message: - fix corner case bugs around the segment offsets. - make sure that on error condition we return no valid mappings. To generate a diff of this commit: cvs rdiff -u -r1.249 -r1.250 src/sys/arch/sparc64/sparc64/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/sparc64/sparc64/machdep.c diff -u src/sys/arch/sparc64/sparc64/machdep.c:1.249 src/sys/arch/sparc64/sparc64/machdep.c:1.250 --- src/sys/arch/sparc64/sparc64/machdep.c:1.249 Wed Dec 2 10:18:42 2009 +++ src/sys/arch/sparc64/sparc64/machdep.c Mon Dec 7 11:28:37 2009 @@ -1,4 +1,4 @@ -/* $NetBSD: machdep.c,v 1.249 2009/12/02 10:18:42 nakayama Exp $ */ +/* $NetBSD: machdep.c,v 1.250 2009/12/07 11:28:37 nakayama Exp $ */ /*- * Copyright (c) 1996, 1997, 1998 The NetBSD Foundation, Inc. @@ -71,7 +71,7 @@ */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: machdep.c,v 1.249 2009/12/02 10:18:42 nakayama Exp $); +__KERNEL_RCSID(0, $NetBSD: machdep.c,v 1.250 2009/12/07 11:28:37 nakayama Exp $); #include opt_ddb.h #include opt_multiprocessor.h @@ -1037,7 +1037,6 @@ /* * We always use just one segment. */ - map-dm_mapsize = buflen; i = 0; map-dm_segs[i].ds_addr = 0UL; map-dm_segs[i].ds_len = 0; @@ -1049,23 +1048,24 @@ incr = min(sgsize, incr); (void) pmap_extract(pmap_kernel(), vaddr, pa); - sgsize -= incr; - vaddr += incr; if (map-dm_segs[i].ds_len == 0) map-dm_segs[i].ds_addr = pa; if (pa == (map-dm_segs[i].ds_addr + map-dm_segs[i].ds_len) ((map-dm_segs[i].ds_len + incr) = map-dm_maxsegsz)) { /* Hey, waddyaknow, they're contiguous */ map-dm_segs[i].ds_len += incr; - incr = PAGE_SIZE; - continue; + } else { + if (++i = map-_dm_segcnt) +return (EFBIG); + map-dm_segs[i].ds_addr = pa; + map-dm_segs[i].ds_len = incr; } - if (++i = map-_dm_segcnt) - return (EFBIG); - map-dm_segs[i].ds_addr = pa; - map-dm_segs[i].ds_len = incr = PAGE_SIZE; + sgsize -= incr; + vaddr += incr; + incr = PAGE_SIZE; } map-dm_nsegs = i + 1; + map-dm_mapsize = buflen; /* Mapping is bus dependent */ return (0); } @@ -1081,8 +1081,15 @@ int i; size_t len; + /* + * Make sure that on error condition we return no valid mappings. + */ + map-dm_nsegs = 0; KASSERT(map-dm_maxsegsz = map-_dm_maxmaxsegsz); + if (m-m_pkthdr.len map-_dm_size) + return EINVAL; + /* Record mbuf for *_unload */ map-_dm_type = _DM_TYPE_MBUF; map-_dm_source = (void *)m; @@ -1194,6 +1201,10 @@ struct proc *p = uio-uio_lwp-l_proc; struct pmap *pm; + /* + * Make sure that on error condition we return no valid mappings. + */ + map-dm_nsegs = 0; KASSERT(map-dm_maxsegsz = map-_dm_maxmaxsegsz); if (uio-uio_segflg == UIO_USERSPACE) { @@ -1346,16 +1357,21 @@ if (offset PAGE_SIZE) { start = VM_PAGE_TO_PHYS(pg) + offset; + size -= offset; if (size len) size = len; cache_flush_phys(start, size, 0); len -= size; + if (len == 0) + goto done; + offset = 0; continue; } offset -= size; } } } + done: if (ops BUS_DMASYNC_POSTWRITE) { /* Nothing to do. Handled by the bus controller. */ }
CVS commit: src/sys/dev/putter
Module Name:src Committed By: pooka Date: Mon Dec 7 13:41:44 UTC 2009 Modified Files: src/sys/dev/putter: putter.c Log Message: Mark putter as MODULE_CLASS_DRIVER to make it autoloadable. This fixes autoloading of puffs upon mount. To generate a diff of this commit: cvs rdiff -u -r1.23 -r1.24 src/sys/dev/putter/putter.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/putter/putter.c diff -u src/sys/dev/putter/putter.c:1.23 src/sys/dev/putter/putter.c:1.24 --- src/sys/dev/putter/putter.c:1.23 Sat Apr 11 23:05:26 2009 +++ src/sys/dev/putter/putter.c Mon Dec 7 13:41:44 2009 @@ -1,4 +1,4 @@ -/* $NetBSD: putter.c,v 1.23 2009/04/11 23:05:26 christos Exp $ */ +/* $NetBSD: putter.c,v 1.24 2009/12/07 13:41:44 pooka Exp $ */ /* * Copyright (c) 2006, 2007 Antti Kantee. All Rights Reserved. @@ -35,7 +35,7 @@ */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: putter.c,v 1.23 2009/04/11 23:05:26 christos Exp $); +__KERNEL_RCSID(0, $NetBSD: putter.c,v 1.24 2009/12/07 13:41:44 pooka Exp $); #include sys/param.h #include sys/systm.h @@ -642,7 +642,7 @@ return i; } -MODULE(MODULE_CLASS_MISC, putter, NULL); +MODULE(MODULE_CLASS_DRIVER, putter, NULL); static int putter_modcmd(modcmd_t cmd, void *arg)
CVS commit: src/sys/arch/m68k/include
Module Name:src Committed By: tsutsui Date: Mon Dec 7 14:23:46 UTC 2009 Modified Files: src/sys/arch/m68k/include: pte_motorola.h Log Message: Remove #if defined(amiga) || defined(atari) for PG_SHIFT. Use PGSHIFT from machine/param.h instead. To generate a diff of this commit: cvs rdiff -u -r1.6 -r1.7 src/sys/arch/m68k/include/pte_motorola.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/m68k/include/pte_motorola.h diff -u src/sys/arch/m68k/include/pte_motorola.h:1.6 src/sys/arch/m68k/include/pte_motorola.h:1.7 --- src/sys/arch/m68k/include/pte_motorola.h:1.6 Sat Jan 17 01:38:10 2009 +++ src/sys/arch/m68k/include/pte_motorola.h Mon Dec 7 14:23:45 2009 @@ -1,4 +1,4 @@ -/* $NetBSD: pte_motorola.h,v 1.6 2009/01/17 01:38:10 tsutsui Exp $ */ +/* $NetBSD: pte_motorola.h,v 1.7 2009/12/07 14:23:45 tsutsui Exp $ */ /* * Copyright (c) 1982, 1986, 1990, 1993 @@ -89,11 +89,7 @@ #define PT_ENTRY_NULL NULL #define ST_ENTRY_NULL NULL -#if defined(amiga) || defined(atari) -#define PG_SHIFT 13 -#else -#define PG_SHIFT 12 -#endif +#define PG_SHIFT PGSHIFT #define SG_V 0x0002 /* segment is valid */ #define SG_NV 0x
CVS commit: src/sys/fs/puffs
Module Name:src Committed By: pooka Date: Mon Dec 7 15:51:52 UTC 2009 Modified Files: src/sys/fs/puffs: puffs_msgif.c Log Message: Need to send protocol layer response instead of transport layer return value. While there, just collapse all non-supported types into one entry. To generate a diff of this commit: cvs rdiff -u -r1.74 -r1.75 src/sys/fs/puffs/puffs_msgif.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/fs/puffs/puffs_msgif.c diff -u src/sys/fs/puffs/puffs_msgif.c:1.74 src/sys/fs/puffs/puffs_msgif.c:1.75 --- src/sys/fs/puffs/puffs_msgif.c:1.74 Thu Nov 5 19:42:44 2009 +++ src/sys/fs/puffs/puffs_msgif.c Mon Dec 7 15:51:52 2009 @@ -1,4 +1,4 @@ -/* $NetBSD: puffs_msgif.c,v 1.74 2009/11/05 19:42:44 pooka Exp $ */ +/* $NetBSD: puffs_msgif.c,v 1.75 2009/12/07 15:51:52 pooka Exp $ */ /* * Copyright (c) 2005, 2006, 2007 Antti Kantee. All Rights Reserved. @@ -30,7 +30,7 @@ */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: puffs_msgif.c,v 1.74 2009/11/05 19:42:44 pooka Exp $); +__KERNEL_RCSID(0, $NetBSD: puffs_msgif.c,v 1.75 2009/12/07 15:51:52 pooka Exp $); #include sys/param.h #include sys/atomic.h @@ -863,13 +863,9 @@ DPRINTF((dispatch: flush 0x%x\n, preq-preq_optype)); puffsop_flush(pmp, (struct puffs_flush *)preq); break; - case PUFFSOP_SUSPEND: - DPRINTF((dispatch: suspend\n)); - rv = EOPNOTSUPP; - break; default: DPRINTF((dispatch: invalid class 0x%x\n, preq-preq_opclass)); - puffs_msg_sendresp(pmp, preq, EINVAL); + puffs_msg_sendresp(pmp, preq, EOPNOTSUPP); break; }
CVS commit: src/crypto/external/bsd/netpgp/dist/src/lib
Module Name:src Committed By: agc Date: Mon Dec 7 16:17:17 UTC 2009 Modified Files: src/crypto/external/bsd/netpgp/dist/src/lib: keyring.c keyring.h netpgp.c reader.c validate.c Log Message: + When using ssh keys, use the first key as the default userid, unless specified. + The internal variable sshetcdir has been renamed to sshkeydir + When matching the text fields in the username, use an ICASE, NOSUB, EXTENDED regular expression. This allows more advanced ways of searching, such as: % netpgpkeys --list-keys '\.de\' to find all the keys in the default keyring which have an email address in Germany. This is actually surprisingly useful. To generate a diff of this commit: cvs rdiff -u -r1.23 -r1.24 \ src/crypto/external/bsd/netpgp/dist/src/lib/keyring.c \ src/crypto/external/bsd/netpgp/dist/src/lib/validate.c cvs rdiff -u -r1.18 -r1.19 \ src/crypto/external/bsd/netpgp/dist/src/lib/keyring.h cvs rdiff -u -r1.31 -r1.32 \ src/crypto/external/bsd/netpgp/dist/src/lib/netpgp.c cvs rdiff -u -r1.26 -r1.27 \ src/crypto/external/bsd/netpgp/dist/src/lib/reader.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/crypto/external/bsd/netpgp/dist/src/lib/keyring.c diff -u src/crypto/external/bsd/netpgp/dist/src/lib/keyring.c:1.23 src/crypto/external/bsd/netpgp/dist/src/lib/keyring.c:1.24 --- src/crypto/external/bsd/netpgp/dist/src/lib/keyring.c:1.23 Sat Dec 5 07:08:18 2009 +++ src/crypto/external/bsd/netpgp/dist/src/lib/keyring.c Mon Dec 7 16:17:17 2009 @@ -57,13 +57,14 @@ #if defined(__NetBSD__) __COPYRIGHT(@(#) Copyright (c) 2009 The NetBSD Foundation, Inc. All rights reserved.); -__RCSID($NetBSD: keyring.c,v 1.23 2009/12/05 07:08:18 agc Exp $); +__RCSID($NetBSD: keyring.c,v 1.24 2009/12/07 16:17:17 agc Exp $); #endif #ifdef HAVE_FCNTL_H #include fcntl.h #endif +#include regex.h #include stdlib.h #include string.h @@ -764,11 +765,9 @@ */ const __ops_key_t * __ops_getkeybyid(__ops_io_t *io, const __ops_keyring_t *keyring, - const unsigned char keyid[OPS_KEY_ID_SIZE]) + const unsigned char *keyid, unsigned *from) { - unsigned n; - - for (n = 0; keyring n keyring-keyc; n++) { + for ( ; keyring *from keyring-keyc; *from += 1) { if (__ops_get_debug_level(__FILE__)) { int i; @@ -776,7 +775,7 @@ __ops_getkeybyid: keyring keyid ); for (i = 0 ; i OPS_KEY_ID_SIZE ; i++) { (void) fprintf(io-errs, %02x, - keyring-keys[n].key_id[i]); + keyring-keys[*from].key_id[i]); } (void) fprintf(io-errs, , keyid ); for (i = 0 ; i OPS_KEY_ID_SIZE ; i++) { @@ -784,13 +783,13 @@ } (void) fprintf(io-errs, \n); } - if (memcmp(keyring-keys[n].key_id, keyid, + if (memcmp(keyring-keys[*from].key_id, keyid, OPS_KEY_ID_SIZE) == 0) { - return keyring-keys[n]; + return keyring-keys[*from]; } - if (memcmp(keyring-keys[n].key_id[OPS_KEY_ID_SIZE / 2], + if (memcmp(keyring-keys[*from].key_id[OPS_KEY_ID_SIZE / 2], keyid, OPS_KEY_ID_SIZE / 2) == 0) { - return keyring-keys[n]; + return keyring-keys[*from]; } } return NULL; @@ -831,117 +830,105 @@ keyid[j] = 0x0; } -/** - \ingroup HighLevel_KeyringFind - - \brief Finds key from its User ID - - \param keyring Keyring to be searched - \param userid User ID of required key - - \return Pointer to Key, if found; NULL, if not found - - \note This returns a pointer to the key inside the keyring, not a - copy. Do not free it. - -*/ -const __ops_key_t * -__ops_getkeybyname(__ops_io_t *io, +/* return the next key which matches, starting searching at *from */ +static const __ops_key_t * +getkeybyname(__ops_io_t *io, const __ops_keyring_t *keyring, - const char *name) + const char *name, + unsigned *from) { const __ops_key_t *kp; __ops_key_t *keyp; __ops_userid_t *uidp; unsigned char keyid[OPS_KEY_ID_SIZE + 1]; unsigned int i = 0; + unsigned savedstart; + regex_t r; size_t len; - char *cp; - unsigned n; if (!keyring) { return NULL; } len = strlen(name); - n = 0; - for (keyp = keyring-keys[n]; n keyring-keyc; ++n, keyp++) { - for (i = 0, uidp = keyp-uids; i keyp-uidc; i++, uidp++) { + if (__ops_get_debug_level(__FILE__)) { + (void) fprintf(io-outs, [%u] name '%s', len %u\n, + *from, name, len); + } + /* first try name as a keyid */ + (void) memset(keyid, 0x0, sizeof(keyid)); + str2keyid(name, keyid, sizeof(keyid)); + if (__ops_get_debug_level(__FILE__)) { + (void) fprintf(io-outs, + name \%s\, keyid %02x%02x%02x%02x\n, + name, + keyid[0], keyid[1], keyid[2], keyid[3]); + } + savedstart = *from; + if ((kp = __ops_getkeybyid(io, keyring, keyid, from)) != NULL) { + return kp; + } + *from = savedstart; + if (__ops_get_debug_level(__FILE__)) { + (void) fprintf(io-outs, regex match '%s' from %u\n, + name, *from); + } + /* match on
CVS commit: src/crypto/external/bsd/netpgp/dist/src/netpgp
Module Name:src Committed By: agc Date: Mon Dec 7 16:17:57 UTC 2009 Modified Files: src/crypto/external/bsd/netpgp/dist/src/netpgp: netpgp.c Log Message: The internal variable sshetcdir has been renamed to sshkeydir To generate a diff of this commit: cvs rdiff -u -r1.6 -r1.7 \ src/crypto/external/bsd/netpgp/dist/src/netpgp/netpgp.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/crypto/external/bsd/netpgp/dist/src/netpgp/netpgp.c diff -u src/crypto/external/bsd/netpgp/dist/src/netpgp/netpgp.c:1.6 src/crypto/external/bsd/netpgp/dist/src/netpgp/netpgp.c:1.7 --- src/crypto/external/bsd/netpgp/dist/src/netpgp/netpgp.c:1.6 Sat Dec 5 07:08:19 2009 +++ src/crypto/external/bsd/netpgp/dist/src/netpgp/netpgp.c Mon Dec 7 16:17:57 2009 @@ -286,7 +286,7 @@ /* set some defaults */ netpgp_setvar(netpgp, hash, DEFAULT_HASH_ALG); set_homedir(netpgp, getenv(HOME), /.gnupg, 1); - netpgp_setvar(netpgp, sshetcdir, /etc/ssh); + netpgp_setvar(netpgp, sshkeydir, /etc/ssh); optindex = 0; while ((ch = getopt_long(argc, argv, , options, optindex)) != -1) { switch (options[optindex].val) {
CVS commit: src/crypto/external/bsd/netpgp/dist/src/lib
Module Name:src Committed By: martin Date: Mon Dec 7 16:55:37 UTC 2009 Modified Files: src/crypto/external/bsd/netpgp/dist/src/lib: keyring.c Log Message: size_t %z police To generate a diff of this commit: cvs rdiff -u -r1.24 -r1.25 \ src/crypto/external/bsd/netpgp/dist/src/lib/keyring.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/crypto/external/bsd/netpgp/dist/src/lib/keyring.c diff -u src/crypto/external/bsd/netpgp/dist/src/lib/keyring.c:1.24 src/crypto/external/bsd/netpgp/dist/src/lib/keyring.c:1.25 --- src/crypto/external/bsd/netpgp/dist/src/lib/keyring.c:1.24 Mon Dec 7 16:17:17 2009 +++ src/crypto/external/bsd/netpgp/dist/src/lib/keyring.c Mon Dec 7 16:55:37 2009 @@ -57,7 +57,7 @@ #if defined(__NetBSD__) __COPYRIGHT(@(#) Copyright (c) 2009 The NetBSD Foundation, Inc. All rights reserved.); -__RCSID($NetBSD: keyring.c,v 1.24 2009/12/07 16:17:17 agc Exp $); +__RCSID($NetBSD: keyring.c,v 1.25 2009/12/07 16:55:37 martin Exp $); #endif #ifdef HAVE_FCNTL_H @@ -851,7 +851,7 @@ } len = strlen(name); if (__ops_get_debug_level(__FILE__)) { - (void) fprintf(io-outs, [%u] name '%s', len %u\n, + (void) fprintf(io-outs, [%u] name '%s', len %zu\n, *from, name, len); } /* first try name as a keyid */
CVS commit: src/crypto/external/bsd/netpgp/dist/include
Module Name:src Committed By: agc Date: Mon Dec 7 16:56:03 UTC 2009 Modified Files: src/crypto/external/bsd/netpgp/dist/include: netpgp.h Log Message: Add a prototype for netpgp_match_list_keys() To generate a diff of this commit: cvs rdiff -u -r1.11 -r1.12 \ src/crypto/external/bsd/netpgp/dist/include/netpgp.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/crypto/external/bsd/netpgp/dist/include/netpgp.h diff -u src/crypto/external/bsd/netpgp/dist/include/netpgp.h:1.11 src/crypto/external/bsd/netpgp/dist/include/netpgp.h:1.12 --- src/crypto/external/bsd/netpgp/dist/include/netpgp.h:1.11 Thu Nov 19 21:56:00 2009 +++ src/crypto/external/bsd/netpgp/dist/include/netpgp.h Mon Dec 7 16:56:03 2009 @@ -69,6 +69,7 @@ /* key management */ int netpgp_list_keys(netpgp_t *); +int netpgp_match_list_keys(netpgp_t *, char *); int netpgp_find_key(netpgp_t *, char *); char *netpgp_get_key(netpgp_t *, const char *); int netpgp_export_key(netpgp_t *, char *);
CVS commit: src/sys/rump/librump/rumpuser
Module Name:src Committed By: pooka Date: Mon Dec 7 17:38:16 UTC 2009 Modified Files: src/sys/rump/librump/rumpuser: rumpuser_dl.c Log Message: add comment To generate a diff of this commit: cvs rdiff -u -r1.9 -r1.10 src/sys/rump/librump/rumpuser/rumpuser_dl.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/rumpuser/rumpuser_dl.c diff -u src/sys/rump/librump/rumpuser/rumpuser_dl.c:1.9 src/sys/rump/librump/rumpuser/rumpuser_dl.c:1.10 --- src/sys/rump/librump/rumpuser/rumpuser_dl.c:1.9 Thu Nov 26 15:44:26 2009 +++ src/sys/rump/librump/rumpuser/rumpuser_dl.c Mon Dec 7 17:38:16 2009 @@ -1,4 +1,4 @@ -/* $NetBSD: rumpuser_dl.c,v 1.9 2009/11/26 15:44:26 pooka Exp $ */ +/* $NetBSD: rumpuser_dl.c,v 1.10 2009/12/07 17:38:16 pooka Exp $ */ /* * Copyright (c) 2009 Antti Kantee. All Rights Reserved. @@ -31,7 +31,7 @@ */ #include sys/cdefs.h -__RCSID($NetBSD: rumpuser_dl.c,v 1.9 2009/11/26 15:44:26 pooka Exp $); +__RCSID($NetBSD: rumpuser_dl.c,v 1.10 2009/12/07 17:38:16 pooka Exp $); #include sys/types.h #include sys/time.h @@ -391,6 +391,9 @@ free(symtab); free(strtab); + /* + * Next, load modules from dynlibs. + */ do { couldload = 0; map = origmap;
CVS commit: src/sys/netinet
Module Name:src Committed By: dyoung Date: Mon Dec 7 18:38:55 UTC 2009 Modified Files: src/sys/netinet: in.c Log Message: Initialize/compare pointers with NULL instead of 0. To generate a diff of this commit: cvs rdiff -u -r1.135 -r1.136 src/sys/netinet/in.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/netinet/in.c diff -u src/sys/netinet/in.c:1.135 src/sys/netinet/in.c:1.136 --- src/sys/netinet/in.c:1.135 Fri Sep 11 22:06:29 2009 +++ src/sys/netinet/in.c Mon Dec 7 18:38:55 2009 @@ -1,4 +1,4 @@ -/* $NetBSD: in.c,v 1.135 2009/09/11 22:06:29 dyoung Exp $ */ +/* $NetBSD: in.c,v 1.136 2009/12/07 18:38:55 dyoung Exp $ */ /* * Copyright (C) 1995, 1996, 1997, and 1998 WIDE Project. @@ -91,7 +91,7 @@ */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: in.c,v 1.135 2009/09/11 22:06:29 dyoung Exp $); +__KERNEL_RCSID(0, $NetBSD: in.c,v 1.136 2009/12/07 18:38:55 dyoung Exp $); #include opt_inet.h #include opt_inet_conf.h @@ -310,7 +310,7 @@ struct lwp *l) { struct ifreq *ifr = (struct ifreq *)data; - struct in_ifaddr *ia = 0; + struct in_ifaddr *ia = NULL; struct in_aliasreq *ifra = (struct in_aliasreq *)data; struct sockaddr_in oldaddr; int error, hostIsNew, maskIsNew; @@ -382,9 +382,9 @@ NULL) != 0) return (EPERM); - if (ia == 0) { + if (ia == NULL) { ia = malloc(sizeof(*ia), M_IFADDR, M_WAITOK|M_ZERO); - if (ia == 0) + if (ia == NULL) return (ENOBUFS); TAILQ_INSERT_TAIL(in_ifaddrhead, ia, ia_list); IFAREF(ia-ia_ifa); @@ -422,7 +422,7 @@ case SIOCGIFNETMASK: case SIOCGIFDSTADDR: case SIOCGIFBRDADDR: - if (ia == 0) + if (ia == NULL) return (EADDRNOTAVAIL); break; }
CVS commit: src
Module Name:src Committed By: christos Date: Mon Dec 7 18:47:25 UTC 2009 Modified Files: src/share/man/man7: sysctl.7 src/sys/netinet: icmp_var.h ip_icmp.c Log Message: PR/42243: Yasuoka Masahiko: Add net.inet.icmp.bmcastecho sysctl support, to disable icmp replies to the broadcast address. To generate a diff of this commit: cvs rdiff -u -r1.27 -r1.28 src/share/man/man7/sysctl.7 cvs rdiff -u -r1.27 -r1.28 src/sys/netinet/icmp_var.h cvs rdiff -u -r1.121 -r1.122 src/sys/netinet/ip_icmp.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/share/man/man7/sysctl.7 diff -u src/share/man/man7/sysctl.7:1.27 src/share/man/man7/sysctl.7:1.28 --- src/share/man/man7/sysctl.7:1.27 Mon Oct 5 06:47:52 2009 +++ src/share/man/man7/sysctl.7 Mon Dec 7 13:47:24 2009 @@ -1,4 +1,4 @@ -.\ $NetBSD: sysctl.7,v 1.27 2009/10/05 10:47:52 wiz Exp $ +.\ $NetBSD: sysctl.7,v 1.28 2009/12/07 18:47:24 christos Exp $ .\ .\ Copyright (c) 1993 .\ The Regents of the University of California. All rights reserved. @@ -983,6 +983,7 @@ .It icmp maskrepl integer yes .It icmp rediraccept integer yes .It icmp redirtimeout integer yes +.It icmp bmcastecho integer yes .It ip allowsrcrt integer yes .It ip anonportmax integer yes .It ip anonportmin integer yes @@ -1192,6 +1193,9 @@ This defaults to 600 seconds. .It Li icmp.returndatabytes Number of bytes to return in an ICMP error message. +.It Li icmp.bmcastecho +If set to 1, enables responding to ICMP echo or timestamp request to the +broadcast address. .It Li tcp.ack_on_push If set to 1, TCP is to immediately transmit an ACK upon reception of a packet with PUSH set. Index: src/sys/netinet/icmp_var.h diff -u src/sys/netinet/icmp_var.h:1.27 src/sys/netinet/icmp_var.h:1.28 --- src/sys/netinet/icmp_var.h:1.27 Sat Apr 12 01:58:22 2008 +++ src/sys/netinet/icmp_var.h Mon Dec 7 13:47:24 2009 @@ -1,4 +1,4 @@ -/* $NetBSD: icmp_var.h,v 1.27 2008/04/12 05:58:22 thorpej Exp $ */ +/* $NetBSD: icmp_var.h,v 1.28 2009/12/07 18:47:24 christos Exp $ */ /* * Copyright (c) 1982, 1986, 1993 @@ -57,7 +57,10 @@ /* space for ICMP_MAXTYPE + 1 (19) counters */ #define ICMP_STAT_PMTUCHG 46 /* path MTU changes */ -#define ICMP_NSTATS 47 +#define ICMP_STAT_BMCASTECHO 47 /* b/mcast echo requests dropped */ +#define ICMP_STAT_BMCASTTSTAMP 48 /* b/mcast tstamp requests dropped */ + +#define ICMP_NSTATS 49 #if ICMP_MAXTYPE != 18 #error ICMP_MAXTYPE too large for ICMP statistics @@ -75,7 +78,8 @@ #define ICMPCTL_REDIRACCEPT 5 /* Accept redirects from routers */ #define ICMPCTL_REDIRTIMEOUT 6 /* Remove routes added via redirects */ #define ICMPCTL_STATS 7 /* ICMP statistics */ -#define ICMPCTL_MAXID 8 +#define ICMPCTL_BMCASTECHO 8 /* allow broad/mult-cast echo */ +#define ICMPCTL_MAXID 9 #define ICMPCTL_NAMES { \ { 0, 0 }, \ @@ -86,6 +90,7 @@ { rediraccept, CTLTYPE_INT }, \ { redirtimeout, CTLTYPE_INT }, \ { stats, CTLTYPE_STRUCT }, \ + { bmcastecho, CTLTYPE_INT }, \ } #ifdef _KERNEL Index: src/sys/netinet/ip_icmp.c diff -u src/sys/netinet/ip_icmp.c:1.121 src/sys/netinet/ip_icmp.c:1.122 --- src/sys/netinet/ip_icmp.c:1.121 Wed Sep 16 11:23:05 2009 +++ src/sys/netinet/ip_icmp.c Mon Dec 7 13:47:24 2009 @@ -1,4 +1,4 @@ -/* $NetBSD: ip_icmp.c,v 1.121 2009/09/16 15:23:05 pooka Exp $ */ +/* $NetBSD: ip_icmp.c,v 1.122 2009/12/07 18:47:24 christos Exp $ */ /* * Copyright (C) 1995, 1996, 1997, and 1998 WIDE Project. @@ -94,7 +94,7 @@ */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: ip_icmp.c,v 1.121 2009/09/16 15:23:05 pooka Exp $); +__KERNEL_RCSID(0, $NetBSD: ip_icmp.c,v 1.122 2009/12/07 18:47:24 christos Exp $); #include opt_ipsec.h @@ -142,6 +142,7 @@ */ int icmpmaskrepl = 0; +int icmpbmcastecho = 0; #ifdef ICMPPRINTFS int icmpprintfs = 0; #endif @@ -542,6 +543,11 @@ break; case ICMP_ECHO: + if (!icmpbmcastecho + (m-m_flags (M_MCAST | M_BCAST)) != 0) { + ICMP_STATINC(ICMP_STAT_BMCASTECHO); + break; + } icp-icmp_type = ICMP_ECHOREPLY; goto reflect; @@ -550,6 +556,11 @@ ICMP_STATINC(ICMP_STAT_BADLEN); break; } + if (!icmpbmcastecho + (m-m_flags (M_MCAST | M_BCAST)) != 0) { + ICMP_STATINC(ICMP_STAT_BMCASTTSTAMP); + break; + } icp-icmp_type = ICMP_TSTAMPREPLY; icp-icmp_rtime = iptime(); icp-icmp_ttime = icp-icmp_rtime; /* bogus, do later! */ @@ -1055,6 +1066,14 @@ sysctl_net_inet_icmp_stats, 0, NULL, 0, CTL_NET, PF_INET, IPPROTO_ICMP, ICMPCTL_STATS, CTL_EOL); + sysctl_createv(clog, 0, NULL, NULL, + CTLFLAG_PERMANENT|CTLFLAG_READWRITE, + CTLTYPE_INT, bmcastecho, + SYSCTL_DESCR(Respond to ICMP_ECHO or ICMP_TIMESTAMP +message to the broadcast or multicast), + NULL, 0, icmpbmcastecho, 0, + CTL_NET, PF_INET, IPPROTO_ICMP, ICMPCTL_BMCASTECHO, + CTL_EOL); } void
CVS commit: src/usr.bin/netstat
Module Name:src Committed By: christos Date: Mon Dec 7 18:48:45 UTC 2009 Modified Files: src/usr.bin/netstat: inet.c Log Message: PR/42243: Yasuoka Masahiko: Add support for net.inet.icmp.bmcastecho support. Print the current status. To generate a diff of this commit: cvs rdiff -u -r1.91 -r1.92 src/usr.bin/netstat/inet.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/netstat/inet.c diff -u src/usr.bin/netstat/inet.c:1.91 src/usr.bin/netstat/inet.c:1.92 --- src/usr.bin/netstat/inet.c:1.91 Mon Sep 14 06:36:50 2009 +++ src/usr.bin/netstat/inet.c Mon Dec 7 13:48:45 2009 @@ -1,4 +1,4 @@ -/* $NetBSD: inet.c,v 1.91 2009/09/14 10:36:50 degroote Exp $ */ +/* $NetBSD: inet.c,v 1.92 2009/12/07 18:48:45 christos Exp $ */ /* * Copyright (c) 1983, 1988, 1993 @@ -34,7 +34,7 @@ #if 0 static char sccsid[] = from: @(#)inet.c 8.4 (Berkeley) 4/20/94; #else -__RCSID($NetBSD: inet.c,v 1.91 2009/09/14 10:36:50 degroote Exp $); +__RCSID($NetBSD: inet.c,v 1.92 2009/12/07 18:48:45 christos Exp $); #endif #endif /* not lint */ @@ -582,6 +582,8 @@ p(ICMP_STAT_TOOSHORT, \t%llu message%s minimum length\n); p(ICMP_STAT_CHECKSUM, \t%llu bad checksum%s\n); p(ICMP_STAT_BADLEN, \t%llu message%s with bad length\n); + p(ICMP_STAT_BMCASTECHO, \t%llu multicast echo request%s ignored\n); + p(ICMP_STAT_BMCASTTSTAMP, \t%llu multicast timestamp request%s ignored\n); for (first = 1, i = 0; i ICMP_MAXTYPE + 1; i++) if (icmpstat[ICMP_STAT_INHIST + i] != 0) { if (first) {
CVS commit: src/sys/sys
Module Name:src Committed By: dyoung Date: Mon Dec 7 19:45:14 UTC 2009 Modified Files: src/sys/sys: device.h Log Message: Poison future uses of DVACT_ACTIVATE by deleting it. I deleted the last use of DVACT_ACTIVATE in a driver, yesterday. To generate a diff of this commit: cvs rdiff -u -r1.126 -r1.127 src/sys/sys/device.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/device.h diff -u src/sys/sys/device.h:1.126 src/sys/sys/device.h:1.127 --- src/sys/sys/device.h:1.126 Thu Nov 26 20:52:19 2009 +++ src/sys/sys/device.h Mon Dec 7 19:45:13 2009 @@ -1,4 +1,4 @@ -/* $NetBSD: device.h,v 1.126 2009/11/26 20:52:19 pooka Exp $ */ +/* $NetBSD: device.h,v 1.127 2009/12/07 19:45:13 dyoung Exp $ */ /* * Copyright (c) 1996, 2000 Christopher G. Demetriou @@ -110,7 +110,6 @@ * Actions for ca_activate. */ typedef enum devact { - DVACT_ACTIVATE, /* activate the device */ DVACT_DEACTIVATE /* deactivate the device */ } devact_t;
CVS commit: src/sys/arch/sparc64/dev
Module Name:src Committed By: nakayama Date: Mon Dec 7 19:57:35 UTC 2009 Modified Files: src/sys/arch/sparc64/dev: iommu.c Log Message: Print the warning message if extent_free fails. To generate a diff of this commit: cvs rdiff -u -r1.94 -r1.95 src/sys/arch/sparc64/dev/iommu.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/sparc64/dev/iommu.c diff -u src/sys/arch/sparc64/dev/iommu.c:1.94 src/sys/arch/sparc64/dev/iommu.c:1.95 --- src/sys/arch/sparc64/dev/iommu.c:1.94 Mon Dec 7 11:24:30 2009 +++ src/sys/arch/sparc64/dev/iommu.c Mon Dec 7 19:57:34 2009 @@ -1,4 +1,4 @@ -/* $NetBSD: iommu.c,v 1.94 2009/12/07 11:24:30 nakayama Exp $ */ +/* $NetBSD: iommu.c,v 1.95 2009/12/07 19:57:34 nakayama Exp $ */ /* * Copyright (c) 1999, 2000 Matthew R. Green @@ -59,7 +59,7 @@ */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: iommu.c,v 1.94 2009/12/07 11:24:30 nakayama Exp $); +__KERNEL_RCSID(0, $NetBSD: iommu.c,v 1.95 2009/12/07 19:57:34 nakayama Exp $); #include opt_ddb.h @@ -534,12 +534,14 @@ DPRINTF(IDB_INFO, (iommu_dvmamap_load: too many segments %d\n, seg)); s = splhigh(); - /* How can this fail? And if it does what can we do? */ err = extent_free(is-is_dvmamap, dvmaddr, sgsize, EX_NOWAIT); map-_dm_dvmastart = 0; map-_dm_dvmasize = 0; splx(s); + if (err != 0) +printf(warning: %s: % PRId64 + of DVMA space lost\n, __func__, sgsize); return (EFBIG); } sgstart += len; @@ -643,7 +645,8 @@ map-_dm_dvmasize = 0; splx(s); if (error != 0) - printf(warning: %qd of DVMA space lost\n, (long long)sgsize); + printf(warning: %s: % PRId64 of DVMA space lost\n, + __func__, sgsize); /* Clear the map */ } @@ -929,12 +932,14 @@ fail: s = splhigh(); - /* How can this fail? And if it does what can we do? */ err = extent_free(is-is_dvmamap, map-_dm_dvmastart, sgsize, EX_NOWAIT); map-_dm_dvmastart = 0; map-_dm_dvmasize = 0; splx(s); + if (err != 0) + printf(warning: %s: % PRId64 of DVMA space lost\n, + __func__, sgsize); return (EFBIG); }
CVS commit: src/sys/fs/puffs
Module Name:src Committed By: pooka Date: Mon Dec 7 20:57:55 UTC 2009 Modified Files: src/sys/fs/puffs: puffs_msgif.c puffs_sys.h puffs_vfsops.c Log Message: Process flush requests from the file server in a separate thread context. This fixes a long-standing but seldomly seen deadlock, where the kernel was holding pages busy (due to e.g. readahead request) while waiting for the server to respond, and the server made a callback into the kernel asking to invalidate those pages. ... or, well, theoretically fixes, since I didn't have any reliable way of repeating the deadlock and I think I saw it only twice. To generate a diff of this commit: cvs rdiff -u -r1.75 -r1.76 src/sys/fs/puffs/puffs_msgif.c cvs rdiff -u -r1.72 -r1.73 src/sys/fs/puffs/puffs_sys.h cvs rdiff -u -r1.83 -r1.84 src/sys/fs/puffs/puffs_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/fs/puffs/puffs_msgif.c diff -u src/sys/fs/puffs/puffs_msgif.c:1.75 src/sys/fs/puffs/puffs_msgif.c:1.76 --- src/sys/fs/puffs/puffs_msgif.c:1.75 Mon Dec 7 15:51:52 2009 +++ src/sys/fs/puffs/puffs_msgif.c Mon Dec 7 20:57:55 2009 @@ -1,4 +1,4 @@ -/* $NetBSD: puffs_msgif.c,v 1.75 2009/12/07 15:51:52 pooka Exp $ */ +/* $NetBSD: puffs_msgif.c,v 1.76 2009/12/07 20:57:55 pooka Exp $ */ /* * Copyright (c) 2005, 2006, 2007 Antti Kantee. All Rights Reserved. @@ -30,7 +30,7 @@ */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: puffs_msgif.c,v 1.75 2009/12/07 15:51:52 pooka Exp $); +__KERNEL_RCSID(0, $NetBSD: puffs_msgif.c,v 1.76 2009/12/07 20:57:55 pooka Exp $); #include sys/param.h #include sys/atomic.h @@ -759,10 +759,7 @@ voff_t offlo, offhi; int rv, flags = 0; - if (pf-pf_req.preq_pth.pth_framelen != sizeof(struct puffs_flush)) { - rv = EINVAL; - goto out; - } + KASSERT(pf-pf_req.preq_pth.pth_framelen == sizeof(struct puffs_flush)); /* XXX: slurry */ if (pf-pf_op == PUFFS_INVAL_NAMECACHE_ALL) { @@ -845,9 +842,8 @@ { struct puffs_mount *pmp = this; struct puffs_req *preq = (struct puffs_req *)pth; - int rv = 0; + struct puffs_sopreq *psopr; - /* XXX: need to send error to userspace */ if (pth-pth_framelen sizeof(struct puffs_req)) { puffs_msg_sendresp(pmp, preq, EINVAL); /* E2SMALL */ return 0; @@ -859,17 +855,87 @@ DPRINTF((dispatch: vn/vfs message 0x%x\n, preq-preq_optype)); puffsop_msg(pmp, preq); break; - case PUFFSOP_FLUSH: + case PUFFSOP_FLUSH: /* process in sop thread */ + { + struct puffs_flush *pf; + DPRINTF((dispatch: flush 0x%x\n, preq-preq_optype)); - puffsop_flush(pmp, (struct puffs_flush *)preq); + + if (preq-preq_pth.pth_framelen != sizeof(struct puffs_flush)) { + puffs_msg_sendresp(pmp, preq, EINVAL); /* E2SMALL */ + break; + } + pf = (struct puffs_flush *)preq; + + psopr = kmem_alloc(sizeof(*psopr), KM_SLEEP); + memcpy(psopr-psopr_pf, pf, sizeof(*pf)); + psopr-psopr_sopreq = PUFFS_SOPREQ_FLUSH; + + mutex_enter(pmp-pmp_sopmtx); + TAILQ_INSERT_TAIL(pmp-pmp_sopreqs, psopr, psopr_entries); + cv_signal(pmp-pmp_sopcv); + mutex_exit(pmp-pmp_sopmtx); break; + } default: DPRINTF((dispatch: invalid class 0x%x\n, preq-preq_opclass)); puffs_msg_sendresp(pmp, preq, EOPNOTSUPP); break; } - return rv; + return 0; +} + +/* + * Work loop for thread processing all ops from server which + * cannot safely be handled in caller context. This includes + * everything which might need a lock currently held by the file + * server, i.e. a long-term kernel lock which will be released only + * once the file server acknowledges a request + */ +void +puffs_sop_thread(void *arg) +{ + struct puffs_mount *pmp = arg; + struct puffs_sopreq *psopr; + bool keeprunning; + + mutex_enter(pmp-pmp_sopmtx); + for (keeprunning = true; keeprunning; ) { + while ((psopr = TAILQ_FIRST(pmp-pmp_sopreqs)) == NULL) + cv_wait(pmp-pmp_sopcv, pmp-pmp_sopmtx); + TAILQ_REMOVE(pmp-pmp_sopreqs, psopr, psopr_entries); + mutex_exit(pmp-pmp_sopmtx); + + switch (psopr-psopr_sopreq) { + case PUFFS_SOPREQ_EXIT: + keeprunning = false; + break; + case PUFFS_SOPREQ_FLUSH: + puffsop_flush(pmp, psopr-psopr_pf); + break; + } + + kmem_free(psopr, sizeof(*psopr)); + mutex_enter(pmp-pmp_sopmtx); + } + + /* + * Purge remaining ops. could send error, but that is highly + * unlikely to reach the caller. + */ + while ((psopr = TAILQ_FIRST(pmp-pmp_sopreqs)) != NULL) { + TAILQ_REMOVE(pmp-pmp_sopreqs, psopr, psopr_entries); + mutex_exit(pmp-pmp_sopmtx); + kmem_free(psopr, sizeof(*psopr)); + mutex_enter(pmp-pmp_sopmtx); + } + + pmp-pmp_sopthrcount--; + cv_signal(pmp-pmp_sopcv); + mutex_exit(pmp-pmp_sopmtx); /* not allowed to access fs after this */ + + kthread_exit(0); } int Index: src/sys/fs/puffs/puffs_sys.h diff -u src/sys/fs/puffs/puffs_sys.h:1.72 src/sys/fs/puffs/puffs_sys.h:1.73 --- src/sys/fs/puffs/puffs_sys.h:1.72 Thu Nov 5 19:42:44 2009 +++ src/sys/fs/puffs/puffs_sys.h
CVS commit: src/lib/libc/stdio
Module Name:src Committed By: roy Date: Mon Dec 7 21:31:44 UTC 2009 Modified Files: src/lib/libc/stdio: getdelim.c Log Message: Test against SSIZE_MAX as pointed out by enami tsugutomo. To generate a diff of this commit: cvs rdiff -u -r1.11 -r1.12 src/lib/libc/stdio/getdelim.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/libc/stdio/getdelim.c diff -u src/lib/libc/stdio/getdelim.c:1.11 src/lib/libc/stdio/getdelim.c:1.12 --- src/lib/libc/stdio/getdelim.c:1.11 Wed Dec 2 11:14:47 2009 +++ src/lib/libc/stdio/getdelim.c Mon Dec 7 21:31:43 2009 @@ -1,4 +1,4 @@ -/* $NetBSD: getdelim.c,v 1.11 2009/12/02 11:14:47 roy Exp $ */ +/* $NetBSD: getdelim.c,v 1.12 2009/12/07 21:31:43 roy Exp $ */ /* * Copyright (c) 2009 The NetBSD Foundation, Inc. @@ -28,7 +28,7 @@ */ #include sys/cdefs.h -__RCSID($NetBSD: getdelim.c,v 1.11 2009/12/02 11:14:47 roy Exp $); +__RCSID($NetBSD: getdelim.c,v 1.12 2009/12/07 21:31:43 roy Exp $); #include namespace.h @@ -92,7 +92,7 @@ newlen = off + len; /* Ensure we can handle it */ - if (newlen off || newlen SIZE_MAX) { + if (newlen off || newlen SSIZE_MAX) { errno = EOVERFLOW; goto error; }
CVS commit: src/share/man/man7
Module Name:src Committed By: wiz Date: Mon Dec 7 23:48:02 UTC 2009 Modified Files: src/share/man/man7: sysctl.7 Log Message: Bump date for new sysctl. To generate a diff of this commit: cvs rdiff -u -r1.28 -r1.29 src/share/man/man7/sysctl.7 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/share/man/man7/sysctl.7 diff -u src/share/man/man7/sysctl.7:1.28 src/share/man/man7/sysctl.7:1.29 --- src/share/man/man7/sysctl.7:1.28 Mon Dec 7 18:47:24 2009 +++ src/share/man/man7/sysctl.7 Mon Dec 7 23:48:01 2009 @@ -1,4 +1,4 @@ -.\ $NetBSD: sysctl.7,v 1.28 2009/12/07 18:47:24 christos Exp $ +.\ $NetBSD: sysctl.7,v 1.29 2009/12/07 23:48:01 wiz Exp $ .\ .\ Copyright (c) 1993 .\ The Regents of the University of California. All rights reserved. @@ -29,7 +29,7 @@ .\ .\ @(#)sysctl.3 8.4 (Berkeley) 5/9/95 .\ -.Dd October 4, 2009 +.Dd December 7, 2009 .Dt SYSCTL 7 .Os .Sh NAME
CVS commit: src/share/man/man9
Module Name:src Committed By: dyoung Date: Mon Dec 7 23:50:39 UTC 2009 Modified Files: src/share/man/man9: autoconf.9 Log Message: Don't mention the activate interface, since config_activate() has been gone for a while, now. To generate a diff of this commit: cvs rdiff -u -r1.25 -r1.26 src/share/man/man9/autoconf.9 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/share/man/man9/autoconf.9 diff -u src/share/man/man9/autoconf.9:1.25 src/share/man/man9/autoconf.9:1.26 --- src/share/man/man9/autoconf.9:1.25 Wed Sep 16 22:47:29 2009 +++ src/share/man/man9/autoconf.9 Mon Dec 7 23:50:39 2009 @@ -1,4 +1,4 @@ -.\ $NetBSD: autoconf.9,v 1.25 2009/09/16 22:47:29 dyoung Exp $ +.\ $NetBSD: autoconf.9,v 1.26 2009/12/07 23:50:39 dyoung Exp $ .\ .\ Copyright (c) 2001, 2002 The NetBSD Foundation, Inc. .\ All rights reserved. @@ -27,7 +27,7 @@ .\ ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE .\ POSSIBILITY OF SUCH DAMAGE. .\ -.Dd September 16, 2009 +.Dd December 7, 2009 .Dt AUTOCONF 9 .Os .Sh NAME @@ -412,5 +412,5 @@ .Bx 4.1 . The autoconfiguration framework was completely revised in .Bx 4.4 . -The detach and activate/deactivate interfaces appeared in +The detach and deactivate interfaces appeared in .Nx 1.5 .
CVS commit: [matt-nb5-mips64] src/sys/arch/sbmips/sbmips
Module Name:src Committed By: cyber Date: Tue Dec 8 01:55:07 UTC 2009 Modified Files: src/sys/arch/sbmips/sbmips [matt-nb5-mips64]: systemsw.c Log Message: match prototype To generate a diff of this commit: cvs rdiff -u -r1.14.28.1 -r1.14.28.2 src/sys/arch/sbmips/sbmips/systemsw.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/sbmips/sbmips/systemsw.c diff -u src/sys/arch/sbmips/sbmips/systemsw.c:1.14.28.1 src/sys/arch/sbmips/sbmips/systemsw.c:1.14.28.2 --- src/sys/arch/sbmips/sbmips/systemsw.c:1.14.28.1 Mon Nov 23 18:46:51 2009 +++ src/sys/arch/sbmips/sbmips/systemsw.c Tue Dec 8 01:55:07 2009 @@ -1,4 +1,4 @@ -/* $NetBSD: systemsw.c,v 1.14.28.1 2009/11/23 18:46:51 matt Exp $ */ +/* $NetBSD: systemsw.c,v 1.14.28.2 2009/12/08 01:55:07 cyber Exp $ */ /* * Copyright 2000, 2001 @@ -33,7 +33,7 @@ */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: systemsw.c,v 1.14.28.1 2009/11/23 18:46:51 matt Exp $); +__KERNEL_RCSID(0, $NetBSD: systemsw.c,v 1.14.28.2 2009/12/08 01:55:07 cyber Exp $); #include sys/param.h #include sys/systm.h @@ -84,7 +84,7 @@ } void -cpu_intr(uint32_t status, uint32_t cause, uint32_t pc, uint32_t ipending) +cpu_intr(uint32_t status, uint32_t cause, vaddr_t pc, uint32_t ipending) { (*systemsw.s_cpu_intr)(status, cause, pc, ipending);
CVS commit: [matt-nb5-mips64] src/sys/arch/sbmips
Module Name:src Committed By: cyber Date: Tue Dec 8 01:58:43 UTC 2009 Modified Files: src/sys/arch/sbmips/include [matt-nb5-mips64]: autoconf.h src/sys/arch/sbmips/sbmips [matt-nb5-mips64]: machdep.c Log Message: - fix to allow 64bit kernels to properly talk to the firmware - allow visibiliy of additional RAM To generate a diff of this commit: cvs rdiff -u -r1.3 -r1.3.126.1 src/sys/arch/sbmips/include/autoconf.h cvs rdiff -u -r1.38.10.2 -r1.38.10.3 src/sys/arch/sbmips/sbmips/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/sbmips/include/autoconf.h diff -u src/sys/arch/sbmips/include/autoconf.h:1.3 src/sys/arch/sbmips/include/autoconf.h:1.3.126.1 --- src/sys/arch/sbmips/include/autoconf.h:1.3 Sat Mar 22 14:26:43 2003 +++ src/sys/arch/sbmips/include/autoconf.h Tue Dec 8 01:58:43 2009 @@ -1,4 +1,4 @@ -/* $NetBSD: autoconf.h,v 1.3 2003/03/22 14:26:43 simonb Exp $ */ +/* $NetBSD: autoconf.h,v 1.3.126.1 2009/12/08 01:58:43 cyber Exp $ */ /* * Copyright 2000, 2001 @@ -49,14 +49,39 @@ #define BOOTINFO_MAGIC 0x1234ABCD #define BOOTINFO_VERSION 1 +#if _LP64 +#define BI_FIXUP(x) ((vaddr_t)x | 0x) +#else +#define BI_FIXUP(x) x +#endif + + struct bootinfo_v1 { - u_long version; /* 0: version of bootinfo */ - u_long reserved; /* 4: round to 64-bit boundary */ - u_long ssym; /* 8: start of kernel sym table */ - u_long esym; /* 12: end of kernel sym table */ + uint32_t version; /* 0: version of bootinfo */ + uint32_t reserved; /* 4: round to 64-bit boundary */ + uint32_t ssym; /* 8: start of kernel sym table */ + uint32_t esym; /* 12: end of kernel sym table */ char boot_flags[64]; /* 16: boot flags */ char booted_kernel[64]; /* 80: name of booted kernel */ - u_long fwhandle; /* 144: firmware handle */ - u_long fwentry; /* 148: firmware entry point */ + uint32_t fwhandle; /* 144: firmware handle */ + uint32_t fwentry; /* 148: firmware entry point */ u_char reserved2[100]; /* 256: total size */ }; + + +struct bootinfo_v1_int { + uint32_t version; /* 0/0: version of bootinfo */ + uint32_t reserved; /* 4/4: round to 64-bit boundary */ + vaddr_t ssym; /* 8/8: start of kernel sym table */ + vaddr_t esym; /* 12/16: end of kernel sym table */ + char boot_flags[64]; /* 16/24: boot flags */ + char booted_kernel[64]; /* 80/88: name of booted kernel */ + vaddr_t fwhandle; /* 144/152: firmware handle */ + vaddr_t fwentry; /* 148/160: firmware entry point*/ +#ifdef _LP64 + u_char reserved2[88]; /* 168: total size - 256 */ +#else + u_char reserved2[104]; /* 152: total size - 256 */ +#endif +}; + Index: src/sys/arch/sbmips/sbmips/machdep.c diff -u src/sys/arch/sbmips/sbmips/machdep.c:1.38.10.2 src/sys/arch/sbmips/sbmips/machdep.c:1.38.10.3 --- src/sys/arch/sbmips/sbmips/machdep.c:1.38.10.2 Mon Nov 23 18:23:02 2009 +++ src/sys/arch/sbmips/sbmips/machdep.c Tue Dec 8 01:58:43 2009 @@ -1,4 +1,4 @@ -/* $NetBSD: machdep.c,v 1.38.10.2 2009/11/23 18:23:02 matt Exp $ */ +/* $NetBSD: machdep.c,v 1.38.10.3 2009/12/08 01:58:43 cyber Exp $ */ /* * Copyright 2000, 2001 @@ -58,7 +58,7 @@ */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: machdep.c,v 1.38.10.2 2009/11/23 18:23:02 matt Exp $); +__KERNEL_RCSID(0, $NetBSD: machdep.c,v 1.38.10.3 2009/12/08 01:58:43 cyber Exp $); #include opt_ddb.h #include opt_execfmt.h @@ -134,7 +134,7 @@ int netboot; /* Are we netbooting? */ int cfe_present; -struct bootinfo_v1 bootinfo; +struct bootinfo_v1_int bootinfo; phys_ram_seg_t mem_clusters[VM_PHYSSEG_MAX]; int mem_cluster_cnt; @@ -162,6 +162,7 @@ extern char edata[], end[]; int i; uint32_t config; + struct bootinfo_v1 *tmp_bi; /* XXX this code must run on the target CPU */ config = mips3_cp0_config_read(); @@ -170,7 +171,11 @@ mips3_cp0_config_write(config); /* Zero BSS. XXXCGD: uh, is this really necessary still? */ +#ifdef _LP64 + memset((char *)((vaddr_t)edata | 0x), 0, end - edata); +#else memset(edata, 0, end - edata); +#endif /* * Copy the bootinfo structure from the boot loader. @@ -178,9 +183,16 @@ * called because we may need CFE's TLB handler */ - if (magic == BOOTINFO_MAGIC) - memcpy(bootinfo, (struct bootinfo_v1 *)bootdata, - sizeof bootinfo); + if (magic == BOOTINFO_MAGIC) { + tmp_bi = (struct bootinfo_v1 *)bootdata; + bootinfo.version = tmp_bi-version; + bootinfo.ssym = BI_FIXUP(tmp_bi-ssym); + bootinfo.esym = BI_FIXUP(tmp_bi-esym); + memcpy((bootinfo.boot_flags), tmp_bi-boot_flags, 64); + memcpy((bootinfo.booted_kernel), tmp_bi-booted_kernel, 64); + bootinfo.fwhandle = BI_FIXUP(tmp_bi-fwhandle); + bootinfo.fwentry = BI_FIXUP(tmp_bi-fwentry); + } else if (reserved == CFE_EPTSEAL) { magic = BOOTINFO_MAGIC; bzero(bootinfo, sizeof bootinfo); @@ -240,7 +252,9 @@ * XXX Ignore
CVS commit: [matt-nb5-mips64] src/sys/arch/mips/mips
Module Name:src Committed By: mrg Date: Tue Dec 8 02:21:16 UTC 2009 Modified Files: src/sys/arch/mips/mips [matt-nb5-mips64]: cpu_exec.c Log Message: remove an unnecessary variable. To generate a diff of this commit: cvs rdiff -u -r1.50.54.1.4.9 -r1.50.54.1.4.10 \ src/sys/arch/mips/mips/cpu_exec.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/mips/mips/cpu_exec.c diff -u src/sys/arch/mips/mips/cpu_exec.c:1.50.54.1.4.9 src/sys/arch/mips/mips/cpu_exec.c:1.50.54.1.4.10 --- src/sys/arch/mips/mips/cpu_exec.c:1.50.54.1.4.9 Sun Sep 13 23:06:22 2009 +++ src/sys/arch/mips/mips/cpu_exec.c Tue Dec 8 02:21:16 2009 @@ -1,4 +1,4 @@ -/* $NetBSD: cpu_exec.c,v 1.50.54.1.4.9 2009/09/13 23:06:22 matt Exp $ */ +/* $NetBSD: cpu_exec.c,v 1.50.54.1.4.10 2009/12/08 02:21:16 mrg Exp $ */ /* * Copyright (c) 1992, 1993 @@ -35,7 +35,7 @@ */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: cpu_exec.c,v 1.50.54.1.4.9 2009/09/13 23:06:22 matt Exp $); +__KERNEL_RCSID(0, $NetBSD: cpu_exec.c,v 1.50.54.1.4.10 2009/12/08 02:21:16 mrg Exp $); #include opt_compat_netbsd.h #include opt_compat_ultrix.h @@ -314,7 +314,6 @@ elf_check_itp(struct exec_package *epp, const char *itp, const char *itp_suffix) { - int error = 0; if (itp) { /* * If the path is exactly /usr/libexec/ld.elf_so, first @@ -326,6 +325,7 @@ strcmp(itp, /libexec/ld.elf_so) == 0) { struct nameidata nd; char *path; + int error; path = PNBUF_GET(); snprintf(path, MAXPATHLEN, %s-%s, itp, itp_suffix); @@ -341,10 +341,9 @@ epp-ep_interp = nd.ni_vp; } PNBUF_PUT(path); - error = 0; } } - return error; + return 0; } #if EXEC_ELF32
CVS commit: src/share/man/man4
Module Name:src Committed By: joerg Date: Tue Dec 8 02:40:04 UTC 2009 Modified Files: src/share/man/man4: icmp6.4 Log Message: Fix typo. From Brad Tilley. To generate a diff of this commit: cvs rdiff -u -r1.15 -r1.16 src/share/man/man4/icmp6.4 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/share/man/man4/icmp6.4 diff -u src/share/man/man4/icmp6.4:1.15 src/share/man/man4/icmp6.4:1.16 --- src/share/man/man4/icmp6.4:1.15 Wed May 27 19:23:59 2009 +++ src/share/man/man4/icmp6.4 Tue Dec 8 02:40:04 2009 @@ -1,4 +1,4 @@ -.\ $NetBSD: icmp6.4,v 1.15 2009/05/27 19:23:59 snj Exp $ +.\ $NetBSD: icmp6.4,v 1.16 2009/12/08 02:40:04 joerg Exp $ .\ $KAME: icmp6.4,v 1.6 2004/12/27 05:30:56 itojun Exp $ .\ $OpenBSD: icmp6.4,v 1.19 2004/12/23 20:33:03 jaredy Exp $ .\ @@ -96,7 +96,7 @@ .It 131 Ta grouprep Ta Group membership report .It 131 Ta listenrep Ta Multicast listener report .It 132 Ta groupterm Ta Group membership termination -.It 132 Ta listendone Ta Multicast listerner done +.It 132 Ta listendone Ta Multicast listener done .It 133 Ta routersol Ta Router solicitation .It 134 Ta routeradv Ta Router advertisement .It 135 Ta neighbrsol Ta Neighbor solicitation
CVS commit: src/usr.bin/ktruss
Module Name:src Committed By: uebayasi Date: Tue Dec 8 02:56:37 UTC 2009 Modified Files: src/usr.bin/ktruss: Makefile Log Message: Put back the dependency of dump.c agaist misc.h. This is needed because dump.c includes misc.h but misc.h is generated on-the-fly. Note that dump.c is out of the makeerrnos.sh - misc.[ch] generation rule now. This prevents ktruss from being unnecessarily rebuilt in rescue/. Pointed out by enami@, thanks! To generate a diff of this commit: cvs rdiff -u -r1.25 -r1.26 src/usr.bin/ktruss/Makefile 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/ktruss/Makefile diff -u src/usr.bin/ktruss/Makefile:1.25 src/usr.bin/ktruss/Makefile:1.26 --- src/usr.bin/ktruss/Makefile:1.25 Sun Dec 6 14:37:36 2009 +++ src/usr.bin/ktruss/Makefile Tue Dec 8 02:56:37 2009 @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.25 2009/12/06 14:37:36 uebayasi Exp $ +# $NetBSD: Makefile,v 1.26 2009/12/08 02:56:37 uebayasi Exp $ NOMAN= # defined @@ -14,7 +14,13 @@ LDSTATIC?=-static .endif +# Hint for mkdep(1). +dump.c: misc.h + +# Avoid race. misc.c: misc.h + +# Build-time generation. misc.c misc.h: ${DESTDIR}/usr/include/sys/errno.h makeerrnos.sh \ ${DESTDIR}/usr/include/sys/signal.h ${_MKTARGET_CREATE}
CVS commit: src/sys/arch/hp700/dev
Module Name:src Committed By: skrll Date: Tue Dec 8 06:56:54 UTC 2009 Modified Files: src/sys/arch/hp700/dev: dino.c Log Message: Simplify and improve dino_intr_map by checking for 0xff as error value. Inspired by OpenBSD. To generate a diff of this commit: cvs rdiff -u -r1.18 -r1.19 src/sys/arch/hp700/dev/dino.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/hp700/dev/dino.c diff -u src/sys/arch/hp700/dev/dino.c:1.18 src/sys/arch/hp700/dev/dino.c:1.19 --- src/sys/arch/hp700/dev/dino.c:1.18 Thu Dec 3 22:18:04 2009 +++ src/sys/arch/hp700/dev/dino.c Tue Dec 8 06:56:54 2009 @@ -1,4 +1,4 @@ -/* $NetBSD: dino.c,v 1.18 2009/12/03 22:18:04 skrll Exp $ */ +/* $NetBSD: dino.c,v 1.19 2009/12/08 06:56:54 skrll Exp $ */ /* $OpenBSD: dino.c,v 1.5 2004/02/13 20:39:31 mickey Exp $ */ @@ -29,7 +29,7 @@ */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: dino.c,v 1.18 2009/12/03 22:18:04 skrll Exp $); +__KERNEL_RCSID(0, $NetBSD: dino.c,v 1.19 2009/12/08 06:56:54 skrll Exp $); /* #include cardbus.h */ @@ -372,13 +372,14 @@ int dino_intr_map(struct pci_attach_args *pa, pci_intr_handle_t *ihp) { - pci_chipset_tag_t pc = pa-pa_pc; - pcitag_t tag = pa-pa_tag; - pcireg_t reg; - - reg = pci_conf_read(pc, tag, PCI_INTERRUPT_REG); - *ihp = PCI_INTERRUPT_LINE(reg); - return *ihp 0; + int line = pa-pa_intrline; + + if (line == 0xff) + return 1; + + *ihp = line; + + return 0; } const char *
CVS commit: src/sys/arch/hp700/dev
Module Name:src Committed By: skrll Date: Tue Dec 8 07:32:45 UTC 2009 Modified Files: src/sys/arch/hp700/dev: dino.c Log Message: io / mem space access fixes. Mostly from OpenBSD. To generate a diff of this commit: cvs rdiff -u -r1.19 -r1.20 src/sys/arch/hp700/dev/dino.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/hp700/dev/dino.c diff -u src/sys/arch/hp700/dev/dino.c:1.19 src/sys/arch/hp700/dev/dino.c:1.20 --- src/sys/arch/hp700/dev/dino.c:1.19 Tue Dec 8 06:56:54 2009 +++ src/sys/arch/hp700/dev/dino.c Tue Dec 8 07:32:45 2009 @@ -1,4 +1,4 @@ -/* $NetBSD: dino.c,v 1.19 2009/12/08 06:56:54 skrll Exp $ */ +/* $NetBSD: dino.c,v 1.20 2009/12/08 07:32:45 skrll Exp $ */ /* $OpenBSD: dino.c,v 1.5 2004/02/13 20:39:31 mickey Exp $ */ @@ -29,7 +29,7 @@ */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: dino.c,v 1.19 2009/12/08 06:56:54 skrll Exp $); +__KERNEL_RCSID(0, $NetBSD: dino.c,v 1.20 2009/12/08 07:32:45 skrll Exp $); /* #include cardbus.h */ @@ -604,7 +604,7 @@ struct dino_softc *sc = v; volatile struct dino_regs *r = sc-sc_regs; - r-pci_addr = h ~3; + r-pci_addr = h; return *((volatile uint8_t *)r-pci_io_data + (h 3)); } } @@ -613,24 +613,20 @@ dino_r2(void *v, bus_space_handle_t h, bus_size_t o) { volatile uint16_t *p; - volatile uint16_t d; h += o; - if (h 0xf000) { + if (h 0xf000) p = (volatile uint16_t *)h; - d = le16toh(*p); - } else { + else { struct dino_softc *sc = v; volatile struct dino_regs *r = sc-sc_regs; - r-pci_addr = h ~3; + r-pci_addr = h; p = (volatile uint16_t *)r-pci_io_data; if (h 2) p++; - d = le16toh(*p); } - - return d; + return le16toh(*p); } uint32_t @@ -655,11 +651,15 @@ uint64_t dino_r8(void *v, bus_space_handle_t h, bus_size_t o) { + uint64_t data; + h += o; - if (h 0xf000) - return *(volatile uint64_t *)h; + if (h 0xf000) { + data = *(volatile uint64_t *)h; else panic(dino_r8: not implemented); + + return le64toh(data); } void @@ -672,7 +672,7 @@ struct dino_softc *sc = v; volatile struct dino_regs *r = sc-sc_regs; - r-pci_addr = h ~3; + r-pci_addr = h; *((volatile uint8_t *)r-pci_io_data + (h 3)) = vv; } } @@ -689,7 +689,7 @@ struct dino_softc *sc = v; volatile struct dino_regs *r = sc-sc_regs; - r-pci_addr = h ~3; + r-pci_addr = h; p = (volatile uint16_t *)r-pci_io_data; if (h 2) p++; @@ -719,7 +719,7 @@ { h += o; if (h 0xf000) - *(volatile uint64_t *)h = vv; + *(volatile uint64_t *)h = htole64(vv); else panic(dino_w8: not implemented); } @@ -737,7 +737,7 @@ struct dino_softc *sc = v; volatile struct dino_regs *r = sc-sc_regs; - r-pci_addr = h ~3; + r-pci_addr = h; p = (volatile uint8_t *)r-pci_io_data + (h 3); } @@ -757,7 +757,7 @@ struct dino_softc *sc = v; volatile struct dino_regs *r = sc-sc_regs; - r-pci_addr = h ~3; + r-pci_addr = h; p = (volatile uint16_t *)r-pci_io_data; if (h 2) p++; @@ -805,7 +805,7 @@ struct dino_softc *sc = v; volatile struct dino_regs *r = sc-sc_regs; - r-pci_addr = h ~3; + r-pci_addr = h; p = (volatile uint8_t *)r-pci_io_data + (h 3); } @@ -825,7 +825,7 @@ struct dino_softc *sc = v; volatile struct dino_regs *r = sc-sc_regs; - r-pci_addr = h ~3; + r-pci_addr = h; p = (volatile uint16_t *)r-pci_io_data; if (h 2) p++; @@ -873,7 +873,7 @@ struct dino_softc *sc = v; volatile struct dino_regs *r = sc-sc_regs; - r-pci_addr = h ~3; + r-pci_addr = h; p = (volatile uint8_t *)r-pci_io_data + (h 3); } @@ -893,7 +893,7 @@ struct dino_softc *sc = v; volatile struct dino_regs *r = sc-sc_regs; - r-pci_addr = h ~3; + r-pci_addr = h; p = (volatile uint16_t *)r-pci_io_data; if (h 2) p++; @@ -942,12 +942,13 @@ struct dino_softc *sc = v; volatile struct dino_regs *r = sc-sc_regs; - r-pci_addr = h ~3; + r-pci_addr = h; p = (volatile uint16_t *)r-pci_io_data; if (h 2) p++; } + c /= 2; while (c--) *a++ = *p; } @@ -969,6 +970,7 @@ p = (volatile uint32_t *)r-pci_io_data; } + c /= 4; while (c--) *a++ = *p; } @@ -993,12 +995,13 @@ struct dino_softc *sc = v; volatile struct dino_regs *r = sc-sc_regs; - r-pci_addr = h ~3; + r-pci_addr = h; p = (volatile uint16_t *)r-pci_io_data; if (h 2) p++; } + c /= 2; while (c--) *p = *a++; } @@ -1020,6 +1023,7 @@ p = (volatile uint32_t *)r-pci_io_data; } + c /= 4; while (c--) *p = *a++; } @@ -1045,12 +1049,10 @@ struct dino_softc *sc = v; volatile struct dino_regs *r = sc-sc_regs; - r-pci_addr = h ~3; - while (c--) { + for (; c--; h++) { + r-pci_addr = h; p = (volatile uint8_t *)r-pci_io_data + (h 3); *a++ = *p; - if (!(++h 3)) -r-pci_addr = h; } } } @@ -1058,26 +1060,26 @@ void
CVS commit: [matt-nb5-mips64] src/sys/arch/sbmips
Module Name:src Committed By: cyber Date: Tue Dec 8 07:44:44 UTC 2009 Modified Files: src/sys/arch/sbmips/conf [matt-nb5-mips64]: GENERIC64 src/sys/arch/sbmips/sbmips [matt-nb5-mips64]: machdep.c Log Message: - Allow debugging symbols - Handle args processing in a way that CFE will let us use To generate a diff of this commit: cvs rdiff -u -r1.1.2.2 -r1.1.2.3 src/sys/arch/sbmips/conf/GENERIC64 cvs rdiff -u -r1.38.10.3 -r1.38.10.4 src/sys/arch/sbmips/sbmips/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/sbmips/conf/GENERIC64 diff -u src/sys/arch/sbmips/conf/GENERIC64:1.1.2.2 src/sys/arch/sbmips/conf/GENERIC64:1.1.2.3 --- src/sys/arch/sbmips/conf/GENERIC64:1.1.2.2 Mon Sep 14 19:26:08 2009 +++ src/sys/arch/sbmips/conf/GENERIC64 Tue Dec 8 07:44:44 2009 @@ -4,3 +4,7 @@ makeoptions LP64=yes options EXEC_ELF64 options COMPAT_NETBSD32 + +no options SYMTAB_SPACE +options SYMTAB_SPACE=64 + Index: src/sys/arch/sbmips/sbmips/machdep.c diff -u src/sys/arch/sbmips/sbmips/machdep.c:1.38.10.3 src/sys/arch/sbmips/sbmips/machdep.c:1.38.10.4 --- src/sys/arch/sbmips/sbmips/machdep.c:1.38.10.3 Tue Dec 8 01:58:43 2009 +++ src/sys/arch/sbmips/sbmips/machdep.c Tue Dec 8 07:44:44 2009 @@ -1,4 +1,4 @@ -/* $NetBSD: machdep.c,v 1.38.10.3 2009/12/08 01:58:43 cyber Exp $ */ +/* $NetBSD: machdep.c,v 1.38.10.4 2009/12/08 07:44:44 cyber Exp $ */ /* * Copyright 2000, 2001 @@ -58,9 +58,10 @@ */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: machdep.c,v 1.38.10.3 2009/12/08 01:58:43 cyber Exp $); +__KERNEL_RCSID(0, $NetBSD: machdep.c,v 1.38.10.4 2009/12/08 07:44:44 cyber Exp $); #include opt_ddb.h +#include opt_ddbparam.h /* for SYMTAB_SPACE */ #include opt_execfmt.h #include sys/param.h @@ -292,6 +293,9 @@ case ' ': continue; case '-': + case 'a': + case 'd': + case 's': while (bootinfo.boot_flags[i] != ' ' bootinfo.boot_flags[i] != '\0') { switch (bootinfo.boot_flags[i]) { @@ -350,9 +354,13 @@ * Initialize debuggers, and break into them, if appropriate. */ #if NKSYMS || defined(DDB) || defined(LKM) - ksyms_init(((uintptr_t)ksym_end - (uintptr_t)ksym_start), +#ifdef SYMTAB_SPACE + ksyms_init(0,0,0); +#else + ksyms_init(((vaddr_t)ksym_end - (vaddr_t)ksym_start), ksym_start, ksym_end); #endif +#endif if (boothowto RB_KDB) { #if defined(DDB)