CVS commit: src/sys/arch/hp700/dev
Module Name:src Committed By: skrll Date: Wed May 23 07:06:02 UTC 2012 Modified Files: src/sys/arch/hp700/dev: cpu.c Log Message: Count the cpus as they attach so that CPU_INFO_FOREACH works before hatching the secondary cpus. To generate a diff of this commit: cvs rdiff -u -r1.24 -r1.25 src/sys/arch/hp700/dev/cpu.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/cpu.c diff -u src/sys/arch/hp700/dev/cpu.c:1.24 src/sys/arch/hp700/dev/cpu.c:1.25 --- src/sys/arch/hp700/dev/cpu.c:1.24 Mon May 21 21:15:39 2012 +++ src/sys/arch/hp700/dev/cpu.c Wed May 23 07:06:02 2012 @@ -1,4 +1,4 @@ -/* $NetBSD: cpu.c,v 1.24 2012/05/21 21:15:39 skrll Exp $ */ +/* $NetBSD: cpu.c,v 1.25 2012/05/23 07:06:02 skrll Exp $ */ /* $OpenBSD: cpu.c,v 1.29 2009/02/08 18:33:28 miod Exp $ */ @@ -29,7 +29,7 @@ */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: cpu.c,v 1.24 2012/05/21 21:15:39 skrll Exp $); +__KERNEL_RCSID(0, $NetBSD: cpu.c,v 1.25 2012/05/23 07:06:02 skrll Exp $); #include opt_multiprocessor.h @@ -179,7 +179,6 @@ cpuattach(device_t parent, device_t self if (ci-ci_hpa == hppa_mcpuhpa) { ci-ci_flags |= CPUF_PRIMARY|CPUF_RUNNING; - hppa_ncpu++; } else { int err; @@ -190,6 +189,7 @@ cpuattach(device_t parent, device_t self return; } } + hppa_ncpu++; #endif @@ -266,9 +266,6 @@ cpu_hatch(void) struct cpu_info *ci = curcpu(); ci-ci_flags |= CPUF_RUNNING; -#if 0 - hppa_ncpu++; -#endif /* Wait for additional CPUs to spinup. */ while (!start_secondary_cpu)
CVS commit: src/sys/arch/hp700/hp700
Module Name:src Committed By: skrll Date: Wed May 23 07:31:31 UTC 2012 Modified Files: src/sys/arch/hp700/hp700: intr.c Log Message: Make a #define MULTIPROCESSOR kernel compile To generate a diff of this commit: cvs rdiff -u -r1.38 -r1.39 src/sys/arch/hp700/hp700/intr.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/hp700/intr.c diff -u src/sys/arch/hp700/hp700/intr.c:1.38 src/sys/arch/hp700/hp700/intr.c:1.39 --- src/sys/arch/hp700/hp700/intr.c:1.38 Thu Mar 29 09:26:24 2012 +++ src/sys/arch/hp700/hp700/intr.c Wed May 23 07:31:31 2012 @@ -1,4 +1,4 @@ -/* $NetBSD: intr.c,v 1.38 2012/03/29 09:26:24 skrll Exp $ */ +/* $NetBSD: intr.c,v 1.39 2012/05/23 07:31:31 skrll Exp $ */ /* $OpenBSD: intr.c,v 1.27 2009/12/31 12:52:35 jsing Exp $ */ /* @@ -35,7 +35,7 @@ */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: intr.c,v 1.38 2012/03/29 09:26:24 skrll Exp $); +__KERNEL_RCSID(0, $NetBSD: intr.c,v 1.39 2012/05/23 07:31:31 skrll Exp $); #define __MUTEX_PRIVATE @@ -375,6 +375,7 @@ hppa_intr(struct trapframe *frame) extern char mutex_enter_crit_start[]; extern char mutex_enter_crit_end[]; +#ifndef MULTIPROCESSOR extern char _lock_cas_ras_start[]; extern char _lock_cas_ras_end[]; @@ -384,6 +385,7 @@ hppa_intr(struct trapframe *frame) frame-tf_iioq_head = (u_int)_lock_cas_ras_start; frame-tf_iioq_tail = (u_int)_lock_cas_ras_start + 4; } +#endif /* * If we interrupted in the middle of mutex_enter(), we must patch up
CVS commit: src
Module Name:src Committed By: skrll Date: Wed May 23 08:19:40 UTC 2012 Modified Files: src/etc/etc.hp700: Makefile.inc Added Files: src/sys/arch/hp700/conf: GENERIC.MP Log Message: Add a GENERIC.MP kernel config and add it to the build list so that it gets build tested. To generate a diff of this commit: cvs rdiff -u -r1.5 -r1.6 src/etc/etc.hp700/Makefile.inc cvs rdiff -u -r0 -r1.1 src/sys/arch/hp700/conf/GENERIC.MP Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/etc/etc.hp700/Makefile.inc diff -u src/etc/etc.hp700/Makefile.inc:1.5 src/etc/etc.hp700/Makefile.inc:1.6 --- src/etc/etc.hp700/Makefile.inc:1.5 Tue Jul 24 10:49:25 2007 +++ src/etc/etc.hp700/Makefile.inc Wed May 23 08:19:40 2012 @@ -1,4 +1,4 @@ -# $NetBSD: Makefile.inc,v 1.5 2007/07/24 10:49:25 pavel Exp $ +# $NetBSD: Makefile.inc,v 1.6 2012/05/23 08:19:40 skrll Exp $ # # etc.hp700/Makefile.inc -- hp700-specific etc Makefile targets # @@ -8,6 +8,6 @@ KERNEL_SETS= GENERIC -BUILD_KERNELS= RAMDISK +BUILD_KERNELS= GENERIC.MP RAMDISK INSTALLATION_DIRS+= installation Added files: Index: src/sys/arch/hp700/conf/GENERIC.MP diff -u /dev/null src/sys/arch/hp700/conf/GENERIC.MP:1.1 --- /dev/null Wed May 23 08:19:40 2012 +++ src/sys/arch/hp700/conf/GENERIC.MP Wed May 23 08:19:40 2012 @@ -0,0 +1,7 @@ +# $NetBSD: GENERIC.MP,v 1.1 2012/05/23 08:19:40 skrll Exp $ +# +# Generic hp700 kernel with multiprocessor support. + +include arch/hp700/conf/GENERIC + +options MULTIPROCESSOR # include multiprocessor support
CVS commit: src/sys/arch/hp700/hp700
Module Name:src Committed By: skrll Date: Wed May 23 08:59:36 UTC 2012 Modified Files: src/sys/arch/hp700/hp700: machdep.c Log Message: Whitespace To generate a diff of this commit: cvs rdiff -u -r1.111 -r1.112 src/sys/arch/hp700/hp700/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/hp700/hp700/machdep.c diff -u src/sys/arch/hp700/hp700/machdep.c:1.111 src/sys/arch/hp700/hp700/machdep.c:1.112 --- src/sys/arch/hp700/hp700/machdep.c:1.111 Wed Apr 25 07:58:43 2012 +++ src/sys/arch/hp700/hp700/machdep.c Wed May 23 08:59:36 2012 @@ -1,4 +1,4 @@ -/* $NetBSD: machdep.c,v 1.111 2012/04/25 07:58:43 dholland Exp $ */ +/* $NetBSD: machdep.c,v 1.112 2012/05/23 08:59:36 skrll Exp $ */ /*- * Copyright (c) 2001, 2002 The NetBSD Foundation, Inc. @@ -58,7 +58,7 @@ */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: machdep.c,v 1.111 2012/04/25 07:58:43 dholland Exp $); +__KERNEL_RCSID(0, $NetBSD: machdep.c,v 1.112 2012/05/23 08:59:36 skrll Exp $); #include opt_cputype.h #include opt_ddb.h @@ -476,8 +476,7 @@ hppa_init(paddr_t start, void *bi) delay_init(); /* fetch the monarch/default cpu hpa */ - - error = pdcproc_hpa_processor(hppa_mcpuhpa); + error = pdcproc_hpa_processor(hppa_mcpuhpa); if (error 0) panic(%s: PDC_HPA failed, __func__);
CVS commit: src/sys/arch/hp700/dev
Module Name:src Committed By: skrll Date: Wed May 23 09:49:56 UTC 2012 Modified Files: src/sys/arch/hp700/dev: cpu.c Log Message: Add a KASSERT. To generate a diff of this commit: cvs rdiff -u -r1.25 -r1.26 src/sys/arch/hp700/dev/cpu.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/cpu.c diff -u src/sys/arch/hp700/dev/cpu.c:1.25 src/sys/arch/hp700/dev/cpu.c:1.26 --- src/sys/arch/hp700/dev/cpu.c:1.25 Wed May 23 07:06:02 2012 +++ src/sys/arch/hp700/dev/cpu.c Wed May 23 09:49:56 2012 @@ -1,4 +1,4 @@ -/* $NetBSD: cpu.c,v 1.25 2012/05/23 07:06:02 skrll Exp $ */ +/* $NetBSD: cpu.c,v 1.26 2012/05/23 09:49:56 skrll Exp $ */ /* $OpenBSD: cpu.c,v 1.29 2009/02/08 18:33:28 miod Exp $ */ @@ -29,7 +29,7 @@ */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: cpu.c,v 1.25 2012/05/23 07:06:02 skrll Exp $); +__KERNEL_RCSID(0, $NetBSD: cpu.c,v 1.26 2012/05/23 09:49:56 skrll Exp $); #include opt_multiprocessor.h @@ -151,6 +151,7 @@ cpuattach(device_t parent, device_t self /* * Describe the floating-point support. */ + KASSERT(fpu_present); aprint_normal(%s: %s floating point, rev %d\n, self-dv_xname, hppa_mod_info(HPPA_TYPE_FPU, (fpu_version 16) 0x1f), (fpu_version 11) 0x1f);
CVS commit: src/sys/arch/xen/xen
Module Name:src Committed By: cegger Date: Wed May 23 10:01:51 UTC 2012 Modified Files: src/sys/arch/xen/xen: xbdback_xenbus.c Log Message: destroy mutex and cv first. Fixes LOCKDEBUG crash when a guest shut down. To generate a diff of this commit: cvs rdiff -u -r1.55 -r1.56 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.55 src/sys/arch/xen/xen/xbdback_xenbus.c:1.56 --- src/sys/arch/xen/xen/xbdback_xenbus.c:1.55 Wed Dec 7 15:47:43 2011 +++ src/sys/arch/xen/xen/xbdback_xenbus.c Wed May 23 10:01:51 2012 @@ -1,4 +1,4 @@ -/* $NetBSD: xbdback_xenbus.c,v 1.55 2011/12/07 15:47:43 cegger Exp $ */ +/* $NetBSD: xbdback_xenbus.c,v 1.56 2012/05/23 10:01:51 cegger Exp $ */ /* * Copyright (c) 2006 Manuel Bouyer. @@ -26,7 +26,7 @@ */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: xbdback_xenbus.c,v 1.55 2011/12/07 15:47:43 cegger Exp $); +__KERNEL_RCSID(0, $NetBSD: xbdback_xenbus.c,v 1.56 2012/05/23 10:01:51 cegger Exp $); #include sys/atomic.h #include sys/buf.h @@ -513,6 +513,8 @@ xbdback_xenbus_destroy(void *arg) vn_close(xbdi-xbdi_vp, FREAD, NOCRED); } SLIST_REMOVE(xbdback_instances, xbdi, xbdback_instance, next); + mutex_destroy(xbdi-xbdi_lock); + cv_destroy(xbdi-xbdi_cv); kmem_free(xbdi, sizeof(*xbdi)); return 0; }
CVS commit: src/sys/arch/hp700/dev
Module Name:src Committed By: skrll Date: Wed May 23 10:31:59 UTC 2012 Modified Files: src/sys/arch/hp700/dev: dino.c wax.c Log Message: s/IRQ/interrupt/ in autoconf message. To generate a diff of this commit: cvs rdiff -u -r1.34 -r1.35 src/sys/arch/hp700/dev/dino.c cvs rdiff -u -r1.18 -r1.19 src/sys/arch/hp700/dev/wax.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/dino.c diff -u src/sys/arch/hp700/dev/dino.c:1.34 src/sys/arch/hp700/dev/dino.c:1.35 --- src/sys/arch/hp700/dev/dino.c:1.34 Tue Apr 3 12:07:26 2012 +++ src/sys/arch/hp700/dev/dino.c Wed May 23 10:31:59 2012 @@ -1,4 +1,4 @@ -/* $NetBSD: dino.c,v 1.34 2012/04/03 12:07:26 skrll Exp $ */ +/* $NetBSD: dino.c,v 1.35 2012/05/23 10:31:59 skrll Exp $ */ /* $OpenBSD: dino.c,v 1.5 2004/02/13 20:39:31 mickey Exp $ */ @@ -29,7 +29,7 @@ */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: dino.c,v 1.34 2012/04/03 12:07:26 skrll Exp $); +__KERNEL_RCSID(0, $NetBSD: dino.c,v 1.35 2012/05/23 10:31:59 skrll Exp $); /* #include cardbus.h */ @@ -1618,7 +1618,7 @@ dinoattach(device_t parent, device_t sel sc-sc_dmat = ca-ca_dmatag; if (ca-ca_irq == HP700CF_IRQ_UNDEF) { - aprint_error_dev(self, : can't allocate IRQ); + aprint_error_dev(self, : can't allocate interrupt); return; } Index: src/sys/arch/hp700/dev/wax.c diff -u src/sys/arch/hp700/dev/wax.c:1.18 src/sys/arch/hp700/dev/wax.c:1.19 --- src/sys/arch/hp700/dev/wax.c:1.18 Tue Apr 3 12:07:26 2012 +++ src/sys/arch/hp700/dev/wax.c Wed May 23 10:31:59 2012 @@ -1,4 +1,4 @@ -/* $NetBSD: wax.c,v 1.18 2012/04/03 12:07:26 skrll Exp $ */ +/* $NetBSD: wax.c,v 1.19 2012/05/23 10:31:59 skrll Exp $ */ /* $OpenBSD: wax.c,v 1.1 1998/11/23 03:04:10 mickey Exp $ */ @@ -29,7 +29,7 @@ */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: wax.c,v 1.18 2012/04/03 12:07:26 skrll Exp $); +__KERNEL_RCSID(0, $NetBSD: wax.c,v 1.19 2012/05/23 10:31:59 skrll Exp $); #include sys/param.h #include sys/systm.h @@ -120,7 +120,7 @@ waxattach(device_t parent, device_t self int s, in; if (ca-ca_irq == HP700CF_IRQ_UNDEF) { - aprint_error(: can't allocate IRQ\n); + aprint_error(: can't allocate interrupt\n); return; }
CVS commit: src/sys/arch/hp700/dev
Module Name:src Committed By: skrll Date: Wed May 23 10:37:02 UTC 2012 Modified Files: src/sys/arch/hp700/dev: asp.c Log Message: Whitespace. To generate a diff of this commit: cvs rdiff -u -r1.19 -r1.20 src/sys/arch/hp700/dev/asp.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/asp.c diff -u src/sys/arch/hp700/dev/asp.c:1.19 src/sys/arch/hp700/dev/asp.c:1.20 --- src/sys/arch/hp700/dev/asp.c:1.19 Fri Jul 1 18:33:09 2011 +++ src/sys/arch/hp700/dev/asp.c Wed May 23 10:37:01 2012 @@ -1,4 +1,4 @@ -/* $NetBSD: asp.c,v 1.19 2011/07/01 18:33:09 dyoung Exp $ */ +/* $NetBSD: asp.c,v 1.20 2012/05/23 10:37:01 skrll Exp $ */ /* $OpenBSD: asp.c,v 1.5 2000/02/09 05:04:22 mickey Exp $ */ @@ -37,7 +37,7 @@ */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: asp.c,v 1.19 2011/07/01 18:33:09 dyoung Exp $); +__KERNEL_RCSID(0, $NetBSD: asp.c,v 1.20 2012/05/23 10:37:01 skrll Exp $); #include sys/param.h #include sys/systm.h @@ -201,7 +201,7 @@ aspattach(device_t parent, device_t self * Map the ASP interrupt registers. */ if (bus_space_map(ca-ca_iot, ca-ca_hpa + ASP_REG_INT, - sizeof(struct asp_trs), 0, ioh)) { + sizeof(struct asp_trs), 0, ioh)) { aprint_error(: can't map interrupt registers.\n); return; }
CVS commit: src/sys/arch/hp700/hp700
Module Name:src Committed By: skrll Date: Wed May 23 11:04:54 UTC 2012 Modified Files: src/sys/arch/hp700/hp700: intr.c Log Message: Update a comment. To generate a diff of this commit: cvs rdiff -u -r1.39 -r1.40 src/sys/arch/hp700/hp700/intr.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/hp700/intr.c diff -u src/sys/arch/hp700/hp700/intr.c:1.39 src/sys/arch/hp700/hp700/intr.c:1.40 --- src/sys/arch/hp700/hp700/intr.c:1.39 Wed May 23 07:31:31 2012 +++ src/sys/arch/hp700/hp700/intr.c Wed May 23 11:04:54 2012 @@ -1,4 +1,4 @@ -/* $NetBSD: intr.c,v 1.39 2012/05/23 07:31:31 skrll Exp $ */ +/* $NetBSD: intr.c,v 1.40 2012/05/23 11:04:54 skrll Exp $ */ /* $OpenBSD: intr.c,v 1.27 2009/12/31 12:52:35 jsing Exp $ */ /* @@ -35,7 +35,7 @@ */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: intr.c,v 1.39 2012/05/23 07:31:31 skrll Exp $); +__KERNEL_RCSID(0, $NetBSD: intr.c,v 1.40 2012/05/23 11:04:54 skrll Exp $); #define __MUTEX_PRIVATE @@ -178,8 +178,9 @@ hp700_intr_establish(int ipl, int (*hand panic(%s: bad interrupt bit %d, __func__, bit_pos); /* - * Panic if this interrupt bit is already handled, but allow shared - * interrupts for PCI. + * Panic if this interrupt bit is already handled, but allow + * shared interrupts for cascaded registers, e.g. dino and gsc + * XXX This could be improved. */ if (ir-ir_bits_map[31 ^ bit_pos] != IR_BIT_UNUSED !IR_BIT_NESTED_P(ir-ir_bits_map[31 ^ bit_pos])
CVS commit: src/sys/arch/hp700/hp700
Module Name:src Committed By: skrll Date: Wed May 23 11:08:33 UTC 2012 Modified Files: src/sys/arch/hp700/hp700: autoconf.c Log Message: Style. To generate a diff of this commit: cvs rdiff -u -r1.45 -r1.46 src/sys/arch/hp700/hp700/autoconf.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/hp700/hp700/autoconf.c diff -u src/sys/arch/hp700/hp700/autoconf.c:1.45 src/sys/arch/hp700/hp700/autoconf.c:1.46 --- src/sys/arch/hp700/hp700/autoconf.c:1.45 Mon May 21 08:14:58 2012 +++ src/sys/arch/hp700/hp700/autoconf.c Wed May 23 11:08:33 2012 @@ -1,4 +1,4 @@ -/* $NetBSD: autoconf.c,v 1.45 2012/05/21 08:14:58 skrll Exp $ */ +/* $NetBSD: autoconf.c,v 1.46 2012/05/23 11:08:33 skrll Exp $ */ /* $OpenBSD: autoconf.c,v 1.15 2001/06/25 00:43:10 mickey Exp $ */ @@ -86,7 +86,7 @@ */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: autoconf.c,v 1.45 2012/05/21 08:14:58 skrll Exp $); +__KERNEL_RCSID(0, $NetBSD: autoconf.c,v 1.46 2012/05/23 11:08:33 skrll Exp $); #include opt_kgdb.h #include opt_useleds.h @@ -164,6 +164,7 @@ static void hppa_pdc_system_map_scan(voi void cpu_configure(void) { + struct cpu_info *ci = curcpu(); /* * Consider stopping for a debugger before @@ -186,7 +187,7 @@ cpu_configure(void) /* in spl*() we trust */ hp700_intr_init(); hppa_enable_irq(); - curcpu()-ci_psw |= PSW_I; + ci-ci_psw |= PSW_I; spl0(); if (cold_hook)
CVS commit: src/sys/arch/hp700/hp700
Module Name:src Committed By: skrll Date: Wed May 23 11:18:46 UTC 2012 Modified Files: src/sys/arch/hp700/hp700: genassym.cf Log Message: Reorder to match struct. No functional change. To generate a diff of this commit: cvs rdiff -u -r1.32 -r1.33 src/sys/arch/hp700/hp700/genassym.cf 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/hp700/genassym.cf diff -u src/sys/arch/hp700/hp700/genassym.cf:1.32 src/sys/arch/hp700/hp700/genassym.cf:1.33 --- src/sys/arch/hp700/hp700/genassym.cf:1.32 Tue Feb 1 18:33:24 2011 +++ src/sys/arch/hp700/hp700/genassym.cf Wed May 23 11:18:46 2012 @@ -1,4 +1,4 @@ -# $NetBSD: genassym.cf,v 1.32 2011/02/01 18:33:24 skrll Exp $ +# $NetBSD: genassym.cf,v 1.33 2012/05/23 11:18:46 skrll Exp $ # $OpenBSD: genassym.cf,v 1.18 2001/09/20 18:31:14 mickey Exp $ @@ -91,12 +91,12 @@ member IR_BITS_MAP ir_bits_map export IR_BIT_REG # struct cpu_info fields +define CI_TRAPSAVE offsetof(struct cpu_info, ci_trapsave) +define CI_MTX_COUNT offsetof(struct cpu_info, ci_mtx_count) define CI_CPL offsetof(struct cpu_info, ci_cpl) define CI_IPENDING offsetof(struct cpu_info, ci_ipending) #define CI_INTR_DEPTH offsetof(struct cpu_info, ci_intr_depth) #define CI_SOFTLWPS offsetof(struct cpu_info, ci_softlwps) -define CI_MTX_COUNT offsetof(struct cpu_info, ci_mtx_count) -define CI_TRAPSAVE offsetof(struct cpu_info, ci_trapsave) define CI_PSW offsetof(struct cpu_info, ci_psw) define CI_FPU_STATE offsetof(struct cpu_info, ci_fpu_state) ifdef MULTIPROCESSOR
CVS commit: src/doc
Module Name:src Committed By: yamt Date: Wed May 23 13:34:15 UTC 2012 Modified Files: src/doc: BRANCHES Log Message: update To generate a diff of this commit: cvs rdiff -u -r1.323 -r1.324 src/doc/BRANCHES Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/doc/BRANCHES diff -u src/doc/BRANCHES:1.323 src/doc/BRANCHES:1.324 --- src/doc/BRANCHES:1.323 Sun May 6 07:28:48 2012 +++ src/doc/BRANCHES Wed May 23 13:34:14 2012 @@ -1,4 +1,4 @@ -# $NetBSD: BRANCHES,v 1.323 2012/05/06 07:28:48 agc Exp $ +# $NetBSD: BRANCHES,v 1.324 2012/05/23 13:34:14 yamt Exp $ # # This file contains a list of branches that exist in the NetBSD CVS # tree and their current state. @@ -617,7 +617,7 @@ Description: page cache related changes Status: Active Start Date: Wed Nov 2 2011 End Date: -Base Tag: yamt-pagecache-base3 +Base Tag: yamt-pagecache-base5 Maintainer: YAMAMOTO Takashi y...@netbsd.org Scope: src Notes: - maintain object pages in radix tree rather than rb tree. @@ -629,12 +629,14 @@ Notes: - maintain object pages in radix dirtiness more precisely in uvm layer. - fix nfs commit range tracking. - fix nfs write clustering. XXX hack + - fix A-O loaning TODO: - benchmark - test - make the write clustering fix less kludgy - fix or disable the ad-hoc per-cpu statistic + - disable A-O loan as its benefit is unclear at best tested: i386, amd64, nfs, ffs
CVS commit: src/doc
Module Name:src Committed By: yamt Date: Wed May 23 13:54:37 UTC 2012 Modified Files: src/doc: BRANCHES Log Message: todo To generate a diff of this commit: cvs rdiff -u -r1.324 -r1.325 src/doc/BRANCHES Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/doc/BRANCHES diff -u src/doc/BRANCHES:1.324 src/doc/BRANCHES:1.325 --- src/doc/BRANCHES:1.324 Wed May 23 13:34:14 2012 +++ src/doc/BRANCHES Wed May 23 13:54:37 2012 @@ -1,4 +1,4 @@ -# $NetBSD: BRANCHES,v 1.324 2012/05/23 13:34:14 yamt Exp $ +# $NetBSD: BRANCHES,v 1.325 2012/05/23 13:54:37 yamt Exp $ # # This file contains a list of branches that exist in the NetBSD CVS # tree and their current state. @@ -630,6 +630,7 @@ Notes: - maintain object pages in radix - fix nfs commit range tracking. - fix nfs write clustering. XXX hack - fix A-O loaning + - write radixtree(9) man page TODO: - benchmark
CVS commit: src/sys/rump/librump/rumpkern
Module Name:src Committed By: martin Date: Wed May 23 14:59:21 UTC 2012 Modified Files: src/sys/rump/librump/rumpkern: vm.c Log Message: Recently uvm_page_locked_p() leaked outside of uvm/MD code, so rump needs to provide one. To generate a diff of this commit: cvs rdiff -u -r1.125 -r1.126 src/sys/rump/librump/rumpkern/vm.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/rump/librump/rumpkern/vm.c diff -u src/sys/rump/librump/rumpkern/vm.c:1.125 src/sys/rump/librump/rumpkern/vm.c:1.126 --- src/sys/rump/librump/rumpkern/vm.c:1.125 Sat Mar 17 17:58:38 2012 +++ src/sys/rump/librump/rumpkern/vm.c Wed May 23 14:59:21 2012 @@ -1,4 +1,4 @@ -/* $NetBSD: vm.c,v 1.125 2012/03/17 17:58:38 hannken Exp $ */ +/* $NetBSD: vm.c,v 1.126 2012/05/23 14:59:21 martin Exp $ */ /* * Copyright (c) 2007-2011 Antti Kantee. All Rights Reserved. @@ -41,7 +41,7 @@ */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: vm.c,v 1.125 2012/03/17 17:58:38 hannken Exp $); +__KERNEL_RCSID(0, $NetBSD: vm.c,v 1.126 2012/05/23 14:59:21 martin Exp $); #include sys/param.h #include sys/atomic.h @@ -354,6 +354,16 @@ uvmspace_init(struct vmspace *vm, struct vm-vm_refcnt = 1; } +bool +uvm_page_locked_p(struct vm_page *pg) +{ + + if (pg-uobject != NULL) { + return mutex_owned(pg-uobject-vmobjlock); + } + return true; +} + void uvm_pagewire(struct vm_page *pg) {
CVS commit: src/tests/lib/libc/sys
Module Name:src Committed By: martin Date: Wed May 23 16:08:32 UTC 2012 Modified Files: src/tests/lib/libc/sys: t_mincore.c Log Message: Simplify creation of a temporary file slightly, fix sizeof(buf) confusion when buf is a pointer. To generate a diff of this commit: cvs rdiff -u -r1.4 -r1.5 src/tests/lib/libc/sys/t_mincore.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/tests/lib/libc/sys/t_mincore.c diff -u src/tests/lib/libc/sys/t_mincore.c:1.4 src/tests/lib/libc/sys/t_mincore.c:1.5 --- src/tests/lib/libc/sys/t_mincore.c:1.4 Wed Mar 14 11:50:52 2012 +++ src/tests/lib/libc/sys/t_mincore.c Wed May 23 16:08:32 2012 @@ -1,4 +1,4 @@ -/* $NetBSD: t_mincore.c,v 1.4 2012/03/14 11:50:52 jruoho Exp $ */ +/* $NetBSD: t_mincore.c,v 1.5 2012/05/23 16:08:32 martin Exp $ */ /*- * Copyright (c) 2011 The NetBSD Foundation, Inc. @@ -59,7 +59,7 @@ * POSSIBILITY OF SUCH DAMAGE. */ #include sys/cdefs.h -__RCSID($NetBSD: t_mincore.c,v 1.4 2012/03/14 11:50:52 jruoho Exp $); +__RCSID($NetBSD: t_mincore.c,v 1.5 2012/05/23 16:08:32 martin Exp $); #include sys/mman.h #include sys/shm.h @@ -141,7 +141,6 @@ ATF_TC_BODY(mincore_resid, tc) void *addr, *addr2, *addr3, *buf; size_t npgs = 0; struct stat st; - ssize_t tot; int fd, rv; (void)memset(st, 0, sizeof(struct stat)); @@ -152,15 +151,8 @@ ATF_TC_BODY(mincore_resid, tc) ATF_REQUIRE(fd = 0); ATF_REQUIRE(buf != NULL); - tot = 0; - - while (tot page) { - - rv = write(fd, buf, sizeof(buf)); - ATF_REQUIRE(rv = 0); - - tot += rv; - } + rv = write(fd, buf, page * 5); + ATF_REQUIRE(rv = 0); ATF_REQUIRE(fd = 0); ATF_REQUIRE(fstat(fd, st) == 0);
CVS commit: src/sys/arch/hp700
Module Name:src Committed By: skrll Date: Wed May 23 16:11:37 UTC 2012 Modified Files: src/sys/arch/hp700/conf: GENERIC src/sys/arch/hp700/dev: apic.c asp.c cpu.c dino.c lasi.c mongoose.c power.c siop_sgc.c wax.c src/sys/arch/hp700/gsc: gscbus.c gscbusvar.h src/sys/arch/hp700/hp700: autoconf.c genassym.cf intr.c locore.S machdep.c mainbus.c src/sys/arch/hp700/include: cpu.h intr.h Removed Files: src/sys/arch/hp700/hp700: intr.h Log Message: Rework the hp700 interrupt code to - note chip restictions on interrupt in the kernel config - allocate interrupts at attach time - track per CPU interrupts - remove a funciton written in assembly To generate a diff of this commit: cvs rdiff -u -r1.113 -r1.114 src/sys/arch/hp700/conf/GENERIC cvs rdiff -u -r1.15 -r1.16 src/sys/arch/hp700/dev/apic.c cvs rdiff -u -r1.20 -r1.21 src/sys/arch/hp700/dev/asp.c cvs rdiff -u -r1.26 -r1.27 src/sys/arch/hp700/dev/cpu.c cvs rdiff -u -r1.35 -r1.36 src/sys/arch/hp700/dev/dino.c cvs rdiff -u -r1.22 -r1.23 src/sys/arch/hp700/dev/lasi.c \ src/sys/arch/hp700/dev/mongoose.c cvs rdiff -u -r1.6 -r1.7 src/sys/arch/hp700/dev/power.c cvs rdiff -u -r1.9 -r1.10 src/sys/arch/hp700/dev/siop_sgc.c cvs rdiff -u -r1.19 -r1.20 src/sys/arch/hp700/dev/wax.c cvs rdiff -u -r1.22 -r1.23 src/sys/arch/hp700/gsc/gscbus.c cvs rdiff -u -r1.10 -r1.11 src/sys/arch/hp700/gsc/gscbusvar.h cvs rdiff -u -r1.46 -r1.47 src/sys/arch/hp700/hp700/autoconf.c cvs rdiff -u -r1.33 -r1.34 src/sys/arch/hp700/hp700/genassym.cf cvs rdiff -u -r1.40 -r1.41 src/sys/arch/hp700/hp700/intr.c cvs rdiff -u -r1.15 -r0 src/sys/arch/hp700/hp700/intr.h cvs rdiff -u -r1.60 -r1.61 src/sys/arch/hp700/hp700/locore.S cvs rdiff -u -r1.112 -r1.113 src/sys/arch/hp700/hp700/machdep.c cvs rdiff -u -r1.82 -r1.83 src/sys/arch/hp700/hp700/mainbus.c cvs rdiff -u -r1.69 -r1.70 src/sys/arch/hp700/include/cpu.h cvs rdiff -u -r1.21 -r1.22 src/sys/arch/hp700/include/intr.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/hp700/conf/GENERIC diff -u src/sys/arch/hp700/conf/GENERIC:1.113 src/sys/arch/hp700/conf/GENERIC:1.114 --- src/sys/arch/hp700/conf/GENERIC:1.113 Fri Apr 6 12:21:58 2012 +++ src/sys/arch/hp700/conf/GENERIC Wed May 23 16:11:37 2012 @@ -1,4 +1,4 @@ -# $NetBSD: GENERIC,v 1.113 2012/04/06 12:21:58 skrll Exp $ +# $NetBSD: GENERIC,v 1.114 2012/05/23 16:11:37 skrll Exp $ # # GENERIC machine description file # @@ -23,7 +23,7 @@ include arch/hp700/conf/std.hp700 options INCLUDE_CONFIG_FILE # embed config file in kernel binary options SYSCTL_INCLUDE_DESCR # Include sysctl descriptions in kernel -#ident GENERIC-$Revision: 1.113 $ +#ident GENERIC-$Revision: 1.114 $ maxusers 32 # estimated number of users @@ -229,10 +229,13 @@ power0 at mainbus0 # power/fail manager lcd0 at mainbus0 # LCD # Basic Bus Support -lasi* at mainbus0 # LASI host adapter ( LSI PN??? ) -asp* at mainbus0 # this one comes w/ Viper and leds +lasi0 at mainbus0 irq 28 # LASI host adapter +lasi0 at phantomas0 irq 28 # LASI on [AB]* +lasi0 at uturn? irq 28 # LASI on [CJ]* +lasi1 at mainbus0 irq 27 # 712 GIO card +asp* at mainbus0 irq 28 # this one comes w/ Viper and LEDs wax* at mainbus0 # Wax GSC to GSC Bus Adapter -mongoose* at mainbus0 irq 17 # EISA Bus Adapter ( i82350 or TI??? ) +mongoose* at mainbus0 # EISA Bus Adapter ( i82350 or TI??? ) #vmeb* at mainbus0 irq ? # VME bus adapter phantomas* at mainbus0 # Phantom PseudoBC GSC+ Port @@ -341,10 +344,10 @@ lpt* at puc? port ? # || ports on uni # GSC SCSI controllers oosiop* at gsc?# NCR 53c700 osiop* at gsc? flags 0x0 # NCR 53c710 -siop* at gsc? irq 3 # NCR 53c720 (Fast/Wide) -siop* at mainbus0 irq 3 # NCR 53c720 (Fast/Wide) -siop* at phantomas? irq 3 # NCR 53c720 (Fast/Wide) -siop* at uturn? irq 3 # NCR 53c720 (Fast/Wide) +siop* at gsc?# NCR 53c720 (Fast/Wide) +siop* at mainbus0 # NCR 53c720 (Fast/Wide) +siop* at phantomas? # NCR 53c720 (Fast/Wide) +siop* at uturn? # NCR 53c720 (Fast/Wide) # PCI SCSI controllers adv* at pci? dev ? function ? # AdvanSys 1200[A,B], 9xx[U,UA] SCSI Index: src/sys/arch/hp700/dev/apic.c diff -u src/sys/arch/hp700/dev/apic.c:1.15 src/sys/arch/hp700/dev/apic.c:1.16 --- src/sys/arch/hp700/dev/apic.c:1.15 Mon May 21 20:58:39 2012 +++ src/sys/arch/hp700/dev/apic.c Wed May 23 16:11:37 2012 @@ -1,4 +1,4 @@ -/* $NetBSD: apic.c,v 1.15 2012/05/21 20:58:39 skrll Exp $ */ +/* $NetBSD: apic.c,v 1.16 2012/05/23 16:11:37 skrll Exp $ */ /* $OpenBSD: apic.c,v 1.14 2011/05/01 21:59:39 kettenis Exp $ */ @@ -28,8 +28,6 @@ #include machine/pdc.h #include machine/intr.h -#include hp700/hp700/intr.h - #include dev/pci/pcireg.h #include dev/pci/pcivar.h #include dev/pci/pcidevs.h @@ -127,6 +125,7 @@ int apic_intr_map(const struct pci_attach_args *pa, pci_intr_handle_t *ihp)
CVS commit: src/sys/dev
Module Name:src Committed By: macallan Date: Wed May 23 18:39:31 UTC 2012 Modified Files: src/sys/dev/ic: ct65550.c src/sys/dev/pci: pm2fb.c r128fb.c src/sys/dev/pci/voyager: voyagerfb.c Log Message: first step to fix PR 46461 - don't jump through a NULL pointer when we're not the console but the firmware set up the graphics hardware anyway To generate a diff of this commit: cvs rdiff -u -r1.4 -r1.5 src/sys/dev/ic/ct65550.c cvs rdiff -u -r1.13 -r1.14 src/sys/dev/pci/pm2fb.c cvs rdiff -u -r1.34 -r1.35 src/sys/dev/pci/r128fb.c cvs rdiff -u -r1.20 -r1.21 src/sys/dev/pci/voyager/voyagerfb.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/dev/ic/ct65550.c diff -u src/sys/dev/ic/ct65550.c:1.4 src/sys/dev/ic/ct65550.c:1.5 --- src/sys/dev/ic/ct65550.c:1.4 Tue Mar 13 18:40:31 2012 +++ src/sys/dev/ic/ct65550.c Wed May 23 18:39:30 2012 @@ -1,4 +1,4 @@ -/* $NetBSD: ct65550.c,v 1.4 2012/03/13 18:40:31 elad Exp $ */ +/* $NetBSD: ct65550.c,v 1.5 2012/05/23 18:39:30 macallan Exp $ */ /* * Copyright (c) 2006 Michael Lorenz @@ -30,7 +30,7 @@ */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: ct65550.c,v 1.4 2012/03/13 18:40:31 elad Exp $); +__KERNEL_RCSID(0, $NetBSD: ct65550.c,v 1.5 2012/05/23 18:39:30 macallan Exp $); #include sys/param.h #include sys/systm.h @@ -254,10 +254,11 @@ chipsfb_do_attach(struct chipsfb_softc * chipsfb_defaultscreen.ncols = ri-ri_cols; wsdisplay_cnattach(chipsfb_defaultscreen, ri, 0, 0, defattr); } else { - /* - * since we're not the console we can postpone the rest - * until someone actually allocates a screen for us - */ + if (chipsfb_console_screen.scr_ri.ri_rows == 0) { + /* do some minimal setup to avoid weirdnesses later */ + vcons_init_screen(sc-vd, chipsfb_console_screen, 1, + defattr); + } } rasops_unpack_attr(defattr, fg, bg, ul); Index: src/sys/dev/pci/pm2fb.c diff -u src/sys/dev/pci/pm2fb.c:1.13 src/sys/dev/pci/pm2fb.c:1.14 --- src/sys/dev/pci/pm2fb.c:1.13 Tue Mar 13 18:40:33 2012 +++ src/sys/dev/pci/pm2fb.c Wed May 23 18:39:30 2012 @@ -1,4 +1,4 @@ -/* $NetBSD: pm2fb.c,v 1.13 2012/03/13 18:40:33 elad Exp $ */ +/* $NetBSD: pm2fb.c,v 1.14 2012/05/23 18:39:30 macallan Exp $ */ /* * Copyright (c) 2009 Michael Lorenz @@ -31,7 +31,7 @@ */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: pm2fb.c,v 1.13 2012/03/13 18:40:33 elad Exp $); +__KERNEL_RCSID(0, $NetBSD: pm2fb.c,v 1.14 2012/05/23 18:39:30 macallan Exp $); #include sys/param.h #include sys/systm.h @@ -326,11 +326,11 @@ pm2fb_attach(device_t parent, device_t s defattr); vcons_replay_msgbuf(sc-sc_console_screen); } else { - /* - * since we're not the console we can postpone the rest - * until someone actually allocates a screen for us - */ - (*ri-ri_ops.allocattr)(ri, 0, 0, 0, defattr); + if (sc-sc_console_screen.scr_ri.ri_rows == 0) { + /* do some minimal setup to avoid weirdnesses later */ + vcons_init_screen(sc-vd, sc-sc_console_screen, 1, + defattr); + } } aa.console = is_console; Index: src/sys/dev/pci/r128fb.c diff -u src/sys/dev/pci/r128fb.c:1.34 src/sys/dev/pci/r128fb.c:1.35 --- src/sys/dev/pci/r128fb.c:1.34 Thu Apr 19 08:59:42 2012 +++ src/sys/dev/pci/r128fb.c Wed May 23 18:39:30 2012 @@ -1,4 +1,4 @@ -/* $NetBSD: r128fb.c,v 1.34 2012/04/19 08:59:42 macallan Exp $ */ +/* $NetBSD: r128fb.c,v 1.35 2012/05/23 18:39:30 macallan Exp $ */ /* * Copyright (c) 2007 Michael Lorenz @@ -31,7 +31,7 @@ */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: r128fb.c,v 1.34 2012/04/19 08:59:42 macallan Exp $); +__KERNEL_RCSID(0, $NetBSD: r128fb.c,v 1.35 2012/05/23 18:39:30 macallan Exp $); #include sys/param.h #include sys/systm.h @@ -307,7 +307,11 @@ r128fb_attach(device_t parent, device_t * since we're not the console we can postpone the rest * until someone actually allocates a screen for us */ - (*ri-ri_ops.allocattr)(ri, 0, 0, 0, defattr); + if (sc-sc_console_screen.scr_ri.ri_rows == 0) { + /* do some minimal setup to avoid weirdnesses later */ + vcons_init_screen(sc-vd, sc-sc_console_screen, 1, + defattr); + } glyphcache_init(sc-sc_gc, sc-sc_height + 5, (0x80 / sc-sc_stride) - sc-sc_height - 5, sc-sc_width, Index: src/sys/dev/pci/voyager/voyagerfb.c diff -u src/sys/dev/pci/voyager/voyagerfb.c:1.20 src/sys/dev/pci/voyager/voyagerfb.c:1.21 --- src/sys/dev/pci/voyager/voyagerfb.c:1.20 Thu Apr 19 09:03:01 2012 +++ src/sys/dev/pci/voyager/voyagerfb.c Wed May 23 18:39:30 2012 @@ -1,4 +1,4 @@ -/* $NetBSD: voyagerfb.c,v 1.20 2012/04/19 09:03:01 macallan Exp $ */ +/* $NetBSD: voyagerfb.c,v 1.21 2012/05/23 18:39:30 macallan Exp $ */ /* * Copyright (c) 2009, 2011 Michael Lorenz @@ -31,7 +31,7 @@ */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: voyagerfb.c,v 1.20 2012/04/19 09:03:01 macallan Exp $); +__KERNEL_RCSID(0, $NetBSD: voyagerfb.c,v
CVS commit: src/sys/arch/hp700/dev
Module Name:src Committed By: skrll Date: Wed May 23 21:11:34 UTC 2012 Modified Files: src/sys/arch/hp700/dev: cpu.c Log Message: Enable IPIs for MULTIPROCESSOR kernels To generate a diff of this commit: cvs rdiff -u -r1.27 -r1.28 src/sys/arch/hp700/dev/cpu.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/cpu.c diff -u src/sys/arch/hp700/dev/cpu.c:1.27 src/sys/arch/hp700/dev/cpu.c:1.28 --- src/sys/arch/hp700/dev/cpu.c:1.27 Wed May 23 16:11:37 2012 +++ src/sys/arch/hp700/dev/cpu.c Wed May 23 21:11:34 2012 @@ -1,4 +1,4 @@ -/* $NetBSD: cpu.c,v 1.27 2012/05/23 16:11:37 skrll Exp $ */ +/* $NetBSD: cpu.c,v 1.28 2012/05/23 21:11:34 skrll Exp $ */ /* $OpenBSD: cpu.c,v 1.29 2009/02/08 18:33:28 miod Exp $ */ @@ -29,7 +29,7 @@ */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: cpu.c,v 1.27 2012/05/23 16:11:37 skrll Exp $); +__KERNEL_RCSID(0, $NetBSD: cpu.c,v 1.28 2012/05/23 21:11:34 skrll Exp $); #include opt_multiprocessor.h @@ -172,6 +172,10 @@ cpuattach(device_t parent, device_t self sc-sc_ihclk = hp700_intr_establish(IPL_CLOCK, clock_intr, NULL /*clockframe*/, ci-ci_ir, 31); +#ifdef MULTIPROCESSOR + sc-sc_ihipi = hp700_intr_establish(IPL_HIGH, hppa_ipi_intr, + NULL /*clockframe*/, ci-ci_ir, 30); +#endif /* * Reserve some bits for chips that don't like to be moved @@ -191,6 +195,7 @@ cpuattach(device_t parent, device_t self } m = TAILQ_FIRST(mlist); ci-ci_stack = VM_PAGE_TO_PHYS(m); + ci-ci_softc = sc; if (ci-ci_hpa == hppa_mcpuhpa) { ci-ci_flags |= CPUF_PRIMARY|CPUF_RUNNING; @@ -205,6 +210,7 @@ cpuattach(device_t parent, device_t self } } hppa_ncpu++; + hppa_ipi_init(ci); #endif KASSERT(ci-ci_cpl == -1); }
CVS commit: src/sys/arch/macppc/dev
Module Name:src Committed By: macallan Date: Wed May 23 21:46:17 UTC 2012 Modified Files: src/sys/arch/macppc/dev: valkyriefb.c Log Message: cleanup, remove debug goo To generate a diff of this commit: cvs rdiff -u -r1.1 -r1.2 src/sys/arch/macppc/dev/valkyriefb.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/macppc/dev/valkyriefb.c diff -u src/sys/arch/macppc/dev/valkyriefb.c:1.1 src/sys/arch/macppc/dev/valkyriefb.c:1.2 --- src/sys/arch/macppc/dev/valkyriefb.c:1.1 Tue Jan 24 04:33:11 2012 +++ src/sys/arch/macppc/dev/valkyriefb.c Wed May 23 21:46:17 2012 @@ -1,4 +1,4 @@ -/* $NetBSD: valkyriefb.c,v 1.1 2012/01/24 04:33:11 macallan Exp $ */ +/* $NetBSD: valkyriefb.c,v 1.2 2012/05/23 21:46:17 macallan Exp $ */ /* * Copyright (c) 2012 Michael Lorenz @@ -32,7 +32,7 @@ */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: valkyriefb.c,v 1.1 2012/01/24 04:33:11 macallan Exp $); +__KERNEL_RCSID(0, $NetBSD: valkyriefb.c,v 1.2 2012/05/23 21:46:17 macallan Exp $); #include sys/param.h #include sys/systm.h @@ -66,6 +66,7 @@ struct valkyriefb_softc { device_t sc_dev; int sc_node; uint8_t *sc_base; + uint8_t *sc_fbaddr; int sc_depth; int sc_width, sc_height, sc_linebytes; @@ -194,8 +195,6 @@ valkyriefb_attach(device_t parent, devic { struct valkyriefb_softc *sc = device_private(self); struct confargs *ca = aux; - int i; - volatile uint32_t *fb; sc-sc_dev = self; sc-sc_node = ca-ca_node; @@ -209,11 +208,7 @@ valkyriefb_attach(device_t parent, devic } #endif config_finalize_register(sc-sc_dev, valkyriefb_init); - fb = (volatile uint32_t *)(sc-sc_base + 0x1000); - for (i = 0; i 256; i++) - fb[i] = 0x; - for (i = 256; i 0x1; i++) - fb[i] = 0x80808080; + sc-sc_fbaddr = (uint8_t *)(sc-sc_base + 0x1000); } static int @@ -241,6 +236,8 @@ valkyriefb_init(device_t self) ri = valkyriefb_console_screen.scr_ri; vcons_init_screen(sc-vd, valkyriefb_console_screen, 1, defattr); + memset(sc-sc_base + 0x1000, ri-ri_devcmap[(defattr 16) 0xf], + sc-sc_width * sc-sc_linebytes); valkyriefb_console_screen.scr_flags |= VCONS_SCREEN_IS_STATIC; valkyriefb_defaultscreen.textops = ri-ri_ops; @@ -249,14 +246,8 @@ valkyriefb_init(device_t self) valkyriefb_defaultscreen.ncols = ri-ri_cols; if (console) { wsdisplay_cnattach(valkyriefb_defaultscreen, ri, 0, 0, defattr); - } - - memset(sc-sc_base + 0x1000, ri-ri_devcmap[(defattr 16) 0xf], - sc-sc_width * sc-sc_linebytes); - - if (console) vcons_replay_msgbuf(valkyriefb_console_screen); - + } aa.console = console; aa.scrdata = valkyriefb_screenlist; aa.accessops = valkyriefb_accessops; @@ -416,12 +407,14 @@ valkyriefb_init_screen(void *cookie, str struct valkyriefb_softc *sc = cookie; struct rasops_info *ri = scr-scr_ri; + memset(ri, 0, sizeof(struct rasops_info)); ri-ri_depth = sc-sc_depth; ri-ri_width = sc-sc_width; ri-ri_height = sc-sc_height; ri-ri_stride = sc-sc_linebytes; ri-ri_flg = RI_CENTER | RI_8BIT_IS_RGB | RI_ENABLE_ALPHA; - ri-ri_bits = sc-sc_base + 0x1000; + ri-ri_bits = sc-sc_fbaddr; + /* * We probably shouldn't set this flag together with RI_ENABLE_ALPHA * since the CPU is likely slow enough to make scrolling using
CVS commit: src/sys/arch/macppc/dev
Module Name:src Committed By: macallan Date: Wed May 23 21:47:23 UTC 2012 Modified Files: src/sys/arch/macppc/dev: dbdma.c Log Message: malloc - kmem_alloc To generate a diff of this commit: cvs rdiff -u -r1.10 -r1.11 src/sys/arch/macppc/dev/dbdma.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/macppc/dev/dbdma.c diff -u src/sys/arch/macppc/dev/dbdma.c:1.10 src/sys/arch/macppc/dev/dbdma.c:1.11 --- src/sys/arch/macppc/dev/dbdma.c:1.10 Sun Nov 14 03:57:17 2010 +++ src/sys/arch/macppc/dev/dbdma.c Wed May 23 21:47:23 2012 @@ -1,4 +1,4 @@ -/* $NetBSD: dbdma.c,v 1.10 2010/11/14 03:57:17 uebayasi Exp $ */ +/* $NetBSD: dbdma.c,v 1.11 2012/05/23 21:47:23 macallan Exp $ */ /* * Copyright 1991-1998 by Open Software Foundation, Inc. @@ -23,10 +23,10 @@ */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: dbdma.c,v 1.10 2010/11/14 03:57:17 uebayasi Exp $); +__KERNEL_RCSID(0, $NetBSD: dbdma.c,v 1.11 2012/05/23 21:47:23 macallan Exp $); #include sys/param.h -#include sys/malloc.h +#include sys/kmem.h #include sys/systm.h #include prop/proplib.h @@ -45,7 +45,7 @@ dbdma_start(dbdma_regmap_t *dmap, dbdma_ unsigned long addr = vtophys((vaddr_t)commands); if (addr 0xf) - panic(dbdma_start command structure not 16-byte aligned); + panic(dbdma_start command structure not 16-byte aligned %08x %08x, (uint32_t)commands, (uint32_t)addr); dmap-d_intselect = 0xff; /* Endian magic - clear out interrupts */ DBDMA_ST4_ENDIAN(dmap-d_control, @@ -119,7 +119,7 @@ dbdma_alloc(int size) { u_int buf; - buf = (u_int)malloc(size + 0x0f, M_DEVBUF, M_WAITOK); + buf = (u_int)kmem_alloc(size + 0x0f, KM_SLEEP); buf = (buf + 0x0f) ~0x0f; return (dbdma_command_t *)buf;
CVS commit: src/sys/arch/powerpc/oea
Module Name:src Committed By: macallan Date: Thu May 24 00:40:12 UTC 2012 Modified Files: src/sys/arch/powerpc/oea: ofw_autoconf.c Log Message: copy properties for valkyriefb as well To generate a diff of this commit: cvs rdiff -u -r1.15 -r1.16 src/sys/arch/powerpc/oea/ofw_autoconf.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/powerpc/oea/ofw_autoconf.c diff -u src/sys/arch/powerpc/oea/ofw_autoconf.c:1.15 src/sys/arch/powerpc/oea/ofw_autoconf.c:1.16 --- src/sys/arch/powerpc/oea/ofw_autoconf.c:1.15 Sun Jul 17 20:54:46 2011 +++ src/sys/arch/powerpc/oea/ofw_autoconf.c Thu May 24 00:40:11 2012 @@ -1,4 +1,4 @@ -/* $NetBSD: ofw_autoconf.c,v 1.15 2011/07/17 20:54:46 joerg Exp $ */ +/* $NetBSD: ofw_autoconf.c,v 1.16 2012/05/24 00:40:11 macallan Exp $ */ /* * Copyright (C) 1995, 1996 Wolfgang Solfrank. * Copyright (C) 1995, 1996 TooLs GmbH. @@ -31,7 +31,7 @@ */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: ofw_autoconf.c,v 1.15 2011/07/17 20:54:46 joerg Exp $); +__KERNEL_RCSID(0, $NetBSD: ofw_autoconf.c,v 1.16 2012/05/24 00:40:11 macallan Exp $); #ifdef ofppc #include gtpci.h @@ -219,6 +219,15 @@ device_register(device_t dev, void *aux) parent = dev; return; } + + if (device_is_a(dev, valkyriefb)) { + struct confargs *ca = aux; + prop_dictionary_t dict; + + dict = device_properties(dev); + copy_disp_props(dev, ca-ca_node, dict); + } + #if NGTPCI 0 if (device_is_a(dev, gtpci)) { extern struct gtpci_prot gtpci0_prot, gtpci1_prot;