CVS commit: src/sys/conf

2009-11-10 Thread Matthias Scheler
Module Name:src
Committed By:   tron
Date:   Tue Nov 10 20:24:50 UTC 2009

Modified Files:
src/sys/conf: Makefile.kern.inc

Log Message:
cgd.c doesn't use variable size stack allocations anymore.


To generate a diff of this commit:
cvs rdiff -u -r1.124 -r1.125 src/sys/conf/Makefile.kern.inc

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/conf/Makefile.kern.inc
diff -u src/sys/conf/Makefile.kern.inc:1.124 src/sys/conf/Makefile.kern.inc:1.125
--- src/sys/conf/Makefile.kern.inc:1.124	Wed May 13 18:06:26 2009
+++ src/sys/conf/Makefile.kern.inc	Tue Nov 10 20:24:50 2009
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile.kern.inc,v 1.124 2009/05/13 18:06:26 cube Exp $
+#	$NetBSD: Makefile.kern.inc,v 1.125 2009/11/10 20:24:50 tron Exp $
 #
 # This file contains common `MI' targets and definitions and it is included
 # at the bottom of each `MD' ${MACHINE}/conf/Makefile.${MACHINE}.
@@ -481,7 +481,7 @@
 
 # The following files use alloca(3) or variable array allocations.
 # Their full name is noted as documentation.
-VARSTACK=dev/cgd.c kern/uipc_socket.c miscfs/genfs/genfs_vnops.c \
+VARSTACK=kern/uipc_socket.c miscfs/genfs/genfs_vnops.c \
 nfs/nfs_bio.c uvm/uvm_bio.c \
 uvm/uvm_pager.c dev/ic/aic7xxx.c dev/ic/aic79xx.c arch/xen/i386/gdt.c \
 dev/ofw/ofw_subr.c



CVS commit: src/sys/dev

2009-11-10 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Tue Nov 10 20:39:36 UTC 2009

Modified Files:
src/sys/dev: cgd.c

Log Message:
avoid doing extra work by just zeroing/printing real blocksize.


