CVS commit: src/sys/dev/flash

2011-06-28 Thread Adam Hoka
Module Name:src
Committed By:   ahoka
Date:   Tue Jun 28 07:00:18 UTC 2011

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

Log Message:
use nosize


To generate a diff of this commit:
cvs rdiff -u -r1.5 -r1.6 src/sys/dev/flash/flash.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/flash/flash.c
diff -u src/sys/dev/flash/flash.c:1.5 src/sys/dev/flash/flash.c:1.6
--- src/sys/dev/flash/flash.c:1.5	Sun Jun 12 05:29:42 2011
+++ src/sys/dev/flash/flash.c	Tue Jun 28 07:00:17 2011
@@ -1,4 +1,4 @@
-/*	$NetBSD: flash.c,v 1.5 2011/06/12 05:29:42 matt Exp $	*/
+/*	$NetBSD: flash.c,v 1.6 2011/06/28 07:00:17 ahoka Exp $	*/
 
 /*-
  * Copyright (c) 2011 Department of Software Engineering,
@@ -37,7 +37,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: flash.c,v 1.5 2011/06/12 05:29:42 matt Exp $);
+__KERNEL_RCSID(0, $NetBSD: flash.c,v 1.6 2011/06/28 07:00:17 ahoka Exp $);
 
 #include sys/param.h
 #include sys/types.h
@@ -80,7 +80,6 @@
 dev_type_ioctl(flashioctl);
 dev_type_strategy(flashstrategy);
 dev_type_dump(flashdump);
-dev_type_size(flashsize);
 
 int flash_print(void *aux, const char *pnp);
 
@@ -107,7 +106,7 @@
 	.d_strategy = flashstrategy,
 	.d_ioctl = flashioctl,
 	.d_dump = flashdump,
-	.d_psize = flashsize,
+	.d_psize = nosize,
 	.d_flag = D_DISK | D_MPSAFE
 };
 
@@ -153,7 +152,7 @@
 	format_bytes(pbuf[1], sizeof(pbuf[1]), sc-flash_if-erasesize);
 
 	aprint_naive(\n);
-	
+
 	switch (sc-flash_if-type) {
 	case FLASH_TYPE_NOR:
 		aprint_normal(: %s NOR flash\n, pbuf[0]);
@@ -162,7 +161,7 @@
 	case FLASH_TYPE_NAND:
 		aprint_normal(: %s NAND flash\n, pbuf[0]);
 		break;
-		
+
 	default:
 		aprint_normal(: %s unknown flash\n, pbuf[0]);
 	}
@@ -186,7 +185,7 @@
 		partition size must be larger than 0\n);
 		return;
 	}
-	
+
 	switch (sc-flash_if-type) {
 	case FLASH_TYPE_NOR:
 		aprint_normal_dev(sc-sc_dev,
@@ -202,7 +201,7 @@
 		sc-flash_if-writesize);
 		break;
 	}
-	
+
 	if (!pmf_device_register1(sc-sc_dev, NULL, NULL, flash_shutdown))
 		aprint_error_dev(sc-sc_dev,
 		couldn't establish power handler\n);
@@ -217,7 +216,7 @@
 
 	/* freeing flash_if is our responsibility */
 	kmem_free(sc-flash_if, sizeof(*sc-flash_if));
-	
+
 	return 0;
 }
 
@@ -281,7 +280,7 @@
 
 	/* reset buffer length */
 //	sc-sc_cache-fc_len = 0;
-	
+
 	return 0;
 }
 
@@ -306,7 +305,7 @@
 		if (err)
 			return err;
 	}
-	
+
 	return 0;
 }
 
@@ -353,7 +352,7 @@
 
 	/* divider */
 	KASSERT(flash_if-writesize != 0);
