CVS commit: src/sys/dev/acpi
Module Name:src Committed By: njoly Date: Fri Dec 4 10:42:39 UTC 2009 Modified Files: src/sys/dev/acpi: acpi_pci.c acpi_pci.h acpi_slit.c acpi_slit.h acpi_srat.c acpi_srat.h Log Message: Fix NetBSD keyword expansion. To generate a diff of this commit: cvs rdiff -u -r1.1 -r1.2 src/sys/dev/acpi/acpi_pci.c \ src/sys/dev/acpi/acpi_pci.h src/sys/dev/acpi/acpi_slit.c \ src/sys/dev/acpi/acpi_slit.h src/sys/dev/acpi/acpi_srat.c \ src/sys/dev/acpi/acpi_srat.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/acpi/acpi_pci.c diff -u src/sys/dev/acpi/acpi_pci.c:1.1 src/sys/dev/acpi/acpi_pci.c:1.2 --- src/sys/dev/acpi/acpi_pci.c:1.1 Thu Dec 3 21:04:29 2009 +++ src/sys/dev/acpi/acpi_pci.c Fri Dec 4 10:42:39 2009 @@ -1,4 +1,4 @@ -/* $NetBSD $ */ +/* $NetBSD: acpi_pci.c,v 1.2 2009/12/04 10:42:39 njoly Exp $ */ /* * Copyright (c) 2009 The NetBSD Foundation, Inc. @@ -33,7 +33,7 @@ */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: acpi_pci.c,v 1.1 2009/12/03 21:04:29 cegger Exp $); +__KERNEL_RCSID(0, $NetBSD: acpi_pci.c,v 1.2 2009/12/04 10:42:39 njoly Exp $); #include sys/types.h #include sys/param.h Index: src/sys/dev/acpi/acpi_pci.h diff -u src/sys/dev/acpi/acpi_pci.h:1.1 src/sys/dev/acpi/acpi_pci.h:1.2 --- src/sys/dev/acpi/acpi_pci.h:1.1 Thu Dec 3 21:04:29 2009 +++ src/sys/dev/acpi/acpi_pci.h Fri Dec 4 10:42:39 2009 @@ -1,4 +1,4 @@ -/* $NetBSD $ */ +/* $NetBSD: acpi_pci.h,v 1.2 2009/12/04 10:42:39 njoly Exp $ */ /* * Copyright (c) 2009 The NetBSD Foundation, Inc. Index: src/sys/dev/acpi/acpi_slit.c diff -u src/sys/dev/acpi/acpi_slit.c:1.1 src/sys/dev/acpi/acpi_slit.c:1.2 --- src/sys/dev/acpi/acpi_slit.c:1.1 Wed Nov 25 13:21:49 2009 +++ src/sys/dev/acpi/acpi_slit.c Fri Dec 4 10:42:39 2009 @@ -1,4 +1,4 @@ -/* $NetBSD $ */ +/* $NetBSD: acpi_slit.c,v 1.2 2009/12/04 10:42:39 njoly Exp $ */ /* * Copyright (c) 2009 The NetBSD Foundation, Inc. @@ -30,7 +30,7 @@ */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD $); +__KERNEL_RCSID(0, $NetBSD: acpi_slit.c,v 1.2 2009/12/04 10:42:39 njoly Exp $); #include sys/param.h #include sys/systm.h Index: src/sys/dev/acpi/acpi_slit.h diff -u src/sys/dev/acpi/acpi_slit.h:1.1 src/sys/dev/acpi/acpi_slit.h:1.2 --- src/sys/dev/acpi/acpi_slit.h:1.1 Wed Nov 25 13:21:49 2009 +++ src/sys/dev/acpi/acpi_slit.h Fri Dec 4 10:42:39 2009 @@ -1,4 +1,4 @@ -/* $NetBSD $ */ +/* $NetBSD: acpi_slit.h,v 1.2 2009/12/04 10:42:39 njoly Exp $ */ /* * Copyright (c) 2009 The NetBSD Foundation, Inc. Index: src/sys/dev/acpi/acpi_srat.c diff -u src/sys/dev/acpi/acpi_srat.c:1.1 src/sys/dev/acpi/acpi_srat.c:1.2 --- src/sys/dev/acpi/acpi_srat.c:1.1 Wed Nov 25 13:17:06 2009 +++ src/sys/dev/acpi/acpi_srat.c Fri Dec 4 10:42:39 2009 @@ -1,4 +1,4 @@ -/* $NetBSD $ */ +/* $NetBSD: acpi_srat.c,v 1.2 2009/12/04 10:42:39 njoly Exp $ */ /* * Copyright (c) 2009 The NetBSD Foundation, Inc. @@ -30,7 +30,7 @@ */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD $); +__KERNEL_RCSID(0, $NetBSD: acpi_srat.c,v 1.2 2009/12/04 10:42:39 njoly Exp $); #include sys/param.h #include sys/systm.h Index: src/sys/dev/acpi/acpi_srat.h diff -u src/sys/dev/acpi/acpi_srat.h:1.1 src/sys/dev/acpi/acpi_srat.h:1.2 --- src/sys/dev/acpi/acpi_srat.h:1.1 Wed Nov 25 13:17:06 2009 +++ src/sys/dev/acpi/acpi_srat.h Fri Dec 4 10:42:39 2009 @@ -1,4 +1,4 @@ -/* $NetBSD $ */ +/* $NetBSD: acpi_srat.h,v 1.2 2009/12/04 10:42:39 njoly Exp $ */ /* * Copyright (c) 2009 The NetBSD Foundation, Inc.
CVS commit: src/sys/dev/ic
Module Name:src Committed By: martin Date: Fri Dec 4 11:55:01 UTC 2009 Modified Files: src/sys/dev/ic: gem.c Log Message: Fix a few nits in gem_detach: Shuffle some bus_dmamem_ operations around, so they actually clean up in the correct order. Do not destroy a callout that might be stopped by if_detach later. When detaching child devices fails, we have passed the point of no return already, so complete our own cleanup and return the error in the end. This happens for example when we have been unable to accomodate all phy devices at attach time (and this is a separate bug). To generate a diff of this commit: cvs rdiff -u -r1.85 -r1.86 src/sys/dev/ic/gem.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/ic/gem.c diff -u src/sys/dev/ic/gem.c:1.85 src/sys/dev/ic/gem.c:1.86 --- src/sys/dev/ic/gem.c:1.85 Mon Jul 27 18:10:53 2009 +++ src/sys/dev/ic/gem.c Fri Dec 4 11:55:01 2009 @@ -1,4 +1,4 @@ -/* $NetBSD: gem.c,v 1.85 2009/07/27 18:10:53 dyoung Exp $ */ +/* $NetBSD: gem.c,v 1.86 2009/12/04 11:55:01 martin Exp $ */ /* * @@ -37,7 +37,7 @@ */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: gem.c,v 1.85 2009/07/27 18:10:53 dyoung Exp $); +__KERNEL_RCSID(0, $NetBSD: gem.c,v 1.86 2009/12/04 11:55:01 martin Exp $); #include opt_inet.h #include bpfilter.h @@ -150,13 +150,9 @@ int gem_detach(struct gem_softc *sc, int flags) { - char *nullbuf; - int i, rc; + int i, rc = 0; struct ifnet *ifp = sc-sc_ethercom.ec_if; - nullbuf = - (char *)sc-sc_control_data + sizeof(struct gem_control_data); - /* * Free any resources we've allocated during the attach. * Do this in reverse order and fall through. @@ -177,18 +173,19 @@ #endif evcnt_detach(sc-sc_ev_intr); - callout_destroy(sc-sc_tick_ch); #if NRND 0 rnd_detach_source(sc-rnd_source); #endif ether_ifdetach(ifp); if_detach(ifp); ifmedia_delete_instance(sc-sc_mii.mii_media, IFM_INST_ANY); + + callout_destroy(sc-sc_tick_ch); + /*FALLTHROUGH*/ case GEM_ATT_MII: sc-sc_att_stage = GEM_ATT_MII; - if ((rc = config_detach_children(sc-sc_dev, flags)) != 0) - return rc; + rc = config_detach_children(sc-sc_dev, flags); /*FALLTHROUGH*/ case GEM_ATT_7: for (i = 0; i GEM_NRXDESC; i++) { @@ -206,10 +203,10 @@ bus_dmamap_unload(sc-sc_dmatag, sc-sc_cddmamap); /*FALLTHROUGH*/ case GEM_ATT_5: - bus_dmamap_destroy(sc-sc_dmatag, sc-sc_nulldmamap); + bus_dmamap_unload(sc-sc_dmatag, sc-sc_nulldmamap); /*FALLTHROUGH*/ case GEM_ATT_4: - bus_dmamem_unmap(sc-sc_dmatag, nullbuf, ETHER_MIN_TX); + bus_dmamap_destroy(sc-sc_dmatag, sc-sc_nulldmamap); /*FALLTHROUGH*/ case GEM_ATT_3: bus_dmamap_destroy(sc-sc_dmatag, sc-sc_cddmamap); @@ -227,7 +224,7 @@ case GEM_ATT_BACKEND_0: break; } - return 0; + return rc; } static void
CVS commit: src/sys/arch/sparc64/include
Module Name:src Committed By: nakayama Date: Fri Dec 4 12:22:17 UTC 2009 Modified Files: src/sys/arch/sparc64/include: bus.h Log Message: bus_space_handle_t: - make _asi and _sasi unsigned to reduce superfluous codes by sign extension. - remove unused member _virtual. To generate a diff of this commit: cvs rdiff -u -r1.59 -r1.60 src/sys/arch/sparc64/include/bus.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/sparc64/include/bus.h diff -u src/sys/arch/sparc64/include/bus.h:1.59 src/sys/arch/sparc64/include/bus.h:1.60 --- src/sys/arch/sparc64/include/bus.h:1.59 Mon Jun 1 01:14:06 2009 +++ src/sys/arch/sparc64/include/bus.h Fri Dec 4 12:22:16 2009 @@ -1,4 +1,4 @@ -/* $NetBSD: bus.h,v 1.59 2009/06/01 01:14:06 macallan Exp $ */ +/* $NetBSD: bus.h,v 1.60 2009/12/04 12:22:16 nakayama Exp $ */ /*- * Copyright (c) 1996, 1997, 1998, 2001 The NetBSD Foundation, Inc. @@ -101,9 +101,8 @@ */ typedef struct _bus_space_handle { uint64_t _ptr; - int8_t _asi; - int8_t _sasi; - char _virtual; + uint8_t _asi; + uint8_t _sasi; } bus_space_handle_t; typedef enum bus_type bus_type_t; typedef u_int64_t bus_addr_t;
CVS commit: src/sys/arch/sparc64/include
Module Name:src Committed By: nakayama Date: Fri Dec 4 12:24:23 UTC 2009 Modified Files: src/sys/arch/sparc64/include: bus.h Log Message: s/u_intN_t/uintN_t/ and whitespace nit. no functional change. To generate a diff of this commit: cvs rdiff -u -r1.60 -r1.61 src/sys/arch/sparc64/include/bus.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/sparc64/include/bus.h diff -u src/sys/arch/sparc64/include/bus.h:1.60 src/sys/arch/sparc64/include/bus.h:1.61 --- src/sys/arch/sparc64/include/bus.h:1.60 Fri Dec 4 12:22:16 2009 +++ src/sys/arch/sparc64/include/bus.h Fri Dec 4 12:24:23 2009 @@ -1,4 +1,4 @@ -/* $NetBSD: bus.h,v 1.60 2009/12/04 12:22:16 nakayama Exp $ */ +/* $NetBSD: bus.h,v 1.61 2009/12/04 12:24:23 nakayama Exp $ */ /*- * Copyright (c) 1996, 1997, 1998, 2001 The NetBSD Foundation, Inc. @@ -105,8 +105,8 @@ uint8_t _sasi; } bus_space_handle_t; typedef enum bus_type bus_type_t; -typedef u_int64_t bus_addr_t; -typedef u_int64_t bus_size_t; +typedef uint64_t bus_addr_t; +typedef uint64_t bus_size_t; /* * -- convert prom virtual address to bus_space_handle_t @@ -141,7 +141,7 @@ int type; - int (*sparc_bus_alloc)(bus_space_tag_t, bus_addr_t, + int (*sparc_bus_alloc)(bus_space_tag_t, bus_addr_t, bus_addr_t, bus_size_t, bus_size_t, bus_size_t, int, bus_addr_t *, bus_space_handle_t *); @@ -335,7 +335,7 @@ } /* - * u_intN_t bus_space_read_N(bus_space_tag_t tag, + * uintN_t bus_space_read_N(bus_space_tag_t tag, * bus_space_handle_t bsh, bus_size_t offset); * * Read a 1, 2, 4, or 8 byte quantity from bus space @@ -355,25 +355,25 @@ (0 ? (t)-type : ldxa((h)._ptr + (o), (h)._asi)) #else #define bus_space_read_1(t, h, o) ({ \ - unsigned char __bv = \ + uint8_t __bv = \ lduba((h)._ptr + (o), (h)._asi);\ if (bus_space_debug BSDB_ACCESS)\ printf(bsr1(%llx + %llx, %x) - %x\n, (long long)(h)._ptr, \ (long long)(o), \ - (h)._asi, (unsigned int) __bv);\ + (h)._asi, (uint32_t) __bv);\ __bv; }) #define bus_space_read_2(t, h, o) ({ \ - unsigned short __bv = \ + uint16_t __bv = \ lduha((h)._ptr + (o), (h)._asi);\ if (bus_space_debug BSDB_ACCESS)\ printf(bsr2(%llx + %llx, %x) - %x\n, (long long)(h)._ptr, \ (long long)(o), \ - (h)._asi, (unsigned int)__bv);\ + (h)._asi, (uint32_t)__bv);\ __bv; }) #define bus_space_read_4(t, h, o) ({ \ - unsigned int __bv = \ + uint32_t __bv = \ lda((h)._ptr + (o), (h)._asi);\ if (bus_space_debug BSDB_ACCESS)\ printf(bsr4(%llx + %llx, %x) - %x\n, (long long)(h)._ptr, \ @@ -382,7 +382,7 @@ __bv; }) #define bus_space_read_8(t, h, o) ({ \ - u_int64_t __bv = \ + uint64_t __bv = \ ldxa((h)._ptr + (o), (h)._asi);\ if (bus_space_debug BSDB_ACCESS)\ printf(bsr8(%llx + %llx, %x) - %llx\n, (long long)(h)._ptr, \ @@ -393,7 +393,7 @@ /* * void bus_space_read_multi_N(bus_space_tag_t tag, * bus_space_handle_t bsh, bus_size_t offset, - * u_intN_t *addr, size_t count); + * uintN_t *addr, size_t count); * * Read `count' 1, 2, 4, or 8 byte quantities from bus space * described by tag/handle/offset and copy into buffer provided. @@ -401,20 +401,20 @@ static __inline void bus_space_read_multi_1(bus_space_tag_t, bus_space_handle_t, - bus_size_t, u_int8_t *, size_t); + bus_size_t, uint8_t *, size_t); static __inline void bus_space_read_multi_2(bus_space_tag_t, bus_space_handle_t, - bus_size_t, u_int16_t *, size_t); + bus_size_t, uint16_t *, size_t); static __inline void bus_space_read_multi_4(bus_space_tag_t, bus_space_handle_t, - bus_size_t, u_int32_t *, size_t); + bus_size_t, uint32_t *, size_t); static __inline void bus_space_read_multi_8(bus_space_tag_t, bus_space_handle_t, - bus_size_t, u_int64_t *, size_t); + bus_size_t, uint64_t *, size_t); static __inline void bus_space_read_multi_1(bus_space_tag_t t, bus_space_handle_t h, - bus_size_t o, u_int8_t * a, size_t c) + bus_size_t o, uint8_t * a, size_t c) { while (c-- 0) *a++ = bus_space_read_1(t, h, o); @@ -422,7 +422,7 @@ static __inline void bus_space_read_multi_2(bus_space_tag_t t, bus_space_handle_t h, - bus_size_t o, u_int16_t * a, size_t c) + bus_size_t o, uint16_t * a, size_t c) { while (c-- 0) *a++ = bus_space_read_2(t, h, o); @@ -430,7 +430,7 @@ static __inline void bus_space_read_multi_4(bus_space_tag_t t, bus_space_handle_t h, - bus_size_t o, u_int32_t * a, size_t c) + bus_size_t o, uint32_t * a, size_t c) { while (c-- 0) *a++ = bus_space_read_4(t, h, o); @@ -438,7 +438,7 @@ static __inline void bus_space_read_multi_8(bus_space_tag_t t, bus_space_handle_t h, - bus_size_t o, u_int64_t * a, size_t c) + bus_size_t o, uint64_t * a, size_t c) { while (c-- 0) *a++ =
CVS commit: src/distrib/sets
Module Name:src Committed By: apb Date: Fri Dec 4 12:43:57 UTC 2009 Modified Files: src/distrib/sets: Makefile Log Message: Remove definition of GREP variable, which was unused. The only use of this variable was removed in revision 1.67. To generate a diff of this commit: cvs rdiff -u -r1.72 -r1.73 src/distrib/sets/Makefile 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/Makefile diff -u src/distrib/sets/Makefile:1.72 src/distrib/sets/Makefile:1.73 --- src/distrib/sets/Makefile:1.72 Tue Dec 1 09:11:45 2009 +++ src/distrib/sets/Makefile Fri Dec 4 12:43:56 2009 @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.72 2009/12/01 09:11:45 uebayasi Exp $ +# $NetBSD: Makefile,v 1.73 2009/12/04 12:43:56 apb Exp $ # The `all' target must appear before bsd.own.mk is pulled in. all: @@ -7,7 +7,6 @@ .include bsd.own.mk .include ${NETBSDSRCDIR}/distrib/common/Makefile.distrib -GREP?= grep SETSCMD= cd ${.CURDIR} \ DESTDIR=${DESTDIR:Q} \
CVS commit: src/sys/dev/ic
Module Name:src Committed By: jdc Date: Fri Dec 4 13:35:56 UTC 2009 Modified Files: src/sys/dev/ic: gem.c Log Message: Only set 0x4FF in the transmit register for gigabit variants. Set 0x100 otherwise. To generate a diff of this commit: cvs rdiff -u -r1.86 -r1.87 src/sys/dev/ic/gem.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/ic/gem.c diff -u src/sys/dev/ic/gem.c:1.86 src/sys/dev/ic/gem.c:1.87 --- src/sys/dev/ic/gem.c:1.86 Fri Dec 4 11:55:01 2009 +++ src/sys/dev/ic/gem.c Fri Dec 4 13:35:56 2009 @@ -1,4 +1,4 @@ -/* $NetBSD: gem.c,v 1.86 2009/12/04 11:55:01 martin Exp $ */ +/* $NetBSD: gem.c,v 1.87 2009/12/04 13:35:56 jdc Exp $ */ /* * @@ -37,7 +37,7 @@ */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: gem.c,v 1.86 2009/12/04 11:55:01 martin Exp $); +__KERNEL_RCSID(0, $NetBSD: gem.c,v 1.87 2009/12/04 13:35:56 jdc Exp $); #include opt_inet.h #include bpfilter.h @@ -1161,8 +1161,9 @@ /* Enable TX DMA */ v = gem_ringsize(GEM_NTXDESC /*XXX*/); bus_space_write_4(t, h, GEM_TX_CONFIG, - v|GEM_TX_CONFIG_TXDMA_EN| - ((0x4FF10)GEM_TX_CONFIG_TXFIFO_TH)); + v | GEM_TX_CONFIG_TXDMA_EN | + (((sc-sc_flags GEM_GIGABIT ? 0x4FF : 0x100) 10) + GEM_TX_CONFIG_TXFIFO_TH)); bus_space_write_4(t, h, GEM_TX_KICK, sc-sc_txnext); /* step 10. ERX Configuration */
CVS commit: src/share/examples/puffs/dtfs
Module Name:src Committed By: pooka Date: Fri Dec 4 13:43:28 UTC 2009 Modified Files: src/share/examples/puffs/dtfs: dtfs.c dtfs_vfsops.c Log Message: Remove no longer supported suspend code. To generate a diff of this commit: cvs rdiff -u -r1.39 -r1.40 src/share/examples/puffs/dtfs/dtfs.c cvs rdiff -u -r1.23 -r1.24 src/share/examples/puffs/dtfs/dtfs_vfsops.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/share/examples/puffs/dtfs/dtfs.c diff -u src/share/examples/puffs/dtfs/dtfs.c:1.39 src/share/examples/puffs/dtfs/dtfs.c:1.40 --- src/share/examples/puffs/dtfs/dtfs.c:1.39 Wed Dec 19 14:01:30 2007 +++ src/share/examples/puffs/dtfs/dtfs.c Fri Dec 4 13:43:28 2009 @@ -1,4 +1,4 @@ -/* $NetBSD: dtfs.c,v 1.39 2007/12/19 14:01:30 pooka Exp $ */ +/* $NetBSD: dtfs.c,v 1.40 2009/12/04 13:43:28 pooka Exp $ */ /* * Copyright (c) 2006 Antti Kantee. All Rights Reserved. @@ -69,18 +69,6 @@ exit(1); } -/* - * This is not perhaps entirely kosher, but this is test file system, - * so I'm really not concerned. - */ -static void -dosuspend(int v) -{ - - puffs_fs_suspend(gpu); - puffs_fs_suspend(gpu); -} - static void wipe_the_sleep_out_of_my_eyes(int v) { @@ -198,7 +186,6 @@ PUFFSOP_SETFSNOP(pops, sync); PUFFSOP_SET(pops, dtfs, fs, fhtonode); PUFFSOP_SET(pops, dtfs, fs, nodetofh); - PUFFSOP_SET(pops, dtfs, fs, suspend); PUFFSOP_SET(pops, dtfs, node, lookup); PUFFSOP_SET(pops, dtfs, node, access); @@ -232,8 +219,6 @@ | (dynamicfh ? PUFFS_FHFLAG_DYNAMIC : 0)); puffs_setncookiehash(pu, khashbuckets); - if (signal(SIGUSR1, dosuspend) == SIG_ERR) - warn(cannot set suspend sighandler); if (signal(SIGALRM, wipe_the_sleep_out_of_my_eyes) == SIG_ERR) warn(cannot set alarm sighandler); Index: src/share/examples/puffs/dtfs/dtfs_vfsops.c diff -u src/share/examples/puffs/dtfs/dtfs_vfsops.c:1.23 src/share/examples/puffs/dtfs/dtfs_vfsops.c:1.24 --- src/share/examples/puffs/dtfs/dtfs_vfsops.c:1.23 Fri Nov 30 19:02:37 2007 +++ src/share/examples/puffs/dtfs/dtfs_vfsops.c Fri Dec 4 13:43:28 2009 @@ -1,4 +1,4 @@ -/* $NetBSD: dtfs_vfsops.c,v 1.23 2007/11/30 19:02:37 pooka Exp $ */ +/* $NetBSD: dtfs_vfsops.c,v 1.24 2009/12/04 13:43:28 pooka Exp $ */ /* * Copyright (c) 2006 Antti Kantee. All Rights Reserved. @@ -289,15 +289,6 @@ return 0; } -void -dtfs_fs_suspend(struct puffs_usermount *pu, int status) -{ - - printf(suspend status %d\n, status); - if (status == 1) - sleep(3); -} - int dtfs_fs_unmount(struct puffs_usermount *pu, int flags) {
CVS commit: src/share/man/man4
Module Name:src Committed By: njoly Date: Fri Dec 4 13:53:39 UTC 2009 Modified Files: src/share/man/man4: spdmem.4 Log Message: Remove unneeded ichsmb(4)/nfsmb(4) cross-references. To generate a diff of this commit: cvs rdiff -u -r1.2 -r1.3 src/share/man/man4/spdmem.4 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/share/man/man4/spdmem.4 diff -u src/share/man/man4/spdmem.4:1.2 src/share/man/man4/spdmem.4:1.3 --- src/share/man/man4/spdmem.4:1.2 Wed Sep 17 12:37:41 2008 +++ src/share/man/man4/spdmem.4 Fri Dec 4 13:53:38 2009 @@ -1,4 +1,4 @@ -.\ $NetBSD: spdmem.4,v 1.2 2008/09/17 12:37:41 pgoyette Exp $ +.\ $NetBSD: spdmem.4,v 1.3 2009/12/04 13:53:38 njoly Exp $ .\ .\Copyright (c) 2007 Nicolas Joly .\Copyright (c) 2007 Paul Goyette @@ -52,9 +52,7 @@ device is created under the 'hw' top-level MIB. .Sh SEE ALSO .Xr iic 4 , -.Xr intro 4 , -.Xr ichsmb 4 , -.Xr nfsmb 4 +.Xr intro 4 .Sh HISTORY The .Nm
CVS commit: src/external/bsd/openresolv/dist
Module Name:src Committed By: roy Date: Fri Dec 4 14:11:49 UTC 2009 Update of /cvsroot/src/external/bsd/openresolv/dist In directory ivanova.netbsd.org:/tmp/cvs-serv23526 Log Message: Import openresolv-3.3.4 Changes from openresolv-3.3.3 include: * private_interfaces is now shell expandable (ie, fxp*) * dnsmasq resolver restarting with DBus is now fixed * unbound resolver is sent SIGHUP for reload instead of forced restart * subscribers with the execute bit are executed, otherwise sourced into a subshell for speed Status: Vendor Tag: roy Release Tags: openresolv-3-3-4 U src/external/bsd/openresolv/dist/README U src/external/bsd/openresolv/dist/resolvconf.in U src/external/bsd/openresolv/dist/resolvconf.8.in U src/external/bsd/openresolv/dist/resolvconf.conf.5.in U src/external/bsd/openresolv/dist/libc.in U src/external/bsd/openresolv/dist/dnsmasq.in U src/external/bsd/openresolv/dist/named.in U src/external/bsd/openresolv/dist/unbound.in No conflicts created by this import
CVS commit: src/doc
Module Name:src Committed By: roy Date: Fri Dec 4 14:30:01 UTC 2009 Modified Files: src/doc: 3RDPARTY CHANGES Log Message: Import openresolv-3.3.4 To generate a diff of this commit: cvs rdiff -u -r1.735 -r1.736 src/doc/3RDPARTY cvs rdiff -u -r1.1325 -r1.1326 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/3RDPARTY diff -u src/doc/3RDPARTY:1.735 src/doc/3RDPARTY:1.736 --- src/doc/3RDPARTY:1.735 Wed Dec 2 02:07:02 2009 +++ src/doc/3RDPARTY Fri Dec 4 14:30:01 2009 @@ -1,4 +1,4 @@ -# $NetBSD: 3RDPARTY,v 1.735 2009/12/02 02:07:02 haad Exp $ +# $NetBSD: 3RDPARTY,v 1.736 2009/12/04 14:30:01 roy Exp $ # # This file contains a list of the software that has been integrated into # NetBSD where we are not the primary maintainer. @@ -742,8 +742,8 @@ Next import will need $ Id removal.. Package: openresolv -Version: 3.3.3 -Current Vers: 3.3.3 +Version: 3.3.4 +Current Vers: 3.3.4 Maintainer: roy Archive Site: ftp://roy.marples.name/pub/openresolv/ Home Page: http://roy.marples.name/projects/openresolv/ Index: src/doc/CHANGES diff -u src/doc/CHANGES:1.1325 src/doc/CHANGES:1.1326 --- src/doc/CHANGES:1.1325 Wed Dec 2 02:07:30 2009 +++ src/doc/CHANGES Fri Dec 4 14:30:01 2009 @@ -1,4 +1,4 @@ -# LIST OF CHANGES FROM LAST RELEASE: $Revision: 1.1325 $ +# LIST OF CHANGES FROM LAST RELEASE: $Revision: 1.1326 $ # # # [Note: This file does not mention every change made to the NetBSD source tree. @@ -496,4 +496,5 @@ with many modification. [tsutsui 20091130] lvm: Import new lvm2tools 2.02.56 version and libdevmapper 1.02.40. [haad 20091202] + resolvconf(8): Import openreslv-3.3.4. [roy 20091204]
CVS commit: src/external/bsd/openresolv/sbin/resolvconf
Module Name:src Committed By: roy Date: Fri Dec 4 14:44:57 UTC 2009 Modified Files: src/external/bsd/openresolv/sbin/resolvconf: Makefile Log Message: Install our shell subscribers as normal files To generate a diff of this commit: cvs rdiff -u -r1.2 -r1.3 src/external/bsd/openresolv/sbin/resolvconf/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/openresolv/sbin/resolvconf/Makefile diff -u src/external/bsd/openresolv/sbin/resolvconf/Makefile:1.2 src/external/bsd/openresolv/sbin/resolvconf/Makefile:1.3 --- src/external/bsd/openresolv/sbin/resolvconf/Makefile:1.2 Thu Dec 3 10:28:37 2009 +++ src/external/bsd/openresolv/sbin/resolvconf/Makefile Fri Dec 4 14:44:57 2009 @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.2 2009/12/03 10:28:37 roy Exp $ +# $NetBSD: Makefile,v 1.3 2009/12/04 14:44:57 roy Exp $ # .include bsd.own.mk @@ -7,19 +7,23 @@ .PATH: ${DIST} SCRIPTS= resolvconf -SCRIPTS+= libc dnsmasq named unbound +SCRIPTSDIR= /sbin -SCRIPTSDIR_resolvconf= /sbin -SCRIPTSDIR= /libexec/resolvconf +FILES= libc dnsmasq named unbound +FILESDIR= /libexec/resolvconf +# We should not have to do this ... +.for f in ${FILES} +FILESBUILD_$f= yes +.endfor MAN= resolvconf.conf.5 resolvconf.8 -CLEANFILES= ${SCRIPTS} ${MAN} +CLEANFILES= ${SCRIPTS} ${FILES} ${MAN} CMD1= \1 status /dev/null 2\1 CMD2= \1 restart RESTARTCMD= /etc/rc.d/${CMD1} \\ /etc/rc.d/${CMD2} -.for f in ${SCRIPTS} ${MAN} +.for f in ${SCRIPTS} ${FILES} ${MAN} ${f}: ${f}.in ${TOOL_SED} -e 's:@PREFIX@::g' \ -e 's:@SYSCONFDIR@:/etc:g' \
CVS commit: src/sys/rump/librump/rumpkern
Module Name:src Committed By: pooka Date: Fri Dec 4 16:47:33 UTC 2009 Modified Files: src/sys/rump/librump/rumpkern: rump.c vm.c Log Message: Provide the default_mapaddr method in default rump emul (since some kernel callers want to use it). To generate a diff of this commit: cvs rdiff -u -r1.144 -r1.145 src/sys/rump/librump/rumpkern/rump.c cvs rdiff -u -r1.67 -r1.68 src/sys/rump/librump/rumpkern/vm.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/rump/librump/rumpkern/rump.c diff -u src/sys/rump/librump/rumpkern/rump.c:1.144 src/sys/rump/librump/rumpkern/rump.c:1.145 --- src/sys/rump/librump/rumpkern/rump.c:1.144 Thu Dec 3 12:35:34 2009 +++ src/sys/rump/librump/rumpkern/rump.c Fri Dec 4 16:47:33 2009 @@ -1,4 +1,4 @@ -/* $NetBSD: rump.c,v 1.144 2009/12/03 12:35:34 pooka Exp $ */ +/* $NetBSD: rump.c,v 1.145 2009/12/04 16:47:33 pooka Exp $ */ /* * Copyright (c) 2007 Antti Kantee. All Rights Reserved. @@ -28,7 +28,7 @@ */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: rump.c,v 1.144 2009/12/03 12:35:34 pooka Exp $); +__KERNEL_RCSID(0, $NetBSD: rump.c,v 1.145 2009/12/04 16:47:33 pooka Exp $); #include sys/param.h #include sys/atomic.h @@ -123,7 +123,9 @@ } static int rump_inited; -static struct emul emul_rump; +static struct emul emul_rump = { + .e_vm_default_addr = uvm_default_mapaddr, +}; int rump__unavailable(void); int rump__unavailable() {return EOPNOTSUPP;} @@ -455,6 +457,7 @@ p-p_limit = rump_limits; p-p_pid = pid; p-p_vmspace = rump_vmspace; + p-p_emul = emul_rump; p-p_fd = fd_init(NULL); p-p_lock = mutex_obj_alloc(MUTEX_DEFAULT, IPL_NONE); l-l_cred = rump_cred_suserget(); Index: src/sys/rump/librump/rumpkern/vm.c diff -u src/sys/rump/librump/rumpkern/vm.c:1.67 src/sys/rump/librump/rumpkern/vm.c:1.68 --- src/sys/rump/librump/rumpkern/vm.c:1.67 Wed Nov 4 18:25:36 2009 +++ src/sys/rump/librump/rumpkern/vm.c Fri Dec 4 16:47:33 2009 @@ -1,4 +1,4 @@ -/* $NetBSD: vm.c,v 1.67 2009/11/04 18:25:36 pooka Exp $ */ +/* $NetBSD: vm.c,v 1.68 2009/12/04 16:47:33 pooka Exp $ */ /* * Copyright (c) 2007 Antti Kantee. All Rights Reserved. @@ -41,7 +41,7 @@ */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: vm.c,v 1.67 2009/11/04 18:25:36 pooka Exp $); +__KERNEL_RCSID(0, $NetBSD: vm.c,v 1.68 2009/12/04 16:47:33 pooka Exp $); #include sys/param.h #include sys/atomic.h @@ -251,7 +251,6 @@ } - void uvm_pagewire(struct vm_page *pg) { @@ -502,6 +501,13 @@ /* nada for now */ } +vaddr_t +uvm_default_mapaddr(struct proc *p, vaddr_t base, vsize_t sz) +{ + + return 0; +} + /* * UVM km */
CVS commit: src/sys/arch/mac68k/mac68k
Module Name:src Committed By: tsutsui Date: Fri Dec 4 16:57:18 UTC 2009 Modified Files: src/sys/arch/mac68k/mac68k: locore.s pmap_bootstrap.c Log Message: Use common pmap_bootstrap_finalize() to initialize lwp0 uarea etc. Tested on LC630. To generate a diff of this commit: cvs rdiff -u -r1.156 -r1.157 src/sys/arch/mac68k/mac68k/locore.s cvs rdiff -u -r1.80 -r1.81 src/sys/arch/mac68k/mac68k/pmap_bootstrap.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/mac68k/mac68k/locore.s diff -u src/sys/arch/mac68k/mac68k/locore.s:1.156 src/sys/arch/mac68k/mac68k/locore.s:1.157 --- src/sys/arch/mac68k/mac68k/locore.s:1.156 Thu Nov 26 00:19:18 2009 +++ src/sys/arch/mac68k/mac68k/locore.s Fri Dec 4 16:57:18 2009 @@ -1,4 +1,4 @@ -/* $NetBSD: locore.s,v 1.156 2009/11/26 00:19:18 matt Exp $ */ +/* $NetBSD: locore.s,v 1.157 2009/12/04 16:57:18 tsutsui Exp $ */ /* * Copyright (c) 1982, 1990 The Regents of the University of California. @@ -336,15 +336,13 @@ /* select the software page size now */ lea _ASM_LABEL(tmpstk),%sp | temporary stack jbsr _C_LABEL(uvm_setpagesize) | select software page size - +/* call final pmap setup which initialize lwp0, curlwp, and curpcb */ + jbsr _C_LABEL(pmap_bootstrap_finalize) /* set kernel stack, user SP, lwp0, and initial pcb */ - lea _C_LABEL(lwp0),%a2 | get lwp0.l_addr - movl %a2@(L_ADDR),%a1 | set kernel stack to end of area - lea %a1@(USPACE-4),%sp | and curlwp so that we don't - movl %a2,_C_LABEL(curlwp) | deref NULL in trap() + movl _C_LABEL(lwp0uarea),%a1 | get lwp0 uarea + lea %a1@(USPACE-4),%sp | set kernel stack to end of area movl #USRSTACK-4,%a2 movl %a2,%usp | init %USP - movl %a1,_C_LABEL(curpcb) | lwp0 is running /* flush TLB and turn on caches */ cmpl #MMU_68040,_C_LABEL(mmutype) | 68040? Index: src/sys/arch/mac68k/mac68k/pmap_bootstrap.c diff -u src/sys/arch/mac68k/mac68k/pmap_bootstrap.c:1.80 src/sys/arch/mac68k/mac68k/pmap_bootstrap.c:1.81 --- src/sys/arch/mac68k/mac68k/pmap_bootstrap.c:1.80 Fri Nov 27 03:23:10 2009 +++ src/sys/arch/mac68k/mac68k/pmap_bootstrap.c Fri Dec 4 16:57:18 2009 @@ -1,4 +1,4 @@ -/* $NetBSD: pmap_bootstrap.c,v 1.80 2009/11/27 03:23:10 rmind Exp $ */ +/* $NetBSD: pmap_bootstrap.c,v 1.81 2009/12/04 16:57:18 tsutsui Exp $ */ /* * Copyright (c) 1991, 1993 @@ -36,7 +36,7 @@ */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: pmap_bootstrap.c,v 1.80 2009/11/27 03:23:10 rmind Exp $); +__KERNEL_RCSID(0, $NetBSD: pmap_bootstrap.c,v 1.81 2009/12/04 16:57:18 tsutsui Exp $); #include opt_ddb.h #include opt_kgdb.h @@ -110,7 +110,7 @@ void pmap_bootstrap(paddr_t nextpa, paddr_t firstpa) { - paddr_t kstpa, kptpa, kptmpa, l0upa; + paddr_t kstpa, kptpa, kptmpa, lwp0upa; u_int nptpages, kstsize; paddr_t avail_next; int avail_remaining; @@ -138,7 +138,7 @@ * * kptmpa kernel PT map 1 page * - * l0upa lwp 0 u-area UPAGES pages + * lwp0upa lwp 0 u-area UPAGES pages * */ if (mmutype == MMU_68040) @@ -149,7 +149,7 @@ nextpa += kstsize * PAGE_SIZE; kptmpa = nextpa; nextpa += PAGE_SIZE; - l0upa = nextpa; + lwp0upa = nextpa; nextpa += USPACE; kptpa = nextpa; nptpages = Sysptsize + @@ -335,7 +335,7 @@ } /* * Validate PTEs for kernel data/bss, dynamic data allocated - * by us so far (nextpa - firstpa bytes), and pages for proc0 + * by us so far (nextpa - firstpa bytes), and pages for lwp0 * u-area and page table allocated below (RW). */ epte = (PA2VA(kptpa, u_int *))[m68k_btop(nextpa - firstpa)]; @@ -399,21 +399,22 @@ Sysmap = (pt_entry_t *)m68k_ptob((NPTEPG - 1) * NPTEPG); /* - * Setup u-area for process 0. + * Setup u-area for lwp 0. */ /* * Zero the u-area. * NOTE: `pte' and `epte' aren't PTEs here. */ - pte = PA2VA(l0upa, u_int *); - epte = (u_int *)(PA2VA(l0upa, u_int) + USPACE); + pte = PA2VA(lwp0upa, u_int *); + epte = (u_int *)(PA2VA(lwp0upa, u_int) + USPACE); while (pte epte) *pte++ = 0; /* - * Store the u-area address + * Remember the u-area address so it can be loaded in the lwp0 + * via uvm_lwp_setuarea() later in pmap_bootstrap_finalize(). */ - uvm_lwp_setuarea(lwp0, PA2VA(l0upa, vaddr_t)); + lwp0uarea = PA2VA(lwp0upa, vaddr_t); /* * VM data structures are now initialized, set up data for
CVS commit: src/sys/arch/amiga/amiga
Module Name:src Committed By: tsutsui Date: Fri Dec 4 17:11:11 UTC 2009 Modified Files: src/sys/arch/amiga/amiga: amiga_init.c locore.s Log Message: Use common pmap_bootstrap_finalize() to initialize lwp0 uarea etc. Compile test only. To generate a diff of this commit: cvs rdiff -u -r1.113 -r1.114 src/sys/arch/amiga/amiga/amiga_init.c cvs rdiff -u -r1.146 -r1.147 src/sys/arch/amiga/amiga/locore.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/amiga/amiga/amiga_init.c diff -u src/sys/arch/amiga/amiga/amiga_init.c:1.113 src/sys/arch/amiga/amiga/amiga_init.c:1.114 --- src/sys/arch/amiga/amiga/amiga_init.c:1.113 Thu Nov 26 18:23:48 2009 +++ src/sys/arch/amiga/amiga/amiga_init.c Fri Dec 4 17:11:10 2009 @@ -1,4 +1,4 @@ -/* $NetBSD: amiga_init.c,v 1.113 2009/11/26 18:23:48 phx Exp $ */ +/* $NetBSD: amiga_init.c,v 1.114 2009/12/04 17:11:10 tsutsui Exp $ */ /* * Copyright (c) 1994 Michael L. Hitch @@ -36,11 +36,10 @@ #include opt_devreload.h #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: amiga_init.c,v 1.113 2009/11/26 18:23:48 phx Exp $); +__KERNEL_RCSID(0, $NetBSD: amiga_init.c,v 1.114 2009/12/04 17:11:10 tsutsui Exp $); #include sys/param.h #include sys/systm.h -#include sys/proc.h #include uvm/uvm_extern.h #include sys/ioctl.h #include sys/select.h @@ -353,7 +352,7 @@ /* * save KVA of lwp0 u-area and allocate it. */ - RELOC(lwp0.l_addr, struct user *) = (struct user *)vstart; + RELOC(lwp0uarea, vaddr_t) = vstart; pstart += USPACE; vstart += USPACE; avail -= USPACE; @@ -788,8 +787,8 @@ ((volatile struct Custom *)CUSTOMADDR)-color[0] = 0x0a0; /* GREEN */ #endif - memset(lwp0.l_addr, 0, USPACE); pmap_bootstrap(start_c_pstart, start_c_fphystart); + pmap_bootstrap_finalize(); /* * to make life easier in locore.s, set these addresses explicitly Index: src/sys/arch/amiga/amiga/locore.s diff -u src/sys/arch/amiga/amiga/locore.s:1.146 src/sys/arch/amiga/amiga/locore.s:1.147 --- src/sys/arch/amiga/amiga/locore.s:1.146 Thu Nov 26 00:19:12 2009 +++ src/sys/arch/amiga/amiga/locore.s Fri Dec 4 17:11:11 2009 @@ -1,4 +1,4 @@ -/* $NetBSD: locore.s,v 1.146 2009/11/26 00:19:12 matt Exp $ */ +/* $NetBSD: locore.s,v 1.147 2009/12/04 17:11:11 tsutsui Exp $ */ /* * Copyright (c) 1980, 1990 The Regents of the University of California. @@ -1024,14 +1024,11 @@ jbsr _C_LABEL(start_c_finish) /* set kernel stack, user SP, and initial pcb */ - lea _C_LABEL(lwp0),%a2 | grab lwp0 and initialize - movl %a2,_C_LABEL(curlwp) | curlwp so that - movl %a2@(L_ADDR),%a1 | we don't dref NULL in trap() + movl _C_LABEL(lwp0uarea),%a1 | grab lwp0 uarea lea %a1@(USPACE),%sp | set kernel stack to end of area movl #USRSTACK-4,%a2 movl %a2,%usp | init user SP movl %a2,%a1@(PCB_USP) | and save it - movl %a1,_C_LABEL(curpcb) | lwp0 is running clrw %a1@(PCB_FLAGS) | clear flags #ifdef FPCOPROC clrl %a1@(PCB_FPCTX) | ensure null FP context
CVS commit: src/sys/rump/librump/rumpkern
Module Name:src Committed By: pooka Date: Fri Dec 4 17:15:47 UTC 2009 Modified Files: src/sys/rump/librump/rumpkern: vm.c Log Message: Implement enough of uvm_mmap() to make the creative proplib ioctl copyout code work. No comments ... okok, if that'll make you leave me alone: it's ioctl, so it's supposed to be funky (with a score or two of psychedelic rock). To generate a diff of this commit: cvs rdiff -u -r1.68 -r1.69 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.68 src/sys/rump/librump/rumpkern/vm.c:1.69 --- src/sys/rump/librump/rumpkern/vm.c:1.68 Fri Dec 4 16:47:33 2009 +++ src/sys/rump/librump/rumpkern/vm.c Fri Dec 4 17:15:47 2009 @@ -1,4 +1,4 @@ -/* $NetBSD: vm.c,v 1.68 2009/12/04 16:47:33 pooka Exp $ */ +/* $NetBSD: vm.c,v 1.69 2009/12/04 17:15:47 pooka Exp $ */ /* * Copyright (c) 2007 Antti Kantee. All Rights Reserved. @@ -41,11 +41,12 @@ */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: vm.c,v 1.68 2009/12/04 16:47:33 pooka Exp $); +__KERNEL_RCSID(0, $NetBSD: vm.c,v 1.69 2009/12/04 17:15:47 pooka Exp $); #include sys/param.h #include sys/atomic.h #include sys/kmem.h +#include sys/mman.h #include sys/null.h #include sys/vnode.h #include sys/buf.h @@ -265,12 +266,33 @@ /* nada */ } +/* + * This satisfies the disgusting mmap hack used by proplib. + * We probably should grow some more assertables to make sure we're + * not satisfying anything we shouldn't be satisfying. At least we + * should make sure it's the local machine we're mmapping ... + */ int uvm_mmap(struct vm_map *map, vaddr_t *addr, vsize_t size, vm_prot_t prot, vm_prot_t maxprot, int flags, void *handle, voff_t off, vsize_t locklim) { + void *uaddr; + int error; - panic(%s: unimplemented, __func__); + if (prot != (VM_PROT_READ | VM_PROT_WRITE)) + panic(uvm_mmap() variant unsupported); + if (flags != (MAP_PRIVATE | MAP_ANON)) + panic(uvm_mmap() variant unsupported); + /* no reason in particular, but cf. uvm_default_mapaddr() */ + if (*addr != 0) + panic(uvm_mmap() variant unsupported); + + uaddr = rumpuser_anonmmap(size, 0, 0, error); + if (uaddr == NULL) + return error; + + *addr = (vaddr_t)uaddr; + return 0; } struct pagerinfo {
CVS commit: src/sys/arch/amiga/amiga
Module Name:src Committed By: tsutsui Date: Fri Dec 4 17:28:54 UTC 2009 Modified Files: src/sys/arch/amiga/amiga: locore.s Log Message: Fix a leftover comment. To generate a diff of this commit: cvs rdiff -u -r1.147 -r1.148 src/sys/arch/amiga/amiga/locore.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/amiga/amiga/locore.s diff -u src/sys/arch/amiga/amiga/locore.s:1.147 src/sys/arch/amiga/amiga/locore.s:1.148 --- src/sys/arch/amiga/amiga/locore.s:1.147 Fri Dec 4 17:11:11 2009 +++ src/sys/arch/amiga/amiga/locore.s Fri Dec 4 17:28:54 2009 @@ -1,4 +1,4 @@ -/* $NetBSD: locore.s,v 1.147 2009/12/04 17:11:11 tsutsui Exp $ */ +/* $NetBSD: locore.s,v 1.148 2009/12/04 17:28:54 tsutsui Exp $ */ /* * Copyright (c) 1980, 1990 The Regents of the University of California. @@ -1023,7 +1023,7 @@ lea _ASM_LABEL(tmpstk),%sp | give ourselves a temporary stack jbsr _C_LABEL(start_c_finish) -/* set kernel stack, user SP, and initial pcb */ +/* set kernel stack, user SP */ movl _C_LABEL(lwp0uarea),%a1 | grab lwp0 uarea lea %a1@(USPACE),%sp | set kernel stack to end of area movl #USRSTACK-4,%a2
CVS commit: src/sys/arch/sparc64/include
Module Name:src Committed By: nakayama Date: Fri Dec 4 17:31:06 UTC 2009 Modified Files: src/sys/arch/sparc64/include: psl.h Log Message: Bring together similar definitions of inline functions manipulating privileged registers using macro. no functional change. To generate a diff of this commit: cvs rdiff -u -r1.42 -r1.43 src/sys/arch/sparc64/include/psl.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/sparc64/include/psl.h diff -u src/sys/arch/sparc64/include/psl.h:1.42 src/sys/arch/sparc64/include/psl.h:1.43 --- src/sys/arch/sparc64/include/psl.h:1.42 Wed Nov 25 14:28:50 2009 +++ src/sys/arch/sparc64/include/psl.h Fri Dec 4 17:31:06 2009 @@ -1,4 +1,4 @@ -/* $NetBSD: psl.h,v 1.42 2009/11/25 14:28:50 rmind Exp $ */ +/* $NetBSD: psl.h,v 1.43 2009/12/04 17:31:06 nakayama Exp $ */ /* * Copyright (c) 1992, 1993 @@ -251,92 +251,58 @@ /* * Inlines for manipulating privileged registers */ -static __inline uint64_t -gettick(void) -{ -#ifdef __arch64__ - uint64_t tick; - - __asm volatile(rdpr %%tick, %0 : =r (tick)); - return tick; -#else - uint32_t tick_hi, tick_lo; - - __asm volatile(rdpr %%tick, %0; srl %0,0,%1; srlx %0,32,%0 - : =r (tick_hi), =r (tick_lo)); - return ((uint64_t)tick_hi 32) | tick_lo; -#endif +#define SPARC64_GETPR_DEF(pr, type) \ +static __inline type get##pr(void) \ +{ \ + type pr; \ + __asm volatile(rdpr %% #pr ,%0 : =r (pr)); \ + return pr; \ +} +#define SPARC64_SETPR_DEF(pr, type) \ +static __inline void set##pr(type pr) \ +{ \ + __asm volatile(wrpr %0,0,%% #pr : : r (pr) : memory); \ } -static __inline void -settick(uint64_t newtick) -{ #ifdef __arch64__ - __asm volatile(wrpr %0, 0, %%tick : : r (newtick) : memory); +#define SPARC64_GETPR64_DEF(pr) SPARC64_GETPR_DEF(pr, uint64_t) +#define SPARC64_SETPR64_DEF(pr) SPARC64_SETPR_DEF(pr, uint64_t) #else - uint32_t tick_hi = newtick 32, tick_lo = newtick; - - __asm volatile(sllx %1,32,%0; or %0,%2,%0; wrpr %0, 0, %%tick - : =r (tick_hi) /* scratch register */ - : r (tick_hi), r (tick_lo) : memory); -#endif +#define SPARC64_GETPR64_DEF(pr) \ +static __inline uint64_t get##pr(void) \ +{ \ + uint32_t _hi, _lo; \ + __asm volatile(rdpr %% #pr ,%0; srl %0,0,%1; srlx %0,32,%0 \ + : =r (_hi), =r (_lo));\ + return ((uint64_t)_hi 32) | _lo;\ +} +#define SPARC64_SETPR64_DEF(pr) \ +static __inline void set##pr(uint64_t pr)\ +{ \ + uint32_t _hi = pr 32, _lo = pr;\ + __asm volatile(sllx %1,32,%0; or %0,%2,%0; wrpr %0,0,%% #pr \ + : =r (_hi) /* scratch register */ \ + : r (_hi), r (_lo) : memory); \ } +#endif -static __inline int -getpstate(void) -{ - int pstate; - - __asm volatile(rdpr %%pstate,%0 : =r (pstate)); - return pstate; -} - -static __inline void -setpstate(int newpstate) -{ - __asm volatile(wrpr %0,0,%%pstate : : r (newpstate) : memory); -} - -static __inline int -gettl(void) -{ - int tl; - - __asm volatile(rdpr %%tl, %0 : =r (tl)); - return tl; -} - -static __inline int -getcwp(void) -{ - int cwp; - - __asm volatile(rdpr %%cwp,%0 : =r (cwp)); - return cwp; -} - -static __inline void -setcwp(int newcwp) -{ - __asm volatile(wrpr %0,0,%%cwp : : r (newcwp) : memory); -} - -static __inline uint64_t -getver(void) -{ -#ifdef __arch64__ - uint64_t ver; - - __asm volatile(rdpr %%ver,%0 : =r (ver)); - return ver; -#else - uint32_t ver_hi, ver_lo; +/* Tick Register (PR 4) */ +SPARC64_GETPR64_DEF(tick) +SPARC64_SETPR64_DEF(tick) + +/* Processor State Register (PR 6) */ +SPARC64_GETPR_DEF(pstate, int) +SPARC64_SETPR_DEF(pstate, int) + +/* Trap Level Register (PR 7) */ +SPARC64_GETPR_DEF(tl, int) + +/* Current Window Pointer Register (PR 9) */ +SPARC64_GETPR_DEF(cwp, int) +SPARC64_SETPR_DEF(cwp, int) - __asm volatile(rdpr %%ver,%0; srl %0,0,%1; srlx %0,32,%0 - : =r (ver_hi), =r (ver_lo)); - return (uint64_t)ver_hi 32 | ver_lo; -#endif -} +/* Version Register (PR 31) */ +SPARC64_GETPR64_DEF(ver) static __inline int intr_disable(void) @@ -419,7 +385,7 @@ ipl_t _ipl; } ipl_cookie_t; -static inline ipl_cookie_t +static __inline ipl_cookie_t makeiplcookie(ipl_t ipl) {
CVS commit: src/sys/rump/dev/wip/libumass
Module Name:src Committed By: pooka Date: Fri Dec 4 17:37:05 UTC 2009 Modified Files: src/sys/rump/dev/wip/libumass: sd_at_scsibus_at_umass.c Log Message: Attach u...@uhub (in addition to u...@roothub, which was already there). To generate a diff of this commit: cvs rdiff -u -r1.3 -r1.4 \ src/sys/rump/dev/wip/libumass/sd_at_scsibus_at_umass.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/dev/wip/libumass/sd_at_scsibus_at_umass.c diff -u src/sys/rump/dev/wip/libumass/sd_at_scsibus_at_umass.c:1.3 src/sys/rump/dev/wip/libumass/sd_at_scsibus_at_umass.c:1.4 --- src/sys/rump/dev/wip/libumass/sd_at_scsibus_at_umass.c:1.3 Thu Dec 3 15:07:09 2009 +++ src/sys/rump/dev/wip/libumass/sd_at_scsibus_at_umass.c Fri Dec 4 17:37:05 2009 @@ -1,4 +1,4 @@ -/* $NetBSD: sd_at_scsibus_at_umass.c,v 1.3 2009/12/03 15:07:09 pooka Exp $ */ +/* $NetBSD: sd_at_scsibus_at_umass.c,v 1.4 2009/12/04 17:37:05 pooka Exp $ */ #include sys/param.h #include sys/conf.h @@ -79,8 +79,15 @@ DVUNIT_ANY }; +struct cfparent usbdevif_pspec = { + usbdevif, + uhub, + DVUNIT_ANY +}; + struct cfdata uhub_cfdata[] = { { uhub, uroothub, 0, FSTATE_STAR, NULL, 0, usb_pspec }, + { uhub, uhub, 0, FSTATE_STAR, NULL, 0, usbdevif_pspec }, }; struct cfparent usbifif_pspec = {
CVS commit: src/sys/rump/librump/rumpkern
Module Name:src Committed By: pooka Date: Fri Dec 4 17:57:16 UTC 2009 Modified Files: src/sys/rump/librump/rumpkern: rump_private.h vm.c Log Message: g/c unused functions (previously used by the vnode pager). To generate a diff of this commit: cvs rdiff -u -r1.40 -r1.41 src/sys/rump/librump/rumpkern/rump_private.h cvs rdiff -u -r1.69 -r1.70 src/sys/rump/librump/rumpkern/vm.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/rump/librump/rumpkern/rump_private.h diff -u src/sys/rump/librump/rumpkern/rump_private.h:1.40 src/sys/rump/librump/rumpkern/rump_private.h:1.41 --- src/sys/rump/librump/rumpkern/rump_private.h:1.40 Thu Dec 3 13:12:16 2009 +++ src/sys/rump/librump/rumpkern/rump_private.h Fri Dec 4 17:57:16 2009 @@ -1,4 +1,4 @@ -/* $NetBSD: rump_private.h,v 1.40 2009/12/03 13:12:16 pooka Exp $ */ +/* $NetBSD: rump_private.h,v 1.41 2009/12/04 17:57:16 pooka Exp $ */ /* * Copyright (c) 2007 Antti Kantee. All Rights Reserved. @@ -63,9 +63,6 @@ void rump_sleepers_init(void); struct vm_page *rumpvm_makepage(struct uvm_object *, voff_t); -void rumpvm_enterva(vaddr_t addr, struct vm_page *); -void rumpvm_flushva(struct uvm_object *); - void rump_gettime(struct timespec *); void rump_getuptime(struct timespec *); Index: src/sys/rump/librump/rumpkern/vm.c diff -u src/sys/rump/librump/rumpkern/vm.c:1.69 src/sys/rump/librump/rumpkern/vm.c:1.70 --- src/sys/rump/librump/rumpkern/vm.c:1.69 Fri Dec 4 17:15:47 2009 +++ src/sys/rump/librump/rumpkern/vm.c Fri Dec 4 17:57:16 2009 @@ -1,4 +1,4 @@ -/* $NetBSD: vm.c,v 1.69 2009/12/04 17:15:47 pooka Exp $ */ +/* $NetBSD: vm.c,v 1.70 2009/12/04 17:57:16 pooka Exp $ */ /* * Copyright (c) 2007 Antti Kantee. All Rights Reserved. @@ -41,7 +41,7 @@ */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: vm.c,v 1.69 2009/12/04 17:15:47 pooka Exp $); +__KERNEL_RCSID(0, $NetBSD: vm.c,v 1.70 2009/12/04 17:57:16 pooka Exp $); #include sys/param.h #include sys/atomic.h @@ -108,10 +108,6 @@ return pg; } -/* these are going away very soon */ -void rumpvm_enterva(vaddr_t addr, struct vm_page *pg) {} -void rumpvm_flushva(struct uvm_object *uobj) {} - struct vm_page * uvm_pagealloc_strat(struct uvm_object *uobj, voff_t off, struct vm_anon *anon, int flags, int strat, int free_list)
CVS commit: src/sys/arch
Module Name:src Committed By: tsutsui Date: Fri Dec 4 18:06:28 UTC 2009 Modified Files: src/sys/arch/cesfic/cesfic: locore.s pmap_bootstrap.c src/sys/arch/luna68k/luna68k: locore.s pmap_bootstrap.c src/sys/arch/mvme68k/mvme68k: locore.s pmap_bootstrap.c src/sys/arch/next68k/next68k: locore.s pmap_bootstrap.c src/sys/arch/x68k/x68k: locore.s pmap_bootstrap.c Log Message: Use common pmap_bootstrap_finalize() to initialize lwp0 uarea etc. Also update some comment. Compile test only. To generate a diff of this commit: cvs rdiff -u -r1.18 -r1.19 src/sys/arch/cesfic/cesfic/locore.s \ src/sys/arch/cesfic/cesfic/pmap_bootstrap.c cvs rdiff -u -r1.30 -r1.31 src/sys/arch/luna68k/luna68k/locore.s cvs rdiff -u -r1.19 -r1.20 src/sys/arch/luna68k/luna68k/pmap_bootstrap.c cvs rdiff -u -r1.101 -r1.102 src/sys/arch/mvme68k/mvme68k/locore.s cvs rdiff -u -r1.32 -r1.33 src/sys/arch/mvme68k/mvme68k/pmap_bootstrap.c cvs rdiff -u -r1.51 -r1.52 src/sys/arch/next68k/next68k/locore.s cvs rdiff -u -r1.28 -r1.29 src/sys/arch/next68k/next68k/pmap_bootstrap.c cvs rdiff -u -r1.93 -r1.94 src/sys/arch/x68k/x68k/locore.s cvs rdiff -u -r1.42 -r1.43 src/sys/arch/x68k/x68k/pmap_bootstrap.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/cesfic/cesfic/locore.s diff -u src/sys/arch/cesfic/cesfic/locore.s:1.18 src/sys/arch/cesfic/cesfic/locore.s:1.19 --- src/sys/arch/cesfic/cesfic/locore.s:1.18 Thu Nov 26 00:19:13 2009 +++ src/sys/arch/cesfic/cesfic/locore.s Fri Dec 4 18:06:28 2009 @@ -1,4 +1,4 @@ -/* $NetBSD: locore.s,v 1.18 2009/11/26 00:19:13 matt Exp $ */ +/* $NetBSD: locore.s,v 1.19 2009/12/04 18:06:28 tsutsui Exp $ */ /* * Copyright (c) 1980, 1990, 1993 @@ -334,14 +334,13 @@ /* select the software page size now */ lea _ASM_LABEL(tmpstk),%sp | temporary stack jbsr _C_LABEL(uvm_setpagesize) | select software page size -/* set kernel stack, user SP, and initial pcb */ - lea _C_LABEL(lwp0),%a2 | get lwp0 pcb addr and initialize - movl %a2,_C_LABEL(curlwp) | curlwp so that - movl %a2@(L_ADDR),%a1 | we don't deref NULL in trap() +/* call final pmap setup which initialize lwp0, curlwp, and curpcb */ + jbsr _C_LABEL(pmap_bootstrap_finalize) +/* set kernel stack, user SP */ + movl _C_LABEL(lwp0uarea),%a1 | get lwp0 uarea lea %a1@(USPACE-4),%sp | set kernel stack to end of area movl #USRSTACK-4,%a2 movl %a2,%usp | init user SP - movl %a1,_C_LABEL(curpcb) | lwp0 is running tstl _C_LABEL(fputype) | Have an FPU? jeq Lenab2 | No, skip. Index: src/sys/arch/cesfic/cesfic/pmap_bootstrap.c diff -u src/sys/arch/cesfic/cesfic/pmap_bootstrap.c:1.18 src/sys/arch/cesfic/cesfic/pmap_bootstrap.c:1.19 --- src/sys/arch/cesfic/cesfic/pmap_bootstrap.c:1.18 Thu Nov 26 00:19:13 2009 +++ src/sys/arch/cesfic/cesfic/pmap_bootstrap.c Fri Dec 4 18:06:28 2009 @@ -1,4 +1,4 @@ -/* $NetBSD: pmap_bootstrap.c,v 1.18 2009/11/26 00:19:13 matt Exp $ */ +/* $NetBSD: pmap_bootstrap.c,v 1.19 2009/12/04 18:06:28 tsutsui Exp $ */ /* * Copyright (c) 1991, 1993 @@ -36,12 +36,11 @@ */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: pmap_bootstrap.c,v 1.18 2009/11/26 00:19:13 matt Exp $); +__KERNEL_RCSID(0, $NetBSD: pmap_bootstrap.c,v 1.19 2009/12/04 18:06:28 tsutsui Exp $); #include sys/param.h #include sys/systm.h #include sys/msgbuf.h -#include sys/proc.h #include machine/frame.h #include machine/cpu.h @@ -84,7 +83,7 @@ void pmap_bootstrap(vm_offset_t nextpa, vm_offset_t firstpa) { - vm_offset_t kstpa, kptpa, kptmpa, lkptpa, p0upa; + vm_offset_t kstpa, kptpa, kptmpa, lkptpa, lwp0upa; u_int nptpages, kstsize; st_entry_t protoste, *ste; pt_entry_t protopte, *pte, *epte; @@ -106,7 +105,7 @@ * * lkptpa last kernel PT page 1 page * - * p0upa proc 0 u-area UPAGES pages + * lwp0upa lwp 0 u-area UPAGES pages * * The KVA corresponding to any of these PAs is: * (PA - firstpa + KERNBASE). @@ -121,7 +120,7 @@ nextpa += PAGE_SIZE; lkptpa = nextpa; nextpa += PAGE_SIZE; - p0upa = nextpa; + lwp0upa = nextpa; nextpa += USPACE; kptpa = nextpa; nptpages = RELOC(Sysptsize, int); @@ -141,10 +140,14 @@ * each mapping 256kb. Note that there may be additional segment * table pages depending on how large MAXKL2SIZE is. * - * Portions of the last segment of KVA space (0xFFF0 - - * 0x) are mapped for a couple of purposes. 0xFFF0 - * for UPAGES is used for mapping the current process u-area - * (u + kernel stack). The very last page (0xF000) is mapped + * Portions of the last two segment of KVA space (0xFF80 - + * 0x) are mapped for a couple of purposes. + * The first segment (0xFF80 - 0xFFBF) is mapped + * for the kernel page tables. + * + * XXX: It looks this was copied from hp300 and not sure if + * XXX: last physical page mapping is really needed on this port. + * The very last page
CVS commit: src/sys/arch/mvme68k/mvme68k
Module Name:src Committed By: tsutsui Date: Fri Dec 4 18:11:14 UTC 2009 Modified Files: src/sys/arch/mvme68k/mvme68k: pmap_bootstrap.c Log Message: Update one more comment. To generate a diff of this commit: cvs rdiff -u -r1.33 -r1.34 src/sys/arch/mvme68k/mvme68k/pmap_bootstrap.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/mvme68k/mvme68k/pmap_bootstrap.c diff -u src/sys/arch/mvme68k/mvme68k/pmap_bootstrap.c:1.33 src/sys/arch/mvme68k/mvme68k/pmap_bootstrap.c:1.34 --- src/sys/arch/mvme68k/mvme68k/pmap_bootstrap.c:1.33 Fri Dec 4 18:06:28 2009 +++ src/sys/arch/mvme68k/mvme68k/pmap_bootstrap.c Fri Dec 4 18:11:14 2009 @@ -1,4 +1,4 @@ -/* $NetBSD: pmap_bootstrap.c,v 1.33 2009/12/04 18:06:28 tsutsui Exp $ */ +/* $NetBSD: pmap_bootstrap.c,v 1.34 2009/12/04 18:11:14 tsutsui Exp $ */ /* * Copyright (c) 1991, 1993 @@ -36,7 +36,7 @@ */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: pmap_bootstrap.c,v 1.33 2009/12/04 18:06:28 tsutsui Exp $); +__KERNEL_RCSID(0, $NetBSD: pmap_bootstrap.c,v 1.34 2009/12/04 18:11:14 tsutsui Exp $); #include sys/param.h #include sys/kcore.h @@ -406,7 +406,8 @@ while (pte epte) *pte++ = 0; /* - * Store the u-area into lwp0. + * Remember the u-area address so it can be loaded in the lwp0 + * via uvm_lwp_setuarea() later in pmap_bootstrap_finalize(). */ RELOC(lwp0uarea, vaddr_t) = lwp0upa - firstpa;
CVS commit: src/sys/arch
Module Name:src Committed By: tsutsui Date: Fri Dec 4 18:32:31 UTC 2009 Modified Files: src/sys/arch/cesfic/cesfic: pmap_bootstrap.c src/sys/arch/hp300/hp300: pmap_bootstrap.c src/sys/arch/luna68k/luna68k: pmap_bootstrap.c src/sys/arch/mac68k/mac68k: pmap_bootstrap.c src/sys/arch/mvme68k/mvme68k: pmap_bootstrap.c src/sys/arch/news68k/news68k: pmap_bootstrap.c src/sys/arch/next68k/next68k: pmap_bootstrap.c src/sys/arch/x68k/x68k: pmap_bootstrap.c Log Message: No need to initialize lwp0 u-area in pmap_bootstrap() since it will be done in pmap_bootstrap_finalize(). To generate a diff of this commit: cvs rdiff -u -r1.19 -r1.20 src/sys/arch/cesfic/cesfic/pmap_bootstrap.c cvs rdiff -u -r1.40 -r1.41 src/sys/arch/hp300/hp300/pmap_bootstrap.c cvs rdiff -u -r1.20 -r1.21 src/sys/arch/luna68k/luna68k/pmap_bootstrap.c cvs rdiff -u -r1.81 -r1.82 src/sys/arch/mac68k/mac68k/pmap_bootstrap.c cvs rdiff -u -r1.34 -r1.35 src/sys/arch/mvme68k/mvme68k/pmap_bootstrap.c cvs rdiff -u -r1.24 -r1.25 src/sys/arch/news68k/news68k/pmap_bootstrap.c cvs rdiff -u -r1.29 -r1.30 src/sys/arch/next68k/next68k/pmap_bootstrap.c cvs rdiff -u -r1.43 -r1.44 src/sys/arch/x68k/x68k/pmap_bootstrap.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/cesfic/cesfic/pmap_bootstrap.c diff -u src/sys/arch/cesfic/cesfic/pmap_bootstrap.c:1.19 src/sys/arch/cesfic/cesfic/pmap_bootstrap.c:1.20 --- src/sys/arch/cesfic/cesfic/pmap_bootstrap.c:1.19 Fri Dec 4 18:06:28 2009 +++ src/sys/arch/cesfic/cesfic/pmap_bootstrap.c Fri Dec 4 18:32:31 2009 @@ -1,4 +1,4 @@ -/* $NetBSD: pmap_bootstrap.c,v 1.19 2009/12/04 18:06:28 tsutsui Exp $ */ +/* $NetBSD: pmap_bootstrap.c,v 1.20 2009/12/04 18:32:31 tsutsui Exp $ */ /* * Copyright (c) 1991, 1993 @@ -36,7 +36,7 @@ */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: pmap_bootstrap.c,v 1.19 2009/12/04 18:06:28 tsutsui Exp $); +__KERNEL_RCSID(0, $NetBSD: pmap_bootstrap.c,v 1.20 2009/12/04 18:32:31 tsutsui Exp $); #include sys/param.h #include sys/systm.h @@ -353,17 +353,6 @@ (pt_entry_t *)m68k_ptob((NPTEPG - 2) * NPTEPG); /* - * Setup u-area for lwp 0. - */ - /* - * Zero the u-area. - * NOTE: `pte' and `epte' aren't PTEs here. - */ - pte = (u_int *)lwp0upa; - epte = (u_int *)(lwp0upa + USPACE); - while (pte epte) - *pte++ = 0; - /* * Remember the u-area address so it can be loaded in the lwp0 * via uvm_lwp_setuarea() later in pmap_bootstrap_finalize(). */ Index: src/sys/arch/hp300/hp300/pmap_bootstrap.c diff -u src/sys/arch/hp300/hp300/pmap_bootstrap.c:1.40 src/sys/arch/hp300/hp300/pmap_bootstrap.c:1.41 --- src/sys/arch/hp300/hp300/pmap_bootstrap.c:1.40 Wed Dec 2 15:51:12 2009 +++ src/sys/arch/hp300/hp300/pmap_bootstrap.c Fri Dec 4 18:32:31 2009 @@ -1,4 +1,4 @@ -/* $NetBSD: pmap_bootstrap.c,v 1.40 2009/12/02 15:51:12 tsutsui Exp $ */ +/* $NetBSD: pmap_bootstrap.c,v 1.41 2009/12/04 18:32:31 tsutsui Exp $ */ /* * Copyright (c) 1991, 1993 @@ -36,7 +36,7 @@ */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: pmap_bootstrap.c,v 1.40 2009/12/02 15:51:12 tsutsui Exp $); +__KERNEL_RCSID(0, $NetBSD: pmap_bootstrap.c,v 1.41 2009/12/04 18:32:31 tsutsui Exp $); #include sys/param.h @@ -394,17 +394,6 @@ (vaddr_t)RELOC(intiobase, char *) + MMUBASE; /* - * Setup u-area for lwp 0. - */ - /* - * Zero the u-area. - * NOTE: `pte' and `epte' aren't PTEs here. - */ - pte = (u_int *)lwp0upa; - epte = (u_int *)(lwp0upa + USPACE); - while (pte epte) - *pte++ = 0; - /* * Remember the u-area address so it can be loaded in the lwp0 * via uvm_lwp_setuarea() later in pmap_bootstrap_finalize(). */ Index: src/sys/arch/luna68k/luna68k/pmap_bootstrap.c diff -u src/sys/arch/luna68k/luna68k/pmap_bootstrap.c:1.20 src/sys/arch/luna68k/luna68k/pmap_bootstrap.c:1.21 --- src/sys/arch/luna68k/luna68k/pmap_bootstrap.c:1.20 Fri Dec 4 18:06:28 2009 +++ src/sys/arch/luna68k/luna68k/pmap_bootstrap.c Fri Dec 4 18:32:31 2009 @@ -1,4 +1,4 @@ -/* $NetBSD: pmap_bootstrap.c,v 1.20 2009/12/04 18:06:28 tsutsui Exp $ */ +/* $NetBSD: pmap_bootstrap.c,v 1.21 2009/12/04 18:32:31 tsutsui Exp $ */ /* * Copyright (c) 1991, 1993 @@ -36,7 +36,7 @@ */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: pmap_bootstrap.c,v 1.20 2009/12/04 18:06:28 tsutsui Exp $); +__KERNEL_RCSID(0, $NetBSD: pmap_bootstrap.c,v 1.21 2009/12/04 18:32:31 tsutsui Exp $); #include sys/param.h @@ -337,17 +337,6 @@ RELOC(Sysmap, pt_entry_t *) = (pt_entry_t *)SYSMAP_VA; /* - * Setup u-area for lwp 0. - */ - /* - * Zero the u-area. - * NOTE: `pte' and `epte' aren't PTEs here. - */ - pte = (u_int *)lwp0upa; - epte = (u_int *)(lwp0upa + USPACE); - while (pte epte) - *pte++ = 0; - /* * Remember the u-area address so it can be loaded in the lwp0 * via uvm_lwp_setuarea() later in pmap_bootstrap_finalize(). */ Index:
CVS commit: src/sys/arch
Module Name:src Committed By: tsutsui Date: Fri Dec 4 18:55:14 UTC 2009 Modified Files: src/sys/arch/cesfic/cesfic: pmap_bootstrap.c src/sys/arch/hp300/hp300: pmap_bootstrap.c src/sys/arch/luna68k/luna68k: pmap_bootstrap.c src/sys/arch/mac68k/mac68k: pmap_bootstrap.c src/sys/arch/mvme68k/mvme68k: pmap_bootstrap.c src/sys/arch/news68k/news68k: pmap_bootstrap.c src/sys/arch/next68k/next68k: pmap_bootstrap.c src/sys/arch/x68k/x68k: pmap_bootstrap.c Log Message: Allocate lwp0upa (PA of lwp0 uarea) right after kernel rather than between other page tables to use different mappings for ste/pte pages as well as amiga and atari. Should resolve XXX comments in next68k and x68k. Tested on hp300 and mac68k. To generate a diff of this commit: cvs rdiff -u -r1.20 -r1.21 src/sys/arch/cesfic/cesfic/pmap_bootstrap.c cvs rdiff -u -r1.41 -r1.42 src/sys/arch/hp300/hp300/pmap_bootstrap.c cvs rdiff -u -r1.21 -r1.22 src/sys/arch/luna68k/luna68k/pmap_bootstrap.c cvs rdiff -u -r1.82 -r1.83 src/sys/arch/mac68k/mac68k/pmap_bootstrap.c cvs rdiff -u -r1.35 -r1.36 src/sys/arch/mvme68k/mvme68k/pmap_bootstrap.c cvs rdiff -u -r1.25 -r1.26 src/sys/arch/news68k/news68k/pmap_bootstrap.c cvs rdiff -u -r1.30 -r1.31 src/sys/arch/next68k/next68k/pmap_bootstrap.c cvs rdiff -u -r1.44 -r1.45 src/sys/arch/x68k/x68k/pmap_bootstrap.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/cesfic/cesfic/pmap_bootstrap.c diff -u src/sys/arch/cesfic/cesfic/pmap_bootstrap.c:1.20 src/sys/arch/cesfic/cesfic/pmap_bootstrap.c:1.21 --- src/sys/arch/cesfic/cesfic/pmap_bootstrap.c:1.20 Fri Dec 4 18:32:31 2009 +++ src/sys/arch/cesfic/cesfic/pmap_bootstrap.c Fri Dec 4 18:55:13 2009 @@ -1,4 +1,4 @@ -/* $NetBSD: pmap_bootstrap.c,v 1.20 2009/12/04 18:32:31 tsutsui Exp $ */ +/* $NetBSD: pmap_bootstrap.c,v 1.21 2009/12/04 18:55:13 tsutsui Exp $ */ /* * Copyright (c) 1991, 1993 @@ -36,7 +36,7 @@ */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: pmap_bootstrap.c,v 1.20 2009/12/04 18:32:31 tsutsui Exp $); +__KERNEL_RCSID(0, $NetBSD: pmap_bootstrap.c,v 1.21 2009/12/04 18:55:13 tsutsui Exp $); #include sys/param.h #include sys/systm.h @@ -91,9 +91,15 @@ /* * Calculate important physical addresses: * + * lwp0upa lwp 0 u-area UPAGES pages + * * kstpa kernel segment table 1 page (!040) * N pages (040) * + * kptmpa kernel PT map 1 page + * + * lkptpa last kernel PT page 1 page + * * kptpa statically allocated * kernel PT pages Sysptsize+ pages * @@ -101,15 +107,11 @@ * EIOMAPSIZE are the number of PTEs, hence we need to round * the total to a page boundary with IO maps at the end. ] * - * kptmpa kernel PT map 1 page - * - * lkptpa last kernel PT page 1 page - * - * lwp0upa lwp 0 u-area UPAGES pages - * * The KVA corresponding to any of these PAs is: * (PA - firstpa + KERNBASE). */ + lwp0upa = nextpa; + nextpa += USPACE; if (RELOC(mmutype, int) == MMU_68040) kstsize = MAXKL2SIZE / (NPTEPG/SG4_LEV2SIZE); else @@ -120,8 +122,6 @@ nextpa += PAGE_SIZE; lkptpa = nextpa; nextpa += PAGE_SIZE; - lwp0upa = nextpa; - nextpa += USPACE; kptpa = nextpa; nptpages = RELOC(Sysptsize, int); nextpa += nptpages * PAGE_SIZE; Index: src/sys/arch/hp300/hp300/pmap_bootstrap.c diff -u src/sys/arch/hp300/hp300/pmap_bootstrap.c:1.41 src/sys/arch/hp300/hp300/pmap_bootstrap.c:1.42 --- src/sys/arch/hp300/hp300/pmap_bootstrap.c:1.41 Fri Dec 4 18:32:31 2009 +++ src/sys/arch/hp300/hp300/pmap_bootstrap.c Fri Dec 4 18:55:14 2009 @@ -1,4 +1,4 @@ -/* $NetBSD: pmap_bootstrap.c,v 1.41 2009/12/04 18:32:31 tsutsui Exp $ */ +/* $NetBSD: pmap_bootstrap.c,v 1.42 2009/12/04 18:55:14 tsutsui Exp $ */ /* * Copyright (c) 1991, 1993 @@ -36,7 +36,7 @@ */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: pmap_bootstrap.c,v 1.41 2009/12/04 18:32:31 tsutsui Exp $); +__KERNEL_RCSID(0, $NetBSD: pmap_bootstrap.c,v 1.42 2009/12/04 18:55:14 tsutsui Exp $); #include sys/param.h @@ -101,9 +101,15 @@ /* * Calculate important physical addresses: * + * lwp0upa lwp 0 u-area UPAGES pages + * * kstpa kernel segment table 1 page (!040) * N pages (040) * + * kptmpa kernel PT map 1 page + * + * lkptpa last kernel PT page 1 page + * * kptpa statically allocated * kernel PT pages Sysptsize+ pages * @@ -111,15 +117,11 @@ * EIOMAPSIZE are the number of PTEs, hence we need to round * the total to a page boundary with IO maps at the end. ] * - * kptmpa kernel PT map 1 page - * - * lkptpa last kernel PT page 1 page - * - * lwp0upa lwp 0 u-area UPAGES pages - * * The KVA corresponding to any of these PAs is: * (PA - firstpa + KERNBASE). */ + lwp0upa = nextpa; + nextpa += USPACE; if (RELOC(mmutype, int) == MMU_68040) kstsize = MAXKL2SIZE /
CVS commit: src/sys/fs/puffs
Module Name:src Committed By: pooka Date: Fri Dec 4 20:26:35 UTC 2009 Modified Files: src/sys/fs/puffs: puffs_vnops.c Log Message: Push all information cached in the vnode to the file server before issuing INACTIVE. PR kern/42194. Also, send setattr in fsync asynchronously if FSYNC_WAIT is not set. To generate a diff of this commit: cvs rdiff -u -r1.140 -r1.141 src/sys/fs/puffs/puffs_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/sys/fs/puffs/puffs_vnops.c diff -u src/sys/fs/puffs/puffs_vnops.c:1.140 src/sys/fs/puffs/puffs_vnops.c:1.141 --- src/sys/fs/puffs/puffs_vnops.c:1.140 Thu Nov 19 16:21:04 2009 +++ src/sys/fs/puffs/puffs_vnops.c Fri Dec 4 20:26:35 2009 @@ -1,4 +1,4 @@ -/* $NetBSD: puffs_vnops.c,v 1.140 2009/11/19 16:21:04 pooka Exp $ */ +/* $NetBSD: puffs_vnops.c,v 1.141 2009/12/04 20:26:35 pooka Exp $ */ /* * Copyright (c) 2005, 2006, 2007 Antti Kantee. All Rights Reserved. @@ -30,7 +30,7 @@ */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: puffs_vnops.c,v 1.140 2009/11/19 16:21:04 pooka Exp $); +__KERNEL_RCSID(0, $NetBSD: puffs_vnops.c,v 1.141 2009/12/04 20:26:35 pooka Exp $); #include sys/param.h #include sys/buf.h @@ -395,6 +395,8 @@ struct componentname *); static void callinactive(struct puffs_mount *, puffs_cookie_t, int); static void callreclaim(struct puffs_mount *, puffs_cookie_t); +static int flushvncache(struct vnode *, off_t, off_t, bool); + #define PUFFS_ABORT_LOOKUP 1 #define PUFFS_ABORT_CREATE 2 @@ -883,13 +885,15 @@ return error; } +#define SETATTR_CHSIZE 0x01 +#define SETATTR_ASYNC 0x02 static int -dosetattr(struct vnode *vp, struct vattr *vap, kauth_cred_t cred, int chsize) +dosetattr(struct vnode *vp, struct vattr *vap, kauth_cred_t cred, int flags) { PUFFS_MSG_VARS(vn, setattr); struct puffs_mount *pmp = MPTOPUFFSMP(vp-v_mount); struct puffs_node *pn = vp-v_data; - int error; + int error = 0; if ((vp-v_mount-mnt_flag MNT_RDONLY) (vap-va_uid != (uid_t)VNOVAL || vap-va_gid != (gid_t)VNOVAL @@ -928,16 +932,24 @@ puffs_credcvt(setattr_msg-pvnr_cred, cred); puffs_msg_setinfo(park_setattr, PUFFSOP_VN, PUFFS_VN_SETATTR, VPTOPNC(vp)); + if (flags SETATTR_ASYNC) + puffs_msg_setfaf(park_setattr); - PUFFS_MSG_ENQUEUEWAIT2(pmp, park_setattr, vp-v_data, NULL, error); + puffs_msg_enqueue(pmp, park_setattr); + if ((flags SETATTR_ASYNC) == 0) + error = puffs_msg_wait2(pmp, park_setattr, vp-v_data, NULL); PUFFS_MSG_RELEASE(setattr); - error = checkerr(pmp, error, __func__); - if (error) - return error; + if ((flags SETATTR_ASYNC) == 0) { + error = checkerr(pmp, error, __func__); + if (error) + return error; + } else { + error = 0; + } if (vap-va_size != VNOVAL) { pn-pn_serversize = vap-va_size; - if (chsize) + if (flags SETATTR_CHSIZE) uvm_vnp_setsize(vp, vap-va_size); } @@ -954,7 +966,7 @@ kauth_cred_t a_cred; } */ *ap = v; - return dosetattr(ap-a_vp, ap-a_vap, ap-a_cred, 1); + return dosetattr(ap-a_vp, ap-a_vap, ap-a_cred, SETATTR_CHSIZE); } static __inline int @@ -1006,6 +1018,7 @@ pnode = vp-v_data; if (doinact(pmp, pnode-pn_stat PNODE_DOINACT)) { + flushvncache(vp, 0, 0, false); PUFFS_MSG_ALLOC(vn, inactive); puffs_msg_setinfo(park_inactive, PUFFSOP_VN, PUFFS_VN_INACTIVE, VPTOPNC(vp)); @@ -1269,31 +1282,19 @@ } } -int -puffs_vnop_fsync(void *v) +static int +flushvncache(struct vnode *vp, off_t offlo, off_t offhi, bool wait) { - struct vop_fsync_args /* { - const struct vnodeop_desc *a_desc; - struct vnode *a_vp; - kauth_cred_t a_cred; - int a_flags; - off_t a_offlo; - off_t a_offhi; - } */ *ap = v; - PUFFS_MSG_VARS(vn, fsync); - struct vnode *vp = ap-a_vp; - struct puffs_mount *pmp = MPTOPUFFSMP(vp-v_mount); - struct puffs_node *pn; + struct puffs_node *pn = VPTOPP(vp); struct vattr va; - int pflags, error, dofaf; - - pn = VPTOPP(vp); + int pflags, error; /* flush out information from our metacache, see vop_setattr */ if (pn-pn_stat PNODE_METACACHE_MASK (pn-pn_stat PNODE_DYING) == 0) { vattr_null(va); - error = VOP_SETATTR(vp, va, FSCRED); + error = dosetattr(vp, va, FSCRED, + SETATTR_CHSIZE | (wait ? 0 : SETATTR_ASYNC)); if (error) return error; } @@ -1302,11 +1303,31 @@ * flush pages to avoid being overly dirty */ pflags = PGO_CLEANIT; - if (ap-a_flags FSYNC_WAIT) + if (wait) pflags |= PGO_SYNCIO; mutex_enter(vp-v_interlock); - error = VOP_PUTPAGES(vp, trunc_page(ap-a_offlo), - round_page(ap-a_offhi), pflags); + return VOP_PUTPAGES(vp, trunc_page(offlo), round_page(offhi), pflags); +} + +int +puffs_vnop_fsync(void *v) +{ + struct vop_fsync_args /* { + const struct vnodeop_desc *a_desc; + struct vnode *a_vp; + kauth_cred_t a_cred; + int a_flags; + off_t a_offlo; + off_t a_offhi; + } */ *ap = v; + PUFFS_MSG_VARS(vn, fsync); + struct vnode *vp = ap-a_vp; +
CVS commit: src/sys/dev/ic
Module Name:src Committed By: martin Date: Fri Dec 4 22:13:26 UTC 2009 Modified Files: src/sys/dev/ic: gem.c Log Message: Properly detach phys To generate a diff of this commit: cvs rdiff -u -r1.87 -r1.88 src/sys/dev/ic/gem.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/ic/gem.c diff -u src/sys/dev/ic/gem.c:1.87 src/sys/dev/ic/gem.c:1.88 --- src/sys/dev/ic/gem.c:1.87 Fri Dec 4 13:35:56 2009 +++ src/sys/dev/ic/gem.c Fri Dec 4 22:13:26 2009 @@ -1,4 +1,4 @@ -/* $NetBSD: gem.c,v 1.87 2009/12/04 13:35:56 jdc Exp $ */ +/* $NetBSD: gem.c,v 1.88 2009/12/04 22:13:26 martin Exp $ */ /* * @@ -37,7 +37,7 @@ */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: gem.c,v 1.87 2009/12/04 13:35:56 jdc Exp $); +__KERNEL_RCSID(0, $NetBSD: gem.c,v 1.88 2009/12/04 22:13:26 martin Exp $); #include opt_inet.h #include bpfilter.h @@ -150,7 +150,7 @@ int gem_detach(struct gem_softc *sc, int flags) { - int i, rc = 0; + int i; struct ifnet *ifp = sc-sc_ethercom.ec_if; /* @@ -185,7 +185,7 @@ /*FALLTHROUGH*/ case GEM_ATT_MII: sc-sc_att_stage = GEM_ATT_MII; - rc = config_detach_children(sc-sc_dev, flags); + mii_detach(sc-sc_mii, MII_PHY_ANY, MII_OFFSET_ANY); /*FALLTHROUGH*/ case GEM_ATT_7: for (i = 0; i GEM_NRXDESC; i++) { @@ -224,7 +224,7 @@ case GEM_ATT_BACKEND_0: break; } - return rc; + return 0; } static void
CVS commit: src/sys/rump
Module Name:src Committed By: haad Date: Fri Dec 4 22:13:59 UTC 2009 Modified Files: src/sys/rump/dev: Makefile.rumpdev src/sys/rump/librump/rumpdev: rump_dev.c rump_dev_private.h Added Files: src/sys/rump/dev/lib/libdm: Makefile component.c shlib_version Log Message: Add initial version of RUMP based device-mapper port. libdm compile whole device-mapper driver in userspace and allows us to test a develop new dm targets in userspace. To generate a diff of this commit: cvs rdiff -u -r1.5 -r1.6 src/sys/rump/dev/Makefile.rumpdev cvs rdiff -u -r0 -r1.1 src/sys/rump/dev/lib/libdm/Makefile \ src/sys/rump/dev/lib/libdm/component.c \ src/sys/rump/dev/lib/libdm/shlib_version cvs rdiff -u -r1.8 -r1.9 src/sys/rump/librump/rumpdev/rump_dev.c cvs rdiff -u -r1.6 -r1.7 src/sys/rump/librump/rumpdev/rump_dev_private.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/rump/dev/Makefile.rumpdev diff -u src/sys/rump/dev/Makefile.rumpdev:1.5 src/sys/rump/dev/Makefile.rumpdev:1.6 --- src/sys/rump/dev/Makefile.rumpdev:1.5 Sun Oct 11 11:26:40 2009 +++ src/sys/rump/dev/Makefile.rumpdev Fri Dec 4 22:13:59 2009 @@ -1,7 +1,7 @@ -# $NetBSD: Makefile.rumpdev,v 1.5 2009/10/11 11:26:40 pooka Exp $ +# $NetBSD: Makefile.rumpdev,v 1.6 2009/12/04 22:13:59 haad Exp $ # -RUMPDEVLIST= cgd disk netsmb raidframe rnd +RUMPDEVLIST= cgd disk netsmb raidframe rnd dm .for var in ${RUMPDEVLIST} RUMPDEVLIBS+=lib${var} Index: src/sys/rump/librump/rumpdev/rump_dev.c diff -u src/sys/rump/librump/rumpdev/rump_dev.c:1.8 src/sys/rump/librump/rumpdev/rump_dev.c:1.9 --- src/sys/rump/librump/rumpdev/rump_dev.c:1.8 Sat Oct 10 21:10:04 2009 +++ src/sys/rump/librump/rumpdev/rump_dev.c Fri Dec 4 22:13:59 2009 @@ -1,4 +1,4 @@ -/* $NetBSD: rump_dev.c,v 1.8 2009/10/10 21:10:04 pooka Exp $ */ +/* $NetBSD: rump_dev.c,v 1.9 2009/12/04 22:13:59 haad Exp $ */ /* * Copyright (c) 2009 Antti Kantee. All Rights Reserved. @@ -26,7 +26,7 @@ */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: rump_dev.c,v 1.8 2009/10/10 21:10:04 pooka Exp $); +__KERNEL_RCSID(0, $NetBSD: rump_dev.c,v 1.9 2009/12/04 22:13:59 haad Exp $); #include sys/param.h #include sys/device.h @@ -36,6 +36,7 @@ void nocomponent(void); void nocomponent() {} __weak_alias(rump_dev_cgd_init,nocomponent); +__weak_alias(rump_dev_dm_init,nocomponent); __weak_alias(rump_dev_raidframe_init,nocomponent); __weak_alias(rump_dev_netsmb_init,nocomponent); __weak_alias(rump_dev_rnd_init,nocomponent); @@ -55,6 +56,7 @@ config_init_mi(); rump_dev_cgd_init(); + rump_dev_dm_init(); rump_dev_raidframe_init(); rump_dev_netsmb_init(); rump_dev_rnd_init(); Index: src/sys/rump/librump/rumpdev/rump_dev_private.h diff -u src/sys/rump/librump/rumpdev/rump_dev_private.h:1.6 src/sys/rump/librump/rumpdev/rump_dev_private.h:1.7 --- src/sys/rump/librump/rumpdev/rump_dev_private.h:1.6 Sat Oct 3 19:06:36 2009 +++ src/sys/rump/librump/rumpdev/rump_dev_private.h Fri Dec 4 22:13:59 2009 @@ -1,4 +1,4 @@ -/* $NetBSD: rump_dev_private.h,v 1.6 2009/10/03 19:06:36 pooka Exp $ */ +/* $NetBSD: rump_dev_private.h,v 1.7 2009/12/04 22:13:59 haad Exp $ */ /* * Copyright (c) 2009 Antti Kantee. All Rights Reserved. @@ -34,6 +34,7 @@ void rump_pdev_finalize(void); void rump_dev_cgd_init(void); +void rump_dev_dm_init(void); void rump_dev_raidframe_init(void); void rump_dev_netsmb_init(void); void rump_dev_rnd_init(void); Added files: Index: src/sys/rump/dev/lib/libdm/Makefile diff -u /dev/null src/sys/rump/dev/lib/libdm/Makefile:1.1 --- /dev/null Fri Dec 4 22:14:00 2009 +++ src/sys/rump/dev/lib/libdm/Makefile Fri Dec 4 22:13:59 2009 @@ -0,0 +1,19 @@ +# $NetBSD: Makefile,v 1.1 2009/12/04 22:13:59 haad Exp $ +# + +.PATH: ${.CURDIR}/../../../../dev/dm + +LIB= rumpdev_dm + +SRCS= device-mapper.c dm_dev.c dm_ioctl.c dm_pdev.c dm_table.c dm_target.c \ +dm_target_linear.c dm_target_stripe.c + +SRCS+= component.c + +CPPFLAGS+= -Wno-pointer-sign +CPPFLAGS+= -I${RUMPTOP}/librump/rumpvfs + +LDADD+= -lrumpvfs + +.include bsd.lib.mk +.include bsd.klinks.mk Index: src/sys/rump/dev/lib/libdm/component.c diff -u /dev/null src/sys/rump/dev/lib/libdm/component.c:1.1 --- /dev/null Fri Dec 4 22:14:00 2009 +++ src/sys/rump/dev/lib/libdm/component.c Fri Dec 4 22:13:59 2009 @@ -0,0 +1,68 @@ +/* $NetBSD: component.c,v 1.1 2009/12/04 22:13:59 haad Exp $ */ + +/* + * Copyright (c) 2009 Antti Kantee. 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
CVS commit: src/share/examples/rump/dmtest
Module Name:src Committed By: haad Date: Fri Dec 4 22:18:30 UTC 2009 Added Files: src/share/examples/rump/dmtest: Makefile dmt.c prop1.plist prop2.plist Log Message: Add small testing program which uses RUMP libdm to test device-mapper functionality in userspace. To generate a diff of this commit: cvs rdiff -u -r0 -r1.1 src/share/examples/rump/dmtest/Makefile \ src/share/examples/rump/dmtest/dmt.c \ src/share/examples/rump/dmtest/prop1.plist \ src/share/examples/rump/dmtest/prop2.plist Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Added files: Index: src/share/examples/rump/dmtest/Makefile diff -u /dev/null src/share/examples/rump/dmtest/Makefile:1.1 --- /dev/null Fri Dec 4 22:18:30 2009 +++ src/share/examples/rump/dmtest/Makefile Fri Dec 4 22:18:30 2009 @@ -0,0 +1,16 @@ +# $NetBSD: Makefile,v 1.1 2009/12/04 22:18:30 haad Exp $ +PROG= dmt +SRCS= dmt.c + +DPADD= ${LIBUTIL} +LDADD= -lutil +MKMAN= no + +CFLAGS+= -g -fno-inline + +CPPFLAGS+= -DRUMP_ACTION -DRUMP_SYS_IOCTL -DRUMP_SYS_CLOSE -I${NETBSDSRCDIR}/sys/dev/dm +LDADD+= -lrumpdev_disk -lrumpdev_dm -lrumpdev -lprop +LDADD+= -lrumpvfs -lrump -lrumpuser -lpthread +DBG=-g + +.include bsd.prog.mk Index: src/share/examples/rump/dmtest/dmt.c diff -u /dev/null src/share/examples/rump/dmtest/dmt.c:1.1 --- /dev/null Fri Dec 4 22:18:30 2009 +++ src/share/examples/rump/dmtest/dmt.c Fri Dec 4 22:18:30 2009 @@ -0,0 +1,86 @@ +/* $NetBSD: dmt.c,v 1.1 2009/12/04 22:18:30 haad Exp $ + +/* + * Copyright (c) 2009 Adam Hamsik. 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 ``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. + */ + + +#include sys/cdefs.h + +#include sys/param.h +#include sys/ioctl.h +#include sys/stat.h +#include sys/disklabel.h + +#include ctype.h +#include err.h +#include errno.h +#include fcntl.h +#include stdio.h +#include stdlib.h +#include string.h +#include unistd.h +#include util.h + +#include netbsd-dm.h + +#include rump/rump.h +#include rump/rump_syscalls.h +#include rump/rumpuser.h + +int +main(int argc,char *argv[]) +{ + int fd; + int err; + + prop_dictionary_t dict_in, dict_out; + struct plistref prefp; + char *xml; + + err = rump_init(); + + if (err != 0) + printf(rump_init failed with %s\n, strerror(err)); + + fd = rump_sys_open(/dev/mapper/control, O_RDWR, 0); + if (fd == -1) + printf(Cannot open control device.\n); + + dict_in = prop_dictionary_internalize_from_file(prop2.plist); + dict_out = prop_dictionary_create(); + + prop_dictionary_externalize_to_pref(dict_in, prefp); + + err = rump_sys_ioctl(fd, NETBSD_DM_IOCTL, prefp); + if ( err != 0) + printf(ioctl failed %d\n, err); + + dict_out = prop_dictionary_internalize(prefp.pref_plist); + + xml = prop_dictionary_externalize(dict_out); + printf(%s\n,xml); + + close(fd); +} Index: src/share/examples/rump/dmtest/prop1.plist diff -u /dev/null src/share/examples/rump/dmtest/prop1.plist:1.1 --- /dev/null Fri Dec 4 22:18:30 2009 +++ src/share/examples/rump/dmtest/prop1.plist Fri Dec 4 22:18:30 2009 @@ -0,0 +1,20 @@ +?xml version=1.0 encoding=UTF-8? +!DOCTYPE plist PUBLIC -//Apple Computer//DTD PLIST 1.0//EN http://www.apple.com/DTDs/PropertyList-1.0.dtd; +plist version=1.0 +dict +keycmd_data/key +array/ +keycommand/key +stringversion/string +keyevent_nr/key +integer0x0/integer +keyflags/key +integer0x4/integer +keyversion/key +array +integer0x4/integer +integer0x0/integer +integer0x0/integer +/array +/dict +/plist \ No newline at end of file Index: src/share/examples/rump/dmtest/prop2.plist diff -u /dev/null
CVS commit: src/sys/dev/mii
Module Name:src Committed By: dyoung Date: Fri Dec 4 22:37:35 UTC 2009 Modified Files: src/sys/dev/mii: mii.c miivar.h Log Message: Delete unused function mii_activate(). To generate a diff of this commit: cvs rdiff -u -r1.49 -r1.50 src/sys/dev/mii/mii.c cvs rdiff -u -r1.55 -r1.56 src/sys/dev/mii/miivar.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/mii/mii.c diff -u src/sys/dev/mii/mii.c:1.49 src/sys/dev/mii/mii.c:1.50 --- src/sys/dev/mii/mii.c:1.49 Thu Nov 12 19:38:35 2009 +++ src/sys/dev/mii/mii.c Fri Dec 4 22:37:35 2009 @@ -1,4 +1,4 @@ -/* $NetBSD: mii.c,v 1.49 2009/11/12 19:38:35 dyoung Exp $ */ +/* $NetBSD: mii.c,v 1.50 2009/12/04 22:37:35 dyoung Exp $ */ /*- * Copyright (c) 1998, 2000 The NetBSD Foundation, Inc. @@ -36,7 +36,7 @@ */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: mii.c,v 1.49 2009/11/12 19:38:35 dyoung Exp $); +__KERNEL_RCSID(0, $NetBSD: mii.c,v 1.50 2009/12/04 22:37:35 dyoung Exp $); #include sys/param.h #include sys/device.h @@ -151,37 +151,6 @@ } void -mii_activate(struct mii_data *mii, enum devact act, int phyloc, int offloc) -{ - struct mii_softc *child; - - if (phyloc != MII_PHY_ANY offloc != MII_OFFSET_ANY) - panic(mii_activate: phyloc and offloc specified); - - if ((mii-mii_flags MIIF_INITDONE) == 0) - return; - - LIST_FOREACH(child, mii-mii_phys, mii_list) { - if (phyloc != MII_PHY_ANY || offloc != MII_OFFSET_ANY) { - if (phyloc != MII_PHY_ANY - phyloc != child-mii_phy) -continue; - if (offloc != MII_OFFSET_ANY - offloc != child-mii_offset) -continue; - } - switch (act) { - case DVACT_ACTIVATE: - panic(mii_activate: DVACT_ACTIVATE); - break; - - case DVACT_DEACTIVATE: - break; - } - } -} - -void mii_detach(struct mii_data *mii, int phyloc, int offloc) { struct mii_softc *child, *nchild; Index: src/sys/dev/mii/miivar.h diff -u src/sys/dev/mii/miivar.h:1.55 src/sys/dev/mii/miivar.h:1.56 --- src/sys/dev/mii/miivar.h:1.55 Tue May 12 14:31:27 2009 +++ src/sys/dev/mii/miivar.h Fri Dec 4 22:37:35 2009 @@ -1,4 +1,4 @@ -/* $NetBSD: miivar.h,v 1.55 2009/05/12 14:31:27 cegger Exp $ */ +/* $NetBSD: miivar.h,v 1.56 2009/12/04 22:37:35 dyoung Exp $ */ /*- * Copyright (c) 1998, 1999, 2000, 2001 The NetBSD Foundation, Inc. @@ -224,7 +224,6 @@ (*(p)-mii_funcs-pf_reset)((p)) void mii_attach(device_t, struct mii_data *, int, int, int, int); -void mii_activate(struct mii_data *, enum devact, int, int); void mii_detach(struct mii_data *, int, int); bool mii_phy_resume(device_t PMF_FN_PROTO);
CVS commit: src/sys/dev/ic
Module Name:src Committed By: dyoung Date: Fri Dec 4 22:45:29 UTC 2009 Modified Files: src/sys/dev/ic: tulip.c Log Message: Oops, there was one mii_activate() call left. Delete it. To generate a diff of this commit: cvs rdiff -u -r1.172 -r1.173 src/sys/dev/ic/tulip.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/ic/tulip.c diff -u src/sys/dev/ic/tulip.c:1.172 src/sys/dev/ic/tulip.c:1.173 --- src/sys/dev/ic/tulip.c:1.172 Sat Sep 5 14:19:30 2009 +++ src/sys/dev/ic/tulip.c Fri Dec 4 22:45:28 2009 @@ -1,4 +1,4 @@ -/* $NetBSD: tulip.c,v 1.172 2009/09/05 14:19:30 tsutsui Exp $ */ +/* $NetBSD: tulip.c,v 1.173 2009/12/04 22:45:28 dyoung Exp $ */ /*- * Copyright (c) 1998, 1999, 2000, 2002 The NetBSD Foundation, Inc. @@ -36,7 +36,7 @@ */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: tulip.c,v 1.172 2009/09/05 14:19:30 tsutsui Exp $); +__KERNEL_RCSID(0, $NetBSD: tulip.c,v 1.173 2009/12/04 22:45:28 dyoung Exp $); #include bpfilter.h @@ -579,24 +579,14 @@ tlp_activate(device_t self, enum devact act) { struct tulip_softc *sc = device_private(self); - int s, error = 0; - s = splnet(); switch (act) { - case DVACT_ACTIVATE: - error = EOPNOTSUPP; - break; - case DVACT_DEACTIVATE: - if (sc-sc_flags TULIPF_HAS_MII) - mii_activate(sc-sc_mii, act, MII_PHY_ANY, - MII_OFFSET_ANY); if_deactivate(sc-sc_ethercom.ec_if); - break; + return 0; + default: + return EOPNOTSUPP; } - splx(s); - - return (error); } /*
CVS commit: src/sys/arch/sparc64/sparc64
Module Name:src Committed By: martin Date: Sat Dec 5 01:11:18 UTC 2009 Modified Files: src/sys/arch/sparc64/sparc64: autoconf.c Log Message: Refactor device_register code slightly in preparation for further changes. No functional changes. To generate a diff of this commit: cvs rdiff -u -r1.161 -r1.162 src/sys/arch/sparc64/sparc64/autoconf.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/sparc64/sparc64/autoconf.c diff -u src/sys/arch/sparc64/sparc64/autoconf.c:1.161 src/sys/arch/sparc64/sparc64/autoconf.c:1.162 --- src/sys/arch/sparc64/sparc64/autoconf.c:1.161 Fri Feb 13 22:41:03 2009 +++ src/sys/arch/sparc64/sparc64/autoconf.c Sat Dec 5 01:11:18 2009 @@ -1,4 +1,4 @@ -/* $NetBSD: autoconf.c,v 1.161 2009/02/13 22:41:03 apb Exp $ */ +/* $NetBSD: autoconf.c,v 1.162 2009/12/05 01:11:18 martin Exp $ */ /* * Copyright (c) 1996 @@ -48,7 +48,7 @@ */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: autoconf.c,v 1.161 2009/02/13 22:41:03 apb Exp $); +__KERNEL_RCSID(0, $NetBSD: autoconf.c,v 1.162 2009/12/05 01:11:18 martin Exp $); #include opt_ddb.h #include opt_kgdb.h @@ -832,7 +832,7 @@ device_register(struct device *dev, void *aux) { struct device *busdev = device_parent(dev); - int ofnode; + int ofnode = 0; /* * We don't know the type of 'aux' - it depends on the @@ -848,21 +848,16 @@ } else if (device_is_a(busdev, mainbus)) { struct mainbus_attach_args *ma = aux; - device_setofnode(dev, ma-ma_node); - dev_path_exact_match(dev, ma-ma_node); + ofnode = ma-ma_node; } else if (device_is_a(busdev, pci)) { struct pci_attach_args *pa = aux; ofnode = PCITAG_NODE(pa-pa_tag); - device_setofnode(dev, ofnode); - dev_path_exact_match(dev, ofnode); } else if (device_is_a(busdev, sbus) || device_is_a(busdev, dma) || device_is_a(busdev, ledma)) { struct sbus_attach_args *sa = aux; ofnode = sa-sa_node; - device_setofnode(dev, ofnode); - dev_path_exact_match(dev, sa-sa_node); } else if (device_is_a(dev, sd) || device_is_a(dev, cd)) { struct scsipibus_attach_args *sa = aux; struct scsipi_periph *periph = sa-sa_periph; @@ -889,34 +884,39 @@ ofnode = device_ofnode(device_parent(busdev)); dev_path_drive_match(dev, ofnode, periph-periph_target + off, periph-periph_lun); + return; } else if (device_is_a(dev, wd)) { struct ata_device *adev = aux; ofnode = device_ofnode(device_parent(busdev)); dev_path_drive_match(dev, ofnode, adev-adev_channel*2+ adev-adev_drv_data-drive, 0); + return; } - /* set properties for PCI framebuffers */ if (busdev == NULL) return; + if (ofnode != 0) { + device_setofnode(dev, ofnode); + dev_path_exact_match(dev, ofnode); + } + + /* set properties for PCI framebuffers */ if (device_is_a(busdev, pci)) { /* see if this is going to be console */ struct pci_attach_args *pa = aux; prop_dictionary_t dict; - int node, sub; + int sub; int console = 0; dict = device_properties(dev); - node = PCITAG_NODE(pa-pa_tag); - device_setofnode(dev, node); /* we only care about display devices from here on */ if (PCI_CLASS(pa-pa_class) != PCI_CLASS_DISPLAY) return; - console = (node == console_node); + console = (ofnode == console_node); if (!console) { /* @@ -925,7 +925,7 @@ * points to the head rather than the device * itself in this case */ - sub = OF_child(node); + sub = OF_child(ofnode); while ((sub != 0) (sub != console_node)) { sub = OF_peer(sub); }
CVS commit: src/sys/dev/dm
Module Name:src Committed By: haad Date: Sat Dec 5 01:21:41 UTC 2009 Modified Files: src/sys/dev/dm: dm_ioctl.c Log Message: Fix bug in dm_table_resume_ioctl where dmv-flags was sent back to libdevmapper except flags variable. This fixes weird behaviour, when worng links to devices in /dev/mapper were created after lvrename/lvresize. To generate a diff of this commit: cvs rdiff -u -r1.15 -r1.16 src/sys/dev/dm/dm_ioctl.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/dm/dm_ioctl.c diff -u src/sys/dev/dm/dm_ioctl.c:1.15 src/sys/dev/dm/dm_ioctl.c:1.16 --- src/sys/dev/dm/dm_ioctl.c:1.15 Tue Dec 1 23:12:10 2009 +++ src/sys/dev/dm/dm_ioctl.c Sat Dec 5 01:21:41 2009 @@ -1,4 +1,4 @@ -/*$NetBSD: dm_ioctl.c,v 1.15 2009/12/01 23:12:10 haad Exp $ */ +/*$NetBSD: dm_ioctl.c,v 1.16 2009/12/05 01:21:41 haad Exp $ */ /* * Copyright (c) 2008 The NetBSD Foundation, Inc. @@ -544,7 +544,7 @@ dmgetproperties(dmv-diskp, dmv-table_head); prop_dictionary_set_uint32(dm_dict, DM_IOCTL_OPEN, dmv-table_head.io_cnt); - prop_dictionary_set_uint32(dm_dict, DM_IOCTL_FLAGS, dmv-flags); + prop_dictionary_set_uint32(dm_dict, DM_IOCTL_FLAGS, flags); prop_dictionary_set_uint32(dm_dict, DM_IOCTL_MINOR, dmv-minor); dm_dev_unbusy(dmv);
CVS commit: src/sys/dev/dm
Module Name:src Committed By: haad Date: Sat Dec 5 01:25:12 UTC 2009 Modified Files: src/sys/dev/dm: TODO Log Message: Remove wrong TODO item, it violates abstraction between kernel-libdevmapper and lvm tools. To generate a diff of this commit: cvs rdiff -u -r1.5 -r1.6 src/sys/dev/dm/TODO 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/dm/TODO diff -u src/sys/dev/dm/TODO:1.5 src/sys/dev/dm/TODO:1.6 --- src/sys/dev/dm/TODO:1.5 Mon Apr 13 16:12:27 2009 +++ src/sys/dev/dm/TODO Sat Dec 5 01:25:12 2009 @@ -12,9 +12,6 @@ * Integrate LVM with the sysinst, so we can configure LVM during installation -* Parse whole config line for every target in NetBSD libdevmapper and do not - work with strings in the kernel. - Pain in the sky tasks * Implement multipath target for network attached storage devices.
CVS commit: src/external/gpl2/lvm2/dist/lib/commands
Module Name:src Committed By: haad Date: Sat Dec 5 01:52:44 UTC 2009 Modified Files: src/external/gpl2/lvm2/dist/lib/commands: toolcontext.c Log Message: Try to fix amd64 build. To generate a diff of this commit: cvs rdiff -u -r1.6 -r1.7 \ src/external/gpl2/lvm2/dist/lib/commands/toolcontext.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/gpl2/lvm2/dist/lib/commands/toolcontext.c diff -u src/external/gpl2/lvm2/dist/lib/commands/toolcontext.c:1.6 src/external/gpl2/lvm2/dist/lib/commands/toolcontext.c:1.7 --- src/external/gpl2/lvm2/dist/lib/commands/toolcontext.c:1.6 Wed Dec 2 01:53:25 2009 +++ src/external/gpl2/lvm2/dist/lib/commands/toolcontext.c Sat Dec 5 01:52:44 2009 @@ -1,4 +1,4 @@ -/* $NetBSD: toolcontext.c,v 1.6 2009/12/02 01:53:25 haad Exp $ */ +/* $NetBSD: toolcontext.c,v 1.7 2009/12/05 01:52:44 haad Exp $ */ /* * Copyright (C) 2001-2004 Sistina Software, Inc. All rights reserved. @@ -845,13 +845,17 @@ return 1; } +#ifdef __NetBSD__ +#include dlfcn.h +#endif + static int _init_single_segtype(struct cmd_context *cmd, struct segtype_library *seglib) { struct segment_type *(*init_segtype_fn) (struct cmd_context *); struct segment_type *segtype; - if (!(init_segtype_fn = (void *) dlsym(seglib-lib, init_segtype))) { + if (!(init_segtype_fn = dlsym(seglib-lib, init_segtype))) { log_error(Shared library %s does not contain segment type functions, seglib-libname); return 0;
CVS commit: src/usr.bin/gzip
Module Name:src Committed By: mrg Date: Sat Dec 5 03:23:37 UTC 2009 Modified Files: src/usr.bin/gzip: unbzip2.c Log Message: apply a change from Xin LI delp...@delphij.net to avoid problems when reading from pipes. introduced with the multi-part bz2 fixes. To generate a diff of this commit: cvs rdiff -u -r1.12 -r1.13 src/usr.bin/gzip/unbzip2.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/gzip/unbzip2.c diff -u src/usr.bin/gzip/unbzip2.c:1.12 src/usr.bin/gzip/unbzip2.c:1.13 --- src/usr.bin/gzip/unbzip2.c:1.12 Sun Oct 11 05:17:20 2009 +++ src/usr.bin/gzip/unbzip2.c Sat Dec 5 03:23:37 2009 @@ -1,4 +1,4 @@ -/* $NetBSD: unbzip2.c,v 1.12 2009/10/11 05:17:20 mrg Exp $ */ +/* $NetBSD: unbzip2.c,v 1.13 2009/12/05 03:23:37 mrg Exp $ */ /*- * Copyright (c) 2006 The NetBSD Foundation, Inc. @@ -34,7 +34,7 @@ static off_t unbzip2(int in, int out, char *pre, size_t prelen, off_t *bytes_in) { - int ret, end_of_file; + int ret, end_of_file, cold = 0; off_t bytes_out = 0; bz_stream bzs; static char *inbuf, *outbuf; @@ -84,8 +84,18 @@ switch (ret) { case BZ_STREAM_END: case BZ_OK: - if (ret == BZ_OK end_of_file) - maybe_err(read); + if (ret == BZ_OK end_of_file) { +/* + * If we hit this after a stream end, consider + * it as the end of the whole file and don't + * bail out. + */ +if (cold == 1) + ret = BZ_STREAM_END; +else + maybe_errx(truncated file); + } + cold = 0; if (!tflag bzs.avail_out != BUFLEN) { ssize_t n; @@ -98,6 +108,7 @@ if (BZ2_bzDecompressEnd(bzs) != BZ_OK || BZ2_bzDecompressInit(bzs, 0, 0) != BZ_OK) maybe_errx(bzip2 re-init); +cold = 1; ret = BZ_OK; } break;
CVS commit: src/external/mit/xorg/bin/xrdb
Module Name:src Committed By: mrg Date: Sat Dec 5 03:28:08 UTC 2009 Modified Files: src/external/mit/xorg/bin/xrdb: Makefile Log Message: - define CPP with a full path - define CPP_ARGS to -traditional part1 of xrdb fixes. thanks to Patrick Welche pr...@cam.ac.uk for figuring out what was going wrong. To generate a diff of this commit: cvs rdiff -u -r1.1.1.1 -r1.2 src/external/mit/xorg/bin/xrdb/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/bin/xrdb/Makefile diff -u src/external/mit/xorg/bin/xrdb/Makefile:1.1.1.1 src/external/mit/xorg/bin/xrdb/Makefile:1.2 --- src/external/mit/xorg/bin/xrdb/Makefile:1.1.1.1 Tue Jul 29 05:01:22 2008 +++ src/external/mit/xorg/bin/xrdb/Makefile Sat Dec 5 03:28:08 2009 @@ -1,10 +1,11 @@ -# $NetBSD: Makefile,v 1.1.1.1 2008/07/29 05:01:22 mrg Exp $ +# $NetBSD: Makefile,v 1.2 2009/12/05 03:28:08 mrg Exp $ .include bsd.own.mk PROG= xrdb -CPPFLAGS+=-DCPP=\cpp -traditional\ -DHAS_MKSTEMP # XXX +CPPFLAGS+=-DCPP=\/usr/bin/cpp\ -DHAS_MKSTEMP # XXX +CPPFLAGS+=-DCPP_ARGS=\-traditional\ LDADD+= -lXmuu -lXt -lSM -lICE -lXext -lX11 DPADD+= ${LIBXMUU} ${LIBXT} ${LIBSM} ${LIBICE} ${LIBXEXT} ${LIBX11}
CVS commit: xsrc/external/mit/xrdb/dist
Module Name:xsrc Committed By: mrg Date: Sat Dec 5 03:29:11 UTC 2009 Modified Files: xsrc/external/mit/xrdb/dist: xrdb.c Log Message: - add a new -cppargs option - default -cppargs to the CPPARGS variable if defined. - add cppargs to the cpp command if defined. part2 of xrdb fixes. thanks to Patrick Welche pr...@cam.ac.uk for figuring out what was going wrong, and testing these changes. To generate a diff of this commit: cvs rdiff -u -r1.1.1.2 -r1.2 xsrc/external/mit/xrdb/dist/xrdb.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: xsrc/external/mit/xrdb/dist/xrdb.c diff -u xsrc/external/mit/xrdb/dist/xrdb.c:1.1.1.2 xsrc/external/mit/xrdb/dist/xrdb.c:1.2 --- xsrc/external/mit/xrdb/dist/xrdb.c:1.1.1.2 Sun Nov 8 11:36:38 2009 +++ xsrc/external/mit/xrdb/dist/xrdb.c Sat Dec 5 03:29:11 2009 @@ -130,6 +130,10 @@ static int oper = OPLOAD; static char *editFile = NULL; static const char *cpp_program = NULL; +#ifndef CPP_ARGS +#define CPP_ARGS NULL +#endif +static const char *cpp_args = CPP_ARGS; static const char* const cpp_locations[] = { CPP }; static char *backup_suffix = BACKUP_SUFFIX; static Bool dont_execute = False; @@ -808,6 +812,10 @@ if (++i = argc) Syntax (); cpp_program = argv[i]; continue; + } else if (isabbreviation (-cppargs, arg, 2)) { + if (++i = argc) Syntax (); + cpp_args = argv[i]; + continue; } else if (!strcmp (-n, arg)) { dont_execute = True; continue; @@ -1170,8 +1178,10 @@ 1 + strlen(tmpname2) + 3 + strlen(tmpname3) + 1)) == NULL) fatal(%s: Out of memory\n, ProgramName); - sprintf(cmd, %s%s %s %s, cpp_program, includes.val, - tmpname2, tmpname3); + sprintf(cmd, %s%s%s%s %s %s, cpp_program, + cpp_args ? : , + cpp_args ? cpp_args : , + includes.val, tmpname2, tmpname3); if (system(cmd) 0) fatal(%s: cannot run '%s'\n, ProgramName, cmd); free(cmd); @@ -1188,7 +1198,10 @@ malloc(strlen(cpp_program) + strlen(includes.val) + 1)) == NULL) fatal(%s: Out of memory\n, ProgramName); - sprintf(cmd, %s%s, cpp_program, includes.val); + sprintf(cmd, %s%s%s%s, cpp_program, + cpp_args ? : , + cpp_args ? cpp_args : , + includes.val); if (!(input = popen(cmd, r))) fatal(%s: cannot run '%s'\n, ProgramName, cmd); free(cmd); @@ -1209,7 +1222,9 @@ strlen(tmpname3) + 1)) == NULL) fatal(%s: Out of memory\n, ProgramName); - sprintf(cmd, %s%s %s %s %s, cpp_program, + sprintf(cmd, %s%s%s%s %s %s %s, cpp_program, + cpp_args ? : , + cpp_args ? cpp_args : , includes.val, defines.val, filename ? filename : , tmpname3); if (system(cmd) 0) @@ -1224,7 +1239,9 @@ strlen(filename ? filename : ) + 1)) == NULL) fatal(%s: Out of memory\n, ProgramName); - sprintf(cmd, %s%s %s %s, cpp_program, + sprintf(cmd, %s%s%s%s %s %s, cpp_program, + cpp_args ? : , + cpp_args ? cpp_args : , includes.val, defines.val, filename ? filename : ); if (!(input = popen(cmd, r)))
CVS commit: src/crypto/external/bsd/netpgp/dist
Module Name:src Committed By: agc Date: Sat Dec 5 07:21:07 UTC 2009 Modified Files: src/crypto/external/bsd/netpgp/dist: TODO Log Message: One more thing in the Done section - add ssh host keys To generate a diff of this commit: cvs rdiff -u -r1.25 -r1.26 src/crypto/external/bsd/netpgp/dist/TODO Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/crypto/external/bsd/netpgp/dist/TODO diff -u src/crypto/external/bsd/netpgp/dist/TODO:1.25 src/crypto/external/bsd/netpgp/dist/TODO:1.26 --- src/crypto/external/bsd/netpgp/dist/TODO:1.25 Thu Nov 19 21:56:00 2009 +++ src/crypto/external/bsd/netpgp/dist/TODO Sat Dec 5 07:21:07 2009 @@ -73,3 +73,4 @@ don't require passphrase for keys without one failure to run if no userid in gpg.conf (even if --userid specified) don't complain if no .gnupg dir (even when using --homedir) +make it work with ssh host keys
CVS commit: src/crypto/external/bsd/netpgp/dist/src/netpgp
Module Name:src Committed By: agc Date: Sat Dec 5 07:33:18 UTC 2009 Modified Files: src/crypto/external/bsd/netpgp/dist/src/netpgp: netpgp.1 Log Message: Update the manual page for the addition of ssh host keys. To generate a diff of this commit: cvs rdiff -u -r1.3 -r1.4 \ src/crypto/external/bsd/netpgp/dist/src/netpgp/netpgp.1 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/crypto/external/bsd/netpgp/dist/src/netpgp/netpgp.1 diff -u src/crypto/external/bsd/netpgp/dist/src/netpgp/netpgp.1:1.3 src/crypto/external/bsd/netpgp/dist/src/netpgp/netpgp.1:1.4 --- src/crypto/external/bsd/netpgp/dist/src/netpgp/netpgp.1:1.3 Thu Jun 11 01:12:42 2009 +++ src/crypto/external/bsd/netpgp/dist/src/netpgp/netpgp.1 Sat Dec 5 07:33:18 2009 @@ -1,4 +1,4 @@ -.\ $NetBSD: netpgp.1,v 1.3 2009/06/11 01:12:42 agc Exp $ +.\ $NetBSD: netpgp.1,v 1.4 2009/12/05 07:33:18 agc Exp $ .\ .\ Copyright (c) 2009 The NetBSD Foundation, Inc. .\ All rights reserved. @@ -27,7 +27,7 @@ .\ ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE .\ POSSIBILITY OF SUCH DAMAGE. .\ -.Dd June 10, 2009 +.Dd December 4, 2009 .Dt NETPGP 1 .Os .Sh NAME @@ -87,6 +87,8 @@ .br .Op Fl Fl results Ns = Ns Ar filename .br +.Op Fl Fl ssh-keys +.br .Op Fl Fl userid Ns = Ns Ar userid .br .Op Fl Fl verbose @@ -229,6 +231,15 @@ specifies a filename to which the results of the operation should be sent. The default is to send the results to stderr. +.It Fl Fl ssh-keys +specifies that the public and private keys should be taken +from the +.Xr ssh 1 +host key files, usually found in +.Pa /etc/ssh/ssh_host_rsa_key +and +.Pa /etc/ssh/ssh_host_rsa_key.pub +for the private and public host keys. .It Fl Fl userid Ar userid This option specifies the user identity to be used for all operations. This identity can either be in the form of the full name, or as an @@ -369,6 +380,7 @@ or 2 if any other error occurs. .Sh SEE ALSO .Xr netpgpkeys 1 , +.Xr ssh 1 , .Xr getpass 3 , .\ .Xr libbz2 3 , .Xr libnetpgp 3 ,
CVS commit: src/crypto/external/bsd/netpgp/dist/src/netpgpkeys
Module Name:src Committed By: agc Date: Sat Dec 5 07:35:30 UTC 2009 Modified Files: src/crypto/external/bsd/netpgp/dist/src/netpgpkeys: netpgpkeys.1 Log Message: Update the manual page for the addition of ssh host keys. To generate a diff of this commit: cvs rdiff -u -r1.2 -r1.3 \ src/crypto/external/bsd/netpgp/dist/src/netpgpkeys/netpgpkeys.1 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/crypto/external/bsd/netpgp/dist/src/netpgpkeys/netpgpkeys.1 diff -u src/crypto/external/bsd/netpgp/dist/src/netpgpkeys/netpgpkeys.1:1.2 src/crypto/external/bsd/netpgp/dist/src/netpgpkeys/netpgpkeys.1:1.3 --- src/crypto/external/bsd/netpgp/dist/src/netpgpkeys/netpgpkeys.1:1.2 Wed Jun 10 14:38:14 2009 +++ src/crypto/external/bsd/netpgp/dist/src/netpgpkeys/netpgpkeys.1 Sat Dec 5 07:35:30 2009 @@ -1,4 +1,4 @@ -.\ $NetBSD: netpgpkeys.1,v 1.2 2009/06/10 14:38:14 wiz Exp $ +.\ $NetBSD: netpgpkeys.1,v 1.3 2009/12/05 07:35:30 agc Exp $ .\ .\ Copyright (c) 2009 The NetBSD Foundation, Inc. .\ All rights reserved. @@ -27,7 +27,7 @@ .\ ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE .\ POSSIBILITY OF SUCH DAMAGE. .\ -.Dd June 9, 2009 +.Dd December 4, 2009 .Dt NETPGPKEYS 1 .Os .Sh NAME @@ -65,6 +65,8 @@ .br .Op Fl Fl keyring Ns = Ns Ar keyring .br +.Op Fl Fl ssh-keys +.br .Op Fl Fl userid Ns = Ns Ar userid .br .Op Fl Fl verbose @@ -220,6 +222,15 @@ the process of the .Nm requests. +.It Fl Fl ssh-keys +specifies that the public and private keys should be taken +from the +.Xr ssh 1 +host key files, usually found in +.Pa /etc/ssh/ssh_host_rsa_key +and +.Pa /etc/ssh/ssh_host_rsa_key.pub +for the private and public host keys. .It Fl Fl coredumps in normal processing, if an error occurs, the contents of memory are saved to disk, and can @@ -267,6 +278,7 @@ or 2 if any other error occurs. .Sh SEE ALSO .Xr netpgp 1 , +.Xr ssh 1 , .Xr getpass 3 , .\ .Xr libbz2 3 , .Xr libnetpgp 3 ,
CVS commit: [matt-nb5-mips64] src/sys/arch/mips/mips
Module Name:src Committed By: cliff Date: Sat Dec 5 07:40:02 UTC 2009 Modified Files: src/sys/arch/mips/mips [matt-nb5-mips64]: copy.S Log Message: - in copyinstr, drop a nop into delay slot as needed - use tabspace indenting to make delay slot ops more obvious To generate a diff of this commit: cvs rdiff -u -r1.5.38.4 -r1.5.38.5 src/sys/arch/mips/mips/copy.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/copy.S diff -u src/sys/arch/mips/mips/copy.S:1.5.38.4 src/sys/arch/mips/mips/copy.S:1.5.38.5 --- src/sys/arch/mips/mips/copy.S:1.5.38.4 Sat Nov 14 21:50:51 2009 +++ src/sys/arch/mips/mips/copy.S Sat Dec 5 07:40:02 2009 @@ -1,4 +1,4 @@ -/* $NetBSD: copy.S,v 1.5.38.4 2009/11/14 21:50:51 matt Exp $ */ +/* $NetBSD: copy.S,v 1.5.38.5 2009/12/05 07:40:02 cliff Exp $ */ /* * Copyright (c) 1992, 1993 @@ -100,26 +100,27 @@ PTR_L v1, L_ADDR(MIPS_CURLWP) PTR_LA v0, _C_LABEL(copystrerr) blt a0, zero, _C_LABEL(copystrerr) - PTR_S v0, U_PCB_ONFAULT(v1) + PTR_S v0, U_PCB_ONFAULT(v1) move t0, a2 beq a2, zero, 4f + nop 1: lbu v0, 0(a0) PTR_SUBU a2, a2, 1 beq v0, zero, 2f - sb v0, 0(a1) + sb v0, 0(a1) PTR_ADDU a0, a0, 1 bne a2, zero, 1b - PTR_ADDU a1, a1, 1 + PTR_ADDU a1, a1, 1 4: li v0, ENAMETOOLONG 2: beq a3, zero, 3f - PTR_SUBU a2, t0, a2 + PTR_SUBU a2, t0, a2 PTR_S a2, 0(a3) 3: j ra# v0 is 0 or ENAMETOOLONG - PTR_S zero, U_PCB_ONFAULT(v1) + PTR_S zero, U_PCB_ONFAULT(v1) END(copyinstr) /*
CVS commit: src/sys/arch/sparc64/include
Module Name:src Committed By: nakayama Date: Sat Dec 5 07:58:57 UTC 2009 Modified Files: src/sys/arch/sparc64/include: ctlreg.h Log Message: Bring together similar inline asm codes of ld*a and st*a definitions using macro, also remove unnecessary membar #Sync and %asi restore in the case of 32-bit kernel. While there, introduce an optimization case that asi is constant if we are using gcc. To generate a diff of this commit: cvs rdiff -u -r1.46 -r1.47 src/sys/arch/sparc64/include/ctlreg.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/sparc64/include/ctlreg.h diff -u src/sys/arch/sparc64/include/ctlreg.h:1.46 src/sys/arch/sparc64/include/ctlreg.h:1.47 --- src/sys/arch/sparc64/include/ctlreg.h:1.46 Sat Nov 28 21:07:02 2009 +++ src/sys/arch/sparc64/include/ctlreg.h Sat Dec 5 07:58:57 2009 @@ -1,4 +1,4 @@ -/* $NetBSD: ctlreg.h,v 1.46 2009/11/28 21:07:02 mrg Exp $ */ +/* $NetBSD: ctlreg.h,v 1.47 2009/12/05 07:58:57 nakayama Exp $ */ /* * Copyright (c) 1996-2002 Eduardo Horvath @@ -477,490 +477,372 @@ */ #ifdef __arch64__ -static __inline u_char -lduba(paddr_t loc, int asi) -{ - register unsigned int _lduba_v; - - __asm volatile( - wr %2, %%g0, %%asi; - lduba [%1]%%asi, %0 - : =r (_lduba_v) - : r ((unsigned long)(loc)), r (asi)); - return (_lduba_v); -} -#else -static __inline u_char -lduba(paddr_t loc, int asi) -{ - register unsigned int _lduba_v, _loc_hi, _pstate; - _loc_hi = (((uint64_t)loc)32); - if (PHYS_ASI(asi)) { - __asm volatile( - wr %4,%%g0,%%asi; - sllx %3,32,%0; - rdpr %%pstate,%1; - or %0,%2,%0; - wrpr %1,8,%%pstate; - membar #Sync; - lduba [%0]%%asi,%0; - wrpr %1,0,%%pstate; - membar #Sync; - wr %%g0, 0x82, %%asi - : =r (_lduba_v), =r (_pstate) - : r ((unsigned long)(loc)), r (_loc_hi), r (asi)); - } else { - __asm volatile( - wr %3,%%g0,%%asi; - sllx %2,32,%0; - or %0,%1,%0; - lduba [%0]%%asi,%0; - wr %%g0, 0x82, %%asi - : =r (_lduba_v) - : r ((unsigned long)(loc)), r (_loc_hi), r (asi)); - } - return (_lduba_v); +/* 64-bit kernel, non-constant */ +#define SPARC64_LD_NONCONST(ld) \ + __asm volatile( \ + wr %2,%%g0,%%asi; \ + #ld [%1]%%asi,%0 \ + : =r (_v) \ + : r ((__uintptr_t)(loc)), r (asi)) + +#if defined(__GNUC__) defined(__OPTIMIZE__) +#define SPARC64_LD_DEF(ld, type, vtype) \ +static __inline type ld(paddr_t loc, int asi)\ +{ \ + vtype _v; \ + if (__builtin_constant_p(asi)) \ + __asm volatile( \ + #ld [%1]%2,%0 \ + : =r (_v) \ + : r ((__uintptr_t)(loc)), n (asi)); \ + else\ + SPARC64_LD_NONCONST(ld);\ + return _v; \ +} +#else +#define SPARC64_LD_DEF(ld, type, vtype) \ +static __inline type ld(paddr_t loc, int asi)\ +{ \ + vtype _v; \ + SPARC64_LD_NONCONST(ld); \ + return _v; \ } #endif +#define SPARC64_LD_DEF64(ld, type) SPARC64_LD_DEF(ld, type, uint64_t) -#ifdef __arch64__ -/* load half-word from alternate address space */ -static __inline u_short -lduha(paddr_t loc, int asi) -{ - register unsigned int _lduha_v; - - __asm volatile( - wr %2, %%g0, %%asi; - lduha [%1]%%asi, %0 - : =r (_lduha_v) - : r ((unsigned long)(loc)), r (asi)); - return (_lduha_v); -} -#else -/* load half-word from alternate address space */ -static __inline u_short -lduha(paddr_t loc, int asi) { - register unsigned int _lduha_v, _loc_hi, _pstate; - - _loc_hi = (((uint64_t)loc)32); +#else /* __arch64__ */ - if (PHYS_ASI(asi)) { - __asm volatile( - wr %4,%%g0,%%asi; - sllx %3,32,%0; - rdpr %%pstate,%1; - wrpr %1,8,%%pstate; - or %0,%2,%0; - membar #Sync; - lduha [%0]%%asi,%0; - wrpr %1,0,%%pstate; - membar #Sync; - wr %%g0, 0x82, %%asi - : =r (_lduha_v), =r (_pstate) - : r ((unsigned long)(loc)), r (_loc_hi), r (asi)); - } else { - __asm volatile( - wr %3,%%g0,%%asi; - sllx %2,32,%0; - or %0,%1,%0; - lduha [%0]%%asi,%0; - wr %%g0, 0x82, %%asi - : =r (_lduha_v) - : r ((unsigned long)(loc)), r (_loc_hi), r (asi)); - } - return (_lduha_v); +/* 32-bit kernel, MMU bypass, non-constant */ +#define SPARC64_LD_PHYS_NONCONST(ld) \ + __asm volatile( \ + rdpr %%pstate,%1; \ + sllx %3,32,%0; \ + wrpr %1,8,%%pstate; \ + or %0,%2,%0; \ + wr %4,%%g0,%%asi; \ + #ld [%0]%%asi,%0; \ + wrpr %1,0,%%pstate \ + : =r (_v), =r (_pstate)\ + : r ((uint32_t)(loc)), r (_hi), r (asi)) +/* 32-bit kernel, non-constant */ +#define SPARC64_LD_NONCONST(ld) \ + __asm volatile( \ + wr %2,%%g0,%%asi; \ + #ld [%1]%%asi,%0 \ + : =r (_v) \ + : r ((uint32_t)(loc)), r (asi)) +/* 32-bit kernel, MMU bypass, non-constant, 64-bit value */ +#define SPARC64_LD_PHYS_NONCONST64(ld) \ + __asm volatile( \ + rdpr %%pstate,%1; \ + sllx %3,32,%0; \ + wrpr %1,8,%%pstate; \