To generate a diff of this commit:
cvs rdiff -u -r1.63 -r1.64 src/sys/dev/cgd.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/cgd.c
diff -u src/sys/dev/cgd.c:1.63 src/sys/dev/cgd.c:1.64
--- src/sys/dev/cgd.c:1.63	Tue Nov 10 15:24:30 2009
+++ src/sys/dev/cgd.c	Tue Nov 10 15:39:36 2009
@@ -1,4 +1,4 @@
-/* $NetBSD: cgd.c,v 1.63 2009/11/10 20:24:30 christos Exp $ */
+/* $NetBSD: cgd.c,v 1.64 2009/11/10 20:39:36 christos Exp $ */
 
 /*-
  * Copyright (c) 2002 The NetBSD Foundation, Inc.
@@ -30,7 +30,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: cgd.c,v 1.63 2009/11/10 20:24:30 christos Exp $);
+__KERNEL_RCSID(0, $NetBSD: cgd.c,v 1.64 2009/11/10 20:39:36 christos Exp $);
 
 #include sys/types.h
 #include sys/param.h
@@ -796,7 +796,7 @@
 	DIAGCONDPANIC(sizeof(daddr_t)  blocksize,
 	(cgd_cipher: sizeof(daddr_t)  blocksize));
 
-	memset(zero_iv, 0x0, sizeof(zero_iv));
+	memset(zero_iv, 0x0, blocksize);
 
 	dstuio.uio_iov = dstiov;
 	dstuio.uio_iovcnt = 2;
@@ -815,13 +815,13 @@
 		dstiov[1].iov_base = dst;
 		srciov[1].iov_base = src;
 
-		memset(blkno_buf, 0x0, sizeof(blkno_buf));
+		memset(blkno_buf, 0x0, blocksize);
 		blkno2blkno_buf(blkno_buf, blkno);
 		if (dir == CGD_CIPHER_DECRYPT) {
 			dstuio.uio_iovcnt = 1;
 			srcuio.uio_iovcnt = 1;
 			IFDEBUG(CGDB_CRYPTO, hexprint(step 0: blkno_buf,
-			blkno_buf, sizeof(blkno_buf)));
+			blkno_buf, blocksize));
 			cipher(cs-sc_cdata.cf_priv, dstuio, srcuio,
 			zero_iv, CGD_CIPHER_ENCRYPT);
 			memcpy(blkno_buf, sink, blocksize);
@@ -830,10 +830,10 @@
 		}
 
 		IFDEBUG(CGDB_CRYPTO, hexprint(step 1: blkno_buf,
-		blkno_buf, sizeof(blkno_buf)));
+		blkno_buf, blocksize));
 		cipher(cs-sc_cdata.cf_priv, dstuio, srcuio, zero_iv, dir);
 		IFDEBUG(CGDB_CRYPTO, hexprint(step 2: sink,
-		sink, sizeof(sink)));
+		sink, blocksize));
 
 		dst += secsize;
 		src += secsize;



CVS commit: src/external/mit/xorg/server/drivers/xf86-video-igs

2009-11-10 Thread Michael Lorenz
Module Name:src
Committed By:   macallan
Date:   Tue Nov 10 21:44:11 UTC 2009

Added Files:
src/external/mit/xorg/server/drivers/xf86-video-igs: Makefile

Log Message:
reachover for the igs driver


To generate a diff of this commit:
cvs rdiff -u -r0 -r1.1 \
src/external/mit/xorg/server/drivers/xf86-video-igs/Makefile

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Added files:

Index: src/external/mit/xorg/server/drivers/xf86-video-igs/Makefile
diff -u /dev/null src/external/mit/xorg/server/drivers/xf86-video-igs/Makefile:1.1
--- /dev/null	Tue Nov 10 21:44:11 2009
+++ src/external/mit/xorg/server/drivers/xf86-video-igs/Makefile	Tue Nov 10 21:44:11 2009
@@ -0,0 +1,11 @@
+#	$NetBSD: Makefile,v 1.1 2009/11/10 21:44:11 macallan Exp $
+
+DRIVER=		xf86-video-igs
+DRIVER_NAME=	igs_drv
+
+SRCS=		igs_driver.c igs_cursor.c igs_accel.c
+MAN=		igs.4
+
+CPPFLAGS+=	-DHAVE_CONFIG_H -I${X11SRCDIR.${DRIVER}}/../include
+
+.include ../Makefile.xf86-driver



CVS commit: src/sys/dev/ic

2009-11-10 Thread Michael Lorenz
Module Name:src
Committed By:   macallan
Date:   Tue Nov 10 22:23:23 UTC 2009

Modified Files:
src/sys/dev/ic: igsfb.c igsfbvar.h

Log Message:
add support for an optional machine-dependent mmap() method, so the bus
backend can do whatever voodoo necessary to the aperture, IO space etc.
Mainly for shark, to get around the weird ARM bus_space.


To generate a diff of this commit:
cvs rdiff -u -r1.44 -r1.45 src/sys/dev/ic/igsfb.c
cvs rdiff -u -r1.16 -r1.17 src/sys/dev/ic/igsfbvar.h

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/dev/ic/igsfb.c
diff -u src/sys/dev/ic/igsfb.c:1.44 src/sys/dev/ic/igsfb.c:1.45
--- src/sys/dev/ic/igsfb.c:1.44	Tue Apr  8 12:07:26 2008
+++ src/sys/dev/ic/igsfb.c	Tue Nov 10 22:23:22 2009
@@ -1,4 +1,4 @@
-/*	$NetBSD: igsfb.c,v 1.44 2008/04/08 12:07:26 cegger Exp $ */
+/*	$NetBSD: igsfb.c,v 1.45 2009/11/10 22:23:22 macallan Exp $ */
 
 /*
  * Copyright (c) 2002, 2003 Valeriy E. Ushakov
@@ -31,7 +31,7 @@
  * Integraphics Systems IGA 168x and CyberPro series.
  */
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: igsfb.c,v 1.44 2008/04/08 12:07:26 cegger Exp $);
+__KERNEL_RCSID(0, $NetBSD: igsfb.c,v 1.45 2009/11/10 22:23:22 macallan Exp $);
 
 #include sys/param.h
 #include sys/systm.h
@@ -53,7 +53,7 @@
 #include dev/ic/igsfbvar.h
 
 
