From owner-p4-projects@FreeBSD.ORG Tue Nov 16 20:27:19 2004 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 30F0816A4D1; Tue, 16 Nov 2004 20:27:19 +0000 (GMT) Delivered-To: perforce@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 0550416A4CE for ; Tue, 16 Nov 2004 20:27:19 +0000 (GMT) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id AB89443D48 for ; Tue, 16 Nov 2004 20:27:18 +0000 (GMT) (envelope-from jhb@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.12.11/8.12.11) with ESMTP id iAGKRIQR094387 for ; Tue, 16 Nov 2004 20:27:18 GMT (envelope-from jhb@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.12.11/8.12.11/Submit) id iAGKRINd094384 for perforce@freebsd.org; Tue, 16 Nov 2004 20:27:18 GMT (envelope-from jhb@freebsd.org) Date: Tue, 16 Nov 2004 20:27:18 GMT Message-Id: <200411162027.iAGKRINd094384@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to jhb@freebsd.org using -f From: John Baldwin To: Perforce Change Reviews Subject: PERFORCE change 65274 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 16 Nov 2004 20:27:20 -0000 http://perforce.freebsd.org/chv.cgi?CH=65274 Change 65274 by jhb@jhb_slimer on 2004/11/16 20:26:37 IFC @65271. Affected files ... .. //depot/projects/power/sys/dev/acpica/acpi_video.c#5 edit .. //depot/user/jhb/no386/lib/libc/Makefile#3 integrate .. //depot/user/jhb/no386/lib/libc/gen/getnetgrent.c#2 integrate .. //depot/user/jhb/no386/lib/libc/net/rcmd.c#2 integrate .. //depot/user/jhb/no386/lib/libc/rpc/netnamer.c#2 integrate .. //depot/user/jhb/no386/lib/libc/sys/read.2#3 integrate .. //depot/user/jhb/no386/lib/libc/sys/stat.2#2 integrate .. //depot/user/jhb/no386/libexec/rtld-elf/Makefile#3 integrate .. //depot/user/jhb/no386/share/mk/bsd.libnames.mk#2 integrate .. //depot/user/jhb/no386/sys/arm/arm/busdma_machdep.c#3 integrate .. //depot/user/jhb/no386/sys/arm/arm/genassym.c#2 integrate .. //depot/user/jhb/no386/sys/arm/arm/intr.c#2 integrate .. //depot/user/jhb/no386/sys/arm/arm/irq_dispatch.S#2 integrate .. //depot/user/jhb/no386/sys/arm/arm/pmap.c#4 integrate .. //depot/user/jhb/no386/sys/arm/xscale/i80321/i80321.c#2 integrate .. //depot/user/jhb/no386/sys/boot/common/commands.c#3 integrate .. //depot/user/jhb/no386/sys/coda/coda_vnops.c#2 integrate .. //depot/user/jhb/no386/sys/compat/svr4/svr4_filio.c#3 integrate .. //depot/user/jhb/no386/sys/compat/svr4/svr4_misc.c#2 integrate .. //depot/user/jhb/no386/sys/conf/NOTES#3 integrate .. //depot/user/jhb/no386/sys/conf/files#4 integrate .. //depot/user/jhb/no386/sys/conf/files.i386#4 integrate .. //depot/user/jhb/no386/sys/conf/kern.post.mk#3 integrate .. //depot/user/jhb/no386/sys/conf/options#3 integrate .. //depot/user/jhb/no386/sys/dev/acpi_support/acpi_asus.c#1 branch .. //depot/user/jhb/no386/sys/dev/acpi_support/acpi_panasonic.c#1 branch .. //depot/user/jhb/no386/sys/dev/acpi_support/acpi_sony.c#1 branch .. //depot/user/jhb/no386/sys/dev/acpi_support/acpi_toshiba.c#1 branch .. //depot/user/jhb/no386/sys/dev/acpica/acpi_cpu.c#2 integrate .. //depot/user/jhb/no386/sys/dev/acpica/acpi_snc.c#2 delete .. //depot/user/jhb/no386/sys/dev/em/if_em.c#5 integrate .. //depot/user/jhb/no386/sys/dev/mc146818/mc146818reg.h#1 branch .. //depot/user/jhb/no386/sys/dev/md/md.c#3 integrate .. //depot/user/jhb/no386/sys/dev/puc/puc_sbus.c#2 integrate .. //depot/user/jhb/no386/sys/dev/streams/streams.c#2 integrate .. //depot/user/jhb/no386/sys/dev/uart/uart_bus.h#2 integrate .. //depot/user/jhb/no386/sys/dev/uart/uart_core.c#2 integrate .. //depot/user/jhb/no386/sys/dev/uart/uart_dev_ns8250.c#2 integrate .. //depot/user/jhb/no386/sys/dev/uart/uart_subr.c#2 integrate .. //depot/user/jhb/no386/sys/dev/usb/ehci.c#4 integrate .. //depot/user/jhb/no386/sys/dev/usb/ohci.c#3 integrate .. //depot/user/jhb/no386/sys/dev/usb/uhci.c#4 integrate .. //depot/user/jhb/no386/sys/dev/vkbd/vkbd.c#1 branch .. //depot/user/jhb/no386/sys/dev/vkbd/vkbd_var.h#1 branch .. //depot/user/jhb/no386/sys/fs/deadfs/dead_vnops.c#2 integrate .. //depot/user/jhb/no386/sys/fs/devfs/devfs_vnops.c#3 integrate .. //depot/user/jhb/no386/sys/fs/fdescfs/fdesc_vfsops.c#3 integrate .. //depot/user/jhb/no386/sys/fs/fdescfs/fdesc_vnops.c#2 integrate .. //depot/user/jhb/no386/sys/fs/fifofs/fifo_vnops.c#3 integrate .. //depot/user/jhb/no386/sys/fs/hpfs/hpfs_vnops.c#3 integrate .. //depot/user/jhb/no386/sys/fs/msdosfs/msdosfs_vnops.c#3 integrate .. //depot/user/jhb/no386/sys/fs/ntfs/ntfs_vnops.c#3 integrate .. //depot/user/jhb/no386/sys/fs/udf/udf_vnops.c#3 integrate .. //depot/user/jhb/no386/sys/fs/unionfs/union_subr.c#2 integrate .. //depot/user/jhb/no386/sys/fs/unionfs/union_vfsops.c#3 integrate .. //depot/user/jhb/no386/sys/fs/unionfs/union_vnops.c#3 integrate .. //depot/user/jhb/no386/sys/geom/vinum/geom_vinum.h#2 integrate .. //depot/user/jhb/no386/sys/geom/vinum/geom_vinum_raid5.c#2 integrate .. //depot/user/jhb/no386/sys/geom/vinum/geom_vinum_share.c#2 integrate .. //depot/user/jhb/no386/sys/geom/vinum/geom_vinum_share.h#2 integrate .. //depot/user/jhb/no386/sys/geom/vinum/geom_vinum_subr.c#2 integrate .. //depot/user/jhb/no386/sys/gnu/ext2fs/ext2_bmap.c#3 integrate .. //depot/user/jhb/no386/sys/i386/acpica/acpi_asus.c#3 delete .. //depot/user/jhb/no386/sys/i386/acpica/acpi_panasonic.c#3 delete .. //depot/user/jhb/no386/sys/i386/acpica/acpi_toshiba.c#2 delete .. //depot/user/jhb/no386/sys/i386/conf/NOTES#4 integrate .. //depot/user/jhb/no386/sys/ia64/conf/GENERIC.hints#2 integrate .. //depot/user/jhb/no386/sys/isofs/cd9660/cd9660_bmap.c#3 integrate .. //depot/user/jhb/no386/sys/kern/kern_descrip.c#3 integrate .. //depot/user/jhb/no386/sys/kern/kern_event.c#2 integrate .. //depot/user/jhb/no386/sys/kern/kern_exec.c#3 integrate .. //depot/user/jhb/no386/sys/kern/kern_fork.c#3 integrate .. //depot/user/jhb/no386/sys/kern/kern_intr.c#3 integrate .. //depot/user/jhb/no386/sys/kern/kern_sig.c#3 integrate .. //depot/user/jhb/no386/sys/kern/sys_generic.c#2 integrate .. //depot/user/jhb/no386/sys/kern/sys_pipe.c#3 integrate .. //depot/user/jhb/no386/sys/kern/sys_socket.c#2 integrate .. //depot/user/jhb/no386/sys/kern/sysv_sem.c#3 integrate .. //depot/user/jhb/no386/sys/kern/tty.c#4 integrate .. //depot/user/jhb/no386/sys/kern/uipc_syscalls.c#3 integrate .. //depot/user/jhb/no386/sys/kern/vfs_cluster.c#3 integrate .. //depot/user/jhb/no386/sys/kern/vfs_default.c#3 integrate .. //depot/user/jhb/no386/sys/kern/vfs_subr.c#4 integrate .. //depot/user/jhb/no386/sys/kern/vfs_syscalls.c#3 integrate .. //depot/user/jhb/no386/sys/kern/vfs_vnops.c#4 integrate .. //depot/user/jhb/no386/sys/kern/vnode_if.src#3 integrate .. //depot/user/jhb/no386/sys/modules/Makefile#4 integrate .. //depot/user/jhb/no386/sys/modules/acpi/Makefile#3 integrate .. //depot/user/jhb/no386/sys/modules/acpi/acpi_asus/Makefile#2 integrate .. //depot/user/jhb/no386/sys/modules/acpi/acpi_panasonic/Makefile#2 integrate .. //depot/user/jhb/no386/sys/modules/acpi/acpi_sony/Makefile#1 branch .. //depot/user/jhb/no386/sys/modules/acpi/acpi_toshiba/Makefile#2 integrate .. //depot/user/jhb/no386/sys/modules/vkbd/Makefile#1 branch .. //depot/user/jhb/no386/sys/netinet/in.c#2 integrate .. //depot/user/jhb/no386/sys/netinet/ip_divert.c#4 integrate .. //depot/user/jhb/no386/sys/pci/if_sk.c#3 integrate .. //depot/user/jhb/no386/sys/pci/if_skreg.h#3 integrate .. //depot/user/jhb/no386/sys/sys/buf.h#3 integrate .. //depot/user/jhb/no386/sys/sys/filedesc.h#3 integrate .. //depot/user/jhb/no386/sys/sys/vnode.h#4 integrate .. //depot/user/jhb/no386/sys/ufs/ffs/ffs_vfsops.c#4 integrate .. //depot/user/jhb/no386/sys/ufs/ufs/ufs_bmap.c#3 integrate .. //depot/user/jhb/no386/sys/vm/vm_pager.c#3 integrate .. //depot/user/jhb/no386/sys/vm/vnode_pager.c#3 integrate Differences ... ==== //depot/projects/power/sys/dev/acpica/acpi_video.c#5 (text+ko) ==== @@ -1,5 +1,6 @@ /*- * Copyright (c) 2002-2003 Taku YAMAMOTO + * Copyright (c) 2004 Benjamin Close * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -34,10 +35,33 @@ #include #include #include +#ifdef __i386__ +#include +#endif #include "acpi.h" #include +#ifdef __i386__ +#define USE_DPMS + +/* + * VESA DPMS States + */ +#define DPMS_ON 0x00 +#define DPMS_STANDBY 0x01 +#define DPMS_SUSPEND 0x02 +#define DPMS_OFF 0x04 +#define DPMS_REDUCEDON 0x08 + +#define VBE_DPMS_FUNCTION 0x4F10 +#define VBE_DPMS_GET_SUPPORTED_STATES 0x00 +#define VBE_DPMS_GET_STATE 0x02 +#define VBE_DPMS_SET_STATE 0x01 +#define VBE_MAJORVERSION_MASK 0x0F +#define VBE_MINORVERSION_MASK 0xF0 +#endif + /* ACPI video extension driver. */ struct acpi_video_output { ACPI_HANDLE handle; @@ -63,6 +87,10 @@ ACPI_HANDLE handle; STAILQ_HEAD(, acpi_video_output) vid_outputs; eventhandler_tag vid_pwr_evh; +#ifdef USE_DPMS + int vid_dpms_supported_states; + int vid_dpms_initial_state; +#endif }; /* interfaces */ @@ -71,6 +99,8 @@ static int acpi_video_attach(device_t); static int acpi_video_detach(device_t); static int acpi_video_shutdown(device_t); +static int acpi_video_suspend(device_t); +static int acpi_video_resume(device_t); static void acpi_video_notify_handler(ACPI_HANDLE, UINT32, void *); static void acpi_video_power_profile(void *); static void acpi_video_bind_outputs(struct acpi_video_softc *); @@ -94,6 +124,11 @@ static UINT32 vo_get_device_status(ACPI_HANDLE); static UINT32 vo_query_graphics_state(ACPI_HANDLE); static void vo_set_device_state(ACPI_HANDLE, UINT32); +#ifdef USE_DPMS +static int dpms_get_supported_states(int *); +static int dpms_get_current_state(int *); +static int dpms_set_state(int); +#endif /* events */ #define VID_NOTIFY_SWITCHED 0x80 @@ -141,6 +176,8 @@ DEVMETHOD(device_attach, acpi_video_attach), DEVMETHOD(device_detach, acpi_video_detach), DEVMETHOD(device_shutdown, acpi_video_shutdown), + DEVMETHOD(device_resume, acpi_video_resume), + DEVMETHOD(device_suspend, acpi_video_suspend), { 0, 0 } }; @@ -242,6 +279,13 @@ ACPI_UNLOCK; acpi_video_power_profile(sc); +#ifdef USE_DPMS + if (dpms_get_supported_states(&sc->vid_dpms_supported_states) == 0) + dpms_get_current_state(&sc->vid_dpms_initial_state); + else + sc->vid_dpms_supported_states = -1; +#endif + return (0); } @@ -283,6 +327,32 @@ return (0); } +static int +acpi_video_suspend(device_t dev) +{ + struct acpi_video_softc *sc; + + sc = device_get_softc(dev); +#ifdef USE_DPMS + if (sc->vid_dpms_supported_states != -1) + dpms_set_state(DPMS_OFF); +#endif + return (0); +} + +static int +acpi_video_resume(device_t dev) +{ + struct acpi_video_softc *sc; + + sc = device_get_softc(dev); +#ifdef USE_DPMS + if (sc->vid_dpms_supported_states != -1) + dpms_set_state(sc->vid_dpms_initial_state); +#endif + return (0); +} + static void acpi_video_notify_handler(ACPI_HANDLE handle __unused, UINT32 notify, void *context) { @@ -929,3 +999,48 @@ printf("can't evaluate %s._DSS - %s\n", acpi_name(handle), AcpiFormatException(status)); } + +#ifdef USE_DPMS +static int +dpms_call_bios(int subfunction, int *bh) +{ + struct vm86frame vmf; + int error; + + bzero(&vmf, sizeof(vmf)); + vmf.vmf_ax = VBE_DPMS_FUNCTION; + vmf.vmf_bl = subfunction; + vmf.vmf_bh = *bh; + vmf.vmf_es = 0; + vmf.vmf_di = 0; + error = vm86_intcall(0x10, &vmf); + if (error == 0 && (vmf.vmf_eax & 0xffff) != 0x004f) + error = ENXIO; + if (error == 0) + *bh = vmf.vmf_bh; + return (error); +} + +static int +dpms_get_supported_states(int *states) +{ + + *states = 0; + return (dpms_call_bios(VBE_DPMS_GET_SUPPORTED_STATES, states)); +} + +static int +dpms_get_current_state(int *state) +{ + + *state = 0; + return (dpms_call_bios(VBE_DPMS_GET_STATE, state)); +} + +static int +dpms_set_state(int state) +{ + + return (dpms_call_bios(VBE_DPMS_SET_STATE, &state)); +} +#endif ==== //depot/user/jhb/no386/lib/libc/Makefile#3 (text+ko) ==== @@ -1,5 +1,5 @@ # @(#)Makefile 8.2 (Berkeley) 2/3/94 -# $FreeBSD: src/lib/libc/Makefile,v 1.54 2004/10/24 15:32:30 ru Exp $ +# $FreeBSD: src/lib/libc/Makefile,v 1.55 2004/11/13 20:40:28 bz Exp $ # # All library objects contain FreeBSD revision strings by default; they may be # excluded as a space-saving measure. To produce a library that does @@ -60,7 +60,7 @@ .if ${MACHINE_ARCH} == "arm" .include "${.CURDIR}/softfloat/Makefile.inc" .endif -.if !defined(NO_YP_LIBC) +.if !defined(NO_NIS) CFLAGS+= -DYP .include "${.CURDIR}/yp/Makefile.inc" .endif ==== //depot/user/jhb/no386/lib/libc/gen/getnetgrent.c#2 (text+ko) ==== @@ -38,7 +38,7 @@ static char sccsid[] = "@(#)getnetgrent.c 8.2 (Berkeley) 4/27/95"; #endif /* LIBC_SCCS and not lint */ #include -__FBSDID("$FreeBSD: src/lib/libc/gen/getnetgrent.c,v 1.31 2004/07/28 11:56:03 des Exp $"); +__FBSDID("$FreeBSD: src/lib/libc/gen/getnetgrent.c,v 1.32 2004/11/13 20:40:28 bz Exp $"); #include #include @@ -202,7 +202,7 @@ return; } #else - if (netf = fopen(_PATH_NETGROUP, "r")) { + if ((netf = fopen(_PATH_NETGROUP, "r"))) { #endif if (parse_netgrp(group)) endnetgrent(); ==== //depot/user/jhb/no386/lib/libc/net/rcmd.c#2 (text+ko) ==== @@ -35,7 +35,7 @@ static char sccsid[] = "@(#)rcmd.c 8.3 (Berkeley) 3/26/94"; #endif /* LIBC_SCCS and not lint */ #include -__FBSDID("$FreeBSD: src/lib/libc/net/rcmd.c,v 1.38 2003/02/18 13:39:52 nectar Exp $"); +__FBSDID("$FreeBSD: src/lib/libc/net/rcmd.c,v 1.39 2004/11/13 20:40:28 bz Exp $"); #include "namespace.h" #include @@ -55,8 +55,8 @@ #include #include #include +#include #ifdef YP -#include #include #include #endif ==== //depot/user/jhb/no386/lib/libc/rpc/netnamer.c#2 (text+ko) ==== @@ -32,7 +32,7 @@ static char sccsid[] = "@(#)netnamer.c 1.13 91/03/11 Copyr 1986 Sun Micro"; #endif #include -__FBSDID("$FreeBSD: src/lib/libc/rpc/netnamer.c,v 1.10 2004/10/16 06:11:35 obrien Exp $"); +__FBSDID("$FreeBSD: src/lib/libc/rpc/netnamer.c,v 1.11 2004/11/13 20:40:28 bz Exp $"); /* * netname utility routines convert from unix names to network names and @@ -58,7 +58,9 @@ #include "un-namespace.h" static char *OPSYS = "unix"; +#ifdef YP static char *NETID = "netid.byname"; +#endif static char *NETIDFILE = "/etc/netid"; static int getnetid( char *, char * ); ==== //depot/user/jhb/no386/lib/libc/sys/read.2#3 (text+ko) ==== @@ -30,7 +30,7 @@ .\" SUCH DAMAGE. .\" .\" @(#)read.2 8.4 (Berkeley) 2/26/94 -.\" $FreeBSD: src/lib/libc/sys/read.2,v 1.27 2004/10/25 13:35:03 yar Exp $ +.\" $FreeBSD: src/lib/libc/sys/read.2,v 1.28 2004/11/15 13:55:33 yar Exp $ .\" .Dd October 16, 2004 .Dt READ 2 @@ -207,7 +207,7 @@ .It Bq Er EFAULT Part of the .Fa iov -points outside the process's allocated address space. +array points outside the process's allocated address space. .El .Pp The ==== //depot/user/jhb/no386/lib/libc/sys/stat.2#2 (text+ko) ==== @@ -30,9 +30,9 @@ .\" SUCH DAMAGE. .\" .\" @(#)stat.2 8.4 (Berkeley) 5/1/95 -.\" $FreeBSD: src/lib/libc/sys/stat.2,v 1.36 2003/12/10 15:08:41 dds Exp $ +.\" $FreeBSD: src/lib/libc/sys/stat.2,v 1.40 2004/11/15 14:16:31 yar Exp $ .\" -.Dd February 15, 2002 +.Dd November 15, 2004 .Dt STAT 2 .Os .Sh NAME @@ -87,8 +87,26 @@ .In sys/stat.h and into which information is placed concerning the file. .Pp +The fields of +.Vt "struct stat" +related to the file system are as follows: +.Bl -tag -width ".Va st_nlink" +.It Va st_dev +The numeric ID of the device containing the file. +.It Va st_ino +The file's inode number. +.It Va st_nlink +The number of hard links to the file. +.El +.Pp +The +.Va st_dev +and +.Va st_ino +fields together identify the file uniquely within the system. +.Pp The time-related fields of -.Fa struct stat +.Vt "struct stat" are as follows: .Bl -tag -width ".Va st_birthtime" .It Va st_atime @@ -150,15 +168,29 @@ The size-related fields of the .Vt "struct stat" are as follows: -.Bl -tag -width XXXst_blksize -.It st_blksize +.Bl -tag -width ".Va st_blksize" +.It Va st_size +The file size in bytes. +.It Va st_blksize The optimal I/O block size for the file. -.It st_blocks +.It Va st_blocks The actual number of blocks allocated for the file in 512-byte units. As short symbolic links are stored in the inode, this number may be zero. .El .Pp +The access-related fields of +.Vt "struct stat" +are as follows: +.Bl -tag -width ".Va st_mode" +.It Va st_uid +The user ID of the file's owner. +.It Va st_gid +The group ID of the file. +.It Va st_mode +Status of the file (see below). +.El +.Pp The status information word .Fa st_mode has the following bits: @@ -185,18 +217,44 @@ .Xr access 2 and .Xr chmod 2 . +The following macros are available to test whether a +.Va st_mode +value passed in the +.Ar m +argument corresponds to a file of the specified type: +.Bl -tag -width ".Fn S_ISFIFO m" +.It Fn S_ISBLK m +Test for a block special file. +.It Fn S_ISCHR m +Test for a character special file. +.It Fn S_ISDIR m +Test for a directory. +.It Fn S_ISFIFO m +Test for a pipe or FIFO special file. +.It Fn S_ISLNK m +Test for a symbolic link. +.It Fn S_ISREG m +Test for a regular file. +.It Fn S_ISSOCK m +Test for a socket. +.It Fn S_ISWHT m +Test for a whiteout. +.El +.Pp +The macros evaluate to a non-zero value if the test is true +or to the value 0 if the test is false. .Sh RETURN VALUES .Rv -std .Sh COMPATIBILITY Previous versions of the system used different types for the -.Li st_dev , -.Li st_uid , -.Li st_gid , -.Li st_rdev , -.Li st_size , -.Li st_blksize +.Va st_dev , +.Va st_uid , +.Va st_gid , +.Va st_rdev , +.Va st_size , +.Va st_blksize and -.Li st_blocks +.Va st_blocks fields. .Sh ERRORS The ==== //depot/user/jhb/no386/libexec/rtld-elf/Makefile#3 (text+ko) ==== @@ -1,4 +1,4 @@ -# $FreeBSD: src/libexec/rtld-elf/Makefile,v 1.33 2004/11/03 18:01:19 ru Exp $ +# $FreeBSD: src/libexec/rtld-elf/Makefile,v 1.36 2004/11/14 22:18:31 ru Exp $ PROG?= ld-elf.so.1 SRCS= rtld_start.S \ @@ -48,7 +48,9 @@ # Since moving rtld-elf to /libexec, we need to create a symlink. # Fixup the existing binary that's there so we can symlink over it. beforeinstall: +.if exists(${DESTDIR}/usr/libexec/${PROG}) -chflags noschg ${DESTDIR}/usr/libexec/${PROG} +.endif .PATH: ${.CURDIR}/${MACHINE_ARCH} ==== //depot/user/jhb/no386/share/mk/bsd.libnames.mk#2 (text+ko) ==== @@ -1,4 +1,4 @@ -# $FreeBSD: src/share/mk/bsd.libnames.mk,v 1.90 2004/09/24 22:10:34 trhodes Exp $ +# $FreeBSD: src/share/mk/bsd.libnames.mk,v 1.91 2004/11/13 20:40:32 bz Exp $ # The include file define library names. # Other include files (e.g. bsd.prog.mk, bsd.lib.mk) include this @@ -97,13 +97,17 @@ MINUSLPAM+= -lkrb5 -lasn1 -lcrypto -lcrypt -lroken -lcom_err .endif LIBPAM+= ${LIBRADIUS} ${LIBTACPLUS} ${LIBCRYPT} \ - ${LIBUTIL} ${LIBOPIE} ${LIBMD} ${LIBYPCLNT} + ${LIBUTIL} ${LIBOPIE} ${LIBMD} MINUSLPAM+= -lradius -ltacplus -lcrypt \ - -lutil -lopie -lmd -lypclnt + -lutil -lopie -lmd .if !defined(NO_OPENSSH) && !defined(NOCRYPT) && !defined(NO_OPENSSL) LIBPAM+= ${LIBSSH} ${LIBCRYPTO} ${LIBCRYPT} MINUSLPAM+= -lssh -lcrypto -lcrypt .endif +.if !defined(NO_NIS) +LIBPAM+= ${LIBYPCLNT} +MINUSLPAM+= -lypclnt +.endif .endif LIBPANEL?= ${DESTDIR}${LIBDIR}/libpanel.a ==== //depot/user/jhb/no386/sys/arm/arm/busdma_machdep.c#3 (text+ko) ==== @@ -29,7 +29,7 @@ */ #include -__FBSDID("$FreeBSD: src/sys/arm/arm/busdma_machdep.c,v 1.5 2004/10/21 11:59:33 cognet Exp $"); +__FBSDID("$FreeBSD: src/sys/arm/arm/busdma_machdep.c,v 1.7 2004/11/16 00:57:44 cognet Exp $"); /* * MacPPC bus dma support routines @@ -97,11 +97,10 @@ * Check to see if the specified page is in an allowed DMA range. */ -static int +static __inline int bus_dmamap_load_buffer(bus_dma_tag_t dmat, bus_dma_segment_t segs[], - bus_dmamap_t map, void *buf, bus_size_t buflen, struct thread *td, - int flags, vm_offset_t *lastaddrp, int *segp, - int first); + bus_dmamap_t map, void *buf, bus_size_t buflen, struct pmap *pmap, + int flags, vm_offset_t *lastaddrp, int *segp); static __inline struct arm32_dma_range * _bus_dma_inrange(struct arm32_dma_range *ranges, int nranges, @@ -367,7 +366,7 @@ void *callback_arg, int flags) { vm_offset_t lastaddr = 0; - int error, nsegs = 0; + int error, nsegs = -1; #ifdef __GNUC__ bus_dma_segment_t dm_segments[dmat->nsegments]; #else @@ -379,8 +378,8 @@ map->buffer = buf; map->len = buflen; error = bus_dmamap_load_buffer(dmat, - dm_segments, map, buf, buflen, NULL, - flags, &lastaddr, &nsegs, 1); + dm_segments, map, buf, buflen, kernel_pmap, + flags, &lastaddr, &nsegs); if (error) (*callback)(callback_arg, NULL, 0, error); else @@ -395,27 +394,20 @@ * the starting segment on entrance, and the ending segment on exit. * first indicates if this is the first invocation of this function. */ -static int +static int __inline bus_dmamap_load_buffer(bus_dma_tag_t dmat, bus_dma_segment_t segs[], - bus_dmamap_t map, void *buf, bus_size_t buflen, struct thread *td, - int flags, vm_offset_t *lastaddrp, int *segp, - int first) + bus_dmamap_t map, void *buf, bus_size_t buflen, struct pmap *pmap, + int flags, vm_offset_t *lastaddrp, int *segp) { bus_size_t sgsize; bus_addr_t curaddr, lastaddr, baddr, bmask; vm_offset_t vaddr = (vm_offset_t)buf; int seg; int error = 0; - pmap_t pmap; pd_entry_t *pde; pt_entry_t pte; pt_entry_t *ptep; - if (td != NULL) - pmap = vmspace_pmap(td->td_proc->p_vmspace); - else - pmap = pmap_kernel(); - lastaddr = *lastaddrp; bmask = ~(dmat->boundary - 1); @@ -496,27 +488,19 @@ * Insert chunk into a segment, coalescing with * the previous segment if possible. */ - if (first) { + if (seg >= 0 && curaddr == lastaddr && + (segs[seg].ds_len + sgsize) <= dmat->maxsegsz && + (dmat->boundary == 0 || + (segs[seg].ds_addr & bmask) == + (curaddr & bmask))) { + segs[seg].ds_len += sgsize; + goto segdone; + } else { + if (++seg >= dmat->nsegments) + break; segs[seg].ds_addr = curaddr; segs[seg].ds_len = sgsize; - first = 0; - } else { - if (curaddr == lastaddr && - (segs[seg].ds_len + sgsize) <= dmat->maxsegsz && - (dmat->boundary == 0 || - (segs[seg].ds_addr & bmask) == - (curaddr & bmask))) { - segs[seg].ds_len += sgsize; - goto segdone; - } - else { - if (++seg >= dmat->nsegments) - break; - segs[seg].ds_addr = curaddr; - segs[seg].ds_len = sgsize; - } } - if (error) break; segdone: @@ -549,7 +533,7 @@ #else bus_dma_segment_t dm_segments[BUS_DMAMAP_NSEGS]; #endif - int nsegs = 0, error = 0; + int nsegs = -1, error = 0; M_ASSERTPKTHDR(m0); @@ -557,17 +541,14 @@ map->flags |= DMAMAP_MBUF | DMAMAP_COHERENT; map->buffer = m0; if (m0->m_pkthdr.len <= dmat->maxsize) { - int first = 1; vm_offset_t lastaddr = 0; struct mbuf *m; for (m = m0; m != NULL && error == 0; m = m->m_next) { - if (m->m_len > 0) { + if (m->m_len > 0) error = bus_dmamap_load_buffer(dmat, - dm_segments, map, m->m_data, m->m_len, NULL, - flags, &lastaddr, &nsegs, first); - first = 0; - } + dm_segments, map, m->m_data, m->m_len, + pmap_kernel(), flags, &lastaddr, &nsegs); } } else { error = EINVAL; @@ -599,10 +580,10 @@ #else bus_dma_segment_t dm_segments[BUS_DMAMAP_NSEGS]; #endif - int nsegs, i, error, first; + int nsegs, i, error; bus_size_t resid; struct iovec *iov; - struct thread *td = NULL; + struct pmap *pmap; resid = uio->uio_resid; iov = uio->uio_iov; @@ -611,13 +592,14 @@ map->buffer = uio; if (uio->uio_segflg == UIO_USERSPACE) { - td = uio->uio_td; + pmap = vmspace_pmap(uio->uio_td->td_proc->p_vmspace); KASSERT(td != NULL, ("bus_dmamap_load_uio: USERSPACE but no proc")); - } + } else + pmap = kernel_pmap; - first = 1; - nsegs = error = 0; + error = 0; + nsegs = -1; for (i = 0; i < uio->uio_iovcnt && resid != 0 && !error; i++) { /* * Now at the first iovec to load. Load each iovec @@ -629,9 +611,7 @@ if (minlen > 0) { error = bus_dmamap_load_buffer(dmat, dm_segments, map, - addr, minlen, td, flags, &lastaddr, &nsegs, first); - - first = 0; + addr, minlen, pmap, flags, &lastaddr, &nsegs); resid -= minlen; } ==== //depot/user/jhb/no386/sys/arm/arm/genassym.c#2 (text+ko) ==== @@ -26,7 +26,7 @@ */ #include -__FBSDID("$FreeBSD: src/sys/arm/arm/genassym.c,v 1.2 2004/09/23 22:11:06 cognet Exp $"); +__FBSDID("$FreeBSD: src/sys/arm/arm/genassym.c,v 1.3 2004/11/12 21:49:05 cognet Exp $"); #include #include #include @@ -43,6 +43,7 @@ #include #include #include +#include #include #include #include @@ -109,3 +110,6 @@ ASSYM(P_SIGEVENT, P_SIGEVENT); ASSYM(P_PROFIL, P_PROFIL); ASSYM(TRAPFRAMESIZE, sizeof(struct trapframe)); + +ASSYM(MAXCOMLEN, MAXCOMLEN); +ASSYM(NIRQ, NIRQ); ==== //depot/user/jhb/no386/sys/arm/arm/intr.c#2 (text+ko) ==== @@ -37,7 +37,7 @@ */ #include -__FBSDID("$FreeBSD: src/sys/arm/arm/intr.c,v 1.3 2004/09/23 22:09:57 cognet Exp $"); +__FBSDID("$FreeBSD: src/sys/arm/arm/intr.c,v 1.4 2004/11/12 21:49:05 cognet Exp $"); #include #include #include @@ -50,7 +50,10 @@ #include #include -struct ithd *ithreads[NIRQ]; +static struct ithd *ithreads[NIRQ]; +static int intrcnt_tab[NIRQ]; +static int intrcnt_index = 0; +static int last_printed = 0; struct arm_intr { driver_intr_t *handler; void *arg; @@ -69,7 +72,8 @@ void arm_handler_execute(void *, int); -void arm_setup_irqhandler(const char *name, void (*hand)(void*), void *arg, +void +arm_setup_irqhandler(const char *name, void (*hand)(void*), void *arg, int irq, int flags, void **cookiep) { struct ithd *cur_ith; @@ -87,6 +91,14 @@ if (error) return; ithreads[irq] = cur_ith; + last_printed += + snprintf(intrnames + last_printed, + MAXCOMLEN + 1, + "irq%d: %s", irq, name); + last_printed++; + intrcnt_tab[irq] = intrcnt_index; + intrcnt_index++; + } if (!(flags & INTR_FAST)) { intr->handler = hand; @@ -120,6 +132,7 @@ arm_mask_irqs(irqnb); while (irqnb != 0) { i = ffs(irqnb) - 1; + intrcnt[intrcnt_tab[i]]++; irqnb &= ~(1U << i); ithd = ithreads[i]; if (!ithd) ==== //depot/user/jhb/no386/sys/arm/arm/irq_dispatch.S#2 (text+ko) ==== @@ -72,7 +72,7 @@ #include #include #include -__FBSDID("$FreeBSD: src/sys/arm/arm/irq_dispatch.S,v 1.2 2004/09/23 22:09:57 cognet Exp $"); +__FBSDID("$FreeBSD: src/sys/arm/arm/irq_dispatch.S,v 1.3 2004/11/12 21:49:05 cognet Exp $"); /* * irq_entry: @@ -102,18 +102,13 @@ .align 0 - /* - * XXX Provide intrnames/intrcnt for legacy code, but - * don't actually use them. - */ - .global _C_LABEL(intrnames), _C_LABEL(eintrnames) .global _C_LABEL(intrcnt), _C_LABEL(eintrcnt) _C_LABEL(intrnames): + .space NIRQ * (MAXCOMLEN + 1) _C_LABEL(eintrnames): - - .global _C_LABEL(intrcnt), _C_LABEL(sintrcnt), _C_LABEL(eintrcnt) _C_LABEL(intrcnt): + .space NIRQ * 4 _C_LABEL(eintrcnt): .global _C_LABEL(current_intr_depth) ==== //depot/user/jhb/no386/sys/arm/arm/pmap.c#4 (text+ko) ==== @@ -147,7 +147,7 @@ #include "opt_vm.h" #include -__FBSDID("$FreeBSD: src/sys/arm/arm/pmap.c,v 1.17 2004/11/10 22:11:08 cognet Exp $"); +__FBSDID("$FreeBSD: src/sys/arm/arm/pmap.c,v 1.19 2004/11/13 14:54:31 cognet Exp $"); #include #include #include @@ -1668,6 +1668,8 @@ simple_unlock(&pg->mdpage.pvh_slock); PMAP_HEAD_TO_MAP_UNLOCK(); #endif + if (maskbits & PVF_WRITE) + vm_page_flag_clear(pg, PG_WRITEABLE); return (count); } @@ -1789,6 +1791,8 @@ pg->md.urw_mappings--; else pg->md.uro_mappings--; + if (TAILQ_FIRST(&pg->md.pv_list) == NULL) + vm_page_flag_clear(pg, PG_WRITEABLE); } static struct pv_entry * @@ -1921,9 +1925,6 @@ pvzone = uma_zcreate("PV ENTRY", sizeof (struct pv_entry), NULL, NULL, NULL, NULL, UMA_ALIGN_PTR, UMA_ZONE_VM | UMA_ZONE_NOFREE); uma_prealloc(pvzone, MINPV); - l2table_zone = uma_zcreate("L2 Table", sizeof(struct l2_dtable), - NULL, NULL, NULL, NULL, UMA_ALIGN_PTR, - UMA_ZONE_VM | UMA_ZONE_NOFREE); /* * Now it is safe to enable pv_table recording. */ @@ -2173,6 +2174,11 @@ l2zone = uma_zcreate("L2 Table", L2_TABLE_SIZE_REAL, pmap_l2ptp_ctor, NULL, NULL, NULL, UMA_ALIGN_PTR, UMA_ZONE_VM | UMA_ZONE_NOFREE); uma_prealloc(l2zone, 4096); + l2table_zone = uma_zcreate("L2 Table", sizeof(struct l2_dtable), + NULL, NULL, NULL, NULL, UMA_ALIGN_PTR, + UMA_ZONE_VM | UMA_ZONE_NOFREE); + uma_prealloc(l2table_zone, 1024); + uma_zone_set_obj(pvzone, &pvzone_obj, pv_entry_max); uma_zone_set_obj(l2zone, &l2zone_obj, pv_entry_max); @@ -3689,6 +3695,7 @@ pmap_acquire_pmap_lock(pm); #endif + vm_page_lock_queues(); pmap_update(pm); if (!pmap_is_current(pm)) { cleanlist_idx = PMAP_REMOVE_CLEAN_LIST_SIZE + 1; @@ -3845,6 +3852,7 @@ pmap_free_l2_bucket(pm, l2b, mappings); } + vm_page_unlock_queues(); if (flushall) cpu_tlb_flushID(); #if 0 ==== //depot/user/jhb/no386/sys/arm/xscale/i80321/i80321.c#2 (text+ko) ==== @@ -40,7 +40,7 @@ */ #include -__FBSDID("$FreeBSD: src/sys/arm/xscale/i80321/i80321.c,v 1.1 2004/09/23 22:45:36 cognet Exp $"); +__FBSDID("$FreeBSD: src/sys/arm/xscale/i80321/i80321.c,v 1.2 2004/11/13 15:12:26 cognet Exp $"); #include #include @@ -146,7 +146,6 @@ bus_space_write_4(sc->sc_st, sc->sc_atu_sh, ATU_IALR2, (0xffffffff - (sc->sc_iwin[2].iwin_size - 1)) & 0xffffffc0); - printf("size : %d\n", (sc->sc_iwin[2].iwin_size - 1) / (1024 * 1024)); bus_space_write_4(sc->sc_st, sc->sc_atu_sh, ATU_IATVR2, sc->sc_iwin[2].iwin_xlate); ==== //depot/user/jhb/no386/sys/boot/common/commands.c#3 (text+ko) ==== @@ -25,7 +25,7 @@ */ #include -__FBSDID("$FreeBSD: src/sys/boot/common/commands.c,v 1.21 2004/11/12 13:27:49 ru Exp $"); +__FBSDID("$FreeBSD: src/sys/boot/common/commands.c,v 1.22 2004/11/13 17:04:55 ru Exp $"); #include #include @@ -312,7 +312,7 @@ return(CMD_OK); } -COMMAND_SET(echo, "echo", NULL, command_echo); +COMMAND_SET(echo, "echo", "echo arguments", command_echo); static int command_echo(int argc, char *argv[]) @@ -351,7 +351,7 @@ * A passable emulation of the sh(1) command of the same name. */ -COMMAND_SET(read, "read", NULL, command_read); +COMMAND_SET(read, "read", "read input from the terminal", command_read); static int command_read(int argc, char *argv[]) ==== //depot/user/jhb/no386/sys/coda/coda_vnops.c#2 (text+ko) ==== >>> TRUNCATED FOR MAIL (1000 lines) <<<