CVS commit: src/lib/libc/time
Module Name:src Committed By: njoly Date: Thu Jun 9 12:13:00 UTC 2011 Modified Files: src/lib/libc/time: ctime.3 Log Message: Do not indent RETURN VALUES section (which was ignored because of missing dash). To generate a diff of this commit: cvs rdiff -u -r1.40 -r1.41 src/lib/libc/time/ctime.3 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/lib/libc/time/ctime.3 diff -u src/lib/libc/time/ctime.3:1.40 src/lib/libc/time/ctime.3:1.41 --- src/lib/libc/time/ctime.3:1.40 Tue Apr 12 13:46:38 2011 +++ src/lib/libc/time/ctime.3 Thu Jun 9 12:13:00 2011 @@ -1,4 +1,4 @@ -.\ $NetBSD: ctime.3,v 1.40 2011/04/12 13:46:38 jruoho Exp $ +.\ $NetBSD: ctime.3,v 1.41 2011/06/09 12:13:00 njoly Exp $ .\ .\ XXX: Lincense missing? .\ @@ -302,7 +302,7 @@ .Va tzname[1] . .El .Sh RETURN VALUES -.Bl -bullet offset indent +.Bl -bullet .It On success the .Fn asctime
CVS commit: src/usr.sbin/ndiscvt
Module Name:src Committed By: joerg Date: Thu Jun 9 13:09:42 UTC 2011 Modified Files: src/usr.sbin/ndiscvt: inf-token.l Log Message: Input function is not used To generate a diff of this commit: cvs rdiff -u -r1.8 -r1.9 src/usr.sbin/ndiscvt/inf-token.l Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/usr.sbin/ndiscvt/inf-token.l diff -u src/usr.sbin/ndiscvt/inf-token.l:1.8 src/usr.sbin/ndiscvt/inf-token.l:1.9 --- src/usr.sbin/ndiscvt/inf-token.l:1.8 Thu Oct 29 14:49:03 2009 +++ src/usr.sbin/ndiscvt/inf-token.l Thu Jun 9 13:09:42 2011 @@ -36,7 +36,7 @@ __FBSDID($FreeBSD: src/usr.sbin/ndiscvt/inf-token.l,v 1.3 2004/01/11 21:10:35 mdodd Exp $); #endif #ifdef __NetBSD__ -__RCSID($NetBSD: inf-token.l,v 1.8 2009/10/29 14:49:03 christos Exp $); +__RCSID($NetBSD: inf-token.l,v 1.9 2011/06/09 13:09:42 joerg Exp $); #endif #include regex.h @@ -71,7 +71,7 @@ %} -%option nounput +%option nounput noinput %%
CVS commit: src/sys/compat/linux/arch/alpha
Module Name:src Committed By: matt Date: Thu Jun 9 13:41:40 UTC 2011 Modified Files: src/sys/compat/linux/arch/alpha: linux_machdep.c Log Message: Adapt to change to PCU. To generate a diff of this commit: cvs rdiff -u -r1.47 -r1.48 src/sys/compat/linux/arch/alpha/linux_machdep.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/compat/linux/arch/alpha/linux_machdep.c diff -u src/sys/compat/linux/arch/alpha/linux_machdep.c:1.47 src/sys/compat/linux/arch/alpha/linux_machdep.c:1.48 --- src/sys/compat/linux/arch/alpha/linux_machdep.c:1.47 Fri Mar 4 22:25:31 2011 +++ src/sys/compat/linux/arch/alpha/linux_machdep.c Thu Jun 9 13:41:40 2011 @@ -1,4 +1,4 @@ -/* $NetBSD: linux_machdep.c,v 1.47 2011/03/04 22:25:31 joerg Exp $ */ +/* $NetBSD: linux_machdep.c,v 1.48 2011/06/09 13:41:40 matt Exp $ */ /*- * Copyright (c) 1998 The NetBSD Foundation, Inc. @@ -35,7 +35,7 @@ */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: linux_machdep.c,v 1.47 2011/03/04 22:25:31 joerg Exp $); +__KERNEL_RCSID(0, $NetBSD: linux_machdep.c,v 1.48 2011/06/09 13:41:40 matt Exp $); #include sys/param.h #include sys/systm.h @@ -154,7 +154,8 @@ frametoreg(tf, (struct reg *)sigframe.uc.uc_mcontext.sc_regs); sigframe.uc.uc_mcontext.sc_regs[R_SP] = alpha_pal_rdusp(); - alpha_enable_fp(l, 1); + fpu_load(); + alpha_pal_wrfen(1); sigframe.uc.uc_mcontext.sc_fpcr = alpha_read_fpcr(); sigframe.uc.uc_mcontext.sc_fp_control = alpha_read_fp_c(l); alpha_pal_wrfen(0);
CVS commit: src/sys/arch/arm/marvell
Module Name:src Committed By: jakllsch Date: Thu Jun 9 13:43:44 UTC 2011 Modified Files: src/sys/arch/arm/marvell: mvsoctmr.c Log Message: Rework mvsoctmr(4), improving timekeeping accuracy Inconveniently the Marvell hardware only counts down. We need to reverse this for timecounter(9), and we need to do it in a very lightweight way. - use Timer0 for the clock interrupt - use Timer1 for timecounter(9) and delay(9) - drop statclock due to lack of timers (does anyone actually use this?) To generate a diff of this commit: cvs rdiff -u -r1.1 -r1.2 src/sys/arch/arm/marvell/mvsoctmr.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/arm/marvell/mvsoctmr.c diff -u src/sys/arch/arm/marvell/mvsoctmr.c:1.1 src/sys/arch/arm/marvell/mvsoctmr.c:1.2 --- src/sys/arch/arm/marvell/mvsoctmr.c:1.1 Sun Oct 3 05:49:24 2010 +++ src/sys/arch/arm/marvell/mvsoctmr.c Thu Jun 9 13:43:44 2011 @@ -1,4 +1,4 @@ -/* $NetBSD: mvsoctmr.c,v 1.1 2010/10/03 05:49:24 kiyohara Exp $ */ +/* $NetBSD: mvsoctmr.c,v 1.2 2011/06/09 13:43:44 jakllsch Exp $ */ /* * Copyright (c) 2007, 2008 KIYOHARA Takashi * All rights reserved. @@ -25,7 +25,7 @@ * POSSIBILITY OF SUCH DAMAGE. */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: mvsoctmr.c,v 1.1 2010/10/03 05:49:24 kiyohara Exp $); +__KERNEL_RCSID(0, $NetBSD: mvsoctmr.c,v 1.2 2011/06/09 13:43:44 jakllsch Exp $); #include sys/param.h #include sys/atomic.h @@ -60,18 +60,12 @@ static void mvsoctmr_attach(device_t, device_t, void *); static int clockhandler(void *); -static int statclockhandler(void *); static u_int mvsoctmr_get_timecount(struct timecounter *); static void mvsoctmr_cntl(struct mvsoctmr_softc *, int, u_int, int, int); -#ifndef STATHZ -#define STATHZ 64 -#endif - static struct mvsoctmr_softc *mvsoctmr_sc; -static uint32_t clock_ticks, statclock_ticks; static struct timecounter mvsoctmr_timecounter = { mvsoctmr_get_timecount, /* get_timecount */ 0, /* no poll_pps */ @@ -82,7 +76,6 @@ NULL, /* prev */ NULL, /* next */ }; -static volatile uint32_t mvsoctmr_base; CFATTACH_DECL_NEW(mvsoctmr, sizeof(struct mvsoctmr_softc), mvsoctmr_match, mvsoctmr_attach, NULL, NULL); @@ -121,6 +114,9 @@ if (bus_space_subregion(mva-mva_iot, mva-mva_ioh, mva-mva_offset, mva-mva_size, sc-sc_ioh)) panic(%s: Cannot map registers, device_xname(self)); + + mvsoctmr_timecounter.tc_name = device_xname(self); + mvsoctmr_cntl(sc, MVSOCTMR_TIMER1, 0x, 1, 1); } /* @@ -133,48 +129,20 @@ { struct clockframe *frame = arg; - atomic_add_32(mvsoctmr_base, clock_ticks); - hardclock(frame); return 1; } /* - * statclockhandler: - * - * Handle the statclock interrupt. - */ -static int -statclockhandler(void *arg) -{ - struct clockframe *frame = arg; - - statclock(frame); - - return 1; -} - - -/* * setstatclockrate: * * Set the rate of the statistics clock. - * - * We assume that hz is either stathz or profhz, and that neither - * will change after being set by cpu_initclocks(). We could - * recalculate the intervals here, but that would be a pain. */ /* ARGSUSED */ void setstatclockrate(int newhz) { - struct mvsoctmr_softc *sc = mvsoctmr_sc; - const int en = 1, autoen = 1; - - statclock_ticks = mvTclk / newhz; - - mvsoctmr_cntl(sc, MVSOCTMR_TIMER1, statclock_ticks, en, autoen); } /* @@ -188,32 +156,26 @@ struct mvsoctmr_softc *sc; void *clock_ih; const int en = 1, autoen = 1; + uint32_t timer0_tval; sc = mvsoctmr_sc; if (sc == NULL) panic(cpu_initclocks: mvsoctmr not found); - stathz = profhz = STATHZ; + mvsoctmr_timecounter.tc_priv = sc; mvsoctmr_timecounter.tc_frequency = mvTclk; - clock_ticks = mvTclk / hz; - mvsoctmr_cntl(sc, MVSOCTMR_TIMER0, clock_ticks, en, autoen); + timer0_tval = (mvTclk * 2) / (u_long) hz; + timer0_tval = (timer0_tval / 2) + (timer0_tval 1); + + mvsoctmr_cntl(sc, MVSOCTMR_TIMER0, timer0_tval, en, autoen); + mvsoctmr_cntl(sc, MVSOCTMR_TIMER1, 0x, en, autoen); clock_ih = mvsoc_bridge_intr_establish(MVSOC_MLMB_MLMBI_CPUTIMER0INTREQ, IPL_CLOCK, clockhandler, NULL); if (clock_ih == NULL) panic(cpu_initclocks: unable to register timer interrupt); - if (stathz) { - setstatclockrate(stathz); - clock_ih = mvsoc_bridge_intr_establish( - MVSOC_MLMB_MLMBI_CPUTIMER1INTREQ, IPL_HIGH, - statclockhandler, NULL); - if (clock_ih == NULL) - panic(cpu_initclocks: - unable to register statclock timer interrupt); - } - tc_init(mvsoctmr_timecounter); } @@ -237,7 +199,7 @@ * counted. */ initial_tick = bus_space_read_4(sc-sc_iot, sc-sc_ioh, - MVSOCTMR_TIMER(MVSOCTMR_TIMER0)); + MVSOCTMR_TIMER(MVSOCTMR_TIMER1)); if (n = UINT_MAX / mvTclk) { /* @@ -255,9 +217,9 @@ while (remaining 0) { cur_tick = bus_space_read_4(sc-sc_iot, sc-sc_ioh, - MVSOCTMR_TIMER(MVSOCTMR_TIMER0)); +
CVS commit: src/sys/opencrypto
Module Name:src Committed By: drochner Date: Thu Jun 9 14:41:24 UTC 2011 Modified Files: src/sys/opencrypto: crypto.c cryptodev.c cryptodev.h Log Message: -if an opencrypto(9) session is allocated, the driver is refcounted and can not disappear -- no need to hold crypto_mtx to check the driver list (the whole check is questionable) -crp-crp_cv (the condition variable) is used by userland cryptodev exclusively -- move its initialization there, no need to waste cycles of in-kernel callers -add a comment which members of struct cryptop are used by opencrypto(9) and which by crypto(4) (this should be split, no need to waste memory for in-kernel callers) To generate a diff of this commit: cvs rdiff -u -r1.40 -r1.41 src/sys/opencrypto/crypto.c cvs rdiff -u -r1.66 -r1.67 src/sys/opencrypto/cryptodev.c cvs rdiff -u -r1.24 -r1.25 src/sys/opencrypto/cryptodev.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/opencrypto/crypto.c diff -u src/sys/opencrypto/crypto.c:1.40 src/sys/opencrypto/crypto.c:1.41 --- src/sys/opencrypto/crypto.c:1.40 Mon May 16 10:27:49 2011 +++ src/sys/opencrypto/crypto.c Thu Jun 9 14:41:24 2011 @@ -1,4 +1,4 @@ -/* $NetBSD: crypto.c,v 1.40 2011/05/16 10:27:49 drochner Exp $ */ +/* $NetBSD: crypto.c,v 1.41 2011/06/09 14:41:24 drochner Exp $ */ /* $FreeBSD: src/sys/opencrypto/crypto.c,v 1.4.2.5 2003/02/26 00:14:05 sam Exp $ */ /* $OpenBSD: crypto.c,v 1.41 2002/07/17 23:52:38 art Exp $ */ @@ -53,7 +53,7 @@ */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: crypto.c,v 1.40 2011/05/16 10:27:49 drochner Exp $); +__KERNEL_RCSID(0, $NetBSD: crypto.c,v 1.41 2011/06/09 14:41:24 drochner Exp $); #include sys/param.h #include sys/reboot.h @@ -720,8 +720,8 @@ int result; mutex_spin_enter(crypto_q_mtx); - DPRINTF((crypto_dispatch: crp %p, reqid 0x%x, alg %d\n, - crp, crp-crp_reqid, crp-crp_desc-crd_alg)); + DPRINTF((crypto_dispatch: crp %p, alg %d\n, + crp, crp-crp_desc-crd_alg)); cryptostats.cs_ops++; @@ -928,7 +928,6 @@ hid = CRYPTO_SESID2HID(crp-crp_sid); - mutex_enter(crypto_mtx); if (hid crypto_drivers_num) { int (*process)(void *, struct cryptop *, int); void *arg; @@ -940,7 +939,6 @@ } process = crypto_drivers[hid].cc_process; arg = crypto_drivers[hid].cc_arg; - mutex_exit(crypto_mtx); /* * Invoke the driver to process the request. @@ -958,8 +956,6 @@ for (crd = crp-crp_desc; crd-crd_next; crd = crd-crd_next) crd-CRD_INI.cri_next = (crd-crd_next-CRD_INI); - mutex_exit(crypto_mtx); - if (crypto_newsession(nid, (crp-crp_desc-CRD_INI), 0) == 0) crp-crp_sid = nid; @@ -992,7 +988,6 @@ crp-crp_desc = crd-crd_next; pool_put(cryptodesc_pool, crd); } - cv_destroy(crp-crp_cv); pool_put(cryptop_pool, crp); } @@ -1010,7 +1005,6 @@ return NULL; } memset(crp, 0, sizeof(struct cryptop)); - cv_init(crp-crp_cv, crydev); while (num--) { crd = pool_get(cryptodesc_pool, 0); Index: src/sys/opencrypto/cryptodev.c diff -u src/sys/opencrypto/cryptodev.c:1.66 src/sys/opencrypto/cryptodev.c:1.67 --- src/sys/opencrypto/cryptodev.c:1.66 Fri May 27 17:09:09 2011 +++ src/sys/opencrypto/cryptodev.c Thu Jun 9 14:41:24 2011 @@ -1,4 +1,4 @@ -/* $NetBSD: cryptodev.c,v 1.66 2011/05/27 17:09:09 drochner Exp $ */ +/* $NetBSD: cryptodev.c,v 1.67 2011/06/09 14:41:24 drochner Exp $ */ /* $FreeBSD: src/sys/opencrypto/cryptodev.c,v 1.4.2.4 2003/06/03 00:09:02 sam Exp $ */ /* $OpenBSD: cryptodev.c,v 1.53 2002/07/10 22:21:30 mickey Exp $ */ @@ -64,7 +64,7 @@ */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: cryptodev.c,v 1.66 2011/05/27 17:09:09 drochner Exp $); +__KERNEL_RCSID(0, $NetBSD: cryptodev.c,v 1.67 2011/06/09 14:41:24 drochner Exp $); #include sys/param.h #include sys/systm.h @@ -615,6 +615,8 @@ crp-crp_mac=cse-tmp_mac; } + cv_init(crp-crp_cv, crydev); + /* * XXX there was a comment here which said that we went to * XXX splcrypto() but needed to only if CRYPTO_F_CBIMM, @@ -651,6 +653,7 @@ default: DPRINTF((cryptodev_op: not waiting, error.\n)); mutex_exit(crypto_mtx); + cv_destroy(crp-crp_cv); goto bail; } @@ -667,6 +670,7 @@ (void)crypto_ret_q_remove(crp); } mutex_exit(crypto_mtx); + cv_destroy(crp-crp_cv); if (crp-crp_etype != 0) { DPRINTF((cryptodev_op: crp_etype %d\n, crp-crp_etype)); @@ -1317,6 +1321,7 @@ cnop[req].reqid = atomic_inc_32_nv((fcr-requestid)); crp-crp_reqid = cnop[req].reqid; crp-crp_usropaque = cnop[req].opaque; + cv_init(crp-crp_cv, crydev); #ifdef notyet eagain: #endif @@ -1335,10 +1340,12 @@ default: DPRINTF((cryptodev_op: not waiting, error.\n)); mutex_exit(crypto_mtx); + cv_destroy(crp-crp_cv); goto bail; } mutex_exit(crypto_mtx); + cv_destroy(crp-crp_cv); bail: if (cnop[req].status) { if (crp) { Index: src/sys/opencrypto/cryptodev.h diff -u
CVS commit: src/sys/dev/gpio
Module Name:src Committed By: joerg Date: Thu Jun 9 14:46:06 UTC 2011 Modified Files: src/sys/dev/gpio: gpio.c Log Message: Annotate that gpiobus_close's return value is undesired here To generate a diff of this commit: cvs rdiff -u -r1.33 -r1.34 src/sys/dev/gpio/gpio.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/gpio/gpio.c diff -u src/sys/dev/gpio/gpio.c:1.33 src/sys/dev/gpio/gpio.c:1.34 --- src/sys/dev/gpio/gpio.c:1.33 Sun Apr 25 11:23:34 2010 +++ src/sys/dev/gpio/gpio.c Thu Jun 9 14:46:06 2011 @@ -1,4 +1,4 @@ -/* $NetBSD: gpio.c,v 1.33 2010/04/25 11:23:34 ad Exp $ */ +/* $NetBSD: gpio.c,v 1.34 2011/06/09 14:46:06 joerg Exp $ */ /* $OpenBSD: gpio.c,v 1.6 2006/01/14 12:33:49 grange Exp $ */ /* @@ -19,7 +19,7 @@ */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: gpio.c,v 1.33 2010/04/25 11:23:34 ad Exp $); +__KERNEL_RCSID(0, $NetBSD: gpio.c,v 1.34 2011/06/09 14:46:06 joerg Exp $); /* * General Purpose Input/Output framework. @@ -362,7 +362,7 @@ sc = device_lookup_private(gpio_cd, minor(dev)); DPRINTF((%s: closing\n, device_xname(sc-sc_dev))); - gpiobus_close(sc-sc_gc, sc-sc_dev); + (void)gpiobus_close(sc-sc_gc, sc-sc_dev); sc-sc_opened = 0; return 0;
CVS commit: src/sys/dev/pci
Module Name:src Committed By: joerg Date: Thu Jun 9 14:46:33 UTC 2011 Modified Files: src/sys/dev/pci: gcscaudio.c Log Message: Use a format string when printing strings To generate a diff of this commit: cvs rdiff -u -r1.6 -r1.7 src/sys/dev/pci/gcscaudio.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/dev/pci/gcscaudio.c diff -u src/sys/dev/pci/gcscaudio.c:1.6 src/sys/dev/pci/gcscaudio.c:1.7 --- src/sys/dev/pci/gcscaudio.c:1.6 Sat Nov 13 13:52:05 2010 +++ src/sys/dev/pci/gcscaudio.c Thu Jun 9 14:46:33 2011 @@ -1,4 +1,4 @@ -/* $NetBSD: gcscaudio.c,v 1.6 2010/11/13 13:52:05 uebayasi Exp $ */ +/* $NetBSD: gcscaudio.c,v 1.7 2011/06/09 14:46:33 joerg Exp $ */ /*- * Copyright (c) 2008 SHIMIZU Ryo r...@nerv.org @@ -27,7 +27,7 @@ */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: gcscaudio.c,v 1.6 2010/11/13 13:52:05 uebayasi Exp $); +__KERNEL_RCSID(0, $NetBSD: gcscaudio.c,v 1.7 2011/06/09 14:46:33 joerg Exp $); #include sys/param.h #include sys/systm.h @@ -401,7 +401,7 @@ delay(1); if (i 0) { - aprint_error_dev(sc-sc_dev, timeout_msg); + aprint_error_dev(sc-sc_dev, %s, timeout_msg); return 1; }
CVS commit: src/sys/external/bsd/drm/dist/bsd-core
Module Name:src Committed By: joerg Date: Thu Jun 9 14:47:16 UTC 2011 Modified Files: src/sys/external/bsd/drm/dist/bsd-core: drmP.h Log Message: dma_addr_t may not be a 64bit type, so add an explicit cast here instead of silent truncation To generate a diff of this commit: cvs rdiff -u -r1.21 -r1.22 src/sys/external/bsd/drm/dist/bsd-core/drmP.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/external/bsd/drm/dist/bsd-core/drmP.h diff -u src/sys/external/bsd/drm/dist/bsd-core/drmP.h:1.21 src/sys/external/bsd/drm/dist/bsd-core/drmP.h:1.22 --- src/sys/external/bsd/drm/dist/bsd-core/drmP.h:1.21 Thu Feb 24 07:59:44 2011 +++ src/sys/external/bsd/drm/dist/bsd-core/drmP.h Thu Jun 9 14:47:15 2011 @@ -696,7 +696,7 @@ }; #ifndef DMA_BIT_MASK -#define DMA_BIT_MASK(n) (((n) == 64) ? ~0ULL : (1ULL(n)) - 1) +#define DMA_BIT_MASK(n) ((dma_addr_t)(((n) == 64) ? ~0ULL : (1ULL(n)) - 1)) #endif #define upper_32_bits(n) ((u32)(((n) 16) 16))
CVS commit: src/sys/opencrypto
Module Name:src Committed By: drochner Date: Thu Jun 9 14:47:42 UTC 2011 Modified Files: src/sys/opencrypto: gmac.c gmac.h Log Message: use 64-bit integers for GF128 multiplication on LP64 CPUs To generate a diff of this commit: cvs rdiff -u -r1.2 -r1.3 src/sys/opencrypto/gmac.c cvs rdiff -u -r1.1 -r1.2 src/sys/opencrypto/gmac.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/opencrypto/gmac.c diff -u src/sys/opencrypto/gmac.c:1.2 src/sys/opencrypto/gmac.c:1.3 --- src/sys/opencrypto/gmac.c:1.2 Wed Jun 8 10:14:16 2011 +++ src/sys/opencrypto/gmac.c Thu Jun 9 14:47:42 2011 @@ -1,4 +1,4 @@ -/* $NetBSD: gmac.c,v 1.2 2011/06/08 10:14:16 drochner Exp $ */ +/* $NetBSD: gmac.c,v 1.3 2011/06/09 14:47:42 drochner Exp $ */ /* OpenBSD: gmac.c,v 1.3 2011/01/11 15:44:23 deraadt Exp */ /* @@ -29,14 +29,14 @@ #include crypto/rijndael/rijndael.h #include opencrypto/gmac.h -void ghash_gfmul(const uint32_t *, const uint32_t *, uint32_t *); +void ghash_gfmul(const GMAC_INT *, const GMAC_INT *, GMAC_INT *); void ghash_update(GHASH_CTX *, const uint8_t *, size_t); /* Computes a block multiplication in the GF(2^128) */ void -ghash_gfmul(const uint32_t *X, const uint32_t *Y, uint32_t *product) +ghash_gfmul(const GMAC_INT *X, const GMAC_INT *Y, GMAC_INT *product) { - uint32_t v[4]; + GMAC_INT v[GMAC_BLOCK_LEN/GMAC_INTLEN]; uint32_t mul; int i; @@ -45,35 +45,51 @@ for (i = 0; i GMAC_BLOCK_LEN * 8; i++) { /* update Z */ +#if GMAC_INTLEN == 8 + if (X[i 6] (1ULL (~i 63))) { + product[0] ^= v[0]; + product[1] ^= v[1]; + } /* else: we preserve old values */ +#else if (X[i 5] (1 (~i 31))) { product[0] ^= v[0]; product[1] ^= v[1]; product[2] ^= v[2]; product[3] ^= v[3]; } /* else: we preserve old values */ - +#endif /* update V */ +#if GMAC_INTLEN == 8 + mul = v[1] 1; + v[1] = (v[0] 63) | (v[1] 1); + v[0] = (v[0] 1) ^ (0xe100ULL * mul); +#else mul = v[3] 1; v[3] = (v[2] 31) | (v[3] 1); v[2] = (v[1] 31) | (v[2] 1); v[1] = (v[0] 31) | (v[1] 1); v[0] = (v[0] 1) ^ (0xe100 * mul); +#endif } } void ghash_update(GHASH_CTX *ctx, const uint8_t *X, size_t len) { - uint32_t x; - uint32_t *s = ctx-S; - uint32_t *y = ctx-Z; - int i, j; + GMAC_INT x; + GMAC_INT *s = ctx-S; + GMAC_INT *y = ctx-Z; + int i, j, k; for (i = 0; i len / GMAC_BLOCK_LEN; i++) { - for (j = 0; j GMAC_BLOCK_LEN/4; j++) { - x = (X[0] 24) | (X[1] 16) | (X[2] 8) | X[3]; + for (j = 0; j GMAC_BLOCK_LEN/GMAC_INTLEN; j++) { + x = 0; + for (k = 0; k GMAC_INTLEN; k++) { +x = 8; +x |= X[k]; + } s[j] = y[j] ^ x; - X += 4; + X += GMAC_INTLEN; } ghash_gfmul(ctx-H, ctx-S, ctx-S); @@ -105,8 +121,13 @@ /* prepare a hash subkey */ rijndaelEncrypt(ctx-K, ctx-rounds, (void *)ctx-ghash.H, (void *)ctx-ghash.H); +#if GMAC_INTLEN == 8 + for (i = 0; i 2; i++) + ctx-ghash.H[i] = be64toh(ctx-ghash.H[i]); +#else for (i = 0; i 4; i++) ctx-ghash.H[i] = be32toh(ctx-ghash.H[i]); +#endif } void @@ -145,6 +166,20 @@ rijndaelEncrypt(ctx-K, ctx-rounds, ctx-J, keystream); k = keystream; d = digest; +#if GMAC_INTLEN == 8 + for (i = 0; i GMAC_DIGEST_LEN/8; i++) { + d[0] = (uint8_t)(ctx-ghash.S[i] 56) ^ k[0]; + d[1] = (uint8_t)(ctx-ghash.S[i] 48) ^ k[1]; + d[2] = (uint8_t)(ctx-ghash.S[i] 40) ^ k[2]; + d[3] = (uint8_t)(ctx-ghash.S[i] 32) ^ k[3]; + d[4] = (uint8_t)(ctx-ghash.S[i] 24) ^ k[4]; + d[5] = (uint8_t)(ctx-ghash.S[i] 16) ^ k[5]; + d[6] = (uint8_t)(ctx-ghash.S[i] 8) ^ k[6]; + d[7] = (uint8_t)ctx-ghash.S[i] ^ k[7]; + d += 8; + k += 8; + } +#else for (i = 0; i GMAC_DIGEST_LEN/4; i++) { d[0] = (uint8_t)(ctx-ghash.S[i] 24) ^ k[0]; d[1] = (uint8_t)(ctx-ghash.S[i] 16) ^ k[1]; @@ -153,5 +188,6 @@ d += 4; k += 4; } +#endif memset(keystream, 0, sizeof(keystream)); } Index: src/sys/opencrypto/gmac.h diff -u src/sys/opencrypto/gmac.h:1.1 src/sys/opencrypto/gmac.h:1.2 --- src/sys/opencrypto/gmac.h:1.1 Thu May 26 21:50:03 2011 +++ src/sys/opencrypto/gmac.h Thu Jun 9 14:47:42 2011 @@ -1,4 +1,4 @@ -/* $NetBSD: gmac.h,v 1.1 2011/05/26 21:50:03 drochner Exp $ */ +/* $NetBSD: gmac.h,v 1.2 2011/06/09 14:47:42 drochner Exp $ */ /* OpenBSD: gmac.h,v 1.1 2010/09/22 11:54:23 mikeb Exp */ /* @@ -25,10 +25,18 @@ #define GMAC_BLOCK_LEN 16 #define GMAC_DIGEST_LEN 16 +#ifdef _LP64 +#define GMAC_INT uint64_t +#define GMAC_INTLEN 8 +#else +#define GMAC_INT uint32_t +#define GMAC_INTLEN 4 +#endif + typedef struct _GHASH_CTX { - uint32_t H[GMAC_BLOCK_LEN/4]; /* hash subkey */ - uint32_t S[GMAC_BLOCK_LEN/4]; /* state */ - uint32_t Z[GMAC_BLOCK_LEN/4]; /* initial state */ + GMAC_INT H[GMAC_BLOCK_LEN/GMAC_INTLEN]; /* hash subkey */ + GMAC_INT S[GMAC_BLOCK_LEN/GMAC_INTLEN]; /* state */ + GMAC_INT Z[GMAC_BLOCK_LEN/GMAC_INTLEN]; /* initial state */ } GHASH_CTX; typedef struct
CVS commit: src/etc
Module Name:src Committed By: christos Date: Thu Jun 9 14:52:01 UTC 2011 Modified Files: src/etc: rc.subr Log Message: PR/42642: Ed Ravin: Handle daemons that start with #!/usr/bin/env interp To generate a diff of this commit: cvs rdiff -u -r1.86 -r1.87 src/etc/rc.subr Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/etc/rc.subr diff -u src/etc/rc.subr:1.86 src/etc/rc.subr:1.87 --- src/etc/rc.subr:1.86 Sun Sep 26 14:37:14 2010 +++ src/etc/rc.subr Thu Jun 9 10:52:01 2011 @@ -1,4 +1,4 @@ -# $NetBSD: rc.subr,v 1.86 2010/09/26 18:37:14 apb Exp $ +# $NetBSD: rc.subr,v 1.87 2011/06/09 14:52:01 christos Exp $ # # Copyright (c) 1997-2004 The NetBSD Foundation, Inc. # All rights reserved. @@ -248,10 +248,17 @@ read _interp ${_chroot:-}/$_procname # read interpreter name _interp=${_interp#\#!} # strip #! set -- $_interp + if [ $1 = /usr/bin/env ]; then + shift + set -- $(type $1) + shift $(($# - 1)) + _interp=${1##*/} $_procname + else + _interp=$* $_procname + fi if [ $_interpreter != $1 ]; then warn \$command_interpreter $_interpreter != $1 fi - _interp=$* $_procname # cleanup spaces, add _procname _interpbn=${1##*/} _fp_args='_argv' _fp_match='case $_argv in
CVS commit: src/sys/arch/arm/xscale
Module Name:src Committed By: nonaka Date: Thu Jun 9 17:29:42 UTC 2011 Modified Files: src/sys/arch/arm/xscale: pxa2x0.c pxa2x0_ac97.c pxa2x0_dmac.c pxa2x0_gpio.c pxa2x0_udc.c Log Message: - device_t/softc split. - use aprint_* function. To generate a diff of this commit: cvs rdiff -u -r1.18 -r1.19 src/sys/arch/arm/xscale/pxa2x0.c cvs rdiff -u -r1.7 -r1.8 src/sys/arch/arm/xscale/pxa2x0_ac97.c cvs rdiff -u -r1.6 -r1.7 src/sys/arch/arm/xscale/pxa2x0_dmac.c cvs rdiff -u -r1.13 -r1.14 src/sys/arch/arm/xscale/pxa2x0_gpio.c cvs rdiff -u -r1.3 -r1.4 src/sys/arch/arm/xscale/pxa2x0_udc.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/arm/xscale/pxa2x0.c diff -u src/sys/arch/arm/xscale/pxa2x0.c:1.18 src/sys/arch/arm/xscale/pxa2x0.c:1.19 --- src/sys/arch/arm/xscale/pxa2x0.c:1.18 Sun Aug 9 06:12:33 2009 +++ src/sys/arch/arm/xscale/pxa2x0.c Thu Jun 9 17:29:42 2011 @@ -1,4 +1,4 @@ -/* $NetBSD: pxa2x0.c,v 1.18 2009/08/09 06:12:33 kiyohara Exp $ */ +/* $NetBSD: pxa2x0.c,v 1.19 2011/06/09 17:29:42 nonaka Exp $ */ /* * Copyright (c) 2002, 2005 Genetec Corporation. All rights reserved. @@ -99,7 +99,7 @@ */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: pxa2x0.c,v 1.18 2009/08/09 06:12:33 kiyohara Exp $); +__KERNEL_RCSID(0, $NetBSD: pxa2x0.c,v 1.19 2011/06/09 17:29:42 nonaka Exp $); #include pxaintc.h #include pxagpio.h @@ -126,7 +126,7 @@ #include arm/xscale/xscalereg.h struct pxaip_softc { - struct device sc_dev; + device_t sc_dev; bus_space_tag_t sc_bust; bus_dma_tag_t sc_dmat; bus_space_handle_t sc_bush_clk; @@ -134,10 +134,9 @@ }; /* prototypes */ -static int pxaip_match(struct device *, struct cfdata *, void *); -static void pxaip_attach(struct device *, struct device *, void *); -static int pxaip_search(struct device *, struct cfdata *, - const int *, void *); +static int pxaip_match(device_t, cfdata_t, void *); +static void pxaip_attach(device_t, device_t, void *); +static int pxaip_search(device_t, cfdata_t, const int *, void *); static void pxaip_attach_critical(struct pxaip_softc *); static int pxaip_print(void *, const char *); @@ -154,7 +153,7 @@ #endif /* attach structures */ -CFATTACH_DECL(pxaip, sizeof(struct pxaip_softc), +CFATTACH_DECL_NEW(pxaip, sizeof(struct pxaip_softc), pxaip_match, pxaip_attach, NULL, NULL); static struct pxaip_softc *pxaip_sc; @@ -166,7 +165,7 @@ (*((volatile uint32_t *)(pxaclkman_regs + (reg static int -pxaip_match(struct device *parent, struct cfdata *match, void *aux) +pxaip_match(device_t parent, cfdata_t match, void *aux) { #if !defined(CPU_XSCALE_PXA270) @@ -190,16 +189,17 @@ } static void -pxaip_attach(struct device *parent, struct device *self, void *aux) +pxaip_attach(device_t parent, device_t self, void *aux) { - struct pxaip_softc *sc = (struct pxaip_softc *)self; + struct pxaip_softc *sc = device_private(self); int cpuclock; pxaip_sc = sc; + sc-sc_dev = self; sc-sc_bust = pxa2x0_bs_tag; sc-sc_dmat = pxa2x0_bus_dma_tag; - aprint_normal(: PXA2x0 Onchip Peripheral Bus\n); + aprint_normal(: Onchip Peripheral Bus\n); if (bus_space_map(sc-sc_bust, PXA2X0_CLKMAN_BASE, PXA2X0_CLKMAN_SIZE, 0, sc-sc_bush_clk)) @@ -234,8 +234,7 @@ } static int -pxaip_search(struct device *parent, struct cfdata *cf, - const int *ldesc, void *aux) +pxaip_search(device_t parent, cfdata_t cf, const int *ldesc, void *aux) { struct pxaip_softc *sc = aux; struct pxaip_attach_args aa; @@ -265,7 +264,7 @@ aa.pxa_addr = PXA2X0_INTCTL_BASE; aa.pxa_size = PXA2X0_INTCTL_SIZE; aa.pxa_intr = PXAIPCF_INTR_DEFAULT; - if (config_found(sc-sc_dev, aa, pxaip_print) == NULL) + if (config_found(sc-sc_dev, aa, pxaip_print) == NULL) panic(pxaip_attach_critical: failed to attach INTC!); #if NPXAGPIO 0 @@ -275,7 +274,7 @@ aa.pxa_addr = PXA2X0_GPIO_BASE; aa.pxa_size = PXA2X0_GPIO_SIZE; aa.pxa_intr = PXAIPCF_INTR_DEFAULT; - if (config_found(sc-sc_dev, aa, pxaip_print) == NULL) + if (config_found(sc-sc_dev, aa, pxaip_print) == NULL) panic(pxaip_attach_critical: failed to attach GPIO!); #endif @@ -286,7 +285,7 @@ aa.pxa_addr = PXA2X0_DMAC_BASE; aa.pxa_size = PXA2X0_DMAC_SIZE; aa.pxa_intr = PXA2X0_INT_DMA; - if (config_found(sc-sc_dev, aa, pxaip_print) == NULL) + if (config_found(sc-sc_dev, aa, pxaip_print) == NULL) panic(pxaip_attach_critical: failed to attach DMAC!); #endif } @@ -294,7 +293,7 @@ static int pxaip_print(void *aux, const char *name) { - struct pxaip_attach_args *sa = (struct pxaip_attach_args*)aux; + struct pxaip_attach_args *sa = (struct pxaip_attach_args *)aux; if (sa-pxa_addr != PXAIPCF_ADDR_DEFAULT) { aprint_normal( addr 0x%lx, sa-pxa_addr); Index: src/sys/arch/arm/xscale/pxa2x0_ac97.c diff -u src/sys/arch/arm/xscale/pxa2x0_ac97.c:1.7 src/sys/arch/arm/xscale/pxa2x0_ac97.c:1.8 ---
CVS commit: src/sys/dev/usb
Module Name:src Committed By: matt Date: Thu Jun 9 19:08:33 UTC 2011 Modified Files: src/sys/dev/usb: ehci.c files.usb ohci.c uhci.c uhub.c usb.c usb_mem.c usb_subr.c usbdi.c Log Message: Move EHCI_DEBUG, OHCI_DEBUG, UHCI_DEBUG, USB_DEBUG, UHUB_DEBUG to opt_usb.h (ya dependencies). Cleanup usb_mem.c a little more and add block tracking code. Help find corruption problems. Comment out the SPEED check for ETTF. XXX why doesn't that work right? To generate a diff of this commit: cvs rdiff -u -r1.177 -r1.178 src/sys/dev/usb/ehci.c cvs rdiff -u -r1.105 -r1.106 src/sys/dev/usb/files.usb cvs rdiff -u -r1.215 -r1.216 src/sys/dev/usb/ohci.c cvs rdiff -u -r1.238 -r1.239 src/sys/dev/usb/uhci.c cvs rdiff -u -r1.113 -r1.114 src/sys/dev/usb/uhub.c cvs rdiff -u -r1.124 -r1.125 src/sys/dev/usb/usb.c cvs rdiff -u -r1.47 -r1.48 src/sys/dev/usb/usb_mem.c cvs rdiff -u -r1.179 -r1.180 src/sys/dev/usb/usb_subr.c cvs rdiff -u -r1.131 -r1.132 src/sys/dev/usb/usbdi.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/dev/usb/ehci.c diff -u src/sys/dev/usb/ehci.c:1.177 src/sys/dev/usb/ehci.c:1.178 --- src/sys/dev/usb/ehci.c:1.177 Sat May 28 15:47:17 2011 +++ src/sys/dev/usb/ehci.c Thu Jun 9 19:08:31 2011 @@ -1,4 +1,4 @@ -/* $NetBSD: ehci.c,v 1.177 2011/05/28 15:47:17 tsutsui Exp $ */ +/* $NetBSD: ehci.c,v 1.178 2011/06/09 19:08:31 matt Exp $ */ /* * Copyright (c) 2004-2008 The NetBSD Foundation, Inc. @@ -52,10 +52,11 @@ */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: ehci.c,v 1.177 2011/05/28 15:47:17 tsutsui Exp $); +__KERNEL_RCSID(0, $NetBSD: ehci.c,v 1.178 2011/06/09 19:08:31 matt Exp $); #include ohci.h #include uhci.h +#include opt_usb.h #include sys/param.h #include sys/systm.h @@ -2270,9 +2271,10 @@ goto ret; } v = EOREAD4(sc, EHCI_PORTSC(index)); - DPRINTFN(8,(ehci_root_ctrl_start: port status=0x%04x\n, - v)); + DPRINTFN(8,(ehci_root_ctrl_start: port status=0x%04x\n, v)); + i = UPS_HIGH_SPEED; +#if 0 if (sc-sc_flags EHCIF_ETTF) { /* * If we are doing embedded transaction translation, @@ -2281,9 +2283,8 @@ * the same way as in USBSTATUS. */ i = __SHIFTOUT(v, EHCI_PS_PSPD) * UPS_LOW_SPEED; - } else { - i = UPS_HIGH_SPEED; } +#endif if (v EHCI_PS_CS) i |= UPS_CURRENT_CONNECT_STATUS; if (v EHCI_PS_PE) i |= UPS_PORT_ENABLED; if (v EHCI_PS_SUSP) i |= UPS_SUSPEND; @@ -2351,9 +2352,9 @@ * terminate the reset sequence so there's no need to * it. */ - if (!(sc-sc_flags EHCIF_ETTF)) { + v = EOREAD4(sc, port); + if (v EHCI_PS_PR) { /* Terminate reset sequence. */ -v = EOREAD4(sc, port); EOWRITE4(sc, port, v ~EHCI_PS_PR); /* Wait for HC to complete reset. */ usb_delay_ms(sc-sc_bus, Index: src/sys/dev/usb/files.usb diff -u src/sys/dev/usb/files.usb:1.105 src/sys/dev/usb/files.usb:1.106 --- src/sys/dev/usb/files.usb:1.105 Sun Mar 20 17:54:03 2011 +++ src/sys/dev/usb/files.usb Thu Jun 9 19:08:31 2011 @@ -1,4 +1,4 @@ -# $NetBSD: files.usb,v 1.105 2011/03/20 17:54:03 tsutsui Exp $ +# $NetBSD: files.usb,v 1.106 2011/06/09 19:08:31 matt Exp $ # # Config file and device description for machine-independent USB code. # Included by ports that need it. Ports that use it must provide @@ -6,6 +6,7 @@ defflag USBVERBOSE defflag opt_usb.h USB_FRAG_DMA_WORKAROUND +defflag opt_usb.h EHCI_DEBUG OHCI_DEBUG UHCI_DEBUG UHUB_DEBUG USB_DEBUG defflag opt_uvideo.h UVIDEO_DEBUG Index: src/sys/dev/usb/ohci.c diff -u src/sys/dev/usb/ohci.c:1.215 src/sys/dev/usb/ohci.c:1.216 --- src/sys/dev/usb/ohci.c:1.215 Sat May 28 15:47:17 2011 +++ src/sys/dev/usb/ohci.c Thu Jun 9 19:08:31 2011 @@ -1,4 +1,4 @@ -/* $NetBSD: ohci.c,v 1.215 2011/05/28 15:47:17 tsutsui Exp $ */ +/* $NetBSD: ohci.c,v 1.216 2011/06/09 19:08:31 matt Exp $ */ /* $FreeBSD: src/sys/dev/usb/ohci.c,v 1.22 1999/11/17 22:33:40 n_hibma Exp $ */ /* @@ -41,7 +41,9 @@ */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: ohci.c,v 1.215 2011/05/28 15:47:17 tsutsui Exp $); +__KERNEL_RCSID(0, $NetBSD: ohci.c,v 1.216 2011/06/09 19:08:31 matt Exp $); + +#include opt_usb.h #include sys/param.h #include sys/systm.h Index: src/sys/dev/usb/uhci.c diff -u src/sys/dev/usb/uhci.c:1.238 src/sys/dev/usb/uhci.c:1.239 --- src/sys/dev/usb/uhci.c:1.238 Sat May 28 15:47:17 2011 +++ src/sys/dev/usb/uhci.c Thu Jun 9 19:08:32 2011 @@ -1,4 +1,4 @@ -/* $NetBSD: uhci.c,v 1.238 2011/05/28 15:47:17 tsutsui Exp $ */ +/* $NetBSD: uhci.c,v 1.239 2011/06/09 19:08:32 matt Exp $ */ /* $FreeBSD: src/sys/dev/usb/uhci.c,v 1.33 1999/11/17 22:33:41 n_hibma Exp $ */ /* @@ -42,7 +42,9 @@ */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: uhci.c,v 1.238 2011/05/28 15:47:17 tsutsui Exp $); +__KERNEL_RCSID(0, $NetBSD: uhci.c,v 1.239 2011/06/09 19:08:32 matt Exp $); + +#include opt_usb.h #include sys/param.h #include sys/systm.h Index:
CVS commit: src/sys/arch/powerpc/include
Module Name:src Committed By: matt Date: Thu Jun 9 19:09:58 UTC 2011 Modified Files: src/sys/arch/powerpc/include: bus.h Log Message: For PPC_BOOKE, make BUS_DMA_COHERENT equal to BUS_DMA_NOCACHE. Now USB works again. (which means USB uses of bus_dmamap_sync is broken). To generate a diff of this commit: cvs rdiff -u -r1.20 -r1.21 src/sys/arch/powerpc/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/powerpc/include/bus.h diff -u src/sys/arch/powerpc/include/bus.h:1.20 src/sys/arch/powerpc/include/bus.h:1.21 --- src/sys/arch/powerpc/include/bus.h:1.20 Mon Apr 28 20:23:32 2008 +++ src/sys/arch/powerpc/include/bus.h Thu Jun 9 19:09:57 2011 @@ -1,4 +1,4 @@ -/* $NetBSD: bus.h,v 1.20 2008/04/28 20:23:32 martin Exp $ */ +/* $NetBSD: bus.h,v 1.21 2011/06/09 19:09:57 matt Exp $ */ /* $OpenBSD: bus.h,v 1.1 1997/10/13 10:53:42 pefo Exp $ */ /*- @@ -99,7 +99,7 @@ #if defined(_KERNEL_OPT) !defined(BUS_DMA_COHERENT) #include opt_ppcarch.h -#if defined(PPC_IBM4XX) +#if defined(PPC_IBM4XX) || defined(PPC_BOOKE) #define BUS_DMA_COHERENT BUS_DMA_NOCACHE #endif /* PPC_IBM4XX */ #endif /* _KERNEL_OPT !BUS_DMA_COHERENT */
CVS commit: src/sys/arch/powerpc/include/booke
Module Name:src Committed By: matt Date: Thu Jun 9 19:10:38 UTC 2011 Modified Files: src/sys/arch/powerpc/include/booke: e500reg.h Log Message: Correct definitions of USB_SNOOP registers. Add USB_CONTROL register. To generate a diff of this commit: cvs rdiff -u -r1.7 -r1.8 src/sys/arch/powerpc/include/booke/e500reg.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/powerpc/include/booke/e500reg.h diff -u src/sys/arch/powerpc/include/booke/e500reg.h:1.7 src/sys/arch/powerpc/include/booke/e500reg.h:1.8 --- src/sys/arch/powerpc/include/booke/e500reg.h:1.7 Sat May 28 05:23:08 2011 +++ src/sys/arch/powerpc/include/booke/e500reg.h Thu Jun 9 19:10:37 2011 @@ -1,4 +1,4 @@ -/* $NetBSD: e500reg.h,v 1.7 2011/05/28 05:23:08 matt Exp $ */ +/* $NetBSD: e500reg.h,v 1.8 2011/06/09 19:10:37 matt Exp $ */ /*- * Copyright (c) 2010, 2011 The NetBSD Foundation, Inc. * All rights reserved. @@ -277,11 +277,13 @@ #define USB1_BASE 0x22100 /* MPC8536 */ #define USB2_BASE 0x23100 /* MPC8536 */ #define USB3_BASE 0x2b100 /* MPC8536 */ +#define USB_SNOOP1 0x0300 /* DMA Snooping Register 1 */ +#define USB_SNOOP2 0x0304 /* DMA Snooping Register 2 */ +#define USB_CONTROL 0x0400 /* USB General Purpose Register */ +#define USB_EN __PPCBIT(29) +#define USB_ULPI_INT_EN __PPCBIT(31) #define USB_SIZE 0x00f00 -#define USB_SNOOP1 0x400 -#define USB_SNOOP2 0x404 - #define SNOOP_2GB 0x1e #define ETSEC1_BASE 0x24000
CVS commit: src/sys/arch/powerpc/include/booke
Module Name:src Committed By: matt Date: Thu Jun 9 19:11:06 UTC 2011 Modified Files: src/sys/arch/powerpc/include/booke: etsecreg.h Log Message: Fix ATTR register definitions To generate a diff of this commit: cvs rdiff -u -r1.2 -r1.3 src/sys/arch/powerpc/include/booke/etsecreg.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/powerpc/include/booke/etsecreg.h diff -u src/sys/arch/powerpc/include/booke/etsecreg.h:1.2 src/sys/arch/powerpc/include/booke/etsecreg.h:1.3 --- src/sys/arch/powerpc/include/booke/etsecreg.h:1.2 Tue Jan 18 01:02:54 2011 +++ src/sys/arch/powerpc/include/booke/etsecreg.h Thu Jun 9 19:11:06 2011 @@ -1,4 +1,4 @@ -/* $NetBSD: etsecreg.h,v 1.2 2011/01/18 01:02:54 matt Exp $ */ +/* $NetBSD: etsecreg.h,v 1.3 2011/06/09 19:11:06 matt Exp $ */ /*- * Copyright (c) 2010, 2011 The NetBSD Foundation, Inc. * All rights reserved. @@ -515,13 +515,13 @@ /* 0xb00-0xbff DMA system registers */ #define ATTR 0xBF8 /* Attribute register */ -#define ATTR_ELCWR __PPCBITS(17,18) -#define ATTR_ELCWR_L2 __SHIFTIN(2, ATTR_ELCWR) -#define ATTR_BDCWR __PPCBITS(20,21) -#define ATTR_BDCWR_L2 __SHIFTIN(2, ATTR_BDCWR) +#define ATTR_ELCWT __PPCBITS(17,18) +#define ATTR_ELCWT_L2 __SHIFTIN(2, ATTR_ELCWT) +#define ATTR_BDLWT __PPCBITS(20,21) +#define ATTR_BDLWT_L2 __SHIFTIN(2, ATTR_BDLWT) #define ATTR_RDSEN __PPCBIT(24) #define ATTR_RBDSEN __PPCBIT(25) -#define ATTR_DEFAULT (ATTR_ELCWR_L2|ATTR_BDCWR_L2|ATTR_RDSEND|ATTR_RBDSEN) +#define ATTR_DEFAULT (ATTR_ELCWT_L2|ATTR_BDLWT_L2|ATTR_RDSEN|ATTR_RBDSEN) #define ATTRELI 0xBFC /* Attribute extract length and extract index register [TSEC3] */ #define ATTRELI_EL __PPCBITS(2,12) /* extracted length */
CVS commit: src/sys
Module Name:src Committed By: drochner Date: Thu Jun 9 19:54:18 UTC 2011 Modified Files: src/sys/net: pfkeyv2.h src/sys/netipsec: ipsec.c ipsec.h ipsec6.h key.c key.h Log Message: more const To generate a diff of this commit: cvs rdiff -u -r1.29 -r1.30 src/sys/net/pfkeyv2.h cvs rdiff -u -r1.54 -r1.55 src/sys/netipsec/ipsec.c cvs rdiff -u -r1.28 -r1.29 src/sys/netipsec/ipsec.h cvs rdiff -u -r1.12 -r1.13 src/sys/netipsec/ipsec6.h cvs rdiff -u -r1.72 -r1.73 src/sys/netipsec/key.c cvs rdiff -u -r1.10 -r1.11 src/sys/netipsec/key.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/net/pfkeyv2.h diff -u src/sys/net/pfkeyv2.h:1.29 src/sys/net/pfkeyv2.h:1.30 --- src/sys/net/pfkeyv2.h:1.29 Thu May 26 21:50:02 2011 +++ src/sys/net/pfkeyv2.h Thu Jun 9 19:54:18 2011 @@ -1,4 +1,4 @@ -/* $NetBSD: pfkeyv2.h,v 1.29 2011/05/26 21:50:02 drochner Exp $ */ +/* $NetBSD: pfkeyv2.h,v 1.30 2011/06/09 19:54:18 drochner Exp $ */ /* $KAME: pfkeyv2.h,v 1.36 2003/07/25 09:33:37 itojun Exp $ */ /* @@ -430,11 +430,11 @@ /* Utilities */ #define PFKEY_ALIGN8(a) (1 + (((a) - 1) | (8 - 1))) #define PFKEY_EXTLEN(msg) \ - PFKEY_UNUNIT64(((struct sadb_ext *)(void *)(msg))-sadb_ext_len) + PFKEY_UNUNIT64(((const struct sadb_ext *)(const void *)(msg))-sadb_ext_len) #define PFKEY_ADDR_PREFIX(ext) \ - (((struct sadb_address *)(void *)(ext))-sadb_address_prefixlen) + (((const struct sadb_address *)(const void *)(ext))-sadb_address_prefixlen) #define PFKEY_ADDR_PROTO(ext) \ - (((struct sadb_address *)(void *)(ext))-sadb_address_proto) + (((const struct sadb_address *)(const void *)(ext))-sadb_address_proto) #define PFKEY_ADDR_SADDR(ext) \ ((struct sockaddr *)(void *)((char *)(void *)(ext) + \ sizeof(struct sadb_address))) Index: src/sys/netipsec/ipsec.c diff -u src/sys/netipsec/ipsec.c:1.54 src/sys/netipsec/ipsec.c:1.55 --- src/sys/netipsec/ipsec.c:1.54 Wed Jun 8 16:24:50 2011 +++ src/sys/netipsec/ipsec.c Thu Jun 9 19:54:18 2011 @@ -1,4 +1,4 @@ -/* $NetBSD: ipsec.c,v 1.54 2011/06/08 16:24:50 dyoung Exp $ */ +/* $NetBSD: ipsec.c,v 1.55 2011/06/09 19:54:18 drochner Exp $ */ /* $FreeBSD: /usr/local/www/cvsroot/FreeBSD/src/sys/netipsec/ipsec.c,v 1.2.2.2 2003/07/01 01:38:13 sam Exp $ */ /* $KAME: ipsec.c,v 1.103 2001/05/24 07:14:18 sakane Exp $ */ @@ -32,7 +32,7 @@ */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: ipsec.c,v 1.54 2011/06/08 16:24:50 dyoung Exp $); +__KERNEL_RCSID(0, $NetBSD: ipsec.c,v 1.55 2011/06/09 19:54:18 drochner Exp $); /* * IPsec controller part. @@ -242,11 +242,11 @@ #endif static void ipsec_delpcbpolicy (struct inpcbpolicy *); static struct secpolicy *ipsec_deepcopy_policy (const struct secpolicy *); -static int ipsec_set_policy (struct secpolicy **,int , void *, size_t , -kauth_cred_t ); +static int ipsec_set_policy (struct secpolicy **, int, const void *, size_t, +kauth_cred_t); static int ipsec_get_policy (struct secpolicy *, struct mbuf **); static void vshiftl (unsigned char *, int, int); -static size_t ipsec_hdrsiz (struct secpolicy *); +static size_t ipsec_hdrsiz (const struct secpolicy *); #ifdef __NetBSD__ /* @@ -481,7 +481,7 @@ * NOTE: IPv6 mapped address concern is implemented here. */ struct secpolicy * -ipsec_getpolicy(struct tdb_ident *tdbi, u_int dir) +ipsec_getpolicy(const struct tdb_ident *tdbi, u_int dir) { struct secpolicy *sp; @@ -785,7 +785,7 @@ #endif /* INET6 */ static int -ipsec4_setspidx_inpcb(struct mbuf *m ,struct inpcb *pcb) +ipsec4_setspidx_inpcb(struct mbuf *m, struct inpcb *pcb) { int error; @@ -1224,7 +1224,7 @@ ipsec_deepcopy_policy(const struct secpolicy *src) { struct ipsecrequest *newchain = NULL; - struct ipsecrequest *p; + const struct ipsecrequest *p; struct ipsecrequest **q; struct ipsecrequest *r; struct secpolicy *dst; @@ -1268,10 +1268,9 @@ return dst; fail: - for (p = newchain; p; p = r) { - r = p-next; - free(p, M_SECA); - p = NULL; + for (q = newchain; *q; q = r) { + r = (*q)-next; + free(*q, M_SECA); } return NULL; } @@ -1281,12 +1280,12 @@ ipsec_set_policy( struct secpolicy **pcb_sp, int optname, - void *request, + const void *request, size_t len, kauth_cred_t cred ) { - struct sadb_x_policy *xpl; + const struct sadb_x_policy *xpl; struct secpolicy *newsp = NULL; int error; @@ -1295,11 +1294,11 @@ return EINVAL; if (len sizeof(*xpl)) return EINVAL; - xpl = (struct sadb_x_policy *)request; + xpl = (const struct sadb_x_policy *)request; KEYDEBUG(KEYDEBUG_IPSEC_DUMP, printf(ipsec_set_policy: passed policy\n); - kdebug_sadb_x_policy((struct sadb_ext *)xpl)); + kdebug_sadb_x_policy((const struct sadb_ext *)xpl)); /* check policy type */ /* ipsec_set_policy() accepts IPSEC, ENTRUST and BYPASS. */ @@ -1354,10 +1353,10 @@ } int -ipsec4_set_policy(struct inpcb *inp, int optname ,void *request, +ipsec4_set_policy(struct inpcb
CVS commit: src/sbin
Module Name:src Committed By: christos Date: Thu Jun 9 19:57:53 UTC 2011 Modified Files: src/sbin/fsck: fsutil.c fsutil.h src/sbin/fsck_ext2fs: extern.h main.c utilities.c src/sbin/fsck_ffs: extern.h main.c pass1.c pass2.c setup.c utilities.c src/sbin/fsck_lfs: extern.h main.c utilities.c src/sbin/fsdb: fsdb.c Log Message: share more code. To generate a diff of this commit: cvs rdiff -u -r1.19 -r1.20 src/sbin/fsck/fsutil.c cvs rdiff -u -r1.15 -r1.16 src/sbin/fsck/fsutil.h cvs rdiff -u -r1.6 -r1.7 src/sbin/fsck_ext2fs/extern.h cvs rdiff -u -r1.36 -r1.37 src/sbin/fsck_ext2fs/main.c cvs rdiff -u -r1.21 -r1.22 src/sbin/fsck_ext2fs/utilities.c cvs rdiff -u -r1.26 -r1.27 src/sbin/fsck_ffs/extern.h cvs rdiff -u -r1.78 -r1.79 src/sbin/fsck_ffs/main.c cvs rdiff -u -r1.47 -r1.48 src/sbin/fsck_ffs/pass1.c cvs rdiff -u -r1.46 -r1.47 src/sbin/fsck_ffs/pass2.c cvs rdiff -u -r1.92 -r1.93 src/sbin/fsck_ffs/setup.c cvs rdiff -u -r1.59 -r1.60 src/sbin/fsck_ffs/utilities.c cvs rdiff -u -r1.8 -r1.9 src/sbin/fsck_lfs/extern.h cvs rdiff -u -r1.42 -r1.43 src/sbin/fsck_lfs/main.c cvs rdiff -u -r1.30 -r1.31 src/sbin/fsck_lfs/utilities.c cvs rdiff -u -r1.39 -r1.40 src/sbin/fsdb/fsdb.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sbin/fsck/fsutil.c diff -u src/sbin/fsck/fsutil.c:1.19 src/sbin/fsck/fsutil.c:1.20 --- src/sbin/fsck/fsutil.c:1.19 Thu Feb 4 18:55:42 2010 +++ src/sbin/fsck/fsutil.c Thu Jun 9 15:57:50 2011 @@ -1,4 +1,4 @@ -/* $NetBSD: fsutil.c,v 1.19 2010/02/04 23:55:42 christos Exp $ */ +/* $NetBSD: fsutil.c,v 1.20 2011/06/09 19:57:50 christos Exp $ */ /* * Copyright (c) 1990, 1993 @@ -31,7 +31,7 @@ #include sys/cdefs.h #ifndef lint -__RCSID($NetBSD: fsutil.c,v 1.19 2010/02/04 23:55:42 christos Exp $); +__RCSID($NetBSD: fsutil.c,v 1.20 2011/06/09 19:57:50 christos Exp $); #endif /* not lint */ #include sys/param.h @@ -42,6 +42,8 @@ #include stdarg.h #include errno.h #include fstab.h +#include fcntl.h +#include unistd.h #include err.h #include sys/types.h @@ -256,3 +258,44 @@ (void)snprintf(b, sizeof(b), %lld , (long long)t); return b; } + + +void +catch(int n) +{ + if (ckfinish) (*ckfinish)(0); + _exit(FSCK_EXIT_SIGNALLED); +} + +/* + * When preening, allow a single quit to signal + * a special exit after filesystem checks complete + * so that reboot sequence may be interrupted. + */ +void +catchquit(int n) +{ + static const char msg[] = + returning to single-user after filesystem check\n; + int serrno = errno; + + (void)write(STDOUT_FILENO, msg, sizeof(msg) - 1); + returntosingle = 1; + (void)signal(SIGQUIT, SIG_DFL); + errno = serrno; +} + +/* + * Ignore a single quit signal; wait and flush just in case. + * Used by child processes in preen. + */ +void +voidquit(int n) +{ + int serrno = errno; + + sleep(1); + (void)signal(SIGQUIT, SIG_IGN); + (void)signal(SIGQUIT, SIG_DFL); + errno = serrno; +} Index: src/sbin/fsck/fsutil.h diff -u src/sbin/fsck/fsutil.h:1.15 src/sbin/fsck/fsutil.h:1.16 --- src/sbin/fsck/fsutil.h:1.15 Thu Feb 4 18:55:42 2010 +++ src/sbin/fsck/fsutil.h Thu Jun 9 15:57:50 2011 @@ -1,4 +1,4 @@ -/* $NetBSD: fsutil.h,v 1.15 2010/02/04 23:55:42 christos Exp $ */ +/* $NetBSD: fsutil.h,v 1.16 2011/06/09 19:57:50 christos Exp $ */ /* * Copyright (c) 1996 Christos Zoulas. All rights reserved. @@ -56,3 +56,9 @@ struct fstab; int checkfstab(int, int, void *(*)(struct fstab *), int (*) (const char *, const char *, const char *, void *, pid_t *)); + +void (*ckfinish)(int); +volatile sig_atomic_t returntosingle; +void catch(int); +void catchquit(int); +void voidquit(int); Index: src/sbin/fsck_ext2fs/extern.h diff -u src/sbin/fsck_ext2fs/extern.h:1.6 src/sbin/fsck_ext2fs/extern.h:1.7 --- src/sbin/fsck_ext2fs/extern.h:1.6 Sun Jun 26 19:01:39 2005 +++ src/sbin/fsck_ext2fs/extern.h Thu Jun 9 15:57:50 2011 @@ -1,4 +1,4 @@ -/* $NetBSD: extern.h,v 1.6 2005/06/26 23:01:39 christos Exp $ */ +/* $NetBSD: extern.h,v 1.7 2011/06/09 19:57:50 christos Exp $ */ /* * Copyright (c) 1997 Manuel Bouyer. @@ -71,6 +71,3 @@ void resetinodebuf(void); int setup(const char *); struct ext2fs_dinode * getnextinode(ino_t); -void catch(int); -void catchquit(int); -void voidquit(int); Index: src/sbin/fsck_ext2fs/main.c diff -u src/sbin/fsck_ext2fs/main.c:1.36 src/sbin/fsck_ext2fs/main.c:1.37 --- src/sbin/fsck_ext2fs/main.c:1.36 Wed Jan 6 20:39:56 2010 +++ src/sbin/fsck_ext2fs/main.c Thu Jun 9 15:57:51 2011 @@ -1,4 +1,4 @@ -/* $NetBSD: main.c,v 1.36 2010/01/07 01:39:56 christos Exp $ */ +/* $NetBSD: main.c,v 1.37 2011/06/09 19:57:51 christos Exp $ */ /* * Copyright (c) 1980, 1986, 1993 @@ -63,7 +63,7 @@ #if 0 static char sccsid[] = @(#)main.c 8.2 (Berkeley) 1/23/94; #else -__RCSID($NetBSD: main.c,v 1.36 2010/01/07 01:39:56 christos Exp $); +__RCSID($NetBSD: main.c,v 1.37 2011/06/09 19:57:51 christos Exp $); #endif #endif
CVS commit: src/sys/netipsec
Module Name:src Committed By: drochner Date: Thu Jun 9 21:04:37 UTC 2011 Modified Files: src/sys/netipsec: ipsec_output.c Log Message: catch a case where an ip6 address with scope embedded was compared with one without -- interestingly this didn't break the connection but just caused a useless encapsulation (this code needs to be rearranged to get it clean) To generate a diff of this commit: cvs rdiff -u -r1.35 -r1.36 src/sys/netipsec/ipsec_output.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/netipsec/ipsec_output.c diff -u src/sys/netipsec/ipsec_output.c:1.35 src/sys/netipsec/ipsec_output.c:1.36 --- src/sys/netipsec/ipsec_output.c:1.35 Tue Jun 7 15:54:57 2011 +++ src/sys/netipsec/ipsec_output.c Thu Jun 9 21:04:37 2011 @@ -1,4 +1,4 @@ -/* $NetBSD: ipsec_output.c,v 1.35 2011/06/07 15:54:57 drochner Exp $ */ +/* $NetBSD: ipsec_output.c,v 1.36 2011/06/09 21:04:37 drochner Exp $ */ /*- * Copyright (c) 2002, 2003 Sam Leffler, Errno Consulting @@ -29,7 +29,7 @@ */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: ipsec_output.c,v 1.35 2011/06/07 15:54:57 drochner Exp $); +__KERNEL_RCSID(0, $NetBSD: ipsec_output.c,v 1.36 2011/06/09 21:04:37 drochner Exp $); /* * IPsec output processing. @@ -632,6 +632,18 @@ #endif #ifdef INET6 +static int +in6_sa_equal_addrwithscope(const struct sockaddr_in6 *sa, const struct in6_addr *ia) +{ + struct in6_addr ia2; + + memcpy(ia2, sa-sin6_addr, sizeof(ia2)); + if (IN6_IS_SCOPE_LINKLOCAL(sa-sin6_addr)) + ia2.s6_addr16[1] = htons(sa-sin6_scope_id); + + return IN6_ARE_ADDR_EQUAL(ia, ia2); +} + int ipsec6_process_packet( struct mbuf *m, @@ -673,7 +685,7 @@ dst-sa.sa_family != AF_INET6 ||/* PF mismatch */ ((dst-sa.sa_family == AF_INET6) (!IN6_IS_ADDR_UNSPECIFIED(dst-sin6.sin6_addr)) - (!IN6_ARE_ADDR_EQUAL(dst-sin6.sin6_addr, + (!in6_sa_equal_addrwithscope(dst-sin6, ip6-ip6_dst { struct mbuf *mp;
CVS commit: src/sbin
Module Name:src Committed By: christos Date: Thu Jun 9 21:23:30 UTC 2011 Modified Files: src/sbin/fsck: fsutil.h src/sbin/fsck_msdos: main.c src/sbin/fsdb: fsdb.c Log Message: fix compilation. To generate a diff of this commit: cvs rdiff -u -r1.16 -r1.17 src/sbin/fsck/fsutil.h cvs rdiff -u -r1.22 -r1.23 src/sbin/fsck_msdos/main.c cvs rdiff -u -r1.40 -r1.41 src/sbin/fsdb/fsdb.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sbin/fsck/fsutil.h diff -u src/sbin/fsck/fsutil.h:1.16 src/sbin/fsck/fsutil.h:1.17 --- src/sbin/fsck/fsutil.h:1.16 Thu Jun 9 15:57:50 2011 +++ src/sbin/fsck/fsutil.h Thu Jun 9 17:23:29 2011 @@ -1,4 +1,4 @@ -/* $NetBSD: fsutil.h,v 1.16 2011/06/09 19:57:50 christos Exp $ */ +/* $NetBSD: fsutil.h,v 1.17 2011/06/09 21:23:29 christos Exp $ */ /* * Copyright (c) 1996 Christos Zoulas. All rights reserved. @@ -25,6 +25,7 @@ */ #include stdarg.h +#include signal.h void errexit(const char *, ...) __attribute__((__noreturn__,__format__(__printf__,1,2))); Index: src/sbin/fsck_msdos/main.c diff -u src/sbin/fsck_msdos/main.c:1.22 src/sbin/fsck_msdos/main.c:1.23 --- src/sbin/fsck_msdos/main.c:1.22 Sun Apr 11 04:23:52 2010 +++ src/sbin/fsck_msdos/main.c Thu Jun 9 17:23:29 2011 @@ -1,4 +1,4 @@ -/* $NetBSD: main.c,v 1.22 2010/04/11 08:23:52 hannken Exp $ */ +/* $NetBSD: main.c,v 1.23 2011/06/09 21:23:29 christos Exp $ */ /* * Copyright (C) 1995 Wolfgang Solfrank @@ -28,7 +28,7 @@ #include sys/cdefs.h #ifndef lint -__RCSID($NetBSD: main.c,v 1.22 2010/04/11 08:23:52 hannken Exp $); +__RCSID($NetBSD: main.c,v 1.23 2011/06/09 21:23:29 christos Exp $); #endif /* not lint */ #include stdlib.h @@ -61,12 +61,6 @@ exit(FSCK_EXIT_USAGE); } -static void -catch(int n) -{ - exit(FSCK_EXIT_SIGNALLED); -} - int main(int argc, char **argv) { Index: src/sbin/fsdb/fsdb.c diff -u src/sbin/fsdb/fsdb.c:1.40 src/sbin/fsdb/fsdb.c:1.41 --- src/sbin/fsdb/fsdb.c:1.40 Thu Jun 9 15:57:53 2011 +++ src/sbin/fsdb/fsdb.c Thu Jun 9 17:23:30 2011 @@ -1,4 +1,4 @@ -/* $NetBSD: fsdb.c,v 1.40 2011/06/09 19:57:53 christos Exp $ */ +/* $NetBSD: fsdb.c,v 1.41 2011/06/09 21:23:30 christos Exp $ */ /*- * Copyright (c) 1996 The NetBSD Foundation, Inc. @@ -31,7 +31,7 @@ #include sys/cdefs.h #ifndef lint -__RCSID($NetBSD: fsdb.c,v 1.40 2011/06/09 19:57:53 christos Exp $); +__RCSID($NetBSD: fsdb.c,v 1.41 2011/06/09 21:23:30 christos Exp $); #endif /* not lint */ #include sys/types.h @@ -139,7 +139,7 @@ sblock-fs_clean = 0; /* mark it dirty */ sbdirty(); markclean = 0; - ckfini(); + ckfini(1); printf(*** FILE SYSTEM MARKED DIRTY\n); printf(*** BE SURE TO RUN FSCK TO CLEAN UP ANY DAMAGE\n); printf(*** IF IT WAS MOUNTED, RE-MOUNT WITH -u -o reload\n);
CVS commit: othersrc/external/bsd/iscsi/sys/dev/iscsi
Module Name:othersrc Committed By: riz Date: Thu Jun 9 22:08:20 UTC 2011 Modified Files: othersrc/external/bsd/iscsi/sys/dev/iscsi: iscsi.h iscsi_globals.h iscsi_ioctl.c iscsi_ioctl.h iscsi_main.c iscsi_perf.h iscsi_rcv.c iscsi_send.c iscsi_test.c iscsi_test.h iscsi_testlocal.h iscsi_text.c iscsi_utils.c Log Message: CADDR_T - void * boolean_t - bool struct device * - device_t struct cfdata * - caddr_t CFATTACH_DECL - CFATTACH_DECL_NEW To generate a diff of this commit: cvs rdiff -u -r1.1.1.1 -r1.2 \ othersrc/external/bsd/iscsi/sys/dev/iscsi/iscsi.h \ othersrc/external/bsd/iscsi/sys/dev/iscsi/iscsi_ioctl.h \ othersrc/external/bsd/iscsi/sys/dev/iscsi/iscsi_perf.h \ othersrc/external/bsd/iscsi/sys/dev/iscsi/iscsi_rcv.c \ othersrc/external/bsd/iscsi/sys/dev/iscsi/iscsi_test.c \ othersrc/external/bsd/iscsi/sys/dev/iscsi/iscsi_test.h \ othersrc/external/bsd/iscsi/sys/dev/iscsi/iscsi_testlocal.h cvs rdiff -u -r1.2 -r1.3 \ othersrc/external/bsd/iscsi/sys/dev/iscsi/iscsi_globals.h \ othersrc/external/bsd/iscsi/sys/dev/iscsi/iscsi_send.c \ othersrc/external/bsd/iscsi/sys/dev/iscsi/iscsi_text.c \ othersrc/external/bsd/iscsi/sys/dev/iscsi/iscsi_utils.c cvs rdiff -u -r1.3 -r1.4 \ othersrc/external/bsd/iscsi/sys/dev/iscsi/iscsi_ioctl.c \ othersrc/external/bsd/iscsi/sys/dev/iscsi/iscsi_main.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: othersrc/external/bsd/iscsi/sys/dev/iscsi/iscsi.h diff -u othersrc/external/bsd/iscsi/sys/dev/iscsi/iscsi.h:1.1.1.1 othersrc/external/bsd/iscsi/sys/dev/iscsi/iscsi.h:1.2 --- othersrc/external/bsd/iscsi/sys/dev/iscsi/iscsi.h:1.1.1.1 Mon May 2 07:01:09 2011 +++ othersrc/external/bsd/iscsi/sys/dev/iscsi/iscsi.h Thu Jun 9 22:08:19 2011 @@ -1,4 +1,4 @@ -/* $NetBSD: iscsi.h,v 1.1.1.1 2011/05/02 07:01:09 agc Exp $ */ +/* $NetBSD: iscsi.h,v 1.2 2011/06/09 22:08:19 riz Exp $ */ /*- * Copyright (c) 2004,2006,2011 The NetBSD Foundation, Inc. @@ -214,11 +214,4 @@ #define ISCSID_STATUS_INVALID_INITIATOR_ID 1115 /* Initiator ID not found */ #define ISCSID_STATUS_INITIATOR_BIND_ERROR 1116 /* Bind to initiator portal failed */ -#if (__NetBSD_Version__ 5) -#define CADDR_T void * -#else -#define CADDR_T caddr_t -#endif - - #endif /* !_ISCSI_H */ Index: othersrc/external/bsd/iscsi/sys/dev/iscsi/iscsi_ioctl.h diff -u othersrc/external/bsd/iscsi/sys/dev/iscsi/iscsi_ioctl.h:1.1.1.1 othersrc/external/bsd/iscsi/sys/dev/iscsi/iscsi_ioctl.h:1.2 --- othersrc/external/bsd/iscsi/sys/dev/iscsi/iscsi_ioctl.h:1.1.1.1 Mon May 2 07:01:11 2011 +++ othersrc/external/bsd/iscsi/sys/dev/iscsi/iscsi_ioctl.h Thu Jun 9 22:08:19 2011 @@ -1,4 +1,4 @@ -/* $NetBSD: iscsi_ioctl.h,v 1.1.1.1 2011/05/02 07:01:11 agc Exp $ */ +/* $NetBSD: iscsi_ioctl.h,v 1.2 2011/06/09 22:08:19 riz Exp $ */ /*- * Copyright (c) 2004,2005,2006,2011 The NetBSD Foundation, Inc. @@ -66,11 +66,11 @@ uint16_t DefaultTime2Wait; uint16_t DefaultTime2Retain; uint16_t ErrorRecoveryLevel; - CADDR_T user_name; - CADDR_T password; - CADDR_T target_password; - CADDR_T TargetName; - CADDR_T TargetAlias; + void *user_name; + void *password; + void *target_password; + void *TargetName; + void *TargetAlias; } iscsi_login_parameters_t; /* @@ -234,7 +234,7 @@ u_long timeout; uint8_t cmd[16]; uint8_t cmdlen; - CADDR_T databuf; + void * databuf; u_long datalen; u_long datalen_used; uint8_t sense[SENSEBUFLEN]; @@ -281,7 +281,7 @@ typedef struct { uint32_t status; uint32_t session_id; - CADDR_T response_buffer; + void *response_buffer; uint32_t response_size; uint32_t response_used; uint32_t response_total; Index: othersrc/external/bsd/iscsi/sys/dev/iscsi/iscsi_perf.h diff -u othersrc/external/bsd/iscsi/sys/dev/iscsi/iscsi_perf.h:1.1.1.1 othersrc/external/bsd/iscsi/sys/dev/iscsi/iscsi_perf.h:1.2 --- othersrc/external/bsd/iscsi/sys/dev/iscsi/iscsi_perf.h:1.1.1.1 Mon May 2 07:01:11 2011 +++ othersrc/external/bsd/iscsi/sys/dev/iscsi/iscsi_perf.h Thu Jun 9 22:08:19 2011 @@ -1,4 +1,4 @@ -/* $NetBSD: iscsi_perf.h,v 1.1.1.1 2011/05/02 07:01:11 agc Exp $ */ +/* $NetBSD: iscsi_perf.h,v 1.2 2011/06/09 22:08:19 riz Exp $ */ /*- * Copyright (c) 2005,2006,2011 The NetBSD Foundation, Inc. @@ -105,7 +105,7 @@ typedef struct { - CADDR_T buffer;/* in: buffer pointer */ + void *buffer;/* in: buffer pointer */ uint32_t buffersize; /* in: size of buffer in bytes (0 to query size) */ uint32_t status; /* out: status */ int num_elements; /* out: number of elements written */ Index: othersrc/external/bsd/iscsi/sys/dev/iscsi/iscsi_rcv.c diff -u othersrc/external/bsd/iscsi/sys/dev/iscsi/iscsi_rcv.c:1.1.1.1 othersrc/external/bsd/iscsi/sys/dev/iscsi/iscsi_rcv.c:1.2 --- othersrc/external/bsd/iscsi/sys/dev/iscsi/iscsi_rcv.c:1.1.1.1
CVS commit: src/sys/net
Module Name:src Committed By: christos Date: Fri Jun 10 00:10:35 UTC 2011 Modified Files: src/sys/net: bpf.c Log Message: setting things once is enough. To generate a diff of this commit: cvs rdiff -u -r1.164 -r1.165 src/sys/net/bpf.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/net/bpf.c diff -u src/sys/net/bpf.c:1.164 src/sys/net/bpf.c:1.165 --- src/sys/net/bpf.c:1.164 Wed Mar 30 17:34:08 2011 +++ src/sys/net/bpf.c Thu Jun 9 20:10:35 2011 @@ -1,4 +1,4 @@ -/* $NetBSD: bpf.c,v 1.164 2011/03/30 21:34:08 christos Exp $ */ +/* $NetBSD: bpf.c,v 1.165 2011/06/10 00:10:35 christos Exp $ */ /* * Copyright (c) 1990, 1991, 1993 @@ -39,7 +39,7 @@ */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: bpf.c,v 1.164 2011/03/30 21:34:08 christos Exp $); +__KERNEL_RCSID(0, $NetBSD: bpf.c,v 1.165 2011/06/10 00:10:35 christos Exp $); #if defined(_KERNEL_OPT) #include opt_bpf.h @@ -1863,7 +1863,6 @@ #define BPF_EXT(field) dpe.bde_ ## field = dp-bd_ ## field BPF_EXT(bufsize); BPF_EXT(promisc); - BPF_EXT(promisc); BPF_EXT(state); BPF_EXT(immediate); BPF_EXT(hdrcmplt);
CVS commit: src/sys/rump/dev/lib/libusb/opt
Module Name:src Committed By: matt Date: Fri Jun 10 00:32:52 UTC 2011 Added Files: src/sys/rump/dev/lib/libusb/opt: opt_usb.h Log Message: Appease rump. To generate a diff of this commit: cvs rdiff -u -r0 -r1.1 src/sys/rump/dev/lib/libusb/opt/opt_usb.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Added files: Index: src/sys/rump/dev/lib/libusb/opt/opt_usb.h diff -u /dev/null src/sys/rump/dev/lib/libusb/opt/opt_usb.h:1.1 --- /dev/null Fri Jun 10 00:32:52 2011 +++ src/sys/rump/dev/lib/libusb/opt/opt_usb.h Fri Jun 10 00:32:52 2011 @@ -0,0 +1,2 @@ +/* $NetBSD: opt_usb.h,v 1.1 2011/06/10 00:32:52 matt Exp $ */ +
CVS commit: xsrc/external/mit/xf86-video-suncg6/dist/src
Module Name:xsrc Committed By: macallan Date: Fri Jun 10 01:38:31 UTC 2011 Modified Files: xsrc/external/mit/xf86-video-suncg6/dist/src: cg6_driver.c Log Message: add a driverFunc to tell the Xserver that this driver doesn't need PIO access Now this works again on sparc64. To generate a diff of this commit: cvs rdiff -u -r1.5 -r1.6 \ xsrc/external/mit/xf86-video-suncg6/dist/src/cg6_driver.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/xf86-video-suncg6/dist/src/cg6_driver.c diff -u xsrc/external/mit/xf86-video-suncg6/dist/src/cg6_driver.c:1.5 xsrc/external/mit/xf86-video-suncg6/dist/src/cg6_driver.c:1.6 --- xsrc/external/mit/xf86-video-suncg6/dist/src/cg6_driver.c:1.5 Wed Apr 13 15:47:03 2011 +++ xsrc/external/mit/xf86-video-suncg6/dist/src/cg6_driver.c Fri Jun 10 01:38:31 2011 @@ -61,7 +61,8 @@ static ModeStatus CG6ValidMode(int scrnIndex, DisplayModePtr mode, Bool verbose, int flags); -void CG6Sync(ScrnInfoPtr pScrn); +static Bool CG6DriverFunc(ScrnInfoPtr pScrn, xorgDriverFuncOp op, +pointer ptr); #define CG6_VERSION 4000 #define CG6_NAME SUNCG6 @@ -85,7 +86,8 @@ CG6Probe, CG6AvailableOptions, NULL, -0 +0, +CG6DriverFunc }; typedef enum { @@ -136,7 +138,7 @@ if (!setupDone) { setupDone = TRUE; - xf86AddDriver(SUNCG6, module, 0); + xf86AddDriver(SUNCG6, module, HaveDriverFuncs); /* * Modules that this driver always requires can be loaded here @@ -752,11 +754,19 @@ return TRUE; } -/* - * This is the implementation of the Sync() function. - */ -void -CG6Sync(ScrnInfoPtr pScrn) +static Bool +CG6DriverFunc(ScrnInfoPtr pScrn, xorgDriverFuncOp op, +pointer ptr) { -return; + xorgHWFlags *flag; + + switch (op) { + case GET_REQUIRED_HW_INTERFACES: + flag = (CARD32*)ptr; + (*flag) = HW_MMIO; + return TRUE; + default: + return FALSE; + } } +
CVS commit: src/bin/sh
Module Name:src Committed By: uebayasi Date: Fri Jun 10 02:19:10 UTC 2011 Modified Files: src/bin/sh: cd.c Log Message: Support $OLDPWD. (christos@ will update the manual.) Reviewd By: christos To generate a diff of this commit: cvs rdiff -u -r1.41 -r1.42 src/bin/sh/cd.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/bin/sh/cd.c diff -u src/bin/sh/cd.c:1.41 src/bin/sh/cd.c:1.42 --- src/bin/sh/cd.c:1.41 Thu Feb 17 15:13:49 2011 +++ src/bin/sh/cd.c Fri Jun 10 02:19:10 2011 @@ -1,4 +1,4 @@ -/* $NetBSD: cd.c,v 1.41 2011/02/17 15:13:49 pooka Exp $ */ +/* $NetBSD: cd.c,v 1.42 2011/06/10 02:19:10 uebayasi Exp $ */ /*- * Copyright (c) 1991, 1993 @@ -37,7 +37,7 @@ #if 0 static char sccsid[] = @(#)cd.c 8.2 (Berkeley) 5/4/95; #else -__RCSID($NetBSD: cd.c,v 1.41 2011/02/17 15:13:49 pooka Exp $); +__RCSID($NetBSD: cd.c,v 1.42 2011/06/10 02:19:10 uebayasi Exp $); #endif #endif /* not lint */ @@ -264,9 +264,10 @@ curdir = NULL; getpwd(1); INTON; - if (curdir) + if (curdir) { + setvar(OLDPWD, prevdir, VEXPORT); setvar(PWD, curdir, VEXPORT); - else + } else unsetvar(PWD, 0); return; } @@ -297,6 +298,7 @@ ckfree(prevdir); prevdir = curdir; curdir = savestr(stackblock()); + setvar(OLDPWD, prevdir, VEXPORT); setvar(PWD, curdir, VEXPORT); INTON; } @@ -325,6 +327,7 @@ else find_curdir(0); + setvar(OLDPWD, prevdir, VEXPORT); setvar(PWD, curdir, VEXPORT); out1str(curdir); out1c('\n');
CVS commit: src/sys/arch/amd64/conf
Module Name:src Committed By: joerg Date: Fri Jun 10 03:17:35 UTC 2011 Modified Files: src/sys/arch/amd64/conf: Makefile.amd64 Log Message: Explicitly disable use of SSE. LLVM generates SSE by default on AMD64 and we certainly don't want that in the kernel. To generate a diff of this commit: cvs rdiff -u -r1.35 -r1.36 src/sys/arch/amd64/conf/Makefile.amd64 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/amd64/conf/Makefile.amd64 diff -u src/sys/arch/amd64/conf/Makefile.amd64:1.35 src/sys/arch/amd64/conf/Makefile.amd64:1.36 --- src/sys/arch/amd64/conf/Makefile.amd64:1.35 Mon May 30 15:06:32 2011 +++ src/sys/arch/amd64/conf/Makefile.amd64 Fri Jun 10 03:17:35 2011 @@ -1,4 +1,4 @@ -# $NetBSD: Makefile.amd64,v 1.35 2011/05/30 15:06:32 joerg Exp $ +# $NetBSD: Makefile.amd64,v 1.36 2011/06/10 03:17:35 joerg Exp $ # Makefile for NetBSD # @@ -36,7 +36,7 @@ DEFCOPTS= -O2 CPPFLAGS+= -Damd64 -Dx86_64 CFLAGS+= -mcmodel=kernel -CFLAGS+= -mno-red-zone +CFLAGS+= -mno-red-zone -mno-sse -mno-sse2 -mno-sse3 ## ## (3) libkern and compat
CVS commit: src/sys/arch/amd64/conf
Module Name:src Committed By: joerg Date: Fri Jun 10 03:18:27 UTC 2011 Modified Files: src/sys/arch/amd64/conf: Makefile.amd64 Log Message: Disable LLVM MC for spl.S for now. The different spllower sizes break patchfunc. To generate a diff of this commit: cvs rdiff -u -r1.36 -r1.37 src/sys/arch/amd64/conf/Makefile.amd64 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/amd64/conf/Makefile.amd64 diff -u src/sys/arch/amd64/conf/Makefile.amd64:1.36 src/sys/arch/amd64/conf/Makefile.amd64:1.37 --- src/sys/arch/amd64/conf/Makefile.amd64:1.36 Fri Jun 10 03:17:35 2011 +++ src/sys/arch/amd64/conf/Makefile.amd64 Fri Jun 10 03:18:27 2011 @@ -1,4 +1,4 @@ -# $NetBSD: Makefile.amd64,v 1.36 2011/06/10 03:17:35 joerg Exp $ +# $NetBSD: Makefile.amd64,v 1.37 2011/06/10 03:18:27 joerg Exp $ # Makefile for NetBSD # @@ -67,6 +67,7 @@ AFLAGS.mptramp.S= ${${ACTIVE_CC} == clang:?-no-integrated-as:} AFLAGS.linux32_sigcode.S= ${${ACTIVE_CC} == clang:?-no-integrated-as:} AFLAGS.netbsd32_sigcode.S= ${${ACTIVE_CC} == clang:?-no-integrated-as:} +AFLAGS.spl.S= ${${ACTIVE_CC} == clang:?-no-integrated-as:} CWARNFLAGS.ah_regdomain.c= ${${ACTIVE_CC} == clang:?-Wno-error:} ##
CVS commit: src/sys/arch/i386/conf
Module Name:src Committed By: joerg Date: Fri Jun 10 03:19:25 UTC 2011 Modified Files: src/sys/arch/i386/conf: Makefile.i386 Log Message: Add a few more cases that need GNU as. One of the padlock instructions is missing in LLVM. spl.S and lock_stubs.S break with patchfunc otherwise. To generate a diff of this commit: cvs rdiff -u -r1.171 -r1.172 src/sys/arch/i386/conf/Makefile.i386 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/i386/conf/Makefile.i386 diff -u src/sys/arch/i386/conf/Makefile.i386:1.171 src/sys/arch/i386/conf/Makefile.i386:1.172 --- src/sys/arch/i386/conf/Makefile.i386:1.171 Mon May 30 15:06:32 2011 +++ src/sys/arch/i386/conf/Makefile.i386 Fri Jun 10 03:19:25 2011 @@ -1,4 +1,4 @@ -# $NetBSD: Makefile.i386,v 1.171 2011/05/30 15:06:32 joerg Exp $ +# $NetBSD: Makefile.i386,v 1.172 2011/06/10 03:19:25 joerg Exp $ # Makefile for NetBSD # @@ -35,8 +35,11 @@ ## CPPFLAGS+= -Di386 +AFLAGS.via_padlock.c= ${${ACTIVE_CC} == clang:?-no-integrated-as:} AFLAGS.mptramp.S= ${${ACTIVE_CC} == clang:?-no-integrated-as:} CWARNFLAGS.ah_regdomain.c= ${${ACTIVE_CC} == clang:?-Wno-error:} +AFLAGS.spl.S= ${${ACTIVE_CC} == clang:?-no-integrated-as:} +AFLAGS.lock_stubs.S= ${${ACTIVE_CC} == clang:?-no-integrated-as:} ## ## (3) libkern and compat
CVS commit: src/sys/modules/padlock
Module Name:src Committed By: joerg Date: Fri Jun 10 04:45:41 UTC 2011 Modified Files: src/sys/modules/padlock: Makefile Log Message: Disable integrated assembler for clang until the RNG instructions are supported To generate a diff of this commit: cvs rdiff -u -r1.1 -r1.2 src/sys/modules/padlock/Makefile Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/modules/padlock/Makefile diff -u src/sys/modules/padlock/Makefile:1.1 src/sys/modules/padlock/Makefile:1.2 --- src/sys/modules/padlock/Makefile:1.1 Sat Feb 19 14:25:30 2011 +++ src/sys/modules/padlock/Makefile Fri Jun 10 04:45:41 2011 @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.1 2011/02/19 14:25:30 jmcneill Exp $ +# $NetBSD: Makefile,v 1.2 2011/06/10 04:45:41 joerg Exp $ .include ../Makefile.inc @@ -10,4 +10,6 @@ WARNS= 4 +COPTS.via_padlock.c+= ${${ACTIVE_CC} == clang:?-no-integrated-as:} + .include bsd.kmodule.mk