CVS commit: [matt-nb5-mips64] src/sys/arch/mips/mips
Module Name:src Committed By: matt Date: Tue Dec 6 17:37:55 UTC 2011 Modified Files: src/sys/arch/mips/mips [matt-nb5-mips64]: bus_dma.c Log Message: Add missing KSEGX support. To generate a diff of this commit: cvs rdiff -u -r1.22.16.20 -r1.22.16.21 src/sys/arch/mips/mips/bus_dma.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/bus_dma.c diff -u src/sys/arch/mips/mips/bus_dma.c:1.22.16.20 src/sys/arch/mips/mips/bus_dma.c:1.22.16.21 --- src/sys/arch/mips/mips/bus_dma.c:1.22.16.20 Thu May 26 19:21:56 2011 +++ src/sys/arch/mips/mips/bus_dma.c Tue Dec 6 17:37:55 2011 @@ -1013,6 +1013,11 @@ _bus_dmamem_map(bus_dma_tag_t t, bus_dma if (((mips_options.mips_cpu_flags CPU_MIPS_D_CACHE_COHERENT) == 0) (flags BUS_DMA_COHERENT)) *kvap = (void *)MIPS_PHYS_TO_KSEG1(segs[0].ds_addr); +#ifdef ENABLE_MIPS_KSEGX + else if (mips_ksegx_start segs[0].ds_addr + segs[0].ds_addr mips_ksegx_start + VM_KSEGX_SIZE) + *kvap = (void *)(vaddr_t)(VM_KSEGX_ADDRESS + segs[0].ds_addr); +#endif else *kvap = (void *)MIPS_PHYS_TO_KSEG0(segs[0].ds_addr); return (0); @@ -1065,6 +1070,11 @@ _bus_dmamem_unmap(bus_dma_tag_t t, void */ if (MIPS_KSEG0_P(kva) || MIPS_KSEG1_P(kva)) return; +#ifdef ENABLE_MIPS_KSEGX + if (VM_KSEGX_ADDRESS = (vaddr_t)kva + (vaddr_t)kva VM_KSEGX_ADDRESS + VM_KSEGX_SIZE) + return; +#endif #ifdef _LP64 if (MIPS_XKPHYS_P((vaddr_t)kva)) return;
CVS commit: [matt-nb5-mips64] src/sys/arch/mips/rmi
Module Name:src Committed By: matt Date: Tue Dec 6 17:44:46 UTC 2011 Modified Files: src/sys/arch/mips/rmi [matt-nb5-mips64]: rmixl_subr.S Log Message: Use MIPS_COP_0_OSSCRATCH instead $22 To generate a diff of this commit: cvs rdiff -u -r1.1.2.10 -r1.1.2.11 src/sys/arch/mips/rmi/rmixl_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/rmi/rmixl_subr.S diff -u src/sys/arch/mips/rmi/rmixl_subr.S:1.1.2.10 src/sys/arch/mips/rmi/rmixl_subr.S:1.1.2.11 --- src/sys/arch/mips/rmi/rmixl_subr.S:1.1.2.10 Sat Dec 3 01:56:56 2011 +++ src/sys/arch/mips/rmi/rmixl_subr.S Tue Dec 6 17:44:46 2011 @@ -169,11 +169,11 @@ NESTED(rmixl_cpu_trampoline, CALLFRAME_S * jump to common mips cpu_trampoline */ REG_L a1, 2*SZREG(s0) /* XXX ta_cpuinfo */ - dmtc0 a1, $22, 0 /* MIPS_COP_0_OSSCRATCH */ + dmtc0 a1, MIPS_COP_0_OSSCRATCH, 0 PTR_L v1, CPU_INFO_TLB_INFO(a1) PTR_L v1, TI_HWLOCK(v1) PTR_ADDU v1, MTX_LOCK - dmtc0 v1, $22, 2 + dmtc0 v1, MIPS_COP_0_OSSCRATCH, 2 j cpu_trampoline nop
CVS commit: [matt-nb5-mips64] src/sys/arch/mips/mips
Module Name:src Committed By: matt Date: Tue Dec 6 17:49:35 UTC 2011 Modified Files: src/sys/arch/mips/mips [matt-nb5-mips64]: cpu_subr.c pmap_tlb.c Log Message: Allocate the locks from the same page we allocate the cpu_info and pmap_tlb_info structure. This assures they will be in KSEG0. To generate a diff of this commit: cvs rdiff -u -r1.1.2.21 -r1.1.2.22 src/sys/arch/mips/mips/cpu_subr.c cvs rdiff -u -r1.1.2.19 -r1.1.2.20 src/sys/arch/mips/mips/pmap_tlb.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/mips/mips/cpu_subr.c diff -u src/sys/arch/mips/mips/cpu_subr.c:1.1.2.21 src/sys/arch/mips/mips/cpu_subr.c:1.1.2.22 --- src/sys/arch/mips/mips/cpu_subr.c:1.1.2.21 Sat Dec 3 01:56:55 2011 +++ src/sys/arch/mips/mips/cpu_subr.c Tue Dec 6 17:49:34 2011 @@ -133,16 +133,23 @@ cpu_info_alloc(struct pmap_tlb_info *ti, /* * If we weren't passed a pmap_tlb_info to use, the caller wants us - * to take care of that for him. Since we have room left over in the - * page we just allocated, just use a piece of that for it. + * to take care of allocating one for him. Since we have room left + * over in the page we just allocated, just use a piece of that for + * it and its locks. */ if (ti == NULL) { - if (cpu_info_offset = sizeof(*ti)) { + const size_t ti_size = roundup2(sizeof(*ti), COHERENCY_UNIT) + + 2*COHERENCY_UNIT; + if (cpu_info_offset = ti_size) { ti = (void *) va; } else { - KASSERT(PAGE_SIZE - cpu_info_offset + sizeof(*ci) = sizeof(*ti)); - ti = (struct pmap_tlb_info *)(va + PAGE_SIZE) - 1; + KASSERT(PAGE_SIZE - cpu_info_offset + sizeof(*ci) = ti_size); + ti = (struct pmap_tlb_info *)(va + PAGE_SIZE - ti_size); } + ti-ti_lock = (kmutex_t *) + roundup2((intptr_t)ti + sizeof(*ti), COHERENCY_UNIT); + ti-ti_hwlock = (kmutex_t *) + ((intptr_t)ti-ti_lock + COHERENCY_UNIT); pmap_tlb_info_init(ti); } @@ -946,6 +953,7 @@ cpu_hatch(struct cpu_info *ci) */ if (ci-ci_tlb_slot = 0) { const uint32_t tlb_lo = MIPS3_PG_G|MIPS3_PG_V + | MIPS3_PG_CACHED | MIPS3_PG_D | mips3_paddr_to_tlbpfn((vaddr_t)ci); tlb_enter(ci-ci_tlb_slot, -PAGE_SIZE, tlb_lo); Index: src/sys/arch/mips/mips/pmap_tlb.c diff -u src/sys/arch/mips/mips/pmap_tlb.c:1.1.2.19 src/sys/arch/mips/mips/pmap_tlb.c:1.1.2.20 --- src/sys/arch/mips/mips/pmap_tlb.c:1.1.2.19 Sat Dec 3 01:56:55 2011 +++ src/sys/arch/mips/mips/pmap_tlb.c Tue Dec 6 17:49:34 2011 @@ -1,4 +1,4 @@ -/* $NetBSD: pmap_tlb.c,v 1.1.2.19 2011/12/03 01:56:55 matt Exp $ */ +/* $NetBSD: pmap_tlb.c,v 1.1.2.20 2011/12/06 17:49:34 matt Exp $ */ /*- * Copyright (c) 2010 The NetBSD Foundation, Inc. @@ -31,7 +31,7 @@ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: pmap_tlb.c,v 1.1.2.19 2011/12/03 01:56:55 matt Exp $); +__KERNEL_RCSID(0, $NetBSD: pmap_tlb.c,v 1.1.2.20 2011/12/06 17:49:34 matt Exp $); /* * Manages address spaces in a TLB. @@ -287,8 +287,14 @@ pmap_tlb_info_init(struct pmap_tlb_info KASSERT(pmap_tlbs[pmap_ntlbs] == NULL); - ti-ti_lock = mutex_obj_alloc(MUTEX_DEFAULT, IPL_SCHED); - ti-ti_hwlock = mutex_obj_alloc(MUTEX_DEFAULT, IPL_SCHED); + if (ti-ti_lock == NULL) + ti-ti_lock = mutex_obj_alloc(MUTEX_DEFAULT, IPL_SCHED); + else + mutex_init(ti-ti_lock, MUTEX_DEFAULT, IPL_SCHED); + if (ti-ti_hwlock == NULL) + ti-ti_hwlock = mutex_obj_alloc(MUTEX_DEFAULT, IPL_SCHED); + else + mutex_init(ti-ti_hwlock, MUTEX_DEFAULT, IPL_SCHED); ti-ti_asid_bitmap[0] = 1; ti-ti_asid_hint = 1; ti-ti_asid_max = pmap_tlb0_info.ti_asid_max;
CVS commit: src/sys/rump/librump/rumpkern
Module Name:src Committed By: njoly Date: Tue Dec 6 18:04:31 UTC 2011 Modified Files: src/sys/rump/librump/rumpkern: locks.c Log Message: Do not protect wrong KASSERT by LOCKEDBUG ifdef/endif, the latter uses its own mecanism. Kill them both. From discussion with pooka@. To generate a diff of this commit: cvs rdiff -u -r1.54 -r1.55 src/sys/rump/librump/rumpkern/locks.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/locks.c diff -u src/sys/rump/librump/rumpkern/locks.c:1.54 src/sys/rump/librump/rumpkern/locks.c:1.55 --- src/sys/rump/librump/rumpkern/locks.c:1.54 Mon Mar 21 16:41:08 2011 +++ src/sys/rump/librump/rumpkern/locks.c Tue Dec 6 18:04:31 2011 @@ -1,4 +1,4 @@ -/* $NetBSD: locks.c,v 1.54 2011/03/21 16:41:08 pooka Exp $ */ +/* $NetBSD: locks.c,v 1.55 2011/12/06 18:04:31 njoly Exp $ */ /* * Copyright (c) 2007-2011 Antti Kantee. All Rights Reserved. @@ -26,7 +26,7 @@ */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: locks.c,v 1.54 2011/03/21 16:41:08 pooka Exp $); +__KERNEL_RCSID(0, $NetBSD: locks.c,v 1.55 2011/12/06 18:04:31 njoly Exp $); #include sys/param.h #include sys/kmem.h @@ -222,9 +222,6 @@ void rw_downgrade(krwlock_t *rw) { -#ifdef LOCKDEBUG - KASSERT(!rw_write_held(rw)); -#endif /* * XXX HACK: How we can downgrade re lock in rump properly. */
CVS commit: src/sys/rump/kern/lib/libsolaris
Module Name:src Committed By: njoly Date: Tue Dec 6 18:12:25 UTC 2011 Modified Files: src/sys/rump/kern/lib/libsolaris: Makefile Removed Files: src/sys/rump/kern/lib/libsolaris: component.c Log Message: Remove the unneeded rump component; the library already includes the module code that will be initialised by rump. Fix PR/44708, t_zpool:create test failure for RUMP_LOCKDEBUG=yes builds. To generate a diff of this commit: cvs rdiff -u -r1.1 -r1.2 src/sys/rump/kern/lib/libsolaris/Makefile cvs rdiff -u -r1.1 -r0 src/sys/rump/kern/lib/libsolaris/component.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/kern/lib/libsolaris/Makefile diff -u src/sys/rump/kern/lib/libsolaris/Makefile:1.1 src/sys/rump/kern/lib/libsolaris/Makefile:1.2 --- src/sys/rump/kern/lib/libsolaris/Makefile:1.1 Tue Jan 18 22:21:23 2011 +++ src/sys/rump/kern/lib/libsolaris/Makefile Tue Dec 6 18:12:25 2011 @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.1 2011/01/18 22:21:23 haad Exp $ +# $NetBSD: Makefile,v 1.2 2011/12/06 18:12:25 njoly Exp $ # S!= cd ${.PARSEDIR}/../../../../;pwd @@ -7,12 +7,7 @@ S!= cd ${.PARSEDIR}/../../.. LIB= rumpkern_solaris -# RUMP Stuff -CPPFLAGS+= -I${RUMPTOP}/librump/rumpkern -I${RUMPTOP}/librump/rumpvfs\ - -I${RUMPTOP}/librump/rumpdev CPPFLAGS+= -DASSERT=KASSERT -SRCS+= component.c - .include bsd.lib.mk .include bsd.klinks.mk
CVS commit: src/tests/fs/zfs
Module Name:src Committed By: njoly Date: Tue Dec 6 18:18:59 UTC 2011 Modified Files: src/tests/fs/zfs: t_zpool.sh Log Message: Remove expected failure now that PR/44708 is fixed. To generate a diff of this commit: cvs rdiff -u -r1.2 -r1.3 src/tests/fs/zfs/t_zpool.sh 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/zfs/t_zpool.sh diff -u src/tests/fs/zfs/t_zpool.sh:1.2 src/tests/fs/zfs/t_zpool.sh:1.3 --- src/tests/fs/zfs/t_zpool.sh:1.2 Mon Sep 19 06:38:02 2011 +++ src/tests/fs/zfs/t_zpool.sh Tue Dec 6 18:18:59 2011 @@ -1,4 +1,4 @@ -# $NetBSD: t_zpool.sh,v 1.2 2011/09/19 06:38:02 jruoho Exp $ +# $NetBSD: t_zpool.sh,v 1.3 2011/12/06 18:18:59 njoly Exp $ # # Copyright (c) 2011 The NetBSD Foundation, Inc. # All rights reserved. @@ -43,8 +43,6 @@ jippo on /jippo type zfs (local) create_body() { - atf_expect_fail PR misc/44708 - atf_check -s exit:0 -o ignore -e ignore ${server} ${RUMP_SERVER} export LD_PRELOAD=/usr/lib/librumphijack.so
CVS commit: src/sys/dev/usb
Module Name:src Committed By: jakllsch Date: Tue Dec 6 19:05:43 UTC 2011 Modified Files: src/sys/dev/usb: uslsa.c Log Message: Make break handling (where supported by the hardware/firmware) actually work. To generate a diff of this commit: cvs rdiff -u -r1.12 -r1.13 src/sys/dev/usb/uslsa.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/usb/uslsa.c diff -u src/sys/dev/usb/uslsa.c:1.12 src/sys/dev/usb/uslsa.c:1.13 --- src/sys/dev/usb/uslsa.c:1.12 Wed Nov 3 22:34:24 2010 +++ src/sys/dev/usb/uslsa.c Tue Dec 6 19:05:43 2011 @@ -1,4 +1,4 @@ -/* $NetBSD: uslsa.c,v 1.12 2010/11/03 22:34:24 dyoung Exp $ */ +/* $NetBSD: uslsa.c,v 1.13 2011/12/06 19:05:43 jakllsch Exp $ */ /* from ugensa.c */ @@ -62,7 +62,7 @@ */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: uslsa.c,v 1.12 2010/11/03 22:34:24 dyoung Exp $); +__KERNEL_RCSID(0, $NetBSD: uslsa.c,v 1.13 2011/12/06 19:05:43 jakllsch Exp $); #include sys/param.h #include sys/systm.h @@ -101,7 +101,6 @@ int uslsadebug = 0; #define USLSA_REQ_GET_DPS 0x04 #define USLSA_REQ_SET_BREAK 0x05 -#define USLSA_REQ_GET_BREAK 0x06 #define USLSA_REQ_SET_FLOW 0x07 #define USLSA_REQ_GET_FLOW 0x08 @@ -136,8 +135,8 @@ int uslsadebug = 0; #define USLSA_DPS_STOP_ONE_FIVE 0x0001 #define USLSA_DPS_STOP_ONE 0x -#define USLSA_BREAK_DISABLE 0x0001 -#define USLSA_BREAK_ENABLE 0x +#define USLSA_BREAK_DISABLE 0x +#define USLSA_BREAK_ENABLE 0x0001 #define USLSA_FLOW_SET_RTS 0x0200 #define USLSA_FLOW_SET_DTR 0x0100
CVS commit: src/games/fortune/datfiles
Module Name:src Committed By: jakllsch Date: Tue Dec 6 19:41:03 UTC 2011 Modified Files: src/games/fortune/datfiles: fortunes Log Message: Per [1] the speed of light in a vaccum is exactly 299792458 m/s. Per [2] a furlong is 220 yards and a yard is exactly 0.9144 m. Per [3] a fortnight is 14 days. As I didn't find a good authority for what definition of a day a fortnight is measured in, I'll assume here a day is 86400 SI seconds. Thus, the speed of light in a vaccum is approximately 1.80*10^12 furlongs per fortnight. 1.80*10^12 = 299792458*86400*14/(220*0.9144) [1] Resolution 1 of the 17th meeting of the CGPM (1983) http://www.bipm.org/en/CGPM/db/17/1/ [2] Weights and Measures Act 1985 http://www.legislation.gov.uk/ukpga/1985/72 [3] The Concise Oxford Dictionary, 5th Edition, 1964, p. 480 To generate a diff of this commit: cvs rdiff -u -r1.48 -r1.49 src/games/fortune/datfiles/fortunes Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/games/fortune/datfiles/fortunes diff -u src/games/fortune/datfiles/fortunes:1.48 src/games/fortune/datfiles/fortunes:1.49 --- src/games/fortune/datfiles/fortunes:1.48 Sat Nov 19 20:44:58 2011 +++ src/games/fortune/datfiles/fortunes Tue Dec 6 19:41:03 2011 @@ -13,7 +13,7 @@ Therefore, Alexander the Great had an in (2) Nothing is always. (3) Everything is sometimes. % -1.79 x 10^12 furlongs per fortnight -- it's not just a good idea, it's +1.80 x 10^12 furlongs per fortnight -- it's not just a good idea, it's the law! % 10.0 times 0.1 is hardly ever 1.0.
CVS commit: src/lib/libpuffs
Module Name:src Committed By: skrll Date: Tue Dec 6 21:15:39 UTC 2011 Modified Files: src/lib/libpuffs: callcontext.c Log Message: Deal with __MACHINE_STACK_GROWS_UP machines. constify the other psize while I'm here. Thanks to Christos for looking. To generate a diff of this commit: cvs rdiff -u -r1.26 -r1.27 src/lib/libpuffs/callcontext.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/lib/libpuffs/callcontext.c diff -u src/lib/libpuffs/callcontext.c:1.26 src/lib/libpuffs/callcontext.c:1.27 --- src/lib/libpuffs/callcontext.c:1.26 Wed Nov 2 16:43:04 2011 +++ src/lib/libpuffs/callcontext.c Tue Dec 6 21:15:39 2011 @@ -1,4 +1,4 @@ -/* $NetBSD: callcontext.c,v 1.26 2011/11/02 16:43:04 yamt Exp $ */ +/* $NetBSD: callcontext.c,v 1.27 2011/12/06 21:15:39 skrll Exp $ */ /* * Copyright (c) 2006, 2007, 2008 Antti Kantee. All Rights Reserved. @@ -30,7 +30,7 @@ #include sys/cdefs.h #if !defined(lint) -__RCSID($NetBSD: callcontext.c,v 1.26 2011/11/02 16:43:04 yamt Exp $); +__RCSID($NetBSD: callcontext.c,v 1.27 2011/12/06 21:15:39 skrll Exp $); #endif /* !lint */ #include sys/types.h @@ -188,7 +188,7 @@ slowccalloc(struct puffs_usermount *pu) struct puffs_cc *volatile pcc; void *sp; size_t stacksize = 1pu-pu_cc_stackshift; - long psize = sysconf(_SC_PAGESIZE); + const long psize = sysconf(_SC_PAGESIZE); if (puffs_fakecc) return fakecc; @@ -201,7 +201,11 @@ slowccalloc(struct puffs_usermount *pu) pcc = sp; memset(pcc, 0, sizeof(struct puffs_cc)); +#ifndef __MACHINE_STACK_GROWS_UP mprotect((uint8_t *)sp + psize, (size_t)psize, PROT_NONE); +#else + mprotect((uint8_t *)sp + stacksize - psize, (size_t)psize, PROT_NONE); +#endif /* initialize both ucontext's */ if (getcontext(pcc-pcc_uc) == -1) { @@ -245,6 +249,8 @@ puffs__cc_create(struct puffs_usermount pcc-pcc_func = func; pcc-pcc_farg = pcc; } else { + const long psize = sysconf(_SC_PAGESIZE); + /* link context */ pcc-pcc_uc.uc_link = pcc-pcc_uc_ret; @@ -254,8 +260,8 @@ puffs__cc_create(struct puffs_usermount * swapcontext(). However, it gets lost. So reinit it. */ st = pcc-pcc_uc.uc_stack; - st-ss_sp = pcc; - st-ss_size = stacksize; + st-ss_sp = ((uint8_t *)(void *)pcc) + psize; + st-ss_size = stacksize - psize; st-ss_flags = 0; /*
CVS commit: [jmcneill-usbmp] src/sys/dev/usb
Module Name:src Committed By: macallan Date: Wed Dec 7 05:41:54 UTC 2011 Modified Files: src/sys/dev/usb [jmcneill-usbmp]: ohci.c Log Message: make this build without DIAGNOSTIC To generate a diff of this commit: cvs rdiff -u -r1.218.6.4 -r1.218.6.5 src/sys/dev/usb/ohci.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/usb/ohci.c diff -u src/sys/dev/usb/ohci.c:1.218.6.4 src/sys/dev/usb/ohci.c:1.218.6.5 --- src/sys/dev/usb/ohci.c:1.218.6.4 Tue Dec 6 05:05:30 2011 +++ src/sys/dev/usb/ohci.c Wed Dec 7 05:41:53 2011 @@ -1,4 +1,4 @@ -/* $NetBSD: ohci.c,v 1.218.6.4 2011/12/06 05:05:30 mrg Exp $ */ +/* $NetBSD: ohci.c,v 1.218.6.5 2011/12/07 05:41:53 macallan Exp $ */ /* $FreeBSD: src/sys/dev/usb/ohci.c,v 1.22 1999/11/17 22:33:40 n_hibma Exp $ */ /* @@ -42,7 +42,7 @@ */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: ohci.c,v 1.218.6.4 2011/12/06 05:05:30 mrg Exp $); +__KERNEL_RCSID(0, $NetBSD: ohci.c,v 1.218.6.5 2011/12/07 05:41:53 macallan Exp $); #include opt_usb.h @@ -1497,7 +1497,9 @@ void ohci_device_ctrl_done(usbd_xfer_handle xfer) { struct ohci_pipe *opipe = (struct ohci_pipe *)xfer-pipe; +#ifdef DIAGNOSTIC ohci_softc_t *sc = xfer-pipe-device-bus-hci_private; +#endif int len = UGETW(xfer-request.wLength); int isread = (xfer-request.bmRequestType UT_READ); @@ -1573,7 +1575,9 @@ ohci_device_intr_done(usbd_xfer_handle x void ohci_device_bulk_done(usbd_xfer_handle xfer) { +#ifdef DIAGNOSTIC ohci_softc_t *sc = xfer-pipe-device-bus-hci_private; +#endif int isread = (UE_GET_DIR(xfer-pipe-endpoint-edesc-bEndpointAddress) == UE_DIR_IN);