CVS commit: [netbsd-5] src/doc
Module Name:src Committed By: snj Date: Fri Jan 28 07:21:56 UTC 2011 Modified Files: src/doc [netbsd-5]: CHANGES-5.2 Log Message: 1532 To generate a diff of this commit: cvs rdiff -u -r1.1.2.54 -r1.1.2.55 src/doc/CHANGES-5.2 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/doc/CHANGES-5.2 diff -u src/doc/CHANGES-5.2:1.1.2.54 src/doc/CHANGES-5.2:1.1.2.55 --- src/doc/CHANGES-5.2:1.1.2.54 Sun Jan 16 14:36:30 2011 +++ src/doc/CHANGES-5.2 Fri Jan 28 07:21:56 2011 @@ -1,4 +1,4 @@ -# $NetBSD: CHANGES-5.2,v 1.1.2.54 2011/01/16 14:36:30 bouyer Exp $ +# $NetBSD: CHANGES-5.2,v 1.1.2.55 2011/01/28 07:21:56 snj Exp $ A complete list of changes from the NetBSD 5.1 release to the NetBSD 5.2 release: @@ -4547,3 +4547,13 @@ add more support for hd3000/4000 and some for hd5000 [mrg, ticket #1524] +sys/arch/sparc/sparc/cpu.c 1.215 via patch +sys/arch/sparc/sparc/cpuvar.h 1.78 via patch +sys/arch/sparc/sparc/genassym.cf 1.57 via patch +sys/arch/sparc/sparc/intr.c 1.103-1.105 via patch +sys/arch/sparc/sparc/locore.s 1.247, 1.250 via patch +sys/arch/sparc/sparc/pmap.c 1.329 via patch + + More fixes for sparc SMP. + [mrg, ticket #1532] +
CVS commit: [netbsd-5] src/sys/arch/sparc/sparc
Module Name:src Committed By: snj Date: Fri Jan 28 07:16:14 UTC 2011 Modified Files: src/sys/arch/sparc/sparc [netbsd-5]: cpu.c cpuvar.h genassym.cf intr.c locore.s pmap.c Log Message: Pull up following revision(s) (requested by mrg in ticket #1532): sys/arch/sparc/sparc/cpu.c: revision 1.215 via patch sys/arch/sparc/sparc/cpuvar.h: revision 1.78 via patch sys/arch/sparc/sparc/genassym.cf: revision 1.57 via patch sys/arch/sparc/sparc/intr.c: revision 1.103-1.105 via patch sys/arch/sparc/sparc/locore.s: revision 1.247, 1.250 via patch sys/arch/sparc/sparc/pmap.c: revision 1.329 via patch - print the cpu_number() when we get a strayintr(). - use _MAXNCPU instead of 4 - convert xpmsg_lock from a simplelock to a kmutex - don't wait for sparc_noop IPI calls - remove xmpsg_func's "retval" parameter and usage - remove the IPI at high IPL message - rework cpu_attach() a bunch, refactoring calls to getcpuinfo() and setting of cpi, and split most of the non-boot CPU handling into a new function - make CPU_INFO_FOREACH() work whether modular or not - move the MP cpu_info pages earlier - move a few things in cpu.c around to colsolidate the MP code together - remove useless if (cpus == NULL) tests -- cpus is an array now with these changes, and an additional change to crazyintr() to not printf(), i can get to single user shell on my SS20 again. i can run a few commands but some of them cause hangs. "ps auxw" works, but "top -b" does not. convert sparc "intrcnt" counters to evcnt(9) style. XXX some of the names could be better, but i just copied them from the old intrnames in locore. i benchmarked this with a simple test of ircii ./configure && make, to see if the additional load/store & arith would cause any noticeable degradation as the change also converts 32 bit counters to 64 bits. amusingly, the only trend i saw in this was that for both portions, i see a consistent (across at least 8 runs) benefit of about 0.8% improvement. ie, the newer larger code size / counter size code actually runs faster for some reason.. maybe there's a cacheline effect in the size of the code? XXX the current implementation depends on a couple of things: XXX - ev_count member of evcnt{} is first and has offset 0 XXX - that sizeof(struct evcnt) equals 32 XXX if these are not true, locore.s has #error's to catch it - remove unused ft_want_ast() - give nmi_sun* ENTRY() points so they show up in symbols properly - add some disabled code to use this cpu's idlelwp area when hatching a cpu, but right now it makes this worse not better... To generate a diff of this commit: cvs rdiff -u -r1.211.8.2 -r1.211.8.3 src/sys/arch/sparc/sparc/cpu.c cvs rdiff -u -r1.75.10.2 -r1.75.10.3 src/sys/arch/sparc/sparc/cpuvar.h cvs rdiff -u -r1.56 -r1.56.4.1 src/sys/arch/sparc/sparc/genassym.cf cvs rdiff -u -r1.100.20.1 -r1.100.20.2 src/sys/arch/sparc/sparc/intr.c cvs rdiff -u -r1.244.8.2 -r1.244.8.3 src/sys/arch/sparc/sparc/locore.s cvs rdiff -u -r1.322.20.3 -r1.322.20.4 src/sys/arch/sparc/sparc/pmap.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/sparc/sparc/cpu.c diff -u src/sys/arch/sparc/sparc/cpu.c:1.211.8.2 src/sys/arch/sparc/sparc/cpu.c:1.211.8.3 --- src/sys/arch/sparc/sparc/cpu.c:1.211.8.2 Sun Jan 16 12:58:23 2011 +++ src/sys/arch/sparc/sparc/cpu.c Fri Jan 28 07:16:13 2011 @@ -1,4 +1,4 @@ -/* $NetBSD: cpu.c,v 1.211.8.2 2011/01/16 12:58:23 bouyer Exp $ */ +/* $NetBSD: cpu.c,v 1.211.8.3 2011/01/28 07:16:13 snj Exp $ */ /* * Copyright (c) 1996 @@ -52,7 +52,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: cpu.c,v 1.211.8.2 2011/01/16 12:58:23 bouyer Exp $"); +__KERNEL_RCSID(0, "$NetBSD: cpu.c,v 1.211.8.3 2011/01/28 07:16:13 snj Exp $"); #include "opt_multiprocessor.h" #include "opt_lockdebug.h" @@ -102,10 +102,7 @@ extern char machine_model[]; int sparc_ncpus; /* # of CPUs detected by PROM */ -#ifdef MULTIPROCESSOR -struct cpu_info *cpus[4]; /* we only support 4 CPUs. */ -u_int cpu_ready_mask; /* the set of CPUs marked as READY */ -#endif +struct cpu_info *cpus[_MAXNCPU]; /* we only support 4 CPUs. */ /* The CPU configuration driver. */ static void cpu_mainbus_attach(struct device *, struct device *, void *); @@ -136,43 +133,6 @@ #define SRMMU_VERS(mmusr) (((mmusr) >> 24) & 0xf) int bootmid; /* Module ID of boot CPU */ -#if defined(MULTIPROCESSOR) -void cpu_spinup(struct cpu_info *); -static void init_cpuinfo(struct cpu_info *, int); - -int go_smp_cpus = 0; /* non-primary CPUs wait for this to go */ - -/* lock this to send IPI's */ -struct simplelock xpmsg_lock = SIMPLELOCK_INITIALIZER; - -static void -init_cpuinfo(struct cpu_info *cpi, int node) -{ - vaddr_t intstack, va; - - /* - * Finish initialising this cpu_info. - */ - getcpuinfo(cpi, node); - - /* - * Arrange interrupt stack. This cpu will also abuse the bottom -
CVS commit: [matt-nb5-pq3] src/sys/arch/powerpc
Module Name:src Committed By: matt Date: Fri Jan 28 04:37:25 UTC 2011 Modified Files: src/sys/arch/powerpc/oea [matt-nb5-pq3]: oea_machdep.c src/sys/arch/powerpc/powerpc [matt-nb5-pq3]: db_interface.c trap_subr.S Log Message: If a CPU has HIGHBAT, then use them. We dynamically change dsitrap to select between bats 4-7 when HIGHBAT is detected. To generate a diff of this commit: cvs rdiff -u -r1.46.18.3 -r1.46.18.4 src/sys/arch/powerpc/oea/oea_machdep.c cvs rdiff -u -r1.39.42.1 -r1.39.42.2 \ src/sys/arch/powerpc/powerpc/db_interface.c cvs rdiff -u -r1.65.16.3 -r1.65.16.4 src/sys/arch/powerpc/powerpc/trap_subr.S Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/powerpc/oea/oea_machdep.c diff -u src/sys/arch/powerpc/oea/oea_machdep.c:1.46.18.3 src/sys/arch/powerpc/oea/oea_machdep.c:1.46.18.4 --- src/sys/arch/powerpc/oea/oea_machdep.c:1.46.18.3 Wed Jan 26 08:52:26 2011 +++ src/sys/arch/powerpc/oea/oea_machdep.c Fri Jan 28 04:37:25 2011 @@ -1,4 +1,4 @@ -/* $NetBSD: oea_machdep.c,v 1.46.18.3 2011/01/26 08:52:26 matt Exp $ */ +/* $NetBSD: oea_machdep.c,v 1.46.18.4 2011/01/28 04:37:25 matt Exp $ */ /* * Copyright (C) 2002 Matt Thomas @@ -33,7 +33,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: oea_machdep.c,v 1.46.18.3 2011/01/26 08:52:26 matt Exp $"); +__KERNEL_RCSID(0, "$NetBSD: oea_machdep.c,v 1.46.18.4 2011/01/28 04:37:25 matt Exp $"); #include "opt_ppcarch.h" #include "opt_compat_netbsd.h" @@ -106,6 +106,11 @@ register_t iosrtable[16]; /* I/O segments, for kernel_pmap setup */ paddr_t msgbuf_paddr; +extern int dsitrap_fix_dbat4[]; +extern int dsitrap_fix_dbat5[]; +extern int dsitrap_fix_dbat6[]; +extern int dsitrap_fix_dbat7[]; + void oea_init(void (*handler)(void)) { @@ -372,6 +377,8 @@ */ __syncicache((void *) trapstart, (uintptr_t) trapend - (uintptr_t) trapstart); + __syncicache(dsitrap_fix_dbat4, 16); + __syncicache(dsitrap_fix_dbat7, 8); #ifdef PPC_OEA601 /* @@ -453,19 +460,36 @@ #endif /* PPC_OEA601 */ #if defined (PPC_OEA) || defined (PPC_OEA64_BRIDGE) +#define DBAT_SET(n, batl, batu)\ + do { \ + mtspr(SPR_DBAT##n##L, (batl)); \ + mtspr(SPR_DBAT##n##U, (batu)); \ + } while (/*CONSTCOND*/ 0) +#define DBAT_RESET(n) DBAT_SET(n, 0, 0) +#define DBATU_GET(n) mfspr(SPR_DBAT##n##U) +#define IBAT_SET(n, batl, batu)\ + do { \ + mtspr(SPR_IBAT##n##L, (batl)); \ + mtspr(SPR_IBAT##n##U, (batu)); \ + } while (/*CONSTCOND*/ 0) +#define IBAT_RESET(n) IBAT_SET(n, 0, 0) + void oea_iobat_add(paddr_t pa, register_t len) { static int z = 1; - const u_int i = BAT_VA2IDX(pa); const u_int n = __SHIFTOUT(len, (BAT_XBL|BAT_BL) & ~BAT_BL_8M); + const u_int i = BAT_VA2IDX(pa) & -n; /* in case pa was in the middle */ + const int after_bat3 = (oeacpufeat & OEACPU_HIGHBAT) ? 4 : 8; KASSERT(len >= BAT_BL_8M); - battable[i].batl = BATL(pa, BAT_I|BAT_G, BAT_PP_RW); - battable[i].batu = BATU(pa, len, BAT_Vs); + const register_t batl = BATL(pa, BAT_I|BAT_G, BAT_PP_RW); + const register_t batu = BATU(pa, len, BAT_Vs); + for (u_int j = 0; j < n; j++) { - battable[i + j] = battable[i]; + battable[i + j].batl = batl; + battable[i + j].batu = batu; } /* @@ -473,22 +497,32 @@ */ switch (z) { case 1: - __asm volatile ("mtdbatl 1,%0; mtdbatu 1,%1;" - :: "r"(battable[i].batl), - "r"(battable[i].batu)); + DBAT_SET(1, batl, batu); z = 2; break; case 2: - __asm volatile ("mtdbatl 2,%0; mtdbatu 2,%1;" - :: "r"(battable[i].batl), - "r"(battable[i].batu)); + DBAT_SET(2, batl, batu); z = 3; break; case 3: - __asm volatile ("mtdbatl 3,%0; mtdbatu 3,%1;" - :: "r"(battable[i].batl), - "r"(battable[i].batu)); - z = 4; + DBAT_SET(3, batl, batu); + z = after_bat3; /* no highbat, skip to end */ + break; + case 4: + DBAT_SET(4, batl, batu); + z = 5; + break; + case 5: + DBAT_SET(5, batl, batu); + z = 6; + break; + case 6: + DBAT_SET(6, batl, batu); + z = 7; + break; + case 7: + DBAT_SET(7, batl, batu); + z = 8; break; default: break; @@ -510,30 +544,51 @@ memset(&battable[i], 0, n*sizeof(battable[0])); -#define BAT_RESET(n) \ - __asm volatile("mtdbatu %0,%1; mtdbatl %0,%1" :: "n"(n), "r"(0)) -#define BATU_GET(n, r) __asm volatile("mfdbatu %0,%1" : "=r"(r) : "n"(n)) - - for (u_int k = 1 ; k < 4; k++) { + const int maxbat = oeacpufeat & OEACPU_HIGHBAT ? 8 : 4; + for (u_int k = 1 ; k < maxbat; k++) { register_t batu; switch (k) { case 1: - BATU_GET(1, batu); + batu = DBATU_GET(1); if (BAT_VA_MATCH_P(batu, pa) && BAT_VALID_P(batu, PSL_PR)) -BAT_RESET(1); +DBAT_RESET(1); break; case 2: - BATU_GET(2, batu); + batu = DBATU_GET(2); if (BAT_VA_MATCH_P(batu, pa) && BAT_VALID_P(batu, PSL_PR)) -BAT_RESET(2); +DBAT_RESET(2); break; case 3: - BATU_GET(3, batu); + batu = DBATU_GET(3); + if (BA
CVS commit: src/lib/libedit
Module Name:src Committed By: christos Date: Fri Jan 28 03:41:52 UTC 2011 Modified Files: src/lib/libedit: tty.c Log Message: fix pasto To generate a diff of this commit: cvs rdiff -u -r1.34 -r1.35 src/lib/libedit/tty.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/lib/libedit/tty.c diff -u src/lib/libedit/tty.c:1.34 src/lib/libedit/tty.c:1.35 --- src/lib/libedit/tty.c:1.34 Thu Jan 27 18:11:40 2011 +++ src/lib/libedit/tty.c Thu Jan 27 22:41:52 2011 @@ -1,4 +1,4 @@ -/* $NetBSD: tty.c,v 1.34 2011/01/27 23:11:40 christos Exp $ */ +/* $NetBSD: tty.c,v 1.35 2011/01/28 03:41:52 christos Exp $ */ /*- * Copyright (c) 1992, 1993 @@ -37,7 +37,7 @@ #if 0 static char sccsid[] = "@(#)tty.c 8.1 (Berkeley) 6/4/93"; #else -__RCSID("$NetBSD: tty.c,v 1.34 2011/01/27 23:11:40 christos Exp $"); +__RCSID("$NetBSD: tty.c,v 1.35 2011/01/28 03:41:52 christos Exp $"); #endif #endif /* not lint && not SCCSID */ @@ -504,7 +504,6 @@ #endif /* DEBUG_TTY */ return (-1); } - &el->el_tty.t_ed) == -1) { if (tty_getty(el, &el->el_tty.t_ed) == -1) { #ifdef DEBUG_TTY (void) fprintf(el->el_errfile,
CVS commit: [matt-nb5-pq3] src/sys/arch/powerpc/oea
Module Name:src Committed By: matt Date: Fri Jan 28 02:34:12 UTC 2011 Modified Files: src/sys/arch/powerpc/oea [matt-nb5-pq3]: cpu_subr.c Log Message: IBM750FX has HIGHBAT (BATs >= 4) To generate a diff of this commit: cvs rdiff -u -r1.50.14.2 -r1.50.14.3 src/sys/arch/powerpc/oea/cpu_subr.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/powerpc/oea/cpu_subr.c diff -u src/sys/arch/powerpc/oea/cpu_subr.c:1.50.14.2 src/sys/arch/powerpc/oea/cpu_subr.c:1.50.14.3 --- src/sys/arch/powerpc/oea/cpu_subr.c:1.50.14.2 Mon Jan 17 07:45:59 2011 +++ src/sys/arch/powerpc/oea/cpu_subr.c Fri Jan 28 02:34:11 2011 @@ -1,4 +1,4 @@ -/* $NetBSD: cpu_subr.c,v 1.50.14.2 2011/01/17 07:45:59 matt Exp $ */ +/* $NetBSD: cpu_subr.c,v 1.50.14.3 2011/01/28 02:34:11 matt Exp $ */ /*- * Copyright (c) 2001 Matt Thomas. @@ -34,7 +34,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: cpu_subr.c,v 1.50.14.2 2011/01/17 07:45:59 matt Exp $"); +__KERNEL_RCSID(0, "$NetBSD: cpu_subr.c,v 1.50.14.3 2011/01/28 02:34:11 matt Exp $"); #include "opt_ppcparam.h" #include "opt_multiprocessor.h" @@ -275,6 +275,9 @@ else if (MPC745X_P(vers) && vers != MPC7450) oeacpufeat |= OEACPU_XBSEN | OEACPU_HIGHBAT | OEACPU_HIGHSPRG; + + else if (vers == IBM750FX) + oeacpufeat |= OEACPU_HIGHBAT; } void
CVS commit: [matt-nb5-pq3] src/sys/arch/powerpc/include/oea
Module Name:src Committed By: matt Date: Fri Jan 28 02:33:34 UTC 2011 Modified Files: src/sys/arch/powerpc/include/oea [matt-nb5-pq3]: spr.h Log Message: Add SPR_DBAT7L ... To generate a diff of this commit: cvs rdiff -u -r1.1.8.2 -r1.1.8.3 src/sys/arch/powerpc/include/oea/spr.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/oea/spr.h diff -u src/sys/arch/powerpc/include/oea/spr.h:1.1.8.2 src/sys/arch/powerpc/include/oea/spr.h:1.1.8.3 --- src/sys/arch/powerpc/include/oea/spr.h:1.1.8.2 Fri Jan 7 01:34:24 2011 +++ src/sys/arch/powerpc/include/oea/spr.h Fri Jan 28 02:33:34 2011 @@ -1,4 +1,4 @@ -/* $NetBSD: spr.h,v 1.1.8.2 2011/01/07 01:34:24 matt Exp $ */ +/* $NetBSD: spr.h,v 1.1.8.3 2011/01/28 02:33:34 matt Exp $ */ #ifndef _POWERPC_OEA_SPR_H_ #define _POWERPC_OEA_SPR_H_ @@ -108,6 +108,7 @@ #define SPR_DBAT6U 0x23c /* ..6. Data BAT Reg 6 Upper */ #define SPR_DBAT6L 0x23d /* ..6. Data BAT Reg 6 Lower */ #define SPR_DBAT7U 0x23e /* ..6. Data BAT Reg 7 Upper */ +#define SPR_DBAT7L 0x23f /* ..6. Data BAT Reg 7 Lower */ #define SPR_UMMCR2 0x3a0 /* ..6. User Monitor Mode Control Register 2 */ #define SPR_UMMCR0 0x3a8 /* ..6. User Monitor Mode Control Register 0 */ #define SPR_USIA 0x3ab /* ..6. User Sampled Instruction Address */
CVS commit: src/lib/libedit
Module Name:src Committed By: christos Date: Thu Jan 27 23:11:41 UTC 2011 Modified Files: src/lib/libedit: el.c el.h tty.c Log Message: don't turn on editing if stdout is not a tty. To generate a diff of this commit: cvs rdiff -u -r1.60 -r1.61 src/lib/libedit/el.c cvs rdiff -u -r1.21 -r1.22 src/lib/libedit/el.h cvs rdiff -u -r1.33 -r1.34 src/lib/libedit/tty.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/lib/libedit/el.c diff -u src/lib/libedit/el.c:1.60 src/lib/libedit/el.c:1.61 --- src/lib/libedit/el.c:1.60 Sat Aug 28 11:44:59 2010 +++ src/lib/libedit/el.c Thu Jan 27 18:11:40 2011 @@ -1,4 +1,4 @@ -/* $NetBSD: el.c,v 1.60 2010/08/28 15:44:59 christos Exp $ */ +/* $NetBSD: el.c,v 1.61 2011/01/27 23:11:40 christos Exp $ */ /*- * Copyright (c) 1992, 1993 @@ -37,7 +37,7 @@ #if 0 static char sccsid[] = "@(#)el.c 8.2 (Berkeley) 1/3/94"; #else -__RCSID("$NetBSD: el.c,v 1.60 2010/08/28 15:44:59 christos Exp $"); +__RCSID("$NetBSD: el.c,v 1.61 2011/01/27 23:11:40 christos Exp $"); #endif #endif /* not lint && not SCCSID */ @@ -72,6 +72,8 @@ el->el_errfile = ferr; el->el_infd = fileno(fin); + el->el_outfd = fileno(fout); + el->el_errfd = fileno(ferr); el->el_prog = Strdup(ct_decode_string(prog, &el->el_scratch)); if (el->el_prog == NULL) { @@ -333,9 +335,11 @@ break; case 1: el->el_outfile = fp; + el->el_outfd = fileno(fp); break; case 2: el->el_errfile = fp; + el->el_errfd = fileno(fp); break; default: rv = -1; Index: src/lib/libedit/el.h diff -u src/lib/libedit/el.h:1.21 src/lib/libedit/el.h:1.22 --- src/lib/libedit/el.h:1.21 Thu Dec 31 10:58:26 2009 +++ src/lib/libedit/el.h Thu Jan 27 18:11:40 2011 @@ -1,4 +1,4 @@ -/* $NetBSD: el.h,v 1.21 2009/12/31 15:58:26 christos Exp $ */ +/* $NetBSD: el.h,v 1.22 2011/01/27 23:11:40 christos Exp $ */ /*- * Copyright (c) 1992, 1993 @@ -119,6 +119,8 @@ FILE *el_outfile; /* Stdio stuff */ FILE *el_errfile; /* Stdio stuff */ int el_infd; /* Input file descriptor */ + int el_outfd; /* Output file descriptor */ + int el_errfd; /* Error file descriptor */ int el_flags; /* Various flags. */ int el_errno; /* Local copy of errno */ coord_t el_cursor; /* Cursor location */ Index: src/lib/libedit/tty.c diff -u src/lib/libedit/tty.c:1.33 src/lib/libedit/tty.c:1.34 --- src/lib/libedit/tty.c:1.33 Sun Apr 18 17:17:22 2010 +++ src/lib/libedit/tty.c Thu Jan 27 18:11:40 2011 @@ -1,4 +1,4 @@ -/* $NetBSD: tty.c,v 1.33 2010/04/18 21:17:22 christos Exp $ */ +/* $NetBSD: tty.c,v 1.34 2011/01/27 23:11:40 christos Exp $ */ /*- * Copyright (c) 1992, 1993 @@ -37,7 +37,7 @@ #if 0 static char sccsid[] = "@(#)tty.c 8.1 (Berkeley) 6/4/93"; #else -__RCSID("$NetBSD: tty.c,v 1.33 2010/04/18 21:17:22 christos Exp $"); +__RCSID("$NetBSD: tty.c,v 1.34 2011/01/27 23:11:40 christos Exp $"); #endif #endif /* not lint && not SCCSID */ @@ -46,6 +46,7 @@ */ #include #include +#include /* for isatty */ #include /* for ffs */ #include "el.h" #include "tty.h" @@ -496,6 +497,14 @@ if (el->el_flags & EDIT_DISABLED) return (0); + if (!isatty(el->el_outfd)) { +#ifdef DEBUG_TTY + (void) fprintf(el->el_errfile, + "tty_setup: isatty: %s\n", strerror(errno)); +#endif /* DEBUG_TTY */ + return (-1); + } + &el->el_tty.t_ed) == -1) { if (tty_getty(el, &el->el_tty.t_ed) == -1) { #ifdef DEBUG_TTY (void) fprintf(el->el_errfile,
CVS commit: src/sys/rump/librump/rumpkern
Module Name:src Committed By: pooka Date: Thu Jan 27 21:55:25 UTC 2011 Modified Files: src/sys/rump/librump/rumpkern: sleepq.c Log Message: Fill in l_wmesg since some proc-walkers assume it. To generate a diff of this commit: cvs rdiff -u -r1.11 -r1.12 src/sys/rump/librump/rumpkern/sleepq.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/sleepq.c diff -u src/sys/rump/librump/rumpkern/sleepq.c:1.11 src/sys/rump/librump/rumpkern/sleepq.c:1.12 --- src/sys/rump/librump/rumpkern/sleepq.c:1.11 Wed Jan 12 12:51:21 2011 +++ src/sys/rump/librump/rumpkern/sleepq.c Thu Jan 27 21:55:25 2011 @@ -1,4 +1,4 @@ -/* $NetBSD: sleepq.c,v 1.11 2011/01/12 12:51:21 pooka Exp $ */ +/* $NetBSD: sleepq.c,v 1.12 2011/01/27 21:55:25 pooka Exp $ */ /* * Copyright (c) 2008 Antti Kantee. All Rights Reserved. @@ -26,7 +26,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: sleepq.c,v 1.11 2011/01/12 12:51:21 pooka Exp $"); +__KERNEL_RCSID(0, "$NetBSD: sleepq.c,v 1.12 2011/01/27 21:55:25 pooka Exp $"); #include #include @@ -73,6 +73,7 @@ struct lwp *l = curlwp; l->l_wchan = wc; + l->l_wmesg = wmsg; l->l_sleepq = sq; TAILQ_INSERT_TAIL(sq, l, l_sleepchain); } @@ -91,6 +92,7 @@ if (error == EWOULDBLOCK || error == EINTR) { TAILQ_REMOVE(l->l_sleepq, l, l_sleepchain); l->l_wchan = NULL; + l->l_wmesg = NULL; } } mutex_spin_exit(mp); @@ -115,6 +117,7 @@ if (l->l_wchan == wchan) { found = true; l->l_wchan = NULL; + l->l_wmesg = NULL; l->l_mutex = NULL; TAILQ_REMOVE(sq, l, l_sleepchain); } @@ -131,6 +134,7 @@ { l->l_wchan = NULL; + l->l_wmesg = NULL; l->l_mutex = NULL; TAILQ_REMOVE(l->l_sleepq, l, l_sleepchain); cv_broadcast(&sq_cv);
CVS commit: src
Module Name:src Committed By: pooka Date: Thu Jan 27 19:09:07 UTC 2011 Modified Files: src/share/man/man7: hier.7 src/sys/arch: README Log Message: plop new emips port into various places it should be plopped in to To generate a diff of this commit: cvs rdiff -u -r1.94 -r1.95 src/share/man/man7/hier.7 cvs rdiff -u -r1.53 -r1.54 src/sys/arch/README Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/share/man/man7/hier.7 diff -u src/share/man/man7/hier.7:1.94 src/share/man/man7/hier.7:1.95 --- src/share/man/man7/hier.7:1.94 Thu Jan 20 23:01:55 2011 +++ src/share/man/man7/hier.7 Thu Jan 27 19:09:07 2011 @@ -1,4 +1,4 @@ -.\" $NetBSD: hier.7,v 1.94 2011/01/20 23:01:55 mbalmer Exp $ +.\" $NetBSD: hier.7,v 1.95 2011/01/27 19:09:07 pooka Exp $ .\" .\" Copyright (c) 1990, 1993, 1994 .\" The Regents of the University of California. All rights reserved. @@ -772,6 +772,8 @@ Cobalt Networks' MIPS-based Microserver .It Sy dreamcast/ Sega Dreamcast game console +.It Sy emips/ +Machines based on Extensible MIPS .It Sy evbarm/ ARM based evaluation boards .It Sy evbmips/ Index: src/sys/arch/README diff -u src/sys/arch/README:1.53 src/sys/arch/README:1.54 --- src/sys/arch/README:1.53 Sat Jul 3 13:32:36 2010 +++ src/sys/arch/README Thu Jan 27 19:09:06 2011 @@ -1,4 +1,4 @@ -$NetBSD: README,v 1.53 2010/07/03 13:32:36 kiyohara Exp $ +$NetBSD: README,v 1.54 2011/01/27 19:09:06 pooka Exp $ acorn26: Acorn ARM2- and ARM3-based machines (arm, 2509) acorn32: Acorn computers Ltd. ARM 6/7/SA based machines (arm, 2008) @@ -14,6 +14,7 @@ cesfic: FIC8234 VME processor board (m68k, 20010514) cobalt: Cobalt Networks Microservers (mips, 2319) dreamcast: SEGA Dreamcast (sh3, 20010107) +emips: Machines based on Extensible MIPS (mips, 20110126) evbarm: ARM-based eval boards (arm, 20010905) evbmips: MIPS-based eval boards (mips, 20020307) evbppc: PowerPC-based eval boards (powerpc, 20021209)
CVS commit: src/doc
Module Name:src Committed By: pooka Date: Thu Jan 27 19:06:54 UTC 2011 Modified Files: src/doc: CHANGES Log Message: make emips date UTC'ly correct, plus lEETCAPS it while i'm here To generate a diff of this commit: cvs rdiff -u -r1.1496 -r1.1497 src/doc/CHANGES Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/doc/CHANGES diff -u src/doc/CHANGES:1.1496 src/doc/CHANGES:1.1497 --- src/doc/CHANGES:1.1496 Wed Jan 26 01:18:47 2011 +++ src/doc/CHANGES Thu Jan 27 19:06:54 2011 @@ -1,4 +1,4 @@ -# LIST OF CHANGES FROM LAST RELEASE: <$Revision: 1.1496 $> +# LIST OF CHANGES FROM LAST RELEASE: <$Revision: 1.1497 $> # # # [Note: This file does not mention every change made to the NetBSD source tree. @@ -834,4 +834,4 @@ atactl(8): Fix mislabelled S.M.A.R.T. lifetime temperature record reading. [nisimura 20110119] pcf8563rtc(4): Add a todr(9) driver for NXP PCF8563 [jakllsch 20110124] - emips: Initial commit of the emips port [pooka 20110125] + emips: Initial commit of the eMIPS port [pooka 20110126]
CVS commit: src/gnu/usr.bin/send-pr
Module Name:src Committed By: pooka Date: Thu Jan 27 18:51:17 UTC 2011 Modified Files: src/gnu/usr.bin/send-pr: categories Log Message: add port-emips To generate a diff of this commit: cvs rdiff -u -r1.56 -r1.57 src/gnu/usr.bin/send-pr/categories Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/gnu/usr.bin/send-pr/categories diff -u src/gnu/usr.bin/send-pr/categories:1.56 src/gnu/usr.bin/send-pr/categories:1.57 --- src/gnu/usr.bin/send-pr/categories:1.56 Sat Dec 5 16:29:11 2009 +++ src/gnu/usr.bin/send-pr/categories Thu Jan 27 18:51:16 2011 @@ -19,6 +19,7 @@ port-cesfic port-cobalt port-dreamcast +port-emips port-evbarm port-evbmips port-evbppc
CVS commit: src/sys/arch/x86
Module Name:src Committed By: bouyer Date: Thu Jan 27 18:44:40 UTC 2011 Modified Files: src/sys/arch/x86/include: cputypes.h src/sys/arch/x86/x86: identcpu.c Log Message: Properly identify vortex86 CPUs. To generate a diff of this commit: cvs rdiff -u -r1.2 -r1.3 src/sys/arch/x86/include/cputypes.h cvs rdiff -u -r1.21 -r1.22 src/sys/arch/x86/x86/identcpu.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/x86/include/cputypes.h diff -u src/sys/arch/x86/include/cputypes.h:1.2 src/sys/arch/x86/include/cputypes.h:1.3 --- src/sys/arch/x86/include/cputypes.h:1.2 Sun May 11 13:36:33 2008 +++ src/sys/arch/x86/include/cputypes.h Thu Jan 27 18:44:40 2011 @@ -1,4 +1,4 @@ -/* $NetBSD: cputypes.h,v 1.2 2008/05/11 13:36:33 ad Exp $ */ +/* $NetBSD: cputypes.h,v 1.3 2011/01/27 18:44:40 bouyer Exp $ */ /* * Copyright (c) 1993 Christopher G. Demetriou @@ -68,6 +68,7 @@ #define CPUVENDOR_AMD 4 #define CPUVENDOR_IDT 5 #define CPUVENDOR_TRANSMETA 6 +#define CPUVENDOR_VORTEX86 7 /* * Some other defines, dealing with values returned by cpuid. Index: src/sys/arch/x86/x86/identcpu.c diff -u src/sys/arch/x86/x86/identcpu.c:1.21 src/sys/arch/x86/x86/identcpu.c:1.22 --- src/sys/arch/x86/x86/identcpu.c:1.21 Wed Jan 19 21:39:41 2011 +++ src/sys/arch/x86/x86/identcpu.c Thu Jan 27 18:44:40 2011 @@ -1,4 +1,4 @@ -/* $NetBSD: identcpu.c,v 1.21 2011/01/19 21:39:41 jmcneill Exp $ */ +/* $NetBSD: identcpu.c,v 1.22 2011/01/27 18:44:40 bouyer Exp $ */ /*- * Copyright (c) 1999, 2000, 2001, 2006, 2007, 2008 The NetBSD Foundation, Inc. @@ -30,7 +30,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: identcpu.c,v 1.21 2011/01/19 21:39:41 jmcneill Exp $"); +__KERNEL_RCSID(0, "$NetBSD: identcpu.c,v 1.22 2011/01/27 18:44:40 bouyer Exp $"); #include "opt_enhanced_speedstep.h" #include "opt_intel_odcm.h" @@ -89,7 +89,8 @@ }; static const char cpu_vendor_names[][10] = { - "Unknown", "Intel", "NS/Cyrix", "NexGen", "AMD", "IDT/VIA", "Transmeta" + "Unknown", "Intel", "NS/Cyrix", "NexGen", "AMD", "IDT/VIA", "Transmeta", + "Vortex86" }; static const struct x86_cache_info * @@ -552,6 +553,47 @@ cpu_probe_amd_cache(ci); } +static void +cpu_probe_vortex86(struct cpu_info *ci) +{ +#define PCI_MODE1_ADDRESS_REG 0x0cf8 +#define PCI_MODE1_DATA_REG 0x0cfc +#define PCI_MODE1_ENABLE 0x8000UL + + uint32_t reg; + + if (cpu_vendor != CPUVENDOR_VORTEX86) + return; + /* + * CPU model available from "Customer ID register" in + * North Bridge Function 0 PCI space + * we can't use pci_conf_read() because the PCI subsystem is not + * not initialised early enough + */ + + outl(PCI_MODE1_ADDRESS_REG, PCI_MODE1_ENABLE | 0x90); + reg = inl(PCI_MODE1_DATA_REG); + + switch(reg) { + case 0x31504d44: + strcpy(cpu_brand_string, "Vortex86SX"); + break; + case 0x32504d44: + strcpy(cpu_brand_string, "Vortex86DX"); + break; + case 0x33504d44: + strcpy(cpu_brand_string, "Vortex86MX"); + break; + default: + strcpy(cpu_brand_string, "Unknown Vortex86"); + break; + } + +#undef PCI_MODE1_ENABLE +#undef PCI_MODE1_ADDRESS_REG +#undef PCI_MODE1_DATA_REG +} + void cpu_probe(struct cpu_info *ci) { @@ -591,6 +633,8 @@ cpu_vendor = CPUVENDOR_IDT; else if (memcmp(ci->ci_vendor, "GenuineTMx86", 12) == 0) cpu_vendor = CPUVENDOR_TRANSMETA; + else if (memcmp(ci->ci_vendor, "Vortex86 SoC", 12) == 0) + cpu_vendor = CPUVENDOR_VORTEX86; else cpu_vendor = CPUVENDOR_UNKNOWN; @@ -655,6 +699,7 @@ cpu_probe_winchip(ci); cpu_probe_c3(ci); cpu_probe_geode(ci); + cpu_probe_vortex86(ci); x86_cpu_topology(ci);
CVS commit: src/lib/librumphijack
Module Name:src Committed By: pooka Date: Thu Jan 27 18:12:19 UTC 2011 Modified Files: src/lib/librumphijack: Makefile hijack.c Log Message: Use NEEDED for librumpclient instead of loading it manually. To generate a diff of this commit: cvs rdiff -u -r1.5 -r1.6 src/lib/librumphijack/Makefile cvs rdiff -u -r1.22 -r1.23 src/lib/librumphijack/hijack.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/lib/librumphijack/Makefile diff -u src/lib/librumphijack/Makefile:1.5 src/lib/librumphijack/Makefile:1.6 --- src/lib/librumphijack/Makefile:1.5 Tue Jan 25 12:56:57 2011 +++ src/lib/librumphijack/Makefile Thu Jan 27 18:12:19 2011 @@ -1,10 +1,11 @@ -# $NetBSD: Makefile,v 1.5 2011/01/25 12:56:57 pooka Exp $ +# $NetBSD: Makefile,v 1.6 2011/01/27 18:12:19 pooka Exp $ # LIB= rumphijack NOSTATICLIB= dlfun NOPROFILE= dlfun -LIBDPLIBS+= pthread ${.CURDIR}/../libpthread +LIBDPLIBS+= pthread ${.CURDIR}/../libpthread \ + rumpclient ${.CURDIR}/../librumpclient MAN= rumphijack.3 SRCS= hijack.c Index: src/lib/librumphijack/hijack.c diff -u src/lib/librumphijack/hijack.c:1.22 src/lib/librumphijack/hijack.c:1.23 --- src/lib/librumphijack/hijack.c:1.22 Thu Jan 27 18:05:16 2011 +++ src/lib/librumphijack/hijack.c Thu Jan 27 18:12:19 2011 @@ -1,4 +1,4 @@ -/* $NetBSD: hijack.c,v 1.22 2011/01/27 18:05:16 pooka Exp $ */ +/* $NetBSD: hijack.c,v 1.23 2011/01/27 18:12:19 pooka Exp $ */ /*- * Copyright (c) 2011 Antti Kantee. All Rights Reserved. @@ -26,7 +26,7 @@ */ #include -__RCSID("$NetBSD: hijack.c,v 1.22 2011/01/27 18:05:16 pooka Exp $"); +__RCSID("$NetBSD: hijack.c,v 1.23 2011/01/27 18:12:19 pooka Exp $"); #define __ssp_weak_name(fun) _hijack_ ## fun @@ -187,16 +187,10 @@ static void __attribute__((constructor)) rcinit(void) { - void **rumpcdlsym; - void *hand; + extern void *(*rumpclient_dlsym)(void *, const char *); unsigned i, j; - hand = dlopen("librumpclient.so", RTLD_LAZY|RTLD_GLOBAL); - if (!hand) - err(1, "cannot open librumpclient.so"); - - rumpcdlsym = dlsym(hand, "rumpclient_dlsym"); - *rumpcdlsym = hijackdlsym; + rumpclient_dlsym = hijackdlsym; host_fork = dlsym(RTLD_NEXT, "fork"); /* @@ -215,12 +209,14 @@ if (j == __arraycount(syscnames)) errx(1, "rumphijack error: syscall pos %d missing", i); - syscalls[i].bs_host = dlsym(hand,syscnames[j].scm_hostname); + syscalls[i].bs_host = dlsym(RTLD_NEXT, + syscnames[j].scm_hostname); if (syscalls[i].bs_host == NULL) errx(1, "hostcall %s not found missing", syscnames[j].scm_hostname); - syscalls[i].bs_rump = dlsym(hand,syscnames[j].scm_rumpname); + syscalls[i].bs_rump = dlsym(RTLD_NEXT, + syscnames[j].scm_rumpname); if (syscalls[i].bs_rump == NULL) errx(1, "rumpcall %s not found missing", syscnames[j].scm_rumpname);
CVS commit: src/lib/librumphijack
Module Name:src Committed By: pooka Date: Thu Jan 27 18:05:16 UTC 2011 Modified Files: src/lib/librumphijack: hijack.c Log Message: Set server reconnection timeout to infinite. There probably need to be some toggle eventually, but for now I'm optimizing the default for my firefox use ;) To generate a diff of this commit: cvs rdiff -u -r1.21 -r1.22 src/lib/librumphijack/hijack.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/lib/librumphijack/hijack.c diff -u src/lib/librumphijack/hijack.c:1.21 src/lib/librumphijack/hijack.c:1.22 --- src/lib/librumphijack/hijack.c:1.21 Wed Jan 26 18:48:32 2011 +++ src/lib/librumphijack/hijack.c Thu Jan 27 18:05:16 2011 @@ -1,4 +1,4 @@ -/* $NetBSD: hijack.c,v 1.21 2011/01/26 18:48:32 christos Exp $ */ +/* $NetBSD: hijack.c,v 1.22 2011/01/27 18:05:16 pooka Exp $ */ /*- * Copyright (c) 2011 Antti Kantee. All Rights Reserved. @@ -26,7 +26,7 @@ */ #include -__RCSID("$NetBSD: hijack.c,v 1.21 2011/01/26 18:48:32 christos Exp $"); +__RCSID("$NetBSD: hijack.c,v 1.22 2011/01/27 18:05:16 pooka Exp $"); #define __ssp_weak_name(fun) _hijack_ ## fun @@ -187,7 +187,6 @@ static void __attribute__((constructor)) rcinit(void) { - int (*rumpcinit)(void); void **rumpcdlsym; void *hand; unsigned i, j; @@ -195,8 +194,6 @@ hand = dlopen("librumpclient.so", RTLD_LAZY|RTLD_GLOBAL); if (!hand) err(1, "cannot open librumpclient.so"); - rumpcinit = dlsym(hand, "rumpclient_init"); - _DIAGASSERT(rumpcinit); rumpcdlsym = dlsym(hand, "rumpclient_dlsym"); *rumpcdlsym = hijackdlsym; @@ -229,8 +226,9 @@ syscnames[j].scm_rumpname); } - if (rumpcinit() == -1) + if (rumpclient_init() == -1) err(1, "rumpclient init"); + rumpclient_setconnretry(RUMPCLIENT_RETRYCONN_INFTIME); } /* XXX: need runtime selection. low for now due to FD_SETSIZE */
CVS commit: src/lib/librumpclient
Module Name:src Committed By: pooka Date: Thu Jan 27 18:04:05 UTC 2011 Modified Files: src/lib/librumpclient: rumpclient.c rumpclient.h Log Message: Allow to set a timeout for how long the client will attempt to reconnect in case the connection to the server is lost. Default to exactly one reattempt. This makes sense and additionally fixes the dev/raidframe/smalldisk test which currently causes a server panic when a certain raidctl command is run (without this fix the test would timeout since the client kept attempting to reconnect). To generate a diff of this commit: cvs rdiff -u -r1.19 -r1.20 src/lib/librumpclient/rumpclient.c cvs rdiff -u -r1.2 -r1.3 src/lib/librumpclient/rumpclient.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/lib/librumpclient/rumpclient.c diff -u src/lib/librumpclient/rumpclient.c:1.19 src/lib/librumpclient/rumpclient.c:1.20 --- src/lib/librumpclient/rumpclient.c:1.19 Wed Jan 26 14:42:41 2011 +++ src/lib/librumpclient/rumpclient.c Thu Jan 27 18:04:05 2011 @@ -1,4 +1,4 @@ -/* $NetBSD: rumpclient.c,v 1.19 2011/01/26 14:42:41 pooka Exp $ */ +/* $NetBSD: rumpclient.c,v 1.20 2011/01/27 18:04:05 pooka Exp $ */ /* * Copyright (c) 2010, 2011 Antti Kantee. All Rights Reserved. @@ -82,27 +82,83 @@ static int kq = -1; static sigset_t fullset; -static int doconnect(int); +static int doconnect(bool); static int handshake_req(struct spclient *, uint32_t *, int, bool); -int didrecon; +time_t retrytimo = RUMPCLIENT_RETRYCONN_ONCE; static int send_with_recon(struct spclient *spc, const void *data, size_t dlen) { + struct timeval starttime, curtime; + time_t prevreconmsg; + unsigned reconretries; int rv; - do { + for (prevreconmsg = 0, reconretries = 0;;) { rv = dosend(spc, data, dlen); if (__predict_false(rv == ENOTCONN || rv == EBADF)) { - if ((rv = doconnect(1)) != 0) + /* no persistent connections */ + if (retrytimo == 0) +break; + + if (!prevreconmsg) { +prevreconmsg = time(NULL); +gettimeofday(&starttime, NULL); + } + if (reconretries == 1) { +if (retrytimo == RUMPCLIENT_RETRYCONN_ONCE) { + rv = ENOTCONN; + break; +} +fprintf(stderr, "rump_sp: connection to " +"kernel lost, trying to reconnect ...\n"); + } else if (time(NULL) - prevreconmsg > 120) { +fprintf(stderr, "rump_sp: still trying to " +"reconnect ...\n"); +prevreconmsg = time(NULL); + } + + /* check that we aren't over the limit */ + if (retrytimo > 0) { +struct timeval tmp; + +gettimeofday(&curtime, NULL); +timersub(&curtime, &starttime, &tmp); +if (tmp.tv_sec >= retrytimo) { + fprintf(stderr, "rump_sp: reconnect " + "failed, %lld second timeout\n", + (long long)retrytimo); + return ENOTCONN; +} + } + + /* adhoc backoff timer */ + if (reconretries < 10) { +usleep(10 * reconretries); + } else { +sleep(MIN(10, reconretries-9)); + } + reconretries++; + + if ((rv = doconnect(false)) != 0) continue; if ((rv = handshake_req(&clispc, NULL, 0, true)) != 0) continue; - rv = ENOTCONN; + + /* + * ok, reconnect succesful. we need to return to + * the upper layer to get the entire PDU resent. + */ + if (reconretries != 1) +fprintf(stderr, "rump_sp: reconnected!\n"); + rv = EAGAIN; + break; + } else { + _DIAGASSERT(errno != EAGAIN); break; } - } while (__predict_false(rv != 0)); + } return rv; } @@ -235,7 +291,9 @@ } rv = cliwaitresp(spc, &rw, &omask, false); - } while (rv == ENOTCONN || rv == EAGAIN); + if (rv == ENOTCONN) + rv = EAGAIN; + } while (rv == EAGAIN); pthread_sigmask(SIG_SETMASK, &omask, NULL); *resp = rw.rw_data; @@ -316,7 +374,9 @@ } rv = cliwaitresp(spc, &rw, &omask, false); - } while (rv == ENOTCONN || rv == EAGAIN); + if (rv == ENOTCONN) + rv = EAGAIN; + } while (rv == EAGAIN); pthread_sigmask(SIG_SETMASK, &omask, NULL); *resp = rw.rw_data; @@ -474,10 +534,8 @@ static struct sockaddr *serv_sa; static int -doconnect(int retry) +doconnect(bool noisy) { - time_t prevreconmsg; - unsigned reconretries; struct respwait rw; struct rsp_hdr rhdr; struct kevent kev[NSIG+1]; @@ -491,16 +549,9 @@ kq = -1; s = -1; - prevreconmsg = 0; - reconretries = 0; - - again: if (clispc.spc_fd != -1) host_close(clispc.spc_fd); clispc.spc_fd = -1; - if (s != -1) - close(s); - s = -1; /* * for reconnect, gate everyone out of the receiver code @@ -538,50 +589,33 @@ while (host_connect(s, serv_sa, (socklen_t)serv_sa->sa_len) == -1) { if (errno == EINTR) continue; - if (!retry) { - error = errno; + error = errno; + if (noisy) fprintf(stderr, "rump_sp: client connect failed: %s\n", strerror(errno)); - errno = error; - return -1; - } - - if (prevreconmsg == 0) { - fprintf(stderr, "rump_sp: connection to kern
CVS commit: src/sys/arch/sandpoint/stand/altboot
Module Name:src Committed By: phx Date: Thu Jan 27 17:38:05 UTC 2011 Modified Files: src/sys/arch/sandpoint/stand/altboot: dsk.c fxp.c globals.h main.c nvt.c pci.c rge.c siisata.c sip.c skg.c sme.c vge.c wm.c Log Message: Debugging output is only visible when DEBUG is defined. To generate a diff of this commit: cvs rdiff -u -r1.2 -r1.3 src/sys/arch/sandpoint/stand/altboot/dsk.c \ src/sys/arch/sandpoint/stand/altboot/globals.h cvs rdiff -u -r1.1 -r1.2 src/sys/arch/sandpoint/stand/altboot/fxp.c \ src/sys/arch/sandpoint/stand/altboot/nvt.c \ src/sys/arch/sandpoint/stand/altboot/pci.c \ src/sys/arch/sandpoint/stand/altboot/rge.c \ src/sys/arch/sandpoint/stand/altboot/siisata.c \ src/sys/arch/sandpoint/stand/altboot/sip.c \ src/sys/arch/sandpoint/stand/altboot/skg.c \ src/sys/arch/sandpoint/stand/altboot/sme.c \ src/sys/arch/sandpoint/stand/altboot/vge.c \ src/sys/arch/sandpoint/stand/altboot/wm.c cvs rdiff -u -r1.4 -r1.5 src/sys/arch/sandpoint/stand/altboot/main.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/sandpoint/stand/altboot/dsk.c diff -u src/sys/arch/sandpoint/stand/altboot/dsk.c:1.2 src/sys/arch/sandpoint/stand/altboot/dsk.c:1.3 --- src/sys/arch/sandpoint/stand/altboot/dsk.c:1.2 Sun Jan 23 01:32:08 2011 +++ src/sys/arch/sandpoint/stand/altboot/dsk.c Thu Jan 27 17:38:04 2011 @@ -1,4 +1,4 @@ -/* $NetBSD: dsk.c,v 1.2 2011/01/23 01:32:08 nisimura Exp $ */ +/* $NetBSD: dsk.c,v 1.3 2011/01/27 17:38:04 phx Exp $ */ /*- * Copyright (c) 2010 The NetBSD Foundation, Inc. @@ -239,12 +239,10 @@ uint64_t huge; p = (uint16_t *)ident; -#if 1 -printf("[49]%04x [82]%04x [83]%04x [84]%04x " - "[85]%04x [86]%04x [87]%04x [88]%04x\n", - p[49], p[82], p[83], p[84], - p[85], p[86], p[87], p[88]); -#endif + DPRINTF(("[49]%04x [82]%04x [83]%04x [84]%04x " + "[85]%04x [86]%04x [87]%04x [88]%04x\n", + p[49], p[82], p[83], p[84], + p[85], p[86], p[87], p[88])); huge = 0; printf("%s: ", d->xname); printf("<%s> ", mkident((char *)ident + 54, 40)); @@ -332,7 +330,6 @@ found: d->dlabel = allocaligned(sizeof(struct disklabel), 4); memcpy(d->dlabel, dlp, sizeof(struct disklabel)); -#if 1 for (i = 0; i < dlp->d_npartitions; i += 1) { const char *type; pp = &dlp->d_partitions[i]; @@ -351,7 +348,6 @@ if (type != NULL) printf("%s%c: %s\n", d->xname, i + 'a', type); } -#endif } static void @@ -480,9 +476,6 @@ } return ENXIO; found: -#if 0 -printf("dsk_open found %s\n", fsmod); -#endif d->fsops = fs; f->f_devdata = d; @@ -512,9 +505,6 @@ struct disklabel *dlp; int64_t bno; -#if 0 -printf("%s %lld %d\n", d->xname, dblk, size); -#endif if (size == 0) return 0; if (rw != F_READ) Index: src/sys/arch/sandpoint/stand/altboot/globals.h diff -u src/sys/arch/sandpoint/stand/altboot/globals.h:1.2 src/sys/arch/sandpoint/stand/altboot/globals.h:1.3 --- src/sys/arch/sandpoint/stand/altboot/globals.h:1.2 Sun Jan 23 01:32:08 2011 +++ src/sys/arch/sandpoint/stand/altboot/globals.h Thu Jan 27 17:38:04 2011 @@ -1,4 +1,10 @@ -/* $NetBSD: globals.h,v 1.2 2011/01/23 01:32:08 nisimura Exp $ */ +/* $NetBSD: globals.h,v 1.3 2011/01/27 17:38:04 phx Exp $ */ + +#ifdef DEBUG +#define DPRINTF(x) printf x +#else +#define DPRINTF(x) +#endif /* clock feed */ #ifndef EXT_CLK_FREQ Index: src/sys/arch/sandpoint/stand/altboot/fxp.c diff -u src/sys/arch/sandpoint/stand/altboot/fxp.c:1.1 src/sys/arch/sandpoint/stand/altboot/fxp.c:1.2 --- src/sys/arch/sandpoint/stand/altboot/fxp.c:1.1 Sun Jan 23 01:05:30 2011 +++ src/sys/arch/sandpoint/stand/altboot/fxp.c Thu Jan 27 17:38:04 2011 @@ -1,4 +1,4 @@ -/* $NetBSD: fxp.c,v 1.1 2011/01/23 01:05:30 nisimura Exp $ */ +/* $NetBSD: fxp.c,v 1.2 2011/01/27 17:38:04 phx Exp $ */ /* * most of the following code was imported from dev/ic/i82557.c; the @@ -132,7 +132,9 @@ static void autosize_eeprom(struct local *); static int read_eeprom(struct local *, int); static void fxp_scb_wait(struct local *); +#ifdef DEBUG static int fxp_mdi_read(struct local *, int, int); +#endif /* * Template for default configuration parameters. @@ -208,8 +210,8 @@ printf("MAC address %02x:%02x:%02x:%02x:%02x:%02x, ", en[0], en[1], en[2], en[3], en[4], en[5]); - printf("PHY %d (%04x.%04x)\n", fxp_mdi_read(sc, 1, 18), - fxp_mdi_read(sc, 1, 2), fxp_mdi_read(sc, 1, 3)); + DPRINTF(("PHY %d (%04x.%04x)\n", fxp_mdi_read(sc, 1, 18), + fxp_mdi_read(sc, 1, 2), fxp_mdi_read(sc, 1, 3))); /* * Initialize base of CBL and RFA memory. Loading with zero @@ -505,6 +507,7 @@ printf("SCB timeout\n"); } +#ifdef DEBUG static int fxp_mdi_read(struct local *sc, int phy, int reg) { @@ -523,3 +526,4 @@ return (value & 0x); } +#endif Index: src/sys/arch/sandpoint/stand/altboot/nvt.c diff -u src/sys/arch/sandpoint/stand/altboot/nvt.c:1.1 src/sys/arch/sandpoin
CVS commit: src/sys/rump/librump/rumpkern
Module Name:src Committed By: pooka Date: Thu Jan 27 17:36:27 UTC 2011 Modified Files: src/sys/rump/librump/rumpkern: rump.c Log Message: Fix syscall name for compat syscalls. Arguably makesyscalls.sh should generate the right info, but it's easier to fix here now. This fixes compat syscalls for rump servers with dynamically loaded components. Since the compat syscall revamp a little time ago e.g. stat() didn't work on my system (which is 5.0-based) with e.g. rump_server -lrumpvfs. Static servers and non-compat syscalls worked just fine, though, making this a little harder to spot that the usual bug. To generate a diff of this commit: cvs rdiff -u -r1.221 -r1.222 src/sys/rump/librump/rumpkern/rump.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.221 src/sys/rump/librump/rumpkern/rump.c:1.222 --- src/sys/rump/librump/rumpkern/rump.c:1.221 Sat Jan 22 18:33:25 2011 +++ src/sys/rump/librump/rumpkern/rump.c Thu Jan 27 17:36:27 2011 @@ -1,4 +1,4 @@ -/* $NetBSD: rump.c,v 1.221 2011/01/22 18:33:25 pooka Exp $ */ +/* $NetBSD: rump.c,v 1.222 2011/01/27 17:36:27 pooka Exp $ */ /* * Copyright (c) 2007 Antti Kantee. All Rights Reserved. @@ -28,7 +28,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: rump.c,v 1.221 2011/01/22 18:33:25 pooka Exp $"); +__KERNEL_RCSID(0, "$NetBSD: rump.c,v 1.222 2011/01/27 17:36:27 pooka Exp $"); #include #define ELFSIZE ARCH_ELFSIZE @@ -469,8 +469,38 @@ rump_sysent[i].sy_call == sys_nomodule) continue; - /* if present, adjust symbol value */ - sprintf(buf, "rumpns_sys_%s", syscallnames[i]); + /* + * deal with compat wrappers. makesyscalls.sh should + * generate the necessary info instead of this hack, + * though. ugly, fix it later. + */ +#define CPFX "compat_" +#define CPFXLEN (sizeof(CPFX)-1) + if (strncmp(syscallnames[i], CPFX, CPFXLEN) == 0) { + const char *p = syscallnames[i] + CPFXLEN; + size_t namelen; + + /* skip version number */ + while (*p >= '0' && *p <= '9') +p++; + if (p == syscallnames[i] + CPFXLEN || *p != '_') +panic("invalid syscall name %s\n", +syscallnames[i]); + + /* skip over the next underscore */ + p++; + namelen = p + (sizeof("rumpns_")-1) - syscallnames[i]; + + strcpy(buf, "rumpns_"); + strcat(buf, syscallnames[i]); + /* XXX: no strncat in the kernel */ + strcpy(buf+namelen, "sys_"); + strcat(buf, p); +#undef CPFX +#undef CPFXLEN + } else { + sprintf(buf, "rumpns_sys_%s", syscallnames[i]); + } if ((sym = rumpuser_dl_globalsym(buf)) != NULL && sym != rump_sysent[i].sy_call) { #if 0
CVS commit: src/sys/arch/sandpoint/stand/altboot
Module Name:src Committed By: phx Date: Thu Jan 27 16:13:51 UTC 2011 Modified Files: src/sys/arch/sandpoint/stand/altboot: Makefile Log Message: Some cleanup. No functional change. To generate a diff of this commit: cvs rdiff -u -r1.5 -r1.6 src/sys/arch/sandpoint/stand/altboot/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/arch/sandpoint/stand/altboot/Makefile diff -u src/sys/arch/sandpoint/stand/altboot/Makefile:1.5 src/sys/arch/sandpoint/stand/altboot/Makefile:1.6 --- src/sys/arch/sandpoint/stand/altboot/Makefile:1.5 Thu Jan 27 04:54:40 2011 +++ src/sys/arch/sandpoint/stand/altboot/Makefile Thu Jan 27 16:13:51 2011 @@ -1,12 +1,13 @@ -# $NetBSD: Makefile,v 1.5 2011/01/27 04:54:40 nisimura Exp $ +# $NetBSD: Makefile,v 1.6 2011/01/27 16:13:51 phx Exp $ S= ${.CURDIR}/../../../.. PROG= altboot NOMAN= # defined -SRCS= entry.S main.c brdsetup.c pci.c devopen.c dev_net.c nif.c \ - fxp.c tlp.c rge.c skg.c dsk.c pciide.c siisata.c printf.c -CLEANFILES+= vers.c vers.o ${PROG} ${PROG}.bin +SRCS= entry.S main.c brdsetup.c pci.c devopen.c dev_net.c nif.c +SRCS+= fxp.c tlp.c rge.c skg.c dsk.c pciide.c siisata.c printf.c +SRCS+= vers.c +CLEANFILES+= vers.c ${PROG} ${PROG}.bin CFLAGS+= -Wall -Wno-main -ffreestanding -msoft-float -mmultiple CFLAGS+= -Wmissing-prototypes -Wstrict-prototypes -Wpointer-arith CPPFLAGS+= -D_STANDALONE -DSUPPORT_DHCP @@ -53,17 +54,14 @@ .include "${S}/lib/libsa/Makefile.inc" LIBSA= ${SALIB} -${PROG}: ${OBJS} ${LIBSA} ${LIBZ} ${LIBKERN} +.PHONY: vers.c +vers.c: version ${HOST_SH} ${S}/conf/newvers_stand.sh -K \ - ${${MKREPRO} == "yes" :?:-D} ${.CURDIR}/version sandpoint - ${CC} -c vers.c + ${${MKREPRO} == "yes" :?:-D} ${.CURDIR}/version "sandpoint" + +${PROG}: ${OBJS} ${LIBSA} ${LIBZ} ${LIBKERN} ${LD} -N -Ttext ${RELOC} -Bstatic -e ${ENTRY} -o ${PROG} \ - ${OBJS} vers.o ${LIBSA} ${LIBZ} ${LIBKERN} + ${OBJS} ${LIBSA} ${LIBZ} ${LIBKERN} ${OBJCOPY} -S -O binary ${.TARGET} ${.TARGET}.bin .include - -cleandir distclean: .WAIT cleanlibdir - -cleanlibdir: - -rm -rf lib
CVS commit: src/distrib/i386/cdroms
Module Name:src Committed By: gdt Date: Thu Jan 27 15:34:38 UTC 2011 Modified Files: src/distrib/i386/cdroms: Makefile.cdrom Log Message: Use ${INSTALL} ${COPY} instead of ${CP}. This avoids a problem where files with mode 0400 (CVSREAD=t) are copied to OBJDIR and then can't be re-copied on a subsequent build. ok joerg@ To generate a diff of this commit: cvs rdiff -u -r1.22 -r1.23 src/distrib/i386/cdroms/Makefile.cdrom Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/distrib/i386/cdroms/Makefile.cdrom diff -u src/distrib/i386/cdroms/Makefile.cdrom:1.22 src/distrib/i386/cdroms/Makefile.cdrom:1.23 --- src/distrib/i386/cdroms/Makefile.cdrom:1.22 Fri Jan 14 10:26:33 2011 +++ src/distrib/i386/cdroms/Makefile.cdrom Thu Jan 27 15:34:38 2011 @@ -1,4 +1,4 @@ -# $NetBSD: Makefile.cdrom,v 1.22 2011/01/14 10:26:33 tsutsui Exp $ +# $NetBSD: Makefile.cdrom,v 1.23 2011/01/27 15:34:38 gdt Exp $ .include @@ -55,15 +55,15 @@ image_md_pre: ${MKDIR} cdrom/libexec/dhcpcd-hooks - ${CP} ${.CURDIR}/../../../common/10-resolv.conf cdrom/libexec/dhcpcd-hooks - ${CP} ${.CURDIR}/../../../common/99-print-sysinst cdrom/libexec/dhcpcd-hooks + ${INSTALL} ${COPY} ${.CURDIR}/../../../common/10-resolv.conf cdrom/libexec/dhcpcd-hooks + ${INSTALL} ${COPY} ${.CURDIR}/../../../common/99-print-sysinst cdrom/libexec/dhcpcd-hooks ${MKDIR} cdrom/etc ${HOST_LN} -fs /tmp/gettytab cdrom/etc/gettytab ${INSTALL} ${COPY} ${.CURDIR}/../etc.ttys cdrom/etc/ttys ${INSTALL} ${COPY} ${.CURDIR}/../etc.rc cdrom/etc/rc ${INSTALL} ${COPY} -m 0555 ${.CURDIR}/../install.sh cdrom/install.sh ${MKDIR} cdrom/mnt2 cdrom/targetroot - ${CP} ${SYSINSTDIR}/sysinst cdrom + ${INSTALL} ${COPY} ${SYSINSTDIR}/sysinst cdrom ${CHMOD} ugo+rx cdrom/sysinst - ${CP} ${SYSINSTDIR}/sysinstmsgs.?? cdrom + ${INSTALL} ${COPY} ${SYSINSTDIR}/sysinstmsgs.?? cdrom ${MKDIR} cdrom/var
CVS commit: src
Module Name:src Committed By: wiz Date: Thu Jan 27 14:48:37 UTC 2011 Modified Files: src/distrib/sets/lists/comp: mi src/share/man/man9: Makefile Log Message: Link kprintf(9) to device_printf(9). For David. To generate a diff of this commit: cvs rdiff -u -r1.1576 -r1.1577 src/distrib/sets/lists/comp/mi cvs rdiff -u -r1.343 -r1.344 src/share/man/man9/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/lists/comp/mi diff -u src/distrib/sets/lists/comp/mi:1.1576 src/distrib/sets/lists/comp/mi:1.1577 --- src/distrib/sets/lists/comp/mi:1.1576 Tue Jan 25 12:56:25 2011 +++ src/distrib/sets/lists/comp/mi Thu Jan 27 14:48:36 2011 @@ -1,4 +1,4 @@ -# $NetBSD: mi,v 1.1576 2011/01/25 12:56:25 pooka Exp $ +# $NetBSD: mi,v 1.1577 2011/01/27 14:48:36 wiz Exp $ # # Note: don't delete entries from here - mark them as "obsolete" instead. # @@ -9243,6 +9243,7 @@ ./usr/share/man/cat9/dbtob.0 comp-sys-catman .cat ./usr/share/man/cat9/ddc.0 comp-sys-catman .cat ./usr/share/man/cat9/delay.0 comp-sys-catman .cat +./usr/share/man/cat9/device_printf.0 comp-sys-catman .cat ./usr/share/man/cat9/deviter.0 comp-sys-catman .cat ./usr/share/man/cat9/deviter_first.0 comp-sys-catman .cat ./usr/share/man/cat9/deviter_init.0 comp-sys-catman .cat @@ -15173,6 +15174,7 @@ ./usr/share/man/html9/dbtob.html comp-sys-htmlman html ./usr/share/man/html9/ddc.html comp-sys-htmlman html ./usr/share/man/html9/delay.html comp-sys-htmlman html +./usr/share/man/html9/device_printf.html comp-sys-htmlman html ./usr/share/man/html9/deviter.html comp-sys-htmlman html ./usr/share/man/html9/deviter_first.html comp-sys-htmlman html ./usr/share/man/html9/deviter_init.html comp-sys-htmlman html @@ -21248,6 +21250,7 @@ ./usr/share/man/man9/dbtob.9 comp-sys-man .man ./usr/share/man/man9/ddc.9 comp-sys-man .man ./usr/share/man/man9/delay.9 comp-sys-man .man +./usr/share/man/man9/device_printf.9 comp-sys-man .man ./usr/share/man/man9/deviter.9 comp-sys-man .man ./usr/share/man/man9/deviter_first.9 comp-sys-man .man ./usr/share/man/man9/deviter_init.9 comp-sys-man .man Index: src/share/man/man9/Makefile diff -u src/share/man/man9/Makefile:1.343 src/share/man/man9/Makefile:1.344 --- src/share/man/man9/Makefile:1.343 Fri Nov 19 06:44:48 2010 +++ src/share/man/man9/Makefile Thu Jan 27 14:48:37 2011 @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.343 2010/11/19 06:44:48 dholland Exp $ +# $NetBSD: Makefile,v 1.344 2011/01/27 14:48:37 wiz Exp $ # Makefile for section 9 (kernel function and variable) manual pages. @@ -384,7 +384,8 @@ kprintf.9 aprint_error_dev.9 \ kprintf.9 aprint_normal_ifnet.9 kprintf.9 aprint_naive_ifnet.9 \ kprintf.9 aprint_verbose_ifnet.9 kprintf.9 aprint_debug_ifnet.9 \ - kprintf.9 aprint_error_ifnet.9 kprintf.9 aprint_get_error_count.9 + kprintf.9 aprint_error_ifnet.9 kprintf.9 aprint_get_error_count.9 \ + kprintf.9 device_printf.9 MLINKS+=kthread.9 kthread_exit.9 \ kthread.9 kthread_create.9 \ kthread.9 kthread_destroy.9 \
CVS commit: src/sys/arch/hp700/dev
Module Name:src Committed By: skrll Date: Thu Jan 27 13:57:39 UTC 2011 Modified Files: src/sys/arch/hp700/dev: apic.c Log Message: Trailing whitespace. To generate a diff of this commit: cvs rdiff -u -r1.9 -r1.10 src/sys/arch/hp700/dev/apic.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/hp700/dev/apic.c diff -u src/sys/arch/hp700/dev/apic.c:1.9 src/sys/arch/hp700/dev/apic.c:1.10 --- src/sys/arch/hp700/dev/apic.c:1.9 Tue Jan 4 10:42:33 2011 +++ src/sys/arch/hp700/dev/apic.c Thu Jan 27 13:57:39 2011 @@ -1,4 +1,4 @@ -/* $NetBSD: apic.c,v 1.9 2011/01/04 10:42:33 skrll Exp $ */ +/* $NetBSD: apic.c,v 1.10 2011/01/27 13:57:39 skrll Exp $ */ /* $OpenBSD: apic.c,v 1.7 2007/10/06 23:50:54 krw Exp $ */ @@ -266,7 +266,7 @@ err = pdcproc_pci_inttblsz(&nentries); if (err) return; - + size = nentries * sizeof(struct pdc_pat_pci_rt); sc->sc_int_tbl_sz = nentries; sc->sc_int_tbl = malloc(size, M_DEVBUF, M_NOWAIT); @@ -337,9 +337,9 @@ for (i = 0; i < sc->sc_int_tbl_sz; i++) { printf("type=%x ", sc->sc_int_tbl[i].type); printf("len=%d ", sc->sc_int_tbl[i].len); - printf("itype=%d ", sc->sc_int_tbl[i].itype); - printf("trigger=%x ", sc->sc_int_tbl[i].trigger); - printf("pin=%x ", sc->sc_int_tbl[i].pin); + printf("itype=%d ", sc->sc_int_tbl[i].itype); + printf("trigger=%x ", sc->sc_int_tbl[i].trigger); + printf("pin=%x ", sc->sc_int_tbl[i].pin); printf("bus=%d ", sc->sc_int_tbl[i].bus); printf("line=%d ", sc->sc_int_tbl[i].line); printf("addr=%llx\n", sc->sc_int_tbl[i].addr);
CVS commit: src/sys/arch/mips/include
Module Name:src Committed By: tsutsui Date: Thu Jan 27 13:42:10 UTC 2011 Modified Files: src/sys/arch/mips/include: ieeefp.h Log Message: Fix swapped comments. To generate a diff of this commit: cvs rdiff -u -r1.5 -r1.6 src/sys/arch/mips/include/ieeefp.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/mips/include/ieeefp.h diff -u src/sys/arch/mips/include/ieeefp.h:1.5 src/sys/arch/mips/include/ieeefp.h:1.6 --- src/sys/arch/mips/include/ieeefp.h:1.5 Tue Aug 5 16:47:42 2008 +++ src/sys/arch/mips/include/ieeefp.h Thu Jan 27 13:42:09 2011 @@ -1,4 +1,4 @@ -/* $NetBSD: ieeefp.h,v 1.5 2008/08/05 16:47:42 matt Exp $ */ +/* $NetBSD: ieeefp.h,v 1.6 2011/01/27 13:42:09 tsutsui Exp $ */ /* * Written by J.T. Conklin, Apr 11, 1995 @@ -16,9 +16,9 @@ typedef int fexcept_t; #define FE_INEXACT 0x01 /* imprecise (loss of precision) */ -#define FE_UNDERFLOW 0x02 /* divide-by-zero exception */ +#define FE_UNDERFLOW 0x02 /* underflow exception */ #define FE_OVERFLOW 0x04 /* overflow exception */ -#define FE_DIVBYZERO 0x08 /* underflow exception */ +#define FE_DIVBYZERO 0x08 /* divide-by-zero exception */ #define FE_INVALID 0x10 /* invalid operation exception */ #define FE_ALL_EXCEPT 0x1f
CVS commit: src/usr.sbin/btpand
Module Name:src Committed By: plunky Date: Thu Jan 27 12:19:48 UTC 2011 Modified Files: src/usr.sbin/btpand: bnep.c Log Message: when a BNEP channel is opened, clear any NetType or MulticastAddress filters that may be in effect at the remote side. To generate a diff of this commit: cvs rdiff -u -r1.8 -r1.9 src/usr.sbin/btpand/bnep.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/usr.sbin/btpand/bnep.c diff -u src/usr.sbin/btpand/bnep.c:1.8 src/usr.sbin/btpand/bnep.c:1.9 --- src/usr.sbin/btpand/bnep.c:1.8 Tue May 12 21:08:30 2009 +++ src/usr.sbin/btpand/bnep.c Thu Jan 27 12:19:48 2011 @@ -1,4 +1,4 @@ -/* $NetBSD: bnep.c,v 1.8 2009/05/12 21:08:30 plunky Exp $ */ +/* $NetBSD: bnep.c,v 1.9 2011/01/27 12:19:48 plunky Exp $ */ /*- * Copyright (c) 2008 Iain Hibbert @@ -26,7 +26,7 @@ */ #include -__RCSID("$NetBSD: bnep.c,v 1.8 2009/05/12 21:08:30 plunky Exp $"); +__RCSID("$NetBSD: bnep.c,v 1.9 2011/01/27 12:19:48 plunky Exp $"); #include #include @@ -370,6 +370,10 @@ ether_ntoa((struct ether_addr *)chan->raddr), rsp); bnep_send_control(chan, BNEP_SETUP_CONNECTION_RESPONSE, rsp); + if (rsp == BNEP_SETUP_SUCCESS) { + bnep_send_control(chan, BNEP_FILTER_NET_TYPE_SET); + bnep_send_control(chan, BNEP_FILTER_MULTI_ADDR_SET); + } return (len * 2 + 1); } @@ -394,6 +398,8 @@ if (rsp == BNEP_SETUP_SUCCESS) { chan->state = CHANNEL_OPEN; channel_timeout(chan, 0); + bnep_send_control(chan, BNEP_FILTER_NET_TYPE_SET); + bnep_send_control(chan, BNEP_FILTER_MULTI_ADDR_SET); } else { chan->down(chan); } @@ -480,7 +486,6 @@ log_err("filter_net_type: addr %s response 0x%2.2x", ether_ntoa((struct ether_addr *)chan->raddr), rsp); - /* we did not send any filter_net_type_set message */ return 2; } @@ -570,7 +575,6 @@ log_err("filter_multi_addr: addr %s response 0x%2.2x", ether_ntoa((struct ether_addr *)chan->raddr), rsp); - /* we did not send any filter_multi_addr_set message */ return 2; } @@ -613,8 +617,12 @@ p += 2; break; - case BNEP_FILTER_NET_TYPE_SET: /* TODO */ - case BNEP_FILTER_MULTI_ADDR_SET: /* TODO */ + case BNEP_FILTER_NET_TYPE_SET: + case BNEP_FILTER_MULTI_ADDR_SET: + be16enc(p, 0); /* just clear filters for now */ + p += 2; + break; + default: log_err("Can't send control type 0x%2.2x", type); break;
CVS commit: src/share/man
Module Name:src Committed By: nisimura Date: Thu Jan 27 11:33:43 UTC 2011 Modified Files: src/share/man/man4/man4.sandpoint: satmgr.4 src/share/man/man8/man8.sandpoint: altboot.8 Log Message: add missing license notice as suggested by wiz@. To generate a diff of this commit: cvs rdiff -u -r1.2 -r1.3 src/share/man/man4/man4.sandpoint/satmgr.4 cvs rdiff -u -r1.2 -r1.3 src/share/man/man8/man8.sandpoint/altboot.8 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/man4.sandpoint/satmgr.4 diff -u src/share/man/man4/man4.sandpoint/satmgr.4:1.2 src/share/man/man4/man4.sandpoint/satmgr.4:1.3 --- src/share/man/man4/man4.sandpoint/satmgr.4:1.2 Thu Jan 27 09:50:00 2011 +++ src/share/man/man4/man4.sandpoint/satmgr.4 Thu Jan 27 11:33:43 2011 @@ -1,4 +1,32 @@ -.\" $NetBSD: satmgr.4,v 1.2 2011/01/27 09:50:00 wiz Exp $ +.\" $NetBSD: satmgr.4,v 1.3 2011/01/27 11:33:43 nisimura Exp $ +.\" +.\" Copyright (c) 2011 The NetBSD Foundation, Inc. +.\" All rights reserved. +.\" +.\" This code is derived from software contributed to The NetBSD Foundation +.\" by Tohru Nishimura. +.\" +.\" Redistribution and use in source and binary forms, with or without +.\" modification, are permitted provided that the following conditions +.\" are met: +.\" 1. Redistributions of source code must retain the above copyright +.\"notice, this list of conditions and the following disclaimer. +.\" 2. Redistributions in binary form must reproduce the above copyright +.\"notice, this list of conditions and the following disclaimer in the +.\"documentation and/or other materials provided with the distribution. +.\" +.\" THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS +.\" ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED +.\" TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR +.\" PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS +.\" BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR +.\" CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF +.\" SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS +.\" INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN +.\" CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) +.\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE +.\" POSSIBILITY OF SUCH DAMAGE. +.\" .Dd January 26, 2011 .Dt SATMGR 4 sandpoint .Os Index: src/share/man/man8/man8.sandpoint/altboot.8 diff -u src/share/man/man8/man8.sandpoint/altboot.8:1.2 src/share/man/man8/man8.sandpoint/altboot.8:1.3 --- src/share/man/man8/man8.sandpoint/altboot.8:1.2 Thu Jan 27 09:52:13 2011 +++ src/share/man/man8/man8.sandpoint/altboot.8 Thu Jan 27 11:33:43 2011 @@ -1,4 +1,32 @@ -.\" $NetBSD: altboot.8,v 1.2 2011/01/27 09:52:13 wiz Exp $ +.\" $NetBSD: altboot.8,v 1.3 2011/01/27 11:33:43 nisimura Exp $ +.\" +.\" Copyright (c) 2011 The NetBSD Foundation, Inc. +.\" All rights reserved. +.\" +.\" This code is derived from software contributed to The NetBSD Foundation +.\" by Tohru Nishimura. +.\" +.\" Redistribution and use in source and binary forms, with or without +.\" modification, are permitted provided that the following conditions +.\" are met: +.\" 1. Redistributions of source code must retain the above copyright +.\"notice, this list of conditions and the following disclaimer. +.\" 2. Redistributions in binary form must reproduce the above copyright +.\"notice, this list of conditions and the following disclaimer in the +.\"documentation and/or other materials provided with the distribution. +.\" +.\" THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS +.\" ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED +.\" TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR +.\" PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS +.\" BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR +.\" CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF +.\" SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS +.\" INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN +.\" CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) +.\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE +.\" POSSIBILITY OF SUCH DAMAGE. +.\" .Dd January 26, 2011 .Dt ALTBOOT 8 sandpoint .Os
CVS commit: src/usr.sbin/btpand
Module Name:src Committed By: plunky Date: Thu Jan 27 11:14:00 UTC 2011 Modified Files: src/usr.sbin/btpand: channel.c Log Message: style nit To generate a diff of this commit: cvs rdiff -u -r1.3 -r1.4 src/usr.sbin/btpand/channel.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/usr.sbin/btpand/channel.c diff -u src/usr.sbin/btpand/channel.c:1.3 src/usr.sbin/btpand/channel.c:1.4 --- src/usr.sbin/btpand/channel.c:1.3 Tue May 12 21:08:30 2009 +++ src/usr.sbin/btpand/channel.c Thu Jan 27 11:13:59 2011 @@ -1,4 +1,4 @@ -/* $NetBSD: channel.c,v 1.3 2009/05/12 21:08:30 plunky Exp $ */ +/* $NetBSD: channel.c,v 1.4 2011/01/27 11:13:59 plunky Exp $ */ /*- * Copyright (c) 2008 Iain Hibbert @@ -26,7 +26,7 @@ */ #include -__RCSID("$NetBSD: channel.c,v 1.3 2009/05/12 21:08:30 plunky Exp $"); +__RCSID("$NetBSD: channel.c,v 1.4 2011/01/27 11:13:59 plunky Exp $"); #include @@ -312,7 +312,7 @@ channel_tick = tick; } - if (channel_tick != 0 && evtimer_add(arg, &tv) < 0) { + if (channel_tick != 0 && evtimer_add(arg, &tv) == -1) { log_err("Could not add watchdog event: %m"); exit(EXIT_FAILURE); }
CVS commit: src/share/man/man8/man8.sandpoint
Module Name:src Committed By: wiz Date: Thu Jan 27 09:52:13 UTC 2011 Modified Files: src/share/man/man8/man8.sandpoint: altboot.8 Log Message: New sentence, new line; full month name in Dd; add RCS Id. To generate a diff of this commit: cvs rdiff -u -r1.1 -r1.2 src/share/man/man8/man8.sandpoint/altboot.8 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/man8/man8.sandpoint/altboot.8 diff -u src/share/man/man8/man8.sandpoint/altboot.8:1.1 src/share/man/man8/man8.sandpoint/altboot.8:1.2 --- src/share/man/man8/man8.sandpoint/altboot.8:1.1 Wed Jan 26 11:25:51 2011 +++ src/share/man/man8/man8.sandpoint/altboot.8 Thu Jan 27 09:52:13 2011 @@ -1,4 +1,5 @@ -.Dd Jan 26, 2011 +.\" $NetBSD: altboot.8,v 1.2 2011/01/27 09:52:13 wiz Exp $ +.Dd January 26, 2011 .Dt ALTBOOT 8 sandpoint .Os .Sh NAME @@ -12,7 +13,8 @@ .Nx program which works on top of a .Tn NAS -product's bootloader. It is capable of loading a +product's bootloader. +It is capable of loading a .Nx kernel from an .Tn IDE @@ -24,9 +26,9 @@ .Tn TFTP protocol. .Nm -can be stored in flash ROM. Typically you will first copy it from -flash into RAM and then invoke it there to boot -the +can be stored in flash ROM. +Typically you will first copy it from flash into RAM and then invoke +it there to boot the .Nx kernel. .Pp @@ -35,20 +37,21 @@ .Tn U-Boot/PPCBoot bootloaders used by .Tn NAS -products. With an appropriate boot command line, -saved in the environment, +products. +With an appropriate boot command line, saved in the environment, .Nm can load and start a .Nx -kernel without manual intervention. The original +kernel without manual intervention. +The original .Tn U-Boot/PPCBoot bootloaders remain useful and altboot works as a functional extension of them. .Sh EXAMPLES .Nm occupies less than 128KB in volume and can be stored to any vacant -space of the system's flash. It is made to run at RAM address offset -0x0100'. +space of the system's flash. +It is made to run at RAM address offset 0x0100'. .Tn U-Boot/PPCboot is instructed to copy the program to RAM in this way: .Pp @@ -64,11 +67,11 @@ .Bl -tag -width xx .It Va optN multi, auto, ask, single, ddb, userconf, norm, quiet, verb, -silient, debug +silent, debug .Pp Omitting optN makes .Nm -default to multi-user mode boot. +default to multi-user mode boot. .Pp N.B., the maximum number of the go command argument varies and depends on the @@ -126,12 +129,13 @@ from an .Tn FFSv2 or -.Tn FFSv1 +.Tn FFSv1 filesystem. .Em N is a number to distinguish the target drive. .Em p -is a partition specifier. When omitted, partition +is a partition specifier. +When omitted, partition .Sq a is assumed. .Dq wd0a @@ -152,7 +156,8 @@ The following is a procedure to setup the system for starting .Nx after a 5 second delay, allowing the user to break into interactive -mode. Note that a backslashed +mode. +Note that a backslashed .Sq \&; is necessary to enter the script correctly. .Bd -literal -offset indent
CVS commit: src/share/man/man4/man4.sandpoint
Module Name:src Committed By: wiz Date: Thu Jan 27 09:50:01 UTC 2011 Modified Files: src/share/man/man4/man4.sandpoint: satmgr.4 Log Message: Dd arguments should be full month names; new sentence, new line; add serial comma; remove trailing whitespace; avoid xref to itself. To generate a diff of this commit: cvs rdiff -u -r1.1 -r1.2 src/share/man/man4/man4.sandpoint/satmgr.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/man4.sandpoint/satmgr.4 diff -u src/share/man/man4/man4.sandpoint/satmgr.4:1.1 src/share/man/man4/man4.sandpoint/satmgr.4:1.2 --- src/share/man/man4/man4.sandpoint/satmgr.4:1.1 Wed Jan 26 11:25:51 2011 +++ src/share/man/man4/man4.sandpoint/satmgr.4 Thu Jan 27 09:50:00 2011 @@ -1,11 +1,10 @@ -.Dd Jan 26, 2011 +.\" $NetBSD: satmgr.4,v 1.2 2011/01/27 09:50:00 wiz Exp $ +.Dd January 26, 2011 .Dt SATMGR 4 sandpoint .Os .Sh NAME .Nm satmgr -.Nd -driver for satellite processor, controlling power, front panel LEDs -and buttons +.Nd driver for satellite processor, controlling power, front panel LEDs, and buttons .Sh SYNOPSIS .Cd "satmgr0 at eumb? unit 0" .Cd "satmgr0 at eumb? unit 1" @@ -13,8 +12,9 @@ This driver provides an interface to the .Tn NAS builtin satellite microprocessor which controls the power, front -panel LEDs and push buttons. Communication is performed through -character sequences, whose definition and usage depend on the +panel LEDs, and push buttons. +Communication is performed through character sequences, whose +definition and usage depend on the .Tn NAS product models. .Pp @@ -30,21 +30,22 @@ .Pp .Nm detects a soft power-off condition, which is triggered by holding -the front panel power button pressed for several seconds. This -driver can optionally invoke +the front panel power button pressed for several seconds. +This driver can optionally invoke .Xr powerd 8 -to get a finer control over the system shutdown procedure. It is -capable of reporting a power-button-pressed event. Refer to the +to get a finer control over the system shutdown procedure. +It is capable of reporting a power-button-pressed event. +Refer to the .Xr powerd 8 manual section for more details. .Pp For .Tn "Kurobox/Linkstation" .Tn NAS -products it also provides a way to -toggle the system watchdog with the +products it also provides a way to toggle the system watchdog with the .Xr sysctl 8 -utility. The usage is: +utility. +The usage is: .Bd -literal -offset indent # sysctl -w machdep.satmgr.hwwdog_enable=1 # sysctl -w machdep.satmgr.hwwdog_enable=0 @@ -52,7 +53,7 @@ .Pp .Tn NAS products currently supported by -.Xr satmgr 4 : +.Nm : .Bl -bullet -compact .It KuroBox @@ -71,7 +72,7 @@ .Xr powerd 8 . .El .Sh SEE ALSO -.Xr powerd 8 +.Xr powerd 8 .Sh HISTORY The .Nm
CVS commit: src/share/man/man4
Module Name:src Committed By: wiz Date: Thu Jan 27 09:46:59 UTC 2011 Modified Files: src/share/man/man4: vte.4 Log Message: Remove trailing whitespace. To generate a diff of this commit: cvs rdiff -u -r1.1 -r1.2 src/share/man/man4/vte.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/vte.4 diff -u src/share/man/man4/vte.4:1.1 src/share/man/man4/vte.4:1.2 --- src/share/man/man4/vte.4:1.1 Wed Jan 26 18:48:12 2011 +++ src/share/man/man4/vte.4 Thu Jan 27 09:46:59 2011 @@ -1,4 +1,4 @@ -.\" $NetBSD: vte.4,v 1.1 2011/01/26 18:48:12 bouyer Exp $ +.\" $NetBSD: vte.4,v 1.2 2011/01/27 09:46:59 wiz Exp $ .\" Copyright (c) 2010 Pyun YongHyeon .\" All rights reserved. .\" @@ -52,7 +52,7 @@ device driver uses three station addresses out of four as perfect multicast filter. .Sh SYSCTL VARIABLES -The following variables are available +The following variables are available .Bl -tag -width "xx" .It Va hw.vte.vte.int_rxct Maximum number of packets to fire RX completion interrupt. @@ -75,7 +75,7 @@ The .Nm driver was written for -.Fx +.Fx by .An Pyun YongHyeon .Aq yong...@freebsd.org