-struct igsfb_devconfig igsfb_console_dc;
+struct igsfb_devconfig igsfb_console_dc = {.dc_mmap = NULL,};
 
 /*
  * wsscreen
@@ -577,11 +577,12 @@
 	struct vcons_data *vd = v;
 	struct igsfb_devconfig *dc = vd-cookie;
 
-	if (offset = dc-dc_memsz || offset  0)
-		return -1;
-
-	return bus_space_mmap(dc-dc_memt, dc-dc_memaddr, offset, prot,
-			  dc-dc_memflags | BUS_SPACE_MAP_LINEAR);
+	if (offset  dc-dc_memsz  offset = 0)
+		return bus_space_mmap(dc-dc_memt, dc-dc_memaddr, offset,
+		prot, dc-dc_memflags | BUS_SPACE_MAP_LINEAR);
+	if (dc-dc_mmap)
+		return dc-dc_mmap(v, vs, offset, prot);
+	return -1;
 }
 
 

Index: src/sys/dev/ic/igsfbvar.h
diff -u src/sys/dev/ic/igsfbvar.h:1.16 src/sys/dev/ic/igsfbvar.h:1.17
--- src/sys/dev/ic/igsfbvar.h:1.16	Wed Apr  5 01:13:50 2006
+++ src/sys/dev/ic/igsfbvar.h	Tue Nov 10 22:23:22 2009
@@ -1,4 +1,4 @@
-/*	$NetBSD: igsfbvar.h,v 1.16 2006/04/05 01:13:50 uwe Exp $ */
+/*	$NetBSD: igsfbvar.h,v 1.17 2009/11/10 22:23:22 macallan Exp $ */
 
 /*
  * Copyright (c) 2002, 2003 Valeriy E. Ushakov
@@ -105,6 +105,9 @@
 	/* saved dc_ri.ri_ops.putchar */
 	void (*dc_ri_putchar)(void *, int, int, u_int, long);
 
+	/* optional MD mmap() method */
+	paddr_t (*dc_mmap)(void *, void *, off_t, int);
+
 	struct igs_hwcmap dc_cmap;	/* software copy of colormap */
 	struct igs_hwcursor dc_cursor;	/* software copy of cursor sprite */
 



CVS commit: src/sys/arch/shark/ofw

2009-11-10 Thread Michael Lorenz
Module Name:src
Committed By:   macallan
Date:   Tue Nov 10 22:24:58 UTC 2009

Modified Files:
src/sys/arch/shark/ofw: igsfb_ofbus.c

Log Message:
add a mmap() method so the xf86-video-igs driver can map the aperture and
IO space in a sane way.


To generate a diff of this commit:
cvs rdiff -u -r1.8 -r1.9 src/sys/arch/shark/ofw/igsfb_ofbus.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/shark/ofw/igsfb_ofbus.c
diff -u src/sys/arch/shark/ofw/igsfb_ofbus.c:1.8 src/sys/arch/shark/ofw/igsfb_ofbus.c:1.9
--- src/sys/arch/shark/ofw/igsfb_ofbus.c:1.8	Thu May  8 02:10:52 2008
+++ src/sys/arch/shark/ofw/igsfb_ofbus.c	Tue Nov 10 22:24:57 2009
@@ -1,4 +1,4 @@
-/*	$NetBSD: igsfb_ofbus.c,v 1.8 2008/05/08 02:10:52 macallan Exp $ */
+/*	$NetBSD: igsfb_ofbus.c,v 1.9 2009/11/10 22:24:57 macallan Exp $ */
 
 /*
  * Copyright (c) 2006 Michael Lorenz
@@ -31,7 +31,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: igsfb_ofbus.c,v 1.8 2008/05/08 02:10:52 macallan Exp $);
+__KERNEL_RCSID(0, $NetBSD: igsfb_ofbus.c,v 1.9 2009/11/10 22:24:57 macallan Exp $);
 
 #include sys/param.h
 #include sys/systm.h
@@ -66,6 +66,7 @@
 static int	igsfb_ofbus_match(struct device *, struct cfdata *, void *);
 static void	igsfb_ofbus_attach(struct device *, struct device *, void *);
 static int	igsfb_setup_dc(struct igsfb_devconfig *);
+static paddr_t	igsfb_ofbus_mmap(void *, void *, off_t, int);
 
 CFATTACH_DECL(igsfb_ofbus, sizeof(struct igsfb_softc),
 igsfb_ofbus_match, igsfb_ofbus_attach, NULL, NULL);
@@ -74,6 +75,7 @@
 
 vaddr_t igsfb_mem_vaddr = 0, igsfb_mmio_vaddr = 0;
 paddr_t igsfb_mem_paddr;
+extern paddr_t isa_io_physaddr;
 struct bus_space igsfb_memt, igsfb_iot;
 
 #if (NIGSFB_OFBUS  0) || (NVGA_OFBUS  0)
@@ -106,8 +108,8 @@
 		return ENXIO;
 
 	igsfb_mem_paddr = be32toh(regs[13]);
-	/* 4MB VRAM */
-	igsfb_mem_vaddr = ofw_map(igsfb_mem_paddr, 0x0040, 0);
+	/* 4MB VRAM aperture, bufferable and cacheable */
+	igsfb_mem_vaddr = ofw_map(igsfb_mem_paddr, 0x0040, L2_B | L2_C);
 	/* MMIO registers */
 	igsfb_mmio_vaddr = ofw_map(igsfb_mem_paddr + IGS_MEM_MMIO_SELECT,
 	0x0010, 0);
