CVS commit: src/sys/arch/mips/mips
Module Name:src Committed By: matt Date: Tue Feb 22 08:18:47 UTC 2011 Modified Files: src/sys/arch/mips/mips: mips_fixup.c Log Message: Always have a stub for tlb_write_indexed To generate a diff of this commit: cvs rdiff -u -r1.3 -r1.4 src/sys/arch/mips/mips/mips_fixup.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/mips_fixup.c diff -u src/sys/arch/mips/mips/mips_fixup.c:1.3 src/sys/arch/mips/mips/mips_fixup.c:1.4 --- src/sys/arch/mips/mips/mips_fixup.c:1.3 Sun Feb 20 16:38:13 2011 +++ src/sys/arch/mips/mips/mips_fixup.c Tue Feb 22 08:18:47 2011 @@ -1,4 +1,4 @@ -/* $NetBSD: mips_fixup.c,v 1.3 2011/02/20 16:38:13 rmind Exp $ */ +/* $NetBSD: mips_fixup.c,v 1.4 2011/02/22 08:18:47 matt Exp $ */ /*- * Copyright (c) 2010 The NetBSD Foundation, Inc. @@ -30,7 +30,7 @@ */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: mips_fixup.c,v 1.3 2011/02/20 16:38:13 rmind Exp $); +__KERNEL_RCSID(0, $NetBSD: mips_fixup.c,v 1.4 2011/02/22 08:18:47 matt Exp $); #include opt_multiprocessor.h #include opt_mips3_wired.h @@ -350,9 +350,8 @@ int tlb_update(vaddr_t, uint32_t) __stub; void tlb_enter(size_t, vaddr_t, uint32_t) __stub; void tlb_read_indexed(size_t, struct tlbmask *) __stub; -#if defined(ENABLE_MIPS3_WIRED_MAP) void tlb_write_indexed(size_t, const struct tlbmask *) __stub; -#endif + /* * wbflush isn't a stub since it gets overridden quite late * (after mips_vector_init returns). @@ -419,13 +418,11 @@ (*mips_locore_jumpvec.ljv_tlb_read_indexed)(tlbno, tlb); } -#if defined(ENABLE_MIPS3_WIRED_MAP) void tlb_write_indexed(size_t tlbno, const struct tlbmask *tlb) { (*mips_locore_jumpvec.ljv_tlb_write_indexed)(tlbno, tlb); } -#endif void wbflush(void)
CVS commit: src/sys/arch/mips/mips
Module Name:src Committed By: matt Date: Tue Feb 22 08:19:47 UTC 2011 Modified Files: src/sys/arch/mips/mips: mipsX_subr.S Log Message: Always include mipsX_tlb_write_indexed. To generate a diff of this commit: cvs rdiff -u -r1.38 -r1.39 src/sys/arch/mips/mips/mipsX_subr.S 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/mipsX_subr.S diff -u src/sys/arch/mips/mips/mipsX_subr.S:1.38 src/sys/arch/mips/mips/mipsX_subr.S:1.39 --- src/sys/arch/mips/mips/mipsX_subr.S:1.38 Sun Feb 20 07:45:48 2011 +++ src/sys/arch/mips/mips/mipsX_subr.S Tue Feb 22 08:19:47 2011 @@ -1,4 +1,4 @@ -/* $NetBSD: mipsX_subr.S,v 1.38 2011/02/20 07:45:48 matt Exp $ */ +/* $NetBSD: mipsX_subr.S,v 1.39 2011/02/22 08:19:47 matt Exp $ */ /* * Copyright 2002 Wasabi Systems, Inc. @@ -2442,7 +2442,6 @@ nop END(MIPSX(cpu_switch_resume)) -#if defined(ENABLE_MIPS3_WIRED_MAP) /*-- * * mipsN_tlb_write_indexed -- @@ -2502,7 +2501,6 @@ j ra mtc0 v1, MIPS_COP_0_STATUS # Restore the status register END(MIPSX(tlb_write_indexed)) -#endif /* ENABLE_MIPS3_WIRED_MAP */ #if defined(MIPS3) /* @@ -2635,9 +2633,7 @@ PTR_WORD _C_LABEL(MIPSX(tlb_update)) PTR_WORD _C_LABEL(MIPSX(tlb_enter)) PTR_WORD _C_LABEL(MIPSX(tlb_read_indexed)) -#if defined(ENABLE_MIPS3_WIRED_MAP) PTR_WORD _C_LABEL(MIPSX(tlb_write_indexed)) -#else PTR_WORD _C_LABEL(nullop) #endif
CVS commit: src/sys/arch/emips
Module Name:src Committed By: matt Date: Tue Feb 22 08:20:20 UTC 2011 Modified Files: src/sys/arch/emips/conf: files.emips src/sys/arch/emips/emips: autoconf.c bus_dma.c cpu.c interrupt.c machdep.c xilinx_ml40x.c xs_bee3.c src/sys/arch/emips/include: intr.h sysconf.h Log Message: Bring emips forward to the new mips world order. To generate a diff of this commit: cvs rdiff -u -r1.1 -r1.2 src/sys/arch/emips/conf/files.emips cvs rdiff -u -r1.2 -r1.3 src/sys/arch/emips/emips/autoconf.c cvs rdiff -u -r1.1 -r1.2 src/sys/arch/emips/emips/bus_dma.c \ src/sys/arch/emips/emips/cpu.c src/sys/arch/emips/emips/interrupt.c \ src/sys/arch/emips/emips/xilinx_ml40x.c \ src/sys/arch/emips/emips/xs_bee3.c cvs rdiff -u -r1.3 -r1.4 src/sys/arch/emips/emips/machdep.c cvs rdiff -u -r1.1 -r1.2 src/sys/arch/emips/include/intr.h \ src/sys/arch/emips/include/sysconf.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/emips/conf/files.emips diff -u src/sys/arch/emips/conf/files.emips:1.1 src/sys/arch/emips/conf/files.emips:1.2 --- src/sys/arch/emips/conf/files.emips:1.1 Wed Jan 26 01:18:50 2011 +++ src/sys/arch/emips/conf/files.emips Tue Feb 22 08:20:20 2011 @@ -1,4 +1,4 @@ -# $NetBSD: files.emips,v 1.1 2011/01/26 01:18:50 pooka Exp $ +# $NetBSD: files.emips,v 1.2 2011/02/22 08:20:20 matt Exp $ # eMIPS-specific configuration info # maxpartitions must be first item in files.${ARCH}. @@ -98,8 +98,6 @@ file common/bus_dma/bus_dmamem_common.c -file arch/mips/mips/softintr.c - # # Workstation console devices # Index: src/sys/arch/emips/emips/autoconf.c diff -u src/sys/arch/emips/emips/autoconf.c:1.2 src/sys/arch/emips/emips/autoconf.c:1.3 --- src/sys/arch/emips/emips/autoconf.c:1.2 Tue Feb 8 20:20:11 2011 +++ src/sys/arch/emips/emips/autoconf.c Tue Feb 22 08:20:20 2011 @@ -1,4 +1,4 @@ -/* $NetBSD: autoconf.c,v 1.2 2011/02/08 20:20:11 rmind Exp $ */ +/* $NetBSD: autoconf.c,v 1.3 2011/02/22 08:20:20 matt Exp $ */ /* * Copyright (c) 1988 University of Utah. @@ -39,7 +39,7 @@ */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: autoconf.c,v 1.2 2011/02/08 20:20:11 rmind Exp $); +__KERNEL_RCSID(0, $NetBSD: autoconf.c,v 1.3 2011/02/22 08:20:20 matt Exp $); #include sys/param.h #include sys/systm.h @@ -74,7 +74,7 @@ (*platform.bus_reset)(); /* Configuration is finished, turn on interrupts. */ - _splnone(); /* enable all source forcing SOFT_INTs cleared */ + spl0(); /* enable all source forcing SOFT_INTs cleared */ } /* Index: src/sys/arch/emips/emips/bus_dma.c diff -u src/sys/arch/emips/emips/bus_dma.c:1.1 src/sys/arch/emips/emips/bus_dma.c:1.2 --- src/sys/arch/emips/emips/bus_dma.c:1.1 Wed Jan 26 01:18:50 2011 +++ src/sys/arch/emips/emips/bus_dma.c Tue Feb 22 08:20:20 2011 @@ -1,4 +1,4 @@ -/* $NetBSD: bus_dma.c,v 1.1 2011/01/26 01:18:50 pooka Exp $ */ +/* $NetBSD: bus_dma.c,v 1.2 2011/02/22 08:20:20 matt Exp $ */ /*- * Copyright (c) 1997, 1998 The NetBSD Foundation, Inc. @@ -31,7 +31,7 @@ */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: bus_dma.c,v 1.1 2011/01/26 01:18:50 pooka Exp $); +__KERNEL_RCSID(0, $NetBSD: bus_dma.c,v 1.2 2011/02/22 08:20:20 matt Exp $); #include opt_cputype.h @@ -470,7 +470,7 @@ * NOTE: Even though this is `wbinv_all', since the cache is * write-though, it just invalidates it. */ - if (len = mips_pdcache_size) { + if (len = mips_cache_info.mci_pdcache_size) { mips_dcache_wbinv_all(); return; } @@ -658,12 +658,10 @@ bus_size_t boundary, bus_dma_segment_t *segs, int nsegs, int *rsegs, int flags) { - extern paddr_t avail_start, avail_end; /* XXX */ - return (_bus_dmamem_alloc_range_common(t, size, alignment, boundary, segs, nsegs, rsegs, flags, - avail_start /*low*/, - avail_end - PAGE_SIZE /*high*/)); + mips_avail_start /*low*/, + mips_avail_end - PAGE_SIZE /*high*/)); } /* Index: src/sys/arch/emips/emips/cpu.c diff -u src/sys/arch/emips/emips/cpu.c:1.1 src/sys/arch/emips/emips/cpu.c:1.2 --- src/sys/arch/emips/emips/cpu.c:1.1 Wed Jan 26 01:18:50 2011 +++ src/sys/arch/emips/emips/cpu.c Tue Feb 22 08:20:20 2011 @@ -1,4 +1,4 @@ -/* $NetBSD: cpu.c,v 1.1 2011/01/26 01:18:50 pooka Exp $ */ +/* $NetBSD: cpu.c,v 1.2 2011/02/22 08:20:20 matt Exp $ */ /* * Copyright (c) 1994, 1995 Carnegie-Mellon University. @@ -28,7 +28,9 @@ */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: cpu.c,v 1.1 2011/01/26 01:18:50 pooka Exp $); +__KERNEL_RCSID(0, $NetBSD: cpu.c,v 1.2 2011/02/22 08:20:20 matt Exp $); + +#include ioconf.h #include sys/param.h #include sys/device.h @@ -38,18 +40,14 @@ #include machine/autoconf.h -static int cpumatch __P((struct device *, struct cfdata *, void *)); -static void cpuattach __P((struct device *, struct device *, void *)); +static int cpumatch(device_t, cfdata_t, void *);
CVS commit: src/sys/dev/acpi
Module Name:src Committed By: jruoho Date: Tue Feb 22 09:34:13 UTC 2011 Modified Files: src/sys/dev/acpi: acpi_cpu_cstate.c Log Message: Only check if the register address in _CST is valid if the ACPI processor object address is valid. Some systems define the Processor() as: Scope (_PR) { Processor (C000, 0x00, 0x0410, 0x06) {} Processor (C001, 0x01, 0x, 0x00) {} Processor (C002, 0x02, 0x, 0x00) {} Processor (C003, 0x03, 0x, 0x00) {} } This may be typical to AMD systems that do not seem to use _CST, but instead operate with HLT (and C1E for the C3-state). The same check is already done in acpicpu_cstate_fadt(). Note that this violates the specification, given: PBlockAddress provides the system I/O address for the processors register block. Each processor can supply a different such address. PBlockLength is the length of the processor register block, in bytes and is either 0 (for no P_BLK) or 6. With one exception, all processors are required to have the same PBlockLength. The exception is that the boot processor can have a non-zero PBlockLength when all other processors have a zero PBlockLength. It is valid for every processor to have a PBlockLength of 0. (ACPI 4.0, p. 626) However, if the above is not satisfied, we simply resort to HALT that should be available on all supported x86 CPUs. To generate a diff of this commit: cvs rdiff -u -r1.37 -r1.38 src/sys/dev/acpi/acpi_cpu_cstate.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/acpi/acpi_cpu_cstate.c diff -u src/sys/dev/acpi/acpi_cpu_cstate.c:1.37 src/sys/dev/acpi/acpi_cpu_cstate.c:1.38 --- src/sys/dev/acpi/acpi_cpu_cstate.c:1.37 Sun Jan 30 08:55:52 2011 +++ src/sys/dev/acpi/acpi_cpu_cstate.c Tue Feb 22 09:34:13 2011 @@ -1,4 +1,4 @@ -/* $NetBSD: acpi_cpu_cstate.c,v 1.37 2011/01/30 08:55:52 jruoho Exp $ */ +/* $NetBSD: acpi_cpu_cstate.c,v 1.38 2011/02/22 09:34:13 jruoho Exp $ */ /*- * Copyright (c) 2010 Jukka Ruohonen jruoho...@iki.fi @@ -27,7 +27,7 @@ * SUCH DAMAGE. */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: acpi_cpu_cstate.c,v 1.37 2011/01/30 08:55:52 jruoho Exp $); +__KERNEL_RCSID(0, $NetBSD: acpi_cpu_cstate.c,v 1.38 2011/02/22 09:34:13 jruoho Exp $); #include sys/param.h #include sys/cpu.h @@ -430,9 +430,12 @@ * the offset of P_LVL3 may change depending on whether * acpiacad(4) is connected or disconnected. */ - if (reg-reg_addr ao-ao_pblkaddr + ao-ao_pblklen) { - rv = AE_BAD_ADDRESS; - goto out; + if (ao-ao_pblkaddr != 0) { + + if (reg-reg_addr ao-ao_pblkaddr + ao-ao_pblklen) { +rv = AE_BAD_ADDRESS; +goto out; + } } state.cs_addr = reg-reg_addr;
CVS commit: src/sys/dev/acpi
Module Name:src Committed By: jruoho Date: Tue Feb 22 09:39:48 UTC 2011 Modified Files: src/sys/dev/acpi: acpi_cpu_cstate.c Log Message: Always declare HALT as available. If ACPI_FADT_C1_SUPPORTED is not set in the FADT, print a warning, as it is obviously a BIOS bug. To generate a diff of this commit: cvs rdiff -u -r1.38 -r1.39 src/sys/dev/acpi/acpi_cpu_cstate.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/acpi/acpi_cpu_cstate.c diff -u src/sys/dev/acpi/acpi_cpu_cstate.c:1.38 src/sys/dev/acpi/acpi_cpu_cstate.c:1.39 --- src/sys/dev/acpi/acpi_cpu_cstate.c:1.38 Tue Feb 22 09:34:13 2011 +++ src/sys/dev/acpi/acpi_cpu_cstate.c Tue Feb 22 09:39:48 2011 @@ -1,4 +1,4 @@ -/* $NetBSD: acpi_cpu_cstate.c,v 1.38 2011/02/22 09:34:13 jruoho Exp $ */ +/* $NetBSD: acpi_cpu_cstate.c,v 1.39 2011/02/22 09:39:48 jruoho Exp $ */ /*- * Copyright (c) 2010 Jukka Ruohonen jruoho...@iki.fi @@ -27,7 +27,7 @@ * SUCH DAMAGE. */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: acpi_cpu_cstate.c,v 1.38 2011/02/22 09:34:13 jruoho Exp $); +__KERNEL_RCSID(0, $NetBSD: acpi_cpu_cstate.c,v 1.39 2011/02/22 09:39:48 jruoho Exp $); #include sys/param.h #include sys/cpu.h @@ -538,8 +538,10 @@ /* * All x86 processors should support C1 (a.k.a. HALT). */ - if ((AcpiGbl_FADT.Flags ACPI_FADT_C1_SUPPORTED) != 0) - cs[ACPI_STATE_C1].cs_method = ACPICPU_C_STATE_HALT; + cs[ACPI_STATE_C1].cs_method = ACPICPU_C_STATE_HALT; + + if ((AcpiGbl_FADT.Flags ACPI_FADT_C1_SUPPORTED) == 0) + aprint_debug_dev(sc-sc_dev, HALT not supported?\n); if (sc-sc_object.ao_pblkaddr == 0) return;
CVS commit: src/sys/kern
Module Name:src Committed By: pooka Date: Tue Feb 22 10:33:12 UTC 2011 Modified Files: src/sys/kern: makesyscalls.sh Log Message: Use the whole contents of rval instead of just rval[0] for rump syscall return. Fixes at least lseek() on various architectures in various ways. To generate a diff of this commit: cvs rdiff -u -r1.112 -r1.113 src/sys/kern/makesyscalls.sh 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/makesyscalls.sh diff -u src/sys/kern/makesyscalls.sh:1.112 src/sys/kern/makesyscalls.sh:1.113 --- src/sys/kern/makesyscalls.sh:1.112 Mon Feb 21 23:30:12 2011 +++ src/sys/kern/makesyscalls.sh Tue Feb 22 10:33:12 2011 @@ -1,5 +1,5 @@ #! /bin/sh - -# $NetBSD: makesyscalls.sh,v 1.112 2011/02/21 23:30:12 pooka Exp $ +# $NetBSD: makesyscalls.sh,v 1.113 2011/02/22 10:33:12 pooka Exp $ # # Copyright (c) 1994, 1996, 2000 Christopher G. Demetriou # All rights reserved. @@ -815,10 +815,12 @@ argarg, argsize) rumpcalls if (type != NOERR) { printf(\trsys_seterrno(error);\n) rumpcalls - printf(\tif (error) {\n\t\trval[0] = -1;\n\t}\n) rumpcalls + printf(\tif (error) {\n) rumpcalls + printf(\t\t*(%s *)rval = (%s)-1;\n\t}\n, \ + returntype, returntype) rumpcalls } if (returntype != void) { - printf(\treturn rval[0];\n) rumpcalls + printf(\treturn *(%s *)rval;\n, returntype) rumpcalls } printf(}\n) rumpcalls printf(rsys_alias(%s%s,rump_enosys)\n, \
CVS commit: src/sys/rump
Module Name:src Committed By: pooka Date: Tue Feb 22 10:34:06 UTC 2011 Modified Files: src/sys/rump/include/rump: rump_syscalls.h src/sys/rump/librump/rumpkern: rump_syscalls.c Log Message: regen: cast rval to return type instead of just using rval[0] To generate a diff of this commit: cvs rdiff -u -r1.43 -r1.44 src/sys/rump/include/rump/rump_syscalls.h cvs rdiff -u -r1.65 -r1.66 src/sys/rump/librump/rumpkern/rump_syscalls.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/include/rump/rump_syscalls.h diff -u src/sys/rump/include/rump/rump_syscalls.h:1.43 src/sys/rump/include/rump/rump_syscalls.h:1.44 --- src/sys/rump/include/rump/rump_syscalls.h:1.43 Mon Feb 21 23:31:00 2011 +++ src/sys/rump/include/rump/rump_syscalls.h Tue Feb 22 10:34:06 2011 @@ -1,4 +1,4 @@ -/* $NetBSD: rump_syscalls.h,v 1.43 2011/02/21 23:31:00 pooka Exp $ */ +/* $NetBSD: rump_syscalls.h,v 1.44 2011/02/22 10:34:06 pooka Exp $ */ /* * System call protos in rump namespace. Index: src/sys/rump/librump/rumpkern/rump_syscalls.c diff -u src/sys/rump/librump/rumpkern/rump_syscalls.c:1.65 src/sys/rump/librump/rumpkern/rump_syscalls.c:1.66 --- src/sys/rump/librump/rumpkern/rump_syscalls.c:1.65 Mon Feb 21 23:31:00 2011 +++ src/sys/rump/librump/rumpkern/rump_syscalls.c Tue Feb 22 10:34:06 2011 @@ -1,4 +1,4 @@ -/* $NetBSD: rump_syscalls.c,v 1.65 2011/02/21 23:31:00 pooka Exp $ */ +/* $NetBSD: rump_syscalls.c,v 1.66 2011/02/22 10:34:06 pooka Exp $ */ /* * System call vector and marshalling for rump. @@ -8,7 +8,7 @@ */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: rump_syscalls.c,v 1.65 2011/02/21 23:31:00 pooka Exp $); +__KERNEL_RCSID(0, $NetBSD: rump_syscalls.c,v 1.66 2011/02/22 10:34:06 pooka Exp $); #include sys/param.h #include sys/fstypes.h @@ -80,9 +80,9 @@ error = rsys_syscall(SYS_read, callarg, sizeof(callarg), rval); rsys_seterrno(error); if (error) { - rval[0] = -1; + *(ssize_t *)rval = (ssize_t)-1; } - return rval[0]; + return *(ssize_t *)rval; } rsys_alias(sys_read,rump_enosys) @@ -101,9 +101,9 @@ error = rsys_syscall(SYS_write, callarg, sizeof(callarg), rval); rsys_seterrno(error); if (error) { - rval[0] = -1; + *(ssize_t *)rval = (ssize_t)-1; } - return rval[0]; + return *(ssize_t *)rval; } rsys_alias(sys_write,rump_enosys) @@ -122,9 +122,9 @@ error = rsys_syscall(SYS_open, callarg, sizeof(callarg), rval); rsys_seterrno(error); if (error) { - rval[0] = -1; + *(int *)rval = (int)-1; } - return rval[0]; + return *(int *)rval; } rsys_alias(sys_open,rump_enosys) @@ -141,9 +141,9 @@ error = rsys_syscall(SYS_close, callarg, sizeof(callarg), rval); rsys_seterrno(error); if (error) { - rval[0] = -1; + *(int *)rval = (int)-1; } - return rval[0]; + return *(int *)rval; } rsys_alias(sys_close,rump_enosys) @@ -161,9 +161,9 @@ error = rsys_syscall(SYS_link, callarg, sizeof(callarg), rval); rsys_seterrno(error); if (error) { - rval[0] = -1; + *(int *)rval = (int)-1; } - return rval[0]; + return *(int *)rval; } rsys_alias(sys_link,rump_enosys) @@ -180,9 +180,9 @@ error = rsys_syscall(SYS_unlink, callarg, sizeof(callarg), rval); rsys_seterrno(error); if (error) { - rval[0] = -1; + *(int *)rval = (int)-1; } - return rval[0]; + return *(int *)rval; } rsys_alias(sys_unlink,rump_enosys) @@ -199,9 +199,9 @@ error = rsys_syscall(SYS_chdir, callarg, sizeof(callarg), rval); rsys_seterrno(error); if (error) { - rval[0] = -1; + *(int *)rval = (int)-1; } - return rval[0]; + return *(int *)rval; } rsys_alias(sys_chdir,rump_enosys) @@ -218,9 +218,9 @@ error = rsys_syscall(SYS_fchdir, callarg, sizeof(callarg), rval); rsys_seterrno(error); if (error) { - rval[0] = -1; + *(int *)rval = (int)-1; } - return rval[0]; + return *(int *)rval; } rsys_alias(sys_fchdir,rump_enosys) @@ -239,9 +239,9 @@ error = rsys_syscall(SYS_compat_50_mknod, callarg, sizeof(callarg), rval); rsys_seterrno(error); if (error) { - rval[0] = -1; + *(int *)rval = (int)-1; } - return rval[0]; + return *(int *)rval; } rsys_alias(compat_50_sys_mknod,rump_enosys) @@ -259,9 +259,9 @@ error = rsys_syscall(SYS_chmod, callarg, sizeof(callarg), rval); rsys_seterrno(error); if (error) { - rval[0] = -1; + *(int *)rval = (int)-1; } - return rval[0]; + return *(int *)rval; } rsys_alias(sys_chmod,rump_enosys) @@ -280,9 +280,9 @@ error = rsys_syscall(SYS_chown, callarg, sizeof(callarg), rval); rsys_seterrno(error); if (error) { - rval[0] = -1; + *(int *)rval = (int)-1; } - return rval[0]; + return *(int *)rval; } rsys_alias(sys_chown,rump_enosys) @@ -293,7 +293,7 @@ register_t rval[2] = {0, 0}; rsys_syscall(SYS_getpid, NULL, 0, rval); - return rval[0]; + return *(pid_t *)rval; } rsys_alias(sys_getpid_with_ppid,rump_enosys) @@ -311,9 +311,9 @@ error = rsys_syscall(SYS_unmount, callarg,
CVS commit: src/tests/rump/rumpvfs
Module Name:src Committed By: pooka Date: Tue Feb 22 10:36:14 UTC 2011 Modified Files: src/tests/rump/rumpvfs: Makefile Added Files: src/tests/rump/rumpvfs: t_basic.c Log Message: test lseek return value (off_t, might be register_t) To generate a diff of this commit: cvs rdiff -u -r1.2 -r1.3 src/tests/rump/rumpvfs/Makefile cvs rdiff -u -r0 -r1.1 src/tests/rump/rumpvfs/t_basic.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/tests/rump/rumpvfs/Makefile diff -u src/tests/rump/rumpvfs/Makefile:1.2 src/tests/rump/rumpvfs/Makefile:1.3 --- src/tests/rump/rumpvfs/Makefile:1.2 Tue Nov 30 16:16:33 2010 +++ src/tests/rump/rumpvfs/Makefile Tue Feb 22 10:36:14 2011 @@ -1,10 +1,11 @@ -# $NetBSD: Makefile,v 1.2 2010/11/30 16:16:33 pooka Exp $ +# $NetBSD: Makefile,v 1.3 2011/02/22 10:36:14 pooka Exp $ .include bsd.own.mk TESTSDIR= ${TESTSBASE}/rump/rumpvfs -TESTS_C= t_etfs +TESTS_C= t_basic +TESTS_C+= t_etfs TESTS_C+= t_p2kifs LDADD= -lrumpvfs -lrump -lrumpuser -lpthread Added files: Index: src/tests/rump/rumpvfs/t_basic.c diff -u /dev/null src/tests/rump/rumpvfs/t_basic.c:1.1 --- /dev/null Tue Feb 22 10:36:14 2011 +++ src/tests/rump/rumpvfs/t_basic.c Tue Feb 22 10:36:13 2011 @@ -0,0 +1,78 @@ +/* $NetBSD: t_basic.c,v 1.1 2011/02/22 10:36:13 pooka Exp $ */ + +/*- + * Copyright (c) 2011 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. + */ + +#include sys/types.h +#include sys/mount.h +#include sys/sysctl.h + +#include rump/rump.h +#include rump/rump_syscalls.h + +#include atf-c.h +#include fcntl.h +#include stdio.h +#include stdlib.h +#include unistd.h + +#include ../../h_macros.h + +ATF_TC(lseekrv); +ATF_TC_HEAD(lseekrv, tc) +{ + + atf_tc_set_md_var(tc, descr, Test lseek return values); +} + +#define TESTFILE testi + +#define FIVE_MEGS (5*1024*1024) +#define FIVE_GIGS (5*1024*1024*1024LL) + +ATF_TC_BODY(lseekrv, tc) +{ + off_t rv; + int fd; + + RZ(rump_init()); + RL(fd = rump_sys_open(TESTFILE, O_RDWR | O_CREAT, 0777)); + + rv = rump_sys_lseek(fd, FIVE_MEGS, SEEK_SET); + ATF_REQUIRE_EQ(rv, FIVE_MEGS); + + rv = rump_sys_lseek(fd, FIVE_GIGS, SEEK_SET); + ATF_REQUIRE_EQ(rv, FIVE_GIGS); +} + +ATF_TP_ADD_TCS(tp) +{ + + ATF_TP_ADD_TC(tp, lseekrv); + + return atf_no_error(); +}
CVS commit: src/distrib/sets/lists/tests
Module Name:src Committed By: pooka Date: Tue Feb 22 10:37:05 UTC 2011 Modified Files: src/distrib/sets/lists/tests: mi Log Message: +tp To generate a diff of this commit: cvs rdiff -u -r1.251 -r1.252 src/distrib/sets/lists/tests/mi Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/distrib/sets/lists/tests/mi diff -u src/distrib/sets/lists/tests/mi:1.251 src/distrib/sets/lists/tests/mi:1.252 --- src/distrib/sets/lists/tests/mi:1.251 Sat Feb 19 13:21:05 2011 +++ src/distrib/sets/lists/tests/mi Tue Feb 22 10:37:05 2011 @@ -1,4 +1,4 @@ -# $NetBSD: mi,v 1.251 2011/02/19 13:21:05 pooka Exp $ +# $NetBSD: mi,v 1.252 2011/02/22 10:37:05 pooka Exp $ # # Note: don't delete entries from here - mark them as obsolete instead. # @@ -536,6 +536,7 @@ ./usr/libdata/debug/usr/tests/rump/rumpkern/h_server tests-syscall-debug ./usr/libdata/debug/usr/tests/rump/rumpkern/h_server/h_simpleserver.debug tests-syscall-debug debug,atf ./usr/libdata/debug/usr/tests/rump/rumpvfstests-syscall-debug +./usr/libdata/debug/usr/tests/rump/rumpvfs/t_basic.debug tests-syscall-debug debug,atf ./usr/libdata/debug/usr/tests/rump/rumpvfs/t_etfs.debug tests-syscall-debug debug,atf ./usr/libdata/debug/usr/tests/rump/rumpvfs/t_p2kifs.debug tests-syscall-debug debug,atf ./usr/libdata/debug/usr/tests/sbin tests-sbin-tests @@ -2003,6 +2004,7 @@ ./usr/tests/rump/rumpkern/h_server/h_simpleserver tests-rump-tests atf ./usr/tests/rump/rumpvfs tests-rump-tests ./usr/tests/rump/rumpvfs/Atffile tests-rump-tests atf +./usr/tests/rump/rumpvfs/t_basic tests-rump-tests atf ./usr/tests/rump/rumpvfs/t_etfs tests-rump-tests atf ./usr/tests/rump/rumpvfs/t_p2kifs tests-rump-tests atf ./usr/tests/sbintests-sbin-tests
CVS commit: src/external/bsd/iscsi
Module Name:src Committed By: sborrill Date: Tue Feb 22 12:56:50 UTC 2011 Modified Files: src/external/bsd/iscsi: mkdist Log Message: Skip .orig files To generate a diff of this commit: cvs rdiff -u -r1.1 -r1.2 src/external/bsd/iscsi/mkdist Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/external/bsd/iscsi/mkdist diff -u src/external/bsd/iscsi/mkdist:1.1 src/external/bsd/iscsi/mkdist:1.2 --- src/external/bsd/iscsi/mkdist:1.1 Thu Apr 15 18:21:29 2010 +++ src/external/bsd/iscsi/mkdist Tue Feb 22 12:56:50 2011 @@ -1,5 +1,5 @@ #! /bin/sh -# $NetBSD: mkdist,v 1.1 2010/04/15 18:21:29 sborrill Exp $ +# $NetBSD: mkdist,v 1.2 2011/02/22 12:56:50 sborrill Exp $ case $# in 0) @@ -22,6 +22,6 @@ tar --exclude CVS --exclude .libs \ --exclude autom4te.cache --exclude \*.lo \ --exclude \*.o --exclude \*.la \ ---exclude \*~ \ +--exclude \*~ --exclude \*.orig \ -cvzf netbsd-iscsi-$t.tar.gz netbsd-iscsi-$t mv netbsd-iscsi-$t dist
CVS commit: src/external/bsd/iscsi/dist
Module Name:src Committed By: sborrill Date: Tue Feb 22 13:00:06 UTC 2011 Modified Files: src/external/bsd/iscsi/dist: configure configure.ac src/external/bsd/iscsi/dist/include: config.h Log Message: Release 20110222 To generate a diff of this commit: cvs rdiff -u -r1.4 -r1.5 src/external/bsd/iscsi/dist/configure cvs rdiff -u -r1.5 -r1.6 src/external/bsd/iscsi/dist/configure.ac cvs rdiff -u -r1.2 -r1.3 src/external/bsd/iscsi/dist/include/config.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/external/bsd/iscsi/dist/configure diff -u src/external/bsd/iscsi/dist/configure:1.4 src/external/bsd/iscsi/dist/configure:1.5 --- src/external/bsd/iscsi/dist/configure:1.4 Mon Apr 19 08:09:02 2010 +++ src/external/bsd/iscsi/dist/configure Tue Feb 22 13:00:05 2011 @@ -1,6 +1,6 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.63 for netbsd-iscsi 20100416. +# Generated by GNU Autoconf 2.63 for netbsd-iscsi 20110222. # # Report bugs to Alistair Crooks a...@netbsd.org. # @@ -750,8 +750,8 @@ # Identity of this package. PACKAGE_NAME='netbsd-iscsi' PACKAGE_TARNAME='netbsd-iscsi' -PACKAGE_VERSION='20100416' -PACKAGE_STRING='netbsd-iscsi 20100416' +PACKAGE_VERSION='20110222' +PACKAGE_STRING='netbsd-iscsi 20110222' PACKAGE_BUGREPORT='Alistair Crooks a...@netbsd.org' ac_unique_file=src/lib/protocol.c @@ -1480,7 +1480,7 @@ # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat _ACEOF -\`configure' configures netbsd-iscsi 20100416 to adapt to many kinds of systems. +\`configure' configures netbsd-iscsi 20110222 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1550,7 +1550,7 @@ if test -n $ac_init_help; then case $ac_init_help in - short | recursive ) echo Configuration of netbsd-iscsi 20100416:;; + short | recursive ) echo Configuration of netbsd-iscsi 20110222:;; esac cat \_ACEOF @@ -1657,7 +1657,7 @@ test -n $ac_init_help exit $ac_status if $ac_init_version; then cat \_ACEOF -netbsd-iscsi configure 20100416 +netbsd-iscsi configure 20110222 generated by GNU Autoconf 2.63 Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, @@ -1671,7 +1671,7 @@ This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. -It was created by netbsd-iscsi $as_me 20100416, which was +It was created by netbsd-iscsi $as_me 20110222, which was generated by GNU Autoconf 2.63. Invocation command line was $ $0 $@ @@ -2556,7 +2556,7 @@ # Define the identity of the package. PACKAGE='netbsd-iscsi' - VERSION='20100416' + VERSION='20110222' cat confdefs.h _ACEOF @@ -23567,7 +23567,7 @@ # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log= -This file was extended by netbsd-iscsi $as_me 20100416, which was +This file was extended by netbsd-iscsi $as_me 20110222, which was generated by GNU Autoconf 2.63. Invocation command line was CONFIG_FILES= $CONFIG_FILES @@ -23630,7 +23630,7 @@ _ACEOF cat $CONFIG_STATUS _ACEOF || ac_write_fail=1 ac_cs_version=\\ -netbsd-iscsi config.status 20100416 +netbsd-iscsi config.status 20110222 configured by $0, generated by GNU Autoconf 2.63, with options \\`$as_echo $ac_configure_args | sed 's/^ //; s/[\\\`\$]//g'`\\ @@ -25024,7 +25024,7 @@ # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log= -This file was extended by netbsd-iscsi $as_me 20100416, which was +This file was extended by netbsd-iscsi $as_me 20110222, which was generated by GNU Autoconf 2.63. Invocation command line was CONFIG_FILES= $CONFIG_FILES @@ -25087,7 +25087,7 @@ _ACEOF cat $CONFIG_STATUS _ACEOF || ac_write_fail=1 ac_cs_version=\\ -netbsd-iscsi config.status 20100416 +netbsd-iscsi config.status 20110222 configured by $0, generated by GNU Autoconf 2.63, with options \\`$as_echo $ac_configure_args | sed 's/^ //; s/[\\\`\$]//g'`\\ @@ -26482,7 +26482,7 @@ # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log= -This file was extended by netbsd-iscsi $as_me 20100416, which was +This file was extended by netbsd-iscsi $as_me 20110222, which was generated by GNU Autoconf 2.63. Invocation command line was CONFIG_FILES= $CONFIG_FILES @@ -26545,7 +26545,7 @@ _ACEOF cat $CONFIG_STATUS _ACEOF || ac_write_fail=1 ac_cs_version=\\ -netbsd-iscsi config.status 20100416 +netbsd-iscsi config.status 20110222 configured by $0, generated by GNU Autoconf 2.63, with options \\`$as_echo $ac_configure_args | sed 's/^ //; s/[\\\`\$]//g'`\\ @@ -27941,7 +27941,7 @@ # report actual input values
CVS commit: src/sys/kern
Module Name:src Committed By: pooka Date: Tue Feb 22 13:04:22 UTC 2011 Modified Files: src/sys/kern: makesyscalls.sh Log Message: revert previous fix. it's not 100% correct and some compilers setups complain about the generated code. pointed out by mrg To generate a diff of this commit: cvs rdiff -u -r1.113 -r1.114 src/sys/kern/makesyscalls.sh 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/makesyscalls.sh diff -u src/sys/kern/makesyscalls.sh:1.113 src/sys/kern/makesyscalls.sh:1.114 --- src/sys/kern/makesyscalls.sh:1.113 Tue Feb 22 10:33:12 2011 +++ src/sys/kern/makesyscalls.sh Tue Feb 22 13:04:22 2011 @@ -1,5 +1,5 @@ #! /bin/sh - -# $NetBSD: makesyscalls.sh,v 1.113 2011/02/22 10:33:12 pooka Exp $ +# $NetBSD: makesyscalls.sh,v 1.114 2011/02/22 13:04:22 pooka Exp $ # # Copyright (c) 1994, 1996, 2000 Christopher G. Demetriou # All rights reserved. @@ -815,12 +815,10 @@ argarg, argsize) rumpcalls if (type != NOERR) { printf(\trsys_seterrno(error);\n) rumpcalls - printf(\tif (error) {\n) rumpcalls - printf(\t\t*(%s *)rval = (%s)-1;\n\t}\n, \ - returntype, returntype) rumpcalls + printf(\tif (error) {\n\t\trval[0] = -1;\n\t}\n) rumpcalls } if (returntype != void) { - printf(\treturn *(%s *)rval;\n, returntype) rumpcalls + printf(\treturn rval[0];\n) rumpcalls } printf(}\n) rumpcalls printf(rsys_alias(%s%s,rump_enosys)\n, \
CVS commit: src/external/bsd/iscsi/dist/src/initiator
Module Name:src Committed By: sborrill Date: Tue Feb 22 13:04:31 UTC 2011 Modified Files: src/external/bsd/iscsi/dist/src/initiator: iscsi-initiator.c Log Message: Retry read capacity. Device may not be ready on first access, so need to wait and re-issue. From Daisuke Aoyama (author of istgt). To generate a diff of this commit: cvs rdiff -u -r1.6 -r1.7 \ src/external/bsd/iscsi/dist/src/initiator/iscsi-initiator.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/bsd/iscsi/dist/src/initiator/iscsi-initiator.c diff -u src/external/bsd/iscsi/dist/src/initiator/iscsi-initiator.c:1.6 src/external/bsd/iscsi/dist/src/initiator/iscsi-initiator.c:1.7 --- src/external/bsd/iscsi/dist/src/initiator/iscsi-initiator.c:1.6 Mon Feb 21 17:48:43 2011 +++ src/external/bsd/iscsi/dist/src/initiator/iscsi-initiator.c Tue Feb 22 13:04:31 2011 @@ -701,8 +701,22 @@ } /* stuff size into st.st_size */ - (void) read_capacity(u, 0, lbac, blocksize); - sti.st.st_size = ((uint64_t)lbac + 1) * blocksize; + { + int retry = 5; + while (retry 0) { +if (read_capacity(u, 0, lbac, blocksize) == 0) + break; +retry--; +iscsi_warn(__FILE__, __LINE__, +read_capacity failed - retrying %d\n, retry); +sleep(1); + } + if (retry == 0) { +iscsi_err(__FILE__, __LINE__, read_capacity failed - giving up\n); +break; + } + } + sti.st.st_size = (off_t)(((uint64_t)lbac + 1) * blocksize); sti.target = u; tv.v[tv.c].host = strdup(tinfo.name);
CVS commit: src/sys/rump
Module Name:src Committed By: pooka Date: Tue Feb 22 13:05:07 UTC 2011 Modified Files: src/sys/rump/include/rump: rump_syscalls.h src/sys/rump/librump/rumpkern: rump_syscalls.c Log Message: unregen To generate a diff of this commit: cvs rdiff -u -r1.44 -r1.45 src/sys/rump/include/rump/rump_syscalls.h cvs rdiff -u -r1.66 -r1.67 src/sys/rump/librump/rumpkern/rump_syscalls.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/include/rump/rump_syscalls.h diff -u src/sys/rump/include/rump/rump_syscalls.h:1.44 src/sys/rump/include/rump/rump_syscalls.h:1.45 --- src/sys/rump/include/rump/rump_syscalls.h:1.44 Tue Feb 22 10:34:06 2011 +++ src/sys/rump/include/rump/rump_syscalls.h Tue Feb 22 13:05:07 2011 @@ -1,4 +1,4 @@ -/* $NetBSD: rump_syscalls.h,v 1.44 2011/02/22 10:34:06 pooka Exp $ */ +/* $NetBSD: rump_syscalls.h,v 1.45 2011/02/22 13:05:07 pooka Exp $ */ /* * System call protos in rump namespace. Index: src/sys/rump/librump/rumpkern/rump_syscalls.c diff -u src/sys/rump/librump/rumpkern/rump_syscalls.c:1.66 src/sys/rump/librump/rumpkern/rump_syscalls.c:1.67 --- src/sys/rump/librump/rumpkern/rump_syscalls.c:1.66 Tue Feb 22 10:34:06 2011 +++ src/sys/rump/librump/rumpkern/rump_syscalls.c Tue Feb 22 13:05:07 2011 @@ -1,4 +1,4 @@ -/* $NetBSD: rump_syscalls.c,v 1.66 2011/02/22 10:34:06 pooka Exp $ */ +/* $NetBSD: rump_syscalls.c,v 1.67 2011/02/22 13:05:07 pooka Exp $ */ /* * System call vector and marshalling for rump. @@ -8,7 +8,7 @@ */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: rump_syscalls.c,v 1.66 2011/02/22 10:34:06 pooka Exp $); +__KERNEL_RCSID(0, $NetBSD: rump_syscalls.c,v 1.67 2011/02/22 13:05:07 pooka Exp $); #include sys/param.h #include sys/fstypes.h @@ -80,9 +80,9 @@ error = rsys_syscall(SYS_read, callarg, sizeof(callarg), rval); rsys_seterrno(error); if (error) { - *(ssize_t *)rval = (ssize_t)-1; + rval[0] = -1; } - return *(ssize_t *)rval; + return rval[0]; } rsys_alias(sys_read,rump_enosys) @@ -101,9 +101,9 @@ error = rsys_syscall(SYS_write, callarg, sizeof(callarg), rval); rsys_seterrno(error); if (error) { - *(ssize_t *)rval = (ssize_t)-1; + rval[0] = -1; } - return *(ssize_t *)rval; + return rval[0]; } rsys_alias(sys_write,rump_enosys) @@ -122,9 +122,9 @@ error = rsys_syscall(SYS_open, callarg, sizeof(callarg), rval); rsys_seterrno(error); if (error) { - *(int *)rval = (int)-1; + rval[0] = -1; } - return *(int *)rval; + return rval[0]; } rsys_alias(sys_open,rump_enosys) @@ -141,9 +141,9 @@ error = rsys_syscall(SYS_close, callarg, sizeof(callarg), rval); rsys_seterrno(error); if (error) { - *(int *)rval = (int)-1; + rval[0] = -1; } - return *(int *)rval; + return rval[0]; } rsys_alias(sys_close,rump_enosys) @@ -161,9 +161,9 @@ error = rsys_syscall(SYS_link, callarg, sizeof(callarg), rval); rsys_seterrno(error); if (error) { - *(int *)rval = (int)-1; + rval[0] = -1; } - return *(int *)rval; + return rval[0]; } rsys_alias(sys_link,rump_enosys) @@ -180,9 +180,9 @@ error = rsys_syscall(SYS_unlink, callarg, sizeof(callarg), rval); rsys_seterrno(error); if (error) { - *(int *)rval = (int)-1; + rval[0] = -1; } - return *(int *)rval; + return rval[0]; } rsys_alias(sys_unlink,rump_enosys) @@ -199,9 +199,9 @@ error = rsys_syscall(SYS_chdir, callarg, sizeof(callarg), rval); rsys_seterrno(error); if (error) { - *(int *)rval = (int)-1; + rval[0] = -1; } - return *(int *)rval; + return rval[0]; } rsys_alias(sys_chdir,rump_enosys) @@ -218,9 +218,9 @@ error = rsys_syscall(SYS_fchdir, callarg, sizeof(callarg), rval); rsys_seterrno(error); if (error) { - *(int *)rval = (int)-1; + rval[0] = -1; } - return *(int *)rval; + return rval[0]; } rsys_alias(sys_fchdir,rump_enosys) @@ -239,9 +239,9 @@ error = rsys_syscall(SYS_compat_50_mknod, callarg, sizeof(callarg), rval); rsys_seterrno(error); if (error) { - *(int *)rval = (int)-1; + rval[0] = -1; } - return *(int *)rval; + return rval[0]; } rsys_alias(compat_50_sys_mknod,rump_enosys) @@ -259,9 +259,9 @@ error = rsys_syscall(SYS_chmod, callarg, sizeof(callarg), rval); rsys_seterrno(error); if (error) { - *(int *)rval = (int)-1; + rval[0] = -1; } - return *(int *)rval; + return rval[0]; } rsys_alias(sys_chmod,rump_enosys) @@ -280,9 +280,9 @@ error = rsys_syscall(SYS_chown, callarg, sizeof(callarg), rval); rsys_seterrno(error); if (error) { - *(int *)rval = (int)-1; + rval[0] = -1; } - return *(int *)rval; + return rval[0]; } rsys_alias(sys_chown,rump_enosys) @@ -293,7 +293,7 @@ register_t rval[2] = {0, 0}; rsys_syscall(SYS_getpid, NULL, 0, rval); - return *(pid_t *)rval; + return rval[0]; } rsys_alias(sys_getpid_with_ppid,rump_enosys) @@ -311,9 +311,9 @@ error = rsys_syscall(SYS_unmount, callarg, sizeof(callarg), rval); rsys_seterrno(error); if
CVS commit: src/external/bsd/iscsi/dist/src/lib
Module Name:src Committed By: sborrill Date: Tue Feb 22 13:10:55 UTC 2011 Modified Files: src/external/bsd/iscsi/dist/src/lib: initiator.c protocol.c Log Message: Skip target if TargetName is empty. Use relevant TargetAddress, not just first one we happen to find. Following improvement based on feedback from Daisuke Aoyama (author of istgt): Handle NOP-OUT CmdSN and immediate bit. Handle NOP-IN TransferTag=0x. Interim solution for dealing with Underflow bit in iSCSI response. iscsi-initiator now talks to istgt and other targets. Remaining issues: CHAP support will not work with most targets (maximum 16 octet challenge is used, but other initiators use up to 1024). However, CHAP can now be bypassed by not specifying a username. To generate a diff of this commit: cvs rdiff -u -r1.4 -r1.5 src/external/bsd/iscsi/dist/src/lib/initiator.c cvs rdiff -u -r1.1 -r1.2 src/external/bsd/iscsi/dist/src/lib/protocol.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/bsd/iscsi/dist/src/lib/initiator.c diff -u src/external/bsd/iscsi/dist/src/lib/initiator.c:1.4 src/external/bsd/iscsi/dist/src/lib/initiator.c:1.5 --- src/external/bsd/iscsi/dist/src/lib/initiator.c:1.4 Mon Feb 21 17:48:43 2011 +++ src/external/bsd/iscsi/dist/src/lib/initiator.c Tue Feb 22 13:10:55 2011 @@ -630,6 +630,7 @@ iscsi_parameter_t *ip; char *text = NULL; int text_len = 0; +int pos = 0; if ((text = iscsi_malloc_atomic(DISCOVERY_PHASE_TEXT_LEN)) == NULL) { iscsi_err(__FILE__, __LINE__, iscsi_malloc_atomic() failed\n); @@ -651,13 +652,23 @@ } for (ip = sess-params ; ip ; ip = ip-next) { if (strcmp(ip-key, TargetName) == 0) { -for (vp = ip-value_l ; vp ; vp = vp-next) { + pos = 0; +for (vp = ip-value_l ; vp ; vp = vp-next, pos++) { + /* + * Skip items which have no name, + * these have been blocked by the target + */ + if (!strlen(vp-value)) + continue; + ALLOC(char *, svp-v, svp-size, svp-c, 10, 10, igt, return -1); svp-v[svp-c++] = strdup(vp-value); ALLOC(char *, svp-v, svp-size, svp-c, 10, 10, igt2, return -1); -svp-v[svp-c++] = strdup(param_val(sess-params, TargetAddress)); +svp-v[svp-c++] = + strdup(param_val_which(sess-params, + TargetAddress, pos)); } } } @@ -2466,7 +2477,8 @@ /* Encapsulate and send NOP */ nop_out-ExpStatSN = sess-ExpStatSN; - /* nop_out-CmdSN = sess-CmdSN++; */ + nop_out-immediate = 1; + nop_out-CmdSN = sess-CmdSN; nop_out-transfer_tag = 0x; if (iscsi_nop_out_encap(header, nop_out) != 0) { iscsi_err(__FILE__, __LINE__, iscsi_nop_out_encap() failed\n); @@ -2901,6 +2913,16 @@ iscsi_err(__FILE__, __LINE__, iscsi_nop_in() failed\n); return -1; } + if (nop_in.transfer_tag == 0x) { + if (nop_in.length != 0) { + iscsi_err(__FILE__, __LINE__, +nop_in.length %u not 0\n, +nop_in.length); + NO_CLEANUP; + return -1; + } + return 0; + } if (cmd) { #if 0 RETURN_NOT_EQUAL(nop_in.length, nop_in.length, nop_out-length, NO_CLEANUP, -1); @@ -3400,12 +3422,14 @@ errmsg = NULL; if (data.overflow != 0) { errmsg = Overflow bit; - } else if (data.underflow != 0) { - errmsg = Underflow bit; } else if (data.task_tag != scsi_cmd-tag) { errmsg = Tag; - } else if (data.task_tag != scsi_cmd-tag) { - errmsg = Residual Count; + } else if (!data.underflow) { + if (data.res_count != 0) { + errmsg = Residual Count; + } + } else { + iscsi_warn(__FILE__, __LINE__, Underflow %s\n, data.res_count); } if (errmsg) { iscsi_err(__FILE__, __LINE__, errmsg); Index: src/external/bsd/iscsi/dist/src/lib/protocol.c diff -u src/external/bsd/iscsi/dist/src/lib/protocol.c:1.1 src/external/bsd/iscsi/dist/src/lib/protocol.c:1.2 --- src/external/bsd/iscsi/dist/src/lib/protocol.c:1.1 Tue Jun 30 02:44:52 2009 +++ src/external/bsd/iscsi/dist/src/lib/protocol.c Tue Feb 22 13:10:55 2011 @@ -1457,7 +1457,7 @@ errmsg = Byte 4; } else if (memcmp(header + 8, zeros, 8) != 0) { errmsg = Bytes 8-15; - } else if (memcmp(header + 44, zeros, 4) != 0) { + } else if (!cmd-underflow memcmp(header + 44, zeros, 4) != 0) { errmsg = Bytes 44-47; } if (errmsg) {
CVS commit: src/external/bsd/iscsi/dist/src/initiator
Module Name:src Committed By: sborrill Date: Tue Feb 22 13:17:20 UTC 2011 Modified Files: src/external/bsd/iscsi/dist/src/initiator: iscsi-initiator.8 Log Message: Note limitations of CHAP implementation in BUGS section. To generate a diff of this commit: cvs rdiff -u -r1.5 -r1.6 \ src/external/bsd/iscsi/dist/src/initiator/iscsi-initiator.8 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/external/bsd/iscsi/dist/src/initiator/iscsi-initiator.8 diff -u src/external/bsd/iscsi/dist/src/initiator/iscsi-initiator.8:1.5 src/external/bsd/iscsi/dist/src/initiator/iscsi-initiator.8:1.6 --- src/external/bsd/iscsi/dist/src/initiator/iscsi-initiator.8:1.5 Tue Feb 22 10:34:12 2011 +++ src/external/bsd/iscsi/dist/src/initiator/iscsi-initiator.8 Tue Feb 22 13:17:20 2011 @@ -1,4 +1,4 @@ -.\ $NetBSD: iscsi-initiator.8,v 1.5 2011/02/22 10:34:12 sborrill Exp $ +.\ $NetBSD: iscsi-initiator.8,v 1.6 2011/02/22 13:17:20 sborrill Exp $ .\ .\ Copyright © 2007 Alistair Crooks. All rights reserved. .\ @@ -150,3 +150,13 @@ utility was written by .An Alistair Crooks .Aq a...@netbsd.org . +.Sh BUGS +.Nm +currently only supports a CHAP challenge length of 16 octets. +Other initiators support up to 1024 and thus it is expected that most targets +will also support such lengths. +This means that CHAP compatibility with other targets apart from +.Xr iscsi-target 8 +is likely to be poor. +To workaround this, please use authentication type none by not specifying a +username with the -u option.
CVS commit: src/tests/rump/rumpvfs
Module Name:src Committed By: pooka Date: Tue Feb 22 13:25:18 UTC 2011 Modified Files: src/tests/rump/rumpvfs: t_basic.c Log Message: One more lseek test case: in case of an error, check rv == -1 (so that it's not e.g UINT_MAX). To generate a diff of this commit: cvs rdiff -u -r1.1 -r1.2 src/tests/rump/rumpvfs/t_basic.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/tests/rump/rumpvfs/t_basic.c diff -u src/tests/rump/rumpvfs/t_basic.c:1.1 src/tests/rump/rumpvfs/t_basic.c:1.2 --- src/tests/rump/rumpvfs/t_basic.c:1.1 Tue Feb 22 10:36:13 2011 +++ src/tests/rump/rumpvfs/t_basic.c Tue Feb 22 13:25:18 2011 @@ -1,4 +1,4 @@ -/* $NetBSD: t_basic.c,v 1.1 2011/02/22 10:36:13 pooka Exp $ */ +/* $NetBSD: t_basic.c,v 1.2 2011/02/22 13:25:18 pooka Exp $ */ /*- * Copyright (c) 2011 The NetBSD Foundation, Inc. @@ -62,6 +62,9 @@ RZ(rump_init()); RL(fd = rump_sys_open(TESTFILE, O_RDWR | O_CREAT, 0777)); + rv = rump_sys_lseek(37, FIVE_MEGS, SEEK_SET); + ATF_REQUIRE_ERRNO(EBADF, rv == -1); + rv = rump_sys_lseek(fd, FIVE_MEGS, SEEK_SET); ATF_REQUIRE_EQ(rv, FIVE_MEGS);
CVS commit: src/lib/librumpclient
Module Name:src Committed By: pooka Date: Tue Feb 22 14:02:55 UTC 2011 Modified Files: src/lib/librumpclient: Makefile Log Message: Disable string aliasing for rump_syscalls.c. I can't figure out how to otherwise make the kernel's register_t coreography to work with the return value here in a MI fashion. To generate a diff of this commit: cvs rdiff -u -r1.3 -r1.4 src/lib/librumpclient/Makefile Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/lib/librumpclient/Makefile diff -u src/lib/librumpclient/Makefile:1.3 src/lib/librumpclient/Makefile:1.4 --- src/lib/librumpclient/Makefile:1.3 Wed Feb 16 23:45:40 2011 +++ src/lib/librumpclient/Makefile Tue Feb 22 14:02:54 2011 @@ -1,7 +1,8 @@ -# $NetBSD: Makefile,v 1.3 2011/02/16 23:45:40 pooka Exp $ +# $NetBSD: Makefile,v 1.4 2011/02/22 14:02:54 pooka Exp $ # .PATH: ${.CURDIR}/../../sys/rump/librump/rumpkern +NOLINT= # syscalls are evil LIB= rumpclient USE_SHLIBDIR= yes @@ -16,4 +17,6 @@ SRCS= rumpclient.c SRCS+= rump_syscalls.c +COPTS.rump_syscalls.c+= -fno-strict-aliasing + .include bsd.lib.mk
CVS commit: src/sys/rump
Module Name:src Committed By: pooka Date: Tue Feb 22 14:09:35 UTC 2011 Modified Files: src/sys/rump/include/rump: rump_syscalls.h src/sys/rump/librump/rumpkern: rump_syscalls.c Log Message: omstart To generate a diff of this commit: cvs rdiff -u -r1.46 -r1.47 src/sys/rump/include/rump/rump_syscalls.h cvs rdiff -u -r1.68 -r1.69 src/sys/rump/librump/rumpkern/rump_syscalls.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/include/rump/rump_syscalls.h diff -u src/sys/rump/include/rump/rump_syscalls.h:1.46 src/sys/rump/include/rump/rump_syscalls.h:1.47 --- src/sys/rump/include/rump/rump_syscalls.h:1.46 Tue Feb 22 14:06:30 2011 +++ src/sys/rump/include/rump/rump_syscalls.h Tue Feb 22 14:09:35 2011 @@ -1,4 +1,4 @@ -/* $NetBSD: rump_syscalls.h,v 1.46 2011/02/22 14:06:30 pooka Exp $ */ +/* $NetBSD: rump_syscalls.h,v 1.47 2011/02/22 14:09:35 pooka Exp $ */ /* * System call protos in rump namespace. Index: src/sys/rump/librump/rumpkern/rump_syscalls.c diff -u src/sys/rump/librump/rumpkern/rump_syscalls.c:1.68 src/sys/rump/librump/rumpkern/rump_syscalls.c:1.69 --- src/sys/rump/librump/rumpkern/rump_syscalls.c:1.68 Tue Feb 22 14:06:29 2011 +++ src/sys/rump/librump/rumpkern/rump_syscalls.c Tue Feb 22 14:09:35 2011 @@ -1,4 +1,4 @@ -/* $NetBSD: rump_syscalls.c,v 1.68 2011/02/22 14:06:29 pooka Exp $ */ +/* $NetBSD: rump_syscalls.c,v 1.69 2011/02/22 14:09:35 pooka Exp $ */ /* * System call vector and marshalling for rump. @@ -8,7 +8,7 @@ */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: rump_syscalls.c,v 1.68 2011/02/22 14:06:29 pooka Exp $); +__KERNEL_RCSID(0, $NetBSD: rump_syscalls.c,v 1.69 2011/02/22 14:09:35 pooka Exp $); #include sys/param.h #include sys/fstypes.h @@ -84,7 +84,7 @@ if (sizeof(ssize_t) sizeof(register_t)) rv = *(ssize_t *)retval; else - rv = (ssize_t)*retval; + rv = *retval; } return rv; } @@ -109,7 +109,7 @@ if (sizeof(ssize_t) sizeof(register_t)) rv = *(ssize_t *)retval; else - rv = (ssize_t)*retval; + rv = *retval; } return rv; } @@ -134,7 +134,7 @@ if (sizeof(int) sizeof(register_t)) rv = *(int *)retval; else - rv = (int)*retval; + rv = *retval; } return rv; } @@ -157,7 +157,7 @@ if (sizeof(int) sizeof(register_t)) rv = *(int *)retval; else - rv = (int)*retval; + rv = *retval; } return rv; } @@ -181,7 +181,7 @@ if (sizeof(int) sizeof(register_t)) rv = *(int *)retval; else - rv = (int)*retval; + rv = *retval; } return rv; } @@ -204,7 +204,7 @@ if (sizeof(int) sizeof(register_t)) rv = *(int *)retval; else - rv = (int)*retval; + rv = *retval; } return rv; } @@ -227,7 +227,7 @@ if (sizeof(int) sizeof(register_t)) rv = *(int *)retval; else - rv = (int)*retval; + rv = *retval; } return rv; } @@ -250,7 +250,7 @@ if (sizeof(int) sizeof(register_t)) rv = *(int *)retval; else - rv = (int)*retval; + rv = *retval; } return rv; } @@ -275,7 +275,7 @@ if (sizeof(int) sizeof(register_t)) rv = *(int *)retval; else - rv = (int)*retval; + rv = *retval; } return rv; } @@ -299,7 +299,7 @@ if (sizeof(int) sizeof(register_t)) rv = *(int *)retval; else - rv = (int)*retval; + rv = *retval; } return rv; } @@ -324,7 +324,7 @@ if (sizeof(int) sizeof(register_t)) rv = *(int *)retval; else - rv = (int)*retval; + rv = *retval; } return rv; } @@ -341,7 +341,7 @@ if (sizeof(pid_t) sizeof(register_t)) rv = *(pid_t *)retval; else - rv = (pid_t)*retval; + rv = *retval; return rv; } rsys_alias(sys_getpid_with_ppid,rump_enosys) @@ -364,7 +364,7 @@ if (sizeof(int) sizeof(register_t)) rv = *(int *)retval; else - rv = (int)*retval; + rv = *retval; } return rv; } @@ -387,7 +387,7 @@ if (sizeof(int) sizeof(register_t)) rv = *(int *)retval; else - rv = (int)*retval; + rv = *retval; } return rv; } @@ -404,7 +404,7 @@ if (sizeof(uid_t) sizeof(register_t)) rv = *(uid_t *)retval; else - rv = (uid_t)*retval; + rv = *retval; return rv; } rsys_alias(sys_getuid_with_euid,rump_enosys) @@ -420,7 +420,7 @@ if (sizeof(uid_t) sizeof(register_t)) rv = *(uid_t *)retval; else - rv = (uid_t)*retval; + rv = *retval; return rv; } rsys_alias(sys_geteuid,rump_enosys) @@ -444,7 +444,7 @@ if (sizeof(ssize_t) sizeof(register_t)) rv = *(ssize_t *)retval; else - rv = (ssize_t)*retval; + rv = *retval; } return rv; } @@ -469,7 +469,7 @@ if (sizeof(ssize_t) sizeof(register_t)) rv = *(ssize_t *)retval; else - rv = (ssize_t)*retval; + rv = *retval; } return rv; } @@ -497,7 +497,7 @@ if (sizeof(ssize_t) sizeof(register_t)) rv = *(ssize_t *)retval; else - rv = (ssize_t)*retval; + rv = *retval; } return rv; } @@ -522,7 +522,7 @@ if (sizeof(int)
CVS commit: src/sys/kern
Module Name:src Committed By: pooka Date: Tue Feb 22 14:05:20 UTC 2011 Modified Files: src/sys/kern: makesyscalls.sh Log Message: Redo the register_t casting, but include a provision to make the case where sizeof(rv) sizeof(register_t) work. Hopefully it works now everywhere. Only tests will show ... To generate a diff of this commit: cvs rdiff -u -r1.114 -r1.115 src/sys/kern/makesyscalls.sh 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/makesyscalls.sh diff -u src/sys/kern/makesyscalls.sh:1.114 src/sys/kern/makesyscalls.sh:1.115 --- src/sys/kern/makesyscalls.sh:1.114 Tue Feb 22 13:04:22 2011 +++ src/sys/kern/makesyscalls.sh Tue Feb 22 14:05:20 2011 @@ -1,5 +1,5 @@ #! /bin/sh - -# $NetBSD: makesyscalls.sh,v 1.114 2011/02/22 13:04:22 pooka Exp $ +# $NetBSD: makesyscalls.sh,v 1.115 2011/02/22 14:05:20 pooka Exp $ # # Copyright (c) 1994, 1996, 2000 Christopher G. Demetriou # All rights reserved. @@ -777,9 +777,14 @@ } printf(%s %s)\n, uncompattype(argtype[argc]), argname[argc]) \ rumpcalls - printf({\n\tregister_t rval[2] = {0, 0};\n) rumpcalls - if (returntype != void type != NOERR) - printf(\tint error = 0;\n) rumpcalls + printf({\n\tregister_t retval[2] = {0, 0};\n) rumpcalls + if (returntype != void) { + if (type != NOERR) { + printf(\tint error = 0;\n) rumpcalls + } + # assume rumpcalls return only integral types + printf(\t%s rv = -1;\n, returntype) rumpcalls + } argarg = NULL argsize = 0; @@ -811,14 +816,27 @@ if (returntype != void type != NOERR) printf(error = ) rumpcalls printf(rsys_syscall(%s%s%s, \ - %s, %s, rval);\n, constprefix, compatwrap_, funcalias, \ + %s, %s, retval);\n, constprefix, compatwrap_, funcalias, \ argarg, argsize) rumpcalls if (type != NOERR) { printf(\trsys_seterrno(error);\n) rumpcalls - printf(\tif (error) {\n\t\trval[0] = -1;\n\t}\n) rumpcalls + printf(\tif (error == 0) {\n) rumpcalls + indent=\t\t + ending=\t}\n + } else { + indent=\t + ending= } if (returntype != void) { - printf(\treturn rval[0];\n) rumpcalls + printf(%sif (sizeof(%s) sizeof(register_t))\n, \ + indent, returntype) rumpcalls + printf(%s\trv = *(%s *)retval;\n, \ + indent, returntype) rumpcalls + printf(%selse\n, indent, indent) rumpcalls + printf(%s\trv = (%s)*retval;\n, \ + indent, returntype) rumpcalls + printf(%s, ending) rumpcalls + printf(\treturn rv;\n) rumpcalls } printf(}\n) rumpcalls printf(rsys_alias(%s%s,rump_enosys)\n, \ @@ -873,19 +891,19 @@ exit 1 } END { - # output pipe() syscall with its special rval[2] handling + # output pipe() syscall with its special retval[2] handling if (rumphaspipe) { printf(int rump_sys_pipe(int *);\n) rumpprotos printf(\nint rump_sys_pipe(int *);\n) rumpcalls printf(int\nrump_sys_pipe(int *fd)\n{\n) rumpcalls - printf(\tregister_t rval[2] = {0, 0};\n) rumpcalls + printf(\tregister_t retval[2] = {0, 0};\n) rumpcalls printf(\tint error = 0;\n) rumpcalls printf(\n\terror = rsys_syscall(SYS_pipe, ) rumpcalls - printf(NULL, 0, rval);\n) rumpcalls + printf(NULL, 0, retval);\n) rumpcalls printf(\tif (error) {\n) rumpcalls printf(\t\trsys_seterrno(error);\n) rumpcalls - printf(\t} else {\n\t\tfd[0] = rval[0];\n) rumpcalls - printf(\t\tfd[1] = rval[1];\n\t}\n) rumpcalls + printf(\t} else {\n\t\tfd[0] = retval[0];\n) rumpcalls + printf(\t\tfd[1] = retval[1];\n\t}\n) rumpcalls printf(\treturn error ? -1 : 0;\n}\n) rumpcalls }
CVS commit: src/sys/kern
Module Name:src Committed By: pooka Date: Tue Feb 22 14:08:58 UTC 2011 Modified Files: src/sys/kern: makesyscalls.sh Log Message: Get rid of one explicit typecast in previous and let the compiler figure it out. To generate a diff of this commit: cvs rdiff -u -r1.115 -r1.116 src/sys/kern/makesyscalls.sh 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/makesyscalls.sh diff -u src/sys/kern/makesyscalls.sh:1.115 src/sys/kern/makesyscalls.sh:1.116 --- src/sys/kern/makesyscalls.sh:1.115 Tue Feb 22 14:05:20 2011 +++ src/sys/kern/makesyscalls.sh Tue Feb 22 14:08:58 2011 @@ -1,5 +1,5 @@ #! /bin/sh - -# $NetBSD: makesyscalls.sh,v 1.115 2011/02/22 14:05:20 pooka Exp $ +# $NetBSD: makesyscalls.sh,v 1.116 2011/02/22 14:08:58 pooka Exp $ # # Copyright (c) 1994, 1996, 2000 Christopher G. Demetriou # All rights reserved. @@ -833,8 +833,7 @@ printf(%s\trv = *(%s *)retval;\n, \ indent, returntype) rumpcalls printf(%selse\n, indent, indent) rumpcalls - printf(%s\trv = (%s)*retval;\n, \ - indent, returntype) rumpcalls + printf(%s\trv = *retval;\n, indent, returntype) rumpcalls printf(%s, ending) rumpcalls printf(\treturn rv;\n) rumpcalls }
CVS commit: src/external/bsd/iscsi/dist/src/initiator
Module Name:src Committed By: wiz Date: Tue Feb 22 14:23:37 UTC 2011 Modified Files: src/external/bsd/iscsi/dist/src/initiator: iscsi-initiator.8 Log Message: Markup fix. To generate a diff of this commit: cvs rdiff -u -r1.6 -r1.7 \ src/external/bsd/iscsi/dist/src/initiator/iscsi-initiator.8 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/external/bsd/iscsi/dist/src/initiator/iscsi-initiator.8 diff -u src/external/bsd/iscsi/dist/src/initiator/iscsi-initiator.8:1.6 src/external/bsd/iscsi/dist/src/initiator/iscsi-initiator.8:1.7 --- src/external/bsd/iscsi/dist/src/initiator/iscsi-initiator.8:1.6 Tue Feb 22 13:17:20 2011 +++ src/external/bsd/iscsi/dist/src/initiator/iscsi-initiator.8 Tue Feb 22 14:23:37 2011 @@ -1,4 +1,4 @@ -.\ $NetBSD: iscsi-initiator.8,v 1.6 2011/02/22 13:17:20 sborrill Exp $ +.\ $NetBSD: iscsi-initiator.8,v 1.7 2011/02/22 14:23:37 wiz Exp $ .\ .\ Copyright © 2007 Alistair Crooks. All rights reserved. .\ @@ -159,4 +159,6 @@ .Xr iscsi-target 8 is likely to be poor. To workaround this, please use authentication type none by not specifying a -username with the -u option. +username with the +.Fl u +option.
CVS commit: src/usr.bin/touch
Module Name:src Committed By: pooka Date: Tue Feb 22 15:03:30 UTC 2011 Modified Files: src/usr.bin/touch: touch.1 touch.c Log Message: -f no longer has effect. from Snader_LB on irc. To generate a diff of this commit: cvs rdiff -u -r1.16 -r1.17 src/usr.bin/touch/touch.1 cvs rdiff -u -r1.28 -r1.29 src/usr.bin/touch/touch.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/touch/touch.1 diff -u src/usr.bin/touch/touch.1:1.16 src/usr.bin/touch/touch.1:1.17 --- src/usr.bin/touch/touch.1:1.16 Thu Aug 7 11:16:44 2003 +++ src/usr.bin/touch/touch.1 Tue Feb 22 15:03:30 2011 @@ -1,4 +1,4 @@ -.\ $NetBSD: touch.1,v 1.16 2003/08/07 11:16:44 agc Exp $ +.\ $NetBSD: touch.1,v 1.17 2011/02/22 15:03:30 pooka Exp $ .\ .\ Copyright (c) 1991, 1993 .\ The Regents of the University of California. All rights reserved. @@ -32,7 +32,7 @@ .\ .\ @(#)touch.1 8.3 (Berkeley) 4/28/95 .\ -.Dd April 28, 1995 +.Dd February 22, 2011 .Dt TOUCH 1 .Os .Sh NAME @@ -65,8 +65,7 @@ utility does not treat this as an error. No error messages are displayed and the exit value is not affected. .It Fl f -Attempt to force the update, even if the file permissions do not -currently permit it. +This flag has no effect; it is accepted for compatibility reasons. .It Fl h If .Ar file Index: src/usr.bin/touch/touch.c diff -u src/usr.bin/touch/touch.c:1.28 src/usr.bin/touch/touch.c:1.29 --- src/usr.bin/touch/touch.c:1.28 Tue Apr 28 02:47:12 2009 +++ src/usr.bin/touch/touch.c Tue Feb 22 15:03:30 2011 @@ -1,4 +1,4 @@ -/* $NetBSD: touch.c,v 1.28 2009/04/28 02:47:12 yamt Exp $ */ +/* $NetBSD: touch.c,v 1.29 2011/02/22 15:03:30 pooka Exp $ */ /* * Copyright (c) 1993 @@ -39,7 +39,7 @@ #if 0 static char sccsid[] = @(#)touch.c 8.2 (Berkeley) 4/28/95; #endif -__RCSID($NetBSD: touch.c,v 1.28 2009/04/28 02:47:12 yamt Exp $); +__RCSID($NetBSD: touch.c,v 1.29 2011/02/22 15:03:30 pooka Exp $); #endif /* not lint */ #include sys/types.h @@ -71,14 +71,14 @@ { struct stat sb; struct timeval tv[2]; - int aflag, cflag, fflag, hflag, mflag, ch, fd, len, rval, timeset; + int aflag, cflag, hflag, mflag, ch, fd, len, rval, timeset; char *p; int (*change_file_times) __P((const char *, const struct timeval *)); int (*get_file_status) __P((const char *, struct stat *)); setlocale(LC_ALL, ); - aflag = cflag = fflag = hflag = mflag = timeset = 0; + aflag = cflag = hflag = mflag = timeset = 0; if (gettimeofday(tv[0], NULL)) err(1, gettimeofday); @@ -91,7 +91,6 @@ cflag = 1; break; case 'f': - fflag = 1; break; case 'h': hflag = 1;
CVS commit: src/lib/libukfs
Module Name:src Committed By: pooka Date: Tue Feb 22 15:42:15 UTC 2011 Modified Files: src/lib/libukfs: ukfs.c ukfs_disklabel.c ukfs_int_disklabel.h Log Message: Add support for a byteswapped disklabel so that I can mount NetBSD/sparc anita images on my i386. To generate a diff of this commit: cvs rdiff -u -r1.56 -r1.57 src/lib/libukfs/ukfs.c cvs rdiff -u -r1.2 -r1.3 src/lib/libukfs/ukfs_disklabel.c \ src/lib/libukfs/ukfs_int_disklabel.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/lib/libukfs/ukfs.c diff -u src/lib/libukfs/ukfs.c:1.56 src/lib/libukfs/ukfs.c:1.57 --- src/lib/libukfs/ukfs.c:1.56 Sun Jan 2 13:01:45 2011 +++ src/lib/libukfs/ukfs.c Tue Feb 22 15:42:15 2011 @@ -1,4 +1,4 @@ -/* $NetBSD: ukfs.c,v 1.56 2011/01/02 13:01:45 pooka Exp $ */ +/* $NetBSD: ukfs.c,v 1.57 2011/02/22 15:42:15 pooka Exp $ */ /* * Copyright (c) 2007, 2008, 2009 Antti Kantee. All Rights Reserved. @@ -246,9 +246,11 @@ *(MAGICADJ_DISKLABEL(p,0)) 'a' + UKFS_MAXPARTITIONS) { struct ukfs__disklabel dl; struct ukfs__partition *pp; + int imswapped; char buf[65536]; char labelchar = *(MAGICADJ_DISKLABEL(p,0)); int partition = labelchar - 'a'; + uint32_t poffset, psize; *p = '\0'; devfd = open(devpath, O_RDONLY); @@ -263,7 +265,8 @@ goto out; } - if (ukfs__disklabel_scan(dl, buf, sizeof(buf)) != 0) { + if (ukfs__disklabel_scan(dl, imswapped, + buf, sizeof(buf)) != 0) { error = ENOENT; goto out; } @@ -276,8 +279,15 @@ pp = dl.d_partitions[partition]; part-part_type = UKFS_PART_DISKLABEL; part-part_labelchar = labelchar; - part-part_devoff = pp-p_offset DEV_BSHIFT; - part-part_devsize = pp-p_size DEV_BSHIFT; + if (imswapped) { +poffset = bswap32(pp-p_offset); +psize = bswap32(pp-p_size); + } else { +poffset = pp-p_offset; +psize = pp-p_size; + } + part-part_devoff = poffset DEV_BSHIFT; + part-part_devsize = psize DEV_BSHIFT; } else { error = EINVAL; } Index: src/lib/libukfs/ukfs_disklabel.c diff -u src/lib/libukfs/ukfs_disklabel.c:1.2 src/lib/libukfs/ukfs_disklabel.c:1.3 --- src/lib/libukfs/ukfs_disklabel.c:1.2 Thu Dec 3 14:23:49 2009 +++ src/lib/libukfs/ukfs_disklabel.c Tue Feb 22 15:42:15 2011 @@ -1,4 +1,4 @@ -/* $NetBSD: ukfs_disklabel.c,v 1.2 2009/12/03 14:23:49 pooka Exp $ */ +/* $NetBSD: ukfs_disklabel.c,v 1.3 2011/02/22 15:42:15 pooka Exp $ */ /* * Local copies of libutil disklabel routines. This uncouples libukfs @@ -50,27 +50,42 @@ #define SCAN_INCR 4 int -ukfs__disklabel_scan(struct ukfs__disklabel *lp, char *buf, size_t buflen) +ukfs__disklabel_scan(struct ukfs__disklabel *lp, int *isswapped, + char *buf, size_t buflen) { - size_t i; + size_t i; + int imswapped; + uint16_t npart; /* scan for the correct magic numbers. */ for (i=0; i = buflen - sizeof(*lp); i += SCAN_INCR) { memcpy(lp, buf + i, sizeof(*lp)); if (lp-d_magic == UKFS_DISKMAGIC - lp-d_magic2 == UKFS_DISKMAGIC) + lp-d_magic2 == UKFS_DISKMAGIC) { + imswapped = 0; goto sanity; + } + if (lp-d_magic == bswap32(UKFS_DISKMAGIC) + lp-d_magic2 == bswap32(UKFS_DISKMAGIC)) { + imswapped = 1; + goto sanity; + } } return 1; sanity: + if (imswapped) + npart = bswap16(lp-d_npartitions); + else + npart = lp-d_npartitions; /* we've found something, let's sanity check it */ - if (lp-d_npartitions UKFS_MAXPARTITIONS - || ukfs__disklabel_dkcksum(lp)) + if (npart UKFS_MAXPARTITIONS + || ukfs__disklabel_dkcksum(lp, imswapped)) return 1; + *isswapped = imswapped; return 0; } @@ -110,15 +125,26 @@ */ uint16_t -ukfs__disklabel_dkcksum(struct ukfs__disklabel *lp) +ukfs__disklabel_dkcksum(struct ukfs__disklabel *lp, int imswapped) { uint16_t *start, *end; uint16_t sum; + uint16_t npart; + + if (imswapped) + npart = bswap16(lp-d_npartitions); + else + npart = lp-d_npartitions; sum = 0; start = (uint16_t *)(void *)lp; - end = (uint16_t *)(void *)lp-d_partitions[lp-d_npartitions]; - while (start end) - sum ^= *start++; + end = (uint16_t *)(void *)lp-d_partitions[npart]; + while (start end) { + if (imswapped) + sum ^= bswap16(*start); + else + sum ^= *start; + start++; + } return (sum); } Index: src/lib/libukfs/ukfs_int_disklabel.h diff -u src/lib/libukfs/ukfs_int_disklabel.h:1.2 src/lib/libukfs/ukfs_int_disklabel.h:1.3 --- src/lib/libukfs/ukfs_int_disklabel.h:1.2 Thu Dec 3 14:23:49 2009 +++ src/lib/libukfs/ukfs_int_disklabel.h Tue Feb 22 15:42:15 2011 @@ -1,4 +1,4 @@ -/* $NetBSD: ukfs_int_disklabel.h,v 1.2 2009/12/03 14:23:49 pooka Exp $ */ +/* $NetBSD: ukfs_int_disklabel.h,v 1.3 2011/02/22 15:42:15 pooka Exp $ */ /* * Modified copy of disklabel.h so that ukfs doesn't have to depend @@ -151,7 +151,8 @@ } d_partitions[UKFS_MAXPARTITIONS]; /* actually may be more */ }; -uint16_t
CVS commit: src/usr.bin/touch
Module Name:src Committed By: wiz Date: Tue Feb 22 15:47:02 UTC 2011 Modified Files: src/usr.bin/touch: touch.1 Log Message: Sort sections. To generate a diff of this commit: cvs rdiff -u -r1.17 -r1.18 src/usr.bin/touch/touch.1 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/touch/touch.1 diff -u src/usr.bin/touch/touch.1:1.17 src/usr.bin/touch/touch.1:1.18 --- src/usr.bin/touch/touch.1:1.17 Tue Feb 22 15:03:30 2011 +++ src/usr.bin/touch/touch.1 Tue Feb 22 15:47:02 2011 @@ -1,4 +1,4 @@ -.\ $NetBSD: touch.1,v 1.17 2011/02/22 15:03:30 pooka Exp $ +.\ $NetBSD: touch.1,v 1.18 2011/02/22 15:47:02 wiz Exp $ .\ .\ Copyright (c) 1991, 1993 .\ The Regents of the University of California. All rights reserved. @@ -129,8 +129,6 @@ The .Nm utility exits 0 on success, and \*[Gt]0 if an error occurs. -.Sh SEE ALSO -.Xr utimes 2 .Sh COMPATIBILITY The obsolescent form of .Nm , @@ -157,6 +155,8 @@ .Dq YY letter pair is in the range 69 to 99, the year is set to 1969 to 1999, otherwise, the year is set in the 21st century. +.Sh SEE ALSO +.Xr utimes 2 .Sh STANDARDS The .Nm
CVS commit: src/usr.bin/rump_allserver
Module Name:src Committed By: pooka Date: Tue Feb 22 15:51:59 UTC 2011 Modified Files: src/usr.bin/rump_allserver: rump_allserver.c Log Message: * at least try to query size of non-regular size=host files too, give up if we get 0 * fix a few error messages To generate a diff of this commit: cvs rdiff -u -r1.20 -r1.21 src/usr.bin/rump_allserver/rump_allserver.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/rump_allserver/rump_allserver.c diff -u src/usr.bin/rump_allserver/rump_allserver.c:1.20 src/usr.bin/rump_allserver/rump_allserver.c:1.21 --- src/usr.bin/rump_allserver/rump_allserver.c:1.20 Mon Feb 21 18:50:21 2011 +++ src/usr.bin/rump_allserver/rump_allserver.c Tue Feb 22 15:51:59 2011 @@ -1,4 +1,4 @@ -/* $NetBSD: rump_allserver.c,v 1.20 2011/02/21 18:50:21 pooka Exp $ */ +/* $NetBSD: rump_allserver.c,v 1.21 2011/02/22 15:51:59 pooka Exp $ */ /*- * Copyright (c) 2010, 2011 Antti Kantee. All Rights Reserved. @@ -27,7 +27,7 @@ #include sys/cdefs.h #ifndef lint -__RCSID($NetBSD: rump_allserver.c,v 1.20 2011/02/21 18:50:21 pooka Exp $); +__RCSID($NetBSD: rump_allserver.c,v 1.21 2011/02/22 15:51:59 pooka Exp $); #endif /* !lint */ #include sys/types.h @@ -180,7 +180,7 @@ fprintf(stderr, cannot specify offset with - size=e\n); + size=host\n); usage(); } flen = DSIZE_E; @@ -199,7 +199,7 @@ if (flen == DSIZE_E) { fprintf(stderr, cannot specify offset with - size=e\n); + size=host\n); usage(); } /* XXX: off_t max? */ @@ -383,8 +383,9 @@ if (fstat(fd, sb) == -1) die(sflag, errno, fstat etfs hostpath); if (flen == DSIZE_E) { - if (!S_ISREG(sb.st_mode)) -die(sflag, EINVAL, size=e requires reg file); + if (sb.st_size == 0) +die(sflag, EINVAL, size=host, but cannot +query non-zero size); flen = sb.st_size; } fendoff = foffset + flen;
CVS commit: src/sys/dev/acpi
Module Name:src Committed By: jruoho Date: Tue Feb 22 16:05:31 UTC 2011 Modified Files: src/sys/dev/acpi: acpi_cpu_cstate.c Log Message: After a closer examination, remove entirely the check that was considered in the revision 1.38. As noted in the specification (ACPI 4.0, p. 314): The platform must expose a _CST object for either all or none of its processors. If the _CST object exists, OSPM uses the C state information specified in the _CST object in lieu of P_LVL2 and P_LVL3 registers defined in P_BLK and the P_LVLx_LAT values defined in the FADT. The _CST is seemingly valid on the system under consideration: Name (_CST, Package (0x02) { 0x01, Package (0x04) { ResourceTemplate () { Register (SystemIO, 0x08, // Bit Width 0x00, // Bit Offset 0xF800, // Address 0x01, // Access Size ) }, 0x02, 0x0064, 0x } }) The check was also unnecessary in the sense that ACPI doesn't use bus_space(9). To generate a diff of this commit: cvs rdiff -u -r1.39 -r1.40 src/sys/dev/acpi/acpi_cpu_cstate.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/acpi/acpi_cpu_cstate.c diff -u src/sys/dev/acpi/acpi_cpu_cstate.c:1.39 src/sys/dev/acpi/acpi_cpu_cstate.c:1.40 --- src/sys/dev/acpi/acpi_cpu_cstate.c:1.39 Tue Feb 22 09:39:48 2011 +++ src/sys/dev/acpi/acpi_cpu_cstate.c Tue Feb 22 16:05:30 2011 @@ -1,4 +1,4 @@ -/* $NetBSD: acpi_cpu_cstate.c,v 1.39 2011/02/22 09:39:48 jruoho Exp $ */ +/* $NetBSD: acpi_cpu_cstate.c,v 1.40 2011/02/22 16:05:30 jruoho Exp $ */ /*- * Copyright (c) 2010 Jukka Ruohonen jruoho...@iki.fi @@ -27,7 +27,7 @@ * SUCH DAMAGE. */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: acpi_cpu_cstate.c,v 1.39 2011/02/22 09:39:48 jruoho Exp $); +__KERNEL_RCSID(0, $NetBSD: acpi_cpu_cstate.c,v 1.40 2011/02/22 16:05:30 jruoho Exp $); #include sys/param.h #include sys/cpu.h @@ -423,21 +423,6 @@ goto out; } - /* - * Check only that the address is in the mapped space. - * Systems are allowed to change it when operating - * with _CST (see ACPI 4.0, pp. 94-95). For instance, - * the offset of P_LVL3 may change depending on whether - * acpiacad(4) is connected or disconnected. - */ - if (ao-ao_pblkaddr != 0) { - - if (reg-reg_addr ao-ao_pblkaddr + ao-ao_pblklen) { -rv = AE_BAD_ADDRESS; -goto out; - } - } - state.cs_addr = reg-reg_addr; break;
CVS commit: src/sys/dev/acpi
Module Name:src Committed By: jmcneill Date: Tue Feb 22 16:39:05 UTC 2011 Modified Files: src/sys/dev/acpi: acpi_cpu_cstate.c Log Message: make this build again To generate a diff of this commit: cvs rdiff -u -r1.40 -r1.41 src/sys/dev/acpi/acpi_cpu_cstate.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/acpi/acpi_cpu_cstate.c diff -u src/sys/dev/acpi/acpi_cpu_cstate.c:1.40 src/sys/dev/acpi/acpi_cpu_cstate.c:1.41 --- src/sys/dev/acpi/acpi_cpu_cstate.c:1.40 Tue Feb 22 16:05:30 2011 +++ src/sys/dev/acpi/acpi_cpu_cstate.c Tue Feb 22 16:39:05 2011 @@ -1,4 +1,4 @@ -/* $NetBSD: acpi_cpu_cstate.c,v 1.40 2011/02/22 16:05:30 jruoho Exp $ */ +/* $NetBSD: acpi_cpu_cstate.c,v 1.41 2011/02/22 16:39:05 jmcneill Exp $ */ /*- * Copyright (c) 2010 Jukka Ruohonen jruoho...@iki.fi @@ -27,7 +27,7 @@ * SUCH DAMAGE. */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: acpi_cpu_cstate.c,v 1.40 2011/02/22 16:05:30 jruoho Exp $); +__KERNEL_RCSID(0, $NetBSD: acpi_cpu_cstate.c,v 1.41 2011/02/22 16:39:05 jmcneill Exp $); #include sys/param.h #include sys/cpu.h @@ -326,7 +326,6 @@ static ACPI_STATUS acpicpu_cstate_cst_add(struct acpicpu_softc *sc, ACPI_OBJECT *elm) { - const struct acpicpu_object *ao = sc-sc_object; struct acpicpu_cstate *cs = sc-sc_cstate; struct acpicpu_cstate state; struct acpicpu_reg *reg;
CVS commit: src/external/bsd/iscsi/dist/src/initiator
Module Name:src Committed By: sborrill Date: Tue Feb 22 17:15:55 UTC 2011 Modified Files: src/external/bsd/iscsi/dist/src/initiator: iscsi-initiator.8 Log Message: Update HISTORY to show that iscsifs was in NetBSD 5.0 To generate a diff of this commit: cvs rdiff -u -r1.7 -r1.8 \ src/external/bsd/iscsi/dist/src/initiator/iscsi-initiator.8 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/external/bsd/iscsi/dist/src/initiator/iscsi-initiator.8 diff -u src/external/bsd/iscsi/dist/src/initiator/iscsi-initiator.8:1.7 src/external/bsd/iscsi/dist/src/initiator/iscsi-initiator.8:1.8 --- src/external/bsd/iscsi/dist/src/initiator/iscsi-initiator.8:1.7 Tue Feb 22 14:23:37 2011 +++ src/external/bsd/iscsi/dist/src/initiator/iscsi-initiator.8 Tue Feb 22 17:15:55 2011 @@ -1,4 +1,4 @@ -.\ $NetBSD: iscsi-initiator.8,v 1.7 2011/02/22 14:23:37 wiz Exp $ +.\ $NetBSD: iscsi-initiator.8,v 1.8 2011/02/22 17:15:55 sborrill Exp $ .\ .\ Copyright © 2007 Alistair Crooks. All rights reserved. .\ @@ -144,6 +144,9 @@ .Nm utility first appeared in .Nx 6.0 . +An earlier version called iscsifs was available in +.Nx 5.0 +in source format only. .Sh AUTHORS The .Nm
CVS commit: src/sys/dev/acpi
Module Name:src Committed By: jruoho Date: Tue Feb 22 17:16:04 UTC 2011 Modified Files: src/sys/dev/acpi: acpi_cpu_cstate.c Log Message: Yet another small fix to the C-state parsing. As can be seen from the _CST object noted in the revision 1.40, there is only one C-state on the machine, yet the BIOS define its type as C2. Thus, instead of relying on the BIOS data, sequentially count the parsed C-states. To generate a diff of this commit: cvs rdiff -u -r1.41 -r1.42 src/sys/dev/acpi/acpi_cpu_cstate.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/acpi/acpi_cpu_cstate.c diff -u src/sys/dev/acpi/acpi_cpu_cstate.c:1.41 src/sys/dev/acpi/acpi_cpu_cstate.c:1.42 --- src/sys/dev/acpi/acpi_cpu_cstate.c:1.41 Tue Feb 22 16:39:05 2011 +++ src/sys/dev/acpi/acpi_cpu_cstate.c Tue Feb 22 17:16:04 2011 @@ -1,4 +1,4 @@ -/* $NetBSD: acpi_cpu_cstate.c,v 1.41 2011/02/22 16:39:05 jmcneill Exp $ */ +/* $NetBSD: acpi_cpu_cstate.c,v 1.42 2011/02/22 17:16:04 jruoho Exp $ */ /*- * Copyright (c) 2010 Jukka Ruohonen jruoho...@iki.fi @@ -27,7 +27,7 @@ * SUCH DAMAGE. */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: acpi_cpu_cstate.c,v 1.41 2011/02/22 16:39:05 jmcneill Exp $); +__KERNEL_RCSID(0, $NetBSD: acpi_cpu_cstate.c,v 1.42 2011/02/22 17:16:04 jruoho Exp $); #include sys/param.h #include sys/cpu.h @@ -331,6 +331,7 @@ struct acpicpu_reg *reg; ACPI_STATUS rv = AE_OK; ACPI_OBJECT *obj; + static int i = 1; uint32_t type; (void)memset(state, 0, sizeof(*cs)); @@ -469,17 +470,19 @@ goto out; } - cs[type].cs_addr = state.cs_addr; - cs[type].cs_power = state.cs_power; - cs[type].cs_flags = state.cs_flags; - cs[type].cs_method = state.cs_method; - cs[type].cs_latency = state.cs_latency; + cs[i].cs_addr = state.cs_addr; + cs[i].cs_power = state.cs_power; + cs[i].cs_flags = state.cs_flags; + cs[i].cs_method = state.cs_method; + cs[i].cs_latency = state.cs_latency; out: if (ACPI_FAILURE(rv)) aprint_error_dev(sc-sc_dev, failed to add C-state: %s\n, AcpiFormatException(rv)); + i++; + return rv; }
CVS commit: src/sys/dev/acpi
Module Name:src Committed By: jruoho Date: Tue Feb 22 17:19:58 UTC 2011 Modified Files: src/sys/dev/acpi: acpi_cpu_cstate.c Log Message: Fix previous. Not my day. To generate a diff of this commit: cvs rdiff -u -r1.42 -r1.43 src/sys/dev/acpi/acpi_cpu_cstate.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/acpi/acpi_cpu_cstate.c diff -u src/sys/dev/acpi/acpi_cpu_cstate.c:1.42 src/sys/dev/acpi/acpi_cpu_cstate.c:1.43 --- src/sys/dev/acpi/acpi_cpu_cstate.c:1.42 Tue Feb 22 17:16:04 2011 +++ src/sys/dev/acpi/acpi_cpu_cstate.c Tue Feb 22 17:19:58 2011 @@ -1,4 +1,4 @@ -/* $NetBSD: acpi_cpu_cstate.c,v 1.42 2011/02/22 17:16:04 jruoho Exp $ */ +/* $NetBSD: acpi_cpu_cstate.c,v 1.43 2011/02/22 17:19:58 jruoho Exp $ */ /*- * Copyright (c) 2010 Jukka Ruohonen jruoho...@iki.fi @@ -27,7 +27,7 @@ * SUCH DAMAGE. */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: acpi_cpu_cstate.c,v 1.42 2011/02/22 17:16:04 jruoho Exp $); +__KERNEL_RCSID(0, $NetBSD: acpi_cpu_cstate.c,v 1.43 2011/02/22 17:19:58 jruoho Exp $); #include sys/param.h #include sys/cpu.h @@ -465,7 +465,7 @@ goto out; } - if (cs[type].cs_method != 0) { + if (cs[i].cs_method != 0) { rv = AE_ALREADY_EXISTS; goto out; }
CVS commit: src/lib/librumpclient
Module Name:src Committed By: tron Date: Tue Feb 22 17:32:49 UTC 2011 Modified Files: src/lib/librumpclient: Makefile Log Message: Remove NOLINT setting that was apparently committed by accident and breaks the build. To generate a diff of this commit: cvs rdiff -u -r1.4 -r1.5 src/lib/librumpclient/Makefile Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/lib/librumpclient/Makefile diff -u src/lib/librumpclient/Makefile:1.4 src/lib/librumpclient/Makefile:1.5 --- src/lib/librumpclient/Makefile:1.4 Tue Feb 22 14:02:54 2011 +++ src/lib/librumpclient/Makefile Tue Feb 22 17:32:49 2011 @@ -1,8 +1,7 @@ -# $NetBSD: Makefile,v 1.4 2011/02/22 14:02:54 pooka Exp $ +# $NetBSD: Makefile,v 1.5 2011/02/22 17:32:49 tron Exp $ # .PATH: ${.CURDIR}/../../sys/rump/librump/rumpkern -NOLINT= # syscalls are evil LIB= rumpclient USE_SHLIBDIR= yes
CVS commit: src/tests/fs
Module Name:src Committed By: pooka Date: Tue Feb 22 18:41:05 UTC 2011 Modified Files: src/tests/fs/hfs: t_pathconvert.c src/tests/fs/lfs: t_pr.c Log Message: make the timeouts a bit more generous for really slow systems To generate a diff of this commit: cvs rdiff -u -r1.1 -r1.2 src/tests/fs/hfs/t_pathconvert.c cvs rdiff -u -r1.5 -r1.6 src/tests/fs/lfs/t_pr.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/tests/fs/hfs/t_pathconvert.c diff -u src/tests/fs/hfs/t_pathconvert.c:1.1 src/tests/fs/hfs/t_pathconvert.c:1.2 --- src/tests/fs/hfs/t_pathconvert.c:1.1 Fri Feb 18 13:07:54 2011 +++ src/tests/fs/hfs/t_pathconvert.c Tue Feb 22 18:41:04 2011 @@ -1,4 +1,4 @@ -/* $NetBSD: t_pathconvert.c,v 1.1 2011/02/18 13:07:54 pooka Exp $ */ +/* $NetBSD: t_pathconvert.c,v 1.2 2011/02/22 18:41:04 pooka Exp $ */ #include sys/types.h #include sys/mount.h @@ -24,7 +24,7 @@ ATF_TC_HEAD(colonslash, tc) { atf_tc_set_md_var(tc, descr, HFS+ colons/slashes (PR kern/44523)); - atf_tc_set_md_var(tc, timeout, 2); + atf_tc_set_md_var(tc, timeout, 20); } #define IMGNAME colon.hfs Index: src/tests/fs/lfs/t_pr.c diff -u src/tests/fs/lfs/t_pr.c:1.5 src/tests/fs/lfs/t_pr.c:1.6 --- src/tests/fs/lfs/t_pr.c:1.5 Mon Nov 15 21:29:39 2010 +++ src/tests/fs/lfs/t_pr.c Tue Feb 22 18:41:05 2011 @@ -1,4 +1,4 @@ -/* $NetBSD: t_pr.c,v 1.5 2010/11/15 21:29:39 pooka Exp $ */ +/* $NetBSD: t_pr.c,v 1.6 2011/02/22 18:41:05 pooka Exp $ */ #include sys/types.h #include sys/mount.h @@ -24,7 +24,7 @@ { atf_tc_set_md_var(tc, descr, mknod(2) hangs on LFS (PR kern/43503)); - atf_tc_set_md_var(tc, timeout, 2); + atf_tc_set_md_var(tc, timeout, 20); } #define IMGNAME disk.img
CVS commit: src/sys/rump/librump/rumpkern
Module Name:src Committed By: pooka Date: Tue Feb 22 18:43:20 UTC 2011 Modified Files: src/sys/rump/librump/rumpkern: vm.c Log Message: complete the incomplete pagesize rototill To generate a diff of this commit: cvs rdiff -u -r1.111 -r1.112 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/vm.c diff -u src/sys/rump/librump/rumpkern/vm.c:1.111 src/sys/rump/librump/rumpkern/vm.c:1.112 --- src/sys/rump/librump/rumpkern/vm.c:1.111 Thu Feb 10 14:46:45 2011 +++ src/sys/rump/librump/rumpkern/vm.c Tue Feb 22 18:43:20 2011 @@ -1,4 +1,4 @@ -/* $NetBSD: vm.c,v 1.111 2011/02/10 14:46:45 pooka Exp $ */ +/* $NetBSD: vm.c,v 1.112 2011/02/22 18:43:20 pooka Exp $ */ /* * Copyright (c) 2007-2010 Antti Kantee. All Rights Reserved. @@ -41,7 +41,7 @@ */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: vm.c,v 1.111 2011/02/10 14:46:45 pooka Exp $); +__KERNEL_RCSID(0, $NetBSD: vm.c,v 1.112 2011/02/22 18:43:20 pooka Exp $); #include sys/param.h #include sys/atomic.h @@ -69,11 +69,14 @@ kmutex_t uvm_swap_data_lock; struct uvmexp uvmexp; -int *uvmexp_pagesize; -int *uvmexp_pagemask; -int *uvmexp_pageshift; struct uvm uvm; +#ifdef __uvmexp_pagesize +int *uvmexp_pagesize = uvmexp.pagesize; +int *uvmexp_pagemask = uvmexp.pagemask; +int *uvmexp_pageshift = uvmexp.pageshift; +#endif + struct vm_map rump_vmmap; static struct vm_map_kernel kmem_map_store; struct vm_map *kmem_map = kmem_map_store.vmk_map; @@ -303,6 +306,18 @@ uvmexp.free = 1024*1024; /* XXX: arbitrary not updated */ +#ifndef __uvmexp_pagesize + uvmexp.pagesize = PAGE_SIZE; + uvmexp.pagemask = PAGE_MASK; + uvmexp.pageshift = PAGE_SHIFT; +#else +#define FAKE_PAGE_SHIFT 12 + uvmexp.pageshift = FAKE_PAGE_SHIFT; + uvmexp.pagesize = 1FAKE_PAGE_SHIFT; + uvmexp.pagemask = (1FAKE_PAGE_SHIFT)-1; +#undef FAKE_PAGE_SHIFT +#endif + mutex_init(pagermtx, MUTEX_DEFAULT, 0); mutex_init(uvm_pageqlock, MUTEX_DEFAULT, 0); mutex_init(uvm_swap_data_lock, MUTEX_DEFAULT, 0);
CVS commit: src/common/lib/libc/arch/sparc/atomic
Module Name:src Committed By: pooka Date: Tue Feb 22 18:45:10 UTC 2011 Modified Files: src/common/lib/libc/arch/sparc/atomic: atomic_cas.S Log Message: Add PIC variant for fetching the lock address. librump.so now works on sparc To generate a diff of this commit: cvs rdiff -u -r1.10 -r1.11 src/common/lib/libc/arch/sparc/atomic/atomic_cas.S Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/common/lib/libc/arch/sparc/atomic/atomic_cas.S diff -u src/common/lib/libc/arch/sparc/atomic/atomic_cas.S:1.10 src/common/lib/libc/arch/sparc/atomic/atomic_cas.S:1.11 --- src/common/lib/libc/arch/sparc/atomic/atomic_cas.S:1.10 Fri Mar 13 16:40:22 2009 +++ src/common/lib/libc/arch/sparc/atomic/atomic_cas.S Tue Feb 22 18:45:10 2011 @@ -1,4 +1,4 @@ -/* $NetBSD: atomic_cas.S,v 1.10 2009/03/13 16:40:22 nakayama Exp $ */ +/* $NetBSD: atomic_cas.S,v 1.11 2011/02/22 18:45:10 pooka Exp $ */ /*- * Copyright (c) 2007, 2008 The NetBSD Foundation, Inc. @@ -63,15 +63,29 @@ #if defined(MULTIPROCESSOR) .section .bss .align 1024 +#ifdef PIC + .globl _C_LABEL(_atomic_cas_locktab) +#endif OTYPE(_C_LABEL(_atomic_cas_locktab)) _C_LABEL(_atomic_cas_locktab): .space 1024 +#ifdef PIC +/* o4 is not used for PSR in PIC cases, so we can use it here */ +#define GETLOCKTAB \ + PIC_PROLOGUE(%o3,%o4) ;\ + set _C_LABEL(_atomic_cas_locktab), %o4;\ + ld [%o3 + %o4], %o3 +#else +#define GETLOCKTAB \ + sethi %hi(_C_LABEL(_atomic_cas_locktab)), %o3 +#endif + #define ACQUIRE_INTERLOCK \ DISABLE_INTERRUPTS ;\ srl %o0, 3, %o5 /* get lock address */ ;\ and %o5, 1023, %o5 ;\ - sethi %hi(_C_LABEL(_atomic_cas_locktab)), %o3 ;\ + GETLOCKTAB ;\ add %o5, %o3, %o5 ;\ ;\ /* %o5 has interlock address */ ;\
CVS commit: src/sys/rump/librump
Module Name:src Committed By: pooka Date: Tue Feb 22 20:17:38 UTC 2011 Modified Files: src/sys/rump/librump/rumpkern: vm.c src/sys/rump/librump/rumpvfs: vm_vfs.c Log Message: Shuffle the pagedaemon algorithm a bit to record the number of pageouts active and give up only if the pagedaemon could not free memory and there are no outstanding pageouts. This should fix the out of memory pauses reported by Mihai Chelaru and Taylor R Campbell. Tested by copying files to and from an ffs backed by /dev/wd0 (with and without -o log) using a 1MB rump kernel memory limit. To generate a diff of this commit: cvs rdiff -u -r1.112 -r1.113 src/sys/rump/librump/rumpkern/vm.c cvs rdiff -u -r1.24 -r1.25 src/sys/rump/librump/rumpvfs/vm_vfs.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/vm.c diff -u src/sys/rump/librump/rumpkern/vm.c:1.112 src/sys/rump/librump/rumpkern/vm.c:1.113 --- src/sys/rump/librump/rumpkern/vm.c:1.112 Tue Feb 22 18:43:20 2011 +++ src/sys/rump/librump/rumpkern/vm.c Tue Feb 22 20:17:38 2011 @@ -1,4 +1,4 @@ -/* $NetBSD: vm.c,v 1.112 2011/02/22 18:43:20 pooka Exp $ */ +/* $NetBSD: vm.c,v 1.113 2011/02/22 20:17:38 pooka Exp $ */ /* * Copyright (c) 2007-2010 Antti Kantee. All Rights Reserved. @@ -41,7 +41,7 @@ */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: vm.c,v 1.112 2011/02/22 18:43:20 pooka Exp $); +__KERNEL_RCSID(0, $NetBSD: vm.c,v 1.113 2011/02/22 20:17:38 pooka Exp $); #include sys/param.h #include sys/atomic.h @@ -923,14 +923,27 @@ uvm_pageout_start(int npages) { - /* we don't have the heuristics */ + mutex_enter(pdaemonmtx); + uvmexp.paging += npages; + mutex_exit(pdaemonmtx); } void uvm_pageout_done(int npages) { - /* could wakeup waiters, but just let the pagedaemon do it */ + if (!npages) + return; + + mutex_enter(pdaemonmtx); + KASSERT(uvmexp.paging = npages); + uvmexp.paging -= npages; + + if (pdaemon_waiters) { + pdaemon_waiters = 0; + cv_broadcast(oomwait); + } + mutex_exit(pdaemonmtx); } static bool @@ -969,6 +982,8 @@ /* * The Diabolical pageDaemon Director (DDD). + * + * This routine can always use better heuristics. */ void uvm_pageout(void *arg) @@ -976,35 +991,30 @@ struct vm_page *pg; struct pool *pp, *pp_first; uint64_t where; - int timo = 0; int cleaned, skip, skipped; - bool succ = false; + int waspaging; + bool succ; bool lockrunning; mutex_enter(pdaemonmtx); for (;;) { - if (succ) { + if (!NEED_PAGEDAEMON()) { kernel_map-flags = ~VM_MAP_WANTVA; kmem_map-flags = ~VM_MAP_WANTVA; - timo = 0; - if (pdaemon_waiters) { -pdaemon_waiters = 0; -cv_broadcast(oomwait); - } } - succ = false; - if (pdaemon_waiters == 0) { - cv_timedwait(pdaemoncv, pdaemonmtx, timo); - uvmexp.pdwoke++; + if (pdaemon_waiters) { + pdaemon_waiters = 0; + cv_broadcast(oomwait); } + cv_wait(pdaemoncv, pdaemonmtx); + uvmexp.pdwoke++; + waspaging = uvmexp.paging; + /* tell the world that we are hungry */ kernel_map-flags |= VM_MAP_WANTVA; kmem_map-flags |= VM_MAP_WANTVA; - - if (pdaemon_waiters == 0 !NEED_PAGEDAEMON()) - continue; mutex_exit(pdaemonmtx); /* @@ -1014,7 +1024,6 @@ */ pool_cache_reclaim(pagecache); if (!NEED_PAGEDAEMON()) { - succ = true; mutex_enter(pdaemonmtx); continue; } @@ -1081,7 +1090,6 @@ */ pool_cache_reclaim(pagecache); if (!NEED_PAGEDAEMON()) { - succ = true; mutex_enter(pdaemonmtx); continue; } @@ -1118,13 +1126,14 @@ * Unfortunately, the wife just borrowed it. */ - if (!succ cleaned == 0) { + mutex_enter(pdaemonmtx); + if (!succ cleaned == 0 pdaemon_waiters + uvmexp.paging == 0) { rumpuser_dprintf(pagedaemoness: failed to reclaim memory ... sleeping (deadlock?)\n); - timo = hz; + cv_timedwait(pdaemoncv, pdaemonmtx, hz); + mutex_enter(pdaemonmtx); } - - mutex_enter(pdaemonmtx); } panic(you can swap out any time you like, but you can never leave); Index: src/sys/rump/librump/rumpvfs/vm_vfs.c diff -u src/sys/rump/librump/rumpvfs/vm_vfs.c:1.24 src/sys/rump/librump/rumpvfs/vm_vfs.c:1.25 --- src/sys/rump/librump/rumpvfs/vm_vfs.c:1.24 Sat Dec 18 11:45:09 2010 +++ src/sys/rump/librump/rumpvfs/vm_vfs.c Tue Feb 22 20:17:37 2011 @@ -1,4 +1,4 @@ -/* $NetBSD: vm_vfs.c,v 1.24 2010/12/18 11:45:09 pooka Exp $ */ +/* $NetBSD: vm_vfs.c,v 1.25 2011/02/22 20:17:37 pooka Exp $ */ /* * Copyright (c) 2008 Antti Kantee. All Rights Reserved. @@ -29,7 +29,7 @@ */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: vm_vfs.c,v 1.24 2010/12/18 11:45:09 pooka Exp $); +__KERNEL_RCSID(0, $NetBSD: vm_vfs.c,v 1.25 2011/02/22 20:17:37 pooka Exp $); #include sys/param.h @@ -67,7 +67,6 @@ } uvm_pagermapout((vaddr_t)bp-b_data, npages); - uvm_pageout_done(pageout); /* get uobj because we need it after pages might be recycled
CVS commit: src/sys/ufs/ffs
Module Name:src Committed By: he Date: Tue Feb 22 20:25:54 UTC 2011 Modified Files: src/sys/ufs/ffs: ffs_snapshot.c Log Message: Move blocks_in_journal() in under #ifndef FFS_NO_SNAPSHOT, all uses are under that ifdef anyway; this allows build with FFS_NO_SNAPSHOT defined. To generate a diff of this commit: cvs rdiff -u -r1.106 -r1.107 src/sys/ufs/ffs/ffs_snapshot.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/ffs/ffs_snapshot.c diff -u src/sys/ufs/ffs/ffs_snapshot.c:1.106 src/sys/ufs/ffs/ffs_snapshot.c:1.107 --- src/sys/ufs/ffs/ffs_snapshot.c:1.106 Mon Feb 21 09:29:21 2011 +++ src/sys/ufs/ffs/ffs_snapshot.c Tue Feb 22 20:25:54 2011 @@ -1,4 +1,4 @@ -/* $NetBSD: ffs_snapshot.c,v 1.106 2011/02/21 09:29:21 hannken Exp $ */ +/* $NetBSD: ffs_snapshot.c,v 1.107 2011/02/22 20:25:54 he Exp $ */ /* * Copyright 2000 Marshall Kirk McKusick. All Rights Reserved. @@ -38,7 +38,7 @@ */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: ffs_snapshot.c,v 1.106 2011/02/21 09:29:21 hannken Exp $); +__KERNEL_RCSID(0, $NetBSD: ffs_snapshot.c,v 1.107 2011/02/22 20:25:54 he Exp $); #if defined(_KERNEL_OPT) #include opt_ffs.h @@ -115,7 +115,9 @@ static int rwfsblk(struct vnode *, int, void *, daddr_t); static int syncsnap(struct vnode *); static int wrsnapblk(struct vnode *, void *, daddr_t); +#if !defined(FFS_NO_SNAPSHOT) static int blocks_in_journal(struct fs *); +#endif static inline bool is_active_snapshot(struct snap_info *, struct inode *); static inline daddr_t db_get(struct inode *, int); @@ -1282,6 +1284,33 @@ UFS_WAPBL_END(mp); return (0); } + +/* + * Number of blocks that fit into the journal or zero if not logging. + */ +static int +blocks_in_journal(struct fs *fs) +{ + off_t bpj; + + if ((fs-fs_flags FS_DOWAPBL) == 0) + return 0; + bpj = 1; + if (fs-fs_journal_version == UFS_WAPBL_VERSION) { + switch (fs-fs_journal_location) { + case UFS_WAPBL_JOURNALLOC_END_PARTITION: + bpj = (off_t)fs-fs_journallocs[UFS_WAPBL_EPART_BLKSZ]* + fs-fs_journallocs[UFS_WAPBL_EPART_COUNT]; + break; + case UFS_WAPBL_JOURNALLOC_IN_FILESYSTEM: + bpj = (off_t)fs-fs_journallocs[UFS_WAPBL_INFS_BLKSZ]* + fs-fs_journallocs[UFS_WAPBL_INFS_COUNT]; + break; + } + } + bpj /= fs-fs_bsize; + return (bpj 0 ? bpj : 1); +} #endif /* defined(FFS_NO_SNAPSHOT) */ /* @@ -2172,33 +2201,6 @@ } /* - * Number of blocks that fit into the journal or zero if not logging. - */ -static int -blocks_in_journal(struct fs *fs) -{ - off_t bpj; - - if ((fs-fs_flags FS_DOWAPBL) == 0) - return 0; - bpj = 1; - if (fs-fs_journal_version == UFS_WAPBL_VERSION) { - switch (fs-fs_journal_location) { - case UFS_WAPBL_JOURNALLOC_END_PARTITION: - bpj = (off_t)fs-fs_journallocs[UFS_WAPBL_EPART_BLKSZ]* - fs-fs_journallocs[UFS_WAPBL_EPART_COUNT]; - break; - case UFS_WAPBL_JOURNALLOC_IN_FILESYSTEM: - bpj = (off_t)fs-fs_journallocs[UFS_WAPBL_INFS_BLKSZ]* - fs-fs_journallocs[UFS_WAPBL_INFS_COUNT]; - break; - } - } - bpj /= fs-fs_bsize; - return (bpj 0 ? bpj : 1); -} - -/* * Get/Put direct block from inode or buffer containing disk addresses. Take * care for fs type (UFS1/UFS2) and byte swapping. These functions should go * into a global include.
CVS commit: src/sys/dev/pci
Module Name:src Committed By: dyoung Date: Tue Feb 22 21:19:32 UTC 2011 Modified Files: src/sys/dev/pci: if_wm.c Log Message: Use /*FALLTHROUGH*/. To generate a diff of this commit: cvs rdiff -u -r1.219 -r1.220 src/sys/dev/pci/if_wm.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/if_wm.c diff -u src/sys/dev/pci/if_wm.c:1.219 src/sys/dev/pci/if_wm.c:1.220 --- src/sys/dev/pci/if_wm.c:1.219 Sun Feb 6 16:23:00 2011 +++ src/sys/dev/pci/if_wm.c Tue Feb 22 21:19:30 2011 @@ -1,4 +1,4 @@ -/* $NetBSD: if_wm.c,v 1.219 2011/02/06 16:23:00 bouyer Exp $ */ +/* $NetBSD: if_wm.c,v 1.220 2011/02/22 21:19:30 dyoung Exp $ */ /* * Copyright (c) 2001, 2002, 2003, 2004 Wasabi Systems, Inc. @@ -76,7 +76,7 @@ */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: if_wm.c,v 1.219 2011/02/06 16:23:00 bouyer Exp $); +__KERNEL_RCSID(0, $NetBSD: if_wm.c,v 1.220 2011/02/22 21:19:30 dyoung Exp $); #include rnd.h @@ -2797,7 +2797,7 @@ error = 0; break; } - /* Fall through for rest */ + /*FALLTHROUGH*/ default: if ((error = ether_ioctl(ifp, cmd, data)) != ENETRESET) break;
CVS commit: src/tests/fs/vfs
Module Name:src Committed By: yamt Date: Tue Feb 22 21:23:20 UTC 2011 Modified Files: src/tests/fs/vfs: t_ro.c t_vnops.c Log Message: add some tests To generate a diff of this commit: cvs rdiff -u -r1.4 -r1.5 src/tests/fs/vfs/t_ro.c cvs rdiff -u -r1.13 -r1.14 src/tests/fs/vfs/t_vnops.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/tests/fs/vfs/t_ro.c diff -u src/tests/fs/vfs/t_ro.c:1.4 src/tests/fs/vfs/t_ro.c:1.5 --- src/tests/fs/vfs/t_ro.c:1.4 Mon Jan 31 18:53:29 2011 +++ src/tests/fs/vfs/t_ro.c Tue Feb 22 21:23:19 2011 @@ -1,4 +1,4 @@ -/* $NetBSD: t_ro.c,v 1.4 2011/01/31 18:53:29 njoly Exp $ */ +/* $NetBSD: t_ro.c,v 1.5 2011/02/22 21:23:19 yamt Exp $ */ /*- * Copyright (c) 2010 The NetBSD Foundation, Inc. @@ -42,6 +42,10 @@ #include ../../h_macros.h #define AFILE testfile +#define ADIR testdir +#define AFIFO testfifo +#define ASYMLINK testsymlink +#define ALINK testlink #define FUNTEXT this is some non-humppa text #define FUNSIZE (sizeof(FUNTEXT)-1) @@ -138,10 +142,50 @@ FSTEST_EXIT(); } +static void +createdir(const atf_tc_t *tc, const char *mp) +{ + + FSTEST_ENTER(); + ATF_REQUIRE_ERRNO(EROFS, rump_sys_mkdir(ADIR, 0775) == -1); + FSTEST_EXIT(); +} + +static void +createfifo(const atf_tc_t *tc, const char *mp) +{ + + FSTEST_ENTER(); + ATF_REQUIRE_ERRNO(EROFS, rump_sys_mkfifo(AFIFO, 0775) == -1); + FSTEST_EXIT(); +} + +static void +createsymlink(const atf_tc_t *tc, const char *mp) +{ + + FSTEST_ENTER(); + ATF_REQUIRE_ERRNO(EROFS, rump_sys_symlink(hoge, ASYMLINK) == -1); + FSTEST_EXIT(); +} + +static void +createlink(const atf_tc_t *tc, const char *mp) +{ + + FSTEST_ENTER(); + ATF_REQUIRE_ERRNO(EROFS, rump_sys_link(AFILE, ALINK) == -1); + FSTEST_EXIT(); +} + ATF_TC_FSAPPLY_RO(create, create file on r/o mount, nullgen); ATF_TC_FSAPPLY_RO(rmfile, remove file from r/o mount, filegen); ATF_TC_FSAPPLY_RO(fileio, can read a file but not write it, filegen); ATF_TC_FSAPPLY_RO(attrs, can query but not change attributes, filegen); +ATF_TC_FSAPPLY_RO(createdir, create directory on r/o mount, nullgen); +ATF_TC_FSAPPLY_RO(createfifo, create fifo on r/o mount, nullgen); +ATF_TC_FSAPPLY_RO(createsymlink, create symlink on r/o mount, nullgen); +ATF_TC_FSAPPLY_RO(createlink, create hardlink on r/o mount, filegen); ATF_TP_ADD_TCS(tp) { @@ -150,6 +194,10 @@ ATF_TP_FSAPPLY_RO(rmfile); ATF_TP_FSAPPLY_RO(fileio); ATF_TP_FSAPPLY_RO(attrs); + ATF_TP_FSAPPLY_RO(createdir); + ATF_TP_FSAPPLY_RO(createfifo); + ATF_TP_FSAPPLY_RO(createsymlink); + ATF_TP_FSAPPLY_RO(createlink); return atf_no_error(); } Index: src/tests/fs/vfs/t_vnops.c diff -u src/tests/fs/vfs/t_vnops.c:1.13 src/tests/fs/vfs/t_vnops.c:1.14 --- src/tests/fs/vfs/t_vnops.c:1.13 Mon Jan 31 10:01:26 2011 +++ src/tests/fs/vfs/t_vnops.c Tue Feb 22 21:23:19 2011 @@ -1,4 +1,4 @@ -/* $NetBSD: t_vnops.c,v 1.13 2011/01/31 10:01:26 pooka Exp $ */ +/* $NetBSD: t_vnops.c,v 1.14 2011/02/22 21:23:19 yamt Exp $ */ /*- * Copyright (c) 2010 The NetBSD Foundation, Inc. @@ -409,6 +409,26 @@ } static void +create_exist(const atf_tc_t *tc, const char *mp) +{ + const char *name = hoge; + int fd; + + RL(rump_sys_chdir(mp)); + RL(fd = rump_sys_open(name, O_RDWR|O_CREAT|O_EXCL, 0666)); + RL(rump_sys_close(fd)); + RL(rump_sys_unlink(name)); + RL(fd = rump_sys_open(name, O_RDWR|O_CREAT, 0666)); + RL(rump_sys_close(fd)); + RL(fd = rump_sys_open(name, O_RDWR|O_CREAT, 0666)); + RL(rump_sys_close(fd)); + ATF_REQUIRE_ERRNO(EEXIST, + (fd = rump_sys_open(name, O_RDWR|O_CREAT|O_EXCL, 0666))); + RL(rump_sys_unlink(name)); + RL(rump_sys_chdir(/)); +} + +static void rename_nametoolong(const atf_tc_t *tc, const char *mp) { char *name; @@ -693,6 +713,7 @@ ATF_TC_FSAPPLY(rename_dotdot, rename dir ..); ATF_TC_FSAPPLY(rename_reg_nodir, rename regular files, no subdirectories); ATF_TC_FSAPPLY(create_nametoolong, create file with name too long); +ATF_TC_FSAPPLY(create_exist, create with O_EXCL); ATF_TC_FSAPPLY(rename_nametoolong, rename to file with name too long); ATF_TC_FSAPPLY(symlink_zerolen, symlink with 0-len target); ATF_TC_FSAPPLY(attrs, check setting attributes works); @@ -710,6 +731,7 @@ ATF_TP_FSAPPLY(rename_dotdot); ATF_TP_FSAPPLY(rename_reg_nodir); ATF_TP_FSAPPLY(create_nametoolong); + ATF_TP_FSAPPLY(create_exist); ATF_TP_FSAPPLY(rename_nametoolong); ATF_TP_FSAPPLY(symlink_zerolen); ATF_TP_FSAPPLY(attrs);
CVS commit: src
Module Name:src Committed By: yamt Date: Tue Feb 22 21:31:16 UTC 2011 Added Files: src/common/lib/libc/gen: radixtree.c src/sys/sys: radixtree.h Log Message: an implementation of radix tree. the idea from linux. To generate a diff of this commit: cvs rdiff -u -r0 -r1.1 src/common/lib/libc/gen/radixtree.c cvs rdiff -u -r0 -r1.1 src/sys/sys/radixtree.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Added files: Index: src/common/lib/libc/gen/radixtree.c diff -u /dev/null src/common/lib/libc/gen/radixtree.c:1.1 --- /dev/null Tue Feb 22 21:31:16 2011 +++ src/common/lib/libc/gen/radixtree.c Tue Feb 22 21:31:15 2011 @@ -0,0 +1,1122 @@ +/* $NetBSD: radixtree.c,v 1.1 2011/02/22 21:31:15 yamt Exp $ */ + +/*- + * Copyright (c)2011 YAMAMOTO Takashi, + * 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 AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + */ + +/* + * radix tree + * + * it's designed to work efficiently with dense index distribution. + * the memory consumption (number of necessary intermediate nodes) + * heavily depends on index distribution. basically, more dense index + * distribution consumes less nodes per item. + * approximately, + * the best case: about RADIX_TREE_PTR_PER_NODE items per node. + * the worst case: RADIX_TREE_MAX_HEIGHT nodes per item. + */ + +#include sys/cdefs.h + +#if defined(_KERNEL) +__KERNEL_RCSID(0, $NetBSD: radixtree.c,v 1.1 2011/02/22 21:31:15 yamt Exp $); +#include sys/param.h +#include sys/null.h +#include sys/pool.h +#include sys/radixtree.h +#else /* defined(_KERNEL) */ +__RCSID($NetBSD: radixtree.c,v 1.1 2011/02/22 21:31:15 yamt Exp $); +#include assert.h +#include errno.h +#include stdbool.h +#include stdlib.h +#if 1 +#define KASSERT assert +#else +#define KASSERT(a) /* nothing */ +#endif +/* XXX */ +#if !defined(CTASSERT) +#define CTASSERT(x) /* nothing */ +#endif +#endif /* defined(_KERNEL) */ + +#include sys/radixtree.h + +#define RADIX_TREE_BITS_PER_HEIGHT 4 /* XXX tune */ +#define RADIX_TREE_PTR_PER_NODE (1 RADIX_TREE_BITS_PER_HEIGHT) +#define RADIX_TREE_MAX_HEIGHT (64 / RADIX_TREE_BITS_PER_HEIGHT) +CTASSERT((64 % RADIX_TREE_BITS_PER_HEIGHT) == 0); + +CTASSERT(((1 RADIX_TREE_TAG_ID_MAX) (sizeof(int) - 1)) == 0); +#define RADIX_TREE_TAG_MASK ((1 RADIX_TREE_TAG_ID_MAX) - 1) + +static inline void * +entry_ptr(void *p) +{ + + return (void *)((uintptr_t)p ~RADIX_TREE_TAG_MASK); +} + +static inline unsigned int +entry_tagmask(void *p) +{ + + return (uintptr_t)p RADIX_TREE_TAG_MASK; +} + +static inline void * +entry_compose(void *p, unsigned int tagmask) +{ + + return (void *)((uintptr_t)p | tagmask); +} + +static inline bool +entry_match_p(void *p, unsigned int tagmask) +{ + + KASSERT(entry_ptr(p) != NULL || entry_tagmask(p) == 0); + if (p == NULL) { + return false; + } + if (tagmask == 0) { + return true; + } + return (entry_tagmask(p) tagmask) != 0; +} + +static inline unsigned int +tagid_to_mask(radix_tree_tagid_t id) +{ + + return 1U id; +} + +/* + * radix_tree_node: an intermediate node + * + * we don't care the type of leaf nodes. they are just void *. + */ + +struct radix_tree_node { + void *n_ptrs[RADIX_TREE_PTR_PER_NODE]; + unsigned int n_nptrs; /* # of non-NULL pointers in n_ptrs */ +}; + +static unsigned int +any_children_tagmask(struct radix_tree_node *n) +{ + unsigned int mask; + int i; + + mask = 0; + for (i = 0; i RADIX_TREE_PTR_PER_NODE; i++) { + mask |= (unsigned int)(uintptr_t)n-n_ptrs[i]; + } + return mask RADIX_TREE_TAG_MASK; +} + +/* + * p_refs[0].pptr == t-t_root + * : + * p_refs[n].pptr == (*p_refs[n-1])-n_ptrs[x] + * : + * : + * p_refs[t-t_height].pptr == leaf_pointer + */ + +struct radix_tree_path { + struct
CVS commit: src/sys/dev/pci
Module Name:src Committed By: jmcneill Date: Tue Feb 22 23:20:16 UTC 2011 Modified Files: src/sys/dev/pci: pcidevs Log Message: Add Atheros AR8132, AR8151, AR8151 v2.0, AR8152 v1.1, and AR8152 v2.0 To generate a diff of this commit: cvs rdiff -u -r1.1060 -r1.1061 src/sys/dev/pci/pcidevs 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/pcidevs diff -u src/sys/dev/pci/pcidevs:1.1060 src/sys/dev/pci/pcidevs:1.1061 --- src/sys/dev/pci/pcidevs:1.1060 Mon Feb 21 13:38:18 2011 +++ src/sys/dev/pci/pcidevs Tue Feb 22 23:20:15 2011 @@ -1,4 +1,4 @@ -$NetBSD: pcidevs,v 1.1060 2011/02/21 13:38:18 njoly Exp $ +$NetBSD: pcidevs,v 1.1061 2011/02/22 23:20:15 jmcneill Exp $ /* * Copyright (c) 1995, 1996 Christopher G. Demetriou @@ -1101,8 +1101,13 @@ /* Attansic Technology Corp. */ product ATTANSIC ETHERNET_L1E 0x1026 L1E Gigabit Ethernet Adapter product ATTANSIC ETHERNET_GIGA 0x1048 L1 Gigabit Ethernet Adapter -product ATTANSIC AR8131 0x1063 Atheros AR8131 Gigabit Ethernet Adapter +product ATTANSIC AR8132 0x1062 AR8132 Fast Ethernet Adapter +product ATTANSIC AR8131 0x1063 AR8131 Gigabit Ethernet Adapter +product ATTANSIC AR8151 0x1073 AR8151 v1.0 Gigabit Ethernet Adapter +product ATTANSIC AR8151_V2 0x1083 AR8151 v2.0 Gigabit Ethernet Adapter product ATTANSIC ETHERNET_100 0x2048 L2 100 Mbit Ethernet Adapter +product ATTANSIC AR8152_B 0x2060 AR8152 v1.1 Fast Ethernet Adapter +product ATTANSIC AR8152_B2 0x2062 AR8152 v2.0 Fast Ethernet Adapter /* ATI products */ /* See http://www.x.org/wiki/Radeon%20ASICs */
CVS commit: src/sys/arch/i386/conf
Module Name:src Committed By: dyoung Date: Tue Feb 22 23:57:22 UTC 2011 Modified Files: src/sys/arch/i386/conf: ALL Log Message: Add CardBus to PCI bridge, ppb at cardbus, but comment it out for now. To generate a diff of this commit: cvs rdiff -u -r1.291 -r1.292 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.291 src/sys/arch/i386/conf/ALL:1.292 --- src/sys/arch/i386/conf/ALL:1.291 Sun Feb 20 15:41:22 2011 +++ src/sys/arch/i386/conf/ALL Tue Feb 22 23:57:22 2011 @@ -1,4 +1,4 @@ -# $NetBSD: ALL,v 1.291 2011/02/20 15:41:22 jmcneill Exp $ +# $NetBSD: ALL,v 1.292 2011/02/22 23:57:22 dyoung Exp $ # From NetBSD: GENERIC,v 1.787 2006/10/01 18:37:54 bouyer Exp # # ALL machine description file @@ -17,7 +17,7 @@ options INCLUDE_CONFIG_FILE # embed config file in kernel binary -#ident ALL-$Revision: 1.291 $ +#ident ALL-$Revision: 1.292 $ maxusers 64 # estimated number of users @@ -631,6 +631,9 @@ # CardBus serial interfaces com* at cardbus? function ? # Modems and serial cards +# Cardbus bridges +#ppb* at cardbus? function ? # Cardbus-PCI bridges (www.magma.com) + # ISA serial interfaces #options COM_HAYESP # adds Hayes ESP serial board support com0 at isa? port 0x3f8 irq 4 # Standard PC serial ports
CVS commit: src/sys/modules/if_alc
Module Name:src Committed By: jmcneill Date: Wed Feb 23 00:36:51 UTC 2011 Added Files: src/sys/modules/if_alc: Makefile if_alc.ioconf Log Message: module glue for alc@pci To generate a diff of this commit: cvs rdiff -u -r0 -r1.1 src/sys/modules/if_alc/Makefile \ src/sys/modules/if_alc/if_alc.ioconf Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Added files: Index: src/sys/modules/if_alc/Makefile diff -u /dev/null src/sys/modules/if_alc/Makefile:1.1 --- /dev/null Wed Feb 23 00:36:51 2011 +++ src/sys/modules/if_alc/Makefile Wed Feb 23 00:36:51 2011 @@ -0,0 +1,16 @@ +# $NetBSD: Makefile,v 1.1 2011/02/23 00:36:51 jmcneill Exp $ + +.include ../Makefile.inc + +.PATH: ${S}/dev/pci + +KMOD= if_alc +IOCONF= if_alc.ioconf + +SRCS= if_alc.c + +WARNS= 3 + +CPPFLAGS+= -DINET -DNVLAN=1 + +.include bsd.kmodule.mk Index: src/sys/modules/if_alc/if_alc.ioconf diff -u /dev/null src/sys/modules/if_alc/if_alc.ioconf:1.1 --- /dev/null Wed Feb 23 00:36:51 2011 +++ src/sys/modules/if_alc/if_alc.ioconf Wed Feb 23 00:36:51 2011 @@ -0,0 +1,10 @@ +# $NetBSD: if_alc.ioconf,v 1.1 2011/02/23 00:36:51 jmcneill Exp $ + +ioconf if_alc + +include conf/files +include dev/pci/files.pci + +pseudo-root pci* + +alc* at pci? dev ? function ?
CVS commit: src/sys/arch/i386/conf
Module Name:src Committed By: jmcneill Date: Wed Feb 23 00:45:56 UTC 2011 Modified Files: src/sys/arch/i386/conf: ALL GENERIC Log Message: add alc@pci To generate a diff of this commit: cvs rdiff -u -r1.292 -r1.293 src/sys/arch/i386/conf/ALL cvs rdiff -u -r1.1019 -r1.1020 src/sys/arch/i386/conf/GENERIC Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/i386/conf/ALL diff -u src/sys/arch/i386/conf/ALL:1.292 src/sys/arch/i386/conf/ALL:1.293 --- src/sys/arch/i386/conf/ALL:1.292 Tue Feb 22 23:57:22 2011 +++ src/sys/arch/i386/conf/ALL Wed Feb 23 00:45:56 2011 @@ -1,4 +1,4 @@ -# $NetBSD: ALL,v 1.292 2011/02/22 23:57:22 dyoung Exp $ +# $NetBSD: ALL,v 1.293 2011/02/23 00:45:56 jmcneill Exp $ # From NetBSD: GENERIC,v 1.787 2006/10/01 18:37:54 bouyer Exp # # ALL machine description file @@ -17,7 +17,7 @@ options INCLUDE_CONFIG_FILE # embed config file in kernel binary -#ident ALL-$Revision: 1.292 $ +#ident ALL-$Revision: 1.293 $ maxusers 64 # estimated number of users @@ -1007,6 +1007,7 @@ # PCI network interfaces age* at pci? dev ? function ? # Attansic/Atheros L1 Gigabit Ethernet an* at pci? dev ? function ? # Aironet PC4500/PC4800 (802.11) +alc* at pci? dev ? function ? # Attansic/Atheros L1C/L2C Ethernet ale* at pci? dev ? function ? # Attansic/Atheros L1E Ethernet ath* at pci? dev ? function ? # Atheros 5210/5211/5212 802.11 atw* at pci? dev ? function ? # ADMtek ADM8211 (802.11) Index: src/sys/arch/i386/conf/GENERIC diff -u src/sys/arch/i386/conf/GENERIC:1.1019 src/sys/arch/i386/conf/GENERIC:1.1020 --- src/sys/arch/i386/conf/GENERIC:1.1019 Sun Feb 20 13:42:45 2011 +++ src/sys/arch/i386/conf/GENERIC Wed Feb 23 00:45:56 2011 @@ -1,4 +1,4 @@ -# $NetBSD: GENERIC,v 1.1019 2011/02/20 13:42:45 jruoho Exp $ +# $NetBSD: GENERIC,v 1.1020 2011/02/23 00:45:56 jmcneill Exp $ # # GENERIC machine description file # @@ -22,7 +22,7 @@ options INCLUDE_CONFIG_FILE # embed config file in kernel binary -#ident GENERIC-$Revision: 1.1019 $ +#ident GENERIC-$Revision: 1.1020 $ maxusers 64 # estimated number of users @@ -947,6 +947,7 @@ # PCI network interfaces age* at pci? dev ? function ? # Attansic/Atheros L1 Gigabit Ethernet an* at pci? dev ? function ? # Aironet PC4500/PC4800 (802.11) +alc* at pci? dev ? function ? # Attansic/Atheros L1C/L2C Ethernet ale* at pci? dev ? function ? # Attansic/Atheros L1E Ethernet ath* at pci? dev ? function ? # Atheros 5210/5211/5212 802.11 atw* at pci? dev ? function ? # ADMtek ADM8211 (802.11)
CVS commit: src/sys/arch/amd64/conf
Module Name:src Committed By: jmcneill Date: Wed Feb 23 00:46:29 UTC 2011 Modified Files: src/sys/arch/amd64/conf: GENERIC Log Message: add alc@pci To generate a diff of this commit: cvs rdiff -u -r1.311 -r1.312 src/sys/arch/amd64/conf/GENERIC Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/amd64/conf/GENERIC diff -u src/sys/arch/amd64/conf/GENERIC:1.311 src/sys/arch/amd64/conf/GENERIC:1.312 --- src/sys/arch/amd64/conf/GENERIC:1.311 Mon Feb 21 16:24:29 2011 +++ src/sys/arch/amd64/conf/GENERIC Wed Feb 23 00:46:29 2011 @@ -1,4 +1,4 @@ -# $NetBSD: GENERIC,v 1.311 2011/02/21 16:24:29 pooka Exp $ +# $NetBSD: GENERIC,v 1.312 2011/02/23 00:46:29 jmcneill Exp $ # # GENERIC machine description file # @@ -22,7 +22,7 @@ options INCLUDE_CONFIG_FILE # embed config file in kernel binary -#ident GENERIC-$Revision: 1.311 $ +#ident GENERIC-$Revision: 1.312 $ maxusers 64 # estimated number of users @@ -659,6 +659,7 @@ # PCI network interfaces age* at pci? dev ? function ? # Attansic/Atheros L1 Gigabit Ethernet +alc* at pci? dev ? function ? # Attansic/Atheros L1C/L2C Ethernet ale* at pci? dev ? function ? # Attansic/Atheros L1E Ethernet an* at pci? dev ? function ? # Aironet PC4500/PC4800 (802.11) ath* at pci? dev ? function ? # Atheros 5210/5211/5212 802.11
CVS commit: src/doc
Module Name:src Committed By: taca Date: Wed Feb 23 01:09:18 UTC 2011 Modified Files: src/doc: 3RDPARTY Log Message: Postfix 2.8.1 has released. To generate a diff of this commit: cvs rdiff -u -r1.814 -r1.815 src/doc/3RDPARTY Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/doc/3RDPARTY diff -u src/doc/3RDPARTY:1.814 src/doc/3RDPARTY:1.815 --- src/doc/3RDPARTY:1.814 Sat Feb 19 19:42:07 2011 +++ src/doc/3RDPARTY Wed Feb 23 01:09:18 2011 @@ -1,4 +1,4 @@ -# $NetBSD: 3RDPARTY,v 1.814 2011/02/19 19:42:07 jruoho Exp $ +# $NetBSD: 3RDPARTY,v 1.815 2011/02/23 01:09:18 taca Exp $ # # This file contains a list of the software that has been integrated into # NetBSD where we are not the primary maintainer. @@ -896,7 +896,7 @@ Package: postfix Version: 2.7.2 -Current Vers: 2.8.0 +Current Vers: 2.8.1 Maintainer: Wietse Venema wie...@porcupine.org Archive Site: ftp://postfix.cloud9.net/official/ Home Page: http://www.postfix.org/
CVS commit: src/usr.sbin/mrouted
Module Name:src Committed By: dyoung Date: Wed Feb 23 01:23:04 UTC 2011 Modified Files: src/usr.sbin/mrouted: defs.h kern.c Log Message: Don't use bool as a variable name. Remove a bunch of parameter names form function prototypes. To generate a diff of this commit: cvs rdiff -u -r1.14 -r1.15 src/usr.sbin/mrouted/defs.h cvs rdiff -u -r1.10 -r1.11 src/usr.sbin/mrouted/kern.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.sbin/mrouted/defs.h diff -u src/usr.sbin/mrouted/defs.h:1.14 src/usr.sbin/mrouted/defs.h:1.15 --- src/usr.sbin/mrouted/defs.h:1.14 Wed Feb 21 21:01:10 2007 +++ src/usr.sbin/mrouted/defs.h Wed Feb 23 01:23:03 2011 @@ -1,4 +1,4 @@ -/* $NetBSD: defs.h,v 1.14 2007/02/21 21:01:10 hubertf Exp $ */ +/* $NetBSD: defs.h,v 1.15 2011/02/23 01:23:03 dyoung Exp $ */ /* * The mrouted program is covered by the license in the accompanying file @@ -255,19 +255,19 @@ extern int find_src_grp(u_int32_t, u_int32_t, u_int32_t); /* kern.c */ -extern void k_set_rcvbuf(int bufsize); -extern void k_hdr_include(int bool); -extern void k_set_ttl(int t); -extern void k_set_loop(int l); -extern void k_set_if(u_int32_t ifa); -extern void k_join(u_int32_t grp, u_int32_t ifa); -extern void k_leave(u_int32_t grp, u_int32_t ifa); +extern void k_set_rcvbuf(int); +extern void k_hdr_include(int); +extern void k_set_ttl(int); +extern void k_set_loop(int); +extern void k_set_if(u_int32_t); +extern void k_join(u_int32_t, u_int32_t); +extern void k_leave(u_int32_t, u_int32_t); extern void k_init_dvmrp(void); extern void k_stop_dvmrp(void); -extern void k_add_vif(vifi_t vifi, struct uvif *v); -extern void k_del_vif(vifi_t vifi); -extern void k_add_rg(u_int32_t origin, struct gtable *g); -extern int k_del_rg(u_int32_t origin, struct gtable *g); +extern void k_add_vif(vifi_t, struct uvif *); +extern void k_del_vif(vifi_t); +extern void k_add_rg(u_int32_t, struct gtable *); +extern int k_del_rg(u_int32_t, struct gtable *); extern int k_get_version(void); #ifdef SNMP Index: src/usr.sbin/mrouted/kern.c diff -u src/usr.sbin/mrouted/kern.c:1.10 src/usr.sbin/mrouted/kern.c:1.11 --- src/usr.sbin/mrouted/kern.c:1.10 Tue May 9 20:18:09 2006 +++ src/usr.sbin/mrouted/kern.c Wed Feb 23 01:23:03 2011 @@ -1,4 +1,4 @@ -/* $NetBSD: kern.c,v 1.10 2006/05/09 20:18:09 mrg Exp $ */ +/* $NetBSD: kern.c,v 1.11 2011/02/23 01:23:03 dyoung Exp $ */ /* * The mrouted program is covered by the license in the accompanying file @@ -21,12 +21,12 @@ } -void k_hdr_include(int bool) +void k_hdr_include(int onoff) { #ifdef IP_HDRINCL if (setsockopt(igmp_socket, IPPROTO_IP, IP_HDRINCL, - (char *)bool, sizeof(bool)) 0) - logit(LOG_ERR, errno, setsockopt IP_HDRINCL %u, bool); + (char *)onoff, sizeof(onoff)) 0) + logit(LOG_ERR, errno, setsockopt IP_HDRINCL %u, onoff); #endif }
CVS commit: src/sys/dev/pci
Module Name:src Committed By: jmcneill Date: Wed Feb 23 02:25:04 UTC 2011 Modified Files: src/sys/dev/pci: if_alc.c if_alcreg.h Log Message: catch up with FreeBSD driver, adds support for AR815x chips To generate a diff of this commit: cvs rdiff -u -r1.1 -r1.2 src/sys/dev/pci/if_alc.c src/sys/dev/pci/if_alcreg.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/dev/pci/if_alc.c diff -u src/sys/dev/pci/if_alc.c:1.1 src/sys/dev/pci/if_alc.c:1.2 --- src/sys/dev/pci/if_alc.c:1.1 Wed Feb 23 00:35:29 2011 +++ src/sys/dev/pci/if_alc.c Wed Feb 23 02:25:04 2011 @@ -26,7 +26,7 @@ * SUCH DAMAGE. */ -/* Driver for Atheros AR8131/AR8132 PCIe Ethernet. */ +/* Driver for Atheros AR813x/AR815x PCIe Ethernet. */ #ifdef _KERNEL_OPT #include vlan.h @@ -79,6 +79,25 @@ #include dev/pci/if_alcreg.h +/* + * Devices supported by this driver. + */ +static struct alc_ident alc_ident_table[] = { + { PCI_VENDOR_ATTANSIC, PCI_PRODUCT_ATTANSIC_AR8131, 9 * 1024, + Atheros AR8131 PCIe Gigabit Ethernet }, + { PCI_VENDOR_ATTANSIC, PCI_PRODUCT_ATTANSIC_AR8132, 9 * 1024, + Atheros AR8132 PCIe Fast Ethernet }, + { PCI_VENDOR_ATTANSIC, PCI_PRODUCT_ATTANSIC_AR8151, 6 * 1024, + Atheros AR8151 v1.0 PCIe Gigabit Ethernet }, + { PCI_VENDOR_ATTANSIC, PCI_PRODUCT_ATTANSIC_AR8151_V2, 6 * 1024, + Atheros AR8151 v2.0 PCIe Gigabit Ethernet }, + { PCI_VENDOR_ATTANSIC, PCI_PRODUCT_ATTANSIC_AR8152_B, 6 * 1024, + Atheros AR8152 v1.1 PCIe Fast Ethernet }, + { PCI_VENDOR_ATTANSIC, PCI_PRODUCT_ATTANSIC_AR8152_B2, 6 * 1024, + Atheros AR8152 v2.0 PCIe Fast Ethernet }, + { 0, 0, 0, NULL }, +}; + static int alc_match(device_t, cfdata_t, void *); static void alc_attach(device_t, device_t, void *); static int alc_detach(device_t, int); @@ -90,11 +109,13 @@ static int alc_mediachange(struct ifnet *); static void alc_mediastatus(struct ifnet *, struct ifmediareq *); -static void alc_aspm(struct alc_softc *); +static void alc_aspm(struct alc_softc *, int); static void alc_disable_l0s_l1(struct alc_softc *); static int alc_dma_alloc(struct alc_softc *); static void alc_dma_free(struct alc_softc *); static int alc_encap(struct alc_softc *, struct mbuf **); +static struct alc_ident * + alc_find_ident(struct pci_attach_args *); static void alc_get_macaddr(struct alc_softc *); static void alc_init_cmb(struct alc_softc *); static void alc_init_rr_ring(struct alc_softc *); @@ -228,8 +249,8 @@ reg = CSR_READ_4(sc, ALC_MAC_CFG); reg |= MAC_CFG_TX_ENB | MAC_CFG_RX_ENB; CSR_WRITE_4(sc, ALC_MAC_CFG, reg); + alc_aspm(sc, IFM_SUBTYPE(mii-mii_media_active)); } - alc_aspm(sc); } static void @@ -261,44 +282,81 @@ return (error); } +static struct alc_ident * +alc_find_ident(struct pci_attach_args *pa) +{ + struct alc_ident *ident; + uint16_t vendor, devid; + + vendor = PCI_VENDOR(pa-pa_id); + devid = PCI_PRODUCT(pa-pa_id); + for (ident = alc_ident_table; ident-name != NULL; ident++) { + if (vendor == ident-vendorid devid == ident-deviceid) + return (ident); + } + + return (NULL); +} + static int alc_match(device_t dev, cfdata_t match, void *aux) { struct pci_attach_args *pa = aux; - if (PCI_VENDOR(pa-pa_id) != PCI_VENDOR_ATTANSIC) - return 0; - - switch (PCI_PRODUCT(pa-pa_id)) { - case PCI_PRODUCT_ATTANSIC_AR8131: - case PCI_PRODUCT_ATTANSIC_AR8132: - case PCI_PRODUCT_ATTANSIC_AR8152_B2: - break; - default: - return 0; - } - - return 1; + return alc_find_ident(pa) != NULL; } static void alc_get_macaddr(struct alc_softc *sc) { uint32_t ea[2], opt; - int i; + uint16_t val; + int eeprom, i; + eeprom = 0; opt = CSR_READ_4(sc, ALC_OPT_CFG); - if ((CSR_READ_4(sc, ALC_TWSI_DEBUG) TWSI_DEBUG_DEV_EXIST) != 0) { + if ((CSR_READ_4(sc, ALC_MASTER_CFG) MASTER_OTP_SEL) != 0 + (CSR_READ_4(sc, ALC_TWSI_DEBUG) TWSI_DEBUG_DEV_EXIST) != 0) { /* * EEPROM found, let TWSI reload EEPROM configuration. * This will set ethernet address of controller. */ - if ((opt OPT_CFG_CLK_ENB) == 0) { - opt |= OPT_CFG_CLK_ENB; - CSR_WRITE_4(sc, ALC_OPT_CFG, opt); - CSR_READ_4(sc, ALC_OPT_CFG); - DELAY(1000); + eeprom++; + switch (sc-alc_ident-deviceid) { + case PCI_PRODUCT_ATTANSIC_AR8131: + case PCI_PRODUCT_ATTANSIC_AR8132: + if ((opt OPT_CFG_CLK_ENB) == 0) { +opt |= OPT_CFG_CLK_ENB; +CSR_WRITE_4(sc, ALC_OPT_CFG, opt); +CSR_READ_4(sc, ALC_OPT_CFG); +DELAY(1000); + } + break; + case PCI_PRODUCT_ATTANSIC_AR8151: + case PCI_PRODUCT_ATTANSIC_AR8151_V2: + case PCI_PRODUCT_ATTANSIC_AR8152_B: + case PCI_PRODUCT_ATTANSIC_AR8152_B2: + alc_miibus_writereg(sc-sc_dev, sc-alc_phyaddr, + ALC_MII_DBG_ADDR, 0x00); + val = alc_miibus_readreg(sc-sc_dev, sc-alc_phyaddr, + ALC_MII_DBG_DATA); + alc_miibus_writereg(sc-sc_dev, sc-alc_phyaddr, + ALC_MII_DBG_DATA, val 0xFF7F); + alc_miibus_writereg(sc-sc_dev, sc-alc_phyaddr, + ALC_MII_DBG_ADDR,
CVS commit: src
Module Name:src Committed By: jmcneill Date: Wed Feb 23 02:47:46 UTC 2011 Modified Files: src/distrib/sets/lists/man: mi src/share/man/man4: Makefile Added Files: src/share/man/man4: alc.4 Log Message: add alc(4) man page To generate a diff of this commit: cvs rdiff -u -r1.1290 -r1.1291 src/distrib/sets/lists/man/mi cvs rdiff -u -r1.552 -r1.553 src/share/man/man4/Makefile cvs rdiff -u -r0 -r1.1 src/share/man/man4/alc.4 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/man/mi diff -u src/distrib/sets/lists/man/mi:1.1290 src/distrib/sets/lists/man/mi:1.1291 --- src/distrib/sets/lists/man/mi:1.1290 Sun Feb 20 08:31:46 2011 +++ src/distrib/sets/lists/man/mi Wed Feb 23 02:47:45 2011 @@ -1,4 +1,4 @@ -# $NetBSD: mi,v 1.1290 2011/02/20 08:31:46 jruoho Exp $ +# $NetBSD: mi,v 1.1291 2011/02/23 02:47:45 jmcneill Exp $ # # Note: don't delete entries from here - mark them as obsolete instead. # @@ -677,6 +677,7 @@ ./usr/share/man/cat4/aibs.0 man-sys-catman .cat ./usr/share/man/cat4/aic.0 man-sys-catman .cat ./usr/share/man/cat4/akbd.0 man-sys-catman .cat +./usr/share/man/cat4/alc.0 man-sys-catman .cat ./usr/share/man/cat4/ale.0 man-sys-catman .cat ./usr/share/man/cat4/alipm.0 man-sys-catman .cat ./usr/share/man/cat4/alpha/apecs.0 man-sys-catman .cat @@ -3478,6 +3479,7 @@ ./usr/share/man/html4/aibs.html man-sys-htmlman html ./usr/share/man/html4/aic.html man-sys-htmlman html ./usr/share/man/html4/akbd.html man-sys-htmlman html +./usr/share/man/html4/alc.html man-sys-htmlman html ./usr/share/man/html4/ale.html man-sys-htmlman html ./usr/share/man/html4/alipm.html man-sys-htmlman html ./usr/share/man/html4/alpha/apecs.html man-sys-htmlman html @@ -5976,6 +5978,7 @@ ./usr/share/man/man4/aibs.4 man-sys-man .man ./usr/share/man/man4/aic.4 man-sys-man .man ./usr/share/man/man4/akbd.4 man-sys-man .man +./usr/share/man/man4/alc.4 man-sys-man .man ./usr/share/man/man4/ale.4 man-sys-man .man ./usr/share/man/man4/alipm.4 man-sys-man .man ./usr/share/man/man4/alpha/apecs.4 man-sys-man .man Index: src/share/man/man4/Makefile diff -u src/share/man/man4/Makefile:1.552 src/share/man/man4/Makefile:1.553 --- src/share/man/man4/Makefile:1.552 Sun Feb 20 08:31:46 2011 +++ src/share/man/man4/Makefile Wed Feb 23 02:47:46 2011 @@ -1,11 +1,11 @@ -# $NetBSD: Makefile,v 1.552 2011/02/20 08:31:46 jruoho Exp $ +# $NetBSD: Makefile,v 1.553 2011/02/23 02:47:46 jmcneill Exp $ # @(#)Makefile 8.1 (Berkeley) 6/18/93 MAN= aac.4 ac97.4 acardide.4 aceride.4 acphy.4 \ adbbt.4 adbkbd.4 adbms.4 \ adc.4 admtemp.4 adv.4 adw.4 age.4 agp.4 agr.4 ahb.4 ahc.4 \ ahcisata.4 ahd.4 \ - aibs.4 ale.4 alipm.4 altmem.4 amdpm.4 amdtemp.4 amhphy.4 \ + aibs.4 alc.4 ale.4 alipm.4 altmem.4 amdpm.4 amdtemp.4 amhphy.4 \ amr.4 aps.4 \ an.4 arcmsr.4 aria.4 artsata.4 ata.4 atalk.4 ataraid.4 \ ath.4 atphy.4 atppc.4 attimer.4 atw.4 \ Added files: Index: src/share/man/man4/alc.4 diff -u /dev/null src/share/man/man4/alc.4:1.1 --- /dev/null Wed Feb 23 02:47:46 2011 +++ src/share/man/man4/alc.4 Wed Feb 23 02:47:46 2011 @@ -0,0 +1,63 @@ +.\ $NetBSD: alc.4,v 1.1 2011/02/23 02:47:46 jmcneill Exp $ +.\ +.\ Copyright (c) 2009 Kevin Lo ke...@openbsd.org +.\ +.\ Permission to use, copy, modify, and distribute this software for any +.\ purpose with or without fee is hereby granted, provided that the above +.\ copyright notice and this permission notice appear in all copies. +.\ +.\ THE SOFTWARE IS PROVIDED AS IS AND THE AUTHOR DISCLAIMS ALL WARRANTIES +.\ WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF +.\ MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR +.\ ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES +.\ WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN +.\ ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF +.\ OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. +.\ +.Dd February 22, 2011 +.Dt ALE 4 +.Os +.Sh NAME +.Nm alc +.Nd Atheros AR813x/AR815x Ethernet device +.Sh SYNOPSIS +.Cd alc* at pci? +.Cd atphy* at mii? +.Cd ukphy* at mii? +.Sh DESCRIPTION +The +.Nm +driver provides support for Ethernet interfaces based on the +Atheros AR8131/AR8132/AR8151/AR8152 Ethernet chipsets. +.Pp +The following +.Ar media +types are supported: +.Pp +.Bl -tag -width autoselect -compact +.It Cm autoselect +Enable autoselection of the media type and options. +.It Cm 10baseT +Set 10Mbps operation. +.It Cm 100baseTX +Set 100Mbps (Fast Ethernet) operation. +.It Cm 1000baseT +Set 1000Mbps (Gigabit Ethernet) operation (AR8131/AR8151 only). +.El +.Pp +For more information on configuring this device, see +.Xr ifconfig 8 . +.Sh SEE ALSO +.Xr arp 4 , +.Xr atphy 4 , +.Xr ifmedia 4 , +.Xr intro 4 , +.Xr netintro 4 , +.Xr pci 4 , +.Xr ukphy 4 , +.Xr
CVS commit: src/doc
Module Name:src Committed By: jmcneill Date: Wed Feb 23 02:49:55 UTC 2011 Modified Files: src/doc: CHANGES Log Message: alc(4): Add a driver for Atheros AR813x/AR815x Ethernet. To generate a diff of this commit: cvs rdiff -u -r1.1513 -r1.1514 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.1513 src/doc/CHANGES:1.1514 --- src/doc/CHANGES:1.1513 Tue Feb 22 02:44:58 2011 +++ src/doc/CHANGES Wed Feb 23 02:49:54 2011 @@ -1,4 +1,4 @@ -# LIST OF CHANGES FROM LAST RELEASE: $Revision: 1.1513 $ +# LIST OF CHANGES FROM LAST RELEASE: $Revision: 1.1514 $ # # # [Note: This file does not mention every change made to the NetBSD source tree. @@ -117,9 +117,9 @@ rump: Implement a virtual block device driver. [pooka 20090113] rump: Support __RENAME in syscall interfaces and expose the non-compat symbol name in the header. [pooka 20090113] - age(4): Add a driver for Attensic/Atheros L1 Gigabit Ethernet. + age(4): Add a driver for Attansic/Atheros L1 Gigabit Ethernet. From FreeBSD via OpenBSD. [cegger 20090116] - atphy(4): Add a driver for Attensic/Atheros F1 PHY. + atphy(4): Add a driver for Attansic/Atheros F1 PHY. From FreeBSD via OpenBSD. [cegger 20090116] atf(7): Import 0.6. [jmmv 20090119] msdosfs: The default behavior when mounting empty file systems has @@ -250,7 +250,7 @@ From FreeBSD and OpenBSD. [msaitoh 20090419] queue(3): Add SLIST_FOREACH_SAFE, STAILQ_FOREACH_SAFE, STAILQ_LAST, SIMPLEQ_CONCAT, and SIMPLEQ_LAST. [mschuett 20090420] - ale(4): Add a driver for Attensic/Atheros L1E Gigabit Ethernet. + ale(4): Add a driver for Attansic/Atheros L1E Gigabit Ethernet. From OpenBSD and improvements from Kevin Lahey. [cegger 20090420] sdmmc(4): Add a driver for SD/MMC from OpenBSD. [nonaka 20090421] @@ -870,3 +870,5 @@ by Mateusz Kocielski, improved and integrated with Postfix by Anon Ymous. Supported mechs are: ANONYMOUS, CRAM-MD5, DIGEST-MD5, EXTERNAL, GSSAPI, LOGIN, PLAIN [christos 20110221] + alc(4): Add a driver for Atheros AR813x/AR815x Ethernet. + [jmcneill 20110222]
CVS commit: src/sys
Module Name:src Committed By: joerg Date: Wed Feb 23 02:58:40 UTC 2011 Modified Files: src/sys/arch/amd64/amd64: netbsd32_machdep.c src/sys/arch/amd64/include: mcontext.h src/sys/arch/arm/include: mcontext.h src/sys/arch/i386/include: mcontext.h src/sys/arch/m68k/include: mcontext.h src/sys/compat/sys: ucontext.h src/sys/sys: ucontext.h Log Message: Fix ucontext32_t on AMD64. Add optional compile time assertions for ucontext_t and ucontext32_t to ensure that they don't change. Provide the constants for AMD64, ARM, i386, and M68K. To generate a diff of this commit: cvs rdiff -u -r1.70 -r1.71 src/sys/arch/amd64/amd64/netbsd32_machdep.c cvs rdiff -u -r1.11 -r1.12 src/sys/arch/amd64/include/mcontext.h cvs rdiff -u -r1.6 -r1.7 src/sys/arch/arm/include/mcontext.h cvs rdiff -u -r1.7 -r1.8 src/sys/arch/i386/include/mcontext.h cvs rdiff -u -r1.6 -r1.7 src/sys/arch/m68k/include/mcontext.h cvs rdiff -u -r1.3 -r1.4 src/sys/compat/sys/ucontext.h cvs rdiff -u -r1.12 -r1.13 src/sys/sys/ucontext.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/amd64/amd64/netbsd32_machdep.c diff -u src/sys/arch/amd64/amd64/netbsd32_machdep.c:1.70 src/sys/arch/amd64/amd64/netbsd32_machdep.c:1.71 --- src/sys/arch/amd64/amd64/netbsd32_machdep.c:1.70 Mon Feb 7 03:54:45 2011 +++ src/sys/arch/amd64/amd64/netbsd32_machdep.c Wed Feb 23 02:58:38 2011 @@ -1,4 +1,4 @@ -/* $NetBSD: netbsd32_machdep.c,v 1.70 2011/02/07 03:54:45 chs Exp $ */ +/* $NetBSD: netbsd32_machdep.c,v 1.71 2011/02/23 02:58:38 joerg Exp $ */ /* * Copyright (c) 2001 Wasabi Systems, Inc. @@ -36,7 +36,7 @@ */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: netbsd32_machdep.c,v 1.70 2011/02/07 03:54:45 chs Exp $); +__KERNEL_RCSID(0, $NetBSD: netbsd32_machdep.c,v 1.71 2011/02/23 02:58:38 joerg Exp $); #ifdef _KERNEL_OPT #include opt_compat_netbsd.h @@ -870,7 +870,7 @@ fpusave_lwp(l, false); } memcpy(pcb-pcb_savefpu.fp_fxsave, mcp-__fpregs, - sizeof (mcp-__fpregs)); ++ sizeof (pcb-pcb_savefpu.fp_fxsave)); /* If not set already. */ l-l_md.md_flags |= MDP_USEDFPU; } Index: src/sys/arch/amd64/include/mcontext.h diff -u src/sys/arch/amd64/include/mcontext.h:1.11 src/sys/arch/amd64/include/mcontext.h:1.12 --- src/sys/arch/amd64/include/mcontext.h:1.11 Sun Oct 26 00:08:15 2008 +++ src/sys/arch/amd64/include/mcontext.h Wed Feb 23 02:58:39 2011 @@ -1,4 +1,4 @@ -/* $NetBSD: mcontext.h,v 1.11 2008/10/26 00:08:15 mrg Exp $ */ +/* $NetBSD: mcontext.h,v 1.12 2011/02/23 02:58:39 joerg Exp $ */ /*- * Copyright (c) 1999 The NetBSD Foundation, Inc. @@ -80,6 +80,7 @@ #define _UC_SETSTACK 0x0001 #define _UC_CLRSTACK 0x0002 +#define __UCONTEXT_SIZE 784 #ifdef _KERNEL @@ -116,14 +117,31 @@ /* * Floating point register state */ -typedef struct fxsave64 __fpregset32_t; +typedef struct { + union { + struct { + int __fp_state[27]; /* Environment and registers */ + int __fp_status; /* Software status word */ + } __fpchip_state; + struct { + char __fp_emul[246]; + char __fp_epad[2]; + } __fp_emul_space; + struct { + char __fp_xmm[512]; + } __fp_xmm_state; + int __fp_fpregs[128]; + } __fp_reg_set; + int __fp_wregs[33]; /* Weitek? */ +} __fpregset32_t; typedef struct { __gregset32_t __gregs; __fpregset32_t __fpregs; } mcontext32_t; -#define _UC_MACHINE_PAD32 5 +#define _UC_MACHINE32_PAD 5 +#define __UCONTEXT32_SIZE 776 struct trapframe; struct lwp; Index: src/sys/arch/arm/include/mcontext.h diff -u src/sys/arch/arm/include/mcontext.h:1.6 src/sys/arch/arm/include/mcontext.h:1.7 --- src/sys/arch/arm/include/mcontext.h:1.6 Mon Apr 28 20:23:14 2008 +++ src/sys/arch/arm/include/mcontext.h Wed Feb 23 02:58:39 2011 @@ -1,4 +1,4 @@ -/* $NetBSD: mcontext.h,v 1.6 2008/04/28 20:23:14 martin Exp $ */ +/* $NetBSD: mcontext.h,v 1.7 2011/02/23 02:58:39 joerg Exp $ */ /*- * Copyright (c) 2001, 2002 The NetBSD Foundation, Inc. @@ -104,4 +104,6 @@ #define _UC_MACHINE_SET_PC(uc, pc) _UC_MACHINE_PC(uc) = (pc) +#define __UCONTEXT_SIZE 256 + #endif /* !_ARM_MCONTEXT_H_ */ Index: src/sys/arch/i386/include/mcontext.h diff -u src/sys/arch/i386/include/mcontext.h:1.7 src/sys/arch/i386/include/mcontext.h:1.8 --- src/sys/arch/i386/include/mcontext.h:1.7 Mon Apr 28 20:23:24 2008 +++ src/sys/arch/i386/include/mcontext.h Wed Feb 23 02:58:39 2011 @@ -1,4 +1,4 @@ -/* $NetBSD: mcontext.h,v 1.7 2008/04/28 20:23:24 martin Exp $ */ +/* $NetBSD: mcontext.h,v 1.8 2011/02/23 02:58:39 joerg Exp $ */ /*- * Copyright (c) 1999 The NetBSD Foundation, Inc. @@ -123,4 +123,6 @@ #define _UC_MACHINE_SET_PC(uc, pc) _UC_MACHINE_PC(uc) = (pc) +#define __UCONTEXT_SIZE 776 + #endif /* !_I386_MCONTEXT_H_ */ Index: src/sys/arch/m68k/include/mcontext.h diff -u src/sys/arch/m68k/include/mcontext.h:1.6 src/sys/arch/m68k/include/mcontext.h:1.7 ---
CVS commit: src
Module Name:src Committed By: joerg Date: Wed Feb 23 03:09:05 UTC 2011 Modified Files: src/external/bsd/llvm: Makefile.inc src/external/bsd/llvm/bin/clang: Makefile src/external/bsd/llvm/bin/tblgen: Makefile src/external/bsd/llvm/lib: Makefile src/external/bsd/llvm/lib/libLLVMTarget: Makefile src/external/bsd/llvm/lib/libclangStaticAnalyzerCheckers: Makefile Added Files: src/external/bsd/llvm/lib/libLLVMX86Utils: Makefile src/tools/llvm-lib/libLLVMX86Utils: Makefile Log Message: Update LLVM/Clang snapshot. This brings improvements for the integrated assembler and support for -cxx-isystem in the driver. To generate a diff of this commit: cvs rdiff -u -r1.2 -r1.3 src/external/bsd/llvm/Makefile.inc cvs rdiff -u -r1.2 -r1.3 src/external/bsd/llvm/bin/clang/Makefile cvs rdiff -u -r1.2 -r1.3 src/external/bsd/llvm/bin/tblgen/Makefile cvs rdiff -u -r1.2 -r1.3 src/external/bsd/llvm/lib/Makefile cvs rdiff -u -r1.1 -r1.2 src/external/bsd/llvm/lib/libLLVMTarget/Makefile cvs rdiff -u -r0 -r1.1 src/external/bsd/llvm/lib/libLLVMX86Utils/Makefile cvs rdiff -u -r1.2 -r1.3 \ src/external/bsd/llvm/lib/libclangStaticAnalyzerCheckers/Makefile cvs rdiff -u -r0 -r1.1 src/tools/llvm-lib/libLLVMX86Utils/Makefile Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/external/bsd/llvm/Makefile.inc diff -u src/external/bsd/llvm/Makefile.inc:1.2 src/external/bsd/llvm/Makefile.inc:1.3 --- src/external/bsd/llvm/Makefile.inc:1.2 Thu Feb 17 18:35:35 2011 +++ src/external/bsd/llvm/Makefile.inc Wed Feb 23 03:09:02 2011 @@ -1,12 +1,12 @@ -# $NetBSD: Makefile.inc,v 1.2 2011/02/17 18:35:35 joerg Exp $ +# $NetBSD: Makefile.inc,v 1.3 2011/02/23 03:09:02 joerg Exp $ .if !defined(LLVM_TOPLEVEL_MK) LLVM_TOPLEVEL_MK= .include bsd.own.mk -LLVM_REVISION= 125648 -CLANG_REVISION= 125648 +LLVM_REVISION= 126223 +CLANG_REVISION= 126223 LLVM_SRCDIR:= ${.PARSEDIR}/dist/llvm CLANG_SRCDIR:= ${.PARSEDIR}/dist/clang Index: src/external/bsd/llvm/bin/clang/Makefile diff -u src/external/bsd/llvm/bin/clang/Makefile:1.2 src/external/bsd/llvm/bin/clang/Makefile:1.3 --- src/external/bsd/llvm/bin/clang/Makefile:1.2 Thu Feb 17 18:35:35 2011 +++ src/external/bsd/llvm/bin/clang/Makefile Wed Feb 23 03:09:03 2011 @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.2 2011/02/17 18:35:35 joerg Exp $ +# $NetBSD: Makefile,v 1.3 2011/02/23 03:09:03 joerg Exp $ PROG_CXX= clang NOMAN= yes @@ -39,6 +39,7 @@ BitWriter \ X86CodeGen \ X86TargetInfo \ + X86Utils \ X86AsmParser \ X86Disassembler \ X86AsmPrinter \ Index: src/external/bsd/llvm/bin/tblgen/Makefile diff -u src/external/bsd/llvm/bin/tblgen/Makefile:1.2 src/external/bsd/llvm/bin/tblgen/Makefile:1.3 --- src/external/bsd/llvm/bin/tblgen/Makefile:1.2 Thu Feb 17 18:35:35 2011 +++ src/external/bsd/llvm/bin/tblgen/Makefile Wed Feb 23 03:09:03 2011 @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.2 2011/02/17 18:35:35 joerg Exp $ +# $NetBSD: Makefile,v 1.3 2011/02/23 03:09:03 joerg Exp $ PROG_CXX= llvm-tblgen NOMAN= yes @@ -28,6 +28,8 @@ DisassemblerEmitter.cpp \ EDEmitter.cpp \ FastISelEmitter.cpp \ + FixedLenDecoderEmitter.cpp \ + FixedLenDecoderEmitter.h \ InstrEnumEmitter.cpp \ InstrInfoEmitter.cpp \ IntrinsicEmitter.cpp \ Index: src/external/bsd/llvm/lib/Makefile diff -u src/external/bsd/llvm/lib/Makefile:1.2 src/external/bsd/llvm/lib/Makefile:1.3 --- src/external/bsd/llvm/lib/Makefile:1.2 Thu Feb 17 18:35:35 2011 +++ src/external/bsd/llvm/lib/Makefile Wed Feb 23 03:09:04 2011 @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.2 2011/02/17 18:35:35 joerg Exp $ +# $NetBSD: Makefile,v 1.3 2011/02/23 03:09:04 joerg Exp $ SUBDIR= \ libLLVMAnalysis \ @@ -26,7 +26,8 @@ libLLVMX86AsmParser \ libLLVMX86AsmPrinter \ libLLVMX86Disassembler \ - libLLVMX86TargetInfo + libLLVMX86TargetInfo \ + libLLVMX86Utils .if ${LLVM_DEVELOPER:U} == yes SUBDIR+= \ Index: src/external/bsd/llvm/lib/libLLVMTarget/Makefile diff -u src/external/bsd/llvm/lib/libLLVMTarget/Makefile:1.1 src/external/bsd/llvm/lib/libLLVMTarget/Makefile:1.2 --- src/external/bsd/llvm/lib/libLLVMTarget/Makefile:1.1 Sun Feb 6 01:14:02 2011 +++ src/external/bsd/llvm/lib/libLLVMTarget/Makefile Wed Feb 23 03:09:04 2011 @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.1 2011/02/06 01:14:02 joerg Exp $ +# $NetBSD: Makefile,v 1.2 2011/02/23 03:09:04 joerg Exp $ LIB= LLVMTarget @@ -16,6 +16,7 @@ TargetFrameLowering.cpp \ TargetInstrInfo.cpp \ TargetIntrinsicInfo.cpp \ + TargetLibraryInfo.cpp \ TargetLoweringObjectFile.cpp \ TargetMachine.cpp \ TargetRegisterInfo.cpp \ Index: src/external/bsd/llvm/lib/libclangStaticAnalyzerCheckers/Makefile diff -u src/external/bsd/llvm/lib/libclangStaticAnalyzerCheckers/Makefile:1.2 src/external/bsd/llvm/lib/libclangStaticAnalyzerCheckers/Makefile:1.3 --- src/external/bsd/llvm/lib/libclangStaticAnalyzerCheckers/Makefile:1.2 Thu Feb 17
CVS commit: src/sys/dev/mii
Module Name:src Committed By: jmcneill Date: Wed Feb 23 03:22:44 UTC 2011 Modified Files: src/sys/dev/mii: atphy.c Log Message: match on MII_MODEL_ATTANSIC_L2 alc0 at pci3 dev 0 function 0: Atheros AR8152 v2.0 PCIe Fast Ethernet alc0: ioapic0 pin 17 alc0: Ethernet address 00:26:6c:9e:d4:c1 atphy0 at alc0 phy 0: L2 10/100 PHY, rev. 5 atphy0: 10baseT, 10baseT-FDX, 100baseTX, 100baseTX-FDX, 1000baseT-FDX, auto To generate a diff of this commit: cvs rdiff -u -r1.9 -r1.10 src/sys/dev/mii/atphy.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/mii/atphy.c diff -u src/sys/dev/mii/atphy.c:1.9 src/sys/dev/mii/atphy.c:1.10 --- src/sys/dev/mii/atphy.c:1.9 Sat Jan 22 18:26:12 2011 +++ src/sys/dev/mii/atphy.c Wed Feb 23 03:22:44 2011 @@ -1,4 +1,4 @@ -/* $NetBSD: atphy.c,v 1.9 2011/01/22 18:26:12 cegger Exp $ */ +/* $NetBSD: atphy.c,v 1.10 2011/02/23 03:22:44 jmcneill Exp $ */ /* $OpenBSD: atphy.c,v 1.1 2008/09/25 20:47:16 brad Exp $ */ /*- @@ -33,7 +33,7 @@ */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: atphy.c,v 1.9 2011/01/22 18:26:12 cegger Exp $); +__KERNEL_RCSID(0, $NetBSD: atphy.c,v 1.10 2011/02/23 03:22:44 jmcneill Exp $); #include sys/param.h #include sys/systm.h @@ -94,6 +94,8 @@ MII_STR_ATHEROS_F1 }, { MII_OUI_ATTANSIC, MII_MODEL_ATTANSIC_L1, MII_STR_ATTANSIC_L1 }, + { MII_OUI_ATTANSIC, MII_MODEL_ATTANSIC_L2, + MII_STR_ATTANSIC_L2 }, { MII_OUI_ATTANSIC, MII_MODEL_ATTANSIC_AR8021, MII_STR_ATTANSIC_AR8021 }, { 0, 0,
CVS commit: src/sys/arch/amd64/amd64
Module Name:src Committed By: joerg Date: Wed Feb 23 03:31:49 UTC 2011 Modified Files: src/sys/arch/amd64/amd64: netbsd32_machdep.c Log Message: CP error To generate a diff of this commit: cvs rdiff -u -r1.71 -r1.72 src/sys/arch/amd64/amd64/netbsd32_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/amd64/amd64/netbsd32_machdep.c diff -u src/sys/arch/amd64/amd64/netbsd32_machdep.c:1.71 src/sys/arch/amd64/amd64/netbsd32_machdep.c:1.72 --- src/sys/arch/amd64/amd64/netbsd32_machdep.c:1.71 Wed Feb 23 02:58:38 2011 +++ src/sys/arch/amd64/amd64/netbsd32_machdep.c Wed Feb 23 03:31:49 2011 @@ -1,4 +1,4 @@ -/* $NetBSD: netbsd32_machdep.c,v 1.71 2011/02/23 02:58:38 joerg Exp $ */ +/* $NetBSD: netbsd32_machdep.c,v 1.72 2011/02/23 03:31:49 joerg Exp $ */ /* * Copyright (c) 2001 Wasabi Systems, Inc. @@ -36,7 +36,7 @@ */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: netbsd32_machdep.c,v 1.71 2011/02/23 02:58:38 joerg Exp $); +__KERNEL_RCSID(0, $NetBSD: netbsd32_machdep.c,v 1.72 2011/02/23 03:31:49 joerg Exp $); #ifdef _KERNEL_OPT #include opt_compat_netbsd.h @@ -870,7 +870,7 @@ fpusave_lwp(l, false); } memcpy(pcb-pcb_savefpu.fp_fxsave, mcp-__fpregs, -+ sizeof (pcb-pcb_savefpu.fp_fxsave)); + sizeof (pcb-pcb_savefpu.fp_fxsave)); /* If not set already. */ l-l_md.md_flags |= MDP_USEDFPU; }
CVS commit: src/sys/dev/acpi
Module Name:src Committed By: jruoho Date: Wed Feb 23 06:02:00 UTC 2011 Modified Files: src/sys/dev/acpi: acpi_cpu_cstate.c Log Message: Adjust the previous and add a comment for it. To generate a diff of this commit: cvs rdiff -u -r1.43 -r1.44 src/sys/dev/acpi/acpi_cpu_cstate.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/acpi/acpi_cpu_cstate.c diff -u src/sys/dev/acpi/acpi_cpu_cstate.c:1.43 src/sys/dev/acpi/acpi_cpu_cstate.c:1.44 --- src/sys/dev/acpi/acpi_cpu_cstate.c:1.43 Tue Feb 22 17:19:58 2011 +++ src/sys/dev/acpi/acpi_cpu_cstate.c Wed Feb 23 06:02:00 2011 @@ -1,4 +1,4 @@ -/* $NetBSD: acpi_cpu_cstate.c,v 1.43 2011/02/22 17:19:58 jruoho Exp $ */ +/* $NetBSD: acpi_cpu_cstate.c,v 1.44 2011/02/23 06:02:00 jruoho Exp $ */ /*- * Copyright (c) 2010 Jukka Ruohonen jruoho...@iki.fi @@ -27,7 +27,7 @@ * SUCH DAMAGE. */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: acpi_cpu_cstate.c,v 1.43 2011/02/22 17:19:58 jruoho Exp $); +__KERNEL_RCSID(0, $NetBSD: acpi_cpu_cstate.c,v 1.44 2011/02/23 06:02:00 jruoho Exp $); #include sys/param.h #include sys/cpu.h @@ -53,7 +53,7 @@ static void acpicpu_cstate_detach_evcnt(struct acpicpu_softc *); static ACPI_STATUS acpicpu_cstate_cst(struct acpicpu_softc *); static ACPI_STATUS acpicpu_cstate_cst_add(struct acpicpu_softc *, - ACPI_OBJECT *); + ACPI_OBJECT *, int ); static void acpicpu_cstate_cst_bios(void); static void acpicpu_cstate_memset(struct acpicpu_softc *); static void acpicpu_cstate_fadt(struct acpicpu_softc *); @@ -308,7 +308,7 @@ for (count = 0, i = 1; i = n; i++) { elm = obj-Package.Elements[i]; - rv = acpicpu_cstate_cst_add(sc, elm); + rv = acpicpu_cstate_cst_add(sc, elm, i); if (ACPI_SUCCESS(rv)) count++; @@ -324,14 +324,13 @@ } static ACPI_STATUS -acpicpu_cstate_cst_add(struct acpicpu_softc *sc, ACPI_OBJECT *elm) +acpicpu_cstate_cst_add(struct acpicpu_softc *sc, ACPI_OBJECT *elm, int i) { struct acpicpu_cstate *cs = sc-sc_cstate; struct acpicpu_cstate state; struct acpicpu_reg *reg; ACPI_STATUS rv = AE_OK; ACPI_OBJECT *obj; - static int i = 1; uint32_t type; (void)memset(state, 0, sizeof(*cs)); @@ -465,11 +464,25 @@ goto out; } - if (cs[i].cs_method != 0) { - rv = AE_ALREADY_EXISTS; - goto out; + /* + * As some systems define the type arbitrarily, + * we use a sequential counter instead of the + * BIOS data. For instance, AMD family 14h is + * instructed to only use the value 2; see + * + * Advanced Micro Devices: BIOS and Kernel + * Developer's Guide (BKDG) for AMD Family + * 14h Models 00h-0Fh Processors. Revision + * 3.00, January 4, 2011. + */ + if (i != (int)type) { + + ACPI_DEBUG_PRINT((ACPI_DB_INFO, + C%d != C%u from BIOS, i, type)); } + KASSERT(cs[i].cs_method == 0); + cs[i].cs_addr = state.cs_addr; cs[i].cs_power = state.cs_power; cs[i].cs_flags = state.cs_flags;
CVS commit: src/external/mit/xorg/lib/libxcb/libxcb
Module Name:src Committed By: mrg Date: Wed Feb 23 06:04:31 UTC 2011 Modified Files: src/external/mit/xorg/lib/libxcb/libxcb: Makefile Log Message: libxcb doesn't need or want to link against libXaw. avoids implicit cyclic dependancy loops, which crash rtld right now. To generate a diff of this commit: cvs rdiff -u -r1.3 -r1.4 src/external/mit/xorg/lib/libxcb/libxcb/Makefile Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/external/mit/xorg/lib/libxcb/libxcb/Makefile diff -u src/external/mit/xorg/lib/libxcb/libxcb/Makefile:1.3 src/external/mit/xorg/lib/libxcb/libxcb/Makefile:1.4 --- src/external/mit/xorg/lib/libxcb/libxcb/Makefile:1.3 Sun Jul 18 09:49:12 2010 +++ src/external/mit/xorg/lib/libxcb/libxcb/Makefile Wed Feb 23 06:04:31 2011 @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.3 2010/07/18 09:49:12 mrg Exp $ +# $NetBSD: Makefile,v 1.4 2011/02/23 06:04:31 mrg Exp $ .include bsd.own.mk @@ -26,7 +26,6 @@ CPPFLAGS+= -I${DESTDIR}${X11INCDIR}/xcb LIBDPLIBS=\ - Xaw7 ${.CURDIR}/../../libXaw \ Xdmcp ${.CURDIR}/../../libXdmcp NOMAN= # defined
CVS commit: src/sys/dev/acpi
Module Name:src Committed By: jruoho Date: Wed Feb 23 06:17:55 UTC 2011 Modified Files: src/sys/dev/acpi: acpi_cpu_pstate.c acpi_cpu_tstate.c Log Message: Lower the worst-case latency in P- and T-state transitions to 1 usec. The previous 10 usec was based on the Intel's Core family. It may have been improved since that. Also provide an arbitrary upper bound for BIOS bugs. To generate a diff of this commit: cvs rdiff -u -r1.37 -r1.38 src/sys/dev/acpi/acpi_cpu_pstate.c cvs rdiff -u -r1.20 -r1.21 src/sys/dev/acpi/acpi_cpu_tstate.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/acpi/acpi_cpu_pstate.c diff -u src/sys/dev/acpi/acpi_cpu_pstate.c:1.37 src/sys/dev/acpi/acpi_cpu_pstate.c:1.38 --- src/sys/dev/acpi/acpi_cpu_pstate.c:1.37 Sun Jan 30 08:55:52 2011 +++ src/sys/dev/acpi/acpi_cpu_pstate.c Wed Feb 23 06:17:55 2011 @@ -1,4 +1,4 @@ -/* $NetBSD: acpi_cpu_pstate.c,v 1.37 2011/01/30 08:55:52 jruoho Exp $ */ +/* $NetBSD: acpi_cpu_pstate.c,v 1.38 2011/02/23 06:17:55 jruoho Exp $ */ /*- * Copyright (c) 2010 Jukka Ruohonen jruoho...@iki.fi @@ -27,7 +27,7 @@ * SUCH DAMAGE. */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: acpi_cpu_pstate.c,v 1.37 2011/01/30 08:55:52 jruoho Exp $); +__KERNEL_RCSID(0, $NetBSD: acpi_cpu_pstate.c,v 1.38 2011/02/23 06:17:55 jruoho Exp $); #include sys/param.h #include sys/evcnt.h @@ -480,12 +480,8 @@ if (ps-ps_freq == 0 || ps-ps_freq ) return AE_BAD_DECIMAL_CONSTANT; - /* - * The latency is typically around 10 usec - * on Intel CPUs. Use that as the minimum. - */ - if (ps-ps_latency 10) - ps-ps_latency = 10; + if (ps-ps_latency == 0 || ps-ps_latency 1000) + ps-ps_latency = 1; return AE_OK; } @@ -595,18 +591,14 @@ if (ps-ps_status_mask == 0) ps-ps_status_mask = ACPI_GET64(elm[7].Buffer.Pointer); - /* - * The latency is often defined to be - * zero on AMD systems. Raise that to 1. - */ - if (ps-ps_latency == 0) - ps-ps_latency = 1; - ps-ps_flags |= ACPICPU_FLAG_P_XPSS; - if (ps-ps_freq ) + if (ps-ps_freq == 0 || ps-ps_freq ) return AE_BAD_DECIMAL_CONSTANT; + if (ps-ps_latency == 0 || ps-ps_latency 1000) + ps-ps_latency = 1; + return AE_OK; } Index: src/sys/dev/acpi/acpi_cpu_tstate.c diff -u src/sys/dev/acpi/acpi_cpu_tstate.c:1.20 src/sys/dev/acpi/acpi_cpu_tstate.c:1.21 --- src/sys/dev/acpi/acpi_cpu_tstate.c:1.20 Fri Feb 18 07:00:05 2011 +++ src/sys/dev/acpi/acpi_cpu_tstate.c Wed Feb 23 06:17:55 2011 @@ -1,4 +1,4 @@ -/* $NetBSD: acpi_cpu_tstate.c,v 1.20 2011/02/18 07:00:05 jruoho Exp $ */ +/* $NetBSD: acpi_cpu_tstate.c,v 1.21 2011/02/23 06:17:55 jruoho Exp $ */ /*- * Copyright (c) 2010 Jukka Ruohonen jruoho...@iki.fi @@ -27,7 +27,7 @@ * SUCH DAMAGE. */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: acpi_cpu_tstate.c,v 1.20 2011/02/18 07:00:05 jruoho Exp $); +__KERNEL_RCSID(0, $NetBSD: acpi_cpu_tstate.c,v 1.21 2011/02/23 06:17:55 jruoho Exp $); #include sys/param.h #include sys/evcnt.h @@ -400,7 +400,7 @@ if (ts-ts_percent 10 || ts-ts_percent 100) return AE_BAD_DECIMAL_CONSTANT; - if (ts-ts_latency 1) + if (ts-ts_latency == 0 || ts-ts_latency 1000) ts-ts_latency = 1; return AE_OK;
CVS commit: src/sys/arch/mips/mips
Module Name:src Committed By: matt Date: Wed Feb 23 07:03:50 UTC 2011 Modified Files: src/sys/arch/mips/mips: mipsX_subr.S Log Message: Remove a few more lines that should have been removed in the previous commit To generate a diff of this commit: cvs rdiff -u -r1.39 -r1.40 src/sys/arch/mips/mips/mipsX_subr.S 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/mipsX_subr.S diff -u src/sys/arch/mips/mips/mipsX_subr.S:1.39 src/sys/arch/mips/mips/mipsX_subr.S:1.40 --- src/sys/arch/mips/mips/mipsX_subr.S:1.39 Tue Feb 22 08:19:47 2011 +++ src/sys/arch/mips/mips/mipsX_subr.S Wed Feb 23 07:03:50 2011 @@ -1,4 +1,4 @@ -/* $NetBSD: mipsX_subr.S,v 1.39 2011/02/22 08:19:47 matt Exp $ */ +/* $NetBSD: mipsX_subr.S,v 1.40 2011/02/23 07:03:50 matt Exp $ */ /* * Copyright 2002 Wasabi Systems, Inc. @@ -2634,8 +2634,6 @@ PTR_WORD _C_LABEL(MIPSX(tlb_enter)) PTR_WORD _C_LABEL(MIPSX(tlb_read_indexed)) PTR_WORD _C_LABEL(MIPSX(tlb_write_indexed)) - PTR_WORD _C_LABEL(nullop) -#endif .globl _C_LABEL(MIPSX(locoresw)) _C_LABEL(MIPSX(locoresw)):
CVS commit: src/sys/arch/mips/include
Module Name:src Committed By: matt Date: Wed Feb 23 07:47:10 UTC 2011 Modified Files: src/sys/arch/mips/include: mcontext.h Log Message: Add __UCONTEXT*_SIZE* To generate a diff of this commit: cvs rdiff -u -r1.12 -r1.13 src/sys/arch/mips/include/mcontext.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/mips/include/mcontext.h diff -u src/sys/arch/mips/include/mcontext.h:1.12 src/sys/arch/mips/include/mcontext.h:1.13 --- src/sys/arch/mips/include/mcontext.h:1.12 Sun Feb 20 07:45:47 2011 +++ src/sys/arch/mips/include/mcontext.h Wed Feb 23 07:47:09 2011 @@ -1,4 +1,4 @@ -/* $NetBSD: mcontext.h,v 1.12 2011/02/20 07:45:47 matt Exp $ */ +/* $NetBSD: mcontext.h,v 1.13 2011/02/23 07:47:09 matt Exp $ */ /*- * Copyright (c) 1999, 2002 The NetBSD Foundation, Inc. @@ -162,4 +162,19 @@ #define _UC_MACHINE32_SET_PC(uc, pc) _UC_MACHINE_PC((uc), (pc)) +#define __UCONTEXT_SIZE_O32 (40 + 288 + 64) /* 392 */ +#define __UCONTEXT_SIZE_N32 (40 + 560 + 64) /* 664 */ +#define __UCONTEXT_SIZE_N64 (56 + 560 + 128) /* 774 */ + +#ifdef __mips_o32 +#define __UCONTEXT_SIZE __UCONTEXT_SIZE_O32 +#elif __mips_n32 +#define __UCONTEXT_SIZE __UCONTEXT_SIZE_N32 +#elif __mips_n64 +#define __UCONTEXT_SIZE __UCONTEXT_SIZE_N64 +#define __UCONTEXT32_SIZE __UCONTEXT_SIZE_N32 +#elif +#error O64 is not supported +#endif + #endif /* _MIPS_MCONTEXT_H_ */
CVS commit: src
Module Name:src Committed By: mrg Date: Wed Feb 23 07:53:30 UTC 2011 Modified Files: src/distrib/sets/lists/xbase: shl.mi src/distrib/sets/lists/xcomp: mi shl.mi src/external/mit/xorg/lib/libX11: Makefile Makefile.libx11 src/external/mit/xorg/lib/libX11/dynamic: Makefile Added Files: src/external/mit/xorg/lib/libX11/libX11-xcb: Makefile shlib_version Log Message: enable USE_XCB in libX11. install missing libX11-xcb and Xlib-xcb.h. To generate a diff of this commit: cvs rdiff -u -r1.41 -r1.42 src/distrib/sets/lists/xbase/shl.mi cvs rdiff -u -r1.122 -r1.123 src/distrib/sets/lists/xcomp/mi cvs rdiff -u -r1.27 -r1.28 src/distrib/sets/lists/xcomp/shl.mi cvs rdiff -u -r1.10 -r1.11 src/external/mit/xorg/lib/libX11/Makefile cvs rdiff -u -r1.7 -r1.8 src/external/mit/xorg/lib/libX11/Makefile.libx11 cvs rdiff -u -r1.1.1.1 -r1.2 \ src/external/mit/xorg/lib/libX11/dynamic/Makefile cvs rdiff -u -r0 -r1.1 src/external/mit/xorg/lib/libX11/libX11-xcb/Makefile \ src/external/mit/xorg/lib/libX11/libX11-xcb/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/xbase/shl.mi diff -u src/distrib/sets/lists/xbase/shl.mi:1.41 src/distrib/sets/lists/xbase/shl.mi:1.42 --- src/distrib/sets/lists/xbase/shl.mi:1.41 Wed Jan 19 16:31:23 2011 +++ src/distrib/sets/lists/xbase/shl.mi Wed Feb 23 07:53:28 2011 @@ -1,4 +1,4 @@ -# $NetBSD: shl.mi,v 1.41 2011/01/19 16:31:23 jmcneill Exp $ +# $NetBSD: shl.mi,v 1.42 2011/02/23 07:53:28 mrg Exp $ # # Note: don't delete entries from here - mark them as obsolete instead. # @@ -189,6 +189,9 @@ ./usr/X11R7/lib/libX11.so -unknown- xorg ./usr/X11R7/lib/libX11.so.7 -unknown- xorg ./usr/X11R7/lib/libX11.so.7.0 -unknown- xorg +./usr/X11R7/lib/libX11-xcb.so -unknown- xorg +./usr/X11R7/lib/libX11-xcb.so.1 -unknown- xorg +./usr/X11R7/lib/libX11-xcb.so.1.0 -unknown- xorg ./usr/X11R7/lib/libXRes.so -unknown- xorg ./usr/X11R7/lib/libXRes.so.2 -unknown- xorg ./usr/X11R7/lib/libXRes.so.2.0 -unknown- xorg Index: src/distrib/sets/lists/xcomp/mi diff -u src/distrib/sets/lists/xcomp/mi:1.122 src/distrib/sets/lists/xcomp/mi:1.123 --- src/distrib/sets/lists/xcomp/mi:1.122 Wed Jan 19 18:29:28 2011 +++ src/distrib/sets/lists/xcomp/mi Wed Feb 23 07:53:29 2011 @@ -1,4 +1,4 @@ -# $NetBSD: mi,v 1.122 2011/01/19 18:29:28 jakllsch Exp $ +# $NetBSD: mi,v 1.123 2011/02/23 07:53:29 mrg Exp $ # # Note: don't delete entries from here - mark them as obsolete instead. # @@ -5334,6 +5334,7 @@ ./usr/X11R7/include/X11/Xfuncs.h -unknown- xorg ./usr/X11R7/include/X11/Xlcint.h -unknown- xorg ./usr/X11R7/include/X11/Xlib.h-unknown- xorg +./usr/X11R7/include/X11/Xlib-xcb.h -unknown- xorg ./usr/X11R7/include/X11/XlibConf.h -unknown- xorg ./usr/X11R7/include/X11/Xlibint.h -unknown- xorg ./usr/X11R7/include/X11/Xlocale.h -unknown- xorg @@ -6154,6 +6155,9 @@ ./usr/X11R7/lib/libX11.a-unknown- xorg ./usr/X11R7/lib/libX11_g.a-unknown- debuglib,xorg ./usr/X11R7/lib/libX11_p.a-unknown- profile,xorg +./usr/X11R7/lib/libX11-xcb.a-unknown- xorg +./usr/X11R7/lib/libX11-xcb_g.a-unknown- debuglib,xorg +./usr/X11R7/lib/libX11-xcb_p.a-unknown- profile,xorg ./usr/X11R7/lib/libXRes.a-unknown- xorg ./usr/X11R7/lib/libXRes_g.a-unknown- debuglib,xorg ./usr/X11R7/lib/libXRes_p.a-unknown- profile,xorg Index: src/distrib/sets/lists/xcomp/shl.mi diff -u src/distrib/sets/lists/xcomp/shl.mi:1.27 src/distrib/sets/lists/xcomp/shl.mi:1.28 --- src/distrib/sets/lists/xcomp/shl.mi:1.27 Wed Jan 19 16:31:23 2011 +++ src/distrib/sets/lists/xcomp/shl.mi Wed Feb 23 07:53:29 2011 @@ -1,4 +1,4 @@ -# $NetBSD: shl.mi,v 1.27 2011/01/19 16:31:23 jmcneill Exp $ +# $NetBSD: shl.mi,v 1.28 2011/02/23 07:53:29 mrg Exp $ # # Note: don't delete entries from here - mark them as obsolete instead. # @@ -55,6 +55,7 @@ ./usr/X11R7/lib/libOSMesa_pic.a-unknown- xorg ./usr/X11R7/lib/libSM_pic.a-unknown- xorg ./usr/X11R7/lib/libX11_pic.a-unknown- xorg +./usr/X11R7/lib/libX11-xcb_pic.a -unknown- xorg ./usr/X11R7/lib/libXRes_pic.a-unknown- xorg ./usr/X11R7/lib/libXTrap_pic.a-unknown- xorg ./usr/X11R7/lib/libXau_pic.a-unknown- xorg @@ -196,6 +197,7 @@ ./usr/libdata/debug/usr/X11R7/lib/libOSMesa.so.7.0.debug -unknown- xorg,debug ./usr/libdata/debug/usr/X11R7/lib/libSM.so.7.0.debug -unknown- xorg,debug ./usr/libdata/debug/usr/X11R7/lib/libX11.so.7.0.debug -unknown- xorg,debug +./usr/libdata/debug/usr/X11R7/lib/libX11-xcb.so.1.0.debug -unknown- xorg,debug ./usr/libdata/debug/usr/X11R7/lib/libXRes.so.2.0.debug -unknown- xorg,debug ./usr/libdata/debug/usr/X11R7/lib/libXTrap.so.7.0.debug -unknown- xorg,debug ./usr/libdata/debug/usr/X11R7/lib/libXau.so.7.0.debug -unknown- xorg,debug Index: src/external/mit/xorg/lib/libX11/Makefile diff -u