CVS commit: src/lib/libpthread
Module Name:src Committed By: lukem Date: Fri Aug 5 03:55:32 UTC 2011 Modified Files: src/lib/libpthread: pthread_int.h Log Message: fix spello in comment To generate a diff of this commit: cvs rdiff -u -r1.78 -r1.79 src/lib/libpthread/pthread_int.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/libpthread/pthread_int.h diff -u src/lib/libpthread/pthread_int.h:1.78 src/lib/libpthread/pthread_int.h:1.79 --- src/lib/libpthread/pthread_int.h:1.78 Thu Mar 17 00:43:48 2011 +++ src/lib/libpthread/pthread_int.h Fri Aug 5 03:55:31 2011 @@ -1,4 +1,4 @@ -/* $NetBSD: pthread_int.h,v 1.78 2011/03/17 00:43:48 matt Exp $ */ +/* $NetBSD: pthread_int.h,v 1.79 2011/08/05 03:55:31 lukem Exp $ */ /*- * Copyright (c) 2001, 2002, 2003, 2006, 2007, 2008 The NetBSD Foundation, Inc. @@ -112,7 +112,7 @@ pthread_mutex_t *pt_droplock; /* Drop this lock if cancelled */ pthread_cond_t pt_joiners; /* Threads waiting to join. */ void *(*pt_func)(void *);/* Function to call at start. */ - void *pt_arg; /* Argumen to pass at start. */ + void *pt_arg; /* Argument to pass at start. */ /* Threads to defer waking, usually until pthread_mutex_unlock(). */ lwpid_t pt_waiters[PTHREAD__UNPARK_MAX];
CVS commit: src/sys/dev/acpi
Module Name:src Committed By: mrg Date: Fri Aug 5 02:29:54 UTC 2011 Modified Files: src/sys/dev/acpi: acpi_cpu_cstate.c Log Message: relax an assert slightly, from jmcneill. To generate a diff of this commit: cvs rdiff -u -r1.55 -r1.56 src/sys/dev/acpi/acpi_cpu_cstate.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/dev/acpi/acpi_cpu_cstate.c diff -u src/sys/dev/acpi/acpi_cpu_cstate.c:1.55 src/sys/dev/acpi/acpi_cpu_cstate.c:1.56 --- src/sys/dev/acpi/acpi_cpu_cstate.c:1.55 Thu Aug 4 23:22:30 2011 +++ src/sys/dev/acpi/acpi_cpu_cstate.c Fri Aug 5 02:29:53 2011 @@ -1,4 +1,4 @@ -/* $NetBSD: acpi_cpu_cstate.c,v 1.55 2011/08/04 23:22:30 jmcneill Exp $ */ +/* $NetBSD: acpi_cpu_cstate.c,v 1.56 2011/08/05 02:29:53 mrg Exp $ */ /*- * Copyright (c) 2010, 2011 Jukka Ruohonen @@ -27,7 +27,7 @@ * SUCH DAMAGE. */ #include -__KERNEL_RCSID(0, "$NetBSD: acpi_cpu_cstate.c,v 1.55 2011/08/04 23:22:30 jmcneill Exp $"); +__KERNEL_RCSID(0, "$NetBSD: acpi_cpu_cstate.c,v 1.56 2011/08/05 02:29:53 mrg Exp $"); #include #include @@ -377,7 +377,7 @@ goto out; } - KASSERT(cs[type].cs_method == 0); + KASSERT(type == ACPI_STATE_C1 || cs[type].cs_method == 0); cs[type].cs_addr = state.cs_addr; cs[type].cs_power = state.cs_power;
CVS commit: src/sys/lib/libkern/arch/sh3
Module Name:src Committed By: uwe Date: Fri Aug 5 02:00:25 UTC 2011 Modified Files: src/sys/lib/libkern/arch/sh3: sdivsi3_i4i.S udivsi3_i4i.S Log Message: Reword the comment about "millicode" nature of these functions and add it to sdivsi3_i4i.S too. To generate a diff of this commit: cvs rdiff -u -r1.1 -r1.2 src/sys/lib/libkern/arch/sh3/sdivsi3_i4i.S \ src/sys/lib/libkern/arch/sh3/udivsi3_i4i.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/lib/libkern/arch/sh3/sdivsi3_i4i.S diff -u src/sys/lib/libkern/arch/sh3/sdivsi3_i4i.S:1.1 src/sys/lib/libkern/arch/sh3/sdivsi3_i4i.S:1.2 --- src/sys/lib/libkern/arch/sh3/sdivsi3_i4i.S:1.1 Thu Aug 4 03:20:09 2011 +++ src/sys/lib/libkern/arch/sh3/sdivsi3_i4i.S Fri Aug 5 02:00:25 2011 @@ -1,4 +1,4 @@ -/* $NetBSD: sdivsi3_i4i.S,v 1.1 2011/08/04 03:20:09 uwe Exp $ */ +/* $NetBSD: sdivsi3_i4i.S,v 1.2 2011/08/05 02:00:25 uwe Exp $ */ /*- * Copyright (c) 1990 The Regents of the University of California. @@ -36,10 +36,33 @@ #include #if defined(LIBC_SCCS) - RCSID("$NetBSD: sdivsi3_i4i.S,v 1.1 2011/08/04 03:20:09 uwe Exp $") + RCSID("$NetBSD: sdivsi3_i4i.S,v 1.2 2011/08/05 02:00:25 uwe Exp $") #endif -/* See comments in udivsi3_i4i.S */ +/* + * IMPOTANT: This function is special. + * + * This function is an auxiliary "millicode" function that is + * referenced by the code generated by gcc for signed integer + * division. But gcc does NOT treat a call to this function as an + * ordinary function call - it can clobber only R1, MACL and MACH. + * + * See the definition of "divsi3_i4_int" in gcc/config/sh/sh.md + * + * As the consequence this function cannot be called via any + * indirection that assumes normal calling convention: + * + * . cannot have _PROF_PROLOGUE + * . cannot be called via PLT (not relevant for kernel) + * + * XXX: uwe: Older gcc used __sdivsi3; newer uses __sdivsi3_i4i - a + * heavily tuned version that is NOT compatible with __sdivsi3 because + * it clobbers different registers. We don't want to link the kernel + * against libgcc and we don't have resources to write heavily tuned + * version ourselves, so clone __sdivsi3 but adjust the code to + * conform to the __sdivsi3_i4i clobber spec. + */ + #ifdef __ELF__ .hidden __sdivsi3_i4i Index: src/sys/lib/libkern/arch/sh3/udivsi3_i4i.S diff -u src/sys/lib/libkern/arch/sh3/udivsi3_i4i.S:1.1 src/sys/lib/libkern/arch/sh3/udivsi3_i4i.S:1.2 --- src/sys/lib/libkern/arch/sh3/udivsi3_i4i.S:1.1 Thu Aug 4 03:20:09 2011 +++ src/sys/lib/libkern/arch/sh3/udivsi3_i4i.S Fri Aug 5 02:00:25 2011 @@ -1,4 +1,4 @@ -/* $NetBSD: udivsi3_i4i.S,v 1.1 2011/08/04 03:20:09 uwe Exp $ */ +/* $NetBSD: udivsi3_i4i.S,v 1.2 2011/08/05 02:00:25 uwe Exp $ */ /*- * Copyright (c) 1990 The Regents of the University of California. @@ -36,39 +36,31 @@ #include #if defined(LIBC_SCCS) - RCSID("$NetBSD: udivsi3_i4i.S,v 1.1 2011/08/04 03:20:09 uwe Exp $") + RCSID("$NetBSD: udivsi3_i4i.S,v 1.2 2011/08/05 02:00:25 uwe Exp $") #endif /* - * XXX: uwe: this is a kludge... - * - * For unsigned integer division gcc used to emit a call to __udivsi3 - * "millicode" function that uses compiler-private ABI. Newer gcc - * uses heavily tuned __udivsi3_i4i that is NOT compatible with - * __udivsi3 because it's expected to clobber different registers. We - * don't want to link the kernel against libgcc and we don't have - * resources to write heavily tuned version ourselves, so clone - * __udivsi3 but adjust it to conform to the __udivsi3_i4i clobber - * spec. - */ - -/* * IMPOTANT: This function is special. * - * This function is an auxiliary function that is referenced by the - * code generated by gcc for integer division. But gcc does NOT treat - * a call to this function as an ordinary function call w.r.t. the set - * of register this call clobbers. See the definition of "udivsi3_i1" - * in gcc/config/sh/sh.md. - * - * Any call to this function MUST NOT clobber any registers besides r4 - * and r0, where the result is returned. At the time of the call the - * r4 contains the first argument, so we are only left with r0, and we - * cannot do anything meaningful using only one register. The - * consequences are: - * - * . this function cannot have _PROF_PROLOGUE - * . this function cannot be called via PLT + * This function is an auxiliary "millicode" function that is + * referenced by the code generated by gcc for unsigned integer + * division. But gcc does NOT treat a call to this function as an + * ordinary function call - it can clobber only R1, MACL and MACH. + * + * See the definition of "udivsi3_i4_int" in gcc/config/sh/sh.md + * + * As the consequence this function cannot be called via any + * indirection that assumes normal calling convention: + * + * . cannot have _PROF_PROLOGUE + * . cannot be called via PLT (not relevant for kernel) + * + * XXX: uwe: Older gcc used __udivsi3; newer u
CVS commit: src/sys/lib/libkern/arch/sh3
Module Name:src Committed By: uwe Date: Fri Aug 5 01:59:40 UTC 2011 Modified Files: src/sys/lib/libkern/arch/sh3: sdivsi3.S udivsi3.S Log Message: Reword the comment about "millicode" nature of these functions and add it to sdivsi3.S too. Remove !_KERNEL code left over from the days when we shared these files with userland. Use .L prefix for local label. To generate a diff of this commit: cvs rdiff -u -r1.11 -r1.12 src/sys/lib/libkern/arch/sh3/sdivsi3.S cvs rdiff -u -r1.10 -r1.11 src/sys/lib/libkern/arch/sh3/udivsi3.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/lib/libkern/arch/sh3/sdivsi3.S diff -u src/sys/lib/libkern/arch/sh3/sdivsi3.S:1.11 src/sys/lib/libkern/arch/sh3/sdivsi3.S:1.12 --- src/sys/lib/libkern/arch/sh3/sdivsi3.S:1.11 Thu Jul 14 09:48:03 2011 +++ src/sys/lib/libkern/arch/sh3/sdivsi3.S Fri Aug 5 01:59:39 2011 @@ -1,4 +1,4 @@ -/* $NetBSD: sdivsi3.S,v 1.11 2011/07/14 09:48:03 mrg Exp $ */ +/* $NetBSD: sdivsi3.S,v 1.12 2011/08/05 01:59:39 uwe Exp $ */ /*- * Copyright (c) 1990 The Regents of the University of California. @@ -36,9 +36,26 @@ #include #if defined(LIBC_SCCS) - RCSID("$NetBSD: sdivsi3.S,v 1.11 2011/07/14 09:48:03 mrg Exp $") + RCSID("$NetBSD: sdivsi3.S,v 1.12 2011/08/05 01:59:39 uwe Exp $") #endif +/* + * IMPOTANT: This function is special. + * + * This function is an auxiliary "millicode" function that is + * referenced by the code generated by gcc for signed integer + * division. But gcc does NOT treat a call to this function as an + * ordinary function call - it can clobber only R1, R2 and R3. + * + * See the definition of "divsi3_i1" in gcc/config/sh/sh.md + * + * As the consequence this function cannot be called via any + * indirection that assumes normal calling convention: + * + * . cannot have _PROF_PROLOGUE + * . cannot be called via PLT (not relevant for kernel) + */ + #ifdef __ELF__ .hidden __sdivsi3 @@ -51,7 +68,7 @@ mov r5, r1 tst r1, r1 - bt div_by_zero + bt .L_div_by_zero mov #0, r2 div0s r2, r0 @@ -70,33 +87,6 @@ rts addc r2, r0 -div_by_zero: -#ifdef _KERNEL +.L_div_by_zero: rts mov #0, r0 -#else - mov.l r14, @-r15 - sts.l pr, @-r15 - mov r15, r14 - - mov.l L_raise, r1 -#ifdef PIC -1: bsrf r1 -#else - jsr @r1 -#endif - mov #8, r4 /* delay slot. 8 <- SIGFPE. */ - mov #0, r0 - - lds.l @r15+, pr - rts - mov.l @r15+, r14 - - .align 2 -L_raise: -#ifdef PIC - .long _C_LABEL(raise)-(1b+4) -#else - .long _C_LABEL(raise) -#endif -#endif Index: src/sys/lib/libkern/arch/sh3/udivsi3.S diff -u src/sys/lib/libkern/arch/sh3/udivsi3.S:1.10 src/sys/lib/libkern/arch/sh3/udivsi3.S:1.11 --- src/sys/lib/libkern/arch/sh3/udivsi3.S:1.10 Thu Jul 14 09:48:04 2011 +++ src/sys/lib/libkern/arch/sh3/udivsi3.S Fri Aug 5 01:59:39 2011 @@ -1,4 +1,4 @@ -/* $NetBSD: udivsi3.S,v 1.10 2011/07/14 09:48:04 mrg Exp $ */ +/* $NetBSD: udivsi3.S,v 1.11 2011/08/05 01:59:39 uwe Exp $ */ /*- * Copyright (c) 1990 The Regents of the University of California. @@ -36,26 +36,24 @@ #include #if defined(LIBC_SCCS) - RCSID("$NetBSD: udivsi3.S,v 1.10 2011/07/14 09:48:04 mrg Exp $") + RCSID("$NetBSD: udivsi3.S,v 1.11 2011/08/05 01:59:39 uwe Exp $") #endif /* * IMPOTANT: This function is special. * - * This function is an auxiliary function that is referenced by the - * code generated by gcc for integer division. But gcc does NOT treat - * a call to this function as an ordinary function call w.r.t. the set - * of register this call clobbers. See the definition of "udivsi3_i1" - * in gcc/config/sh/sh.md. - * - * Any call to this function MUST NOT clobber any registers besides r4 - * and r0, where the result is returned. At the time of the call the - * r4 contains the first argument, so we are only left with r0, and we - * cannot do anything meaningful using only one register. The - * consequences are: + * This function is an auxiliary "millicode" function that is + * referenced by the code generated by gcc for unsigned integer + * division. But gcc does NOT treat a call to this function as an + * ordinary function call - it can clobber only R4. * - * . this function cannot have _PROF_PROLOGUE - * . this function cannot be called via PLT + * See the definition of "udivsi3_i1" in gcc/config/sh/sh.md + * + * As the consequence this function cannot be called via any + * indirection that assumes normal calling convention: + * + * . cannot have _PROF_PROLOGUE + * . cannot be called via PLT (not relevant for kernel) */ @@ -67,7 +65,7 @@ /* r0 <= r4 / r5 */ NENTRY(__udivsi3) tst r5, r5 - bt div_by_zero + bt .L_div_by_zero mov #0, r0 div0u @@ -83,33 +81,6 @@ rts mov r4, r0 -div_by_zero: -#ifdef _KERNEL +.L_div_by_zero: rts mov #0, r0 -#else - mov.l r14, @-r15 - sts.l pr, @-r15 - mov r15, r14 - - mov.l L_raise, r1 -#ifdef PIC -1: bsrf r1 -#else - jsr @r1 -#endif - mov #8, r4 /* delay slot. 8 <- SIGFPE
CVS commit: src/doc
Module Name:src Committed By: matt Date: Fri Aug 5 00:26:16 UTC 2011 Modified Files: src/doc: CHANGES Log Message: Note switch of mips and powerpc to GCC 4.5 To generate a diff of this commit: cvs rdiff -u -r1.1587 -r1.1588 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.1587 src/doc/CHANGES:1.1588 --- src/doc/CHANGES:1.1587 Thu Aug 4 20:24:36 2011 +++ src/doc/CHANGES Fri Aug 5 00:26:16 2011 @@ -1,4 +1,4 @@ -# LIST OF CHANGES FROM LAST RELEASE: <$Revision: 1.1587 $> +# LIST OF CHANGES FROM LAST RELEASE: <$Revision: 1.1588 $> # # # [Note: This file does not mention every change made to the NetBSD source tree. @@ -1087,6 +1087,8 @@ [matt 20110729] postfix(1): Import version 2.8.4 [tron 20110731] sparc64: Switch to GCC 4.5.3 [mrg 20110802] + mips: Switch to GCC 4.5.3 [matt 20110804] + powerpc: Switch to GCC 4.5.3 [matt 20110804] amiga: Add basic PCI support. [rkujawa 20110804] p5pb(4): Add driver for Phase5 PCI bridge, as present on CyberVision PPC and BlizzardVision PPC. [rkujawa 20110804]
CVS commit: src/share/mk
Module Name:src Committed By: matt Date: Fri Aug 5 00:24:12 UTC 2011 Modified Files: src/share/mk: bsd.own.mk Log Message: Switch mips and powerpc to GCC 4.5 To generate a diff of this commit: cvs rdiff -u -r1.676 -r1.677 src/share/mk/bsd.own.mk Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/share/mk/bsd.own.mk diff -u src/share/mk/bsd.own.mk:1.676 src/share/mk/bsd.own.mk:1.677 --- src/share/mk/bsd.own.mk:1.676 Thu Aug 4 00:52:50 2011 +++ src/share/mk/bsd.own.mk Fri Aug 5 00:24:12 2011 @@ -1,4 +1,4 @@ -# $NetBSD: bsd.own.mk,v 1.676 2011/08/04 00:52:50 mrg Exp $ +# $NetBSD: bsd.own.mk,v 1.677 2011/08/05 00:24:12 matt Exp $ # This needs to be before bsd.init.mk .if defined(BSD_MK_COMPAT_FILE) @@ -49,7 +49,9 @@ # # Platforms using GCC 4.5 # -.if ${MACHINE_ARCH} == "sparc64" +.if ${MACHINE_ARCH} == "sparc64" || \ +${MACHINE_CPU} == mips || \ +${MACHINE_ARCH} == "powerpc" HAVE_GCC?=45 .endif
CVS commit: src/sys/dev/acpi
Module Name:src Committed By: jmcneill Date: Thu Aug 4 23:22:30 UTC 2011 Modified Files: src/sys/dev/acpi: acpi_cpu_cstate.c Log Message: Don't treat C2 states as C1 if the _CST package doesn't have an entry for C1. ACPI mandates C1 so if it's not present in the _CST package use the HLT method. Fixes all sorts of performance regressions on AMD CPUs. To generate a diff of this commit: cvs rdiff -u -r1.54 -r1.55 src/sys/dev/acpi/acpi_cpu_cstate.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/dev/acpi/acpi_cpu_cstate.c diff -u src/sys/dev/acpi/acpi_cpu_cstate.c:1.54 src/sys/dev/acpi/acpi_cpu_cstate.c:1.55 --- src/sys/dev/acpi/acpi_cpu_cstate.c:1.54 Wed Jul 13 07:34:55 2011 +++ src/sys/dev/acpi/acpi_cpu_cstate.c Thu Aug 4 23:22:30 2011 @@ -1,4 +1,4 @@ -/* $NetBSD: acpi_cpu_cstate.c,v 1.54 2011/07/13 07:34:55 jruoho Exp $ */ +/* $NetBSD: acpi_cpu_cstate.c,v 1.55 2011/08/04 23:22:30 jmcneill Exp $ */ /*- * Copyright (c) 2010, 2011 Jukka Ruohonen @@ -27,7 +27,7 @@ * SUCH DAMAGE. */ #include -__KERNEL_RCSID(0, "$NetBSD: acpi_cpu_cstate.c,v 1.54 2011/07/13 07:34:55 jruoho Exp $"); +__KERNEL_RCSID(0, "$NetBSD: acpi_cpu_cstate.c,v 1.55 2011/08/04 23:22:30 jmcneill Exp $"); #include #include @@ -48,7 +48,7 @@ static ACPI_STATUS acpicpu_cstate_cst(struct acpicpu_softc *); static ACPI_STATUS acpicpu_cstate_cst_add(struct acpicpu_softc *, - ACPI_OBJECT *, int ); + ACPI_OBJECT *); static void acpicpu_cstate_cst_bios(void); static void acpicpu_cstate_memset(struct acpicpu_softc *); static ACPI_STATUS acpicpu_cstate_dep(struct acpicpu_softc *); @@ -160,6 +160,7 @@ static ACPI_STATUS acpicpu_cstate_cst(struct acpicpu_softc *sc) { + struct acpicpu_cstate *cs = sc->sc_cstate; ACPI_OBJECT *elm, *obj; ACPI_BUFFER buf; ACPI_STATUS rv; @@ -204,13 +205,18 @@ acpicpu_cstate_memset(sc); + /* + * All x86 processors should support C1 (a.k.a. HALT). + */ + cs[ACPI_STATE_C1].cs_method = ACPICPU_C_STATE_HALT; + CTASSERT(ACPI_STATE_C0 == 0 && ACPI_STATE_C1 == 1); CTASSERT(ACPI_STATE_C2 == 2 && ACPI_STATE_C3 == 3); for (count = 0, i = 1; i <= n; i++) { elm = &obj->Package.Elements[i]; - rv = acpicpu_cstate_cst_add(sc, elm, i); + rv = acpicpu_cstate_cst_add(sc, elm); if (ACPI_SUCCESS(rv)) count++; @@ -226,7 +232,7 @@ } static ACPI_STATUS -acpicpu_cstate_cst_add(struct acpicpu_softc *sc, ACPI_OBJECT *elm, int i) +acpicpu_cstate_cst_add(struct acpicpu_softc *sc, ACPI_OBJECT *elm) { struct acpicpu_cstate *cs = sc->sc_cstate; struct acpicpu_cstate state; @@ -371,30 +377,13 @@ goto out; } - /* - * As some systems define the type arbitrarily, - * we use a sequential counter instead of the - * BIOS data. For instance, AMD family 14h is - * instructed to only use the value 2; see - * - * Advanced Micro Devices: BIOS and Kernel - * Developer's Guide (BKDG) for AMD Family - * 14h Models 00h-0Fh Processors. Revision - * 3.00, January 4, 2011. - */ - if (i != (int)type) { - - ACPI_DEBUG_PRINT((ACPI_DB_INFO, - "C%d != C%u from BIOS", i, type)); - } - - KASSERT(cs[i].cs_method == 0); - - cs[i].cs_addr = state.cs_addr; - cs[i].cs_power = state.cs_power; - cs[i].cs_flags = state.cs_flags; - cs[i].cs_method = state.cs_method; - cs[i].cs_latency = state.cs_latency; + KASSERT(cs[type].cs_method == 0); + + cs[type].cs_addr = state.cs_addr; + cs[type].cs_power = state.cs_power; + cs[type].cs_flags = state.cs_flags; + cs[type].cs_method = state.cs_method; + cs[type].cs_latency = state.cs_latency; out: if (ACPI_FAILURE(rv))
CVS commit: src/sys/modules
Module Name:src Committed By: jmcneill Date: Thu Aug 4 22:26:07 UTC 2011 Added Files: src/sys/modules/coram: Makefile coram.ioconf src/sys/modules/cx24227: Makefile src/sys/modules/mt2131: Makefile Log Message: add mt2131, cx24227, and coram module glue To generate a diff of this commit: cvs rdiff -u -r0 -r1.1 src/sys/modules/coram/Makefile \ src/sys/modules/coram/coram.ioconf cvs rdiff -u -r0 -r1.1 src/sys/modules/cx24227/Makefile cvs rdiff -u -r0 -r1.1 src/sys/modules/mt2131/Makefile Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Added files: Index: src/sys/modules/coram/Makefile diff -u /dev/null src/sys/modules/coram/Makefile:1.1 --- /dev/null Thu Aug 4 22:26:07 2011 +++ src/sys/modules/coram/Makefile Thu Aug 4 22:26:07 2011 @@ -0,0 +1,13 @@ +# $NetBSD: Makefile,v 1.1 2011/08/04 22:26:07 jmcneill Exp $ + +.include "../Makefile.inc" + +.PATH: ${S}/dev/pci + +KMOD= coram +IOCONF= coram.ioconf +SRCS= coram.c + +WARNS= 3 + +.include Index: src/sys/modules/coram/coram.ioconf diff -u /dev/null src/sys/modules/coram/coram.ioconf:1.1 --- /dev/null Thu Aug 4 22:26:07 2011 +++ src/sys/modules/coram/coram.ioconf Thu Aug 4 22:26:07 2011 @@ -0,0 +1,10 @@ +# $NetBSD: coram.ioconf,v 1.1 2011/08/04 22:26:07 jmcneill Exp $ + +ioconf coram + +include "conf/files" +include "dev/pci/files.pci" + +pseudo-root pci* + +coram* at pci? dev ? function ? Index: src/sys/modules/cx24227/Makefile diff -u /dev/null src/sys/modules/cx24227/Makefile:1.1 --- /dev/null Thu Aug 4 22:26:07 2011 +++ src/sys/modules/cx24227/Makefile Thu Aug 4 22:26:07 2011 @@ -0,0 +1,12 @@ +# $NetBSD: Makefile,v 1.1 2011/08/04 22:26:07 jmcneill Exp $ + +.include "../Makefile.inc" + +.PATH: ${S}/dev/i2c + +KMOD= cx24227 +SRCS= cx24227.c + +WARNS= 4 + +.include Index: src/sys/modules/mt2131/Makefile diff -u /dev/null src/sys/modules/mt2131/Makefile:1.1 --- /dev/null Thu Aug 4 22:26:07 2011 +++ src/sys/modules/mt2131/Makefile Thu Aug 4 22:26:07 2011 @@ -0,0 +1,12 @@ +# $NetBSD: Makefile,v 1.1 2011/08/04 22:26:07 jmcneill Exp $ + +.include "../Makefile.inc" + +.PATH: ${S}/dev/i2c + +KMOD= mt2131 +SRCS= mt2131.c + +WARNS= 4 + +.include
CVS commit: src/sys/dev/pci
Module Name:src Committed By: jmcneill Date: Thu Aug 4 22:25:08 UTC 2011 Modified Files: src/sys/dev/pci: coram.c coramvar.h Log Message: modularize coram and add detach + childdet methods To generate a diff of this commit: cvs rdiff -u -r1.1 -r1.2 src/sys/dev/pci/coram.c src/sys/dev/pci/coramvar.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/dev/pci/coram.c diff -u src/sys/dev/pci/coram.c:1.1 src/sys/dev/pci/coram.c:1.2 --- src/sys/dev/pci/coram.c:1.1 Thu Aug 4 14:43:55 2011 +++ src/sys/dev/pci/coram.c Thu Aug 4 22:25:08 2011 @@ -1,4 +1,4 @@ -/* $NetBSD: coram.c,v 1.1 2011/08/04 14:43:55 jakllsch Exp $ */ +/* $NetBSD: coram.c,v 1.2 2011/08/04 22:25:08 jmcneill Exp $ */ /* * Copyright (c) 2008, 2011 Jonathan A. Kollasch @@ -27,14 +27,14 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: coram.c,v 1.1 2011/08/04 14:43:55 jakllsch Exp $"); +__KERNEL_RCSID(0, "$NetBSD: coram.c,v 1.2 2011/08/04 22:25:08 jmcneill Exp $"); #include #include #include #include #include - +#include #include #include @@ -53,6 +53,8 @@ static int coram_match(device_t, cfdata_t, void *); static void coram_attach(device_t, device_t, void *); +static int coram_detach(device_t, int); +static void coram_childdet(device_t, device_t); static bool coram_resume(device_t, const pmf_qual_t *); static int coram_intr(void *); @@ -76,6 +78,7 @@ static int coram_dtv_stop_transfer(void *); static int coram_mpeg_attach(struct coram_softc *); +static int coram_mpeg_detach(struct coram_softc *, int); static int coram_mpeg_reset(struct coram_softc *); static void * coram_mpeg_malloc(struct coram_softc *, size_t); static int coram_allocmem(struct coram_softc *, size_t, size_t, struct coram_dma *); @@ -88,8 +91,8 @@ static int coram_sram_ch_setup(struct coram_softc *, struct coram_sram_ch *, uint32_t); static int coram_mpeg_intr(struct coram_softc *); -CFATTACH_DECL_NEW(coram, sizeof(struct coram_softc), -coram_match, coram_attach, NULL, NULL); +CFATTACH_DECL2_NEW(coram, sizeof(struct coram_softc), +coram_match, coram_attach, coram_detach, NULL, NULL, coram_childdet); #define CORAM_SRAM_CH6 0 @@ -179,6 +182,7 @@ } sc->sc_dmat = pa->pa_dmat; + sc->sc_pc = pa->pa_pc; if (pci_intr_map(pa, &ih)) { aprint_error_dev(self, "couldn't map interrupt\n"); @@ -222,7 +226,8 @@ memset(&iba, 0, sizeof(iba)); iba.iba_tag = &cic->cic_i2c; iba.iba_type = I2C_TYPE_SMBUS; - config_found_ia(self, "i2cbus", &iba, iicbus_print); + cic->cic_i2cdev = config_found_ia(self, "i2cbus", + &iba, iicbus_print); #endif } @@ -263,12 +268,11 @@ #endif sc->sc_demod = cx24227_open(sc->sc_dev, &sc->sc_iic[0].cic_i2c, 0x19); - if ( sc->sc_demod == NULL ) - panic("no demod"); - + if (sc->sc_demod == NULL) + aprint_error_dev(self, "couldn't open cx24227\n"); sc->sc_tuner = mt2131_open(sc->sc_dev, &sc->sc_iic[0].cic_i2c, 0x61); - if ( sc->sc_tuner == NULL ) - panic("no tuner"); + if (sc->sc_tuner == NULL) + aprint_error_dev(self, "couldn't open mt2131\n"); coram_mpeg_attach(sc); @@ -279,6 +283,55 @@ } static int +coram_detach(device_t self, int flags) +{ + struct coram_softc *sc = device_private(self); + struct coram_iic_softc *cic; + unsigned int i; + int error; + + error = coram_mpeg_detach(sc, flags); + if (error) + return error; + + if (sc->sc_tuner) + mt2131_close(sc->sc_tuner); + if (sc->sc_demod) + cx24227_close(sc->sc_demod); + for (i = 0; i < I2C_NUM; i++) { + cic = &sc->sc_iic[i]; + if (cic->cic_i2cdev) + config_detach(cic->cic_i2cdev, flags); + mutex_destroy(&cic->cic_busmutex); + } + pmf_device_deregister(self); + + if (sc->sc_mems) + bus_space_unmap(sc->sc_memt, sc->sc_memh, sc->sc_mems); + if (sc->sc_ih) + pci_intr_disestablish(sc->sc_pc, sc->sc_ih); + + return 0; +} + +static void +coram_childdet(device_t self, device_t child) +{ + struct coram_softc *sc = device_private(self); + struct coram_iic_softc *cic; + unsigned int i; + + if (sc->sc_dtvdev == child) + sc->sc_dtvdev = NULL; + + for (i = 0; i < I2C_NUM; i++) { + cic = &sc->sc_iic[i]; + if (cic->cic_i2cdev == child) + cic->cic_i2cdev = NULL; + } +} + +static int coram_intr(void *v) { device_t self = v; @@ -541,6 +594,23 @@ return (sc->sc_dtvdev != NULL); } +static int +coram_mpeg_detach(struct coram_softc *sc, int flags) +{ + struct coram_sram_ch *ch = &coram_sram_chs[CORAM_SRAM_CH6]; + int error; + + if (sc->sc_dtvdev) { + error = config_detach(sc->sc_dtvdev, flags); + if (error) + return error; + } + if (sc->sc_riscbuf) { + kmem_free(sc->sc_riscbuf, ch->csc_riscsz); + } + + return 0; +} static void coram_dtv_get_devinfo(void *cookie, struct dvb_frontend_info *info) @@ -563,6 +633,9 @@ //KASSERT(sc->sc_tsbuf == NULL); + if (sc->sc_tuner == NULL || sc->sc_demod == NULL) + return ENXIO; + coram_mpeg_reset(sc); /* allocate two alternating DMA area
CVS commit: src/sys/dev/i2c
Module Name:src Committed By: jmcneill Date: Thu Aug 4 22:24:45 UTC 2011 Modified Files: src/sys/dev/i2c: cx24227.c Log Message: modularize cx24227 To generate a diff of this commit: cvs rdiff -u -r1.1 -r1.2 src/sys/dev/i2c/cx24227.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/i2c/cx24227.c diff -u src/sys/dev/i2c/cx24227.c:1.1 src/sys/dev/i2c/cx24227.c:1.2 --- src/sys/dev/i2c/cx24227.c:1.1 Thu Aug 4 01:48:34 2011 +++ src/sys/dev/i2c/cx24227.c Thu Aug 4 22:24:45 2011 @@ -1,4 +1,4 @@ -/* $NetBSD: cx24227.c,v 1.1 2011/08/04 01:48:34 jakllsch Exp $ */ +/* $NetBSD: cx24227.c,v 1.2 2011/08/04 22:24:45 jmcneill Exp $ */ /* * Copyright (c) 2008, 2011 Jonathan A. Kollasch @@ -27,12 +27,13 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: cx24227.c,v 1.1 2011/08/04 01:48:34 jakllsch Exp $"); +__KERNEL_RCSID(0, "$NetBSD: cx24227.c,v 1.2 2011/08/04 22:24:45 jmcneill Exp $"); #include #include #include #include +#include #include @@ -264,7 +265,7 @@ static int cx24227_init(struct cx24227 *sc) { - int i; + unsigned int i; uint16_t reg; cx24227_sleepreset(sc); @@ -305,3 +306,13 @@ return 0; } + +MODULE(MODULE_CLASS_DRIVER, cx24227, NULL); + +static int +cx24227_modcmd(modcmd_t cmd, void *priv) +{ + if (cmd == MODULE_CMD_INIT || cmd == MODULE_CMD_FINI) + return 0; + return ENOTTY; +}
CVS commit: src/sys/dev/i2c
Module Name:src Committed By: jmcneill Date: Thu Aug 4 22:24:29 UTC 2011 Modified Files: src/sys/dev/i2c: mt2131.c Log Message: modularize mt2131 To generate a diff of this commit: cvs rdiff -u -r1.1 -r1.2 src/sys/dev/i2c/mt2131.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/i2c/mt2131.c diff -u src/sys/dev/i2c/mt2131.c:1.1 src/sys/dev/i2c/mt2131.c:1.2 --- src/sys/dev/i2c/mt2131.c:1.1 Thu Aug 4 01:45:37 2011 +++ src/sys/dev/i2c/mt2131.c Thu Aug 4 22:24:29 2011 @@ -1,4 +1,4 @@ -/* $NetBSD: mt2131.c,v 1.1 2011/08/04 01:45:37 jakllsch Exp $ */ +/* $NetBSD: mt2131.c,v 1.2 2011/08/04 22:24:29 jmcneill Exp $ */ /* * Copyright (c) 2008, 2011 Jonathan A. Kollasch @@ -27,7 +27,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: mt2131.c,v 1.1 2011/08/04 01:45:37 jakllsch Exp $"); +__KERNEL_RCSID(0, "$NetBSD: mt2131.c,v 1.2 2011/08/04 22:24:29 jmcneill Exp $"); #include #include @@ -35,6 +35,7 @@ #include #include #include +#include #include @@ -264,3 +265,13 @@ return ret; } + +MODULE(MODULE_CLASS_DRIVER, mt2131, NULL); + +static int +mt2131_modcmd(modcmd_t cmd, void *priv) +{ + if (cmd == MODULE_CMD_INIT || cmd == MODULE_CMD_FINI) + return 0; + return ENOTTY; +}
CVS commit: src/distrib/sets/lists/man
Module Name:src Committed By: riz Date: Thu Aug 4 21:59:36 UTC 2011 Modified Files: src/distrib/sets/lists/man: mi Log Message: Typo fix: p5pb.0, not p5pbc.0 To generate a diff of this commit: cvs rdiff -u -r1.1329 -r1.1330 src/distrib/sets/lists/man/mi Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/distrib/sets/lists/man/mi diff -u src/distrib/sets/lists/man/mi:1.1329 src/distrib/sets/lists/man/mi:1.1330 --- src/distrib/sets/lists/man/mi:1.1329 Thu Aug 4 21:17:19 2011 +++ src/distrib/sets/lists/man/mi Thu Aug 4 21:59:35 2011 @@ -1,4 +1,4 @@ -# $NetBSD: mi,v 1.1329 2011/08/04 21:17:19 rkujawa Exp $ +# $NetBSD: mi,v 1.1330 2011/08/04 21:59:35 riz Exp $ # # Note: don't delete entries from here - mark them as "obsolete" instead. # @@ -742,7 +742,7 @@ ./usr/share/man/cat4/amiga/mem.0 man-sys-catman .cat ./usr/share/man/cat4/amiga/mfcs.0 man-sys-catman .cat ./usr/share/man/cat4/amiga/mgnsc.0 man-sys-catman .cat -./usr/share/man/cat4/amiga/p5pbc.0 man-sys-catman .cat +./usr/share/man/cat4/amiga/p5pb.0 man-sys-catman .cat ./usr/share/man/cat4/amiga/qn.0 man-sys-catman .cat ./usr/share/man/cat4/amiga/ser.0 man-sys-catman .cat ./usr/share/man/cat4/amiga/wesc.0 man-sys-catman .cat
CVS commit: src/distrib/sets/lists/man
Module Name:src Committed By: rkujawa Date: Thu Aug 4 21:17:19 UTC 2011 Modified Files: src/distrib/sets/lists/man: mi Log Message: Add missing .0 and .html for p5pb. To generate a diff of this commit: cvs rdiff -u -r1.1328 -r1.1329 src/distrib/sets/lists/man/mi Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/distrib/sets/lists/man/mi diff -u src/distrib/sets/lists/man/mi:1.1328 src/distrib/sets/lists/man/mi:1.1329 --- src/distrib/sets/lists/man/mi:1.1328 Thu Aug 4 21:09:53 2011 +++ src/distrib/sets/lists/man/mi Thu Aug 4 21:17:19 2011 @@ -1,4 +1,4 @@ -# $NetBSD: mi,v 1.1328 2011/08/04 21:09:53 rkujawa Exp $ +# $NetBSD: mi,v 1.1329 2011/08/04 21:17:19 rkujawa Exp $ # # Note: don't delete entries from here - mark them as "obsolete" instead. # @@ -742,6 +742,7 @@ ./usr/share/man/cat4/amiga/mem.0 man-sys-catman .cat ./usr/share/man/cat4/amiga/mfcs.0 man-sys-catman .cat ./usr/share/man/cat4/amiga/mgnsc.0 man-sys-catman .cat +./usr/share/man/cat4/amiga/p5pbc.0 man-sys-catman .cat ./usr/share/man/cat4/amiga/qn.0 man-sys-catman .cat ./usr/share/man/cat4/amiga/ser.0 man-sys-catman .cat ./usr/share/man/cat4/amiga/wesc.0 man-sys-catman .cat @@ -3584,6 +3585,7 @@ ./usr/share/man/html4/amiga/mem.html man-sys-htmlman html ./usr/share/man/html4/amiga/mfcs.html man-sys-htmlman html ./usr/share/man/html4/amiga/mgnsc.html man-sys-htmlman html +./usr/share/man/html4/amiga/p5pb.html man-sys-htmlman html ./usr/share/man/html4/amiga/qn.html man-sys-htmlman html ./usr/share/man/html4/amiga/ser.html man-sys-htmlman html ./usr/share/man/html4/amiga/wesc.html man-sys-htmlman html
CVS commit: src/distrib/sets/lists/man
Module Name:src Committed By: rkujawa Date: Thu Aug 4 21:09:56 UTC 2011 Modified Files: src/distrib/sets/lists/man: mi Log Message: Add p5pb man page to setlist. To generate a diff of this commit: cvs rdiff -u -r1.1327 -r1.1328 src/distrib/sets/lists/man/mi Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/distrib/sets/lists/man/mi diff -u src/distrib/sets/lists/man/mi:1.1327 src/distrib/sets/lists/man/mi:1.1328 --- src/distrib/sets/lists/man/mi:1.1327 Thu Aug 4 03:38:56 2011 +++ src/distrib/sets/lists/man/mi Thu Aug 4 21:09:53 2011 @@ -1,4 +1,4 @@ -# $NetBSD: mi,v 1.1327 2011/08/04 03:38:56 matt Exp $ +# $NetBSD: mi,v 1.1328 2011/08/04 21:09:53 rkujawa Exp $ # # Note: don't delete entries from here - mark them as "obsolete" instead. # @@ -6125,6 +6125,7 @@ ./usr/share/man/man4/amiga/mem.4 man-sys-man .man ./usr/share/man/man4/amiga/mfcs.4 man-sys-man .man ./usr/share/man/man4/amiga/mgnsc.4 man-sys-man .man +./usr/share/man/man4/amiga/p5pb.4 man-sys-man .man ./usr/share/man/man4/amiga/qn.4 man-sys-man .man ./usr/share/man/man4/amiga/ser.4 man-sys-man .man ./usr/share/man/man4/amiga/wesc.4 man-sys-man .man
CVS commit: src/share/man/man4/man4.amiga
Module Name:src Committed By: wiz Date: Thu Aug 4 20:40:52 UTC 2011 Modified Files: src/share/man/man4/man4.amiga: p5pb.4 Log Message: Remove trailing whitespace. Comment out pm2fb(4) link (page does not exist yet) Merge two one-element lists into one list. To generate a diff of this commit: cvs rdiff -u -r1.1 -r1.2 src/share/man/man4/man4.amiga/p5pb.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.amiga/p5pb.4 diff -u src/share/man/man4/man4.amiga/p5pb.4:1.1 src/share/man/man4/man4.amiga/p5pb.4:1.2 --- src/share/man/man4/man4.amiga/p5pb.4:1.1 Thu Aug 4 17:48:50 2011 +++ src/share/man/man4/man4.amiga/p5pb.4 Thu Aug 4 20:40:52 2011 @@ -1,4 +1,4 @@ -.\" $NetBSD: p5pb.4,v 1.1 2011/08/04 17:48:50 rkujawa Exp $ +.\" $NetBSD: p5pb.4,v 1.2 2011/08/04 20:40:52 wiz Exp $ .\" .\" Copyright (c) 2011 The NetBSD Foundation, Inc. .\" All rights reserved. @@ -40,7 +40,7 @@ .Sh DESCRIPTION The .Nm -driver provides support for the PCI bus present on BlizzardVisionPPC and +driver provides support for the PCI bus present on BlizzardVisionPPC and CyberVisionPPC graphics cards. .Sh HARDWARE The @@ -49,15 +49,13 @@ .Bl -tag -width "BLIZZARDVISIONPPC" -offset indent .It Em BLIZZARDVISIONPPC Phase5 BlizzardVisionPPC graphics card. -.El -.Bl -tag -width "BLIZZARDVISIONPPC" -offset indent .It Em CYBERVISIONPPC Phase5 CyberVisionPPC graphics card. .El .Sh SEE ALSO -.Xr pm2fb 4 , .Xr genfb 4 , .Xr pci 4 +.\" .Xr pm2fb 4 .Sh HISTORY The .Nm @@ -70,11 +68,11 @@ driver was written by .An Radoslaw Kujawa Aq radoslaw.kuj...@gmail.com . .Sh BUGS -Current version of this driver depends on PCI bus setup and enumeration -done by the firmware. +Current version of this driver depends on PCI bus setup and enumeration +done by the firmware. .Pp -The driver will not attach at all, if there is no AutoConfig entry -for CVPPC/BVPPC card (Zorro product ID 110). Some firmware revisions -are known not to create this entry. +The driver will not attach at all, if there is no AutoConfig entry +for CVPPC/BVPPC card (Zorro product ID 110). +Some firmware revisions are known not to create this entry. .Pp It is not (yet) possible to use the CVPPC/BVPPC as a console.
CVS commit: src
Module Name:src Committed By: rkujawa Date: Thu Aug 4 20:24:36 UTC 2011 Modified Files: src/distrib/notes/amiga: hardware src/doc: CHANGES Log Message: Mention Amiga PCI support in CHANGES and installation notes. Approved by phx. To generate a diff of this commit: cvs rdiff -u -r1.46 -r1.47 src/distrib/notes/amiga/hardware cvs rdiff -u -r1.1586 -r1.1587 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/distrib/notes/amiga/hardware diff -u src/distrib/notes/amiga/hardware:1.46 src/distrib/notes/amiga/hardware:1.47 --- src/distrib/notes/amiga/hardware:1.46 Thu Apr 23 01:56:48 2009 +++ src/distrib/notes/amiga/hardware Thu Aug 4 20:24:36 2011 @@ -1,4 +1,4 @@ -.\" $NetBSD: hardware,v 1.46 2009/04/23 01:56:48 snj Exp $ +.\" $NetBSD: hardware,v 1.47 2011/08/04 20:24:36 rkujawa Exp $ . .Nx \*V runs on any Amiga that has a 68020 or better CPU with @@ -48,7 +48,8 @@ The Emplant SCSI adapter has been reported by a party to hang after doing part of the installation without problems .It -53c710 based boards: A4091, Magnum, Warp Engine, Zeus and DraCo builtin +53c710 based boards: A4091, BlizzardPPC 603e+, Magnum, Warp Engine, Zeus +and DraCo builtin .It FAS216 based SCSI boards: FastLane Z3, Blizzard I and II, Blizzard IV, Blizzard 2060, CyberSCSI Mk I and II @@ -56,6 +57,11 @@ 53c770 based SCSI boards: Cyberstorm Mk III SCSI, Cyberstorm PPC SCSI .bullet) .It +PCI bridges +.(bullet -compact +Phase5 PCI bridge: CyberVision PPC, BlizzardVision PPC +.bullet) +.It Video controllers .(bullet -compact ECS, AGA and A2024 built in on various Amigas Index: src/doc/CHANGES diff -u src/doc/CHANGES:1.1586 src/doc/CHANGES:1.1587 --- src/doc/CHANGES:1.1586 Thu Aug 4 00:52:49 2011 +++ src/doc/CHANGES Thu Aug 4 20:24:36 2011 @@ -1,4 +1,4 @@ -# LIST OF CHANGES FROM LAST RELEASE: <$Revision: 1.1586 $> +# LIST OF CHANGES FROM LAST RELEASE: <$Revision: 1.1587 $> # # # [Note: This file does not mention every change made to the NetBSD source tree. @@ -1087,3 +1087,6 @@ [matt 20110729] postfix(1): Import version 2.8.4 [tron 20110731] sparc64: Switch to GCC 4.5.3 [mrg 20110802] + amiga: Add basic PCI support. [rkujawa 20110804] + p5pb(4): Add driver for Phase5 PCI bridge, as present on CyberVision + PPC and BlizzardVision PPC. [rkujawa 20110804]
CVS commit: src/sys/arch/powerpc/oea
Module Name:src Committed By: phx Date: Thu Aug 4 20:02:48 UTC 2011 Modified Files: src/sys/arch/powerpc/oea: ofwoea_machdep.c Log Message: Drop into ddb, when requested by ofwboot (-d option). To generate a diff of this commit: cvs rdiff -u -r1.25 -r1.26 src/sys/arch/powerpc/oea/ofwoea_machdep.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/powerpc/oea/ofwoea_machdep.c diff -u src/sys/arch/powerpc/oea/ofwoea_machdep.c:1.25 src/sys/arch/powerpc/oea/ofwoea_machdep.c:1.26 --- src/sys/arch/powerpc/oea/ofwoea_machdep.c:1.25 Wed Jul 27 22:04:23 2011 +++ src/sys/arch/powerpc/oea/ofwoea_machdep.c Thu Aug 4 20:02:48 2011 @@ -1,4 +1,4 @@ -/* $NetBSD: ofwoea_machdep.c,v 1.25 2011/07/27 22:04:23 macallan Exp $ */ +/* $NetBSD: ofwoea_machdep.c,v 1.26 2011/08/04 20:02:48 phx Exp $ */ /*- * Copyright (c) 2007 The NetBSD Foundation, Inc. @@ -30,7 +30,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: ofwoea_machdep.c,v 1.25 2011/07/27 22:04:23 macallan Exp $"); +__KERNEL_RCSID(0, "$NetBSD: ofwoea_machdep.c,v 1.26 2011/08/04 20:02:48 phx Exp $"); #include "opt_ppcarch.h" #include "opt_compat_netbsd.h" @@ -252,6 +252,11 @@ /* CPU clock stuff */ set_timebase(); + +#ifdef DDB + if (boothowto & RB_KDB) + Debugger(); +#endif } void
CVS commit: src/share/man/man4/man4.amiga
Module Name:src Committed By: martin Date: Thu Aug 4 19:30:12 UTC 2011 Modified Files: src/share/man/man4/man4.amiga: Makefile Log Message: no space after \ for continuation lines, please To generate a diff of this commit: cvs rdiff -u -r1.18 -r1.19 src/share/man/man4/man4.amiga/Makefile 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.amiga/Makefile diff -u src/share/man/man4/man4.amiga/Makefile:1.18 src/share/man/man4/man4.amiga/Makefile:1.19 --- src/share/man/man4/man4.amiga/Makefile:1.18 Thu Aug 4 17:48:50 2011 +++ src/share/man/man4/man4.amiga/Makefile Thu Aug 4 19:30:11 2011 @@ -1,10 +1,10 @@ # from: @(#)Makefile 8.2 (Berkeley) 2/16/94 -# $NetBSD: Makefile,v 1.18 2011/08/04 17:48:50 rkujawa Exp $ +# $NetBSD: Makefile,v 1.19 2011/08/04 19:30:11 martin Exp $ MAN= afsc.4 ahsc.4 amidisplaycc.4 atzsc.4 autoconf.4 console.4 bah.4 \ bppcsc.4 ed.4 es.4 fdc.4 grf.4 \ grfcl.4 grfcv.4 grfcv3d.4 grfet.4 grfrh.4 grfrt.4 grful.4 \ - gtsc.4 intro.4 ite.4 mem.4 mfcs.4 mgnsc.4 p5pb.4 \ + gtsc.4 intro.4 ite.4 mem.4 mfcs.4 mgnsc.4 p5pb.4 \ qn.4 ser.4 wesc.4 zssc.4 MLINKS= mem.4 kmem.4 MANSUBDIR=/amiga
CVS commit: src/sys/arch/xen/xen
Module Name:src Committed By: bouyer Date: Thu Aug 4 18:01:49 UTC 2011 Modified Files: src/sys/arch/xen/xen: xbdback_xenbus.c Log Message: Make sure to call xbdback_trampoline() at splbio() To generate a diff of this commit: cvs rdiff -u -r1.41 -r1.42 src/sys/arch/xen/xen/xbdback_xenbus.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/xen/xen/xbdback_xenbus.c diff -u src/sys/arch/xen/xen/xbdback_xenbus.c:1.41 src/sys/arch/xen/xen/xbdback_xenbus.c:1.42 --- src/sys/arch/xen/xen/xbdback_xenbus.c:1.41 Sun Jul 24 23:56:34 2011 +++ src/sys/arch/xen/xen/xbdback_xenbus.c Thu Aug 4 18:01:49 2011 @@ -1,4 +1,4 @@ -/* $NetBSD: xbdback_xenbus.c,v 1.41 2011/07/24 23:56:34 jym Exp $ */ +/* $NetBSD: xbdback_xenbus.c,v 1.42 2011/08/04 18:01:49 bouyer Exp $ */ /* * Copyright (c) 2006 Manuel Bouyer. @@ -26,7 +26,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: xbdback_xenbus.c,v 1.41 2011/07/24 23:56:34 jym Exp $"); +__KERNEL_RCSID(0, "$NetBSD: xbdback_xenbus.c,v 1.42 2011/08/04 18:01:49 bouyer Exp $"); #include #include @@ -1657,19 +1657,17 @@ case 0: xbd_io->xio_mapped = 1; SIMPLEQ_REMOVE_HEAD(&xbdback_shmq, xbdi_on_hold); - splx(s); + (void)splbio(); xbdback_trampoline(xbdi, xbdi); - s = splvm(); break; default: SIMPLEQ_REMOVE_HEAD(&xbdback_shmq, xbdi_on_hold); - splx(s); + (void)splbio(); printf("xbdback_shm_callback: xen_shm error %d\n", error); xbdi->xbdi_cont = xbdi->xbdi_cont_aux; xbdback_io_error(xbd_io, error); xbdback_trampoline(xbdi, xbdi); - s = splvm(); break; } }
CVS commit: src
Module Name:src Committed By: rkujawa Date: Thu Aug 4 17:48:51 UTC 2011 Modified Files: src/share/man/man4/man4.amiga: Makefile src/sys/arch/amiga/amiga: amiga_bus_simple_1word.c autoconf.c simple_busfuncs.c src/sys/arch/amiga/conf: DRACO GENERIC GENERIC.in INSTALL files.amiga src/sys/arch/amiga/dev: zbus.c src/sys/arch/amiga/include: bus.h Added Files: src/share/man/man4/man4.amiga: p5pb.4 src/sys/arch/amiga/amiga: bus.c src/sys/arch/amiga/include: pci_machdep.h src/sys/arch/amiga/pci: p5pb.c p5pbreg.h Log Message: Add basic PCI support for amiga port. Add missing bus_space(9) methods needed for MI PCI. Add p5pb(4) - Phase5 PCI bridge driver (and the man page). Add quirks table to zbus(4) - needed for p5pb. Change approved by phx. To generate a diff of this commit: cvs rdiff -u -r1.17 -r1.18 src/share/man/man4/man4.amiga/Makefile cvs rdiff -u -r0 -r1.1 src/share/man/man4/man4.amiga/p5pb.4 cvs rdiff -u -r1.3 -r1.4 src/sys/arch/amiga/amiga/amiga_bus_simple_1word.c cvs rdiff -u -r1.107 -r1.108 src/sys/arch/amiga/amiga/autoconf.c cvs rdiff -u -r0 -r1.1 src/sys/arch/amiga/amiga/bus.c cvs rdiff -u -r1.7 -r1.8 src/sys/arch/amiga/amiga/simple_busfuncs.c cvs rdiff -u -r1.139 -r1.140 src/sys/arch/amiga/conf/DRACO cvs rdiff -u -r1.269 -r1.270 src/sys/arch/amiga/conf/GENERIC cvs rdiff -u -r1.81 -r1.82 src/sys/arch/amiga/conf/GENERIC.in cvs rdiff -u -r1.91 -r1.92 src/sys/arch/amiga/conf/INSTALL cvs rdiff -u -r1.145 -r1.146 src/sys/arch/amiga/conf/files.amiga cvs rdiff -u -r1.63 -r1.64 src/sys/arch/amiga/dev/zbus.c cvs rdiff -u -r1.23 -r1.24 src/sys/arch/amiga/include/bus.h cvs rdiff -u -r0 -r1.1 src/sys/arch/amiga/include/pci_machdep.h cvs rdiff -u -r0 -r1.1 src/sys/arch/amiga/pci/p5pb.c \ src/sys/arch/amiga/pci/p5pbreg.h 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.amiga/Makefile diff -u src/share/man/man4/man4.amiga/Makefile:1.17 src/share/man/man4/man4.amiga/Makefile:1.18 --- src/share/man/man4/man4.amiga/Makefile:1.17 Fri Jan 14 10:25:14 2011 +++ src/share/man/man4/man4.amiga/Makefile Thu Aug 4 17:48:50 2011 @@ -1,11 +1,11 @@ # from: @(#)Makefile 8.2 (Berkeley) 2/16/94 -# $NetBSD: Makefile,v 1.17 2011/01/14 10:25:14 phx Exp $ +# $NetBSD: Makefile,v 1.18 2011/08/04 17:48:50 rkujawa Exp $ MAN= afsc.4 ahsc.4 amidisplaycc.4 atzsc.4 autoconf.4 console.4 bah.4 \ bppcsc.4 ed.4 es.4 fdc.4 grf.4 \ grfcl.4 grfcv.4 grfcv3d.4 grfet.4 grfrh.4 grfrt.4 grful.4 \ - gtsc.4 intro.4 ite.4 mem.4 mfcs.4 mgnsc.4 qn.4 ser.4 \ - wesc.4 zssc.4 + gtsc.4 intro.4 ite.4 mem.4 mfcs.4 mgnsc.4 p5pb.4 \ + qn.4 ser.4 wesc.4 zssc.4 MLINKS= mem.4 kmem.4 MANSUBDIR=/amiga Index: src/sys/arch/amiga/amiga/amiga_bus_simple_1word.c diff -u src/sys/arch/amiga/amiga/amiga_bus_simple_1word.c:1.3 src/sys/arch/amiga/amiga/amiga_bus_simple_1word.c:1.4 --- src/sys/arch/amiga/amiga/amiga_bus_simple_1word.c:1.3 Mon Apr 28 20:23:12 2008 +++ src/sys/arch/amiga/amiga/amiga_bus_simple_1word.c Thu Aug 4 17:48:50 2011 @@ -1,4 +1,4 @@ -/* $NetBSD: amiga_bus_simple_1word.c,v 1.3 2008/04/28 20:23:12 martin Exp $ */ +/* $NetBSD: amiga_bus_simple_1word.c,v 1.4 2011/08/04 17:48:50 rkujawa Exp $ */ /*- * Copyright (c) 1999 The NetBSD Foundation, Inc. @@ -28,11 +28,202 @@ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. */ +#include +#include +#include + +#include +#include #include -__KERNEL_RCSID(1, "$NetBSD: amiga_bus_simple_1word.c,v 1.3 2008/04/28 20:23:12 martin Exp $"); +__KERNEL_RCSID(1, "$NetBSD: amiga_bus_simple_1word.c,v 1.4 2011/08/04 17:48:50 rkujawa Exp $"); -#define AMIGA_SIMPLE_BUS_STRIDE 1 /* 1 byte per word */ +#define AMIGA_SIMPLE_BUS_STRIDE 1 /* 1 byte per byte */ #define AMIGA_SIMPLE_BUS_WORD_METHODS +#define AMIGA_SIMPLE_BUS_LONGWORD_METHODS #include "simple_busfuncs.c" + +bsr(oabs(bsr4_swap_), u_int32_t); +bsw(oabs(bsw4_swap_), u_int32_t); + +bsrm(oabs(bsrm2_swap_), u_int16_t); +bswm(oabs(bswm2_swap_), u_int16_t); + +int oabs(bsm_absolute_)(bus_space_tag_t, bus_addr_t, bus_size_t, int, + bus_space_handle_t *); + +/* ARGSUSED */ +int +oabs(bsm_absolute_)(tag, address, size, flags, handlep) + bus_space_tag_t tag; + bus_addr_t address; + bus_size_t size; + int flags; + bus_space_handle_t *handlep; +{ + uint32_t pa = kvtop((void*) tag->base); + *handlep = tag->base + (address - pa) * AMIGA_SIMPLE_BUS_STRIDE; + return 0; +} + +/* ARGSUSED */ +u_int32_t +oabs(bsr4_swap_)(handle, offset) + bus_space_handle_t handle; + bus_size_t offset; +{ + volatile u_int32_t *p; + u_int32_t x; + + p = (volatile u_int32_t *)(handle + offset * AMIGA_SIMPLE_BUS_STRIDE); + x = *p; + amiga_bus_reorder_protect(); + return bswap32(x); +} + +/* ARGSUSED */ +void +oabs(bsw4_swap_)(handle, offset, value) + bus_space_handle_t handle; + bus_size_t offset; + unsigne
CVS commit: src/share/man/man4
Module Name:src Committed By: matt Date: Thu Aug 4 15:40:20 UTC 2011 Modified Files: src/share/man/man4: wd.4 Log Message: wd includes SATA as well. To generate a diff of this commit: cvs rdiff -u -r1.15 -r1.16 src/share/man/man4/wd.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/wd.4 diff -u src/share/man/man4/wd.4:1.15 src/share/man/man4/wd.4:1.16 --- src/share/man/man4/wd.4:1.15 Wed May 27 19:24:00 2009 +++ src/share/man/man4/wd.4 Thu Aug 4 15:40:20 2011 @@ -1,4 +1,4 @@ -.\" $NetBSD: wd.4,v 1.15 2009/05/27 19:24:00 snj Exp $ +.\" $NetBSD: wd.4,v 1.16 2011/08/04 15:40:20 matt Exp $ .\" .\" .\" Copyright (c) 1994 James A. Jegers @@ -38,7 +38,7 @@ .Nm wd driver supports hard disks that emulate the Western Digital WD100x. -This includes standard MFM, RLL, ESDI, IDE, and EIDE drives. +This includes standard MFM, RLL, ESDI, IDE, EIDE, and SATA drives. .Pp The flags are used only with controllers that support DMA operations and mode settings (like some pciide controllers).
CVS commit: src/sys/arch/ofppc/conf
Module Name:src Committed By: phx Date: Thu Aug 4 15:07:05 UTC 2011 Modified Files: src/sys/arch/ofppc/conf: files.ofppc Log Message: Do not overwrite ukbd.h with NO_UKBD_DEVICE. To generate a diff of this commit: cvs rdiff -u -r1.45 -r1.46 src/sys/arch/ofppc/conf/files.ofppc 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/ofppc/conf/files.ofppc diff -u src/sys/arch/ofppc/conf/files.ofppc:1.45 src/sys/arch/ofppc/conf/files.ofppc:1.46 --- src/sys/arch/ofppc/conf/files.ofppc:1.45 Wed Jun 22 18:06:33 2011 +++ src/sys/arch/ofppc/conf/files.ofppc Thu Aug 4 15:07:04 2011 @@ -1,4 +1,4 @@ -# $NetBSD: files.ofppc,v 1.45 2011/06/22 18:06:33 matt Exp $ +# $NetBSD: files.ofppc,v 1.46 2011/08/04 15:07:04 phx Exp $ # # NetBSD/ofppc configuration info # @@ -12,7 +12,6 @@ defflag adbkbd.h NO_ADBKBD_DEVICE defflag zsc.h NO_ZSC_DEVICE defflag adb.h NO_ADB_DEVICE -defflag ukbd.h NO_UKBD_DEVICE defflag zstty.h NO_ZSTTY_DEVICE defflag ofb.h NO_OFB_DEVICE
CVS commit: src/sys/arch/i386/conf
Module Name:src Committed By: jakllsch Date: Thu Aug 4 14:45:54 UTC 2011 Modified Files: src/sys/arch/i386/conf: ALL Log Message: Add coram(4). To generate a diff of this commit: cvs rdiff -u -r1.316 -r1.317 src/sys/arch/i386/conf/ALL Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/i386/conf/ALL diff -u src/sys/arch/i386/conf/ALL:1.316 src/sys/arch/i386/conf/ALL:1.317 --- src/sys/arch/i386/conf/ALL:1.316 Sat Jul 30 12:19:12 2011 +++ src/sys/arch/i386/conf/ALL Thu Aug 4 14:45:54 2011 @@ -1,4 +1,4 @@ -# $NetBSD: ALL,v 1.316 2011/07/30 12:19:12 jmcneill Exp $ +# $NetBSD: ALL,v 1.317 2011/08/04 14:45:54 jakllsch Exp $ # From NetBSD: GENERIC,v 1.787 2006/10/01 18:37:54 bouyer Exp # # ALL machine description file @@ -17,7 +17,7 @@ options INCLUDE_CONFIG_FILE # embed config file in kernel binary -#ident "ALL-$Revision: 1.316 $" +#ident "ALL-$Revision: 1.317 $" maxusers 64 # estimated number of users @@ -1505,6 +1505,10 @@ cxdtv* at pci? dev ? function ? iic* at cxdtv? +# Conexant CX23885-based TV cards +coram* at pci? dev ? function ? +iic* at coram? + isv* at isa? port 0x3e0 # IDEC Supervision/16 image capture # Bluetooth Controller and Device support
CVS commit: src/sys/dev/pci
Module Name:src Committed By: jakllsch Date: Thu Aug 4 14:43:55 UTC 2011 Modified Files: src/sys/dev/pci: files.pci Added Files: src/sys/dev/pci: coram.c coramvar.h cx23885reg.h Log Message: Add coram(4). A driver for CX23885-based TV cards, such as the Hauppauge WinTV HVR-1250 "Coram" board. Currently only supports ATSC 8VSB reception. To generate a diff of this commit: cvs rdiff -u -r0 -r1.1 src/sys/dev/pci/coram.c src/sys/dev/pci/coramvar.h \ src/sys/dev/pci/cx23885reg.h cvs rdiff -u -r1.342 -r1.343 src/sys/dev/pci/files.pci 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/files.pci diff -u src/sys/dev/pci/files.pci:1.342 src/sys/dev/pci/files.pci:1.343 --- src/sys/dev/pci/files.pci:1.342 Thu Jul 14 23:47:45 2011 +++ src/sys/dev/pci/files.pci Thu Aug 4 14:43:55 2011 @@ -1,4 +1,4 @@ -# $NetBSD: files.pci,v 1.342 2011/07/14 23:47:45 jmcneill Exp $ +# $NetBSD: files.pci,v 1.343 2011/08/04 14:43:55 jakllsch Exp $ # # Config file and device description for machine-independent PCI code. # Included by ports that need it. Requires that the SCSI files be @@ -1053,3 +1053,8 @@ attach cxdtv at pci file dev/pci/cxdtv.c cxdtv file dev/pci/cxdtv_boards.c cxdtv + +# Conexant CX23885-series DTV interface +device coram: dtvbus, i2cbus, i2cexec, mt2131, cx24227 +attach coram at pci +file dev/pci/coram.c coram Added files: Index: src/sys/dev/pci/coram.c diff -u /dev/null src/sys/dev/pci/coram.c:1.1 --- /dev/null Thu Aug 4 14:43:55 2011 +++ src/sys/dev/pci/coram.c Thu Aug 4 14:43:55 2011 @@ -0,0 +1,962 @@ +/* $NetBSD: coram.c,v 1.1 2011/08/04 14:43:55 jakllsch Exp $ */ + +/* + * Copyright (c) 2008, 2011 Jonathan A. Kollasch + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + *notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + *notice, this list of conditions and the following disclaimer in the + *documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS 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 COPYRIGHT HOLDER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; + * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR + * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF + * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include +__KERNEL_RCSID(0, "$NetBSD: coram.c,v 1.1 2011/08/04 14:43:55 jakllsch Exp $"); + +#include +#include +#include +#include +#include + +#include + +#include + +#include +#include + +#include +#include +#include +#include +#include + +#include +#include + +static int coram_match(device_t, cfdata_t, void *); +static void coram_attach(device_t, device_t, void *); +static bool coram_resume(device_t, const pmf_qual_t *); +static int coram_intr(void *); + +static int coram_iic_exec(void *, i2c_op_t, i2c_addr_t, +const void *, size_t, void *, size_t, int); +static int coram_iic_acquire_bus(void *, int); +static void coram_iic_release_bus(void *, int); +static int coram_iic_read(struct coram_iic_softc *, i2c_op_t, i2c_addr_t, +const void *, size_t, void *, size_t, int); +static int coram_iic_write(struct coram_iic_softc *, i2c_op_t, i2c_addr_t, +const void *, size_t, void *, size_t, int); + +static void coram_dtv_get_devinfo(void *, struct dvb_frontend_info *); +static int coram_dtv_open(void *, int); +static void coram_dtv_close(void *); +static int coram_dtv_set_tuner(void *, const struct dvb_frontend_parameters *); +static fe_status_t coram_dtv_get_status(void *); +static uint16_t coram_dtv_get_signal_strength(void *); +static uint16_t coram_dtv_get_snr(void *); +static int coram_dtv_start_transfer(void *); +static int coram_dtv_stop_transfer(void *); + +static int coram_mpeg_attach(struct coram_softc *); +static int coram_mpeg_reset(struct coram_softc *); +static void * coram_mpeg_malloc(struct coram_softc *, size_t); +static int coram_allocmem(struct coram_softc *, size_t, size_t, struct coram_dma *); +static void coram_mpeg_free(struct coram_softc *, void *); +static int coram_mpeg_halt(struct coram_softc *); +static int coram_freemem(struct coram_softc *, struct coram_dma *);
CVS commit: src/lib/libedit/TEST
Module Name:src Committed By: christos Date: Thu Aug 4 14:33:05 UTC 2011 Modified Files: src/lib/libedit/TEST: wtc1.c Log Message: need err.h now To generate a diff of this commit: cvs rdiff -u -r1.4 -r1.5 src/lib/libedit/TEST/wtc1.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/TEST/wtc1.c diff -u src/lib/libedit/TEST/wtc1.c:1.4 src/lib/libedit/TEST/wtc1.c:1.5 --- src/lib/libedit/TEST/wtc1.c:1.4 Wed Jul 27 21:08:58 2011 +++ src/lib/libedit/TEST/wtc1.c Thu Aug 4 10:33:05 2011 @@ -2,6 +2,7 @@ #include #include #include +#include #include #include #include
CVS commit: [cherry-xenmp] src/sys/arch/xen/xen
Module Name:src Committed By: cherry Date: Thu Aug 4 13:04:20 UTC 2011 Modified Files: src/sys/arch/xen/xen [cherry-xenmp]: evtchn.c Log Message: Send an ipi at IPL_HIGH to remote cpu, in order to get it to run spllower() To generate a diff of this commit: cvs rdiff -u -r1.47.6.2 -r1.47.6.3 src/sys/arch/xen/xen/evtchn.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/xen/xen/evtchn.c diff -u src/sys/arch/xen/xen/evtchn.c:1.47.6.2 src/sys/arch/xen/xen/evtchn.c:1.47.6.3 --- src/sys/arch/xen/xen/evtchn.c:1.47.6.2 Thu Aug 4 09:07:47 2011 +++ src/sys/arch/xen/xen/evtchn.c Thu Aug 4 13:04:20 2011 @@ -1,4 +1,4 @@ -/* $NetBSD: evtchn.c,v 1.47.6.2 2011/08/04 09:07:47 cherry Exp $ */ +/* $NetBSD: evtchn.c,v 1.47.6.3 2011/08/04 13:04:20 cherry Exp $ */ /* * Copyright (c) 2006 Manuel Bouyer. @@ -54,7 +54,7 @@ #include -__KERNEL_RCSID(0, "$NetBSD: evtchn.c,v 1.47.6.2 2011/08/04 09:07:47 cherry Exp $"); +__KERNEL_RCSID(0, "$NetBSD: evtchn.c,v 1.47.6.3 2011/08/04 13:04:20 cherry Exp $"); #include "opt_xen.h" #include "isa.h" @@ -245,7 +245,16 @@ evtsource[evtch]->ev_imask, evtch >> LONG_SHIFT, evtch & LONG_MASK); - /* leave masked */ + + if (evtsource[evtch]->ev_cpu != ci) { + /* facilitate spllower() on remote cpu */ + struct cpu_info *rci = evtsource[evtch]->ev_cpu; + if (xen_send_ipi(rci, XEN_IPI_KICK)) { +panic("xen_send_ipi(%s, XEN_IPI_KICK) failed\n", cpu_name(rci)); + } + } + + /* leave masked */ return 0; } ci->ci_ilevel = evtsource[evtch]->ev_maxlevel;
CVS commit: [cherry-xenmp] src/sys/arch/xen
Module Name:src Committed By: cherry Date: Thu Aug 4 09:07:47 UTC 2011 Modified Files: src/sys/arch/xen/include [cherry-xenmp]: evtchn.h hypervisor.h intr.h src/sys/arch/xen/x86 [cherry-xenmp]: hypervisor_machdep.c src/sys/arch/xen/xen [cherry-xenmp]: evtchn.c xenevt.c Log Message: first cut at per-cpu event handling To generate a diff of this commit: cvs rdiff -u -r1.18.10.1 -r1.18.10.2 src/sys/arch/xen/include/evtchn.h cvs rdiff -u -r1.31 -r1.31.10.1 src/sys/arch/xen/include/hypervisor.h cvs rdiff -u -r1.31.10.2 -r1.31.10.3 src/sys/arch/xen/include/intr.h cvs rdiff -u -r1.14.2.1 -r1.14.2.2 src/sys/arch/xen/x86/hypervisor_machdep.c cvs rdiff -u -r1.47.6.1 -r1.47.6.2 src/sys/arch/xen/xen/evtchn.c cvs rdiff -u -r1.37 -r1.37.2.1 src/sys/arch/xen/xen/xenevt.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/xen/include/evtchn.h diff -u src/sys/arch/xen/include/evtchn.h:1.18.10.1 src/sys/arch/xen/include/evtchn.h:1.18.10.2 --- src/sys/arch/xen/include/evtchn.h:1.18.10.1 Fri Jun 3 13:27:40 2011 +++ src/sys/arch/xen/include/evtchn.h Thu Aug 4 09:07:46 2011 @@ -1,4 +1,4 @@ -/* $NetBSD: evtchn.h,v 1.18.10.1 2011/06/03 13:27:40 cherry Exp $ */ +/* $NetBSD: evtchn.h,v 1.18.10.2 2011/08/04 09:07:46 cherry Exp $ */ /* * @@ -42,7 +42,9 @@ int event_remove_handler(int, int (*func)(void *), void *); struct intrhand; -void event_set_iplhandler(struct intrhand *, int); +void event_set_iplhandler(struct cpu_info *ci, + struct intrhand *, + int); extern int debug_port; extern int xen_debug_handler(void *); Index: src/sys/arch/xen/include/hypervisor.h diff -u src/sys/arch/xen/include/hypervisor.h:1.31 src/sys/arch/xen/include/hypervisor.h:1.31.10.1 --- src/sys/arch/xen/include/hypervisor.h:1.31 Mon Oct 19 18:41:10 2009 +++ src/sys/arch/xen/include/hypervisor.h Thu Aug 4 09:07:46 2011 @@ -1,4 +1,4 @@ -/* $NetBSD: hypervisor.h,v 1.31 2009/10/19 18:41:10 bouyer Exp $ */ +/* $NetBSD: hypervisor.h,v 1.31.10.1 2011/08/04 09:07:46 cherry Exp $ */ /* * Copyright (c) 2006 Manuel Bouyer. @@ -91,6 +91,7 @@ #include #include +#include #include #undef u8 @@ -136,7 +137,8 @@ void hypervisor_mask_event(unsigned int); void hypervisor_clear_event(unsigned int); void hypervisor_enable_ipl(unsigned int); -void hypervisor_set_ipending(uint32_t, int, int); +void hypervisor_set_ipending(struct cpu_info *, + uint32_t, int, int); void hypervisor_machdep_attach(void); /* Index: src/sys/arch/xen/include/intr.h diff -u src/sys/arch/xen/include/intr.h:1.31.10.2 src/sys/arch/xen/include/intr.h:1.31.10.3 --- src/sys/arch/xen/include/intr.h:1.31.10.2 Sun Jun 26 12:56:32 2011 +++ src/sys/arch/xen/include/intr.h Thu Aug 4 09:07:46 2011 @@ -1,4 +1,4 @@ -/* $NetBSD: intr.h,v 1.31.10.2 2011/06/26 12:56:32 cherry Exp $ */ +/* $NetBSD: intr.h,v 1.31.10.3 2011/08/04 09:07:46 cherry Exp $ */ /* NetBSD intr.h,v 1.15 2004/10/31 10:39:34 yamt Exp */ /*- @@ -58,13 +58,8 @@ struct intrhand *ev_handlers; /* handler chain */ struct evcnt ev_evcnt; /* interrupt counter */ char ev_evname[32]; /* event counter name */ + struct cpu_info *ev_cpu; /* cpu on which this event is bound */ struct simplelock ev_lock; /* protects this structure */ - - /* - * XXX: The lock is quite coursegrained ( for the entire - * handler list ), but contention is expected to be low. See - * how this performs and revisit. - */ }; /* Index: src/sys/arch/xen/x86/hypervisor_machdep.c diff -u src/sys/arch/xen/x86/hypervisor_machdep.c:1.14.2.1 src/sys/arch/xen/x86/hypervisor_machdep.c:1.14.2.2 --- src/sys/arch/xen/x86/hypervisor_machdep.c:1.14.2.1 Fri Jun 3 13:27:41 2011 +++ src/sys/arch/xen/x86/hypervisor_machdep.c Thu Aug 4 09:07:47 2011 @@ -1,4 +1,4 @@ -/* $NetBSD: hypervisor_machdep.c,v 1.14.2.1 2011/06/03 13:27:41 cherry Exp $ */ +/* $NetBSD: hypervisor_machdep.c,v 1.14.2.2 2011/08/04 09:07:47 cherry Exp $ */ /* * @@ -54,7 +54,7 @@ #include -__KERNEL_RCSID(0, "$NetBSD: hypervisor_machdep.c,v 1.14.2.1 2011/06/03 13:27:41 cherry Exp $"); +__KERNEL_RCSID(0, "$NetBSD: hypervisor_machdep.c,v 1.14.2.2 2011/08/04 09:07:47 cherry Exp $"); #include #include @@ -86,13 +86,101 @@ // #define PORT_DEBUG 4 // #define EARLY_DEBUG_EVENT +static inline unsigned int +evt_bitstr_to_port(unsigned long l1, unsigned long l2) +{ + unsigned int l1i, l2i, port; + + l1i = xen_ffs(l1) - 1; + l2i = xen_ffs(l2) - 1; + + port = (l1i << LONG_SHIFT) + l2i; + return port; +} + +/* callback function type */ +typedef void (*iterate_func_t)(struct cpu_info *, + unsigned int, + unsigned int, + unsigned int, + void *); + + +static inline void +evt_iterate_pending(struct cpu_info *ci, + volatile unsigned long *pendingl1, + volatile unsigned long *pendingl2, + volatile unsigned long *mask, + iterate_func_t iterate_pending, + void
CVS commit: othersrc/external/bsd/bag/dist
Module Name:othersrc Committed By: wiz Date: Thu Aug 4 08:31:30 UTC 2011 Modified Files: othersrc/external/bsd/bag/dist: bag.1 Log Message: Remove trailing whitespace. To generate a diff of this commit: cvs rdiff -u -r1.1.1.1 -r1.2 othersrc/external/bsd/bag/dist/bag.1 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/bag/dist/bag.1 diff -u othersrc/external/bsd/bag/dist/bag.1:1.1.1.1 othersrc/external/bsd/bag/dist/bag.1:1.2 --- othersrc/external/bsd/bag/dist/bag.1:1.1.1.1 Thu Aug 4 06:32:29 2011 +++ othersrc/external/bsd/bag/dist/bag.1 Thu Aug 4 08:31:29 2011 @@ -1,4 +1,4 @@ -.\" $NetBSD: bag.1,v 1.1.1.1 2011/08/04 06:32:29 agc Exp $ +.\" $NetBSD: bag.1,v 1.2 2011/08/04 08:31:29 wiz Exp $ .\" .\" Copyright (c) 2011 Alistair Crooks .\" All rights reserved. @@ -77,24 +77,24 @@ % mat cvf test1.mat -C dist bag.c bag.h frontends.c main.c bag.1 bagpax.1 libbag.3 % bag -o test1.bag test1.mat netpgp: warning - using pubkey from secring -signature 2048/RSA (Encrypt or Sign) 1b68dcfcc0596823 2004-01-12 -Key fingerprint: d415 9deb 336d e4cc cdfa 00cd 1b68 dcfc c059 6823 +signature 2048/RSA (Encrypt or Sign) 1b68dcfcc0596823 2004-01-12 +Key fingerprint: d415 9deb 336d e4cc cdfa 00cd 1b68 dcfc c059 6823 uid Alistair Crooks uid Alistair Crooks uid Alistair Crooks uid Alistair Crooks -netpgp passphrase: +netpgp passphrase: % bag -d -o test2.mat test1.bag Good signature for /tmp/bag.09341a/inventory.gpg made Sun Jul 24 02:04:45 2011 using RSA (Encrypt or Sign) key 1b68dcfcc0596823 -signature 2048/RSA (Encrypt or Sign) 1b68dcfcc0596823 2004-01-12 -Key fingerprint: d415 9deb 336d e4cc cdfa 00cd 1b68 dcfc c059 6823 +signature 2048/RSA (Encrypt or Sign) 1b68dcfcc0596823 2004-01-12 +Key fingerprint: d415 9deb 336d e4cc cdfa 00cd 1b68 dcfc c059 6823 uid Alistair Crooks uid Alistair Crooks uid Alistair Crooks uid Alistair Crooks uid Alistair Crooks (Yahoo!) -encryption 2048/RSA (Encrypt or Sign) 79deb61e488eee74 2004-01-12 +encryption 2048/RSA (Encrypt or Sign) 79deb61e488eee74 2004-01-12 % cmp test1.mat test2.mat % .Ed