@@ -163,7 +165,7 @@
 	dc-dc_iot = igsfb_iot;
 	dc-dc_iobase = 0;
 	dc-dc_ioflags = 0;
-
+	dc-dc_mmap = igsfb_ofbus_mmap;
 	if (bus_space_map(dc-dc_iot,
 			  dc-dc_iobase + IGS_REG_BASE, IGS_REG_SIZE,
 			  dc-dc_ioflags,
@@ -229,3 +231,28 @@
 
 	igsfb_attach_subr(sc, isconsole);
 }
+
+static paddr_t
+igsfb_ofbus_mmap(void *v, void *vs, off_t offset, int prot)
+{
+
+#ifdef PCI_MAGIC_IO_RANGE
+	/* access to IO ports */
+	if ((offset = PCI_MAGIC_IO_RANGE) 
+	(offset  (PCI_MAGIC_IO_RANGE + 0x1))) {
+		paddr_t pa;
+
+		pa = isa_io_physaddr + offset - PCI_MAGIC_IO_RANGE;
+		return arm_btop(pa);
+	}
+#endif
+	/*
+	 * we also need to allow mapping of the whole aperture, including MMIO 	
+	 * registers on CyberPro at its physical address
+	 */
+	if ((offset = igsfb_mem_paddr)  
+	(offset  (igsfb_mem_paddr + 0x0100)))
+		return arm_btop(offset);
+
+	return -1;
+}



CVS commit: src/external/mit/xorg/server/drivers

2009-11-10 Thread Michael Lorenz
Module Name:src
Committed By:   macallan
Date:   Tue Nov 10 23:14:04 UTC 2009

Modified Files:
src/external/mit/xorg/server/drivers: Makefile

Log Message:
build the igs driver on shark


To generate a diff of this commit:
cvs rdiff -u -r1.32 -r1.33 src/external/mit/xorg/server/drivers/Makefile

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/external/mit/xorg/server/drivers/Makefile
diff -u src/external/mit/xorg/server/drivers/Makefile:1.32 src/external/mit/xorg/server/drivers/Makefile:1.33
--- src/external/mit/xorg/server/drivers/Makefile:1.32	Sat Sep  5 22:35:53 2009
+++ src/external/mit/xorg/server/drivers/Makefile	Tue Nov 10 23:14:04 2009
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile,v 1.32 2009/09/05 22:35:53 macallan Exp $
+#	$NetBSD: Makefile,v 1.33 2009/11/10 23:14:04 macallan Exp $
 
 SUBDIR= \
 	xf86-input-keyboard \
@@ -50,7 +50,8 @@
 .elif ${MACHINE} == shark
 SUBDIR+= \
 	xf86-video-chips \
-	xf86-video-wsfb
+xf86-video-igs \
+xf86-video-wsfb
 .elif ${MACHINE} == sgimips
 SUBDIR+= \
 	xf86-video-crime \



CVS commit: src/distrib/sets/lists/xserver

2009-11-10 Thread Michael Lorenz
Module Name:src
Committed By:   macallan
Date:   Tue Nov 10 23:14:32 UTC 2009

Modified Files:
src/distrib/sets/lists/xserver: md.shark

Log Message:
add entries for the igs driver


To generate a diff of this commit:
cvs rdiff -u -r1.31 -r1.32 src/distrib/sets/lists/xserver/md.shark

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/distrib/sets/lists/xserver/md.shark
diff -u src/distrib/sets/lists/xserver/md.shark:1.31 src/distrib/sets/lists/xserver/md.shark:1.32
--- src/distrib/sets/lists/xserver/md.shark:1.31	Sun Aug 30 21:27:35 2009
+++ src/distrib/sets/lists/xserver/md.shark	Tue Nov 10 23:14:32 2009
@@ -1,4 +1,4 @@
-# $NetBSD: md.shark,v 1.31 2009/08/30 21:27:35 mrg Exp $
+# $NetBSD: md.shark,v 1.32 2009/11/10 23:14:32 macallan Exp $
 ./usr/X11R6/bin/X	-unknown-	x11
 ./usr/X11R6/bin/XFree86	-unknown-	x11
 ./usr/X11R6/bin/gtf	-unknown-	x11
@@ -252,6 +252,8 @@
 ./usr/X11R7/lib/X11/doc/README.rapidaccess		-unknown-	xorg
 ./usr/X11R7/lib/modules/drivers/chips_drv.so		-unknown-	xorg
 ./usr/X11R7/lib/modules/drivers/chips_drv.so.1		-unknown-	xorg
+./usr/X11R7/lib/modules/drivers/igs_drv.so		-unknown-	xorg
+./usr/X11R7/lib/modules/drivers/igs_drv.so.0		-unknown-	xorg
 ./usr/X11R7/lib/modules/drivers/kbd_drv.so		-unknown-	xorg
 ./usr/X11R7/lib/modules/drivers/kbd_drv.so.1		-unknown-	xorg
 ./usr/X11R7/lib/modules/drivers/mouse_drv.so		-unknown-	xorg
@@ -404,6 +406,7 @@
 ./usr/X11R7/man/cat1/xorgconfig.0			-unknown-	obsolete
 ./usr/X11R7/man/cat4/chips.0-unknown-	.cat,xorg
 ./usr/X11R7/man/cat4/exa.0-unknown-	.cat,xorg
+./usr/X11R7/man/cat4/igs.0-unknown-	.cat,xorg
 ./usr/X11R7/man/cat4/kbd.0-unknown-	.cat,xorg
 ./usr/X11R7/man/cat4/mousedrv.0-unknown-	.cat,xorg
 ./usr/X11R7/man/cat4/void.0-unknown-	.cat,xorg
@@ -415,6 +418,7 @@
 ./usr/X11R7/man/html1/xorgconfig.html			-unknown-	obsolete
 ./usr/X11R7/man/html4/chips.html			-unknown-	html,xorg
 ./usr/X11R7/man/html4/exa.html-unknown-	html,xorg
+./usr/X11R7/man/html4/igs.html-unknown-	html,xorg
 ./usr/X11R7/man/html4/kbd.html-unknown-	html,xorg
 ./usr/X11R7/man/html4/mousedrv.html			-unknown-	html,xorg
 ./usr/X11R7/man/html4/void.html-unknown-	html,xorg
@@ -426,6 +430,7 @@
 ./usr/X11R7/man/man1/xorgconfig.1			-unknown-	obsolete
 ./usr/X11R7/man/man4/chips.4-unknown-	.man,xorg
 ./usr/X11R7/man/man4/exa.4-unknown-	.man,xorg
+./usr/X11R7/man/man4/igs.4-unknown-	.man,xorg
 ./usr/X11R7/man/man4/kbd.4-unknown-	.man,xorg
 ./usr/X11R7/man/man4/mousedrv.4-unknown-	.man,xorg
 ./usr/X11R7/man/man4/void.4-unknown-	.man,xorg



CVS commit: src/doc

2009-11-10 Thread Michael Lorenz
Module Name:src
Committed By:   macallan
Date:   Tue Nov 10 23:16:20 UTC 2009

Modified Files:
src/doc: CHANGES

Log Message:
mention xf86-video-igs


To generate a diff of this commit:
cvs rdiff -u -r1.1315 -r1.1316 src/doc/CHANGES

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/doc/CHANGES
diff -u src/doc/CHANGES:1.1315 src/doc/CHANGES:1.1316
--- src/doc/CHANGES:1.1315	Thu Oct 29 03:38:11 2009
+++ src/doc/CHANGES	Tue Nov 10 23:16:20 2009
@@ -1,4 +1,4 @@
-# LIST OF CHANGES FROM LAST RELEASE:			$Revision: 1.1315 $
+# LIST OF CHANGES FROM LAST RELEASE:			$Revision: 1.1316 $
 #
 #
 # [Note: This file does not mention every change made to the NetBSD source tree.
@@ -434,3 +434,6 @@
 	yacc(1): Import byacc-20091028 [christos 20091028]
 	pm2fb: A driver for Permedia2-based graphics cards like Sun's PGX32
 		[macallan 20091028]
+	xf86-video-igs: an Xorg driver for IGS CyberPro 20x0 graphics
+		controllers, currently only for rev. 5 sharks
+		[macallan 20091110]



CVS commit: src/sys/arch/ia64/stand/ia64/ski

2009-11-10 Thread KIYOHARA Takashi
Module Name:src
Committed By:   kiyohara
Date:   Wed Nov 11 05:19:35 UTC 2009

Modified Files:
src/sys/arch/ia64/stand/ia64/ski: acpi_stub.c

Log Message:
Include dev/acpi/acpica.h instead of external/intel-public/acpica/ ... .
  Thanks cegger@


To generate a diff of this commit:
cvs rdiff -u -r1.5 -r1.6 src/sys/arch/ia64/stand/ia64/ski/acpi_stub.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/ia64/stand/ia64/ski/acpi_stub.c
diff -u src/sys/arch/ia64/stand/ia64/ski/acpi_stub.c:1.5 src/sys/arch/ia64/stand/ia64/ski/acpi_stub.c:1.6
--- src/sys/arch/ia64/stand/ia64/ski/acpi_stub.c:1.5	Tue Nov 10 11:14:48 2009
+++ src/sys/arch/ia64/stand/ia64/ski/acpi_stub.c	Wed Nov 11 05:19:34 2009
@@ -1,4 +1,4 @@
-/*	$NetBSD: acpi_stub.c,v 1.5 2009/11/10 11:14:48 kiyohara Exp $	*/
+/*	$NetBSD: acpi_stub.c,v 1.6 2009/11/11 05:19:34 kiyohara Exp $	*/
 
 /*-
  * Copyright (c) 2003 Marcel Moolenaar
@@ -34,7 +34,7 @@
 
 #include sys/types.h
 #include sys/lock.h
-#include external/intel-public/acpica/dist/include/acpi.h
+#include dev/acpi/acpica.h
 
 #define APIC_IO_SAPIC   6
 #define APIC_LOCAL_SAPIC7



CVS commit: src/sys

2009-11-10 Thread Mindaugas Rasiukevicius
Module Name:src
Committed By:   rmind
Date:   Wed Nov 11 07:22:34 UTC 2009

Modified Files:
src/sys/kern: vfs_bio.c
src/sys/sys: buf.h

Log Message:
G/C unused breada() and bdirty().


To generate a diff of this commit:
cvs rdiff -u -r1.219 -r1.220 src/sys/kern/vfs_bio.c
cvs rdiff -u -r1.113 -r1.114 src/sys/sys/buf.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/kern/vfs_bio.c
diff -u src/sys/kern/vfs_bio.c:1.219 src/sys/kern/vfs_bio.c:1.220
--- src/sys/kern/vfs_bio.c:1.219	Thu Nov  5 16:15:51 2009
+++ src/sys/kern/vfs_bio.c	Wed Nov 11 07:22:33 2009
@@ -1,4 +1,4 @@
-/*	$NetBSD: vfs_bio.c,v 1.219 2009/11/05 16:15:51 pooka Exp $	*/
+/*	$NetBSD: vfs_bio.c,v 1.220 2009/11/11 07:22:33 rmind Exp $	*/
 
 /*-
  * Copyright (c) 2007, 2008, 2009 The NetBSD Foundation, Inc.
@@ -107,7 +107,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: vfs_bio.c,v 1.219 2009/11/05 16:15:51 pooka Exp $);
+__KERNEL_RCSID(0, $NetBSD: vfs_bio.c,v 1.220 2009/11/11 07:22:33 rmind Exp $);
 
 #include fs_ffs.h
 #include opt_bufcache.h
@@ -762,20 +762,6 @@
 }
 
 /*
- * Read with single-block read-ahead.  Defined in Bach (p.55), but
- * implemented as a call to breadn().
- * XXX for compatibility with old file systems.
- */
-int
-breada(struct vnode *vp, daddr_t blkno, int size, daddr_t rablkno,
-int rabsize, kauth_cred_t cred, int flags, buf_t **bpp)
-{
-
-	return (breadn(vp, blkno, size, rablkno, rabsize, 1,
-	cred, flags, bpp));
-}
-
-/*
  * Block write.  Described in Bach (p.56)
  */
 int
@@ -957,28 +943,6 @@
 }
 
 /*
- * Same as first half of bdwrite, mark buffer dirty, but do not release it.
- * Call with the buffer interlock held.
- */
-void
-bdirty(buf_t *bp)
-{
-
-	KASSERT(mutex_owned(bufcache_lock));
-	KASSERT(bp-b_objlock == bp-b_vp-v_interlock);
-	KASSERT(mutex_owned(bp-b_objlock));
-	KASSERT(ISSET(bp-b_cflags, BC_BUSY));
-
-	CLR(bp-b_cflags, BC_AGE);
-
-	if (!ISSET(bp-b_oflags, BO_DELWRI)) {
-		SET(bp-b_oflags, BO_DELWRI);
-		curlwp-l_ru.ru_oublock++;
-		reassignbuf(bp, bp-b_vp);
-	}
-}
-
-/*
  * Release a buffer on to the free lists.
  * Described in Bach (p. 46).
  */

