PERFORCE change 50355 for review
Robert Watson
rwatson at FreeBSD.org
Sun Apr 4 14:40:20 PDT 2004
http://perforce.freebsd.org/chv.cgi?CH=50355
Change 50355 by rwatson at rwatson_paprika on 2004/04/04 14:40:06
Integrate netperf_socket:
- sf_buf_alloc() no locnger does PCATCH, but does accept a priority
which allows the caller to specify PCATCH if they like.
- ptvmmap gone from amd64.
- sparc64 loader, fb, uart code accepts input-device specification
and more options for what it might be (stdin, etc).
- dev/led not soekris-specific.
- dev/fb additional range checks.
- geom bio sanity checks.
- noisy psm output un-noised.
- core dumps with KSE work properly now.
- threads have thread ids (required for core dumps).
- arpresolve() loses final route argument (rt0).
- rt_output() removed from struct route.
- unused ifnet methods GC'd (if_done, if_poll_recv, if_poll_xmit,
if_poll_intren, if_poll_slowinput, if_poll_slowq). Also removed
are if_poll(), if_poll_init(), if_poll_throttle(),
if_poll_unthrottle(), if_poll_recv_slow(), if_poll_xmit_slow().
- validity checks for TCP arguments moved before COMMON_START() so
that error handling is more correct (especially WRT dropping
locks).
- '2' argument to soshutdown() spelled as SHUT_RDWR.
- NFS client modestamp zero'd following SETATTR.
- NFS server pointer==boolean and pointer==0 converted to check
NULL explicitly.
- Continued indecision about whether twa is i386-only or not.
- AGP can be disabled using a hint.
Affected files ...
.. //depot/projects/netperf_socket/sys/alpha/alpha/vm_machdep.c#4 integrate
.. //depot/projects/netperf_socket/sys/alpha/include/pmap.h#3 integrate
.. //depot/projects/netperf_socket/sys/amd64/amd64/pmap.c#5 integrate
.. //depot/projects/netperf_socket/sys/amd64/amd64/support.S#3 integrate
.. //depot/projects/netperf_socket/sys/amd64/amd64/vm_machdep.c#6 integrate
.. //depot/projects/netperf_socket/sys/amd64/include/pmap.h#3 integrate
.. //depot/projects/netperf_socket/sys/boot/common/loader.8#3 integrate
.. //depot/projects/netperf_socket/sys/boot/sparc64/loader/metadata.c#2 integrate
.. //depot/projects/netperf_socket/sys/conf/files#13 integrate
.. //depot/projects/netperf_socket/sys/dev/bfe/if_bfereg.h#2 integrate
.. //depot/projects/netperf_socket/sys/dev/fb/creator.c#2 integrate
.. //depot/projects/netperf_socket/sys/dev/fb/vga.c#2 integrate
.. //depot/projects/netperf_socket/sys/dev/md/md.c#11 integrate
.. //depot/projects/netperf_socket/sys/dev/uart/uart_bus_ebus.c#2 integrate
.. //depot/projects/netperf_socket/sys/dev/uart/uart_cpu_sparc64.c#4 integrate
.. //depot/projects/netperf_socket/sys/geom/geom_io.c#3 integrate
.. //depot/projects/netperf_socket/sys/i386/i386/db_interface.c#4 integrate
.. //depot/projects/netperf_socket/sys/i386/i386/elan-mmcr.c#6 integrate
.. //depot/projects/netperf_socket/sys/i386/i386/uio_machdep.c#2 integrate
.. //depot/projects/netperf_socket/sys/i386/i386/vm_machdep.c#9 integrate
.. //depot/projects/netperf_socket/sys/i386/include/cpufunc.h#4 integrate
.. //depot/projects/netperf_socket/sys/ia64/ia64/vm_machdep.c#4 integrate
.. //depot/projects/netperf_socket/sys/isa/psm.c#4 integrate
.. //depot/projects/netperf_socket/sys/kern/imgact_elf.c#4 integrate
.. //depot/projects/netperf_socket/sys/kern/kern_fork.c#9 integrate
.. //depot/projects/netperf_socket/sys/kern/kern_thr.c#5 integrate
.. //depot/projects/netperf_socket/sys/kern/kern_thread.c#6 integrate
.. //depot/projects/netperf_socket/sys/kern/sched_ule.c#5 integrate
.. //depot/projects/netperf_socket/sys/kern/uipc_cow.c#3 integrate
.. //depot/projects/netperf_socket/sys/kern/uipc_syscalls.c#7 integrate
.. //depot/projects/netperf_socket/sys/net/if_arcsubr.c#5 integrate
.. //depot/projects/netperf_socket/sys/net/if_ethersubr.c#9 integrate
.. //depot/projects/netperf_socket/sys/net/if_fddisubr.c#4 integrate
.. //depot/projects/netperf_socket/sys/net/if_iso88025subr.c#4 integrate
.. //depot/projects/netperf_socket/sys/net/if_var.h#4 integrate
.. //depot/projects/netperf_socket/sys/net/route.h#4 integrate
.. //depot/projects/netperf_socket/sys/netinet/if_ether.c#5 integrate
.. //depot/projects/netperf_socket/sys/netinet/if_ether.h#2 integrate
.. //depot/projects/netperf_socket/sys/netinet/tcp_usrreq.c#6 integrate
.. //depot/projects/netperf_socket/sys/netipsec/xform_tcp.c#1 branch
.. //depot/projects/netperf_socket/sys/nfsclient/nfs_socket.c#5 integrate
.. //depot/projects/netperf_socket/sys/nfsclient/nfs_vnops.c#3 integrate
.. //depot/projects/netperf_socket/sys/nfsserver/nfs_srvsock.c#4 integrate
.. //depot/projects/netperf_socket/sys/nfsserver/nfs_syscalls.c#3 integrate
.. //depot/projects/netperf_socket/sys/pc98/conf/NOTES#7 integrate
.. //depot/projects/netperf_socket/sys/pci/agp_ali.c#2 integrate
.. //depot/projects/netperf_socket/sys/pci/agp_amd.c#3 integrate
.. //depot/projects/netperf_socket/sys/pci/agp_i810.c#3 integrate
.. //depot/projects/netperf_socket/sys/pci/agp_intel.c#3 integrate
.. //depot/projects/netperf_socket/sys/pci/agp_nvidia.c#2 integrate
.. //depot/projects/netperf_socket/sys/pci/agp_sis.c#2 integrate
.. //depot/projects/netperf_socket/sys/pci/agp_via.c#2 integrate
.. //depot/projects/netperf_socket/sys/pci/if_ste.c#10 integrate
.. //depot/projects/netperf_socket/sys/powerpc/powerpc/vm_machdep.c#6 integrate
.. //depot/projects/netperf_socket/sys/sparc64/creator/creator_upa.c#3 integrate
.. //depot/projects/netperf_socket/sys/sparc64/sparc64/uio_machdep.c#2 integrate
.. //depot/projects/netperf_socket/sys/sparc64/sparc64/vm_machdep.c#5 integrate
.. //depot/projects/netperf_socket/sys/sys/proc.h#5 integrate
.. //depot/projects/netperf_socket/sys/sys/sf_buf.h#3 integrate
.. //depot/projects/netperf_socket/sys/ufs/ffs/fs.h#2 integrate
Differences ...
==== //depot/projects/netperf_socket/sys/alpha/alpha/vm_machdep.c#4 (text+ko) ====
@@ -67,7 +67,7 @@
*/
#include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/alpha/alpha/vm_machdep.c,v 1.101 2004/03/29 02:01:42 kensmith Exp $");
+__FBSDID("$FreeBSD: src/sys/alpha/alpha/vm_machdep.c,v 1.102 2004/04/03 09:16:24 alc Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@@ -405,7 +405,7 @@
* Get an sf_buf from the freelist. Will block if none are available.
*/
struct sf_buf *
-sf_buf_alloc(struct vm_page *m)
+sf_buf_alloc(struct vm_page *m, int pri)
{
struct sf_buf *sf;
int error;
@@ -414,7 +414,7 @@
while ((sf = SLIST_FIRST(&sf_freelist.sf_head)) == NULL) {
sf_buf_alloc_want++;
mbstat.sf_allocwait++;
- error = msleep(&sf_freelist, &sf_freelist.sf_lock, PVM|PCATCH,
+ error = msleep(&sf_freelist, &sf_freelist.sf_lock, PVM | pri,
"sfbufa", 0);
sf_buf_alloc_want--;
==== //depot/projects/netperf_socket/sys/alpha/include/pmap.h#3 (text+ko) ====
@@ -43,7 +43,7 @@
* from: hp300: @(#)pmap.h 7.2 (Berkeley) 12/16/90
* from: @(#)pmap.h 7.4 (Berkeley) 5/12/91
* from: i386 pmap.h,v 1.54 1997/11/20 19:30:35 bde Exp
- * $FreeBSD: src/sys/alpha/include/pmap.h,v 1.25 2004/03/07 07:13:15 alc Exp $
+ * $FreeBSD: src/sys/alpha/include/pmap.h,v 1.26 2004/04/03 21:38:20 alc Exp $
*/
#ifndef _MACHINE_PMAP_H_
@@ -208,8 +208,6 @@
#ifdef _KERNEL
-extern caddr_t CADDR1;
-extern pt_entry_t *CMAP1;
extern vm_offset_t avail_end;
extern vm_offset_t avail_start;
extern vm_offset_t phys_avail[];
==== //depot/projects/netperf_socket/sys/amd64/amd64/pmap.c#5 (text+ko) ====
@@ -75,7 +75,7 @@
*/
#include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/amd64/amd64/pmap.c,v 1.454 2004/03/31 02:03:48 alc Exp $");
+__FBSDID("$FreeBSD: src/sys/amd64/amd64/pmap.c,v 1.455 2004/04/03 20:53:49 alc Exp $");
/*
* Manages physical address maps.
@@ -200,8 +200,7 @@
* All those kernel PT submaps that BSD is so fond of
*/
pt_entry_t *CMAP1 = 0;
-static pt_entry_t *ptmmap;
-caddr_t CADDR1 = 0, ptvmmap = 0;
+caddr_t CADDR1 = 0;
static pt_entry_t *msgbufmap;
struct msgbuf *msgbufp = 0;
@@ -507,12 +506,6 @@
SYSMAP(caddr_t, pt_crashdumpmap, crashdumpmap, MAXDUMPPGS);
/*
- * ptvmmap is used for reading arbitrary physical pages via /dev/mem.
- * XXX ptmmap is not used.
- */
- SYSMAP(caddr_t, ptmmap, ptvmmap, 1)
-
- /*
* msgbufp is used to map the system message buffer.
* XXX msgbufmap is not used.
*/
==== //depot/projects/netperf_socket/sys/amd64/amd64/support.S#3 (text+ko) ====
@@ -31,7 +31,7 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
- * $FreeBSD: src/sys/amd64/amd64/support.S,v 1.106 2004/03/31 02:03:49 alc Exp $
+ * $FreeBSD: src/sys/amd64/amd64/support.S,v 1.107 2004/04/03 05:33:10 alc Exp $
*/
#include "opt_ddb.h"
@@ -76,15 +76,15 @@
/* Address: %rdi */
ENTRY(pagezero)
- lea 4096(%rdi),%rsi
+ movq $-PAGE_SIZE,%rdx
+ subq %rdx,%rdi
xorq %rax,%rax
1:
- movnti %rax,(%rdi)
- movnti %rax,8(%rdi)
- movnti %rax,16(%rdi)
- movnti %rax,24(%rdi)
- addq $32,%rdi
- cmpq %rsi,%rdi
+ movnti %rax,(%rdi,%rdx)
+ movnti %rax,8(%rdi,%rdx)
+ movnti %rax,16(%rdi,%rdx)
+ movnti %rax,24(%rdi,%rdx)
+ addq $32,%rdx
jne 1b
sfence
retq
==== //depot/projects/netperf_socket/sys/amd64/amd64/vm_machdep.c#6 (text+ko) ====
@@ -41,7 +41,7 @@
*/
#include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/amd64/amd64/vm_machdep.c,v 1.231 2004/03/29 19:38:05 peter Exp $");
+__FBSDID("$FreeBSD: src/sys/amd64/amd64/vm_machdep.c,v 1.232 2004/04/03 09:16:25 alc Exp $");
#include "opt_isa.h"
#include "opt_cpu.h"
@@ -460,7 +460,7 @@
* Get an sf_buf from the freelist. Will block if none are available.
*/
struct sf_buf *
-sf_buf_alloc(struct vm_page *m)
+sf_buf_alloc(struct vm_page *m, int pri)
{
struct sf_buf *sf;
int error;
@@ -469,7 +469,7 @@
while ((sf = SLIST_FIRST(&sf_freelist.sf_head)) == NULL) {
sf_buf_alloc_want++;
mbstat.sf_allocwait++;
- error = msleep(&sf_freelist, &sf_freelist.sf_lock, PVM|PCATCH,
+ error = msleep(&sf_freelist, &sf_freelist.sf_lock, PVM | pri,
"sfbufa", 0);
sf_buf_alloc_want--;
==== //depot/projects/netperf_socket/sys/amd64/include/pmap.h#3 (text+ko) ====
@@ -43,7 +43,7 @@
*
* from: hp300: @(#)pmap.h 7.2 (Berkeley) 12/16/90
* from: @(#)pmap.h 7.4 (Berkeley) 5/12/91
- * $FreeBSD: src/sys/amd64/include/pmap.h,v 1.110 2004/03/07 07:13:15 alc Exp $
+ * $FreeBSD: src/sys/amd64/include/pmap.h,v 1.111 2004/04/03 20:53:50 alc Exp $
*/
#ifndef _MACHINE_PMAP_H_
@@ -263,7 +263,6 @@
extern vm_paddr_t avail_end;
extern vm_paddr_t avail_start;
extern vm_paddr_t phys_avail[];
-extern char *ptvmmap; /* poor name! */
extern vm_offset_t virtual_avail;
extern vm_offset_t virtual_end;
==== //depot/projects/netperf_socket/sys/boot/common/loader.8#3 (text+ko) ====
@@ -22,7 +22,7 @@
.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
.\" SUCH DAMAGE.
.\"
-.\" $FreeBSD: src/sys/boot/common/loader.8,v 1.58 2004/01/27 15:59:38 des Exp $
+.\" $FreeBSD: src/sys/boot/common/loader.8,v 1.59 2004/04/03 12:14:30 le Exp $
.\"
.\" Note: The date here should be updated whenever a non-trivial
.\" change is made to the manual page.
@@ -493,12 +493,12 @@
.Va TCBHASHSIZE
or the preset default of 512.
Must be a power of 2.
-.El
.It Va vm.kmem_size
Sets the size of kernel memory (bytes).
This overrides the value determined when the kernel was compiled.
Modifies
.Va VM_KMEM_SIZE .
+.El
.Ss BUILTIN PARSER
When a builtin command is executed, the rest of the line is taken
by it as arguments, and it is processed by a special parser which
==== //depot/projects/netperf_socket/sys/boot/sparc64/loader/metadata.c#2 (text+ko) ====
@@ -27,7 +27,7 @@
*/
#include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/boot/sparc64/loader/metadata.c,v 1.11 2004/01/04 23:20:15 obrien Exp $");
+__FBSDID("$FreeBSD: src/sys/boot/sparc64/loader/metadata.c,v 1.12 2004/04/04 05:24:13 marcel Exp $");
#include <stand.h>
#include <sys/param.h>
@@ -69,7 +69,7 @@
int
md_getboothowto(char *kargs)
{
- char buf[32];
+ char buf[32], buf2[32];
phandle_t options;
char *cp;
int howto;
@@ -131,9 +131,21 @@
if (getenv(howto_names[i].ev) != NULL)
howto |= howto_names[i].mask;
options = OF_finddevice("/options");
- OF_getprop(options, "output-device", buf, sizeof(buf));
- if (strcmp(buf, "ttya") == 0 || strcmp(buf, "ttyb") == 0)
+ OF_getprop(options, "input-device", buf, sizeof(buf));
+ OF_getprop(options, "output-device", buf2, sizeof(buf2));
+ if (strncmp(buf, "tty", sizeof("tty") - 1) == 0 && strncmp(buf2, "tty",
+ sizeof("tty") - 1) == 0)
+ howto |= RB_SERIAL;
+ else if (strcmp(buf, "keyboard") == 0 && strcmp(buf2, "screen") == 0) {
+ phandle_t chosen;
+ ihandle_t stdin, stdout;
+
+ chosen = OF_finddevice("/chosen");
+ OF_getprop(chosen, "stdin", &stdin, sizeof(stdin));
+ OF_getprop(chosen, "stdout", &stdout, sizeof(stdout));
+ if (OF_instance_to_package(stdin) == OF_instance_to_package(stdout))
howto |= RB_SERIAL;
+ }
return(howto);
}
==== //depot/projects/netperf_socket/sys/conf/files#13 (text+ko) ====
@@ -1,4 +1,4 @@
-# $FreeBSD: src/sys/conf/files,v 1.880 2004/04/01 17:55:50 des Exp $
+# $FreeBSD: src/sys/conf/files,v 1.881 2004/04/03 18:42:05 phk Exp $
#
# The long compile-with and dependency lines are required because of
# limitations in config: backslash-newline doesn't work in strings, and
@@ -499,7 +499,7 @@
dev/joy/joy.c optional joy
dev/joy/joy_isa.c optional joy isa
dev/joy/joy_pccard.c optional joy pccard
-dev/led/led.c optional cpu_soekris
+dev/led/led.c standard
dev/lge/if_lge.c optional lge
dev/lnc/if_lnc.c optional lnc
dev/lnc/if_lnc_pci.c optional lnc pci
==== //depot/projects/netperf_socket/sys/dev/bfe/if_bfereg.h#2 (text+ko) ====
@@ -1,5 +1,27 @@
/* Copyright (c) 2003 Stuart Walsh */
-/* $FreeBSD: src/sys/dev/bfe/if_bfereg.h,v 1.1 2003/09/09 18:17:22 wpaul Exp $ */
+/*
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR 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 AUTHOR OR CONTRIBUTORS BE LIABLE
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ */
+/* $FreeBSD: src/sys/dev/bfe/if_bfereg.h,v 1.2 2004/04/04 06:13:56 wes Exp $ */
#ifndef _BFE_H
#define _BFE_H
==== //depot/projects/netperf_socket/sys/dev/fb/creator.c#2 (text+ko) ====
@@ -23,7 +23,7 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
- * $FreeBSD: src/sys/dev/fb/creator.c,v 1.3 2004/01/02 10:46:38 obrien Exp $
+ * $FreeBSD: src/sys/dev/fb/creator.c,v 1.4 2004/04/04 12:52:22 tmm Exp $
*/
#include <sys/param.h>
@@ -165,7 +165,7 @@
struct upa_regs reg[FFB_NREG];
struct creator_softc *sc;
phandle_t chosen;
- phandle_t stdout;
+ ihandle_t stdout;
phandle_t child;
char buf[32];
int i;
@@ -183,7 +183,7 @@
chosen = OF_finddevice("/chosen");
OF_getprop(chosen, "stdout", &stdout, sizeof(stdout));
- if (child == stdout)
+ if (child == OF_instance_to_package(stdout))
sc->sc_console = 1;
OF_getprop(child, "reg", reg, sizeof(reg));
==== //depot/projects/netperf_socket/sys/dev/fb/vga.c#2 (text+ko) ====
@@ -29,7 +29,7 @@
*/
#include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/dev/fb/vga.c,v 1.28 2003/08/24 17:46:06 obrien Exp $");
+__FBSDID("$FreeBSD: src/sys/dev/fb/vga.c,v 1.29 2004/04/03 15:28:25 nectar Exp $");
#include "opt_vga.h"
#include "opt_fb.h"
@@ -2854,7 +2854,8 @@
u_char *g;
u_char *b;
- if ((base < 0) || (base >= 256) || (base + count > 256))
+ if (count < 0 || base < 0 || count > 256 || base > 256 ||
+ base + count > 256)
return EINVAL;
r = malloc(count*3, M_DEVBUF, M_WAITOK);
@@ -2885,7 +2886,8 @@
u_char *b;
int err;
- if ((base < 0) || (base >= 256) || (base + count > 256))
+ if (count < 0 || base < 0 || count > 256 || base > 256 ||
+ base + count > 256)
return EINVAL;
r = malloc(count*3, M_DEVBUF, M_WAITOK);
==== //depot/projects/netperf_socket/sys/dev/md/md.c#11 (text+ko) ====
@@ -6,7 +6,7 @@
* this stuff is worth it, you can buy me a beer in return. Poul-Henning Kamp
* ----------------------------------------------------------------------------
*
- * $FreeBSD: src/sys/dev/md/md.c,v 1.119 2004/03/31 21:48:02 luigi Exp $
+ * $FreeBSD: src/sys/dev/md/md.c,v 1.120 2004/04/03 09:16:25 alc Exp $
*
*/
@@ -546,7 +546,7 @@
m = vm_page_grab(sc->object, i,
VM_ALLOC_NORMAL|VM_ALLOC_RETRY);
VM_OBJECT_UNLOCK(sc->object);
- sf = sf_buf_alloc(m);
+ sf = sf_buf_alloc(m, 0);
VM_OBJECT_LOCK(sc->object);
if (bp->bio_cmd == BIO_READ) {
if (m->valid != VM_PAGE_BITS_ALL)
==== //depot/projects/netperf_socket/sys/dev/uart/uart_bus_ebus.c#2 (text+ko) ====
@@ -25,7 +25,7 @@
*/
#include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/dev/uart/uart_bus_ebus.c,v 1.2 2003/09/26 05:14:56 marcel Exp $");
+__FBSDID("$FreeBSD: src/sys/dev/uart/uart_bus_ebus.c,v 1.3 2004/04/03 23:02:02 marcel Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@@ -61,7 +61,7 @@
static int
uart_ebus_probe(device_t dev)
{
- const char *nm;
+ const char *nm, *cmpt;
struct uart_softc *sc;
int error;
@@ -69,7 +69,9 @@
sc->sc_class = NULL;
nm = ebus_get_name(dev);
- if (!strcmp(nm, "su")) {
+ cmpt = ebus_get_compat(dev);
+ if (!strcmp(nm, "su") || !strcmp(nm, "su_pnp") || (cmpt != NULL &&
+ (!strcmp(cmpt, "su") || !strcmp(cmpt, "su16550")))) {
sc->sc_class = &uart_ns8250_class;
return (uart_bus_probe(dev, 0, 0, 0, 0));
}
==== //depot/projects/netperf_socket/sys/dev/uart/uart_cpu_sparc64.c#4 (text+ko) ====
@@ -25,7 +25,7 @@
*/
#include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/dev/uart/uart_cpu_sparc64.c,v 1.9 2004/04/02 07:33:35 marcel Exp $");
+__FBSDID("$FreeBSD: src/sys/dev/uart/uart_cpu_sparc64.c,v 1.10 2004/04/04 05:06:26 marcel Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@@ -71,13 +71,14 @@
/*
* Get the address of the UART that is selected as the console, if the
* console is an UART of course. Note that we enforce that both stdin and
- * stdout are selected. For weird configurations, use ofw_console(4).
+ * stdout are selected.
* Note that the currently active console (i.e. /chosen/stdout and
* /chosen/stdin) may not be the same as the device selected in the
* environment (ie /options/output-device and /options/input-device) because
- * the user may have changed the environment. In that case I would assume
- * that the user expects that FreeBSD uses the new console setting. There's
- * no choice, really.
+ * keyboard and screen were selected but the keyboard was unplugged or the
+ * user has changed the environment. In the latter case I would assume that
+ * the user expects that FreeBSD uses the new console setting.
+ * For weirder configurations, use ofw_console(4).
*/
static phandle_t
uart_cpu_getdev_console(phandle_t options, char *dev, size_t devsz)
@@ -89,14 +90,29 @@
return (-1);
if ((input = OF_finddevice(dev)) == -1)
return (-1);
+ if (OF_getprop(options, "output-device", buf, sizeof(buf)) == -1)
+ return (-1);
+ if (!strcmp(dev, "keyboard") && !strcmp(buf, "screen")) {
+ phandle_t chosen;
+ ihandle_t stdin, stdout;
+
+ if ((chosen = OF_finddevice("/chosen")) == -1)
+ return (-1);
+ if (OF_getprop(chosen, "stdin", &stdin, sizeof(stdin)) == -1)
+ return (-1);
+ if ((input = OF_instance_to_package(stdin)) == -1)
+ return (-1);
+ if (OF_getprop(chosen, "stdout", &stdout, sizeof(stdout)) == -1)
+ return (-1);
+ if (OF_instance_to_package(stdout) != input)
+ return (-1);
+ snprintf(dev, devsz, "ttya");
+ } else if (OF_finddevice(buf) != input)
+ return (-1);
if (OF_getprop(input, "device_type", buf, sizeof(buf)) == -1)
return (-1);
if (strcmp(buf, "serial") != 0)
return (-1);
- if (OF_getprop(options, "output-device", buf, sizeof(buf)) == -1)
- return (-1);
- if (OF_finddevice(buf) != input)
- return (-1);
return (input);
}
==== //depot/projects/netperf_socket/sys/geom/geom_io.c#3 (text+ko) ====
@@ -34,7 +34,7 @@
*/
#include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/geom/geom_io.c,v 1.53 2004/02/11 18:21:32 pjd Exp $");
+__FBSDID("$FreeBSD: src/sys/geom/geom_io.c,v 1.54 2004/04/04 20:37:28 pjd Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@@ -279,6 +279,9 @@
}
KASSERT(cp != NULL, ("NULL bio_from in g_io_deliver"));
KASSERT(cp->geom != NULL, ("NULL bio_from->geom in g_io_deliver"));
+ KASSERT(bp->bio_completed >= 0, ("bio_completed can't be less than 0"));
+ KASSERT(bp->bio_completed <= bp->bio_length,
+ ("bio_completed can't be greater than bio_length"));
g_trace(G_T_BIO,
"g_io_deliver(%p) from %p(%s) to %p(%s) cmd %d error %d off %jd len %jd",
==== //depot/projects/netperf_socket/sys/i386/i386/db_interface.c#4 (text+ko) ====
@@ -25,7 +25,7 @@
*/
#include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/i386/i386/db_interface.c,v 1.80 2004/03/12 21:45:29 trhodes Exp $");
+__FBSDID("$FreeBSD: src/sys/i386/i386/db_interface.c,v 1.81 2004/04/03 22:23:36 marcel Exp $");
/*
* Interface to new debugger.
@@ -60,19 +60,6 @@
static jmp_buf db_global_jmpbuf;
-static __inline u_short
-rss(void)
-{
- u_short ss;
-#if defined(__GNUC__) || defined(__INTEL_COMPILER)
- __asm __volatile("mov %%ss,%0" : "=r" (ss));
-#else
-#error Function rss() needs to get ported to this compiler.
- ss = 0; /* XXXX Fix for other compilers. */
-#endif
- return ss;
-}
-
/*
* kdb_trap - field a TRACE or BPT trap
*/
==== //depot/projects/netperf_socket/sys/i386/i386/elan-mmcr.c#6 (text+ko) ====
@@ -39,7 +39,7 @@
*/
#include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/i386/i386/elan-mmcr.c,v 1.26 2004/03/15 21:47:34 phk Exp $");
+__FBSDID("$FreeBSD: src/sys/i386/i386/elan-mmcr.c,v 1.27 2004/04/03 18:42:52 phk Exp $");
#include "opt_cpu.h"
#include <sys/param.h>
@@ -77,7 +77,6 @@
static u_int echo_a, echo_d;
#endif /* CPU_ELAN_PPS */
-#ifdef CPU_SOEKRIS
static u_int led_cookie[32];
static dev_t led_dev[32];
@@ -93,7 +92,6 @@
v ^= 0xc;
mmcrptr[v / 2] = u;
}
-#endif
static int
sysctl_machdep_elan_gpio_config(SYSCTL_HANDLER_ARGS)
@@ -117,7 +115,9 @@
/* Disallow any disabled pins and count pps and echo */
np = ne = 0;
for (i = 0; i < 32; i++) {
- if (gpio_config[i] == '-' && (buf[i] != '-' && buf[i] != '.'))
+ if (gpio_config[i] == '-' && buf[i] == '.')
+ buf[i] = gpio_config[i];
+ if (gpio_config[i] == '-' && buf[i] != '-')
return (EPERM);
if (buf[i] == 'P') {
np++;
@@ -149,12 +149,15 @@
else
v = 0;
#ifdef CPU_SOEKRIS
+ if (i == 9)
+ ;
+ else
+#endif
if (buf[i] != 'l' && buf[i] != 'L' && led_dev[i] != NULL) {
led_destroy(led_dev[i]);
led_dev[i] = NULL;
mmcrptr[(0xc2a + v) / 2] &= ~u;
}
-#endif
switch (buf[i]) {
#ifdef CPU_ELAN_PPS
case 'P':
@@ -177,7 +180,6 @@
gpio_config[i] = buf[i];
break;
#endif /* CPU_ELAN_PPS */
-#ifdef CPU_SOEKRIS
case 'l':
case 'L':
if (buf[i] == 'L')
@@ -192,7 +194,6 @@
mmcrptr[(0xc2a + v) / 2] |= u;
gpio_config[i] = buf[i];
break;
-#endif
case '.':
gpio_config[i] = buf[i];
break;
==== //depot/projects/netperf_socket/sys/i386/i386/uio_machdep.c#2 (text+ko) ====
@@ -40,7 +40,7 @@
*/
#include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/i386/i386/uio_machdep.c,v 1.1 2004/03/21 20:28:36 alc Exp $");
+__FBSDID("$FreeBSD: src/sys/i386/i386/uio_machdep.c,v 1.2 2004/04/03 09:16:25 alc Exp $");
#include <sys/param.h>
#include <sys/kernel.h>
@@ -92,7 +92,7 @@
cnt = n;
page_offset = offset & PAGE_MASK;
cnt = min(cnt, PAGE_SIZE - page_offset);
- sf = sf_buf_alloc(ma[offset >> PAGE_SHIFT]);
+ sf = sf_buf_alloc(ma[offset >> PAGE_SHIFT], 0);
cp = (char *)sf_buf_kva(sf) + page_offset;
switch (uio->uio_segflg) {
case UIO_USERSPACE:
==== //depot/projects/netperf_socket/sys/i386/i386/vm_machdep.c#9 (text+ko) ====
@@ -41,7 +41,7 @@
*/
#include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/i386/i386/vm_machdep.c,v 1.234 2004/03/29 19:38:05 peter Exp $");
+__FBSDID("$FreeBSD: src/sys/i386/i386/vm_machdep.c,v 1.235 2004/04/03 09:16:25 alc Exp $");
#include "opt_isa.h"
#include "opt_npx.h"
@@ -606,7 +606,7 @@
* Get an sf_buf from the freelist. Will block if none are available.
*/
struct sf_buf *
-sf_buf_alloc(struct vm_page *m)
+sf_buf_alloc(struct vm_page *m, int pri)
{
struct sf_head *hash_list;
struct sf_buf *sf;
@@ -628,7 +628,7 @@
while ((sf = TAILQ_FIRST(&sf_buf_freelist)) == NULL) {
sf_buf_alloc_want++;
mbstat.sf_allocwait++;
- error = msleep(&sf_buf_freelist, &sf_buf_lock, PVM|PCATCH,
+ error = msleep(&sf_buf_freelist, &sf_buf_lock, PVM | pri,
"sfbufa", 0);
sf_buf_alloc_want--;
==== //depot/projects/netperf_socket/sys/i386/include/cpufunc.h#4 (text+ko) ====
@@ -30,7 +30,7 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
- * $FreeBSD: src/sys/i386/include/cpufunc.h,v 1.140 2004/03/12 21:45:30 trhodes Exp $
+ * $FreeBSD: src/sys/i386/include/cpufunc.h,v 1.141 2004/04/03 22:23:36 marcel Exp $
*/
/*
@@ -456,6 +456,14 @@
return (sel);
}
+static __inline u_int
+rss(void)
+{
+ u_int sel;
+ __asm __volatile("movl %%ss,%0" : "=rm" (sel));
+ return (sel);
+}
+
static __inline void
load_fs(u_int sel)
{
==== //depot/projects/netperf_socket/sys/ia64/ia64/vm_machdep.c#4 (text+ko) ====
@@ -38,7 +38,7 @@
*
* from: @(#)vm_machdep.c 7.3 (Berkeley) 5/13/91
* Utah $Hdr: vm_machdep.c 1.16.1.1 89/06/23$
- * $FreeBSD: src/sys/ia64/ia64/vm_machdep.c,v 1.81 2004/03/27 17:44:25 marcel Exp $
+ * $FreeBSD: src/sys/ia64/ia64/vm_machdep.c,v 1.82 2004/04/03 09:16:26 alc Exp $
*/
/*
* Copyright (c) 1994, 1995, 1996 Carnegie-Mellon University.
@@ -344,7 +344,7 @@
* Get an sf_buf from the freelist. Will block if none are available.
*/
struct sf_buf *
-sf_buf_alloc(struct vm_page *m)
+sf_buf_alloc(struct vm_page *m, int pri)
{
struct sf_buf *sf;
int error;
@@ -353,7 +353,7 @@
while ((sf = SLIST_FIRST(&sf_freelist.sf_head)) == NULL) {
sf_buf_alloc_want++;
mbstat.sf_allocwait++;
- error = msleep(&sf_freelist, &sf_freelist.sf_lock, PVM|PCATCH,
+ error = msleep(&sf_freelist, &sf_freelist.sf_lock, PVM | pri,
"sfbufa", 0);
sf_buf_alloc_want--;
==== //depot/projects/netperf_socket/sys/isa/psm.c#4 (text+ko) ====
@@ -59,7 +59,7 @@
*/
#include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/isa/psm.c,v 1.66 2004/03/17 17:50:51 njl Exp $");
+__FBSDID("$FreeBSD: src/sys/isa/psm.c,v 1.67 2004/04/04 16:36:21 markm Exp $");
#include "opt_psm.h"
@@ -2033,7 +2033,9 @@
getmicrouptime(&now);
if ((pb->inputbytes > 0) && timevalcmp(&now, &sc->inputtimeout, >)) {
+#if DEBUG
log(LOG_DEBUG, "psmintr: delay too long; resetting byte count\n");
+#endif
pb->inputbytes = 0;
sc->syncerrors = 0;
}
@@ -2045,7 +2047,7 @@
if (pb->inputbytes < sc->mode.packetsize)
continue;
-#if 0
+#if DEBUG
log(LOG_DEBUG, "psmintr: %02x %02x %02x %02x %02x %02x\n",
pb->ipacket[0], pb->ipacket[1], pb->ipacket[2],
pb->ipacket[3], pb->ipacket[4], pb->ipacket[5]);
@@ -2054,30 +2056,40 @@
c = pb->ipacket[0];
if ((c & sc->mode.syncmask[0]) != sc->mode.syncmask[1]) {
+#if DEBUG
log(LOG_DEBUG, "psmintr: out of sync (%04x != %04x) %d"
" cmds since last error.\n",
c & sc->mode.syncmask[0], sc->mode.syncmask[1],
sc->cmdcount - sc->lasterr);
+#endif
haderror = 1;
sc->lasterr = sc->cmdcount;
dropqueue(sc);
++sc->syncerrors;
sc->lastinputerr = now;
if (sc->syncerrors < sc->mode.packetsize) {
+#if DEBUG
log(LOG_DEBUG, "psmintr: discard a byte (%d).\n", sc->syncerrors);
+#endif
--pb->inputbytes;
bcopy(&pb->ipacket[1], &pb->ipacket[0], pb->inputbytes);
} else if (sc->syncerrors == sc->mode.packetsize) {
+#if DEBUG
log(LOG_DEBUG, "psmintr: re-enable the mouse.\n");
+#endif
pb->inputbytes = 0;
disable_aux_dev(sc->kbdc);
enable_aux_dev(sc->kbdc);
} else if (sc->syncerrors < PSM_SYNCERR_THRESHOLD1) {
+#if DEBUG
log(LOG_DEBUG, "psmintr: discard a byte (%d).\n", sc->syncerrors);
+#endif
--pb->inputbytes;
bcopy(&pb->ipacket[1], &pb->ipacket[0], pb->inputbytes);
} else if (sc->syncerrors >= PSM_SYNCERR_THRESHOLD1) {
+#if DEBUG
log(LOG_DEBUG, "psmintr: reset the mouse.\n");
+#endif
reinitialize(sc, TRUE);
}
continue;
==== //depot/projects/netperf_socket/sys/kern/imgact_elf.c#4 (text+ko) ====
@@ -29,7 +29,7 @@
*/
#include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/kern/imgact_elf.c,v 1.145 2004/03/18 16:33:05 nectar Exp $");
+__FBSDID("$FreeBSD: src/sys/kern/imgact_elf.c,v 1.146 2004/04/03 20:25:41 marcel Exp $");
#include <sys/param.h>
#include <sys/exec.h>
@@ -922,8 +922,7 @@
static void each_writable_segment(struct proc *, segment_callback, void *);
static int __elfN(corehdr)(struct thread *, struct vnode *, struct ucred *,
int, void *, size_t);
-static void __elfN(puthdr)(struct proc *, void *, size_t *,
- const prstatus_t *, const prfpregset_t *, const prpsinfo_t *, int);
+static void __elfN(puthdr)(struct proc *, void *, size_t *, int);
static void __elfN(putnote)(void *, size_t *, const char *, int,
const void *, size_t);
@@ -953,9 +952,7 @@
* size is calculated.
*/
hdrsize = 0;
- __elfN(puthdr)((struct proc *)NULL, (void *)NULL, &hdrsize,
- (const prstatus_t *)NULL, (const prfpregset_t *)NULL,
- (const prpsinfo_t *)NULL, seginfo.count);
+ __elfN(puthdr)(p, (void *)NULL, &hdrsize, seginfo.count);
if (hdrsize + seginfo.size >= limit)
return (EFAULT);
@@ -1115,48 +1112,14 @@
size_t hdrsize;
void *hdr;
{
- struct {
- prstatus_t status;
- prfpregset_t fpregset;
- prpsinfo_t psinfo;
- } *tempdata;
struct proc *p = td->td_proc;
size_t off;
- prstatus_t *status;
- prfpregset_t *fpregset;
- prpsinfo_t *psinfo;
-
- tempdata = malloc(sizeof(*tempdata), M_TEMP, M_ZERO | M_WAITOK);
- status = &tempdata->status;
- fpregset = &tempdata->fpregset;
- psinfo = &tempdata->psinfo;
-
- /* Gather the information for the header. */
- status->pr_version = PRSTATUS_VERSION;
- status->pr_statussz = sizeof(prstatus_t);
- status->pr_gregsetsz = sizeof(gregset_t);
- status->pr_fpregsetsz = sizeof(fpregset_t);
- status->pr_osreldate = osreldate;
- status->pr_cursig = p->p_sig;
- status->pr_pid = p->p_pid;
- fill_regs(td, &status->pr_reg);
-
- fill_fpregs(td, fpregset);
- psinfo->pr_version = PRPSINFO_VERSION;
- psinfo->pr_psinfosz = sizeof(prpsinfo_t);
- strlcpy(psinfo->pr_fname, p->p_comm, sizeof(psinfo->pr_fname));
-
- /* XXX - We don't fill in the command line arguments properly yet. */
- strlcpy(psinfo->pr_psargs, p->p_comm, sizeof(psinfo->pr_psargs));
-
/* Fill in the header. */
bzero(hdr, hdrsize);
off = 0;
- __elfN(puthdr)(p, hdr, &off, status, fpregset, psinfo, numsegs);
+ __elfN(puthdr)(p, hdr, &off, numsegs);
- free(tempdata, M_TEMP);
-
/* Write it to the core file. */
return (vn_rdwr_inchunks(UIO_WRITE, vp, hdr, hdrsize, (off_t)0,
UIO_SYSSPACE, IO_UNIT | IO_DIRECT, cred, NOCRED, NULL,
@@ -1164,13 +1127,18 @@
}
static void
-__elfN(puthdr)(struct proc *p, void *dst, size_t *off, const prstatus_t *status,
- const prfpregset_t *fpregset, const prpsinfo_t *psinfo, int numsegs)
+__elfN(puthdr)(struct proc *p, void *dst, size_t *off, int numsegs)
{
- size_t ehoff;
- size_t phoff;
- size_t noteoff;
- size_t notesz;
+ struct {
+ prstatus_t status;
+ prfpregset_t fpregset;
+ prpsinfo_t psinfo;
+ } *tempdata;
+ prstatus_t *status;
+ prfpregset_t *fpregset;
+ prpsinfo_t *psinfo;
+ struct thread *first, *thr;
+ size_t ehoff, noteoff, notesz, phoff;
ehoff = *off;
*off += sizeof(Elf_Ehdr);
@@ -1179,14 +1147,77 @@
*off += (numsegs + 1) * sizeof(Elf_Phdr);
noteoff = *off;
- __elfN(putnote)(dst, off, "FreeBSD", NT_PRSTATUS, status,
- sizeof *status);
- __elfN(putnote)(dst, off, "FreeBSD", NT_FPREGSET, fpregset,
- sizeof *fpregset);
+ /*
+ * Don't allocate space for the notes if we're just calculating
+ * the size of the header. We also don't collect the data.
+ */
+ if (dst != NULL) {
+ tempdata = malloc(sizeof(*tempdata), M_TEMP, M_ZERO|M_WAITOK);
+ status = &tempdata->status;
+ fpregset = &tempdata->fpregset;
+ psinfo = &tempdata->psinfo;
+ } else {
+ tempdata = NULL;
>>> TRUNCATED FOR MAIL (1000 lines) <<<
More information about the p4-projects
mailing list