-	
+
 	aprint_debug_dev(sc-sc_dev, flash_strategy()\n);
 
 	if (!(bp-b_flags  B_READ)  sc-sc_readonly) {
@@ -382,7 +381,7 @@
 
 	bp-b_resid = bp-b_bcount;
 	flash_if-submit(sc-sc_parent_dev, bp);
-	
+
 	return;
 done:
 	bp-b_resid = bp-b_bcount;
@@ -426,7 +425,7 @@
 		ei.ei_addr = ep-ep_addr;
 		ei.ei_len = ep-ep_len;
 		ei.ei_callback = NULL;
-		
+
 		err = flash_erase(sc-sc_dev, ei);
 		if (err) {
 			return err;
@@ -452,7 +451,7 @@
 
 		err = flash_block_markbad(sc-sc_dev, bbp-bbp_addr);
 
-		break;		
+		break;
 	case FLASH_DUMP:
 		dp = data;
 		offset = dp-dp_block * sc-flash_if-erasesize;
@@ -470,7 +469,7 @@
 		break;
 	case FLASH_GET_INFO:
 		ip = data;
-		
+
 		ip-ip_page_size = sc-flash_if-page_size;
 		ip-ip_erase_size = sc-flash_if-erasesize;
 		ip-ip_flash_type = sc-flash_if-type;
@@ -484,12 +483,6 @@
 }
 
 int
-flashsize(dev_t dev)
-{
-return -1;
-}
-
-int
 flashdump(dev_t dev, daddr_t blkno, void *va, size_t size)
 {
 return EACCES;
@@ -499,7 +492,7 @@
 flash_shutdown(device_t self, int how)
 {
 	struct flash_softc *sc = device_private(self);
-	
+
 	if ((how  RB_NOSYNC) == 0  !sc-sc_readonly)
 		flash_sync(self);
 
@@ -566,7 +559,7 @@
 	if (e.ei_addr + e.ei_len  sc-flash_if-partition.part_size +
 	sc-flash_if-partition.part_offset)
 		return EINVAL;
-	
+
 	return sc-flash_if-erase(device_parent(self), e);
 }
 
@@ -612,9 +605,9 @@
 
 	if (sc-sc_readonly)
 		return EACCES;
-	
+
 	offset += sc-flash_if-partition.part_offset;
-	
+
 	if (offset + sc-flash_if-erasesize =
 	sc-flash_if-partition.part_size +
 	sc-flash_if-partition.part_offset)
@@ -627,7 +620,7 @@
 flash_block_isbad(device_t self, flash_off_t offset, bool *bad)
 {
 	struct flash_softc *sc = device_private(self);
-	
+
 	offset += sc-flash_if-partition.part_offset;
 
 	if (offset + sc-flash_if-erasesize 
@@ -642,7 +635,7 @@
 flash_sync(device_t self)
 {
 	struct flash_softc *sc = device_private(self);
-	
+
 	if (sc-sc_readonly)
 		return EACCES;
 



CVS commit: src/sys/dev/nand

2011-06-28 Thread Adam Hoka
Module Name:src
Committed By:   ahoka
Date:   Tue Jun 28 07:16:11 UTC 2011

Modified Files:
src/sys/dev/nand: nand.c nand.h nand_micron.c

Log Message:
follow bus_space conventions in naming


To generate a diff of this commit:
cvs rdiff -u -r1.11 -r1.12 src/sys/dev/nand/nand.c
cvs rdiff -u -r1.9 -r1.10 src/sys/dev/nand/nand.h
cvs rdiff -u -r1.4 -r1.5 src/sys/dev/nand/nand_micron.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/nand/nand.c
diff -u src/sys/dev/nand/nand.c:1.11 src/sys/dev/nand/nand.c:1.12
--- src/sys/dev/nand/nand.c:1.11	Sun May  1 13:20:28 2011
+++ src/sys/dev/nand/nand.c	Tue Jun 28 07:16:11 2011
@@ -1,4 +1,4 @@
-/*	$NetBSD: nand.c,v 1.11 2011/05/01 13:20:28 rmind Exp $	*/
+/*	$NetBSD: nand.c,v 1.12 2011/06/28 07:16:11 ahoka Exp $	*/
 
 /*-
  * Copyright (c) 2010 Department of Software Engineering,
@@ -34,7 +34,7 @@
 /* Common driver for NAND chips implementing the ONFI 2.2 specification */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: nand.c,v 1.11 2011/05/01 13:20:28 rmind Exp $);
+__KERNEL_RCSID(0, $NetBSD: nand.c,v 1.12 2011/06/28 07:16:11 ahoka Exp $);
 
 #include locators.h
 
@@ -133,7 +133,7 @@
 		aprint_error(NAND chip is write protected!\n);
 		return;
 	}
-	
+
 	if (nand_scan_media(self, chip)) {
 		return;
 	}
@@ -289,14 +289,14 @@
 	interface-select = nand_default_select;
 	interface-command = NULL;
 	interface-address = NULL;
-	interface-read_buf_byte = NULL;
-	interface-read_buf_word = NULL;
-	interface-read_byte = NULL;
-	interface-read_word = NULL;
-	interface-write_buf_byte = NULL;
-	interface-write_buf_word = NULL;
-	interface-write_byte = NULL;
-	interface-write_word = NULL;
+	interface-read_buf_1 = NULL;
+	interface-read_buf_2 = NULL;
+	interface-read_1 = NULL;
+	interface-read_2 = NULL;
+	interface-write_buf_1 = NULL;
+	interface-write_buf_2 = NULL;
+	interface-write_1 = NULL;
+	interface-write_2 = NULL;
 	interface-busy = NULL;
 
 	/*-
@@ -366,10 +366,10 @@
 	nand_select(self, true);
 	nand_command(self, ONFI_READ_ID);
 	nand_address(self, 0x20);
-	nand_read_byte(self, onfi_signature[0]);
-	nand_read_byte(self, onfi_signature[1]);
-	nand_read_byte(self, onfi_signature[2]);
-	nand_read_byte(self, onfi_signature[3]);
+	nand_read_1(self, onfi_signature[0]);
+	nand_read_1(self, onfi_signature[1]);
+	nand_read_1(self, onfi_signature[2]);
+	nand_read_1(self, onfi_signature[3]);
 	nand_select(self, false);
 
 	if (onfi_signature[0] != 'O' || onfi_signature[1] != 'N' ||
@@ -423,7 +423,7 @@
 	PRIu8 \n,
 	chip-nc_addr_cycles_column, chip-nc_addr_cycles_row);
 #endif
-		
+
 	ecc = chip-nc_ecc = sc-nand_if-ecc;
 
 	/*
@@ -488,8 +488,8 @@
 	nand_command(self, ONFI_READ_ID);
 	nand_address(self, 0x00);
 
-	nand_read_byte(self, manf);
-	nand_read_byte(self, dev);
+	nand_read_1(self, manf);
+	nand_read_1(self, dev);
 
 	nand_select(self, false);
 }
@@ -505,7 +505,7 @@
 
 //read_params:
 //	tries++;
-	
+
 	nand_select(self, true);
 	nand_command(self, ONFI_READ_PARAMETER_PAGE);
 	nand_address(self, 0x00);
@@ -517,10 +517,10 @@
 	bufp = (uint8_t *)params;
 	/* XXX why i am not using read_buf? */
 	for (i = 0; i  256; i++) {
-		nand_read_byte(self, bufp[i]);
+		nand_read_1(self, bufp[i]);
 	}
 	nand_select(self, false);
-	
+
 	/* validate the parameter page with the crc */
 	crc = nand_crc16(bufp, 254);
 
@@ -639,7 +639,7 @@
 
 	nand_command(self, ONFI_READ_STATUS);
 	nand_busy(self);
-	nand_read_byte(self, status);
+	nand_read_1(self, status);
 
 	return status;
 }
@@ -682,14 +682,14 @@
 	if (chip-nc_flags  NC_BUSWIDTH_16) {
 		for (b = 0, e = 0; b  chip-nc_page_size; b += bs, e += cs) {
 			nand_ecc_prepare(self, NAND_ECC_READ);
-			nand_read_buf_word(self, data + b, bs);
+			nand_read_buf_2(self, data + b, bs);
 			nand_ecc_compute(self, data + b,
 			chip-nc_ecc_cache + e);
 		}
 	} else {
 		for (b = 0, e = 0; b  chip-nc_page_size; b += bs, e += cs) {
 			nand_ecc_prepare(self, NAND_ECC_READ);
-			nand_read_buf_byte(self, data + b, bs);
+			nand_read_buf_1(self, data + b, bs);
 			nand_ecc_compute(self, data + b,
 			chip-nc_ecc_cache + e);
 		}
@@ -775,20 +775,20 @@
 	if (chip-nc_flags  NC_BUSWIDTH_16) {
 		for (b = 0, e = 0; b  chip-nc_page_size; b += bs, e += cs) {
 			nand_ecc_prepare(self, NAND_ECC_WRITE);
-			nand_write_buf_word(self, data + b, bs);
+			nand_write_buf_2(self, data + b, bs);
 			nand_ecc_compute(self, data + b, ecc + e);
 		}
 		/* write oob with ecc correction code */
-		nand_write_buf_word(self, chip-nc_oob_cache,
+		nand_write_buf_2(self, chip-nc_oob_cache,
 		chip-nc_spare_size);
 	} else {
 		for (b = 0, e = 0; b  chip-nc_page_size; b += bs, e += cs) {
 			nand_ecc_prepare(self, NAND_ECC_WRITE);
-			nand_write_buf_byte(self, data + b, bs);
+			nand_write_buf_1(self, data + b, bs);
 			nand_ecc_compute(self, data + b, ecc + e);
 		}
 		/* write oob with ecc correction code */
-		nand_write_buf_byte(self, 

CVS commit: src/sys/arch/arm/omap

2011-06-28 Thread Adam Hoka
Module Name:src
Committed By:   ahoka
Date:   Tue Jun 28 07:16:53 UTC 2011

Modified Files:
src/sys/arch/arm/omap: omap2_nand.c

Log Message:
follow nand api changes


To generate a diff of this commit:
cvs rdiff -u -r1.2 -r1.3 src/sys/arch/arm/omap/omap2_nand.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/arm/omap/omap2_nand.c
diff -u src/sys/arch/arm/omap/omap2_nand.c:1.2 src/sys/arch/arm/omap/omap2_nand.c:1.3
--- src/sys/arch/arm/omap/omap2_nand.c:1.2	Sun Mar 27 13:35:39 2011
+++ src/sys/arch/arm/omap/omap2_nand.c	Tue Jun 28 07:16:53 2011
@@ -1,4 +1,4 @@
-/*	$NetBSD: omap2_nand.c,v 1.2 2011/03/27 13:35:39 ahoka Exp $	*/
+/*	$NetBSD: omap2_nand.c,v 1.3 2011/06/28 07:16:53 ahoka Exp $	*/
 
 /*-
  * Copyright (c) 2010 Department of Software Engineering,
@@ -36,7 +36,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: omap2_nand.c,v 1.2 2011/03/27 13:35:39 ahoka Exp $);
+__KERNEL_RCSID(0, $NetBSD: omap2_nand.c,v 1.3 2011/06/28 07:16:53 ahoka Exp $);
 
 #include opt_omap.h
 #include opt_flash.h
@@ -88,15 +88,15 @@
 void omap2_nand_command(device_t self, uint8_t command);
 void omap2_nand_address(device_t self, uint8_t address);
 void omap2_nand_busy(device_t self);
-void omap2_nand_read_byte(device_t self, uint8_t *data);
-void omap2_nand_write_byte(device_t self, uint8_t data);
-void omap2_nand_read_word(device_t self, uint16_t *data);
-void omap2_nand_write_word(device_t self, uint16_t data);
+void omap2_nand_read_1(device_t self, uint8_t *data);
+void omap2_nand_write_1(device_t self, uint8_t data);
+void omap2_nand_read_2(device_t self, uint16_t *data);
+void omap2_nand_write_2(device_t self, uint16_t data);
 bool omap2_nand_isbusy(device_t self);
-void omap2_nand_read_buf_byte(device_t self, void *buf, size_t len);
-void omap2_nand_read_buf_word(device_t self, void *buf, size_t len);
-void omap2_nand_write_buf_byte(device_t self, const void *buf, size_t len);
-void omap2_nand_write_buf_word(device_t self, const void *buf, size_t len);
+void omap2_nand_read_buf_1(device_t self, void *buf, size_t len);
+void omap2_nand_read_buf_2(device_t self, void *buf, size_t len);
+void omap2_nand_write_buf_1(device_t self, const void *buf, size_t len);
+void omap2_nand_write_buf_2(device_t self, const void *buf, size_t len);
 
 int omap2_nand_ecc_init(device_t self);
 int omap2_nand_ecc_prepare(device_t self, int mode);
@@ -146,14 +146,14 @@
 {
 	struct omap2_nand_softc *sc = device_private(self);
 	uint8_t status;
-	
+
 	DELAY(1);		/* just to be sure we are not early */
-	
+
 	bus_space_write_1(sc-sc_iot, sc-sc_ioh,
 	sc-sc_cmd_reg, ONFI_READ_STATUS);
-	
+
 	DELAY(1);
-		
+
 	status = bus_space_read_1(sc-sc_iot,
 	sc-sc_ioh, sc-sc_data_reg);
 
@@ -169,7 +169,7 @@
 	bus_size_t cs_offset;
 	uint32_t result;
 	int ret = 0;
-	
+
 	iot = gpmc-gpmc_iot;
 
 	cs_offset = GPMC_CS_CONFIG_BASE(gpmc-gpmc_cs);
@@ -253,14 +253,14 @@
 
 	sc-sc_nand_if.command = omap2_nand_command;
 	sc-sc_nand_if.address = omap2_nand_address;
-	sc-sc_nand_if.read_buf_byte = omap2_nand_read_buf_byte;
-	sc-sc_nand_if.read_buf_word = omap2_nand_read_buf_word;
-	sc-sc_nand_if.read_byte = omap2_nand_read_byte;
-	sc-sc_nand_if.read_word = omap2_nand_read_word;
-	sc-sc_nand_if.write_buf_byte = omap2_nand_write_buf_byte;
-	sc-sc_nand_if.write_buf_word = omap2_nand_write_buf_word;
-	sc-sc_nand_if.write_byte = omap2_nand_write_byte;
-	sc-sc_nand_if.write_word = omap2_nand_write_word;
+	sc-sc_nand_if.read_buf_1 = omap2_nand_read_buf_1;
+	sc-sc_nand_if.read_buf_2 = omap2_nand_read_buf_2;
+	sc-sc_nand_if.read_1 = omap2_nand_read_1;
+	sc-sc_nand_if.read_2 = omap2_nand_read_2;
+	sc-sc_nand_if.write_buf_1 = omap2_nand_write_buf_1;
+	sc-sc_nand_if.write_buf_2 = omap2_nand_write_buf_2;
+	sc-sc_nand_if.write_1 = omap2_nand_write_1;
+	sc-sc_nand_if.write_2 = omap2_nand_write_2;
 	sc-sc_nand_if.busy = omap2_nand_busy;
 
 #ifdef OMAP2_NAND_HARDWARE_ECC
@@ -310,83 +310,83 @@
 }
 
 void
-omap2_nand_read_byte(device_t self, uint8_t *data)
-{	
+omap2_nand_read_1(device_t self, uint8_t *data)
+{
 	struct omap2_nand_softc *sc = device_private(self);
-	
+
 	*data = bus_space_read_1(sc-sc_iot, sc-sc_ioh, sc-sc_data_reg);
 }
 
 void
-omap2_nand_write_byte(device_t self, uint8_t data)
-{	
+omap2_nand_write_1(device_t self, uint8_t data)
+{
 	struct omap2_nand_softc *sc = device_private(self);
-	
+
 	bus_space_write_1(sc-sc_iot, sc-sc_ioh, sc-sc_data_reg, data);
 }
 
 void
-omap2_nand_read_word(device_t self, uint16_t *data)
+omap2_nand_read_2(device_t self, uint16_t *data)
 {
 	struct omap2_nand_softc *sc = device_private(self);
-	
+
 	*data = bus_space_read_2(sc-sc_iot, sc-sc_ioh, sc-sc_data_reg);
 }
 
 void
-omap2_nand_write_word(device_t self, uint16_t data)
+omap2_nand_write_2(device_t self, uint16_t data)
 {
 	struct omap2_nand_softc *sc = device_private(self);
-	
+
 	bus_space_write_2(sc-sc_iot, sc-sc_ioh, sc-sc_data_reg, data);
 }

CVS commit: src/sys/arch/mips/rmi

2011-06-28 Thread Adam Hoka
Module Name:src
Committed By:   ahoka
Date:   Tue Jun 28 07:17:31 UTC 2011

Modified Files:
src/sys/arch/mips/rmi: rmixl_nand.c

Log Message:
follow nand api changes


To generate a diff of this commit:
cvs rdiff -u -r1.5 -r1.6 src/sys/arch/mips/rmi/rmixl_nand.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/mips/rmi/rmixl_nand.c
diff -u src/sys/arch/mips/rmi/rmixl_nand.c:1.5 src/sys/arch/mips/rmi/rmixl_nand.c:1.6
--- src/sys/arch/mips/rmi/rmixl_nand.c:1.5	Sun Mar 27 13:36:50 2011
+++ src/sys/arch/mips/rmi/rmixl_nand.c	Tue Jun 28 07:17:31 2011
@@ -1,4 +1,4 @@
-/*	$NetBSD: rmixl_nand.c,v 1.5 2011/03/27 13:36:50 ahoka Exp $	*/
+/*	$NetBSD: rmixl_nand.c,v 1.6 2011/06/28 07:17:31 ahoka Exp $	*/
 
 /*-
  * Copyright (c) 2010 Department of Software Engineering,
@@ -36,7 +36,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: rmixl_nand.c,v 1.5 2011/03/27 13:36:50 ahoka Exp $);
+__KERNEL_RCSID(0, $NetBSD: rmixl_nand.c,v 1.6 2011/06/28 07:17:31 ahoka Exp $);
 
 #include opt_flash.h
 
@@ -63,10 +63,10 @@
 static void rmixl_nand_command(device_t, uint8_t);
 static void rmixl_nand_address(device_t, uint8_t);
 static void rmixl_nand_busy(device_t);
-static void rmixl_nand_read_byte(device_t, uint8_t *);
-static void rmixl_nand_write_byte(device_t, uint8_t);
-static void rmixl_nand_read_word(device_t, uint16_t *);
-static void rmixl_nand_write_word(device_t, uint16_t);
+static void rmixl_nand_read_1(device_t, uint8_t *);
+static void rmixl_nand_write_1(device_t, uint8_t);
+static void rmixl_nand_read_2(device_t, uint16_t *);
+static void rmixl_nand_write_2(device_t, uint16_t);
 static void rmixl_nand_read_buf(device_t, void *, size_t);
 static void rmixl_nand_write_buf(device_t, const void *, size_t);
 
@@ -206,14 +206,14 @@
 
 	sc-sc_nand_if.command = rmixl_nand_command;
 	sc-sc_nand_if.address = rmixl_nand_address;
-	sc-sc_nand_if.read_buf_byte = rmixl_nand_read_buf;
-	sc-sc_nand_if.read_buf_word = rmixl_nand_read_buf;
-	sc-sc_nand_if.read_byte = rmixl_nand_read_byte;
-	sc-sc_nand_if.read_word = rmixl_nand_read_word;
-	sc-sc_nand_if.write_buf_byte = rmixl_nand_write_buf;
-	sc-sc_nand_if.write_buf_word = rmixl_nand_write_buf;
-	sc-sc_nand_if.write_byte = rmixl_nand_write_byte;
-	sc-sc_nand_if.write_word = rmixl_nand_write_word;
+	sc-sc_nand_if.read_buf_1 = rmixl_nand_read_buf;
+	sc-sc_nand_if.read_buf_2 = rmixl_nand_read_buf;
+	sc-sc_nand_if.read_1 = rmixl_nand_read_1;
+	sc-sc_nand_if.read_2 = rmixl_nand_read_2;
+	sc-sc_nand_if.write_buf_1 = rmixl_nand_write_buf;
+	sc-sc_nand_if.write_buf_2 = rmixl_nand_write_buf;
+	sc-sc_nand_if.write_1 = rmixl_nand_write_1;
+	sc-sc_nand_if.write_2 = rmixl_nand_write_2;
 	sc-sc_nand_if.busy = rmixl_nand_busy;
 
 	sc-sc_nand_if.ecc.necc_code_size = 3;
@@ -287,31 +287,31 @@
 }
 
 static void
-rmixl_nand_read_byte(device_t self, uint8_t *data)
-{	
+rmixl_nand_read_1(device_t self, uint8_t *data)
+{
 	struct rmixl_nand_softc *sc = device_private(self);
-	
+
 	*data = bus_space_read_1(sc-sc_iobus_bst, sc-sc_iobus_bsh, 0);
 }
 
 static void
-rmixl_nand_write_byte(device_t self, uint8_t data)
-{	
+rmixl_nand_write_1(device_t self, uint8_t data)
+{
 	struct rmixl_nand_softc *sc = device_private(self);
-	
+
 	bus_space_write_1(sc-sc_iobus_bst, sc-sc_iobus_bsh, 0, data);
 }
 
 static void
-rmixl_nand_read_word(device_t self, uint16_t *data)
+rmixl_nand_read_2(device_t self, uint16_t *data)
 {
 	struct rmixl_nand_softc *sc = device_private(self);
-	
+
 	*data = bus_space_read_2(sc-sc_iobus_bst, sc-sc_iobus_bsh, 0);
 }
 
 static void
-rmixl_nand_write_word(device_t self, uint16_t data)
+rmixl_nand_write_2(device_t self, uint16_t data)
 {
 	struct rmixl_nand_softc *sc = device_private(self);
 



CVS commit: src/usr.bin/extattr

2011-06-28 Thread Emmanuel Dreyfus
Module Name:src
Committed By:   manu
Date:   Tue Jun 28 07:24:15 UTC 2011

Modified Files:
src/usr.bin/extattr: getextattr.c

Log Message:
Fix previous broken commit for extended attribute listing.


To generate a diff of this commit:
cvs rdiff -u -r1.5 -r1.6 src/usr.bin/extattr/getextattr.c

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

Modified files:

Index: src/usr.bin/extattr/getextattr.c
diff -u src/usr.bin/extattr/getextattr.c:1.5 src/usr.bin/extattr/getextattr.c:1.6
--- src/usr.bin/extattr/getextattr.c:1.5	Mon Jun 27 16:34:48 2011
+++ src/usr.bin/extattr/getextattr.c	Tue Jun 28 07:24:14 2011
@@ -1,4 +1,4 @@
-/*	$NetBSD: getextattr.c,v 1.5 2011/06/27 16:34:48 manu Exp $	*/
+/*	$NetBSD: getextattr.c,v 1.6 2011/06/28 07:24:14 manu Exp $	*/
 
 /*-
  * Copyright (c) 2002, 2003 Networks Associates Technology, Inc.
@@ -237,8 +237,8 @@
 break;
 			if (!flag_quiet)
 printf(%s\t, argv[arg_counter]);
-			for (i = 0; i  error; i += buf[i] + 1)
-			printf(%s%s, i ? \t : , buf + i + 1);
+			for (i = 0; i  error; i += strlen(buf + i) + 1)
+			printf(%s%s, i ? \t : , buf + i);
 			printf(\n);
 			continue;
 		case EAGET:



CVS commit: src/sys/kern

2011-06-28 Thread Emmanuel Dreyfus
Module Name:src
Committed By:   manu
Date:   Tue Jun 28 07:50:03 UTC 2011

Modified Files:
src/sys/kern: vfs_xattr.c

Log Message:
Improve a bit listxattr(2). It attemps to list both system and user
extended attributes, and it faled if calling user did not have privilege
for reading system EA. Now we just lise user EA and skip system EA in
reading them is not allowed.


To generate a diff of this commit:
cvs rdiff -u -r1.24 -r1.25 src/sys/kern/vfs_xattr.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/kern/vfs_xattr.c
diff -u src/sys/kern/vfs_xattr.c:1.24 src/sys/kern/vfs_xattr.c:1.25
--- src/sys/kern/vfs_xattr.c:1.24	Mon Jun 27 16:39:43 2011
+++ src/sys/kern/vfs_xattr.c	Tue Jun 28 07:50:03 2011
@@ -1,4 +1,4 @@
-/*	$NetBSD: vfs_xattr.c,v 1.24 2011/06/27 16:39:43 manu Exp $	*/
+/*	$NetBSD: vfs_xattr.c,v 1.25 2011/06/28 07:50:03 manu Exp $	*/
 
 /*-
  * Copyright (c) 2005, 2008 The NetBSD Foundation, Inc.
@@ -68,7 +68,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: vfs_xattr.c,v 1.24 2011/06/27 16:39:43 manu Exp $);
+__KERNEL_RCSID(0, $NetBSD: vfs_xattr.c,v 1.25 2011/06/28 07:50:03 manu Exp $);
 
 #include sys/param.h
 #include sys/systm.h
@@ -1021,8 +1021,17 @@
 
 	error = extattr_list_vp(vp, EXTATTR_NAMESPACE_SYSTEM,
 	list, size, l, listsize_sys);
-	if (error)
+	switch (error) {
+	case EPERM:
+		error = 0; /* Ignore and just skip system EA */
+		listsize_sys = 0;
+		break;
+	case 0:
+		break;
+	default: 
 		goto out;
+		break;
+	}
 
 	*retval = listsize_usr + listsize_sys; 	
 
@@ -1065,8 +1074,17 @@
 
 	error = extattr_list_vp(vp, EXTATTR_NAMESPACE_SYSTEM,
 	list, size, l, listsize_sys);
-	if (error)
+	switch (error) {
+	case EPERM:
+		error = 0; /* Ignore and just skip system EA */
+		listsize_sys = 0;
+		break;
+	case 0:
+		break;
+	default: 
 		goto out;
+		break;
+	}
 
 	*retval = listsize_usr + listsize_sys; 	
 out:
@@ -1109,8 +1127,17 @@
 
 	error = extattr_list_vp(vp, EXTATTR_NAMESPACE_SYSTEM,
 	list, size, l, listsize_sys);
-	if (error)
+	switch (error) {
+	case EPERM:
+		error = 0; /* Ignore and just skip system EA */
+		listsize_sys = 0;
+		break;
+	case 0:
+		break;
+	default: 
 		goto out;
+		break;
+	}
 
 	*retval = listsize_usr + listsize_sys; 	
 out:



CVS commit: src/external/gpl3/gcc/dist/gcc

2011-06-28 Thread matthew green
Module Name:src
Committed By:   mrg
Date:   Tue Jun 28 07:52:40 UTC 2011

Modified Files:
src/external/gpl3/gcc/dist/gcc: gcc.c

Log Message:
fix a merge error only seen with NETBSD_NATIVE defined.


To generate a diff of this commit:
cvs rdiff -u -r1.3 -r1.4 src/external/gpl3/gcc/dist/gcc/gcc.c

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

Modified files:

Index: src/external/gpl3/gcc/dist/gcc/gcc.c
diff -u src/external/gpl3/gcc/dist/gcc/gcc.c:1.3 src/external/gpl3/gcc/dist/gcc/gcc.c:1.4
--- src/external/gpl3/gcc/dist/gcc/gcc.c:1.3	Wed Jun 22 05:15:15 2011
+++ src/external/gpl3/gcc/dist/gcc/gcc.c	Tue Jun 28 07:52:40 2011
@@ -3665,8 +3665,8 @@
 	 standard_libexec_prefix);
   if (gcc_exec_prefix)
 	xputenv (concat (GCC_EXEC_PREFIX=, gcc_exec_prefix, NULL));
-}
 #endif
+}
   else
 {
   /* make_relative_prefix requires a program name, but



CVS commit: src/sys/external/bsd/acpica/dist

2011-06-28 Thread Jukka Ruohonen
Module Name:src
Committed By:   jruoho
Date:   Tue Jun 28 09:02:48 UTC 2011

Update of /cvsroot/src/sys/external/bsd/acpica/dist
In directory ivanova.netbsd.org:/tmp/cvs-serv11816

Log Message:
Import ACPICA 20110623.

Selected changes since 20110211 include, among other things, fixes to _PRW
parsing, fix to a regression with the Load() operator, improvements in NULL
package element removal, support for spurious global lock interrupts,
execution of orphaned _REG methods under acpiec(4), and smaller iasl(8)
improvements.


Status:

Vendor Tag: intel
Release Tags:   acpica-20110623

U src/sys/external/bsd/acpica/dist/changes.txt
U src/sys/external/bsd/acpica/dist/README
U src/sys/external/bsd/acpica/dist/common/adisasm.c
U src/sys/external/bsd/acpica/dist/common/adfile.c
U src/sys/external/bsd/acpica/dist/common/dmextern.c
U src/sys/external/bsd/acpica/dist/common/adwalk.c
U src/sys/external/bsd/acpica/dist/common/dmrestag.c
U src/sys/external/bsd/acpica/dist/common/dmtable.c
U src/sys/external/bsd/acpica/dist/common/dmtbdump.c
C src/sys/external/bsd/acpica/dist/common/dmtbinfo.c
U src/sys/external/bsd/acpica/dist/common/getopt.c
U src/sys/external/bsd/acpica/dist/compiler/aslcompiler.h
U src/sys/external/bsd/acpica/dist/compiler/aslanalyze.c
U src/sys/external/bsd/acpica/dist/compiler/aslbtypes.c
U src/sys/external/bsd/acpica/dist/compiler/aslcodegen.c
U src/sys/external/bsd/acpica/dist/compiler/aslcompile.c
U src/sys/external/bsd/acpica/dist/compiler/aslcompiler.l
U src/sys/external/bsd/acpica/dist/compiler/aslcompiler.y
U src/sys/external/bsd/acpica/dist/compiler/asldefine.h
U src/sys/external/bsd/acpica/dist/compiler/aslerror.c
U src/sys/external/bsd/acpica/dist/compiler/aslfiles.c
U src/sys/external/bsd/acpica/dist/compiler/aslfold.c
U src/sys/external/bsd/acpica/dist/compiler/aslglobal.h
U src/sys/external/bsd/acpica/dist/compiler/asllength.c
U src/sys/external/bsd/acpica/dist/compiler/asllisting.c
U src/sys/external/bsd/acpica/dist/compiler/aslload.c
U src/sys/external/bsd/acpica/dist/compiler/asllookup.c
U src/sys/external/bsd/acpica/dist/compiler/aslmain.c
U src/sys/external/bsd/acpica/dist/compiler/aslmap.c
U src/sys/external/bsd/acpica/dist/compiler/aslmessages.h
U src/sys/external/bsd/acpica/dist/compiler/aslopcodes.c
U src/sys/external/bsd/acpica/dist/compiler/dtio.c
U src/sys/external/bsd/acpica/dist/compiler/asloperands.c
U src/sys/external/bsd/acpica/dist/compiler/aslopt.c
U src/sys/external/bsd/acpica/dist/compiler/aslpredef.c
U src/sys/external/bsd/acpica/dist/compiler/aslresource.c
U src/sys/external/bsd/acpica/dist/compiler/aslrestype1.c
U src/sys/external/bsd/acpica/dist/compiler/aslrestype1i.c
U src/sys/external/bsd/acpica/dist/compiler/aslrestype2.c
U src/sys/external/bsd/acpica/dist/compiler/aslrestype2d.c
U src/sys/external/bsd/acpica/dist/compiler/aslrestype2e.c
U src/sys/external/bsd/acpica/dist/compiler/aslrestype2q.c
U src/sys/external/bsd/acpica/dist/compiler/aslrestype2w.c
U src/sys/external/bsd/acpica/dist/compiler/aslstartup.c
U src/sys/external/bsd/acpica/dist/compiler/aslstubs.c
U src/sys/external/bsd/acpica/dist/compiler/asltransform.c
U src/sys/external/bsd/acpica/dist/compiler/asltree.c
U src/sys/external/bsd/acpica/dist/compiler/asltypes.h
C src/sys/external/bsd/acpica/dist/compiler/aslutils.c
U src/sys/external/bsd/acpica/dist/compiler/asluuid.c
U src/sys/external/bsd/acpica/dist/compiler/aslwalks.c
U src/sys/external/bsd/acpica/dist/compiler/dtcompile.c
U src/sys/external/bsd/acpica/dist/compiler/dtcompiler.h
U src/sys/external/bsd/acpica/dist/compiler/dtexpress.c
U src/sys/external/bsd/acpica/dist/compiler/dtfield.c
N src/sys/external/bsd/acpica/dist/compiler/dtparser.l
N src/sys/external/bsd/acpica/dist/compiler/dtparser.y
U src/sys/external/bsd/acpica/dist/compiler/dtsubtable.c
U src/sys/external/bsd/acpica/dist/compiler/dttable.c
U src/sys/external/bsd/acpica/dist/compiler/dttemplate.c
U src/sys/external/bsd/acpica/dist/compiler/dttemplate.h
U src/sys/external/bsd/acpica/dist/compiler/dtutils.c
U src/sys/external/bsd/acpica/dist/compiler/Makefile
U src/sys/external/bsd/acpica/dist/compiler/readme.txt
C src/sys/external/bsd/acpica/dist/debugger/dbdisply.c
U src/sys/external/bsd/acpica/dist/debugger/dbcmds.c
U src/sys/external/bsd/acpica/dist/debugger/dbfileio.c
C src/sys/external/bsd/acpica/dist/debugger/dbexec.c
U src/sys/external/bsd/acpica/dist/debugger/dbhistry.c
C src/sys/external/bsd/acpica/dist/debugger/dbinput.c
U src/sys/external/bsd/acpica/dist/debugger/dbmethod.c
U src/sys/external/bsd/acpica/dist/debugger/dbnames.c
U src/sys/external/bsd/acpica/dist/debugger/dbstats.c
C src/sys/external/bsd/acpica/dist/debugger/dbutils.c
U src/sys/external/bsd/acpica/dist/debugger/dbxface.c
U src/sys/external/bsd/acpica/dist/disassembler/dmbuffer.c
U src/sys/external/bsd/acpica/dist/disassembler/dmnames.c
U src/sys/external/bsd/acpica/dist/disassembler/dmobject.c
U src/sys/external/bsd/acpica/dist/disassembler/dmopcode.c
U 

CVS commit: src/sys/external/bsd/acpica/dist

2011-06-28 Thread Jukka Ruohonen
Module Name:src
Committed By:   jruoho
Date:   Tue Jun 28 09:04:30 UTC 2011

Modified Files:
src/sys/external/bsd/acpica/dist/common: dmtbinfo.c
src/sys/external/bsd/acpica/dist/compiler: aslutils.c
src/sys/external/bsd/acpica/dist/debugger: dbdisply.c dbexec.c
dbinput.c dbutils.c
src/sys/external/bsd/acpica/dist/events: evrgnini.c
src/sys/external/bsd/acpica/dist/include: acdebug.h acdisasm.h
acglobal.h aclocal.h acpiosxf.h acpixf.h actypes.h
src/sys/external/bsd/acpica/dist/namespace: nsrepair2.c
src/sys/external/bsd/acpica/dist/utilities: utdecode.c
Removed Files:
src/sys/external/bsd/acpica/dist: osunixxf.c
src/sys/external/bsd/acpica/dist/tools/acpiexec: osunixdir.c
src/sys/external/bsd/acpica/dist/tools/acpisrc: osunixdir.c

Log Message:
Merge ACPICA 20110623.


To generate a diff of this commit:
cvs rdiff -u -r1.3 -r0 src/sys/external/bsd/acpica/dist/osunixxf.c
cvs rdiff -u -r1.3 -r1.4 src/sys/external/bsd/acpica/dist/common/dmtbinfo.c
cvs rdiff -u -r1.3 -r1.4 src/sys/external/bsd/acpica/dist/compiler/aslutils.c
cvs rdiff -u -r1.4 -r1.5 src/sys/external/bsd/acpica/dist/debugger/dbdisply.c
cvs rdiff -u -r1.3 -r1.4 src/sys/external/bsd/acpica/dist/debugger/dbexec.c \
src/sys/external/bsd/acpica/dist/debugger/dbinput.c \
src/sys/external/bsd/acpica/dist/debugger/dbutils.c
cvs rdiff -u -r1.3 -r1.4 src/sys/external/bsd/acpica/dist/events/evrgnini.c
cvs rdiff -u -r1.3 -r1.4 src/sys/external/bsd/acpica/dist/include/acdebug.h \
src/sys/external/bsd/acpica/dist/include/acdisasm.h \
src/sys/external/bsd/acpica/dist/include/acglobal.h \
src/sys/external/bsd/acpica/dist/include/aclocal.h \
src/sys/external/bsd/acpica/dist/include/acpiosxf.h \
src/sys/external/bsd/acpica/dist/include/acpixf.h \
src/sys/external/bsd/acpica/dist/include/actypes.h
cvs rdiff -u -r1.3 -r1.4 \
src/sys/external/bsd/acpica/dist/namespace/nsrepair2.c
cvs rdiff -u -r1.1.1.2 -r0 \
src/sys/external/bsd/acpica/dist/tools/acpiexec/osunixdir.c
cvs rdiff -u -r1.1.1.2 -r0 \
src/sys/external/bsd/acpica/dist/tools/acpisrc/osunixdir.c
cvs rdiff -u -r1.3 -r1.4 \
src/sys/external/bsd/acpica/dist/utilities/utdecode.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/external/bsd/acpica/dist/common/dmtbinfo.c
diff -u src/sys/external/bsd/acpica/dist/common/dmtbinfo.c:1.3 src/sys/external/bsd/acpica/dist/common/dmtbinfo.c:1.4
--- src/sys/external/bsd/acpica/dist/common/dmtbinfo.c:1.3	Thu Feb 17 10:09:40 2011
+++ src/sys/external/bsd/acpica/dist/common/dmtbinfo.c	Tue Jun 28 09:04:29 2011
@@ -51,6 +51,31 @@
 ACPI_MODULE_NAME(dmtbinfo)
 
 /*
+ * How to add a new table:
+ *
+ * - Add the C table definition to the actbl1.h or actbl2.h header.
+ * - Add ACPI__OFFSET macro(s) for the table (and subtables) to list below.
+ * - Define the table in this file (for the disassembler). If any
+ *   new data types are required (ACPI_DMT_*), see below.
+ * - Add an external declaration for the new table definition (AcpiDmTableInfo*)
+ * in acdisam.h
+ * - Add new table definition to the dispatch table in dmtable.c (AcpiDmTableData)
+ * If a simple table (with no subtables), no disassembly code is needed.
+ * Otherwise, create the AcpiDmDump* function for to disassemble the table
+ * and add it to the dmtbdump.c file.
+ * - Add an external declaration for the new AcpiDmDump* function in acdisasm.h
+ * - Add the new AcpiDmDump* function to the dispatch table in dmtable.c
+ * - Create a template for the new table
+ * - Add data table compiler support
+ *
+ * How to add a new data type (ACPI_DMT_*):
+ *
+ * - Add new type at the end of the ACPI_DMT list in acdisasm.h
+ * - Add length and implementation cases in dmtable.c  (disassembler)
+ * - Add type and length cases in dtutils.c (DT compiler)
+ */
+
+/*
  * Macros used to generate offsets to specific table fields
  */
 #define ACPI_FACS_OFFSET(f) (UINT8) ACPI_OFFSET (ACPI_TABLE_FACS,f)
@@ -131,6 +156,9 @@
 #define ACPI_MADTH_OFFSET(f)(UINT8) ACPI_OFFSET (ACPI_SUBTABLE_HEADER,f)
 #define ACPI_MCFG0_OFFSET(f)(UINT8) ACPI_OFFSET (ACPI_MCFG_ALLOCATION,f)
 #define ACPI_MSCT0_OFFSET(f)(UINT8) ACPI_OFFSET (ACPI_MSCT_PROXIMITY,f)
+#define ACPI_SLICH_OFFSET(f)(UINT8) ACPI_OFFSET (ACPI_SLIC_HEADER,f)
+#define ACPI_SLIC0_OFFSET(f)(UINT8) ACPI_OFFSET (ACPI_SLIC_KEY,f)
+#define ACPI_SLIC1_OFFSET(f)(UINT8) ACPI_OFFSET (ACPI_SLIC_MARKER,f)
 #define ACPI_SRATH_OFFSET(f)(UINT8) ACPI_OFFSET (ACPI_SUBTABLE_HEADER,f)
 #define ACPI_SRAT0_OFFSET(f)(UINT8) ACPI_OFFSET (ACPI_SRAT_CPU_AFFINITY,f)
 #define ACPI_SRAT1_OFFSET(f)(UINT8) ACPI_OFFSET (ACPI_SRAT_MEM_AFFINITY,f)
@@ -1256,13 +1284,42 @@
 
 

CVS commit: src/sys/dev/acpi/acpica

2011-06-28 Thread Jukka Ruohonen
Module Name:src
Committed By:   jruoho
Date:   Tue Jun 28 09:09:43 UTC 2011

Modified Files:
src/sys/dev/acpi/acpica: OsdMisc.c

Log Message:
Adjust a prototype due ACPICA 20110623.


To generate a diff of this commit:
cvs rdiff -u -r1.11 -r1.12 src/sys/dev/acpi/acpica/OsdMisc.c

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

Modified files:

Index: src/sys/dev/acpi/acpica/OsdMisc.c
diff -u src/sys/dev/acpi/acpica/OsdMisc.c:1.11 src/sys/dev/acpi/acpica/OsdMisc.c:1.12
--- src/sys/dev/acpi/acpica/OsdMisc.c:1.11	Thu Feb 17 12:08:46 2011
+++ src/sys/dev/acpi/acpica/OsdMisc.c	Tue Jun 28 09:09:43 2011
@@ -1,4 +1,4 @@
-/*	$NetBSD: OsdMisc.c,v 1.11 2011/02/17 12:08:46 jruoho Exp $	*/
+/*	$NetBSD: OsdMisc.c,v 1.12 2011/06/28 09:09:43 jruoho Exp $	*/
 
 /*
  * Copyright 2001 Wasabi Systems, Inc.
@@ -42,7 +42,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: OsdMisc.c,v 1.11 2011/02/17 12:08:46 jruoho Exp $);
+__KERNEL_RCSID(0, $NetBSD: OsdMisc.c,v 1.12 2011/06/28 09:09:43 jruoho Exp $);
 
 #include opt_acpi.h
 #include opt_ddb.h
@@ -122,7 +122,7 @@
 }
 
 ACPI_STATUS
-AcpiOsGetLine(char *Buffer)
+AcpiOsGetLine(char *Buffer, UINT32 BufferLength, UINT32 *BytesRead)
 {
 #if defined(DDB)
 	char *cp;



CVS commit: src/external/bsd/acpica/bin/iasl

2011-06-28 Thread Jukka Ruohonen
Module Name:src
Committed By:   jruoho
Date:   Tue Jun 28 09:11:33 UTC 2011

Modified Files:
src/external/bsd/acpica/bin/iasl: Makefile

Log Message:
Adjust for ACPICA 20110623.


To generate a diff of this commit:
cvs rdiff -u -r1.3 -r1.4 src/external/bsd/acpica/bin/iasl/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/bsd/acpica/bin/iasl/Makefile
diff -u src/external/bsd/acpica/bin/iasl/Makefile:1.3 src/external/bsd/acpica/bin/iasl/Makefile:1.4
--- src/external/bsd/acpica/bin/iasl/Makefile:1.3	Fri Feb 18 17:34:22 2011
+++ src/external/bsd/acpica/bin/iasl/Makefile	Tue Jun 28 09:11:33 2011
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.3 2011/02/18 17:34:22 jruoho Exp $
+# $NetBSD: Makefile,v 1.4 2011/06/28 09:11:33 jruoho Exp $
 
 .if (${MACHINE_ARCH} == i386 || ${MACHINE_ARCH} == x86_64)
 PROG=	iasl
@@ -16,8 +16,8 @@
 LDADD+=		-ll -ly -lrt -lpthread
 DPADD+=		${LIBL} ${LIBY} ${LIBRT} ${LIBPTHREAD}
 
-DPSRCS= aslcompilerparse.c
-DPSRCS+=aslcompilerlex.c
+DPSRCS= aslcompilerparse.c aslcompilerlex.c \
+	dtparserparse.c dtparserlex.c
 
 .PATH:	${TOPDIR}
 SRCS+=  aslcompilerparse.c aslcompilerlex.c adfile.c \
@@ -30,6 +30,7 @@
 	aslrestype2q.c aslrestype2w.c aslstartup.c aslstubs.c   \
 	asltransform.c asltree.c aslutils.c asluuid.c   \
 	aslwalks.c dtcompile.c dtexpress.c dtfield.c dtio.c \
+	dtparserparse.c dtparserlex.c\
 	dtsubtable.c dttable.c dttemplate.c dtutils.c
 
 .PATH: ${TOPDIR}/../common
@@ -71,7 +72,7 @@
 	utmisc.c utmutex.c utobject.c utosi.c utresrc.c \
 	utstate.c utxface.c utxferror.c
 
-.PATH: ${TOPDIR}/..
+.PATH: ${TOPDIR}/../os_specific/service_layers
 SRCS+=	osunixxf.c
 
 aslcompilerparse.c: ${TOPDIR}/aslcompiler.y
@@ -81,7 +82,16 @@
 aslcompilerlex.c: ${TOPDIR}/aslcompiler.l
 	${LEX} -i -PAslCompiler -o${.TARGET} ${.ALLSRC}
 
-CLEANFILES+=	aslcompilerlex.c aslcompilerparse.c \
-		aslcompiler.y.h aslcompilerparse.output
+dtparserparse.c: ${TOPDIR}/dtparser.y
+	${YACC} -v -d -o${.TARGET} -pDtParser ${.ALLSRC}
+	mv -f ${.PREFIX}.h dtparser.y.h
+
+dtparserlex.c: ${TOPDIR}/dtparser.l
+	${LEX} -i -PDtParser -o${.TARGET} ${.ALLSRC}
+
+CLEANFILES+=	aslcompilerlex.c aslcompilerparse.c	\
+		aslcompiler.y.h aslcompilerparse.output \
+		dtparserlex.c dtparserparse.c		\
+		dtparser.y.h dtparserparse.output
 
 .include bsd.prog.mk



CVS commit: src/sys/external/bsd/acpica/conf

2011-06-28 Thread Jukka Ruohonen
Module Name:src
Committed By:   jruoho
Date:   Tue Jun 28 09:16:42 UTC 2011

Modified Files:
src/sys/external/bsd/acpica/conf: files.acpica

Log Message:
Adjust for ACPICA 20110623.


To generate a diff of this commit:
cvs rdiff -u -r1.3 -r1.4 src/sys/external/bsd/acpica/conf/files.acpica

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

Modified files:

Index: src/sys/external/bsd/acpica/conf/files.acpica
diff -u src/sys/external/bsd/acpica/conf/files.acpica:1.3 src/sys/external/bsd/acpica/conf/files.acpica:1.4
--- src/sys/external/bsd/acpica/conf/files.acpica:1.3	Thu Feb 17 12:08:14 2011
+++ src/sys/external/bsd/acpica/conf/files.acpica	Tue Jun 28 09:16:42 2011
@@ -1,4 +1,4 @@
-# $NetBSD: files.acpica,v 1.3 2011/02/17 12:08:14 jruoho Exp $
+# $NetBSD: files.acpica,v 1.4 2011/06/28 09:16:42 jruoho Exp $
 
 define		acpica
 makeoptions	acpi	CPPFLAGS+=-I$S/external/bsd/acpica/dist/include
@@ -45,6 +45,7 @@
 
 # events/
 file	external/bsd/acpica/dist/events/evevent.c		acpica
+file	external/bsd/acpica/dist/events/evglock.c		acpica
 file	external/bsd/acpica/dist/events/evgpe.c			acpica
 file	external/bsd/acpica/dist/events/evgpeblk.c		acpica
 file	external/bsd/acpica/dist/events/evgpeinit.c		acpica



CVS commit: src/doc

2011-06-28 Thread Jukka Ruohonen
Module Name:src
Committed By:   jruoho
Date:   Tue Jun 28 09:17:22 UTC 2011

Modified Files:
src/doc: 3RDPARTY CHANGES

Log Message:
Note the ACPICA 20110623 import.


To generate a diff of this commit:
cvs rdiff -u -r1.848 -r1.849 src/doc/3RDPARTY
cvs rdiff -u -r1.1572 -r1.1573 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/3RDPARTY
diff -u src/doc/3RDPARTY:1.848 src/doc/3RDPARTY:1.849
--- src/doc/3RDPARTY:1.848	Sun Jun 26 08:31:27 2011
+++ src/doc/3RDPARTY	Tue Jun 28 09:17:21 2011
@@ -1,4 +1,4 @@
-#	$NetBSD: 3RDPARTY,v 1.848 2011/06/26 08:31:27 jruoho Exp $
+#	$NetBSD: 3RDPARTY,v 1.849 2011/06/28 09:17:21 jruoho Exp $
 #
 # This file contains a list of the software that has been integrated into
 # NetBSD where we are not the primary maintainer.
@@ -25,7 +25,7 @@
 # remaining lines until the end of the record are notes.
 
 Package:	acpica
-Version:	20110211
+Version:	20110623
 Current Vers:	20110623
 Maintainer:	Intel
 Archive Site:	http://www.acpica.org/downloads/unix2_source_code.php

Index: src/doc/CHANGES
diff -u src/doc/CHANGES:1.1572 src/doc/CHANGES:1.1573
--- src/doc/CHANGES:1.1572	Sun Jun 26 16:49:39 2011
+++ src/doc/CHANGES	Tue Jun 28 09:17:21 2011
@@ -1,4 +1,4 @@
-# LIST OF CHANGES FROM LAST RELEASE:			$Revision: 1.1572 $
+# LIST OF CHANGES FROM LAST RELEASE:			$Revision: 1.1573 $
 #
 #
 # [Note: This file does not mention every change made to the NetBSD source tree.
@@ -1055,3 +1055,4 @@
 		[christos 20110626]
 	userland: Add an 'e' mode character to popen(3), and fopen(3) to set
 		close on exec to opened file descriptors. [christos 20110626]
+	acpi(4): Updated ACPICA to 20110623. [jruoho 20110628]



CVS commit: src/sys/external/bsd/acpica/dist/debugger

2011-06-28 Thread Jukka Ruohonen
Module Name:src
Committed By:   jruoho
Date:   Tue Jun 28 09:27:50 UTC 2011

Modified Files:
src/sys/external/bsd/acpica/dist/debugger: dbdisply.c

Log Message:
More __UNCONST(3).


To generate a diff of this commit:
cvs rdiff -u -r1.5 -r1.6 src/sys/external/bsd/acpica/dist/debugger/dbdisply.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/external/bsd/acpica/dist/debugger/dbdisply.c
diff -u src/sys/external/bsd/acpica/dist/debugger/dbdisply.c:1.5 src/sys/external/bsd/acpica/dist/debugger/dbdisply.c:1.6
--- src/sys/external/bsd/acpica/dist/debugger/dbdisply.c:1.5	Tue Jun 28 09:04:29 2011
+++ src/sys/external/bsd/acpica/dist/debugger/dbdisply.c	Tue Jun 28 09:27:49 2011
@@ -105,11 +105,11 @@
 
 static ACPI_HANDLER_INFOAcpiGbl_HandlerList[] =
 {
-{AcpiGbl_SystemNotify.Handler, System Notifications},
-{AcpiGbl_DeviceNotify.Handler, Device Notifications},
-{AcpiGbl_TableHandler, ACPI Table Events},
-{AcpiGbl_ExceptionHandler, Control Method Exceptions},
-{AcpiGbl_InterfaceHandler, OSI Invocations}
+{AcpiGbl_SystemNotify.Handler,__UNCONST(System Notifications)},
+{AcpiGbl_DeviceNotify.Handler,__UNCONST(Device Notifications)},
+{AcpiGbl_TableHandler,__UNCONST(ACPI Table Events)},
+{AcpiGbl_ExceptionHandler,__UNCONST(Control Method Exceptions)},
+{AcpiGbl_InterfaceHandler,__UNCONST(OSI Invocations)}
 };
 
 



CVS commit: src/external/gpl3/gcc/usr.bin

2011-06-28 Thread matthew green
Module Name:src
Committed By:   mrg
Date:   Tue Jun 28 09:28:22 UTC 2011

Modified Files:
src/external/gpl3/gcc/usr.bin: Makefile.inc

Log Message:
- add LIBDECNUMBEROBJ.
- update the VER_CPPFLAGS for GCC 4.5.


To generate a diff of this commit:
cvs rdiff -u -r1.4 -r1.5 src/external/gpl3/gcc/usr.bin/Makefile.inc

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

Modified files:

Index: src/external/gpl3/gcc/usr.bin/Makefile.inc
diff -u src/external/gpl3/gcc/usr.bin/Makefile.inc:1.4 src/external/gpl3/gcc/usr.bin/Makefile.inc:1.5
--- src/external/gpl3/gcc/usr.bin/Makefile.inc:1.4	Tue Jun 28 04:22:17 2011
+++ src/external/gpl3/gcc/usr.bin/Makefile.inc	Tue Jun 28 09:28:22 2011
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile.inc,v 1.4 2011/06/28 04:22:17 mrg Exp $
+#	$NetBSD: Makefile.inc,v 1.5 2011/06/28 09:28:22 mrg Exp $
 
 .include bsd.own.mk
 
@@ -22,6 +22,7 @@
 FRONTENDOBJ!=		cd ${.CURDIR}/../frontend  ${PRINTOBJDIR}
 BACKENDOBJ!=		cd ${.CURDIR}/../backend  ${PRINTOBJDIR}
 LIBCPPOBJ!=		cd ${.CURDIR}/../libcpp  ${PRINTOBJDIR}
+LIBDECNUMBEROBJ!=	cd ${.CURDIR}/../../lib/libdecnumber  ${PRINTOBJDIR}
 
 HOSTLIBIBERTYOBJ!=	cd ${.CURDIR}/../host-libiberty  ${PRINTOBJDIR}
 HOSTLIBIBERTY=		${HOSTLIBIBERTYOBJ}/libiberty/libiberty.a
@@ -44,9 +45,16 @@
 DATESTAMPSTR=		\\
 .endif
 
-VER_CPPFLAGS=		-DBASEVER=${BASEVERSTR} \
-			-DDATESTAMP=${DATESTAMPSTR} \
-			-DDEVPHASE=${DEVPHASESTR}
+# XXX pull this out of our configs
+G_BUGURL_s=\http://www.NetBSD.org/Misc/send-pr.html\
+G_PKGVERSION_s=\(NetBSD nb1 20110620) \
+
+VER_CPPFLAGS=			-DBUGURL=${G_BUGURL_s} \
+-DPKGVERSION=${G_PKGVERSION_s} \
+-DBASEVER=\${BASEVER}\ \
+-DDATESTAMP=\${DATESTAMP}\ \
+-DDEVPHASE=${DEVPHASE} \
+-DREVISION=${REVISION}
 CPPFLAGS.version.c=		${VER_CPPFLAGS}
 
 .include ${GCCARCH}/defs.mk



CVS commit: src/external/gpl3/gcc/usr.bin/gcov

2011-06-28 Thread matthew green
Module Name:src
Committed By:   mrg
Date:   Tue Jun 28 09:31:11 UTC 2011

Modified Files:
src/external/gpl3/gcc/usr.bin/gcov: Makefile

Log Message:
this needs -lintl now.


To generate a diff of this commit:
cvs rdiff -u -r1.1 -r1.2 src/external/gpl3/gcc/usr.bin/gcov/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/gpl3/gcc/usr.bin/gcov/Makefile
diff -u src/external/gpl3/gcc/usr.bin/gcov/Makefile:1.1 src/external/gpl3/gcc/usr.bin/gcov/Makefile:1.2
--- src/external/gpl3/gcc/usr.bin/gcov/Makefile:1.1	Tue Jun 21 06:03:14 2011
+++ src/external/gpl3/gcc/usr.bin/gcov/Makefile	Tue Jun 28 09:31:11 2011
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile,v 1.1 2011/06/21 06:03:14 mrg Exp $
+#	$NetBSD: Makefile,v 1.2 2011/06/28 09:31:11 mrg Exp $
 
 .include bsd.own.mk
 
@@ -13,6 +13,6 @@
 
 .include bsd.prog.mk
 
-LDADD=		-L${LIBIBERTYOBJ} -liberty
+LDADD=		-L${LIBIBERTYOBJ} -liberty -lintl
 
 .PATH: ${DIST}/gcc



CVS commit: src/external/gpl3/gcc/usr.bin/libcpp

2011-06-28 Thread matthew green
Module Name:src
Committed By:   mrg
Date:   Tue Jun 28 09:31:55 UTC 2011

Modified Files:
src/external/gpl3/gcc/usr.bin/libcpp: Makefile

Log Message:
init.o wants a localedir.h to define LOCALEDIR now.  make it so.


To generate a diff of this commit:
cvs rdiff -u -r1.1 -r1.2 src/external/gpl3/gcc/usr.bin/libcpp/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/gpl3/gcc/usr.bin/libcpp/Makefile
diff -u src/external/gpl3/gcc/usr.bin/libcpp/Makefile:1.1 src/external/gpl3/gcc/usr.bin/libcpp/Makefile:1.2
--- src/external/gpl3/gcc/usr.bin/libcpp/Makefile:1.1	Tue Jun 21 06:03:15 2011
+++ src/external/gpl3/gcc/usr.bin/libcpp/Makefile	Tue Jun 28 09:31:55 2011
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile,v 1.1 2011/06/21 06:03:15 mrg Exp $
+#	$NetBSD: Makefile,v 1.2 2011/06/28 09:31:55 mrg Exp $
 
 LIBISPRIVATE=	yes
 
@@ -7,7 +7,7 @@
 SRCS=		${G_libcpp_a_OBJS:.o=.c}
 
 CPPFLAGS+=	-I${.CURDIR} -I${.CURDIR}/arch/${MACHINE_ARCH} \
-		-I${GCCARCH} -I${BACKENDOBJ} \
+		-I${GCCARCH} -I${BACKENDOBJ} -I. \
 		${G_INCLUDES:M-I*:N-I.*} \
 		-DPREFIX=\/usr\
 
@@ -18,3 +18,8 @@
 
 .PATH: ${DIST}/libcpp
 # ${DIST}/gcc
+
+localedir.h:
+	echo '#define LOCALEDIR /usr/share/locale'  ${.TARGET}
+
+init.o: localedir.h



CVS commit: src/external/gpl3/gcc/usr.bin/backend

2011-06-28 Thread matthew green
Module Name:src
Committed By:   mrg
Date:   Tue Jun 28 10:11:04 UTC 2011

Modified Files:
src/external/gpl3/gcc/usr.bin/backend: Makefile

Log Message:
some of the way towards working.  there's a couple of hacks in there that
need to be cleaned up before this is properly finished.


To generate a diff of this commit:
cvs rdiff -u -r1.3 -r1.4 src/external/gpl3/gcc/usr.bin/backend/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/gpl3/gcc/usr.bin/backend/Makefile
diff -u src/external/gpl3/gcc/usr.bin/backend/Makefile:1.3 src/external/gpl3/gcc/usr.bin/backend/Makefile:1.4
--- src/external/gpl3/gcc/usr.bin/backend/Makefile:1.3	Tue Jun 28 04:23:01 2011
+++ src/external/gpl3/gcc/usr.bin/backend/Makefile	Tue Jun 28 10:11:04 2011
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile,v 1.3 2011/06/28 04:23:01 mrg Exp $
+#	$NetBSD: Makefile,v 1.4 2011/06/28 10:11:04 mrg Exp $
 
 LIBISPRIVATE=	yes
 
@@ -10,7 +10,9 @@
 		-DTARGET_NAME=\${MACHINE_GNU_PLATFORM}\
 HOST_CPPFLAGS+=	-I. -I${GCCARCH} ${G_ALL_CFLAGS:M-D*} ${G_INCLUDES:M-I*:N-I.*}
 DPSRCS+=	insn-attr.h insn-codes.h insn-config.h insn-flags.h tree-check.h
-CPPFLAGS.prefix.c+= -DPREFIX=\/usr\
+CPPFLAGS.prefix.c+=	-DPREFIX=\/usr\
+CPPFLAGS.cppdefault.c+=	-DPREFIX=\/usr\
+CPPFLAGS+=	-I${DIST}/libgcc
 
 .include bsd.lib.mk
 
@@ -72,6 +74,9 @@
 tm-preds.h: genpreds ${G_md_file}
 	${_MKTARGET_CREATE}
 	./genpreds -h ${G_md_file} ${.TARGET}
+tm-constrs.h: genpreds ${G_md_file}
+	${_MKTARGET_CREATE}
+	./genpreds -c ${G_md_file} ${.TARGET}
 insn-preds.c: genpreds ${G_md_file}
 	${_MKTARGET_CREATE}
 	./genpreds ${G_md_file} ${.TARGET}
@@ -88,19 +93,24 @@
 	${_MKTARGET_LINK}
 	${HOST_LINK.c} -o ${.TARGET} ${.ALLSRC} ${NBCOMPATLIB} ${HOSTLIBIBERTY}
 
+.if 0
 gtyp-input.list: Makefile
 	for f in ${G_GTFILES}; do echo $f; done  ${.TARGET}
 CLEANFILES+=	gtyp-input.list
+.endif
+
+gtyp-input.list.tmp: ${GCCARCH}/gtyp-input.list
+	sed s#SRCDIR#${DIST}/#  ${.ALLSRC}  ${.TARGET}
 
 gtype-desc.c: gtype-desc.h
-gtype-desc.h: gengtype
+gtype-desc.h: gengtype gtyp-input.list.tmp
 	${_MKTARGET_CREATE}
 	rm -f auto-host.h
 	ln -s ${.CURDIR}/../gcc/arch/${MACHINE_ARCH}/auto-host.h .
-	./gengtype ${DIST} gtyp-input.list
+	./gengtype ${DIST} gtyp-input.list.tmp
 # gengtype is the real need for options.h
 gengtype.lo gengtype-lex.lo gengtype-parse.lo: ${HH} gtyp-gen.h config.h options.h
-gengtype: gengtype.lo gengtype-lex.lo gengtype-parse.lo build-errors.lo gtyp-input.list
+gengtype: gengtype.lo gengtype-lex.lo gengtype-parse.lo build-errors.lo
 	${_MKTARGET_LINK}
 	${HOST_LINK.c} -o ${.TARGET} ${.ALLSRC} ${NBCOMPATLIB} ${HOSTLIBIBERTY}
 
@@ -266,19 +276,22 @@
 
 EXTRADEPENDS=		${G_BUILD_RTL:.o=.lo} ${G_BUILD_SUPPORT:.o=.lo} \
 			${G_BUILD_PRINT:.o=.lo} ${G_BUILD_ERRORS:.o=.lo}
-.for f in attr.h codes.h config.h emit.c extract.c flags.h opinit.c output.c \
+LDFLAGS.genautomata+=	-lm
+
+.for f in attr.h attrtab.c automata.c codes.h config.h emit.c extract.c flags.h opinit.c output.c \
 	  peep.c recog.c
 CLEANFILES+=		gen${f:R} insn-${f}
 
 gen${f:R}.lo: ${HH}
 gen${f:R}: gen${f:R}.lo ${EXTRADEPENDS} 
 	${_MKTARGET_LINK}
-	${HOST_LINK.c} -o ${.TARGET} ${.ALLSRC} ${NBCOMPATLIB} ${HOSTLIBIBERTY}
+	${HOST_LINK.c} -o ${.TARGET} ${.ALLSRC} ${NBCOMPATLIB} ${HOSTLIBIBERTY} ${LDFLAGS.${.TARGET}}
 insn-${f}: gen${f:R} ${G_md_file}
 	${_MKTARGET_CREATE}
 	./gen${f:R} ${G_md_file} ${.TARGET}
 .endfor
 
+.if 0
 #
 # One of these things is not like the other
 #
@@ -291,6 +304,7 @@
 insn-attrtab.c: genattrtab ${G_md_file}
 	${_MKTARGET_CREATE}
 	./genattrtab ${G_md_file} ${.TARGET}
+.endif
 
 #
 # Required hard-coded dependancies.
@@ -305,6 +319,10 @@
 toplev.d toplev.o: options.h
 coverage.d: gcov-iov.h
 gcov-io.h: gcov-iov.h
+alias.d alias.o: insn-constants.h tm_p.h tm-preds.h
+cgraphunit.d cgraphunit.o: gcov-io.h
+# XXX
+i386.d i386.o: tm-constrs.h
 
 COPTS+=-Wno-stack-protector
 



CVS commit: src/external/gpl3/gcc/usr.bin/frontend

2011-06-28 Thread matthew green
Module Name:src
Committed By:   mrg
Date:   Tue Jun 28 10:14:41 UTC 2011

Modified Files:
src/external/gpl3/gcc/usr.bin/frontend: Makefile

Log Message:
port this to GCC 4.5.


To generate a diff of this commit:
cvs rdiff -u -r1.1 -r1.2 src/external/gpl3/gcc/usr.bin/frontend/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/gpl3/gcc/usr.bin/frontend/Makefile
diff -u src/external/gpl3/gcc/usr.bin/frontend/Makefile:1.1 src/external/gpl3/gcc/usr.bin/frontend/Makefile:1.2
--- src/external/gpl3/gcc/usr.bin/frontend/Makefile:1.1	Tue Jun 21 06:03:14 2011
+++ src/external/gpl3/gcc/usr.bin/frontend/Makefile	Tue Jun 28 10:14:41 2011
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile,v 1.1 2011/06/21 06:03:14 mrg Exp $
+#	$NetBSD: Makefile,v 1.2 2011/06/28 10:14:41 mrg Exp $
 
 LIBISPRIVATE=	yes
 
@@ -7,13 +7,19 @@
 
 LIB=		frontend
 
-SRCS=		gcc.c version.c intl.c prefix.c
+SRCS=		gcc.c version.c intl.c prefix.c opts-common.c
+
+.if ${MACHINE_ARCH} == x86_64
+SRCS+=		driver-i386.c
+.PATH:		${DIST}/gcc/config/i386
+.endif
 
 CPPFLAGS+=	-I${GCCARCH} -I${BACKENDOBJ} -I. \
 		${G_ALL_CFLAGS:M-D*} ${G_INCLUDES:M-I*:N-I.*} \
 		-DPREFIX=\/usr\ \
 		-DDEFAULT_TARGET_VERSION=\${G_version}\ \
-		-DDEFAULT_TARGET_MACHINE=\${MACHINE_GNU_PLATFORM}\
+		-DDEFAULT_TARGET_MACHINE=\${MACHINE_GNU_PLATFORM}\ \
+		-DCONFIGURE_SPECS=\\
 HOST_CPPFLAGS+=	-I${GCCARCH} ${G_ALL_CFLAGS:M-D*} ${G_INCLUDES:M-I*:N-I.*}
 
 DPSRCS+=	specs.h



CVS commit: src/external/gpl3/gcc/usr.bin

2011-06-28 Thread matthew green
Module Name:src
Committed By:   mrg
Date:   Tue Jun 28 10:15:16 UTC 2011

Modified Files:
src/external/gpl3/gcc/usr.bin: Makefile.inc
Added Files:
src/external/gpl3/gcc/usr.bin: Makefile.libdecnumber
src/external/gpl3/gcc/usr.bin/libdecnumber: Makefile
src/external/gpl3/gcc/usr.bin/libdecnumber/arch/x86_64: config.h

Log Message:
build libdecnumber.


To generate a diff of this commit:
cvs rdiff -u -r1.5 -r1.6 src/external/gpl3/gcc/usr.bin/Makefile.inc
cvs rdiff -u -r0 -r1.1 src/external/gpl3/gcc/usr.bin/Makefile.libdecnumber
cvs rdiff -u -r0 -r1.1 src/external/gpl3/gcc/usr.bin/libdecnumber/Makefile
cvs rdiff -u -r0 -r1.1 \
src/external/gpl3/gcc/usr.bin/libdecnumber/arch/x86_64/config.h

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

Modified files:

Index: src/external/gpl3/gcc/usr.bin/Makefile.inc
diff -u src/external/gpl3/gcc/usr.bin/Makefile.inc:1.5 src/external/gpl3/gcc/usr.bin/Makefile.inc:1.6
--- src/external/gpl3/gcc/usr.bin/Makefile.inc:1.5	Tue Jun 28 09:28:22 2011
+++ src/external/gpl3/gcc/usr.bin/Makefile.inc	Tue Jun 28 10:15:15 2011
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile.inc,v 1.5 2011/06/28 09:28:22 mrg Exp $
+#	$NetBSD: Makefile.inc,v 1.6 2011/06/28 10:15:15 mrg Exp $
 
 .include bsd.own.mk
 
@@ -22,7 +22,7 @@
 FRONTENDOBJ!=		cd ${.CURDIR}/../frontend  ${PRINTOBJDIR}
 BACKENDOBJ!=		cd ${.CURDIR}/../backend  ${PRINTOBJDIR}
 LIBCPPOBJ!=		cd ${.CURDIR}/../libcpp  ${PRINTOBJDIR}
-LIBDECNUMBEROBJ!=	cd ${.CURDIR}/../../lib/libdecnumber  ${PRINTOBJDIR}
+LIBDECNUMBEROBJ!=	cd ${.CURDIR}/../libdecnumber  ${PRINTOBJDIR}
 
 HOSTLIBIBERTYOBJ!=	cd ${.CURDIR}/../host-libiberty  ${PRINTOBJDIR}
 HOSTLIBIBERTY=		${HOSTLIBIBERTYOBJ}/libiberty/libiberty.a

Added files:

Index: src/external/gpl3/gcc/usr.bin/Makefile.libdecnumber
diff -u /dev/null src/external/gpl3/gcc/usr.bin/Makefile.libdecnumber:1.1
--- /dev/null	Tue Jun 28 10:15:16 2011
+++ src/external/gpl3/gcc/usr.bin/Makefile.libdecnumber	Tue Jun 28 10:15:15 2011
@@ -0,0 +1,4 @@
+#	$NetBSD: Makefile.libdecnumber,v 1.1 2011/06/28 10:15:15 mrg Exp $
+
+DPADD+=		${LIBDECNUMBEROBJ}/libdecnumber.a
+LDADD+=		${LIBDECNUMBEROBJ}/libdecnumber.a

Index: src/external/gpl3/gcc/usr.bin/libdecnumber/Makefile
diff -u /dev/null src/external/gpl3/gcc/usr.bin/libdecnumber/Makefile:1.1
--- /dev/null	Tue Jun 28 10:15:16 2011
+++ src/external/gpl3/gcc/usr.bin/libdecnumber/Makefile	Tue Jun 28 10:15:15 2011
@@ -0,0 +1,20 @@
+#	$NetBSD
+
+DIST=		${NETBSDSRCDIR}/external/gpl3/gcc/dist
+GNUHOSTDIST=	${DIST}
+
+NOLINT=		# defined
+NOPIC=		# defined
+NOPROFILE=	# defined
+
+.include bsd.own.mk
+
+LIB=		decnumber
+
+SRCS=		decNumber.c decContext.c decimal32.c decimal64.c decimal128.c
+CPPFLAGS+=	-I${.CURDIR}/arch/${MACHINE_ARCH} -I${DIST}/libdecnumber
+CPPFLAGS+=	-I${DIST}/libgcc
+
+.include bsd.lib.mk
+
+.PATH: ${DIST}/libdecnumber ${DIST}/libdecnumber/dpd

Index: src/external/gpl3/gcc/usr.bin/libdecnumber/arch/x86_64/config.h
diff -u /dev/null src/external/gpl3/gcc/usr.bin/libdecnumber/arch/x86_64/config.h:1.1
--- /dev/null	Tue Jun 28 10:15:16 2011
+++ src/external/gpl3/gcc/usr.bin/libdecnumber/arch/x86_64/config.h	Tue Jun 28 10:15:16 2011
@@ -0,0 +1,99 @@
+/* This file is automatically generated.  DO NOT EDIT! */
+/* Generated from: 	NetBSD: mknative-gcc,v 1.50 2011/06/28 04:30:32 mrg Exp  */
+/* Generated from: NetBSD: mknative.common,v 1.9 2007/02/05 18:26:01 apb Exp  */
+
+/* config.h.  Generated from config.in by configure.  */
+/* config.in.  Generated from configure.ac by autoheader.  */
+
+/* Define if building universal (internal helper macro) */
+/* #undef AC_APPLE_UNIVERSAL_BUILD */
+
+/* Define to 1 if you have the ctype.h header file. */
+#define HAVE_CTYPE_H 1
+
+/* Define to 1 if you have the inttypes.h header file. */
+#define HAVE_INTTYPES_H 1
+
+/* Define to 1 if you have the memory.h header file. */
+#define HAVE_MEMORY_H 1
+
+/* Define to 1 if you have the stddef.h header file. */
+#define HAVE_STDDEF_H 1
+
+/* Define to 1 if you have the stdint.h header file. */
+#define HAVE_STDINT_H 1
+
+/* Define to 1 if you have the stdio.h header file. */
+#define HAVE_STDIO_H 1
+
+/* Define to 1 if you have the stdlib.h header file. */
+#define HAVE_STDLIB_H 1
+
+/* Define to 1 if you have the strings.h header file. */
+#define HAVE_STRINGS_H 1
+
+/* Define to 1 if you have the string.h header file. */
+#define HAVE_STRING_H 1
+
+/* Define to 1 if you have the sys/stat.h header file. */
+#define HAVE_SYS_STAT_H 1
+
+/* Define to 1 if you have the sys/types.h header file. */
+#define HAVE_SYS_TYPES_H 1
+
+/* Define to 1 if you have the unistd.h header file. */
+#define HAVE_UNISTD_H 1
+
+/* Define to the address where bug reports for this package should be sent. */
+#define PACKAGE_BUGREPORT gcc-b...@gcc.gnu.org
+
+/* Define to the full name of this package. */
+#define PACKAGE_NAME libdecnumber
+
+/* Define to the full name and version of this package. */
+#define 

CVS commit: src/external/gpl3/gcc/usr.bin/cc1

2011-06-28 Thread matthew green
Module Name:src
Committed By:   mrg
Date:   Tue Jun 28 10:15:40 UTC 2011

Modified Files:
src/external/gpl3/gcc/usr.bin/cc1: Makefile

Log Message:
port this to GCC 4.5.


To generate a diff of this commit:
cvs rdiff -u -r1.1 -r1.2 src/external/gpl3/gcc/usr.bin/cc1/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/gpl3/gcc/usr.bin/cc1/Makefile
diff -u src/external/gpl3/gcc/usr.bin/cc1/Makefile:1.1 src/external/gpl3/gcc/usr.bin/cc1/Makefile:1.2
--- src/external/gpl3/gcc/usr.bin/cc1/Makefile:1.1	Tue Jun 21 06:03:13 2011
+++ src/external/gpl3/gcc/usr.bin/cc1/Makefile	Tue Jun 28 10:15:40 2011
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile,v 1.1 2011/06/21 06:03:13 mrg Exp $
+#	$NetBSD: Makefile,v 1.2 2011/06/28 10:15:40 mrg Exp $
 
 PROG=		cc1
 SRCS=		${G_C_OBJS:Nlibcpp.a:.o=.c} main.c ${PROG}-checksum.c
@@ -6,7 +6,13 @@
 
 .include ../Makefile.backend
 .include ../Makefile.libcpp
+.include ../Makefile.libdecnumber
+
+# VER_CPPFLAGS from Makefile.inc
+CPPFLAGS.c-cppbuiltin.c=	${VER_CPPFLAGS}
 
 COPTS+=	-Wno-stack-protector
 
+LDADD+=	-lintl -lgmp -lmpfr -lmpc -lz
+
 .PATH: ${DIST}/gcc ${G_out_file:H}



CVS commit: src/external/gpl3/gcc/usr.bin/gcc/libcpp/arch/x86_64

2011-06-28 Thread matthew green
Module Name:src
Committed By:   mrg
Date:   Tue Jun 28 10:17:17 UTC 2011

Removed Files:
src/external/gpl3/gcc/usr.bin/gcc/libcpp/arch/x86_64: config.h

Log Message:
delete file in the wrong directory.


To generate a diff of this commit:
cvs rdiff -u -r1.1 -r0 \
src/external/gpl3/gcc/usr.bin/gcc/libcpp/arch/x86_64/config.h

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



CVS commit: src/sys/dev/nand

2011-06-28 Thread Adam Hoka
Module Name:src
Committed By:   ahoka
Date:   Tue Jun 28 10:32:45 UTC 2011

Modified Files:
src/sys/dev/nand: nandemulator.c

Log Message:
adjust to nand changes


To generate a diff of this commit:
cvs rdiff -u -r1.4 -r1.5 src/sys/dev/nand/nandemulator.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/nand/nandemulator.c
diff -u src/sys/dev/nand/nandemulator.c:1.4 src/sys/dev/nand/nandemulator.c:1.5
--- src/sys/dev/nand/nandemulator.c:1.4	Tue Apr 26 13:38:13 2011
+++ src/sys/dev/nand/nandemulator.c	Tue Jun 28 10:32:45 2011
@@ -1,4 +1,4 @@
-/*	$NetBSD: nandemulator.c,v 1.4 2011/04/26 13:38:13 ahoka Exp $	*/
+/*	$NetBSD: nandemulator.c,v 1.5 2011/06/28 10:32:45 ahoka Exp $	*/
 
 /*-
  * Copyright (c) 2011 Department of Software Engineering,
@@ -32,7 +32,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: nandemulator.c,v 1.4 2011/04/26 13:38:13 ahoka Exp $);
+__KERNEL_RCSID(0, $NetBSD: nandemulator.c,v 1.5 2011/06/28 10:32:45 ahoka Exp $);
 
 #include sys/param.h
 #include sys/device.h
@@ -57,14 +57,14 @@
 static void nandemulator_command(device_t, uint8_t);
 static void nandemulator_address(device_t, uint8_t);
 static void nandemulator_busy(device_t);
-static void nandemulator_read_byte(device_t, uint8_t *);
-static void nandemulator_write_byte(device_t, uint8_t);
-static void nandemulator_read_word(device_t, uint16_t *);
-static void nandemulator_write_word(device_t, uint16_t);
-static void nandemulator_read_buf_byte(device_t, void *, size_t);
-static void nandemulator_read_buf_word(device_t, void *, size_t);
-static void nandemulator_write_buf_byte(device_t, const void *, size_t);
-static void nandemulator_write_buf_word(device_t, const void *, size_t);
+static void nandemulator_read_1(device_t, uint8_t *);
+static void nandemulator_write_1(device_t, uint8_t);
+static void nandemulator_read_2(device_t, uint16_t *);
+static void nandemulator_write_2(device_t, uint16_t);
+static void nandemulator_read_buf_1(device_t, void *, size_t);
+static void nandemulator_read_buf_2(device_t, void *, size_t);
+static void nandemulator_write_buf_1(device_t, const void *, size_t);
+static void nandemulator_write_buf_2(device_t, const void *, size_t);
 
 static size_t nandemulator_address_to_page(device_t);
 static size_t nandemulator_page_to_backend_offset(device_t, size_t);
@@ -186,14 +186,14 @@
 
 	sc-sc_nand_if.command = nandemulator_command;
 	sc-sc_nand_if.address = nandemulator_address;
-	sc-sc_nand_if.read_buf_byte = nandemulator_read_buf_byte;
-	sc-sc_nand_if.read_buf_word = nandemulator_read_buf_word;
-	sc-sc_nand_if.read_byte = nandemulator_read_byte;
-	sc-sc_nand_if.read_word = nandemulator_read_word;
-	sc-sc_nand_if.write_buf_byte = nandemulator_write_buf_byte;
-	sc-sc_nand_if.write_buf_word = nandemulator_write_buf_word;
-	sc-sc_nand_if.write_byte = nandemulator_write_byte;
-	sc-sc_nand_if.write_word = nandemulator_write_word;
+	sc-sc_nand_if.read_buf_1 = nandemulator_read_buf_1;
+	sc-sc_nand_if.read_buf_2 = nandemulator_read_buf_2;
+	sc-sc_nand_if.read_1 = nandemulator_read_1;
+	sc-sc_nand_if.read_2 = nandemulator_read_2;
+	sc-sc_nand_if.write_buf_1 = nandemulator_write_buf_1;
+	sc-sc_nand_if.write_buf_2 = nandemulator_write_buf_2;
+	sc-sc_nand_if.write_1 = nandemulator_write_1;
+	sc-sc_nand_if.write_2 = nandemulator_write_2;
 	sc-sc_nand_if.busy = nandemulator_busy;
 
 	sc-sc_nand_if.ecc.necc_code_size = 3;
@@ -326,7 +326,7 @@
 
 	KASSERT(sc-sc_address_counter ==
 	sc-sc_column_cycles + sc-sc_row_cycles);
-	
+
 	if (sc-sc_address_counter !=
 	sc-sc_column_cycles + sc-sc_row_cycles) {
 		aprint_error_dev(self, incorrect number of address cycles\n);
@@ -472,7 +472,7 @@
 		sc-sc_address = 8;
 		sc-sc_address |= address;
 		sc-sc_address_counter++;
-		
+
 		if (sc-sc_address_counter ==
 		sc-sc_column_cycles + sc-sc_row_cycles) {
 			nandemulator_address_chip(self);
@@ -505,7 +505,7 @@
 }
 
 static void
-nandemulator_read_byte(device_t self, uint8_t *data)
+nandemulator_read_1(device_t self, uint8_t *data)
 {
 	struct nandemulator_softc *sc = device_private(self);
 
@@ -523,7 +523,7 @@
 }
 
 static void
-nandemulator_write_byte(device_t self, uint8_t data)
+nandemulator_write_1(device_t self, uint8_t data)
 {
 	struct nandemulator_softc *sc = device_private(self);
 
@@ -548,7 +548,7 @@
 }
 
 static void
-nandemulator_read_word(device_t self, uint16_t *data)
+nandemulator_read_2(device_t self, uint16_t *data)
 {
 	struct nandemulator_softc *sc = device_private(self);
 
@@ -574,7 +574,7 @@
 }
 
 static void
-nandemulator_write_word(device_t self, uint16_t data)
+nandemulator_write_2(device_t self, uint16_t data)
 {
 	struct nandemulator_softc *sc = device_private(self);
 
@@ -607,7 +607,7 @@
 }
 
 static void
-nandemulator_read_buf_byte(device_t self, void *buf, size_t len)
+nandemulator_read_buf_1(device_t self, void *buf, size_t len)
 {
 	uint8_t *addr;
 
@@ -616,13 

CVS commit: src/sys/arch/powerpc/ibm4xx

2011-06-28 Thread KIYOHARA Takashi
Module Name:src
Committed By:   kiyohara
Date:   Tue Jun 28 11:42:51 UTC 2011

Modified Files:
src/sys/arch/powerpc/ibm4xx: trap_subr.S

Log Message:
Must need srr0 and srr1 in FRAME_SETUP and trapexit.
parentheses is good.
Remove no-need 'addi FRAME_TF'.


To generate a diff of this commit:
cvs rdiff -u -r1.17 -r1.18 src/sys/arch/powerpc/ibm4xx/trap_subr.S

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

Modified files:

Index: src/sys/arch/powerpc/ibm4xx/trap_subr.S
diff -u src/sys/arch/powerpc/ibm4xx/trap_subr.S:1.17 src/sys/arch/powerpc/ibm4xx/trap_subr.S:1.18
--- src/sys/arch/powerpc/ibm4xx/trap_subr.S:1.17	Fri Jun 24 03:53:46 2011
+++ src/sys/arch/powerpc/ibm4xx/trap_subr.S	Tue Jun 28 11:42:51 2011
@@ -1,4 +1,4 @@
-/*	$NetBSD: trap_subr.S,v 1.17 2011/06/24 03:53:46 kiyohara Exp $	*/
+/*	$NetBSD: trap_subr.S,v 1.18 2011/06/28 11:42:51 kiyohara Exp $	*/
 
 /*
  * Copyright 2001 Wasabi Systems, Inc.
@@ -208,6 +208,9 @@
 	stmw	%r28,CI_DDBSAVE(%r1)	/* free r28-r31 */
 	mflr	%r28			/* save LR */
 	mfcr	%r29			/* save CR */
+	mfsrr0	%r30;
+	mfsrr1	%r31;
+	stmw	%r30,(CI_DDBSAVE+CPUSAVE_SRR0)(%r1);	/* save srr0/srr1 */
 	lis	%r1,ddbstk+INTSTK-CALLFRAMELEN@ha	/* get new SP */
 	addi	%r1,%r1,ddbstk+INTSTK-CALLFRAMELEN@l
 	bla	ddbtrap
@@ -228,6 +231,9 @@
 	stmw	%r28,CI_IPKDBSAVE(%r1)	/* free r28-r31 */
 	mflr	%r28			/* save LR */
 	mfcr	%r29			/* save CR */
+	mfsrr0	%r30;
+	mfsrr1	%r31;
+	stmw	%r30,(CI_IPKDBSAVE+CPUSAVE_SRR0)(%r1);	/* save srr0/srr1 */
 	lis	%r1,ipkdbstk+INTSTK-CALLFRAMELEN@ha	/* get new SP */
 	addi	%r1,%r1,ipkdbstk+INTSTK-CALLFRAMELEN@l
 	bla	ipkdbtrap
@@ -516,12 +522,12 @@
 	mtsprg1	%r1
 	GET_CPUINFO(%r4)
 	mfmsr	%r3
-	stw	%r3,CI_DDBSAVE+CPUSAVE_SRR1(%r4)
+	stw	%r3,(CI_DDBSAVE+CPUSAVE_SRR1)(%r4)
 	wrteei	0			/* disable interrupts */
 	isync
 	stmw	%r28,CI_DDBSAVE(%r4)
 	mflr	%r28
-	stw	%r28,CI_DDBSAVE+CPUSAVE_SRR0(%r4)
+	stw	%r28,(CI_DDBSAVE+CPUSAVE_SRR0)(%r4)
 	li	%r29,EXC_BPT
 	mtlr	%r29
 	mfcr	%r29
@@ -535,7 +541,6 @@
 	addi	%r3,%r1,FRAME_TF
 	bl	_C_LABEL(ddb_trap_glue)
 	or.	%r3,%r3,%r3
-	addi	%r3,%r1,FRAME_TF
 	beq	trapagain
 	b	trapexit
 #endif /* DDB || KGDB */



CVS commit: src/usr.bin/elf2aout

2011-06-28 Thread Izumi Tsutsui
Module Name:src
Committed By:   tsutsui
Date:   Tue Jun 28 13:15:24 UTC 2011

Modified Files:
src/usr.bin/elf2aout: elf2aout.c

Log Message:
ANSIfy, de-__P(), KNF, misc cosmetics.


To generate a diff of this commit:
cvs rdiff -u -r1.12 -r1.13 src/usr.bin/elf2aout/elf2aout.c

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

Modified files:

Index: src/usr.bin/elf2aout/elf2aout.c
diff -u src/usr.bin/elf2aout/elf2aout.c:1.12 src/usr.bin/elf2aout/elf2aout.c:1.13
--- src/usr.bin/elf2aout/elf2aout.c:1.12	Sat Apr 18 10:12:42 2009
+++ src/usr.bin/elf2aout/elf2aout.c	Tue Jun 28 13:15:24 2011
@@ -1,4 +1,4 @@
-/*	$NetBSD: elf2aout.c,v 1.12 2009/04/18 10:12:42 dogcow Exp $	*/
+/*	$NetBSD: elf2aout.c,v 1.13 2011/06/28 13:15:24 tsutsui Exp $	*/
 
 /*
  * Copyright (c) 1995
@@ -54,11 +54,11 @@
 	unsigned long len;
 };
 
-void	combine __P((struct sect *, struct sect *, int));
-int	phcmp __P((const void *, const void *));
-char   *saveRead __P((int file, off_t offset, off_t len, const char *name));
-void	copy __P((int, int, off_t, off_t));
-void	translate_syms __P((int, int, off_t, off_t, off_t, off_t));
+void	combine(struct sect *, struct sect *, int);
+int	phcmp(const void *, const void *);
+char   *saveRead(int file, off_t offset, off_t len, const char *name);
+void	copy(int, int, off_t, off_t);
+void	translate_syms(int, int, off_t, off_t, off_t, off_t);
 
 int*symTypeTable;
 
@@ -118,8 +118,8 @@
 
 	/* Find space for a table matching ELF section indices to a.out symbol
 	 * types. */
-	symTypeTable = (int *) malloc(ex.e_shnum * sizeof(int));
-	if (!symTypeTable) {
+	symTypeTable = malloc(ex.e_shnum * sizeof(int));
+	if (symTypeTable == NULL) {
 		fprintf(stderr, symTypeTable: can't allocate.\n);
 		exit(1);
 	}
@@ -196,7 +196,7 @@
 	/* If there's a data section but no text section, then the loader
 	 * combined everything into one section.   That needs to be the text
 	 * section, so just make the data section zero length following text. */
-	if (data.len  !text.len) {
+	if (data.len  text.len == 0) {
 		text = data;
 		data.vaddr = text.vaddr + text.len;
 		data.len = 0;
@@ -213,7 +213,7 @@
 	if (ex.e_machine == EM_PPC)
 		aex.a_midmag = htonl((symflag  26) | (MID_POWERPC  16)
 			| OMAGIC);
-		
+
 	aex.a_text = text.len;
 	aex.a_data = data.len;
 	aex.a_bss = bss.len;
@@ -287,10 +287,8 @@
nlist format and write it to out. */
 
 void
-translate_syms(out, in, symoff, symsize, stroff, strsize)
-	int out, in;
-	off_t   symoff, symsize;
-	off_t   stroff, strsize;
+translate_syms(int out, int in, off_t symoff, off_t symsize,
+off_t stroff, off_t strsize)
 {
 #define SYMS_PER_PASS	64
 	Elf32_Sym inbuf[64];
@@ -314,8 +312,8 @@
 	 * the string table - if that assumption is bad, this could easily
 	 * blow up. */
 	newstringsize = strsize + remaining;
-	newstrings = (char *) malloc(newstringsize);
-	if (!newstrings) {
+	newstrings = malloc(newstringsize);
+	if (newstrings == NULL) {
 		fprintf(stderr, No memory for new string table!\n);
 		exit(1);
 	}
@@ -398,9 +396,7 @@
 }
 
 void
-copy(out, in, offset, size)
-	int out, in;
-	off_t   offset, size;
+copy(int out, int in, off_t offset, off_t size)
 {
 	charibuf[4096];
 	int remaining, cur, count;
@@ -430,11 +426,10 @@
 /* Combine two segments, which must be contiguous.   If pad is true, it's
okay for there to be padding between. */
 void
-combine(base, new, pad)
-	struct sect *base, *new;
-	int pad;
+combine(struct sect *base, struct sect *new, int pad)
 {
-	if (!base-len)
+
+	if (base-len == 0)
 		*base = *new;
 	else
 		if (new-len) {
@@ -452,12 +447,12 @@
 }
 
 int
-phcmp(vh1, vh2)
-	const void *vh1, *vh2;
+phcmp(const void *vh1, const void *vh2)
 {
 	const Elf32_Phdr *h1, *h2;
-	h1 = (const Elf32_Phdr *) vh1;
-	h2 = (const Elf32_Phdr *) vh2;
+
+	h1 = (const Elf32_Phdr *)vh1;
+	h2 = (const Elf32_Phdr *)vh2;
 
 	if (h1-p_vaddr  h2-p_vaddr)
 		return 1;
@@ -468,7 +463,7 @@
 			return 0;
 }
 
-char   *
+char *
 saveRead(int file, off_t offset, off_t len, const char *name)
 {
 	char   *tmp;
@@ -478,7 +473,7 @@
 		fprintf(stderr, %s: fseek: %s\n, name, strerror(errno));
 		exit(1);
 	}
-	if (!(tmp = (char *) malloc(len)))
+	if ((tmp = malloc(len)) == NULL)
 		errx(1, %s: Can't allocate %ld bytes., name, (long)len);
 	count = read(file, tmp, len);
 	if (count != len) {



CVS commit: src/usr.bin/elf2ecoff

2011-06-28 Thread Izumi Tsutsui
Module Name:src
Committed By:   tsutsui
Date:   Tue Jun 28 13:13:16 UTC 2011

Modified Files:
src/usr.bin/elf2ecoff: elf2ecoff.c

Log Message:
ANSIfy, KNF, misc cosmetics.


To generate a diff of this commit:
cvs rdiff -u -r1.26 -r1.27 src/usr.bin/elf2ecoff/elf2ecoff.c

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

Modified files:

Index: src/usr.bin/elf2ecoff/elf2ecoff.c
diff -u src/usr.bin/elf2ecoff/elf2ecoff.c:1.26 src/usr.bin/elf2ecoff/elf2ecoff.c:1.27
--- src/usr.bin/elf2ecoff/elf2ecoff.c:1.26	Sat Dec 19 10:27:13 2009
+++ src/usr.bin/elf2ecoff/elf2ecoff.c	Tue Jun 28 13:13:15 2011
@@ -1,4 +1,4 @@
-/*	$NetBSD: elf2ecoff.c,v 1.26 2009/12/19 10:27:13 tsutsui Exp $	*/
+/*	$NetBSD: elf2ecoff.c,v 1.27 2011/06/28 13:13:15 tsutsui Exp $	*/
 
 /*
  * Copyright (c) 1997 Jonathan Stone
@@ -84,22 +84,19 @@
 voidcopy(int, int, off_t, off_t);
 voidcombine(struct sect * base, struct sect * new, int paddable);
 voidtranslate_syms(struct elf_syms *, struct ecoff_syms *);
-void 
-elf_symbol_table_to_ecoff(int out, int in,
-struct ecoff_exechdr * ep,
-off_t symoff, off_t symsize,
-off_t stroff, off_t strsize);
-
-
-int 
-make_ecoff_section_hdrs(struct ecoff_exechdr * ep,
-struct ecoff_scnhdr * esecs);
-
-void 
-write_ecoff_symhdr(int outfile, struct ecoff_exechdr * ep,
-struct ecoff_symhdr * symhdrp,
-long nesyms, long extsymoff, long extstroff,
-long strsize);
+void	elf_symbol_table_to_ecoff(int out, int in,
+	struct ecoff_exechdr * ep,
+	off_t symoff, off_t symsize,
+	off_t stroff, off_t strsize);
+
+
+int	make_ecoff_section_hdrs(struct ecoff_exechdr * ep,
+	struct ecoff_scnhdr * esecs);
+
+void	write_ecoff_symhdr(int outfile, struct ecoff_exechdr * ep,
+	struct ecoff_symhdr * symhdrp,
+	long nesyms, long extsymoff, long extstroff,
+	long strsize);
 
 voidpad16(int fd, int size, const char *msg);
 void	bswap32_region(int32_t* , int);
@@ -110,9 +107,8 @@
 
 
 
-void
-elf_read_syms(struct elf_syms * elfsymsp, int infile,
-off_t symoff, off_t symsize, off_t stroff, off_t strsize);
+void	elf_read_syms(struct elf_syms * elfsymsp, int infile,
+	off_t symoff, off_t symsize, off_t stroff, off_t strsize);
 
 
 int
@@ -309,7 +305,7 @@
 	/* If there's a data section but no text section, then the loader
 	 * combined everything into one section.   That needs to be the text
 	 * section, so just make the data section zero length following text. */
-	if (data.len  !text.len) {
+	if (data.len  text.len == 0) {
 		text = data;
 		data.vaddr = text.vaddr + text.len;
 		data.len = 0;
@@ -486,9 +482,7 @@
 }
 
 void
-copy(out, in, offset, size)
-	int out, in;
-	off_t   offset, size;
+copy(int out, int in, off_t offset, off_t size)
 {
 	charibuf[4096];
 	size_t  remaining, cur, count;
@@ -515,11 +509,10 @@
 /* Combine two segments, which must be contiguous.   If pad is true, it's
okay for there to be padding between. */
 void
-combine(base, new, pad)
-	struct sect *base, *new;
-	int pad;
+combine(struct sect *base, struct sect *new, int pad)
 {
-	if (!base-len)
+
+	if (base-len == 0)
 		*base = *new;
 	else
 		if (new-len) {
@@ -537,9 +530,9 @@
 }
 
 int
-phcmp(h1, h2)
-	Elf32_Phdr *h1, *h2;
+phcmp(Elf32_Phdr *h1, Elf32_Phdr *h2)
 {
+
 	if (h1-p_vaddr  h2-p_vaddr)
 		return 1;
 	else
@@ -549,18 +542,18 @@
 			return 0;
 }
 
-char
-   *
+char *
 saveRead(int file, off_t offset, off_t len, const char *name)
 {
 	char   *tmp;
 	int count;
 	off_t   off;
+
 	if ((off = lseek(file, offset, SEEK_SET))  0) {
 		fprintf(stderr, %s: fseek: %s\n, name, strerror(errno));
 		exit(1);
 	}
-	if (!(tmp = (char *) malloc(len))) {
+	if ((tmp = malloc(len)) == NULL) {
 		fprintf(stderr, %s: Can't allocate %ld bytes.\n, name, (long) len);
 		exit(1);
 	}
@@ -577,6 +570,7 @@
 safewrite(int outfile, const void *buf, off_t len, const char *msg)
 {
 	int written;
+
 	written = write(outfile, buf, len);
 	if (written != len) {
 		fprintf(stderr, msg, strerror(errno));
@@ -590,11 +584,9 @@
  * for text, data, and bss.
  */
 int
-make_ecoff_section_hdrs(ep, esecs)
-	struct ecoff_exechdr *ep;
-	struct ecoff_scnhdr *esecs;
-
+make_ecoff_section_hdrs(struct ecoff_exechdr *ep, struct ecoff_scnhdr *esecs)
 {
+
 	ep-f.f_nscns = 6;	/* XXX */
 
 	strcpy(esecs[0].s_name, .text);
@@ -640,12 +632,11 @@
  * Mark all symbols as EXTERN (for now).
  */
 void
-write_ecoff_symhdr(out, ep, symhdrp, nesyms, extsymoff, extstroff, strsize)
-	int out;
-	struct ecoff_exechdr *ep;
-	struct ecoff_symhdr *symhdrp;
-	longnesyms, extsymoff, extstroff, strsize;
+write_ecoff_symhdr(int out, struct ecoff_exechdr *ep,
+struct ecoff_symhdr *symhdrp, long nesyms,
+long extsymoff, long extstroff, long strsize)
 {
+
 	if (debug)
 		fprintf(stderr, writing symhdr for %ld entries at offset 0x%lx\n,
 		nesyms, (u_long) ep-f.f_symptr);
@@ -672,18 +663,15 @@
 		symhdrp-magic = 

CVS commit: src/sys/dev/pci

2011-06-28 Thread Stephen Borrill
Module Name:src
Committed By:   sborrill
Date:   Tue Jun 28 14:22:36 UTC 2011

Modified Files:
src/sys/dev/pci: pcidevs

Log Message:
Add Nvidia GeForce 8500 GT


To generate a diff of this commit:
cvs rdiff -u -r1.1086 -r1.1087 src/sys/dev/pci/pcidevs

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

Modified files:

Index: src/sys/dev/pci/pcidevs
diff -u src/sys/dev/pci/pcidevs:1.1086 src/sys/dev/pci/pcidevs:1.1087
--- src/sys/dev/pci/pcidevs:1.1086	Mon Jun 27 14:52:44 2011
+++ src/sys/dev/pci/pcidevs	Tue Jun 28 14:22:36 2011
@@ -1,4 +1,4 @@
-$NetBSD: pcidevs,v 1.1086 2011/06/27 14:52:44 nonaka Exp $
+$NetBSD: pcidevs,v 1.1087 2011/06/28 14:22:36 sborrill Exp $
 
 /*
  * Copyright (c) 1995, 1996 Christopher G. Demetriou
@@ -3679,6 +3679,7 @@
 product NVIDIA	MCP61_LAN4	0x03ef	nForce MCP61 Gigabit Ethernet Controller
 product NVIDIA	MCP61_SATA2	0x03f6	nForce MCP61 Serial ATA Controller
 product NVIDIA	MCP61_SATA3	0x03f7	nForce MCP61 Serial ATA Controller
+product NVIDIA	GF_8500_GT	0x0421	GeForce 8500 GT
 product NVIDIA	GF_8400M_GS	0x0427	GeForce 8400M GS
 product NVIDIA	QUADRO_NVS140M	0x0429	Quadro NVS 140M
 product NVIDIA	MCP65_ISA	0x0440	nForce MCP65 PCI-ISA Bridge



CVS commit: src/sys/dev/pci

2011-06-28 Thread Stephen Borrill
Module Name:src
Committed By:   sborrill
Date:   Tue Jun 28 14:58:35 UTC 2011

Modified Files:
src/sys/dev/pci: pcidevs.h pcidevs_data.h

Log Message:
Regen


To generate a diff of this commit:
cvs rdiff -u -r1.1082 -r1.1083 src/sys/dev/pci/pcidevs.h
cvs rdiff -u -r1.1081 -r1.1082 src/sys/dev/pci/pcidevs_data.h

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

Modified files:

Index: src/sys/dev/pci/pcidevs.h
diff -u src/sys/dev/pci/pcidevs.h:1.1082 src/sys/dev/pci/pcidevs.h:1.1083
--- src/sys/dev/pci/pcidevs.h:1.1082	Mon Jun 27 14:53:25 2011
+++ src/sys/dev/pci/pcidevs.h	Tue Jun 28 14:58:33 2011
@@ -1,10 +1,10 @@
-/*	$NetBSD: pcidevs.h,v 1.1082 2011/06/27 14:53:25 nonaka Exp $	*/
+/*	$NetBSD: pcidevs.h,v 1.1083 2011/06/28 14:58:33 sborrill Exp $	*/
 
 /*
  * THIS FILE AUTOMATICALLY GENERATED.  DO NOT EDIT.
  *
  * generated from:
- *	NetBSD: pcidevs,v 1.1086 2011/06/27 14:52:44 nonaka Exp
+ *	NetBSD: pcidevs,v 1.1087 2011/06/28 14:22:36 sborrill Exp
  */
 
 /*
@@ -3686,6 +3686,7 @@
 #define	PCI_PRODUCT_NVIDIA_MCP61_LAN4	0x03ef		/* nForce MCP61 Gigabit Ethernet Controller */
 #define	PCI_PRODUCT_NVIDIA_MCP61_SATA2	0x03f6		/* nForce MCP61 Serial ATA Controller */
 #define	PCI_PRODUCT_NVIDIA_MCP61_SATA3	0x03f7		/* nForce MCP61 Serial ATA Controller */
+#define	PCI_PRODUCT_NVIDIA_GF_8500_GT	0x0421		/* GeForce 8500 GT */
 #define	PCI_PRODUCT_NVIDIA_GF_8400M_GS	0x0427		/* GeForce 8400M GS */
 #define	PCI_PRODUCT_NVIDIA_QUADRO_NVS140M	0x0429		/* Quadro NVS 140M */
 #define	PCI_PRODUCT_NVIDIA_MCP65_ISA	0x0440		/* nForce MCP65 PCI-ISA Bridge */

Index: src/sys/dev/pci/pcidevs_data.h
diff -u src/sys/dev/pci/pcidevs_data.h:1.1081 src/sys/dev/pci/pcidevs_data.h:1.1082
--- src/sys/dev/pci/pcidevs_data.h:1.1081	Mon Jun 27 14:53:26 2011
+++ src/sys/dev/pci/pcidevs_data.h	Tue Jun 28 14:58:34 2011
@@ -1,10 +1,10 @@
-/*	$NetBSD: pcidevs_data.h,v 1.1081 2011/06/27 14:53:26 nonaka Exp $	*/
+/*	$NetBSD: pcidevs_data.h,v 1.1082 2011/06/28 14:58:34 sborrill Exp $	*/
 
 /*
  * THIS FILE AUTOMATICALLY GENERATED.  DO NOT EDIT.
  *
  * generated from:
- *	NetBSD: pcidevs,v 1.1086 2011/06/27 14:52:44 nonaka Exp
+ *	NetBSD: pcidevs,v 1.1087 2011/06/28 14:22:36 sborrill Exp
  */
 
 /*
@@ -5943,6 +5943,8 @@
 	21224, 21523, 10147, 6141, 6150, 0,
 	PCI_VENDOR_NVIDIA, PCI_PRODUCT_NVIDIA_MCP61_SATA3, 
 	21224, 21523, 10147, 6141, 6150, 0,
+	PCI_VENDOR_NVIDIA, PCI_PRODUCT_NVIDIA_GF_8500_GT, 
+	20997, 8816, 21010, 0,
 	PCI_VENDOR_NVIDIA, PCI_PRODUCT_NVIDIA_GF_8400M_GS, 
 	20997, 21529, 21535, 0,
 	PCI_VENDOR_NVIDIA, PCI_PRODUCT_NVIDIA_QUADRO_NVS140M, 
@@ -9046,7 +9048,7 @@
 	7000\0 /* 2 refs @ 8801 */
 	IGP\0 /* 7 refs @ 8806 */
 	(A4+)\0 /* 1 refs @ 8810 */
-	8500\0 /* 4 refs @ 8816 */
+	8500\0 /* 5 refs @ 8816 */
 	AIW\0 /* 2 refs @ 8821 */
 	BB\0 /* 1 refs @ 8825 */
 	BC\0 /* 1 refs @ 8828 */
@@ -10720,9 +10722,9 @@
 	Model\0 /* 1 refs @ 20982 */
 	64\0 /* 1 refs @ 20988 */
 	MCP04\0 /* 7 refs @ 20991 */
-	GeForce\0 /* 26 refs @ 20997 */
+	GeForce\0 /* 27 refs @ 20997 */
 	6800\0 /* 4 refs @ 21005 */
-	GT\0 /* 1 refs @ 21010 */
+	GT\0 /* 2 refs @ 21010 */
 	nForce4\0 /* 14 refs @ 21013 */
 	ATA133\0 /* 13 refs @ 21021 */
 	nForce2\0 /* 27 refs @ 21028 */



CVS commit: src/lib/libperfuse

2011-06-28 Thread Emmanuel Dreyfus
Module Name:src
Committed By:   manu
Date:   Tue Jun 28 16:19:16 UTC 2011

Modified Files:
src/lib/libperfuse: Makefile fuse.h ops.c perfuse.c perfuse_priv.h
subr.c

Log Message:
Add support for extended attributes


To generate a diff of this commit:
cvs rdiff -u -r1.4 -r1.5 src/lib/libperfuse/Makefile
cvs rdiff -u -r1.3 -r1.4 src/lib/libperfuse/fuse.h
cvs rdiff -u -r1.30 -r1.31 src/lib/libperfuse/ops.c
cvs rdiff -u -r1.15 -r1.16 src/lib/libperfuse/perfuse.c
cvs rdiff -u -r1.18 -r1.19 src/lib/libperfuse/perfuse_priv.h
cvs rdiff -u -r1.11 -r1.12 src/lib/libperfuse/subr.c

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

Modified files:

Index: src/lib/libperfuse/Makefile
diff -u src/lib/libperfuse/Makefile:1.4 src/lib/libperfuse/Makefile:1.5
--- src/lib/libperfuse/Makefile:1.4	Thu May 26 12:56:30 2011
+++ src/lib/libperfuse/Makefile	Tue Jun 28 16:19:16 2011
@@ -1,11 +1,9 @@
-# $NetBSD: Makefile,v 1.4 2011/05/26 12:56:30 joerg Exp $
+# $NetBSD: Makefile,v 1.5 2011/06/28 16:19:16 manu Exp $
 
 LIB=perfuse
-LIBDPLIBS+= puffs	${.CURDIR}/../libpuffs
+LIBDPLIBS+= puffs	/usr/src/lib/libpuffs
 
-.ifdef DEBUG
 PERFUSE_OPT_DEBUG_FLAGS=   -g -DPERFUSE_DEBUG
-.endif
 
 CWARNFLAGS.clang+=	-Wno-format-security
 

Index: src/lib/libperfuse/fuse.h
diff -u src/lib/libperfuse/fuse.h:1.3 src/lib/libperfuse/fuse.h:1.4
--- src/lib/libperfuse/fuse.h:1.3	Wed May 11 14:52:48 2011
+++ src/lib/libperfuse/fuse.h	Tue Jun 28 16:19:16 2011
@@ -1,4 +1,4 @@
-/*  $NetBSD: fuse.h,v 1.3 2011/05/11 14:52:48 jakllsch Exp $ */
+/*  $NetBSD: fuse.h,v 1.4 2011/06/28 16:19:16 manu Exp $ */
 
 /*-
  *  Copyright (c) 2010 Emmanuel Dreyfus. All rights reserved.
@@ -39,6 +39,11 @@
 #define FUSE_BUFSIZE MAX(FUSE_PREF_BUFSIZE /* CONSTCOND */, FUSE_MIN_BUFSIZE)
 #endif /* FUSE_BUFSIZE */
 
+/* From linux/limits.h */
+#define LINUX_XATTR_NAME_MAX   255 
+#define LINUX_XATTR_SIZE_MAX 65536
+#define LINUX_XATTR_LIST_MAX 65536 
+
 struct fuse_attr {
 	uint64_t	ino;
 	uint64_t	size;

Index: src/lib/libperfuse/ops.c
diff -u src/lib/libperfuse/ops.c:1.30 src/lib/libperfuse/ops.c:1.31
--- src/lib/libperfuse/ops.c:1.30	Wed Jun  1 15:54:10 2011
+++ src/lib/libperfuse/ops.c	Tue Jun 28 16:19:16 2011
@@ -1,4 +1,4 @@
-/*  $NetBSD: ops.c,v 1.30 2011/06/01 15:54:10 manu Exp $ */
+/*  $NetBSD: ops.c,v 1.31 2011/06/28 16:19:16 manu Exp $ */
 
 /*-
  *  Copyright (c) 2010-2011 Emmanuel Dreyfus. All rights reserved.
@@ -36,6 +36,7 @@
 #include puffs.h
 #include sys/socket.h
 #include sys/socket.h
+#include sys/extattr.h
 #include machine/vmparam.h
 
 #include perfuse_priv.h
@@ -2924,3 +2925,213 @@
 	return;
 }
 
+/* ARGSUSED4 */
+int
+perfuse_node_getextattr(pu, opc, attrns, attrname, attrsize, attr, resid, pcr)
+	struct puffs_usermount *pu;
+	puffs_cookie_t opc;
+	int attrns;
+	const char *attrname;
+	size_t *attrsize;
+	uint8_t *attr;
+	size_t *resid;
+	const struct puffs_cred *pcr;
+{
+	struct perfuse_state *ps;
+	char fuse_attrname[LINUX_XATTR_NAME_MAX + 1];
+	perfuse_msg_t *pm;
+	struct fuse_getxattr_in *fgi;
+	struct fuse_getxattr_out *fgo;
+	struct fuse_out_header *foh;
+	size_t attrnamelen;
+	size_t len;
+	char *np;
+	int error;
+
+	ps = puffs_getspecific(pu);
+	attrname = perfuse_native_ns(attrns, attrname, fuse_attrname);
+	attrnamelen = strlen(attrname) + 1;
+	len = sizeof(*fgi) + attrnamelen;
+
+	pm = ps-ps_new_msg(pu, opc, FUSE_GETXATTR, len, pcr);
+	fgi = GET_INPAYLOAD(ps, pm, fuse_getxattr_in);
+	fgi-size = (resid != NULL) ? *resid : 0;
+	np = (char *)(void *)(fgi + 1);
+	(void)strlcpy(np, attrname, attrnamelen);
+	
+	if ((error = xchg_msg(pu, opc, pm, UNSPEC_REPLY_LEN, wait_reply)) != 0)
+		goto out;
+
+	/*
+	 * We just get fuse_getattr_out with list size if we requested
+	 * a null size.
+	 */
+	if (resid == NULL) {
+		fgo = GET_OUTPAYLOAD(ps, pm, fuse_getxattr_out);
+
+		if (attrsize != NULL)
+			*attrsize = fgo-size;
+
+		goto out;
+	}
+
+	/*
+	 * And with a non null requested size, we get the list just 
+	 * after the header
+	 */
+	foh = GET_OUTHDR(ps, pm);
+	np = (char *)(void *)(foh + 1);
+
+	if (resid != NULL) {
+		len = MAX(foh-len - sizeof(*foh), *resid);
+		(void)memcpy(attr, np, len);
+		*resid -= len;
+	}
+	
+out: 
+	ps-ps_destroy_msg(pm);
+
+	return error;
+}
+
+int
+perfuse_node_setextattr(pu, opc, attrns, attrname, attr, resid, pcr)
+	struct puffs_usermount *pu;
+	puffs_cookie_t opc;
+	int attrns;
+	const char *attrname;
+	uint8_t *attr;
+	size_t *resid;
+	const struct puffs_cred *pcr;
+{
+	struct perfuse_state *ps;
+	char fuse_attrname[LINUX_XATTR_NAME_MAX + 1];
+	perfuse_msg_t *pm;
+	struct fuse_setxattr_in *fsi;
+	size_t attrnamelen;
+	size_t len;
+	char *np;
+	int error;
+	
+	ps = puffs_getspecific(pu);
+	attrname = perfuse_native_ns(attrns, attrname, fuse_attrname);
+	attrnamelen = strlen(attrname) + 1;
+	len = sizeof(*fsi) + attrnamelen + *resid;
+
+	pm = ps-ps_new_msg(pu, opc, FUSE_SETXATTR, len, pcr);
+	fsi = 

CVS commit: src/distrib/notes/common

2011-06-28 Thread Radoslaw Kujawa
Module Name:src
Committed By:   rkujawa
Date:   Tue Jun 28 17:33:48 UTC 2011

Modified Files:
src/distrib/notes/common: main

Log Message:
Add myself


To generate a diff of this commit:
cvs rdiff -u -r1.479 -r1.480 src/distrib/notes/common/main

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

Modified files:

Index: src/distrib/notes/common/main
diff -u src/distrib/notes/common/main:1.479 src/distrib/notes/common/main:1.480
--- src/distrib/notes/common/main:1.479	Sat May 28 06:00:07 2011
+++ src/distrib/notes/common/main	Tue Jun 28 17:33:47 2011
@@ -1,4 +1,4 @@
-.\	$NetBSD: main,v 1.479 2011/05/28 06:00:07 tsutsui Exp $
+.\	$NetBSD: main,v 1.480 2011/06/28 17:33:47 rkujawa Exp $
 .\
 .\ Copyright (c) 1999-2008 The NetBSD Foundation, Inc.
 .\ All rights reserved.
@@ -1221,6 +1221,7 @@
 .It Ta Wayne Knowles Ta Mt w...@netbsd.org
 .It Ta Takayoshi Kochi Ta Mt ko...@netbsd.org
 .It Ta Jonathan A. Kollasch Ta Mt jakll...@netbsd.org
+.It Ta Radoslaw Kujawa Ta Mt rkuj...@netbsd.org
 .It Ta Jochen Kunz Ta Mt jk...@netbsd.org
 .It Ta Martti Kuparinen Ta Mt mar...@netbsd.org
 .It Ta Arnaud Lacombe Ta Mt a...@netbsd.org



CVS commit: src/sys

2011-06-28 Thread Adam Hoka
Module Name:src
Committed By:   ahoka
Date:   Tue Jun 28 18:14:12 UTC 2011

Modified Files:
src/sys/dev/flash: files.flash flash.c flash.h
src/sys/dev/nand: files.nand nand.c nand.h
src/sys/modules/flash: Makefile
src/sys/modules/nand: Makefile
Added Files:
src/sys/dev/flash: flash_io.c flash_io.h
Removed Files:
src/sys/dev/nand: nand_io.c

Log Message:
Refactor flash and nand driver, so we can reuse the io thread code
in the future nor driver (and any other future driver).

Also simplify some of the code in the process, eg. saner flash attachment.


To generate a diff of this commit:
cvs rdiff -u -r1.1 -r1.2 src/sys/dev/flash/files.flash
cvs rdiff -u -r1.6 -r1.7 src/sys/dev/flash/flash.c
cvs rdiff -u -r1.3 -r1.4 src/sys/dev/flash/flash.h
cvs rdiff -u -r0 -r1.1 src/sys/dev/flash/flash_io.c \
src/sys/dev/flash/flash_io.h
cvs rdiff -u -r1.3 -r1.4 src/sys/dev/nand/files.nand
cvs rdiff -u -r1.12 -r1.13 src/sys/dev/nand/nand.c
cvs rdiff -u -r1.10 -r1.11 src/sys/dev/nand/nand.h
cvs rdiff -u -r1.7 -r0 src/sys/dev/nand/nand_io.c
cvs rdiff -u -r1.1 -r1.2 src/sys/modules/flash/Makefile
cvs rdiff -u -r1.2 -r1.3 src/sys/modules/nand/Makefile

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/flash/files.flash
diff -u src/sys/dev/flash/files.flash:1.1 src/sys/dev/flash/files.flash:1.2
--- src/sys/dev/flash/files.flash:1.1	Sat Feb 26 18:07:30 2011
+++ src/sys/dev/flash/files.flash	Tue Jun 28 18:14:11 2011
@@ -1,9 +1,10 @@
-# $NetBSD: files.flash,v 1.1 2011/02/26 18:07:30 ahoka Exp $
+# $NetBSD: files.flash,v 1.2 2011/06/28 18:14:11 ahoka Exp $
 
 define	flashbus	{ [offset = 0], [size = 0], [readonly = 0] }
 
 device	flash
 attach	flash at flashbus
 file	dev/flash/flash.c		flash
+file	dev/flash/flash_io.c		flash
 
 defflag opt_flash.h			FLASH_STATIC_PARTITIONS

Index: src/sys/dev/flash/flash.c
diff -u src/sys/dev/flash/flash.c:1.6 src/sys/dev/flash/flash.c:1.7
--- src/sys/dev/flash/flash.c:1.6	Tue Jun 28 07:00:17 2011
+++ src/sys/dev/flash/flash.c	Tue Jun 28 18:14:11 2011
@@ -1,4 +1,4 @@
-/*	$NetBSD: flash.c,v 1.6 2011/06/28 07:00:17 ahoka Exp $	*/
+/*	$NetBSD: flash.c,v 1.7 2011/06/28 18:14:11 ahoka Exp $	*/
 
 /*-
  * Copyright (c) 2011 Department of Software Engineering,
@@ -37,7 +37,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: flash.c,v 1.6 2011/06/28 07:00:17 ahoka Exp $);
+__KERNEL_RCSID(0, $NetBSD: flash.c,v 1.7 2011/06/28 18:14:11 ahoka Exp $);
 
 #include sys/param.h
 #include sys/types.h
@@ -61,14 +61,8 @@
 #include sys/flashio.h
 #include flash.h
 
-#define FLASH_DEBUG 1
 #ifdef FLASH_DEBUG
-#define DPRINTF(x)	if (flashdebug) printf x
-#define DPRINTFN(n,x)	if (flashdebug(n)) printf x
-int	flashdebug = FLASH_DEBUG;
-#else
-#define DPRINTF(x)
-#define DPRINTFN(n,x)
+int flashdebug = FLASH_DEBUG;
 #endif
 
 extern struct cfdriver flash_cd;
@@ -146,9 +140,10 @@
 	sc-sc_dev = self;
 	sc-sc_parent_dev = parent;
 	sc-flash_if = faa-flash_if;
+	sc-sc_partinfo = faa-partinfo;
 	sc-hw_softc = device_private(parent);
 
-	format_bytes(pbuf[0], sizeof(pbuf[0]), sc-flash_if-size);
+	format_bytes(pbuf[0], sizeof(pbuf[0]), sc-sc_partinfo.part_size);
 	format_bytes(pbuf[1], sizeof(pbuf[1]), sc-flash_if-erasesize);
 
 	aprint_naive(\n);
@@ -168,10 +163,10 @@
 
 	aprint_normal_dev(sc-sc_dev,
 	size: %#jx, offset: %#jx,
-	(uintmax_t )sc-flash_if-partition.part_size,
-	(uintmax_t )sc-flash_if-partition.part_offset);
+	(uintmax_t )sc-sc_partinfo.part_size,
+	(uintmax_t )sc-sc_partinfo.part_offset);
 
-	if (sc-flash_if-partition.part_flags  FLASH_PART_READONLY) {
+	if (sc-sc_partinfo.part_flags  FLASH_PART_READONLY) {
 		sc-sc_readonly = true;
 		aprint_normal(, read only);
 	} else {
@@ -180,7 +175,7 @@
 
 	aprint_normal(\n);
 
-	if (sc-flash_if-partition.part_size == 0) {
+	if (sc-sc_partinfo.part_size == 0) {
 		aprint_error_dev(self,
 		partition size must be larger than 0\n);
 		return;
@@ -271,7 +266,7 @@
 	int unit = minor(dev);
 	struct flash_softc *sc;
 
-	DPRINTFN(1, (flash: opening device unit %d\n, unit));
+	FLDPRINTFN(1, (flash: opening device unit %d\n, unit));
 
 	if ((sc = device_lookup_private(flash_cd, unit)) == NULL)
 		return ENXIO;
@@ -295,7 +290,7 @@
 	struct flash_softc *sc;
 	int err;
 
-	DPRINTFN(1, (flash: closing flash device unit %d\n, unit));
+	FLDPRINTFN(1, (flash: closing flash device unit %d\n, unit));
 
 	if ((sc = device_lookup_private(flash_cd, unit)) == NULL)
 		return ENXIO;
@@ -348,7 +343,7 @@
 	}
 
 	flash_if = sc-flash_if;
-	part = flash_if-partition;
+	part = sc-sc_partinfo;
 
 	/* divider */
 	KASSERT(flash_if-writesize != 0);
@@ -371,7 +366,7 @@
 		goto done;
 	}
 
-	device_blks = sc-flash_if-size / DEV_BSIZE;
+	device_blks = sc-sc_partinfo.part_size / DEV_BSIZE;
 	KASSERT(part-part_offset % DEV_BSIZE == 0);
 	bp-b_rawblkno = bp-b_blkno + (part-part_offset / DEV_BSIZE);
 
@@ -455,7 +450,7 

CVS commit: src/lib/libperfuse

2011-06-28 Thread Jeff Rizzo
Module Name:src
Committed By:   riz
Date:   Tue Jun 28 20:28:49 UTC 2011

Modified Files:
src/lib/libperfuse: Makefile

Log Message:
Don't hardcode the libpuffs path to /usr/src/lib/libpuffs.


To generate a diff of this commit:
cvs rdiff -u -r1.5 -r1.6 src/lib/libperfuse/Makefile

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

Modified files:

Index: src/lib/libperfuse/Makefile
diff -u src/lib/libperfuse/Makefile:1.5 src/lib/libperfuse/Makefile:1.6
--- src/lib/libperfuse/Makefile:1.5	Tue Jun 28 16:19:16 2011
+++ src/lib/libperfuse/Makefile	Tue Jun 28 20:28:48 2011
@@ -1,7 +1,7 @@
-# $NetBSD: Makefile,v 1.5 2011/06/28 16:19:16 manu Exp $
+# $NetBSD: Makefile,v 1.6 2011/06/28 20:28:48 riz Exp $
 
 LIB=perfuse
-LIBDPLIBS+= puffs	/usr/src/lib/libpuffs
+LIBDPLIBS+= puffs	${.CURDIR}/../libpuffs
 
 PERFUSE_OPT_DEBUG_FLAGS=   -g -DPERFUSE_DEBUG
 



CVS commit: src/sys/sys

2011-06-28 Thread Adam Hoka
Module Name:src
Committed By:   ahoka
Date:   Tue Jun 28 20:49:43 UTC 2011

Modified Files:
src/sys/sys: flashio.h

Log Message:
add flash_addr_t


To generate a diff of this commit:
cvs rdiff -u -r1.3 -r1.4 src/sys/sys/flashio.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/sys/flashio.h
diff -u src/sys/sys/flashio.h:1.3 src/sys/sys/flashio.h:1.4
--- src/sys/sys/flashio.h:1.3	Mon Apr  4 18:23:39 2011
+++ src/sys/sys/flashio.h	Tue Jun 28 20:49:43 2011
@@ -1,4 +1,4 @@
-/*	$NetBSD: flashio.h,v 1.3 2011/04/04 18:23:39 ahoka Exp $	*/
+/*	$NetBSD: flashio.h,v 1.4 2011/06/28 20:49:43 ahoka Exp $	*/
 
 /*-
  * Copyright (c) 2011 Department of Software Engineering,
@@ -61,6 +61,7 @@
 /* common integer type to address flash */
 typedef int64_t flash_off_t;
 typedef uint64_t flash_size_t;
+typedef uint64_t flash_addr_t;
 
 /**
  * struct erase_params - for ioctl erase call



CVS commit: src/sys/dev/flash

2011-06-28 Thread Adam Hoka
Module Name:src
Committed By:   ahoka
Date:   Tue Jun 28 20:58:00 UTC 2011

Modified Files:
src/sys/dev/flash: flash_io.c

Log Message:
use proper format string


To generate a diff of this commit:
cvs rdiff -u -r1.1 -r1.2 src/sys/dev/flash/flash_io.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/flash/flash_io.c
diff -u src/sys/dev/flash/flash_io.c:1.1 src/sys/dev/flash/flash_io.c:1.2
--- src/sys/dev/flash/flash_io.c:1.1	Tue Jun 28 18:14:11 2011
+++ src/sys/dev/flash/flash_io.c	Tue Jun 28 20:58:00 2011
@@ -1,4 +1,4 @@
-/*	$NetBSD: flash_io.c,v 1.1 2011/06/28 18:14:11 ahoka Exp $	*/
+/*	$NetBSD: flash_io.c,v 1.2 2011/06/28 20:58:00 ahoka Exp $	*/
 
 /*-
  * Copyright (c) 2011 Department of Software Engineering,
@@ -32,7 +32,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: flash_io.c,v 1.1 2011/06/28 18:14:11 ahoka Exp $);
+__KERNEL_RCSID(0, $NetBSD: flash_io.c,v 1.2 2011/06/28 20:58:00 ahoka Exp $);
 
 #include sys/param.h
 #include sys/buf.h
@@ -252,7 +252,7 @@
 		goto out;
 	}
 
-	FLDPRINTF((writing %zu bytes to 0x%jx\n,
+	FLDPRINTF((writing % PRIu32  bytes to 0x%jx\n,
 		fio-fio_if-erasesize, (uintmax_t )base));
 
 	error = fio-fio_if-write(fio-fio_dev,



CVS commit: src/sys/dev/flash

2011-06-28 Thread Adam Hoka
Module Name:src
Committed By:   ahoka
Date:   Tue Jun 28 21:01:25 UTC 2011

Modified Files:
src/sys/dev/flash: flash.h

Log Message:
dont define FLASH_DEBUG in header


To generate a diff of this commit:
cvs rdiff -u -r1.4 -r1.5 src/sys/dev/flash/flash.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/flash/flash.h
diff -u src/sys/dev/flash/flash.h:1.4 src/sys/dev/flash/flash.h:1.5
--- src/sys/dev/flash/flash.h:1.4	Tue Jun 28 18:14:11 2011
+++ src/sys/dev/flash/flash.h	Tue Jun 28 21:01:23 2011
@@ -1,4 +1,4 @@
-/*	$NetBSD: flash.h,v 1.4 2011/06/28 18:14:11 ahoka Exp $	*/
+/*	$NetBSD: flash.h,v 1.5 2011/06/28 21:01:23 ahoka Exp $	*/
 
 /*-
  * Copyright (c) 2011 Department of Software Engineering,
@@ -41,7 +41,6 @@
 #include sys/buf.h
 #include sys/flashio.h
 
-#define FLASH_DEBUG 1
 #ifdef FLASH_DEBUG
 #define FLDPRINTF(x)	if (flashdebug) printf x
 #define FLDPRINTFN(n,x)	if (flashdebug(n)) printf x



CVS commit: src/external/lgpl3/gmp

2011-06-28 Thread Simon Burge
Module Name:src
Committed By:   simonb
Date:   Wed Jun 29 01:38:27 UTC 2011

Modified Files:
src/external/lgpl3/gmp: README

Log Message:
Update date (ok phone).


To generate a diff of this commit:
cvs rdiff -u -r1.1 -r1.2 src/external/lgpl3/gmp/README

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

Modified files:

Index: src/external/lgpl3/gmp/README
diff -u src/external/lgpl3/gmp/README:1.1 src/external/lgpl3/gmp/README:1.2
--- src/external/lgpl3/gmp/README:1.1	Fri Jun 24 03:50:23 2011
+++ src/external/lgpl3/gmp/README	Wed Jun 29 01:38:27 2011
@@ -1,4 +1,4 @@
-$NetBSD: README,v 1.1 2011/06/24 03:50:23 mrg Exp $
+$NetBSD: README,v 1.2 2011/06/29 01:38:27 simonb Exp $
 
 GMP in NetBSD.  We need GMP for GCC = 4.2.
 
@@ -43,4 +43,4 @@
 
 
 m...@netbsd.org
-- 2001/06/22
+- 2011/06/22



CVS commit: src/external/gpl3/gcc/usr.bin

2011-06-28 Thread matthew green
Module Name:src
Committed By:   mrg
Date:   Wed Jun 29 02:00:09 UTC 2011

Modified Files:
src/external/gpl3/gcc/usr.bin/g++: Makefile
src/external/gpl3/gcc/usr.bin/gcc: Makefile

Log Message:
these need -lintl now.


To generate a diff of this commit:
cvs rdiff -u -r1.1 -r1.2 src/external/gpl3/gcc/usr.bin/g++/Makefile
cvs rdiff -u -r1.1 -r1.2 src/external/gpl3/gcc/usr.bin/gcc/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/gpl3/gcc/usr.bin/g++/Makefile
diff -u src/external/gpl3/gcc/usr.bin/g++/Makefile:1.1 src/external/gpl3/gcc/usr.bin/g++/Makefile:1.2
--- src/external/gpl3/gcc/usr.bin/g++/Makefile:1.1	Tue Jun 21 06:03:14 2011
+++ src/external/gpl3/gcc/usr.bin/g++/Makefile	Wed Jun 29 02:00:09 2011
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile,v 1.1 2011/06/21 06:03:14 mrg Exp $
+#	$NetBSD: Makefile,v 1.2 2011/06/29 02:00:09 mrg Exp $
 
 PROG=		gplusplus
 PROGNAME=	g++
@@ -15,3 +15,6 @@
 .include ../Makefile.frontend
 
 .PATH: ${DIST}/gcc ${DIST}/gcc/cp
+
+LDADD+=		-lintl
+DPADD+=		${LIBINTL}

Index: src/external/gpl3/gcc/usr.bin/gcc/Makefile
diff -u src/external/gpl3/gcc/usr.bin/gcc/Makefile:1.1 src/external/gpl3/gcc/usr.bin/gcc/Makefile:1.2
--- src/external/gpl3/gcc/usr.bin/gcc/Makefile:1.1	Tue Jun 21 06:03:14 2011
+++ src/external/gpl3/gcc/usr.bin/gcc/Makefile	Wed Jun 29 02:00:09 2011
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile,v 1.1 2011/06/21 06:03:14 mrg Exp $
+#	$NetBSD: Makefile,v 1.2 2011/06/29 02:00:09 mrg Exp $
 
 .include bsd.own.mk
 
@@ -23,4 +23,7 @@
 
 COPTS.builtins.c = -Wno-stack-protector
 
+LDADD+=		-lintl
+DPADD+=		${LIBINTL}
+
 gcc.info: gcc-vers.texi



CVS commit: src/external/gpl3/gcc

2011-06-28 Thread matthew green
Module Name:src
Committed By:   mrg
Date:   Wed Jun 29 02:01:38 UTC 2011

Modified Files:
src/external/gpl3/gcc/lib/libstdc++-v3: Makefile
src/external/gpl3/gcc/lib/libstdc++-v3/include: Makefile
src/external/gpl3/gcc/lib/libstdc++-v3/include/bits: Makefile
src/external/gpl3/gcc/usr.bin/backend: Makefile
src/external/gpl3/gcc/usr.bin/libcpp: Makefile

Log Message:
minor fixes for libstdc++-v3 build.
fix the gengtype call.


To generate a diff of this commit:
cvs rdiff -u -r1.3 -r1.4 src/external/gpl3/gcc/lib/libstdc++-v3/Makefile
cvs rdiff -u -r1.3 -r1.4 \
src/external/gpl3/gcc/lib/libstdc++-v3/include/Makefile
cvs rdiff -u -r1.3 -r1.4 \
src/external/gpl3/gcc/lib/libstdc++-v3/include/bits/Makefile
cvs rdiff -u -r1.4 -r1.5 src/external/gpl3/gcc/usr.bin/backend/Makefile
cvs rdiff -u -r1.2 -r1.3 src/external/gpl3/gcc/usr.bin/libcpp/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/gpl3/gcc/lib/libstdc++-v3/Makefile
diff -u src/external/gpl3/gcc/lib/libstdc++-v3/Makefile:1.3 src/external/gpl3/gcc/lib/libstdc++-v3/Makefile:1.4
--- src/external/gpl3/gcc/lib/libstdc++-v3/Makefile:1.3	Tue Jun 28 04:08:57 2011
+++ src/external/gpl3/gcc/lib/libstdc++-v3/Makefile	Wed Jun 29 02:01:37 2011
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile,v 1.3 2011/06/28 04:08:57 mrg Exp $
+#	$NetBSD: Makefile,v 1.4 2011/06/29 02:01:37 mrg Exp $
 
 REQUIRETOOLS=	yes
 NOLINT=		# defined
@@ -17,13 +17,10 @@
 .include ${.CURDIR}/arch/${MACHINE_ARCH}/defs.mk
 
 SHLIB_MAJOR=	7
-SHLIB_MINOR=	0
+SHLIB_MINOR=	1
 
 SUBDIR=		include
 
-INCS=		c++config.h
-INCSDIR=	/usr/include/g++
-
 .include ${.CURDIR}/../libsupc++/Makefile.common
 
 SRCS=		${LIBSUPCXXSRCS} ${LIBSTDCXXSRCS}

Index: src/external/gpl3/gcc/lib/libstdc++-v3/include/Makefile
diff -u src/external/gpl3/gcc/lib/libstdc++-v3/include/Makefile:1.3 src/external/gpl3/gcc/lib/libstdc++-v3/include/Makefile:1.4
--- src/external/gpl3/gcc/lib/libstdc++-v3/include/Makefile:1.3	Tue Jun 28 04:07:36 2011
+++ src/external/gpl3/gcc/lib/libstdc++-v3/include/Makefile	Wed Jun 29 02:01:37 2011
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile,v 1.3 2011/06/28 04:07:36 mrg Exp $
+#	$NetBSD: Makefile,v 1.4 2011/06/29 02:01:37 mrg Exp $
 
 SUBDIR=		backward ext bits debug tr1
 #SUBDIR+=	pb_assoc
@@ -12,7 +12,12 @@
 DIST=		${NETBSDSRCDIR}/external/gpl3/gcc/dist
 GNUHOSTDIST=	${DIST}
 
-INCS=		exception new typeinfo cxxabi.h exception_defines.h
+# libsupc++
+INCS=		exception new typeinfo cxxabi.h cxxabi-forced.h
+INCS+=		exception_defines.h initializer_list exception_ptr.h
+INCS+=		nested_exception.h
+
+# others
 INCS+=		cerrno
 INCS+=		${G_std_headers} ${G_c_base_headers}
 INCS+=		${G_c_compatibility_headers_extra}

Index: src/external/gpl3/gcc/lib/libstdc++-v3/include/bits/Makefile
diff -u src/external/gpl3/gcc/lib/libstdc++-v3/include/bits/Makefile:1.3 src/external/gpl3/gcc/lib/libstdc++-v3/include/bits/Makefile:1.4
--- src/external/gpl3/gcc/lib/libstdc++-v3/include/bits/Makefile:1.3	Tue Jun 28 04:07:36 2011
+++ src/external/gpl3/gcc/lib/libstdc++-v3/include/bits/Makefile	Wed Jun 29 02:01:37 2011
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile,v 1.3 2011/06/28 04:07:36 mrg Exp $
+#	$NetBSD: Makefile,v 1.4 2011/06/29 02:01:37 mrg Exp $
 
 .include bsd.own.mk
 
@@ -10,6 +10,7 @@
 CONF=		${DIST}/libstdc++-v3/config
 
 INCS=		${G_bits_headers} ${G_c_base_headers_extra} ${G_thread_host_headers} ${G_host_headers_extra} ${G_host_headers}
+INCS+=		c++config.h
 INCSDIR=	/usr/include/g++/bits
 
 CLEANFILES+=	basic_file.h c++io.h c++locale.h

Index: src/external/gpl3/gcc/usr.bin/backend/Makefile
diff -u src/external/gpl3/gcc/usr.bin/backend/Makefile:1.4 src/external/gpl3/gcc/usr.bin/backend/Makefile:1.5
--- src/external/gpl3/gcc/usr.bin/backend/Makefile:1.4	Tue Jun 28 10:11:04 2011
+++ src/external/gpl3/gcc/usr.bin/backend/Makefile	Wed Jun 29 02:01:37 2011
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile,v 1.4 2011/06/28 10:11:04 mrg Exp $
+#	$NetBSD: Makefile,v 1.5 2011/06/29 02:01:37 mrg Exp $
 
 LIBISPRIVATE=	yes
 
@@ -100,14 +100,18 @@
 .endif
 
 gtyp-input.list.tmp: ${GCCARCH}/gtyp-input.list
-	sed s#SRCDIR#${DIST}/#  ${.ALLSRC}  ${.TARGET}
+	sed s#SRCDIR#${DIST}#  ${.ALLSRC}  ${.TARGET}
+CLEANFILES+=	gtyp-input.list.tmp
+
+# XXX
+CLEANFILES+=	gtype-lto.h gtype-objcp.h tm-constrs.h
 
 gtype-desc.c: gtype-desc.h
 gtype-desc.h: gengtype gtyp-input.list.tmp
 	${_MKTARGET_CREATE}
 	rm -f auto-host.h
 	ln -s ${.CURDIR}/../gcc/arch/${MACHINE_ARCH}/auto-host.h .
-	./gengtype ${DIST} gtyp-input.list.tmp
+	./gengtype ${DIST}/gcc gtyp-input.list.tmp
 # gengtype is the real need for options.h
 gengtype.lo gengtype-lex.lo gengtype-parse.lo: ${HH} gtyp-gen.h config.h options.h
 gengtype: gengtype.lo gengtype-lex.lo gengtype-parse.lo build-errors.lo
@@ -321,6 +325,7 @@
 gcov-io.h: gcov-iov.h
 alias.d alias.o: insn-constants.h tm_p.h tm-preds.h
 cgraphunit.d cgraphunit.o: gcov-io.h
+vec.lo: gtype-desc.h
 # 

CVS commit: src/tools/gcc

2011-06-28 Thread matthew green
Module Name:src
Committed By:   mrg
Date:   Wed Jun 29 02:02:38 UTC 2011

Modified Files:
src/tools/gcc: Makefile mknative-gcc

Log Message:
get libdecnumber info out of GCC.


To generate a diff of this commit:
cvs rdiff -u -r1.39 -r1.40 src/tools/gcc/Makefile
cvs rdiff -u -r1.50 -r1.51 src/tools/gcc/mknative-gcc

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

Modified files:

Index: src/tools/gcc/Makefile
diff -u src/tools/gcc/Makefile:1.39 src/tools/gcc/Makefile:1.40
--- src/tools/gcc/Makefile:1.39	Thu Jun 23 05:42:37 2011
+++ src/tools/gcc/Makefile	Wed Jun 29 02:02:38 2011
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile,v 1.39 2011/06/23 05:42:37 mrg Exp $
+#	$NetBSD: Makefile,v 1.40 2011/06/29 02:02:38 mrg Exp $
 
 .include bsd.own.mk
 
@@ -142,7 +142,8 @@
 		(cd .native  ${MKNATIVE_ENV} ${BUILD_MAKE} all-build-libiberty)
 	PATH=${TOOLDIR}/bin:$$PATH; export PATH; \
 		(cd .native  ${MKNATIVE_ENV} ${BUILD_MAKE} configure-gcc configure-libcpp)  \
-		(cd .native  ${MKNATIVE_ENV} ${BUILD_MAKE} configure-libiberty)
+		(cd .native  ${MKNATIVE_ENV} ${BUILD_MAKE} configure-libiberty)  \
+		(cd .native  ${MKNATIVE_ENV} ${BUILD_MAKE} configure-libdecnumber)
 	# edit Makefile so that maybe-all-gcc does not depend on all-gcc any more.
 		(cd .native  mv Makefile Makefile.config  \
 			${TOOL_SED} -e 's/\(maybe-all-gcc:\) all-gcc/\1/' \

Index: src/tools/gcc/mknative-gcc
diff -u src/tools/gcc/mknative-gcc:1.50 src/tools/gcc/mknative-gcc:1.51
--- src/tools/gcc/mknative-gcc:1.50	Tue Jun 28 04:30:32 2011
+++ src/tools/gcc/mknative-gcc	Wed Jun 29 02:02:38 2011
@@ -1,5 +1,5 @@
 #!/bin/sh
-#	$NetBSD: mknative-gcc,v 1.50 2011/06/28 04:30:32 mrg Exp $
+#	$NetBSD: mknative-gcc,v 1.51 2011/06/29 02:02:38 mrg Exp $
 #
 # Shell script for generating all the constants needed for a native
 # platform build of src/gnu/dist/gcc.
@@ -434,6 +434,16 @@
 		$_TMPDIR/libiberty/config.h
 }
 
+# lib/libdecnumber #
+
+get_libdecnumber () {
+	_subdir=$1
+
+	mkdir -p $_OUTDIR/lib/$_subdir/arch/$MACHINE_ARCH
+	write_c $_OUTDIRBASE/lib/$_subdir/arch/$MACHINE_ARCH/config.h \
+		$_TMPDIR/libdecnumber/config.h
+}
+
 # gnu/lib/libobjc #
 
 get_libobjc () {
@@ -567,7 +577,7 @@
 		getvars gcc/Makefile \
 			F77_OBJS | sed 's/f\///g'
 		case ${_subdir} in
-		gcc4)
+		gcc4 | gcc)
 			getvars libcpp/Makefile \
 libcpp_a_OBJS
 			;;
@@ -592,16 +602,18 @@
 		hfiles='auto-host gencheck configargs gthr-default tm bconfig config multilib'
 		;;
 	gcc)
-		write_c $_OUTDIRBASE/usr.bin/$_subdir/libcpp/arch/$MACHINE_ARCH/config.h $_TMPDIR/libcpp/config.h
-		hfiles='auto-host configargs gthr-default tm bconfig config multilib'
+		mkdir -p $_OUTDIR/usr.bin/libcpp/arch/$MACHINE_ARCH
+		write_c $_OUTDIRBASE/usr.bin/libcpp/arch/$MACHINE_ARCH/config.h $_TMPDIR/libcpp/config.h
+		hfiles='auto-host configargs gthr-default tm bconfig config multilib bversion plugin-version'
 		;;
 	esac
 	for f in $hfiles; do
 		write_c $_OUTDIRBASE/usr.bin/$_subdir/arch/$MACHINE_ARCH/$f.h $_TMPDIR/gcc/$f.h
 	done
 
-	write_c $_OUTDIRBASE/usr.bin/$_subdir/arch/$MACHINE_ARCH/bversion.h \
-		$_TMPDIR/gcc/bversion.h
+	for f in all-tree.def; do
+		write_c $_OUTDIRBASE/usr.bin/$_subdir/arch/$MACHINE_ARCH/$f $_TMPDIR/gcc/$f
+	done
 }
 
 # main #
@@ -642,6 +654,7 @@
 	get_gcc_libiberty gcc
 	get_libobjc libobjc
 	get_libstdcxx_v3 libstdc++-v3
+	get_libdecnumber libdecnumber
 	exit 0
 	;;
 



CVS commit: src

2011-06-28 Thread matthew green
Module Name:src
Committed By:   mrg
Date:   Wed Jun 29 02:05:25 UTC 2011

Modified Files:
src: Makefile
src/external/gpl3: Makefile
src/external/gpl3/gcc/lib: Makefile
src/lib: Makefile

Log Message:
re-enable the gcc 4.5 crtstuff/libgcc builders now that they work.
also build the gmp, mpfr and mpc libraries in this case.


To generate a diff of this commit:
cvs rdiff -u -r1.285 -r1.286 src/Makefile
cvs rdiff -u -r1.3 -r1.4 src/external/gpl3/Makefile
cvs rdiff -u -r1.1 -r1.2 src/external/gpl3/gcc/lib/Makefile
cvs rdiff -u -r1.169 -r1.170 src/lib/Makefile

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

Modified files:

Index: src/Makefile
diff -u src/Makefile:1.285 src/Makefile:1.286
--- src/Makefile:1.285	Wed Jun 22 05:13:20 2011
+++ src/Makefile	Wed Jun 29 02:05:24 2011
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile,v 1.285 2011/06/22 05:13:20 mrg Exp $
+#	$NetBSD: Makefile,v 1.286 2011/06/29 02:05:24 mrg Exp $
 
 #
 # This is the top-level makefile for building NetBSD. For an outline of
@@ -412,12 +412,10 @@
 .endfor
 
 .if defined(HAVE_GCC)
-.if ${HAVE_GCC} != 45	# XXX for now
 .if ${USE_COMPILERCRTSTUFF} == yes
 BUILD_CC_LIB= ${BUILD_CC_LIB_BASEDIR}/crtstuff${LIBGCC_EXT}
 .endif
 BUILD_CC_LIB+= ${BUILD_CC_LIB_BASEDIR}/libgcc${LIBGCC_EXT}
-.endif
 .elif defined(HAVE_PCC)
 BUILD_CC_LIB+= external/bsd/pcc/crtstuff
 BUILD_CC_LIB+= external/bsd/pcc/libpcc
@@ -448,26 +446,22 @@
 
 do-libgcc: .PHONY .MAKE
 .if defined(HAVE_GCC)
-.if ${HAVE_GCC} != 45	# XXX for now
 .if ${MKGCC} != no
 .if ${USE_COMPILERCRTSTUFF} == yes
 	${MAKEDIRTARGET} . do-${BUILD_CC_LIB_BASETARGET}-crtstuff${LIBGCC_EXT}
 .endif
 	${MAKEDIRTARGET} . do-${BUILD_CC_LIB_BASETARGET}-libgcc${LIBGCC_EXT}
 .endif
-.endif
 .endif
 
 do-compat-libgcc: .PHONY .MAKE
 .if defined(HAVE_GCC)
-.if ${HAVE_GCC} != 45	# XXX for now
 .if ${MKGCC} != no
 .if ${USE_COMPILERCRTSTUFF} == yes
 	${MAKEDIRTARGET} . do-compat-${BUILD_CC_LIB_BASETARGET}-crtstuff${LIBGCC_EXT}
 .endif
 	${MAKEDIRTARGET} . do-compat-${BUILD_CC_LIB_BASETARGET}-libgcc${LIBGCC_EXT}
 .endif
-.endif
 .endif
 
 do-libpcc: .PHONY .MAKE

Index: src/external/gpl3/Makefile
diff -u src/external/gpl3/Makefile:1.3 src/external/gpl3/Makefile:1.4
--- src/external/gpl3/Makefile:1.3	Tue Jun 21 04:52:49 2011
+++ src/external/gpl3/Makefile	Wed Jun 29 02:05:24 2011
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile,v 1.3 2011/06/21 04:52:49 mrg Exp $
+#	$NetBSD: Makefile,v 1.4 2011/06/29 02:05:24 mrg Exp $
 
 .include bsd.own.mk
 
@@ -8,7 +8,7 @@
 
 .if ${HAVE_GCC} == 45
 .if ${MKGCCCMDS} != no
-#SUBDIR+=	gcc
+SUBDIR+=	gcc
 .endif
 .endif
 

Index: src/external/gpl3/gcc/lib/Makefile
diff -u src/external/gpl3/gcc/lib/Makefile:1.1 src/external/gpl3/gcc/lib/Makefile:1.2
--- src/external/gpl3/gcc/lib/Makefile:1.1	Tue Jun 28 04:23:56 2011
+++ src/external/gpl3/gcc/lib/Makefile	Wed Jun 29 02:05:25 2011
@@ -1,5 +1,6 @@
-#	$NetBSD: Makefile,v 1.1 2011/06/28 04:23:56 mrg Exp $
+#	$NetBSD: Makefile,v 1.2 2011/06/29 02:05:25 mrg Exp $
 
-SUBDIR+= crtstuff libgcc libiberty libobjc libsupc++ libstdc++-v3
+# crtstuff is built out of elsewhere, or not at all
+SUBDIR+= libgcc libiberty libobjc libsupc++ libstdc++-v3
 
 .include bsd.subdir.mk

Index: src/lib/Makefile
diff -u src/lib/Makefile:1.169 src/lib/Makefile:1.170
--- src/lib/Makefile:1.169	Wed Jun 22 05:16:37 2011
+++ src/lib/Makefile	Wed Jun 29 02:05:25 2011
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile,v 1.169 2011/06/22 05:16:37 mrg Exp $
+#	$NetBSD: Makefile,v 1.170 2011/06/29 02:05:25 mrg Exp $
 #	from: @(#)Makefile	5.25.1.1 (Berkeley) 5/7/91
 
 .include bsd.own.mk
@@ -13,10 +13,9 @@
 SUBDIR+=	../gnu/lib/libgcc4
 . else
 .  if (${USE_COMPILERCRTSTUFF} == yes)
-# XXX not yet
-#SUBDIR+=	../external/gpl3/gcc/lib/crtstuff
+SUBDIR+=	../external/gpl3/gcc/lib/crtstuff
 .  endif
-#SUBDIR+=	../external/gpl3/gcc/lib/libgcc
+SUBDIR+=	../external/gpl3/gcc/lib/libgcc
 . endif
 .endif
 
@@ -74,14 +73,15 @@
 .if (${MKGCC} != no)
 . if ${HAVE_GCC} == 4
 SUBDIR+=	../gnu/lib/libobjc4
+. else
+SUBDIR+=	../external/gpl3/gcc/lib/libobjc
 . endif
 .endif
 
 . if ${HAVE_GCC} = 45
-# XXX not yet
-#SUBDIR+=	../external/lgpl3/gmp/lib/libgmp
-#SUBDIR+=	../external/lgpl3/mpfr/lib/libmpfr
-#SUBDIR+=	../external/lgpl2/mpc/lib/libmpc
+SUBDIR+=	../external/lgpl3/gmp/lib/libgmp
+SUBDIR+=	../external/lgpl3/mpfr/lib/libmpfr
+SUBDIR+=	../external/lgpl2/mpc/lib/libmpc
 .endif
 
 #
@@ -127,6 +127,9 @@
 . if ${HAVE_GCC} == 4
 SUBDIR+=	../gnu/lib/libstdc++-v3_4	# depends on libm
 SUBDIR+=	../gnu/lib/libsupc++4
+. else
+SUBDIR+=	../external/gpl3/gcc/lib/libstdc++-v3
+SUBDIR+=	../external/gpl3/gcc/lib/libsupc++
 . endif
 .endif
 



CVS commit: src/external/gpl3/gcc/dist/gcc

2011-06-28 Thread matthew green
Module Name:src
Committed By:   mrg
Date:   Wed Jun 29 02:12:29 UTC 2011

Modified Files:
src/external/gpl3/gcc/dist/gcc: gcc.c

Log Message:
fix a merge error with LIBGCC_PIC_SUFFIX code.


To generate a diff of this commit:
cvs rdiff -u -r1.4 -r1.5 src/external/gpl3/gcc/dist/gcc/gcc.c

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

Modified files:

Index: src/external/gpl3/gcc/dist/gcc/gcc.c
diff -u src/external/gpl3/gcc/dist/gcc/gcc.c:1.4 src/external/gpl3/gcc/dist/gcc/gcc.c:1.5
--- src/external/gpl3/gcc/dist/gcc/gcc.c:1.4	Tue Jun 28 07:52:40 2011
+++ src/external/gpl3/gcc/dist/gcc/gcc.c	Wed Jun 29 02:12:29 2011
@@ -1766,17 +1766,11 @@
 		}
 		%{!static:%{!static-libgcc:
 #if USE_LD_AS_NEEDED
-		%{!shared:
 		%{!shared-libgcc:,
 		static_name,  --as-needed , shared_name,  --no-as-needed
 		}
 		%{shared-libgcc:,
-		shared_name, %{!shared: , static_name, }
-		}
-		}
-		%{shared:
-		%{shared-libgcc: --as-needed, shared_name,  --no-as-needed} ,
-		%{!shared-libgcc:, static_name,
+		shared_name, %{!shared: , static_name,
 #ifdef LIBGCC_PICSUFFIX
 		LIBGCC_PICSUFFIX,
 #endif
@@ -1787,7 +1781,8 @@
 		%{!shared-libgcc:, static_name,  , eh_name, }
 		%{shared-libgcc:, shared_name,  , static_name, }
 		}
-#ifdef LINK_EH_SPEC
+/* XXX NH XXX */
+#ifdef LINK_EH_SPEC || 1
 		%{shared:
 		%{shared-libgcc:, shared_name, }
 		%{!shared-libgcc:, static_name,



CVS commit: src/external/gpl3/gcc/usr.bin

2011-06-28 Thread matthew green
Module Name:src
Committed By:   mrg
Date:   Wed Jun 29 02:14:28 UTC 2011

Modified Files:
src/external/gpl3/gcc/usr.bin: Makefile.frontend

Log Message:
update the gcc-vers.texi generation and fix various build issues.


To generate a diff of this commit:
cvs rdiff -u -r1.1 -r1.2 src/external/gpl3/gcc/usr.bin/Makefile.frontend

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

Modified files:

Index: src/external/gpl3/gcc/usr.bin/Makefile.frontend
diff -u src/external/gpl3/gcc/usr.bin/Makefile.frontend:1.1 src/external/gpl3/gcc/usr.bin/Makefile.frontend:1.2
--- src/external/gpl3/gcc/usr.bin/Makefile.frontend:1.1	Tue Jun 21 06:03:13 2011
+++ src/external/gpl3/gcc/usr.bin/Makefile.frontend	Wed Jun 29 02:14:28 2011
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile.frontend,v 1.1 2011/06/21 06:03:13 mrg Exp $
+#	$NetBSD: Makefile.frontend,v 1.2 2011/06/29 02:14:28 mrg Exp $
 
 BINDIR=		/usr/bin
 
@@ -18,6 +18,12 @@
 		echo @set DEVELOPMENT; \
 	else \
 		echo @clear DEVELOPMENT; \
-	fi)  ${.TARGET}
+	fi; \
+	echo @set srcdir $(DIST)/gcc; \
+	if [ -n $(PKGVERSION) ]; then \
+	  echo @set VERSION_PACKAGE $(PKGVERSION); \
+	fi; \
+	echo @set BUGURL $(BUGURL); \
+	)  ${.TARGET}
 
 CLEANFILES+=	gcc-vers.texi



CVS commit: src/external/gpl3/gcc/usr.bin

2011-06-28 Thread matthew green
Module Name:src
Committed By:   mrg
Date:   Wed Jun 29 02:15:13 UTC 2011

Modified Files:
src/external/gpl3/gcc/usr.bin: Makefile.inc

Log Message:
add G_BUGURL and G_PKGVERSION variables that are unquoted versions.


To generate a diff of this commit:
cvs rdiff -u -r1.6 -r1.7 src/external/gpl3/gcc/usr.bin/Makefile.inc

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

Modified files:

Index: src/external/gpl3/gcc/usr.bin/Makefile.inc
diff -u src/external/gpl3/gcc/usr.bin/Makefile.inc:1.6 src/external/gpl3/gcc/usr.bin/Makefile.inc:1.7
--- src/external/gpl3/gcc/usr.bin/Makefile.inc:1.6	Tue Jun 28 10:15:15 2011
+++ src/external/gpl3/gcc/usr.bin/Makefile.inc	Wed Jun 29 02:15:13 2011
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile.inc,v 1.6 2011/06/28 10:15:15 mrg Exp $
+#	$NetBSD: Makefile.inc,v 1.7 2011/06/29 02:15:13 mrg Exp $
 
 .include bsd.own.mk
 
@@ -46,8 +46,10 @@
 .endif
 
 # XXX pull this out of our configs
-G_BUGURL_s=\http://www.NetBSD.org/Misc/send-pr.html\
-G_PKGVERSION_s=\(NetBSD nb1 20110620) \
+G_BUGURL=http://www.NetBSD.org/Misc/send-pr.html
+G_BUGURL_s=\${G_BUG_URL}\
+G_PKGVERSION_s=(NetBSD nb1 20110620) 
+G_PKGVERSION_s=\${G_PKGVERSION} \
 
 VER_CPPFLAGS=			-DBUGURL=${G_BUGURL_s} \
 -DPKGVERSION=${G_PKGVERSION_s} \



CVS commit: src/external/gpl3/gcc/usr.bin/libdecnumber

2011-06-28 Thread matthew green
Module Name:src
Committed By:   mrg
Date:   Wed Jun 29 02:15:34 UTC 2011

Modified Files:
src/external/gpl3/gcc/usr.bin/libdecnumber: Makefile

Log Message:
use LIBISPRIVATE here.


To generate a diff of this commit:
cvs rdiff -u -r1.1 -r1.2 src/external/gpl3/gcc/usr.bin/libdecnumber/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/gpl3/gcc/usr.bin/libdecnumber/Makefile
diff -u src/external/gpl3/gcc/usr.bin/libdecnumber/Makefile:1.1 src/external/gpl3/gcc/usr.bin/libdecnumber/Makefile:1.2
--- src/external/gpl3/gcc/usr.bin/libdecnumber/Makefile:1.1	Tue Jun 28 10:15:15 2011
+++ src/external/gpl3/gcc/usr.bin/libdecnumber/Makefile	Wed Jun 29 02:15:34 2011
@@ -3,9 +3,7 @@
 DIST=		${NETBSDSRCDIR}/external/gpl3/gcc/dist
 GNUHOSTDIST=	${DIST}
 
-NOLINT=		# defined
-NOPIC=		# defined
-NOPROFILE=	# defined
+LIBISPRIVATE=   yes
 
 .include bsd.own.mk
 



CVS commit: src/external/gpl3/gcc/usr.bin/frontend

2011-06-28 Thread matthew green
Module Name:src
Committed By:   mrg
Date:   Wed Jun 29 02:16:52 UTC 2011

Modified Files:
src/external/gpl3/gcc/usr.bin/frontend: Makefile

Log Message:
move gcc-options.c generation in here.
handle i386 in here as well.

XXX: need to see about mknative-gcc handling eg, driver-i386.c


To generate a diff of this commit:
cvs rdiff -u -r1.2 -r1.3 src/external/gpl3/gcc/usr.bin/frontend/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/gpl3/gcc/usr.bin/frontend/Makefile
diff -u src/external/gpl3/gcc/usr.bin/frontend/Makefile:1.2 src/external/gpl3/gcc/usr.bin/frontend/Makefile:1.3
--- src/external/gpl3/gcc/usr.bin/frontend/Makefile:1.2	Tue Jun 28 10:14:41 2011
+++ src/external/gpl3/gcc/usr.bin/frontend/Makefile	Wed Jun 29 02:16:52 2011
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile,v 1.2 2011/06/28 10:14:41 mrg Exp $
+#	$NetBSD: Makefile,v 1.3 2011/06/29 02:16:52 mrg Exp $
 
 LIBISPRIVATE=	yes
 
@@ -7,9 +7,10 @@
 
 LIB=		frontend
 
-SRCS=		gcc.c version.c intl.c prefix.c opts-common.c
+SRCS=		gcc.c version.c intl.c prefix.c opts-common.c gcc-options.c
 
-.if ${MACHINE_ARCH} == x86_64
+# XXX
+.if ${MACHINE_ARCH} == x86_64 || ${MACHINE_ARCH} == i386
 SRCS+=		driver-i386.c
 .PATH:		${DIST}/gcc/config/i386
 .endif
@@ -33,11 +34,19 @@
 
 .PATH: ${DIST}/gcc
 
-#
 # Build the specs.h file
-#
 CLEANFILES+=	specs.h
 specs.h: Makefile
 	for f in cp objc; do \
 		echo #include \$$f/lang-specs.h\; \
 	done  specs.h
+
+# Build the options files
+optionlist: ${G_ALL_OPT_FILES} ${GCCARCH}/defs.mk Makefile ${DIST}/gcc/opt-gather.awk
+	${TOOL_AWK} -f ${DIST}/gcc/opt-gather.awk ${G_ALL_OPT_FILES}  ${.TARGET}
+
+CPPFLAGS.gcc-options.c=	-DGCC_DRIVER
+gcc-options.c: optionlist
+	${TOOL_AWK} -f ${DIST}/gcc/opt-functions.awk -f ${DIST}/gcc/optc-gen.awk \
+		-v header_name=config.h system.h coretypes.h tm.h  optionlist  ${.TARGET}
+CLEANFILES+=	optionlist gcc-options.c



CVS commit: src/external/gpl3/gcc/usr.bin/cpp

2011-06-28 Thread matthew green
Module Name:src
Committed By:   mrg
Date:   Wed Jun 29 02:17:17 UTC 2011

Modified Files:
src/external/gpl3/gcc/usr.bin/cpp: Makefile

Log Message:
make this build with GCC 4.5.


To generate a diff of this commit:
cvs rdiff -u -r1.1 -r1.2 src/external/gpl3/gcc/usr.bin/cpp/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/gpl3/gcc/usr.bin/cpp/Makefile
diff -u src/external/gpl3/gcc/usr.bin/cpp/Makefile:1.1 src/external/gpl3/gcc/usr.bin/cpp/Makefile:1.2
--- src/external/gpl3/gcc/usr.bin/cpp/Makefile:1.1	Tue Jun 21 06:03:14 2011
+++ src/external/gpl3/gcc/usr.bin/cpp/Makefile	Wed Jun 29 02:17:17 2011
@@ -1,11 +1,26 @@
-#	$NetBSD: Makefile,v 1.1 2011/06/21 06:03:14 mrg Exp $
+#	$NetBSD: Makefile,v 1.2 2011/06/29 02:17:17 mrg Exp $
 
-.include bsd.own.mk
+# For ../Makefile.inc and bsd.own.mk
+.include bsd.init.mk
 
 PROG=		cpp
-SRCS=		cppspec.c
+SRCS=		gcc.c cppspec.c prefix.c version.c
+
+# XXX
+.if ${MACHINE_ARCH} == x86_64 || ${MACHINE_ARCH} == i386
+SRCS+=		driver-i386.c
+.PATH:		${DIST}/gcc/config/i386
+.endif
 
 CPPFLAGS+=	-I${BACKENDOBJ}
+CPPFLAGS.prefix.c+=	-DPREFIX=\/usr\
+
+CPPFLAGS.gcc.c+=	-I${GCCARCH} -I${BACKENDOBJ} -I. \
+		${G_ALL_CFLAGS:M-D*} ${G_INCLUDES:M-I*:N-I.*} \
+		-DPREFIX=\/usr\ \
+		-DDEFAULT_TARGET_VERSION=\${G_version}\ \
+		-DDEFAULT_TARGET_MACHINE=\${MACHINE_GNU_PLATFORM}\ \
+		-DCONFIGURE_SPECS=\\
 
 LINKS=		${BINDIR}/cpp ${BINDIR}/gcpp
 
@@ -17,6 +32,8 @@
 
 .include ../Makefile.frontend
 
+LDADD+=		-lintl
+
 .include bsd.info.mk
 
 .PATH: ${DIST}/gcc ${DIST}/gcc/doc



CVS commit: src/external/gpl3/gcc/usr.bin/backend

2011-06-28 Thread matthew green
Module Name:src
Committed By:   mrg
Date:   Wed Jun 29 02:17:36 UTC 2011

Modified Files:
src/external/gpl3/gcc/usr.bin/backend: Makefile

Log Message:
apply some .if checks upon dependancies.


To generate a diff of this commit:
cvs rdiff -u -r1.5 -r1.6 src/external/gpl3/gcc/usr.bin/backend/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/gpl3/gcc/usr.bin/backend/Makefile
diff -u src/external/gpl3/gcc/usr.bin/backend/Makefile:1.5 src/external/gpl3/gcc/usr.bin/backend/Makefile:1.6
--- src/external/gpl3/gcc/usr.bin/backend/Makefile:1.5	Wed Jun 29 02:01:37 2011
+++ src/external/gpl3/gcc/usr.bin/backend/Makefile	Wed Jun 29 02:17:35 2011
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile,v 1.5 2011/06/29 02:01:37 mrg Exp $
+#	$NetBSD: Makefile,v 1.6 2011/06/29 02:17:35 mrg Exp $
 
 LIBISPRIVATE=	yes
 
@@ -327,7 +327,9 @@
 cgraphunit.d cgraphunit.o: gcov-io.h
 vec.lo: gtype-desc.h
 # XXX
+.if ${MACHINE_ARCH} == i386 || ${MACHINE_ARCH} == x86_64
 i386.d i386.o: tm-constrs.h
+.endif
 
 COPTS+=-Wno-stack-protector
 



CVS commit: src/external/gpl3/gcc/usr.bin

2011-06-28 Thread matthew green
Module Name:src
Committed By:   mrg
Date:   Wed Jun 29 02:26:47 UTC 2011

Added Files:
src/external/gpl3/gcc/usr.bin/cpp: cpp.1
src/external/gpl3/gcc/usr.bin/g++: g++.1
src/external/gpl3/gcc/usr.bin/gcc: gcc.1
src/external/gpl3/gcc/usr.bin/gcov: gcov.1

Log Message:
add the generated manuals.


To generate a diff of this commit:
cvs rdiff -u -r0 -r1.1 src/external/gpl3/gcc/usr.bin/cpp/cpp.1
cvs rdiff -u -r0 -r1.1 src/external/gpl3/gcc/usr.bin/g++/g++.1
cvs rdiff -u -r0 -r1.1 src/external/gpl3/gcc/usr.bin/gcc/gcc.1
cvs rdiff -u -r0 -r1.1 src/external/gpl3/gcc/usr.bin/gcov/gcov.1

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

diffs are larger than 1MB and have been omitted


CVS commit: src/external/gpl3/gcc/usr.bin

2011-06-28 Thread matthew green
Module Name:src
Committed By:   mrg
Date:   Wed Jun 29 02:27:17 UTC 2011

Removed Files:
src/external/gpl3/gcc/usr.bin/protoize: Makefile
src/external/gpl3/gcc/usr.bin/unprotoize: Makefile

Log Message:
protoize/unprotoize are no more.


To generate a diff of this commit:
cvs rdiff -u -r1.1 -r0 src/external/gpl3/gcc/usr.bin/protoize/Makefile
cvs rdiff -u -r1.1 -r0 src/external/gpl3/gcc/usr.bin/unprotoize/Makefile

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



CVS commit: src/tests/fs/common/nfsrpc

2011-06-28 Thread matthew green
Module Name:src
Committed By:   mrg
Date:   Wed Jun 29 02:36:13 UTC 2011

Modified Files:
src/tests/fs/common/nfsrpc: Makefile.inc

Log Message:
apply some -fno-strict-aliasing

XXX -- someone please fix this properly.


To generate a diff of this commit:
cvs rdiff -u -r1.2 -r1.3 src/tests/fs/common/nfsrpc/Makefile.inc

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

Modified files:

Index: src/tests/fs/common/nfsrpc/Makefile.inc
diff -u src/tests/fs/common/nfsrpc/Makefile.inc:1.2 src/tests/fs/common/nfsrpc/Makefile.inc:1.3
--- src/tests/fs/common/nfsrpc/Makefile.inc:1.2	Tue Aug  3 17:24:45 2010
+++ src/tests/fs/common/nfsrpc/Makefile.inc	Wed Jun 29 02:36:13 2011
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile.inc,v 1.2 2010/08/03 17:24:45 drochner Exp $
+#	$NetBSD: Makefile.inc,v 1.3 2011/06/29 02:36:13 mrg Exp $
 #
 
 # libc rpc using rump syscalls
@@ -8,3 +8,6 @@
 
 CPPFLAGS+=	-DPORTMAP -D_REENTRANT -DRUMP_SYS_NETWORKING
 CPPFLAGS+=	-DDEBUG -DLIBWRAP
+
+# XXX
+CPPFLAGS.clnt_dg.c+=	-fno-strict-aliasing



CVS commit: src/tests/lib/libcurses/director

2011-06-28 Thread matthew green
Module Name:src
Committed By:   mrg
Date:   Wed Jun 29 02:36:26 UTC 2011

Modified Files:
src/tests/lib/libcurses/director: Makefile

Log Message:
apply some -Wno-enum-compare.


To generate a diff of this commit:
cvs rdiff -u -r1.2 -r1.3 src/tests/lib/libcurses/director/Makefile

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/libcurses/director/Makefile
diff -u src/tests/lib/libcurses/director/Makefile:1.2 src/tests/lib/libcurses/director/Makefile:1.3
--- src/tests/lib/libcurses/director/Makefile:1.2	Thu May 26 12:56:32 2011
+++ src/tests/lib/libcurses/director/Makefile	Wed Jun 29 02:36:26 2011
@@ -19,4 +19,8 @@
 
 CWARNFLAGS.clang+=	-Wno-format -Wno-conversion
 
+.if ${HAVE_GCC} == 45
+COPTS.testlang_parse.c+=	-Wno-enum-compare
+.endif
+
 .include bsd.test.mk



CVS commit: src/usr.sbin/dhcp

2011-06-28 Thread matthew green
Module Name:src
Committed By:   mrg
Date:   Wed Jun 29 02:40:11 UTC 2011

Modified Files:
src/usr.sbin/dhcp/common: Makefile
src/usr.sbin/dhcp/server: Makefile

Log Message:
apply some -Wno-enum-compare


To generate a diff of this commit:
cvs rdiff -u -r1.23 -r1.24 src/usr.sbin/dhcp/common/Makefile
cvs rdiff -u -r1.14 -r1.15 src/usr.sbin/dhcp/server/Makefile

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

Modified files:

Index: src/usr.sbin/dhcp/common/Makefile
diff -u src/usr.sbin/dhcp/common/Makefile:1.23 src/usr.sbin/dhcp/common/Makefile:1.24
--- src/usr.sbin/dhcp/common/Makefile:1.23	Sat May  3 14:48:32 2008
+++ src/usr.sbin/dhcp/common/Makefile	Wed Jun 29 02:40:11 2011
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.23 2008/05/03 14:48:32 lukem Exp $
+# $NetBSD: Makefile,v 1.24 2011/06/29 02:40:11 mrg Exp $
 
 LIBISPRIVATE=	yes
 
@@ -12,3 +12,5 @@
 DHCPSRCDIR=	common
 
 .include bsd.lib.mk
+
+CPPFLAGS.dns.c+=	-Wno-enum-compare

Index: src/usr.sbin/dhcp/server/Makefile
diff -u src/usr.sbin/dhcp/server/Makefile:1.14 src/usr.sbin/dhcp/server/Makefile:1.15
--- src/usr.sbin/dhcp/server/Makefile:1.14	Fri Aug 29 00:02:25 2008
+++ src/usr.sbin/dhcp/server/Makefile	Wed Jun 29 02:40:11 2011
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.14 2008/08/29 00:02:25 gmcgarry Exp $
+# $NetBSD: Makefile,v 1.15 2011/06/29 02:40:11 mrg Exp $
 
 .include bsd.own.mk
 
@@ -20,3 +20,5 @@
 .endif
 
 .include bsd.prog.mk
+
+CPPFLAGS.ddns.c+=	-Wno-enum-compare



CVS commit: src/external/bsd/ntp/dist/lib/isc/include/isc

2011-06-28 Thread matthew green
Module Name:src
Committed By:   mrg
Date:   Wed Jun 29 02:41:03 UTC 2011

Modified Files:
src/external/bsd/ntp/dist/lib/isc/include/isc: util.h

Log Message:
use __unused instead of having a function call itself, to provide an
empty translation unit.


To generate a diff of this commit:
cvs rdiff -u -r1.1.1.1 -r1.2 \
src/external/bsd/ntp/dist/lib/isc/include/isc/util.h

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

Modified files:

Index: src/external/bsd/ntp/dist/lib/isc/include/isc/util.h
diff -u src/external/bsd/ntp/dist/lib/isc/include/isc/util.h:1.1.1.1 src/external/bsd/ntp/dist/lib/isc/include/isc/util.h:1.2
--- src/external/bsd/ntp/dist/lib/isc/include/isc/util.h:1.1.1.1	Sun Dec 13 16:54:25 2009
+++ src/external/bsd/ntp/dist/lib/isc/include/isc/util.h	Wed Jun 29 02:41:03 2011
@@ -1,4 +1,4 @@
-/*	$NetBSD: util.h,v 1.1.1.1 2009/12/13 16:54:25 kardel Exp $	*/
+/*	$NetBSD: util.h,v 1.2 2011/06/29 02:41:03 mrg Exp $	*/
 
 /*
  * Copyright (C) 2004-2007  Internet Systems Consortium, Inc. (ISC)
@@ -72,7 +72,7 @@
  * Use this in translation units that would otherwise be empty, to
  * suppress compiler warnings.
  */
-#define EMPTY_TRANSLATION_UNIT static void isc__empty(void) { isc__empty(); }
+#define EMPTY_TRANSLATION_UNIT static void __unused isc__empty(void) { } 
 
 /*%
  * We use macros instead of calling the routines directly because



CVS commit: src/sys/dev/pci

2011-06-28 Thread Michael Lorenz
Module Name:src
Committed By:   macallan
Date:   Wed Jun 29 03:14:36 UTC 2011

Modified Files:
src/sys/dev/pci: r128fb.c

Log Message:
support WSDISPLAYIO_GET_EDID


To generate a diff of this commit:
cvs rdiff -u -r1.21 -r1.22 src/sys/dev/pci/r128fb.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/pci/r128fb.c
diff -u src/sys/dev/pci/r128fb.c:1.21 src/sys/dev/pci/r128fb.c:1.22
--- src/sys/dev/pci/r128fb.c:1.21	Tue Feb 15 04:06:43 2011
+++ src/sys/dev/pci/r128fb.c	Wed Jun 29 03:14:36 2011
@@ -1,4 +1,4 @@
-/*	$NetBSD: r128fb.c,v 1.21 2011/02/15 04:06:43 macallan Exp $	*/
+/*	$NetBSD: r128fb.c,v 1.22 2011/06/29 03:14:36 macallan Exp $	*/
 
 /*
  * Copyright (c) 2007 Michael Lorenz
@@ -31,7 +31,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: r128fb.c,v 1.21 2011/02/15 04:06:43 macallan Exp $);
+__KERNEL_RCSID(0, $NetBSD: r128fb.c,v 1.22 2011/06/29 03:14:36 macallan Exp $);
 
 #include sys/param.h
 #include sys/systm.h
@@ -59,6 +59,7 @@
 #include dev/i2c/i2cvar.h
 
 #include opt_r128fb.h
+#include opt_vcons.h
 
 #ifdef R128FB_DEBUG
 #define DPRINTF printf
@@ -201,8 +202,8 @@
 	prop_dictionary_t	dict;
 	unsigned long		defattr;
 	bool			is_console;
-	int i, j;
-	uint32_t reg, flags;
+	int			i, j;
+	uint32_t		reg, flags;
 
 	sc-sc_pc = pa-pa_pc;
 	sc-sc_pcitag = pa-pa_tag;
@@ -425,6 +426,10 @@
 			return 0;
 		}
 		return EPASSTHROUGH;
+	case WSDISPLAYIO_GET_EDID: {
+		struct wsdisplayio_edid_info *d = data;
+		return wsdisplayio_get_edid(sc-sc_dev, d);
+	}
 	}
 	return EPASSTHROUGH;
 }
@@ -502,6 +507,9 @@
 
 	rasops_init(ri, sc-sc_height / 8, sc-sc_width / 8);
 	ri-ri_caps = WSSCREEN_WSCOLORS;
+#ifdef VCONS_DRAW_INTR
+	scr-scr_flags |= VCONS_DONT_READ;
+#endif
 
 	rasops_reconfig(ri, sc-sc_height / ri-ri_font-fontheight,
 		sc-sc_width / ri-ri_font-fontwidth);



CVS commit: src/sys/dev/pci

2011-06-28 Thread Michael Lorenz
Module Name:src
Committed By:   macallan
Date:   Wed Jun 29 03:15:18 UTC 2011

Modified Files:
src/sys/dev/pci: machfb.c

Log Message:
support WSDISPLAYIO_GET_EDID


To generate a diff of this commit:
cvs rdiff -u -r1.67 -r1.68 src/sys/dev/pci/machfb.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/pci/machfb.c
diff -u src/sys/dev/pci/machfb.c:1.67 src/sys/dev/pci/machfb.c:1.68
--- src/sys/dev/pci/machfb.c:1.67	Wed Jun  1 05:06:17 2011
+++ src/sys/dev/pci/machfb.c	Wed Jun 29 03:15:18 2011
@@ -1,4 +1,4 @@
-/*	$NetBSD: machfb.c,v 1.67 2011/06/01 05:06:17 macallan Exp $	*/
+/*	$NetBSD: machfb.c,v 1.68 2011/06/29 03:15:18 macallan Exp $	*/
 
 /*
  * Copyright (c) 2002 Bang Jun-Young
@@ -34,7 +34,7 @@
 
 #include sys/cdefs.h
 __KERNEL_RCSID(0, 
-	$NetBSD: machfb.c,v 1.67 2011/06/01 05:06:17 macallan Exp $);
+	$NetBSD: machfb.c,v 1.68 2011/06/29 03:15:18 macallan Exp $);
 
 #include sys/param.h
 #include sys/systm.h
@@ -1771,7 +1771,10 @@
 		}
 		}
 		return 0;
-		
+	case WSDISPLAYIO_GET_EDID: {
+		struct wsdisplayio_edid_info *d = data;
+		return wsdisplayio_get_edid(sc-sc_dev, d);
+	}
 	}
 	return EPASSTHROUGH;
 }
@@ -2057,10 +2060,6 @@
 		sc-sc_pcitag, data);
 
 	default:
-#ifdef MACHFB_DEBUG
-		log(LOG_NOTICE, machfb_fbioctl(0x%lx) (%s[%d])\n, cmd,
-		p-p_comm, p-p_pid);
-#endif
 		return ENOTTY;
 	}
 #ifdef MACHFB_DEBUG



CVS commit: xsrc/external/mit/xf86-video-r128/dist/src

2011-06-28 Thread Michael Lorenz
Module Name:xsrc
Committed By:   macallan
Date:   Wed Jun 29 04:11:31 UTC 2011

Modified Files:
xsrc/external/mit/xf86-video-r128/dist/src: r128_driver.c

Log Message:
use ioctl(WSDISPLAYIO_GET_EDID)


To generate a diff of this commit:
cvs rdiff -u -r1.5 -r1.6 \
xsrc/external/mit/xf86-video-r128/dist/src/r128_driver.c

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

Modified files:

Index: xsrc/external/mit/xf86-video-r128/dist/src/r128_driver.c
diff -u xsrc/external/mit/xf86-video-r128/dist/src/r128_driver.c:1.5 xsrc/external/mit/xf86-video-r128/dist/src/r128_driver.c:1.6
--- xsrc/external/mit/xf86-video-r128/dist/src/r128_driver.c:1.5	Sun May 15 23:44:47 2011
+++ xsrc/external/mit/xf86-video-r128/dist/src/r128_driver.c	Wed Jun 29 04:11:31 2011
@@ -1395,6 +1395,10 @@
 return TRUE;
 }
 
+/* XXX
+ * the following comment is bogus - the code scans the main monitor port,
+ * not R128_GPIO_MONIDB
+ */
 /* return TRUE is a DFP is indeed connected to a DVI port */
 static Bool R128GetDFPInfo(ScrnInfoPtr pScrn)
 {
@@ -1416,6 +1420,22 @@
 ~(CARD32)(R128_GPIO_MONID_A_0 | R128_GPIO_MONID_A_3));
 
 MonInfo = xf86DoEDID_DDC2(pScrn-scrnIndex, info-pI2CBus);
+#ifdef __NetBSD__
+{
+	struct wsdisplayio_edid_info ei;
+	char buffer[1024];
+	int i, j;
+
+	ei.edid_data = buffer;
+	ei.buffer_size = 1024;
+	if (ioctl(xf86Info.screenFd, WSDISPLAYIO_GET_EDID, ei) != -1) {
+	xf86Msg(X_INFO, got %d bytes worth of EDID from wsdisplay\n, ei.data_size);
+	MonInfo = xf86InterpretEDID(pScrn-scrnIndex, buffer);
+	} else
+	xf86Msg(X_INFO, ioctl failed %d\n, errno);
+}
+#endif
+		
 if(!MonInfo) {
 xf86DrvMsg(pScrn-scrnIndex, X_ERROR,
No DFP detected\n);



CVS commit: src/external/gpl3/gcc/dist/gcc/config

2011-06-28 Thread matthew green
Module Name:src
Committed By:   mrg
Date:   Wed Jun 29 04:59:10 UTC 2011

Added Files:
src/external/gpl3/gcc/dist/gcc/config/i386: t-netbsd64
src/external/gpl3/gcc/dist/gcc/config/ia64: netbsd.h
src/external/gpl3/gcc/dist/gcc/config/mips: netbsd64.h t-netbsd64
src/external/gpl3/gcc/dist/gcc/config/pa: pa-netbsd.h pa32-netbsd.h
t-netbsd
src/external/gpl3/gcc/dist/gcc/config/rs6000: netbsd64.h t-netbsd64

Log Message:
pull across these new files from old gcc.  from chuq.


To generate a diff of this commit:
cvs rdiff -u -r0 -r1.1 src/external/gpl3/gcc/dist/gcc/config/i386/t-netbsd64
cvs rdiff -u -r0 -r1.1 src/external/gpl3/gcc/dist/gcc/config/ia64/netbsd.h
cvs rdiff -u -r0 -r1.1 src/external/gpl3/gcc/dist/gcc/config/mips/netbsd64.h \
src/external/gpl3/gcc/dist/gcc/config/mips/t-netbsd64
cvs rdiff -u -r0 -r1.1 src/external/gpl3/gcc/dist/gcc/config/pa/pa-netbsd.h \
src/external/gpl3/gcc/dist/gcc/config/pa/pa32-netbsd.h \
src/external/gpl3/gcc/dist/gcc/config/pa/t-netbsd
cvs rdiff -u -r0 -r1.1 \
src/external/gpl3/gcc/dist/gcc/config/rs6000/netbsd64.h \
src/external/gpl3/gcc/dist/gcc/config/rs6000/t-netbsd64

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

Added files:

Index: src/external/gpl3/gcc/dist/gcc/config/i386/t-netbsd64
diff -u /dev/null src/external/gpl3/gcc/dist/gcc/config/i386/t-netbsd64:1.1
--- /dev/null	Wed Jun 29 04:59:10 2011
+++ src/external/gpl3/gcc/dist/gcc/config/i386/t-netbsd64	Wed Jun 29 04:59:10 2011
@@ -0,0 +1,15 @@
+# NetBSD has (will have) non-native libraries in /usr/lib/arch.
+# For NetBSD/amd64 we thus have /usr/lib and /usr/lib/i386.
+
+MULTILIB_OPTIONS = m64/m32
+MULTILIB_DIRNAMES = 64 32 
+MULTILIB_OSDIRNAMES = . ../lib/i386
+
+LIBGCC = stmp-multilib
+INSTALL_LIBGCC = install-multilib
+
+# The pushl in CTOR initialization interferes with frame pointer elimination.
+# crtend*.o cannot be compiled without -fno-asynchronous-unwind-tables,
+# because then __FRAME_END__ might not be the last thing in .eh_frame
+# section.
+CRTSTUFF_T_CFLAGS += -fno-omit-frame-pointer -fno-asynchronous-unwind-tables

Index: src/external/gpl3/gcc/dist/gcc/config/ia64/netbsd.h
diff -u /dev/null src/external/gpl3/gcc/dist/gcc/config/ia64/netbsd.h:1.1
--- /dev/null	Wed Jun 29 04:59:10 2011
+++ src/external/gpl3/gcc/dist/gcc/config/ia64/netbsd.h	Wed Jun 29 04:59:10 2011
@@ -0,0 +1,56 @@
+/* Definitions of target machine for GNU compiler,
+   for ia64/ELF NetBSD systems.
+   Copyright (C) 2005 Free Software Foundation, Inc.
+
+This file is part of GNU CC.
+
+GNU CC is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2, or (at your option)
+any later version.
+
+GNU CC is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with GNU CC; see the file COPYING.  If not, write to
+the Free Software Foundation, 59 Temple Place - Suite 330,
+Boston, MA 02111-1307, USA.  */
+
+#define TARGET_OS_CPP_BUILTINS()		\
+  do		\
+{		\
+  NETBSD_OS_CPP_BUILTINS_ELF();		\
+}		\
+  while (0)
+
+
+/* Extra specs needed for NetBSD/ia-64 ELF.  */
+
+#undef SUBTARGET_EXTRA_SPECS
+#define SUBTARGET_EXTRA_SPECS			\
+  { netbsd_cpp_spec, NETBSD_CPP_SPEC },	\
+  { netbsd_link_spec, NETBSD_LINK_SPEC_ELF },	\
+  { netbsd_entry_point, NETBSD_ENTRY_POINT },
+
+
+/* Provide a LINK_SPEC appropriate for a NetBSD/ia64 ELF target.  */
+
+#undef LINK_SPEC
+#define LINK_SPEC %(netbsd_link_spec)
+
+#define NETBSD_ENTRY_POINT _start
+
+
+/* Provide a CPP_SPEC appropriate for NetBSD.  */
+
+#undef CPP_SPEC
+#define CPP_SPEC %(netbsd_cpp_spec)
+
+
+/* Attempt to enable execute permissions on the stack.  */
+#define TRANSFER_FROM_TRAMPOLINE NETBSD_ENABLE_EXECUTE_STACK
+
+#define TARGET_VERSION fprintf (stderr,  (NetBSD/ia64 ELF));

Index: src/external/gpl3/gcc/dist/gcc/config/mips/netbsd64.h
diff -u /dev/null src/external/gpl3/gcc/dist/gcc/config/mips/netbsd64.h:1.1
--- /dev/null	Wed Jun 29 04:59:10 2011
+++ src/external/gpl3/gcc/dist/gcc/config/mips/netbsd64.h	Wed Jun 29 04:59:10 2011
@@ -0,0 +1,58 @@
+/* Definitions of target machine for GNU compiler, for MIPS NetBSD systems.
+   Copyright (C) 1993, 1995, 1996, 1997, 1999, 2000, 2001, 2002, 2003, 2004
+   Free Software Foundation, Inc.
+
+This file is part of GCC.
+
+GCC is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2, or (at your option)
+any later version.
+
+GCC is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; 

CVS commit: src/sys/dev/wscons

2011-06-28 Thread Michael Lorenz
Module Name:src
Committed By:   macallan
Date:   Wed Jun 29 05:00:06 UTC 2011

Modified Files:
src/sys/dev/wscons: wsconsio.h

Log Message:
make the EDID buffer pointer void *


To generate a diff of this commit:
cvs rdiff -u -r1.98 -r1.99 src/sys/dev/wscons/wsconsio.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/wscons/wsconsio.h
diff -u src/sys/dev/wscons/wsconsio.h:1.98 src/sys/dev/wscons/wsconsio.h:1.99
--- src/sys/dev/wscons/wsconsio.h:1.98	Wed Jun 29 04:50:32 2011
+++ src/sys/dev/wscons/wsconsio.h	Wed Jun 29 05:00:06 2011
@@ -1,4 +1,4 @@
-/* $NetBSD: wsconsio.h,v 1.98 2011/06/29 04:50:32 macallan Exp $ */
+/* $NetBSD: wsconsio.h,v 1.99 2011/06/29 05:00:06 macallan Exp $ */
 
 /*
  * Copyright (c) 1996, 1997 Christopher G. Demetriou.  All rights reserved.
@@ -577,7 +577,7 @@
 struct wsdisplayio_edid_info {
 	uint32_t buffer_size;
 	uint32_t data_size;
-	uint8_t *edid_data;
+	void *edid_data;
 };
 #define WSDISPLAYIO_GET_EDID	_IOWR('W', 102, struct wsdisplayio_edid_info)
 



CVS commit: src/sys/arch/evbppc/mpc85xx

2011-06-28 Thread Matt Thomas
Module Name:src
Committed By:   matt
Date:   Wed Jun 29 05:53:05 UTC 2011

Modified Files:
src/sys/arch/evbppc/mpc85xx: machdep.c

Log Message:
Some initial MULTIPROCESSOR spin code.  Doesn't work yet.


To generate a diff of this commit:
cvs rdiff -u -r1.13 -r1.14 src/sys/arch/evbppc/mpc85xx/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/evbppc/mpc85xx/machdep.c
diff -u src/sys/arch/evbppc/mpc85xx/machdep.c:1.13 src/sys/arch/evbppc/mpc85xx/machdep.c:1.14
--- src/sys/arch/evbppc/mpc85xx/machdep.c:1.13	Sat Jun 25 00:07:10 2011
+++ src/sys/arch/evbppc/mpc85xx/machdep.c	Wed Jun 29 05:53:05 2011
@@ -1,4 +1,4 @@
-/*	$NetBSD: machdep.c,v 1.13 2011/06/25 00:07:10 matt Exp $	*/
+/*	$NetBSD: machdep.c,v 1.14 2011/06/29 05:53:05 matt Exp $	*/
 /*-
  * Copyright (c) 2010, 2011 The NetBSD Foundation, Inc.
  * All rights reserved.
@@ -66,7 +66,7 @@
 
 #include prop/proplib.h
 
-#include machine/stdarg.h
+#include powerpc/stdarg.h
 
 #include dev/cons.h
 
@@ -77,6 +77,7 @@
 #include net/if_media.h
 #include dev/mii/miivar.h
 
+#include powerpc/cpuset.h
 #include powerpc/pcb.h
 #include powerpc/spr.h
 #include powerpc/booke/spr.h
@@ -663,27 +664,10 @@
 }
 
 static void
-e500_cpu_attach(device_t self, u_int instance)
+cpu_print_info(struct cpu_info *ci)
 {
-	struct cpu_info * const ci = cpu_info[instance - (instance  0)];
-
-	if (instance  1) {
-#ifdef MULTIPROCESSOR
-#error		still needs to be written
-		ci-ci_idepth = -1;
-		cpu_probe_cache();
-#else
-		aprint_error_dev(self, disabled (uniprocessor kernel)\n);
-		return;
-#endif
-	}
-
-	self-dv_private = ci;
-
-	ci-ci_cpuid = instance - (instance  0);
-	ci-ci_dev = self;
-//ci-ci_idlespin = cpu_idlespin;
 	uint64_t freq = board_info_get_number(processor-frequency);
+	device_t self = ci-ci_dev;
 
 	char freqbuf[10];
 	if (freq = 99950) {
@@ -736,12 +720,238 @@
 
 	e500_tlb_print(self, tlb0, mfspr(SPR_TLB0CFG));
 	e500_tlb_print(self, tlb1, mfspr(SPR_TLB1CFG));
+}
+
+#ifdef MULTIPROCESSOR
+static void
+e500_cpu_spinup(device_t self, struct cpu_info *ci)
+{
+	uintptr_t spinup_table_addr = board_info_get_number(mp-spin-up-table);
+	struct pglist splist;
+
+	if (spinup_table_addr == 0) {
+		aprint_error_dev(self, hatch failed (no spin-up table));
+		return;
+	}
+
+	struct uboot_spinup_entry * const e = (void *)spinup_table_addr;
+	volatile struct cpu_hatch_data * const h = cpu_hatch_data;
+	const size_t id = cpu_index(ci);
+	volatile __cpuset_t * const hatchlings = cpuset_info.cpus_hatched;
+
+	if (h-hatch_sp == 0) {
+		int error = uvm_pglistalloc(PAGE_SIZE, PAGE_SIZE,
+		64*1024*1024, PAGE_SIZE, 0, splist, 1, 1);
+		if (error) {
+			aprint_error_dev(self,
+			unable to allocate hatch stack\n);
+			return;
+		}
+		h-hatch_sp = VM_PAGE_TO_PHYS(TAILQ_FIRST(splist))
+		+ PAGE_SIZE - CALLFRAMELEN;
+}
+
+
+	for (size_t i = 1; e[i].entry_pir != 0; i++) {
+		printf(%s: cpu%u: entry#%zu(%p): pir=%u\n,
+		__func__, ci-ci_cpuid, i, e[i], e[i].entry_pir);
+		if (e[i].entry_pir == ci-ci_cpuid) {
+
+			ci-ci_curlwp = ci-ci_data.cpu_idlelwp;
+			ci-ci_curpcb = lwp_getpcb(ci-ci_curlwp);
+			ci-ci_curpm = pmap_kernel();
+			ci-ci_lasttb = cpu_info[0].ci_lasttb;
+			ci-ci_data.cpu_cc_freq =
+			cpu_info[0].ci_data.cpu_cc_freq;
+
+			h-hatch_self = self;
+			h-hatch_ci = ci;
+			h-hatch_running = -1;
+			h-hatch_pir = e[i].entry_pir;
+			h-hatch_hid0 = mfspr(SPR_HID0);
+			KASSERT(h-hatch_sp != 0);
+			/*
+			 * Get new timebase.  We don't want to deal with
+			 * timebase crossing a 32-bit boundary so make sure
+			 * that we have enough headroom to do the timebase
+			 * synchronization. 
+			 */
+#define	TBSYNC_SLOP	2000
+			uint32_t tbl;
+			uint32_t tbu;
+			do {
+tbu = mfspr(SPR_RTBU);
+tbl = mfspr(SPR_RTBL) + TBSYNC_SLOP;
+			} while (tbl  TBSYNC_SLOP);
+			
+			h-hatch_tbu = tbu;
+			h-hatch_tbl = tbl;
+			__asm(sync;isync);
+			dcache_wbinv((vaddr_t)h, sizeof(*h));
+
+#if 1
+			/*
+			 * And here we go...
+			 */
+			e[i].entry_addr_lower =
+			(uint32_t)e500_spinup_trampoline;
+			dcache_wbinv((vaddr_t)e[i], sizeof(e[i]));
+			__asm __volatile(sync;isync);
+			__insn_barrier();
+
+			for (u_int timo = 0; timo++  1; ) {
+dcache_inv((vaddr_t)e[i], sizeof(e[i]));
+if (e[i].entry_addr_lower == 3) {
+	printf(
+	%s: cpu%u started in %u spins\n,
+	__func__, cpu_index(ci), timo);
+	break;
+}
+			}
+			for (u_int timo = 0; timo++  1; ) {
+dcache_inv((vaddr_t)h, sizeof(*h));
+if (h-hatch_running == 0) {
+	printf(
+	%s: cpu%u cracked in %u spins: (running=%d)\n,
+	__func__, cpu_index(ci),
+	timo, h-hatch_running);
+	break;
+}
+			}
+			if (h-hatch_running == -1) {
+aprint_error_dev(self,
+hatch failed (timeout): running=%d
+, entry=%#x\n,
+h-hatch_running, e[i].entry_addr_lower);
+goto out;
+			

CVS commit: src/sys/common/pmap/tlb

2011-06-28 Thread Matt Thomas
Module Name:src
Committed By:   matt
Date:   Wed Jun 29 05:53:45 UTC 2011

Modified Files:
src/sys/common/pmap/tlb: pmap.c pmap_tlb.c

Log Message:
Multiprocessing fixes.


To generate a diff of this commit:
cvs rdiff -u -r1.8 -r1.9 src/sys/common/pmap/tlb/pmap.c
cvs rdiff -u -r1.9 -r1.10 src/sys/common/pmap/tlb/pmap_tlb.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/common/pmap/tlb/pmap.c
diff -u src/sys/common/pmap/tlb/pmap.c:1.8 src/sys/common/pmap/tlb/pmap.c:1.9
--- src/sys/common/pmap/tlb/pmap.c:1.8	Thu Jun 23 20:46:15 2011
+++ src/sys/common/pmap/tlb/pmap.c	Wed Jun 29 05:53:44 2011
@@ -1,4 +1,4 @@
-/*	$NetBSD: pmap.c,v 1.8 2011/06/23 20:46:15 matt Exp $	*/
+/*	$NetBSD: pmap.c,v 1.9 2011/06/29 05:53:44 matt Exp $	*/
 
 /*-
  * Copyright (c) 1998, 2001 The NetBSD Foundation, Inc.
@@ -67,7 +67,7 @@
 
 #include sys/cdefs.h
 
-__KERNEL_RCSID(0, $NetBSD: pmap.c,v 1.8 2011/06/23 20:46:15 matt Exp $);
+__KERNEL_RCSID(0, $NetBSD: pmap.c,v 1.9 2011/06/29 05:53:44 matt Exp $);
 
 /*
  *	Manages physical address maps.
@@ -324,7 +324,7 @@
 		for (; pv != NULL; pv = pv-pv_next) {
 #ifdef MULTIPROCESSOR
 			CPUSET_MERGE(onproc, pv-pv_pmap-pm_onproc);
-			if (CPUSET_EQUAL_P(onproc, cpus_running)) {
+			if (CPUSET_EQUAL_P(onproc, cpuset_info.cpus_running)) {
 break;
 			}
 #else
@@ -585,7 +585,7 @@
 	PMAP_COUNT(update);
 
 	kpreempt_disable();
-#ifdef MULTIPROCESSOR
+#if defined(MULTIPROCESSOR)  defined(PMAP_NEED_TLB_SHOOTDOWN)
 	u_int pending = atomic_swap_uint(pmap-pm_shootdown_pending, 0);
 	if (pending  pmap_tlb_shootdown_bystanders(pmap))
 		PMAP_COUNT(shootdown_ipis);

Index: src/sys/common/pmap/tlb/pmap_tlb.c
diff -u src/sys/common/pmap/tlb/pmap_tlb.c:1.9 src/sys/common/pmap/tlb/pmap_tlb.c:1.10
--- src/sys/common/pmap/tlb/pmap_tlb.c:1.9	Thu Jun 23 08:11:56 2011
+++ src/sys/common/pmap/tlb/pmap_tlb.c	Wed Jun 29 05:53:44 2011
@@ -1,4 +1,4 @@
-/*	$NetBSD: pmap_tlb.c,v 1.9 2011/06/23 08:11:56 matt Exp $	*/
+/*	$NetBSD: pmap_tlb.c,v 1.10 2011/06/29 05:53:44 matt Exp $	*/
 
 /*-
  * Copyright (c) 2010 The NetBSD Foundation, Inc.
@@ -31,7 +31,7 @@
 
 #include sys/cdefs.h
 
-__KERNEL_RCSID(0, $NetBSD: pmap_tlb.c,v 1.9 2011/06/23 08:11:56 matt Exp $);
+__KERNEL_RCSID(0, $NetBSD: pmap_tlb.c,v 1.10 2011/06/29 05:53:44 matt Exp $);
 
 /*
  * Manages address spaces in a TLB.
@@ -162,10 +162,10 @@
 #undef IFCONSTANT
 
 #if defined(MULTIPROCESSOR)
-static struct pmap_tlb_info *pmap_tlbs[MAXCPUS] = {
+struct pmap_tlb_info *pmap_tlbs[MAXCPUS] = {
 	[0] = pmap_tlb0_info,
 };
-static u_int pmap_ntlbs = 1;
+u_int pmap_ntlbs = 1;
 #endif
 
 #define	__BITMAP_SET(bm, n) \
@@ -463,7 +463,7 @@
 		 */
 		struct pmap_asid_info * const pai = PMAP_PAI(ti-ti_victim, ti);
 		KASSERT(ti-ti_victim != pmap_kernel());
-		if (!CPU_EMPTY_P(CPUSET_SUBSET(ti-ti_victim-pm_onproc, ti-ti_cpu_mask))) {
+		if (!CPUSET_EMPTY_P(CPUSET_SUBSET(ti-ti_victim-pm_onproc, ti-ti_cpu_mask))) {
 			/*
 			 * The victim is an active pmap so we will just
 			 * invalidate its TLB entries.
@@ -602,7 +602,7 @@
 			 * change now that we have released the lock but we
 			 * can tolerate spurious shootdowns.
 			 */
-			KASSERT(!CPU_EMPTY_P(onproc));
+			KASSERT(!CPUSET_EMPTY_P(onproc));
 			u_int j = CPUSET_NEXT(onproc);
 			cpu_send_ipi(cpu_lookup(j), IPI_SHOOTDOWN);
 			ipi_sent = true;
@@ -682,8 +682,8 @@
 	KASSERT(pai-pai_asid == 0);
 	KASSERT(pai-pai_link.le_prev == NULL);
 #if defined(MULTIPROCESSOR)
-	KASSERT(CPU_EMPTY_P(CPUSET_SUBSET(pm-pm_onproc, ti-ti_cpu_mask)));
-	KASSERT(CPU_EMPTY_P(CPUSET_SUBSET(pm-pm_active, ti-ti_cpu_mask)));
+	KASSERT(CPUSET_EMPTY_P(CPUSET_SUBSET(pm-pm_onproc, ti-ti_cpu_mask)));
+	KASSERT(CPUSET_EMPTY_P(CPUSET_SUBSET(pm-pm_active, ti-ti_cpu_mask)));
 #endif
 	KASSERT(ti-ti_asids_free  0);
 	KASSERT(ti-ti_asid_hint = ti-ti_asid_max);
@@ -790,7 +790,7 @@
 		 * be changed while this TLBs lock is held unless atomic
 		 * operations are used.
 		 */
-		CPUSET_ADD(pm-pm_onproc, cpu_index(ci));
+		CPUSET_ADD(pm-pm_onproc, cpu_index(ci));
 #endif
 		ci-ci_pmap_asid_cur = pai-pai_asid;
 		tlb_set_asid(pai-pai_asid);
@@ -837,11 +837,11 @@
 {
 	KASSERT(pm != pmap_kernel());
 #if defined(MULTIPROCESSOR)
-	KASSERT(CPUSET_EMPTY(pm-pm_onproc));
-	for (u_int i = 0; !CPUSET_EMPTY(pm-pm_active); i++) {
+	KASSERT(CPUSET_EMPTY_P(pm-pm_onproc));
+	for (u_int i = 0; !CPUSET_EMPTY_P(pm-pm_active); i++) {
 		KASSERT(i  pmap_ntlbs);
 		struct pmap_tlb_info * const ti = pmap_tlbs[i];
-		if (!CPU_EMPTY_P(CPUSET_SUBSET(pm-pm_active, ti-ti_cpu_mask))) {
+		if (!CPUSET_EMPTY_P(CPUSET_SUBSET(pm-pm_active, ti-ti_cpu_mask))) {
 			struct pmap_asid_info * const pai = PMAP_PAI(pm, ti);
 			TLBINFO_LOCK(ti);
 			KASSERT(ti-ti_victim != pm);



CVS commit: src/sys/arch/powerpc/booke

2011-06-28 Thread Matt Thomas
Module Name:src
Committed By:   matt
Date:   Wed Jun 29 05:55:47 UTC 2011

Modified Files:
src/sys/arch/powerpc/booke: e500_intr.c

Log Message:
Panic when an ipi is sent to unknown cpu.


To generate a diff of this commit:
cvs rdiff -u -r1.13 -r1.14 src/sys/arch/powerpc/booke/e500_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/powerpc/booke/e500_intr.c
diff -u src/sys/arch/powerpc/booke/e500_intr.c:1.13 src/sys/arch/powerpc/booke/e500_intr.c:1.14
--- src/sys/arch/powerpc/booke/e500_intr.c:1.13	Sat Jun 25 00:07:10 2011
+++ src/sys/arch/powerpc/booke/e500_intr.c	Wed Jun 29 05:55:47 2011
@@ -1,4 +1,4 @@
-/*	$NetBSD: e500_intr.c,v 1.13 2011/06/25 00:07:10 matt Exp $	*/
+/*	$NetBSD: e500_intr.c,v 1.14 2011/06/29 05:55:47 matt Exp $	*/
 /*-
  * Copyright (c) 2010, 2011 The NetBSD Foundation, Inc.
  * All rights reserved.
@@ -1132,7 +1132,7 @@
 	struct cpu_softc * const cpu = ci-ci_softc;
 	uint32_t dstmask;
 
-	if (target = ncpu) {
+	if (target = CPU_MAXNUM) {
 		CPU_INFO_ITERATOR cii;
 		struct cpu_info *dst_ci;
 
@@ -1149,7 +1149,10 @@
 		}
 	} else {
 		struct cpu_info * const dst_ci = cpu_lookup(target);
-		KASSERT(target == cpu_index(dst_ci));
+		KASSERT(dst_ci != NULL);
+		KASSERTMSG(target == cpu_index(dst_ci),
+		(%s: target (%lu) != cpu_index(cpu%u),
+		 __func__, target, cpu_index(dst_ci)));
 		dstmask = (1  target);
 		if (ipimsg)
 			atomic_or_32(dst_ci-ci_pending_ipis, ipimsg);



CVS commit: src/sys/arch/powerpc/booke

2011-06-28 Thread Matt Thomas
Module Name:src
Committed By:   matt
Date:   Wed Jun 29 05:56:31 UTC 2011

Modified Files:
src/sys/arch/powerpc/booke: e500_timer.c

Log Message:
Only attach tc on primary cpu.


To generate a diff of this commit:
cvs rdiff -u -r1.3 -r1.4 src/sys/arch/powerpc/booke/e500_timer.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/booke/e500_timer.c
diff -u src/sys/arch/powerpc/booke/e500_timer.c:1.3 src/sys/arch/powerpc/booke/e500_timer.c:1.4
--- src/sys/arch/powerpc/booke/e500_timer.c:1.3	Sat Jun 25 00:07:10 2011
+++ src/sys/arch/powerpc/booke/e500_timer.c	Wed Jun 29 05:56:31 2011
@@ -1,4 +1,4 @@
-/*	$NetBSD: e500_timer.c,v 1.3 2011/06/25 00:07:10 matt Exp $	*/
+/*	$NetBSD: e500_timer.c,v 1.4 2011/06/29 05:56:31 matt Exp $	*/
 /*-
  * Copyright (c) 2010, 2011 The NetBSD Foundation, Inc.
  * All rights reserved.
@@ -35,7 +35,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: e500_timer.c,v 1.3 2011/06/25 00:07:10 matt Exp $);
+__KERNEL_RCSID(0, $NetBSD: e500_timer.c,v 1.4 2011/06/29 05:56:31 matt Exp $);
 
 #include sys/param.h
 #include sys/kernel.h
@@ -53,9 +53,6 @@
 #include powerpc/booke/e500var.h
 #include powerpc/booke/openpicreg.h
 
-/*
- * Initially we assume a processor with a bus frequency of 12.5 MHz.
- */
 static u_long ns_per_tick;
 
 static void init_ppcbooke_tc(void);
@@ -174,7 +171,8 @@
 	openpic_write(cpu, cpu-cpu_clock_gtbcr,
 	 cpu-cpu_ticks_per_clock_intr);
 
-	init_ppcbooke_tc();
+	if (CPU_IS_PRIMARY(ci))
+		init_ppcbooke_tc();
 }
 
 void



CVS commit: src/sys/arch/powerpc/powerpc

2011-06-28 Thread Matt Thomas
Module Name:src
Committed By:   matt
Date:   Wed Jun 29 05:57:30 UTC 2011

Modified Files:
src/sys/arch/powerpc/powerpc: intr_stubs.c

Log Message:
Add cpu_send_ipi stub


To generate a diff of this commit:
cvs rdiff -u -r1.2 -r1.3 src/sys/arch/powerpc/powerpc/intr_stubs.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/powerpc/intr_stubs.c
diff -u src/sys/arch/powerpc/powerpc/intr_stubs.c:1.2 src/sys/arch/powerpc/powerpc/intr_stubs.c:1.3
--- src/sys/arch/powerpc/powerpc/intr_stubs.c:1.2	Wed Jun 15 17:47:45 2011
+++ src/sys/arch/powerpc/powerpc/intr_stubs.c	Wed Jun 29 05:57:30 2011
@@ -38,7 +38,7 @@
 
 #include sys/cdefs.h
 
-__KERNEL_RCSID(0, $NetBSD: intr_stubs.c,v 1.2 2011/06/15 17:47:45 matt Exp $);
+__KERNEL_RCSID(0, $NetBSD: intr_stubs.c,v 1.3 2011/06/29 05:57:30 matt Exp $);
 
 #include sys/param.h
 #include sys/cpu.h
@@ -207,5 +207,12 @@
 intr_wdogintr(struct trapframe *tf)
 {
 	(*powerpc_intrsw-intrsw_wdogintr)(tf);
-	
+}
+
+void cpu_send_ipi(cpuid_t, uint32_t) __stub;
+
+void
+cpu_send_ipi(cpuid_t id, uint32_t mask)
+{
+	(*powerpc_intrsw-intrsw_cpu_send_ipi)(id, mask);
 }