Index: src/sys/sys/buf.h
diff -u src/sys/sys/buf.h:1.113 src/sys/sys/buf.h:1.114
--- src/sys/sys/buf.h:1.113	Sun Aug 16 10:57:17 2009
+++ src/sys/sys/buf.h	Wed Nov 11 07:22:34 2009
@@ -1,4 +1,4 @@
-/* $NetBSD: buf.h,v 1.113 2009/08/16 10:57:17 yamt Exp $ */
+/* $NetBSD: buf.h,v 1.114 2009/11/11 07:22:34 rmind Exp $ */
 
 /*-
  * Copyright (c) 1999, 2000, 2007, 2008 The NetBSD Foundation, Inc.
@@ -225,7 +225,7 @@
 #define B_METAONLY	0x04	/* Return indirect block buffer. */
 #define B_CONTIG	0x08	/* Allocate file contiguously. */
 
-/* Flags to bread(), breadn() and breada(). */
+/* Flags to bread() and breadn(). */
 #define B_MODIFY	0x01	/* Hint: caller might modify buffer */
 
 #ifdef _KERNEL
@@ -259,18 +259,14 @@
 };
 
 extern struct bqueue bufqueues[BQUEUES];
-extern struct simplelock bqueue_slock;
 
 __BEGIN_DECLS
 int	allocbuf(buf_t *, int, int);
 void	bawrite(buf_t *);
-void	bdirty(buf_t *);
 void	bdwrite(buf_t *);
 void	biodone(buf_t *);
 int	biowait(buf_t *);
 int	bread(struct vnode *, daddr_t, int, struct kauth_cred *, int, buf_t **);
-int	breada(struct vnode *, daddr_t, int, daddr_t, int, struct kauth_cred *,
-	   int, buf_t **);
 int	breadn(struct vnode *, daddr_t, int, daddr_t *, int *, int,
 	   struct kauth_cred *, int, buf_t **);
 void	brelsel(buf_t *, int);