CVS commit: src/sys/arch/hp700/hp700

2014-02-14 Thread Nick Hudson
Module Name:src
Committed By:   skrll
Date:   Sat Feb 15 07:38:22 UTC 2014

Modified Files:
src/sys/arch/hp700/hp700: machdep.c

Log Message:
Trailing whitespace


To generate a diff of this commit:
cvs rdiff -u -r1.118 -r1.119 src/sys/arch/hp700/hp700/machdep.c

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

Modified files:

Index: src/sys/arch/hp700/hp700/machdep.c
diff -u src/sys/arch/hp700/hp700/machdep.c:1.118 src/sys/arch/hp700/hp700/machdep.c:1.119
--- src/sys/arch/hp700/hp700/machdep.c:1.118	Thu Jan 16 13:19:36 2014
+++ src/sys/arch/hp700/hp700/machdep.c	Sat Feb 15 07:38:22 2014
@@ -1,4 +1,4 @@
-/*	$NetBSD: machdep.c,v 1.118 2014/01/16 13:19:36 skrll Exp $	*/
+/*	$NetBSD: machdep.c,v 1.119 2014/02/15 07:38:22 skrll Exp $	*/
 
 /*-
  * Copyright (c) 2001, 2002 The NetBSD Foundation, Inc.
@@ -58,7 +58,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: machdep.c,v 1.118 2014/01/16 13:19:36 skrll Exp $);
+__KERNEL_RCSID(0, $NetBSD: machdep.c,v 1.119 2014/02/15 07:38:22 skrll Exp $);
 
 #include opt_cputype.h
 #include opt_ddb.h
@@ -196,7 +196,7 @@ static struct btlb_slot {
 
 	/* The number associated with this slot. */
 	int btlb_slot_number;
-	
+
 	/* The flags associated with this slot. */
 	int btlb_slot_flags;
 #define	BTLB_SLOT_IBTLB			(1  0)
@@ -477,7 +477,7 @@ hppa_init(paddr_t start, void *bi)
 	error = pdcproc_hpa_processor(hppa_mcpuhpa);
 	if (error  0)
 		panic(%s: PDC_HPA failed, __func__);
-	
+
 	/* cache parameters */
 	error = pdcproc_cache(pdc_cache);
 	if (error  0) {
@@ -667,7 +667,7 @@ cpuid(void)
 	error = pdcproc_model_info(pdc_model);
 	if (error  0) {
 		DPRINTF((WARNING: PDC_MODEL_INFO error %d\n, error));
-		
+
 		pdc_model.hwmodel = 0;
 		pdc_model.hv = 0;
 	} else {
@@ -1159,7 +1159,7 @@ hppa_btlb_insert(pa_space_t space, vaddr
 	 * allow execution also need instruction translation.
 	 */
 	switch (tlbprot  TLB_AR_MASK) {
-	case TLB_AR_R:	
+	case TLB_AR_R:
 	case TLB_AR_RW:
 	case TLB_AR_R | TLB_USER:
 	case TLB_AR_RW | TLB_USER:
@@ -1218,7 +1218,7 @@ hppa_btlb_insert(pa_space_t space, vaddr
 		for (btlb_slot = btlb_slots;
 		 btlb_slot  btlb_slot_end;
 		 btlb_slot++) {
-			
+
 			/*
 			 * Skip this slot if it's in use, or if we need a
 			 * variable-range slot and this isn't one.
@@ -1258,7 +1258,7 @@ hppa_btlb_insert(pa_space_t space, vaddr
 			DPRINTFN(10, (BTLB full\n));
 			return -(ENOMEM);
 		}
-			
+
 		/*
 		 * Now fill this BTLB slot record and insert the entry.
 		 */
@@ -1639,7 +1639,7 @@ hppa_pim64_dump(int check_type, void *da
 			printf(\n\n%s Registers:, name);
 			for (reg_k = 0; reg_k  reg_j; reg_k++)
 printf(%s0x%016lx,
-   (reg_k  3) ?   : \n, 
+   (reg_k  3) ?   : \n,
    (unsigned long)regarray[reg_k]);
 		}
 
@@ -1748,7 +1748,7 @@ hppa_machine_check(int check_type)
 		DELAY(25);
 		panic(machine check);
 	}
-	
+
 	/* Reboot the machine. */
 	printf(Rebooting...\n);
 	cpu_die();
@@ -1833,7 +1833,7 @@ dumpsys(void)
 		dump = bdev-d_dump;
 		/* TODO block map the whole physical memory */
 		for (i = 0; i  bytes; i += n) {
-		
+
 			/* Print out how many MBs we are to go. */
 			n = bytes - i;
 			if (n  (n % (1024*1024)) == 0)
@@ -1946,7 +1946,7 @@ sysctl_machdep_heartbeat(SYSCTLFN_ARGS)
 	int error;
 	bool oldval;
 	struct sysctlnode node = *rnode;
-	
+
 	oldval = lcd_blink_p;
 	/*
 	 * If we were false and are now true, start the timer.



CVS commit: src/sys/arch/hp700/hp700

2014-01-16 Thread Nick Hudson
Module Name:src
Committed By:   skrll
Date:   Thu Jan 16 13:07:07 UTC 2014

Modified Files:
src/sys/arch/hp700/hp700: machdep.c

Log Message:
Drop CPU detection by features and panic if a CPU isn't detected via
PDC_MODEL_CPUID or cpu_model_cpuid.


To generate a diff of this commit:
cvs rdiff -u -r1.116 -r1.117 src/sys/arch/hp700/hp700/machdep.c

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

Modified files:

Index: src/sys/arch/hp700/hp700/machdep.c
diff -u src/sys/arch/hp700/hp700/machdep.c:1.116 src/sys/arch/hp700/hp700/machdep.c:1.117
--- src/sys/arch/hp700/hp700/machdep.c:1.116	Sat Oct 19 13:16:30 2013
+++ src/sys/arch/hp700/hp700/machdep.c	Thu Jan 16 13:07:07 2014
@@ -1,4 +1,4 @@
-/*	$NetBSD: machdep.c,v 1.116 2013/10/19 13:16:30 skrll Exp $	*/
+/*	$NetBSD: machdep.c,v 1.117 2014/01/16 13:07:07 skrll Exp $	*/
 
 /*-
  * Copyright (c) 2001, 2002 The NetBSD Foundation, Inc.
@@ -58,7 +58,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: machdep.c,v 1.116 2013/10/19 13:16:30 skrll Exp $);
+__KERNEL_RCSID(0, $NetBSD: machdep.c,v 1.117 2014/01/16 13:07:07 skrll Exp $);
 
 #include opt_cputype.h
 #include opt_ddb.h
@@ -685,9 +685,13 @@ cpuid(void)
 	error = pdcproc_model_cpuid(pdc_cpuid);
 	if (error  0) {
 		DPRINTF((WARNING: PDC_MODEL_CPUID error %d. 
-		Using cpu_modelno based cpu_type.\n, error));
+		Using cpu_modelno (%#x) based cpu_type.\n, error, cpu_modelno));
 
 		cpu_type = cpu_model_cpuid(cpu_modelno);
+		if (cpu_type == hpc_unknown) {
+			printf(WARNING: Unknown cpu_type for cpu_modelno %x\n,
+			   cpu_modelno);
+		}
 	} else {
 		DPRINTF((%s: cpuid.version  = %x\n, __func__,
 		pdc_cpuid.version));
@@ -774,26 +778,33 @@ cpuid(void)
 		pmap_hptsize = 0;
 	}
 
+	bool cpu_found = false;
 	if (cpu_version) {
+		DPRINTF((%s: looking for cpu_version %x\n, __func__,
+		cpu_version));
 		for (i = 0, p = cpu_types; i  __arraycount(cpu_types);
 		 i++, p++) {
-			if (p-hci_cpuversion == cpu_version)
+			if (p-hci_cpuversion == cpu_version) {
+cpu_found = true;
 break;
+			}
 		}
 	} else if (cpu_type != hpc_unknown) {
+		DPRINTF((%s: looking for cpu_type %d\n, __func__,
+		cpu_type));
 		for (i = 0, p = cpu_types; i  __arraycount(cpu_types);
 		 i++, p++) {
-			if (p-hci_cputype == cpu_type)
-break;
-		}
-	} else {
-		for (i = 0, p = cpu_types; i  __arraycount(cpu_types);
-		 i++, p++) {
-			if (p-hci_features == cpu_features)
+			if (p-hci_cputype == cpu_type) {
+cpu_found = true;
 break;
+			}
 		}
 	}
 
+	if (!cpu_found) {
+		panic(CPU detection failed. Please report the problem.);
+	}
+
 	hppa_cpu_info = p;
 
 	if (hppa_cpu_info-hci_chip_name == NULL)



CVS commit: src/sys/arch/hp700/hp700

2014-01-16 Thread Nick Hudson
Module Name:src
Committed By:   skrll
Date:   Thu Jan 16 13:19:36 UTC 2014

Modified Files:
src/sys/arch/hp700/hp700: machdep.c

Log Message:
Add some 715 machines to cpu_model_cpuid including the 715/100 that
Ryo ONODERA has.


To generate a diff of this commit:
cvs rdiff -u -r1.117 -r1.118 src/sys/arch/hp700/hp700/machdep.c

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

Modified files:

Index: src/sys/arch/hp700/hp700/machdep.c
diff -u src/sys/arch/hp700/hp700/machdep.c:1.117 src/sys/arch/hp700/hp700/machdep.c:1.118
--- src/sys/arch/hp700/hp700/machdep.c:1.117	Thu Jan 16 13:07:07 2014
+++ src/sys/arch/hp700/hp700/machdep.c	Thu Jan 16 13:19:36 2014
@@ -1,4 +1,4 @@
-/*	$NetBSD: machdep.c,v 1.117 2014/01/16 13:07:07 skrll Exp $	*/
+/*	$NetBSD: machdep.c,v 1.118 2014/01/16 13:19:36 skrll Exp $	*/
 
 /*-
  * Copyright (c) 2001, 2002 The NetBSD Foundation, Inc.
@@ -58,7 +58,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: machdep.c,v 1.117 2014/01/16 13:07:07 skrll Exp $);
+__KERNEL_RCSID(0, $NetBSD: machdep.c,v 1.118 2014/01/16 13:19:36 skrll Exp $);
 
 #include opt_cputype.h
 #include opt_ddb.h
@@ -861,6 +861,13 @@ cpu_model_cpuid(int modelno)
 	case HPPA_BOARD_HPE25:
 	case HPPA_BOARD_HPE35:
 	case HPPA_BOARD_HPE45:
+	case HPPA_BOARD_HP715_80:
+	case HPPA_BOARD_HP715_64:
+	case HPPA_BOARD_HP715_100:
+	case HPPA_BOARD_HP715_100XC:
+	case HPPA_BOARD_HP715_100L:
+	case HPPA_BOARD_HP715_120L:
+	case HPPA_BOARD_HP715_80M:
 		return hpcxl;
 
 	case HPPA_BOARD_HP735_99:



CVS commit: src/sys/arch/hp700/dev

2014-01-16 Thread Nick Hudson
Module Name:src
Committed By:   skrll
Date:   Fri Jan 17 07:44:16 UTC 2014

Modified Files:
src/sys/arch/hp700/dev: lasi.c

Log Message:
Fix lasi at mainbus attachment, e.g. on a HP715/100.


To generate a diff of this commit:
cvs rdiff -u -r1.24 -r1.25 src/sys/arch/hp700/dev/lasi.c

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

Modified files:

Index: src/sys/arch/hp700/dev/lasi.c
diff -u src/sys/arch/hp700/dev/lasi.c:1.24 src/sys/arch/hp700/dev/lasi.c:1.25
--- src/sys/arch/hp700/dev/lasi.c:1.24	Sat Oct 19 13:49:11 2013
+++ src/sys/arch/hp700/dev/lasi.c	Fri Jan 17 07:44:16 2014
@@ -1,4 +1,4 @@
-/*	$NetBSD: lasi.c,v 1.24 2013/10/19 13:49:11 skrll Exp $	*/
+/*	$NetBSD: lasi.c,v 1.25 2014/01/17 07:44:16 skrll Exp $	*/
 
 /*	$OpenBSD: lasi.c,v 1.4 2001/06/09 03:57:19 mickey Exp $	*/
 
@@ -29,7 +29,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: lasi.c,v 1.24 2013/10/19 13:49:11 skrll Exp $);
+__KERNEL_RCSID(0, $NetBSD: lasi.c,v 1.25 2014/01/17 07:44:16 skrll Exp $);
 
 #undef LASIDEBUG
 
@@ -200,6 +200,15 @@ lasiattach(device_t parent, device_t sel
 
 	/* Attach the GSC bus. */
 	ga.ga_ca = *ca;	/* clone from us */
+	if (strcmp(device_xname(parent), mainbus0) == 0) {
+		ga.ga_dp.dp_bc[0] = ga.ga_dp.dp_bc[1];
+		ga.ga_dp.dp_bc[1] = ga.ga_dp.dp_bc[2];
+		ga.ga_dp.dp_bc[2] = ga.ga_dp.dp_bc[3];
+		ga.ga_dp.dp_bc[3] = ga.ga_dp.dp_bc[4];
+		ga.ga_dp.dp_bc[4] = ga.ga_dp.dp_bc[5];
+		ga.ga_dp.dp_bc[5] = ga.ga_dp.dp_mod;
+		ga.ga_dp.dp_mod = 0;
+	}
 
 	ga.ga_name = gsc;
 	ga.ga_ir = sc-sc_ir;



CVS commit: src/sys/arch/hp700/stand

2014-01-15 Thread Nick Hudson
Module Name:src
Committed By:   skrll
Date:   Wed Jan 15 21:52:13 UTC 2014

Modified Files:
src/sys/arch/hp700/stand/boot: boot.c
src/sys/arch/hp700/stand/common: itecons.c lif.c

Log Message:
Fix various DEBUG option builds


To generate a diff of this commit:
cvs rdiff -u -r1.12 -r1.13 src/sys/arch/hp700/stand/boot/boot.c
cvs rdiff -u -r1.10 -r1.11 src/sys/arch/hp700/stand/common/itecons.c \
src/sys/arch/hp700/stand/common/lif.c

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

Modified files:

Index: src/sys/arch/hp700/stand/boot/boot.c
diff -u src/sys/arch/hp700/stand/boot/boot.c:1.12 src/sys/arch/hp700/stand/boot/boot.c:1.13
--- src/sys/arch/hp700/stand/boot/boot.c:1.12	Sat Jan 22 19:19:17 2011
+++ src/sys/arch/hp700/stand/boot/boot.c	Wed Jan 15 21:52:13 2014
@@ -1,4 +1,4 @@
-/*	$NetBSD: boot.c,v 1.12 2011/01/22 19:19:17 joerg Exp $	*/
+/*	$NetBSD: boot.c,v 1.13 2014/01/15 21:52:13 skrll Exp $	*/
 
 /*-
  * Copyright (c) 1982, 1986, 1990, 1993
@@ -231,7 +231,7 @@ exec_hp700(char *file, u_long loadaddr, 
 
 	marks[MARK_START] = loadaddr;
 #ifdef EXEC_DEBUG
-	printf(file=%s loadaddr=%x howto=%x\n,
+	printf(file=%s loadaddr=%lx howto=%x\n,
 		file, loadaddr, boot_howto);
 #endif
 	if ((fd = loadfile(file, marks, LOAD_KERNEL)) == -1)
@@ -244,7 +244,7 @@ exec_hp700(char *file, u_long loadaddr, 
 
 #ifdef EXEC_DEBUG
 	if (debug) {
-		printf(ep=0x%x [, marks[MARK_ENTRY]);
+		printf(ep=0x%lx [, marks[MARK_ENTRY]);
 		for (i = 0; i  10240; i++) {
 			if (!(i % 8)) {
 printf(\b\n%p:, ((u_int *)marks[MARK_ENTRY])[i]);

Index: src/sys/arch/hp700/stand/common/itecons.c
diff -u src/sys/arch/hp700/stand/common/itecons.c:1.10 src/sys/arch/hp700/stand/common/itecons.c:1.11
--- src/sys/arch/hp700/stand/common/itecons.c:1.10	Thu Nov 14 13:01:26 2013
+++ src/sys/arch/hp700/stand/common/itecons.c	Wed Jan 15 21:52:13 2014
@@ -1,4 +1,4 @@
-/*	$NetBSD: itecons.c,v 1.10 2013/11/14 13:01:26 skrll Exp $	*/
+/*	$NetBSD: itecons.c,v 1.11 2014/01/15 21:52:13 skrll Exp $	*/
 
 /*	$OpenBSD: itecons.c,v 1.6 1999/04/20 20:01:02 mickey Exp $	*/
 
@@ -189,7 +189,7 @@ ite_getc(dev_t dev)
 		if (!i--  (dev  0x80)  l == 0) {
 #ifdef DEBUG
 			if (debug  2)
-printf(ite_getc(0x%x): no char %d(%x)\n,
+printf(ite_getc(%llx): no char %d(%x)\n,
    dev, l, c);
 #endif
 			return (0);
Index: src/sys/arch/hp700/stand/common/lif.c
diff -u src/sys/arch/hp700/stand/common/lif.c:1.10 src/sys/arch/hp700/stand/common/lif.c:1.11
--- src/sys/arch/hp700/stand/common/lif.c:1.10	Tue Nov  3 05:07:26 2009
+++ src/sys/arch/hp700/stand/common/lif.c	Wed Jan 15 21:52:13 2014
@@ -1,4 +1,4 @@
-/*	$NetBSD: lif.c,v 1.10 2009/11/03 05:07:26 snj Exp $	*/
+/*	$NetBSD: lif.c,v 1.11 2014/01/15 21:52:13 skrll Exp $	*/
 
 /*	$OpenBSD: lif.c,v 1.7 2001/06/09 03:54:41 mickey Exp $	*/
 
@@ -167,7 +167,7 @@ lif_read(struct open_file *f, void *buf,
 
 #ifdef LIFDEBUG
 	if (debug)
-		printf(lif_read(%p, %p, %u, %p)\n, f, buf, size, resid);
+		printf(lif_read(%p, %p, %zu, %p)\n, f, buf, size, resid);
 #endif
 
 	for (p = bbuf; size; fp-f_seek += bsize, p += bsize) {



CVS commit: src/sys/arch/hp700/dev

2014-01-10 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Fri Jan 10 16:36:54 UTC 2014

Modified Files:
src/sys/arch/hp700/dev: Makefile

Log Message:
include bsd.own.mk


To generate a diff of this commit:
cvs rdiff -u -r1.2 -r1.3 src/sys/arch/hp700/dev/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/arch/hp700/dev/Makefile
diff -u src/sys/arch/hp700/dev/Makefile:1.2 src/sys/arch/hp700/dev/Makefile:1.3
--- src/sys/arch/hp700/dev/Makefile:1.2	Sun Oct 19 18:05:21 2008
+++ src/sys/arch/hp700/dev/Makefile	Fri Jan 10 11:36:54 2014
@@ -1,8 +1,8 @@
-#	$NetBSD: Makefile,v 1.2 2008/10/19 22:05:21 apb Exp $
+#	$NetBSD: Makefile,v 1.3 2014/01/10 16:36:54 christos Exp $
 
 #	$OpenBSD: Makefile,v 1.3 1999/04/20 20:19:37 mickey Exp $
 
-.include bsd.sys.mk
+.include bsd.own.mk
 
 cpudevs.h cpudevs_data.h: cpudevs devlist2h.awk
 	/bin/rm -f cpudevs.h cpudevs_data.h



CVS commit: src/sys/arch/hp700/stand/xxboot

2013-11-17 Thread Nick Hudson
Module Name:src
Committed By:   skrll
Date:   Sun Nov 17 08:21:01 UTC 2013

Modified Files:
src/sys/arch/hp700/stand/xxboot: Makefile

Log Message:
Use -Os to save space. Required by gcc 4.8.


To generate a diff of this commit:
cvs rdiff -u -r1.17 -r1.18 src/sys/arch/hp700/stand/xxboot/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/arch/hp700/stand/xxboot/Makefile
diff -u src/sys/arch/hp700/stand/xxboot/Makefile:1.17 src/sys/arch/hp700/stand/xxboot/Makefile:1.18
--- src/sys/arch/hp700/stand/xxboot/Makefile:1.17	Mon Jun 17 17:44:16 2013
+++ src/sys/arch/hp700/stand/xxboot/Makefile	Sun Nov 17 08:21:01 2013
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile,v 1.17 2013/06/17 17:44:16 christos Exp $
+#	$NetBSD: Makefile,v 1.18 2013/11/17 08:21:01 skrll Exp $
 
 PROG=	xxboot
 NOMAN=	# defined
@@ -14,7 +14,7 @@ CPPFLAGS+=	-D__daddr_t=int32_t
 # ANSI C feature prevents from being relocatable
 #CPPFLAGS+=	-traditional	# would be best
 CPPFLAGS+=	-Dconst=
-COPTS+=		-funsigned-char	-mdisable-fpregs -mpa-risc-1-0
+COPTS+=		-Os -funsigned-char -mdisable-fpregs -mpa-risc-1-0
 
 .include bsd.own.mk
 



CVS commit: src/sys/arch/hp700/stand/common

2013-11-14 Thread Nick Hudson
Module Name:src
Committed By:   skrll
Date:   Thu Nov 14 13:01:26 UTC 2013

Modified Files:
src/sys/arch/hp700/stand/common: itecons.c

Log Message:
Use __debugused


To generate a diff of this commit:
cvs rdiff -u -r1.9 -r1.10 src/sys/arch/hp700/stand/common/itecons.c

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

Modified files:

Index: src/sys/arch/hp700/stand/common/itecons.c
diff -u src/sys/arch/hp700/stand/common/itecons.c:1.9 src/sys/arch/hp700/stand/common/itecons.c:1.10
--- src/sys/arch/hp700/stand/common/itecons.c:1.9	Tue Nov  3 05:07:26 2009
+++ src/sys/arch/hp700/stand/common/itecons.c	Thu Nov 14 13:01:26 2013
@@ -1,4 +1,4 @@
-/*	$NetBSD: itecons.c,v 1.9 2009/11/03 05:07:26 snj Exp $	*/
+/*	$NetBSD: itecons.c,v 1.10 2013/11/14 13:01:26 skrll Exp $	*/
 
 /*	$OpenBSD: itecons.c,v 1.6 1999/04/20 20:01:02 mickey Exp $	*/
 
@@ -161,7 +161,7 @@ int
 ite_getc(dev_t dev)
 {
 	static int stash = 0;
-	int err, c, l, i;
+	int err __debugused, c, l, i;
 
 	if (kyiodc == NULL)
 		return(0x100);



CVS commit: src/sys/arch/hp700/stand/xxboot

2013-11-14 Thread Nick Hudson
Module Name:src
Committed By:   skrll
Date:   Thu Nov 14 13:02:57 UTC 2013

Modified Files:
src/sys/arch/hp700/stand/xxboot: iplsum.c

Log Message:
Improve error message


To generate a diff of this commit:
cvs rdiff -u -r1.6 -r1.7 src/sys/arch/hp700/stand/xxboot/iplsum.c

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

Modified files:

Index: src/sys/arch/hp700/stand/xxboot/iplsum.c
diff -u src/sys/arch/hp700/stand/xxboot/iplsum.c:1.6 src/sys/arch/hp700/stand/xxboot/iplsum.c:1.7
--- src/sys/arch/hp700/stand/xxboot/iplsum.c:1.6	Fri Feb 24 18:45:20 2012
+++ src/sys/arch/hp700/stand/xxboot/iplsum.c	Thu Nov 14 13:02:57 2013
@@ -1,4 +1,4 @@
-/*	$NetBSD: iplsum.c,v 1.6 2012/02/24 18:45:20 skrll Exp $	*/
+/*	$NetBSD: iplsum.c,v 1.7 2013/11/14 13:02:57 skrll Exp $	*/
 
 /*
  * Calculate 32bit checksum of IPL and store in a certain location
@@ -57,7 +57,7 @@ main(int argc, char *argv[])
 		fprintf(stderr, %s: too short\n, argv[1]);
 		return 1;
 	} else if (len  BOOTSIZE) {
-		fprintf(stderr, %s: too long\n, argv[1]);
+		fprintf(stderr, %s: too long (%d vs %d)\n, argv[1], len, BOOTSIZE);
 		return 1;
 	}
 	(void) fclose(fp);



CVS commit: src/sys/arch/hp700/hp700

2013-10-19 Thread Nick Hudson
Module Name:src
Committed By:   skrll
Date:   Sat Oct 19 13:13:09 UTC 2013

Modified Files:
src/sys/arch/hp700/hp700: intr.c

Log Message:
Sprinkle __unused.


To generate a diff of this commit:
cvs rdiff -u -r1.41 -r1.42 src/sys/arch/hp700/hp700/intr.c

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

Modified files:

Index: src/sys/arch/hp700/hp700/intr.c
diff -u src/sys/arch/hp700/hp700/intr.c:1.41 src/sys/arch/hp700/hp700/intr.c:1.42
--- src/sys/arch/hp700/hp700/intr.c:1.41	Wed May 23 16:11:37 2012
+++ src/sys/arch/hp700/hp700/intr.c	Sat Oct 19 13:13:09 2013
@@ -1,4 +1,4 @@
-/*	$NetBSD: intr.c,v 1.41 2012/05/23 16:11:37 skrll Exp $	*/
+/*	$NetBSD: intr.c,v 1.42 2013/10/19 13:13:09 skrll Exp $	*/
 /*	$OpenBSD: intr.c,v 1.27 2009/12/31 12:52:35 jsing Exp $	*/
 
 /*
@@ -35,7 +35,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: intr.c,v 1.41 2012/05/23 16:11:37 skrll Exp $);
+__KERNEL_RCSID(0, $NetBSD: intr.c,v 1.42 2013/10/19 13:13:09 skrll Exp $);
 
 #define __MUTEX_PRIVATE
 
@@ -408,7 +408,7 @@ hp700_intr_dispatch(int ncpl, int eiem, 
 	int ipending_run;
 	int bit_pos;
 	void *arg;
-	int handled;
+	int handled __unused;
 	bool locked = false;
 
 	/*



CVS commit: src/sys/arch/hp700/hp700

2013-10-19 Thread Nick Hudson
Module Name:src
Committed By:   skrll
Date:   Sat Oct 19 13:15:53 UTC 2013

Modified Files:
src/sys/arch/hp700/hp700: mainbus.c

Log Message:
Add __unused to a variable


To generate a diff of this commit:
cvs rdiff -u -r1.83 -r1.84 src/sys/arch/hp700/hp700/mainbus.c

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

Modified files:

Index: src/sys/arch/hp700/hp700/mainbus.c
diff -u src/sys/arch/hp700/hp700/mainbus.c:1.83 src/sys/arch/hp700/hp700/mainbus.c:1.84
--- src/sys/arch/hp700/hp700/mainbus.c:1.83	Wed May 23 16:11:37 2012
+++ src/sys/arch/hp700/hp700/mainbus.c	Sat Oct 19 13:15:53 2013
@@ -1,4 +1,4 @@
-/*	$NetBSD: mainbus.c,v 1.83 2012/05/23 16:11:37 skrll Exp $	*/
+/*	$NetBSD: mainbus.c,v 1.84 2013/10/19 13:15:53 skrll Exp $	*/
 
 /*-
  * Copyright (c) 2001, 2002 The NetBSD Foundation, Inc.
@@ -58,7 +58,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: mainbus.c,v 1.83 2012/05/23 16:11:37 skrll Exp $);
+__KERNEL_RCSID(0, $NetBSD: mainbus.c,v 1.84 2013/10/19 13:15:53 skrll Exp $);
 
 #include locators.h
 #include power.h
@@ -1243,7 +1243,7 @@ _bus_dmamap_load_buffer(bus_dma_tag_t t,
 	bmask = ~(map-_dm_boundary - 1);
 
 	for (seg = *segp; buflen  0; ) {
-		bool ok;
+		bool ok __unused;
 		/*
 		 * Get the physical address for this segment.
 		 */



CVS commit: src/sys/arch/hp700/hp700

2013-10-19 Thread Nick Hudson
Module Name:src
Committed By:   skrll
Date:   Sat Oct 19 13:16:30 UTC 2013

Modified Files:
src/sys/arch/hp700/hp700: machdep.c

Log Message:
Use __unused for a variable and use the correct #ifdef for a block of
code.


To generate a diff of this commit:
cvs rdiff -u -r1.115 -r1.116 src/sys/arch/hp700/hp700/machdep.c

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

Modified files:

Index: src/sys/arch/hp700/hp700/machdep.c
diff -u src/sys/arch/hp700/hp700/machdep.c:1.115 src/sys/arch/hp700/hp700/machdep.c:1.116
--- src/sys/arch/hp700/hp700/machdep.c:1.115	Sat Jul 28 19:08:23 2012
+++ src/sys/arch/hp700/hp700/machdep.c	Sat Oct 19 13:16:30 2013
@@ -1,4 +1,4 @@
-/*	$NetBSD: machdep.c,v 1.115 2012/07/28 19:08:23 matt Exp $	*/
+/*	$NetBSD: machdep.c,v 1.116 2013/10/19 13:16:30 skrll Exp $	*/
 
 /*-
  * Copyright (c) 2001, 2002 The NetBSD Foundation, Inc.
@@ -58,7 +58,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: machdep.c,v 1.115 2012/07/28 19:08:23 matt Exp $);
+__KERNEL_RCSID(0, $NetBSD: machdep.c,v 1.116 2013/10/19 13:16:30 skrll Exp $);
 
 #include opt_cputype.h
 #include opt_ddb.h
@@ -1071,7 +1071,7 @@ static int
 _hp700_btlb_insert(struct btlb_slot *btlb_slot)
 {
 	int error;
-#ifdef DEBUG
+#ifdef MACHDEPDEBUG
 	const char *prot;
 
 	/* Display the protection like a file protection. */
@@ -1741,7 +1741,7 @@ cpu_dump(void)
 {
 	long buf[dbtob(1) / sizeof (long)];
 	kcore_seg_t	*segp;
-	cpu_kcore_hdr_t	*cpuhdrp;
+	cpu_kcore_hdr_t	*cpuhdrp __unused;
 	const struct bdevsw *bdev;
 
 	segp = (kcore_seg_t *)buf;



CVS commit: src/sys/arch/hp700/gsc

2013-10-19 Thread Nick Hudson
Module Name:src
Committed By:   skrll
Date:   Sat Oct 19 13:18:03 UTC 2013

Modified Files:
src/sys/arch/hp700/gsc: harmony.c

Log Message:
Actually return any error.


To generate a diff of this commit:
cvs rdiff -u -r1.27 -r1.28 src/sys/arch/hp700/gsc/harmony.c

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

Modified files:

Index: src/sys/arch/hp700/gsc/harmony.c
diff -u src/sys/arch/hp700/gsc/harmony.c:1.27 src/sys/arch/hp700/gsc/harmony.c:1.28
--- src/sys/arch/hp700/gsc/harmony.c:1.27	Thu Feb 23 21:41:23 2012
+++ src/sys/arch/hp700/gsc/harmony.c	Sat Oct 19 13:18:03 2013
@@ -1,4 +1,4 @@
-/*	$NetBSD: harmony.c,v 1.27 2012/02/23 21:41:23 skrll Exp $	*/
+/*	$NetBSD: harmony.c,v 1.28 2013/10/19 13:18:03 skrll Exp $	*/
 
 /*	$OpenBSD: harmony.c,v 1.23 2004/02/13 21:28:19 mickey Exp $	*/
 
@@ -919,7 +919,7 @@ harmony_get_port(void *vsc, mixer_ctrl_t
 		err = 0;
 		break;
 	}
-	return 0;
+	return err;
 }
 
 int



CVS commit: src/sys/arch/hp700/hp700

2013-10-19 Thread Nick Hudson
Module Name:src
Committed By:   skrll
Date:   Sat Oct 19 13:21:43 UTC 2013

Modified Files:
src/sys/arch/hp700/hp700: autoconf.c

Log Message:
Remember to unmap pagezero once we've finished with it. Found by gcc 4.8.


To generate a diff of this commit:
cvs rdiff -u -r1.50 -r1.51 src/sys/arch/hp700/hp700/autoconf.c

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

Modified files:

Index: src/sys/arch/hp700/hp700/autoconf.c
diff -u src/sys/arch/hp700/hp700/autoconf.c:1.50 src/sys/arch/hp700/hp700/autoconf.c:1.51
--- src/sys/arch/hp700/hp700/autoconf.c:1.50	Sat Oct 27 17:17:52 2012
+++ src/sys/arch/hp700/hp700/autoconf.c	Sat Oct 19 13:21:43 2013
@@ -1,4 +1,4 @@
-/*	$NetBSD: autoconf.c,v 1.50 2012/10/27 17:17:52 chs Exp $	*/
+/*	$NetBSD: autoconf.c,v 1.51 2013/10/19 13:21:43 skrll Exp $	*/
 
 /*	$OpenBSD: autoconf.c,v 1.15 2001/06/25 00:43:10 mickey Exp $	*/
 
@@ -86,7 +86,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: autoconf.c,v 1.50 2012/10/27 17:17:52 chs Exp $);
+__KERNEL_RCSID(0, $NetBSD: autoconf.c,v 1.51 2013/10/19 13:21:43 skrll Exp $);
 
 #include opt_kgdb.h
 #include opt_useleds.h
@@ -471,6 +471,8 @@ cpu_rootconf(void)
 	}
 	printf(dp_flags 0x%x pz_class 0x%x\n, PAGE0-mem_boot.pz_dp.dp_flags,
 	PAGE0-mem_boot.pz_class);
+
+	hp700_pagezero_unmap(pagezero_cookie);
 #endif /* DEBUG */
 
 	if (boot_device != NULL)



CVS commit: src/sys/arch/hp700/dev

2013-10-19 Thread Nick Hudson
Module Name:src
Committed By:   skrll
Date:   Sat Oct 19 13:28:37 UTC 2013

Modified Files:
src/sys/arch/hp700/dev: sti_sgc.c

Log Message:
Remove unused variable.


To generate a diff of this commit:
cvs rdiff -u -r1.21 -r1.22 src/sys/arch/hp700/dev/sti_sgc.c

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

Modified files:

Index: src/sys/arch/hp700/dev/sti_sgc.c
diff -u src/sys/arch/hp700/dev/sti_sgc.c:1.21 src/sys/arch/hp700/dev/sti_sgc.c:1.22
--- src/sys/arch/hp700/dev/sti_sgc.c:1.21	Fri Jul  1 18:33:09 2011
+++ src/sys/arch/hp700/dev/sti_sgc.c	Sat Oct 19 13:28:36 2013
@@ -1,4 +1,4 @@
-/*	$NetBSD: sti_sgc.c,v 1.21 2011/07/01 18:33:09 dyoung Exp $	*/
+/*	$NetBSD: sti_sgc.c,v 1.22 2013/10/19 13:28:36 skrll Exp $	*/
 
 /*	$OpenBSD: sti_sgc.c,v 1.38 2009/02/06 22:51:04 miod Exp $	*/
 
@@ -35,7 +35,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: sti_sgc.c,v 1.21 2011/07/01 18:33:09 dyoung Exp $);
+__KERNEL_RCSID(0, $NetBSD: sti_sgc.c,v 1.22 2013/10/19 13:28:36 skrll Exp $);
 
 #include opt_cputype.h
 
@@ -143,7 +143,7 @@ sti_sgc_probe(device_t parent, cfdata_t 
 	struct confargs *ca = aux;
 	bus_space_handle_t romh;
 	paddr_t rom;
-	uint32_t id, romend;
+	uint32_t id;
 	u_char devtype;
 	int rv = 0, romunmapped = 0;
 
@@ -197,7 +197,6 @@ sti_sgc_probe(device_t parent, cfdata_t 
 	default:
 		DPRINTF((%s: unknown type (%x)\n, __func__, devtype));
 		rv = 0;
-		romend = 0;
 	}
 
 	if (rv 



CVS commit: src/sys/arch/hp700/dev

2013-10-19 Thread Nick Hudson
Module Name:src
Committed By:   skrll
Date:   Sat Oct 19 13:29:10 UTC 2013

Modified Files:
src/sys/arch/hp700/dev: pdc.c

Log Message:
__unused


To generate a diff of this commit:
cvs rdiff -u -r1.41 -r1.42 src/sys/arch/hp700/dev/pdc.c

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

Modified files:

Index: src/sys/arch/hp700/dev/pdc.c
diff -u src/sys/arch/hp700/dev/pdc.c:1.41 src/sys/arch/hp700/dev/pdc.c:1.42
--- src/sys/arch/hp700/dev/pdc.c:1.41	Sun Feb  5 21:46:37 2012
+++ src/sys/arch/hp700/dev/pdc.c	Sat Oct 19 13:29:10 2013
@@ -1,4 +1,4 @@
-/*	$NetBSD: pdc.c,v 1.41 2012/02/05 21:46:37 skrll Exp $	*/
+/*	$NetBSD: pdc.c,v 1.42 2013/10/19 13:29:10 skrll Exp $	*/
 
 /*	$OpenBSD: pdc.c,v 1.14 2001/04/29 21:05:43 mickey Exp $	*/
 
@@ -29,7 +29,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: pdc.c,v 1.41 2012/02/05 21:46:37 skrll Exp $);
+__KERNEL_RCSID(0, $NetBSD: pdc.c,v 1.42 2013/10/19 13:29:10 skrll Exp $);
 
 #include sys/param.h
 #include sys/systm.h
@@ -460,7 +460,7 @@ pdccninit(struct consdev *cn)
 int
 pdccnlookc(dev_t dev, int *cp)
 {
-	int s, err, l, pagezero_cookie;
+	int s, err __unused, l, pagezero_cookie;
 
 	s = splhigh();
 	pagezero_cookie = hp700_pagezero_map();



CVS commit: src/sys/arch/hp700/dev

2013-10-19 Thread Nick Hudson
Module Name:src
Committed By:   skrll
Date:   Sat Oct 19 13:49:11 UTC 2013

Modified Files:
src/sys/arch/hp700/dev: asp.c dino.c elroy.c lasi.c wax.c

Log Message:
Appease gcc 4.8.

XXX should really use bus_space(9)


To generate a diff of this commit:
cvs rdiff -u -r1.22 -r1.23 src/sys/arch/hp700/dev/asp.c
cvs rdiff -u -r1.36 -r1.37 src/sys/arch/hp700/dev/dino.c
cvs rdiff -u -r1.13 -r1.14 src/sys/arch/hp700/dev/elroy.c
cvs rdiff -u -r1.23 -r1.24 src/sys/arch/hp700/dev/lasi.c
cvs rdiff -u -r1.21 -r1.22 src/sys/arch/hp700/dev/wax.c

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

Modified files:

Index: src/sys/arch/hp700/dev/asp.c
diff -u src/sys/arch/hp700/dev/asp.c:1.22 src/sys/arch/hp700/dev/asp.c:1.23
--- src/sys/arch/hp700/dev/asp.c:1.22	Wed Oct 10 15:46:33 2012
+++ src/sys/arch/hp700/dev/asp.c	Sat Oct 19 13:49:11 2013
@@ -1,4 +1,4 @@
-/*	$NetBSD: asp.c,v 1.22 2012/10/10 15:46:33 skrll Exp $	*/
+/*	$NetBSD: asp.c,v 1.23 2013/10/19 13:49:11 skrll Exp $	*/
 
 /*	$OpenBSD: asp.c,v 1.5 2000/02/09 05:04:22 mickey Exp $	*/
 
@@ -37,7 +37,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: asp.c,v 1.22 2012/10/10 15:46:33 skrll Exp $);
+__KERNEL_RCSID(0, $NetBSD: asp.c,v 1.23 2013/10/19 13:49:11 skrll Exp $);
 
 #include sys/param.h
 #include sys/systm.h
@@ -189,7 +189,6 @@ aspattach(device_t parent, device_t self
 	struct gsc_attach_args ga;
 	struct cpu_info *ci = cpus[0];
 	bus_space_handle_t ioh;
-	uint32_t irr;
 	int s;
 
 	sc-sc_dev = self;
@@ -245,7 +244,7 @@ aspattach(device_t parent, device_t self
 	viper_setintrwnd(1  ca-ca_irq);
 
 	sc-sc_trs-asp_imr = ~0;
-	irr = sc-sc_trs-asp_irr;
+	(void)sc-sc_trs-asp_irr;
 	sc-sc_trs-asp_imr = 0;
 
 	/* Establish the interrupt register. */

Index: src/sys/arch/hp700/dev/dino.c
diff -u src/sys/arch/hp700/dev/dino.c:1.36 src/sys/arch/hp700/dev/dino.c:1.37
--- src/sys/arch/hp700/dev/dino.c:1.36	Wed May 23 16:11:37 2012
+++ src/sys/arch/hp700/dev/dino.c	Sat Oct 19 13:49:11 2013
@@ -1,4 +1,4 @@
-/*	$NetBSD: dino.c,v 1.36 2012/05/23 16:11:37 skrll Exp $ */
+/*	$NetBSD: dino.c,v 1.37 2013/10/19 13:49:11 skrll Exp $ */
 
 /*	$OpenBSD: dino.c,v 1.5 2004/02/13 20:39:31 mickey Exp $	*/
 
@@ -29,7 +29,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: dino.c,v 1.36 2012/05/23 16:11:37 skrll Exp $);
+__KERNEL_RCSID(0, $NetBSD: dino.c,v 1.37 2013/10/19 13:49:11 skrll Exp $);
 
 /* #include cardbus.h */
 
@@ -356,7 +356,6 @@ dino_conf_write(void *v, pcitag_t tag, i
 {
 	struct dino_softc *sc = v;
 	volatile struct dino_regs *r = sc-sc_regs;
-	pcireg_t data1;
 	uint32_t pamr;
 
 	/* fix arbitration errata by disabling all pci devs on config read */
@@ -368,7 +367,7 @@ dino_conf_write(void *v, pcitag_t tag, i
 
 	/* fix coalescing config and io writes by interleaving w/ a read */
 	r-pci_addr = tag | PCI_ID_REG;
-	data1 = r-pci_conf_data;
+	(void)r-pci_conf_data;
 
 	/* restore arbitration */
 	r-pamr = pamr;
@@ -1605,7 +1604,6 @@ dinoattach(device_t parent, device_t sel
 	volatile struct dino_regs *r;
 	struct cpu_info *ci = cpus[0];
 	const char *p = NULL;
-	u_int data;
 	int s, ver;
 
 	sc-sc_dv = self;
@@ -1650,7 +1648,7 @@ dinoattach(device_t parent, device_t sel
 	s = splhigh();
 	r-icr = 0;
 	r-imr = ~0;
-	data = r-irr0;
+	(void)r-irr0;
 	r-imr = 0;
 	r-iar0 = ci-ci_hpa | (31 - ca-ca_irq);
 	splx(s);

Index: src/sys/arch/hp700/dev/elroy.c
diff -u src/sys/arch/hp700/dev/elroy.c:1.13 src/sys/arch/hp700/dev/elroy.c:1.14
--- src/sys/arch/hp700/dev/elroy.c:1.13	Wed Oct 10 15:46:34 2012
+++ src/sys/arch/hp700/dev/elroy.c	Sat Oct 19 13:49:11 2013
@@ -1,4 +1,4 @@
-/*	$NetBSD: elroy.c,v 1.13 2012/10/10 15:46:34 skrll Exp $	*/
+/*	$NetBSD: elroy.c,v 1.14 2013/10/19 13:49:11 skrll Exp $	*/
 
 /*	$OpenBSD: elroy.c,v 1.5 2009/03/30 21:24:57 kettenis Exp $	*/
 
@@ -254,7 +254,7 @@ elroy_conf_read(void *v, pcitag_t tag, i
 	struct elroy_softc *sc = v;
 	volatile struct elroy_regs *r = sc-sc_regs;
 	uint32_t arb_mask, err_cfg, control;
-	pcireg_t data, data1;
+	pcireg_t data;
 
 /* printf(elroy_conf_read(%p, 0x%08x, 0x%x), v, tag, reg); */
 	arb_mask = elroy_read32(r-arb_mask);
@@ -268,7 +268,7 @@ elroy_conf_read(void *v, pcitag_t tag, i
 	~htole32(ELROY_CONTROL_HF));
 
 	elroy_write32(r-pci_conf_addr, htole32(tag | reg));
-	data1 = elroy_read32(r-pci_conf_addr);
+	(void)elroy_read32(r-pci_conf_addr);
 	data = elroy_read32(r-pci_conf_data);
 
 	elroy_write32(r-control, control |
@@ -289,7 +289,6 @@ elroy_conf_write(void *v, pcitag_t tag, 
 	struct elroy_softc *sc = v;
 	volatile struct elroy_regs *r = sc-sc_regs;
 	uint32_t arb_mask, err_cfg, control;
-	pcireg_t data1;
 
 /* printf(elroy_conf_write(%p, 0x%08x, 0x%x, 0x%x)\n, v, tag, reg, data); */
 	arb_mask = elroy_read32(r-arb_mask);
@@ -304,13 +303,13 @@ elroy_conf_write(void *v, pcitag_t tag, 
 
 	/* fix coalescing config writes errata by interleaving w/ a read */
 	elroy_write32(r-pci_conf_addr, htole32(tag | 

CVS commit: src/sys/arch/hp700/hp700

2013-10-19 Thread Nick Hudson
Module Name:src
Committed By:   skrll
Date:   Sat Oct 19 14:01:00 UTC 2013

Modified Files:
src/sys/arch/hp700/hp700: disksubr.c

Log Message:
Remove unused variable.


To generate a diff of this commit:
cvs rdiff -u -r1.27 -r1.28 src/sys/arch/hp700/hp700/disksubr.c

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

Modified files:

Index: src/sys/arch/hp700/hp700/disksubr.c
diff -u src/sys/arch/hp700/hp700/disksubr.c:1.27 src/sys/arch/hp700/hp700/disksubr.c:1.28
--- src/sys/arch/hp700/hp700/disksubr.c:1.27	Thu Feb 23 21:38:53 2012
+++ src/sys/arch/hp700/hp700/disksubr.c	Sat Oct 19 14:00:59 2013
@@ -1,4 +1,4 @@
-/*	$NetBSD: disksubr.c,v 1.27 2012/02/23 21:38:53 skrll Exp $	*/
+/*	$NetBSD: disksubr.c,v 1.28 2013/10/19 14:00:59 skrll Exp $	*/
 
 /*	$OpenBSD: disksubr.c,v 1.6 2000/10/18 21:00:34 mickey Exp $	*/
 
@@ -68,7 +68,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: disksubr.c,v 1.27 2012/02/23 21:38:53 skrll Exp $);
+__KERNEL_RCSID(0, $NetBSD: disksubr.c,v 1.28 2013/10/19 14:00:59 skrll Exp $);
 
 #include sys/param.h
 #include sys/systm.h
@@ -159,7 +159,7 @@ readdisklabel(dev_t dev, void (*strat)(s
 	struct buf *bp = NULL;
 	const char *msg = no disk label;
 	int i;
-	struct disklabel minilabel, fallbacklabel;
+	struct disklabel fallbacklabel;
 
 	/* minimal requirements for archetypal disk label */
 	if (lp-d_secsize == 0)
@@ -177,7 +177,7 @@ readdisklabel(dev_t dev, void (*strat)(s
 	if (lp-d_partitions[i].p_size == 0)
 		lp-d_partitions[i].p_size = 0x1fff;
 	lp-d_partitions[i].p_offset = 0;
-	minilabel = fallbacklabel = *lp;
+	fallbacklabel = *lp;
 
 	/* get a buffer and initialize it */
 	bp = geteblk((int)lp-d_secsize);



CVS commit: src/sys/arch/hp700/gsc

2013-10-19 Thread Nick Hudson
Module Name:src
Committed By:   skrll
Date:   Sat Oct 19 14:01:42 UTC 2013

Modified Files:
src/sys/arch/hp700/gsc: lpt_gsc.c

Log Message:
Remove unused variable.


To generate a diff of this commit:
cvs rdiff -u -r1.14 -r1.15 src/sys/arch/hp700/gsc/lpt_gsc.c

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

Modified files:

Index: src/sys/arch/hp700/gsc/lpt_gsc.c
diff -u src/sys/arch/hp700/gsc/lpt_gsc.c:1.14 src/sys/arch/hp700/gsc/lpt_gsc.c:1.15
--- src/sys/arch/hp700/gsc/lpt_gsc.c:1.14	Fri Jul  1 18:33:09 2011
+++ src/sys/arch/hp700/gsc/lpt_gsc.c	Sat Oct 19 14:01:42 2013
@@ -1,4 +1,4 @@
-/*	$NetBSD: lpt_gsc.c,v 1.14 2011/07/01 18:33:09 dyoung Exp $	*/
+/*	$NetBSD: lpt_gsc.c,v 1.15 2013/10/19 14:01:42 skrll Exp $	*/
 
 /*	$OpenBSD: lpt_gsc.c,v 1.6 2000/07/21 17:41:06 mickey Exp $	*/
 
@@ -53,7 +53,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: lpt_gsc.c,v 1.14 2011/07/01 18:33:09 dyoung Exp $);
+__KERNEL_RCSID(0, $NetBSD: lpt_gsc.c,v 1.15 2013/10/19 14:01:42 skrll Exp $);
 
 #include sys/param.h
 #include sys/systm.h
@@ -139,7 +139,7 @@ lpt_gsc_probe(device_t parent, cfdata_t 
 	bus_space_handle_t ioh;
 	bus_addr_t base;
 	uint8_t mask, data;
-	int i, rv;
+	int i;
 
 	if (ga-ga_type.iodc_type != HPPA_TYPE_FIO ||
 	ga-ga_type.iodc_sv_model != HPPA_FIO_CENT)
@@ -165,7 +165,6 @@ lpt_gsc_probe(device_t parent, cfdata_t 
 	if (bus_space_map(ga-ga_iot, base, LPT_NPORTS, 0, ioh))
 		return 0;
 
-	rv = 0;
 	mask = 0xff;
 
 	data = 0x55;/* Alternating zeros */



CVS commit: src/sys/arch/hp700/stand

2013-07-16 Thread Joerg Sonnenberger
Module Name:src
Committed By:   joerg
Date:   Tue Jul 16 10:05:38 UTC 2013

Modified Files:
src/sys/arch/hp700/stand: Makefile.inc

Log Message:
Disable unwind sections for the boot loaders.


To generate a diff of this commit:
cvs rdiff -u -r1.8 -r1.9 src/sys/arch/hp700/stand/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/sys/arch/hp700/stand/Makefile.inc
diff -u src/sys/arch/hp700/stand/Makefile.inc:1.8 src/sys/arch/hp700/stand/Makefile.inc:1.9
--- src/sys/arch/hp700/stand/Makefile.inc:1.8	Mon Jun 20 06:52:37 2011
+++ src/sys/arch/hp700/stand/Makefile.inc	Tue Jul 16 10:05:38 2013
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile.inc,v 1.8 2011/06/20 06:52:37 mrg Exp $
+#	$NetBSD: Makefile.inc,v 1.9 2013/07/16 10:05:38 joerg Exp $
 
 BINDIR=		/usr/mdec
 
@@ -6,3 +6,4 @@ BINDIR=		/usr/mdec
 
 COPTS+=		-Wno-pointer-sign
 COPTS+=		-fno-strict-aliasing
+COPTS+=		-fno-unwind-tables



CVS commit: src/sys/arch/hp700/stand/xxboot

2013-06-17 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Mon Jun 17 17:44:17 UTC 2013

Modified Files:
src/sys/arch/hp700/stand/xxboot: Makefile

Log Message:
Komputer - Computer


To generate a diff of this commit:
cvs rdiff -u -r1.16 -r1.17 src/sys/arch/hp700/stand/xxboot/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/arch/hp700/stand/xxboot/Makefile
diff -u src/sys/arch/hp700/stand/xxboot/Makefile:1.16 src/sys/arch/hp700/stand/xxboot/Makefile:1.17
--- src/sys/arch/hp700/stand/xxboot/Makefile:1.16	Fri Jun 14 20:40:12 2013
+++ src/sys/arch/hp700/stand/xxboot/Makefile	Mon Jun 17 13:44:16 2013
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile,v 1.16 2013/06/15 00:40:12 christos Exp $
+#	$NetBSD: Makefile,v 1.17 2013/06/17 17:44:16 christos Exp $
 
 PROG=	xxboot
 NOMAN=	# defined
@@ -14,7 +14,7 @@ CPPFLAGS+=	-D__daddr_t=int32_t
 # ANSI C feature prevents from being relocatable
 #CPPFLAGS+=	-traditional	# would be best
 CPPFLAGS+=	-Dconst=
-COPTS+=		-funsigned-char	-mdisable-fpregs -mpa-risk-1-0
+COPTS+=		-funsigned-char	-mdisable-fpregs -mpa-risc-1-0
 
 .include bsd.own.mk
 



CVS commit: src/sys/arch/hp700/stand/xxboot

2013-06-14 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Sat Jun 15 00:40:12 UTC 2013

Modified Files:
src/sys/arch/hp700/stand/xxboot: Makefile

Log Message:
since when -m belongs in cppflags?


To generate a diff of this commit:
cvs rdiff -u -r1.15 -r1.16 src/sys/arch/hp700/stand/xxboot/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/arch/hp700/stand/xxboot/Makefile
diff -u src/sys/arch/hp700/stand/xxboot/Makefile:1.15 src/sys/arch/hp700/stand/xxboot/Makefile:1.16
--- src/sys/arch/hp700/stand/xxboot/Makefile:1.15	Mon Jun 20 04:46:28 2011
+++ src/sys/arch/hp700/stand/xxboot/Makefile	Fri Jun 14 20:40:12 2013
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile,v 1.15 2011/06/20 08:46:28 mrg Exp $
+#	$NetBSD: Makefile,v 1.16 2013/06/15 00:40:12 christos Exp $
 
 PROG=	xxboot
 NOMAN=	# defined
@@ -6,7 +6,7 @@ SRCS=	start.S main.c readufs.c readufs_f
 
 .PATH:	${.CURDIR}/../common
 
-CPPFLAGS+=	-mpa-risc-1-0 -I${.CURDIR}/../../../.. -I. -D_STANDALONE
+CPPFLAGS+=	-I${.CURDIR}/../../../.. -I. -D_STANDALONE
 # configuration for readufs module
 CPPFLAGS+=	-DUSE_LFS -DUSE_FFS -DUSE_UFS1 -DUSE_UFS2
 # IODC can handle only 2GB, so this is enough
@@ -14,7 +14,7 @@ CPPFLAGS+=	-D__daddr_t=int32_t
 # ANSI C feature prevents from being relocatable
 #CPPFLAGS+=	-traditional	# would be best
 CPPFLAGS+=	-Dconst=
-COPTS+=		-funsigned-char	-mdisable-fpregs
+COPTS+=		-funsigned-char	-mdisable-fpregs -mpa-risk-1-0
 
 .include bsd.own.mk
 



CVS commit: src/sys/arch/hp700/stand/xxboot

2013-06-14 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Sat Jun 15 00:41:56 UTC 2013

Modified Files:
src/sys/arch/hp700/stand/xxboot: main.c

Log Message:
make loadadr uintptr_t since we are casting it to pointers.


To generate a diff of this commit:
cvs rdiff -u -r1.10 -r1.11 src/sys/arch/hp700/stand/xxboot/main.c

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

Modified files:

Index: src/sys/arch/hp700/stand/xxboot/main.c
diff -u src/sys/arch/hp700/stand/xxboot/main.c:1.10 src/sys/arch/hp700/stand/xxboot/main.c:1.11
--- src/sys/arch/hp700/stand/xxboot/main.c:1.10	Fri Feb 24 13:45:20 2012
+++ src/sys/arch/hp700/stand/xxboot/main.c	Fri Jun 14 20:41:56 2013
@@ -1,4 +1,4 @@
-/*	$NetBSD: main.c,v 1.10 2012/02/24 18:45:20 skrll Exp $	*/
+/*	$NetBSD: main.c,v 1.11 2013/06/15 00:41:56 christos Exp $	*/
 
 /*
  * Copyright (c) 2003 ITOH Yasufumi.
@@ -41,9 +41,9 @@
 
 static char *hexstr(char *, unsigned);
 void ipl_main(unsigned /*interactive*/, unsigned /*sptop*/, unsigned /*psw*/);
-void load_file(const char *, unsigned /*loadadr*/, unsigned /*interactive*/,
+void load_file(const char *, uintptr_t /*loadadr*/, unsigned /*interactive*/,
 int /*part*/);
-void load_file_ino(ino32_t, const char *, unsigned /*loadadr*/,
+void load_file_ino(ino32_t, const char *, uintptr_t /*loadadr*/,
 unsigned /*interactive*/, int /*part*/);
 
 struct loadinfo {
@@ -184,7 +184,7 @@ ipl_main(unsigned interactive, unsigned 
 	int part = 0;		/* default partition a */
 	unsigned secsz, partoff, partsz;
 	int c, c1;
-	unsigned loadadr;
+	uintptr_t loadadr;
 
 #if 0
 	print(hexstr(buf, interactive));
@@ -294,7 +294,7 @@ ipl_main(unsigned interactive, unsigned 
 }
 
 void
-load_file(const char *path, unsigned loadadr, unsigned interactive, int part)
+load_file(const char *path, uintptr_t loadadr, unsigned interactive, int part)
 {
 
 	/* look-up the file */
@@ -305,7 +305,7 @@ load_file(const char *path, unsigned loa
 }
 
 void
-load_file_ino(ino32_t ino, const char *fn, unsigned loadadr, unsigned interactive, int part)
+load_file_ino(ino32_t ino, const char *fn, uintptr_t loadadr, unsigned interactive, int part)
 	/* fn:		 for message only */
 {
 	union ufs_dinode dinode;



CVS commit: src/sys/arch/hp700/stand/xxboot

2013-06-14 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Sat Jun 15 00:42:16 UTC 2013

Modified Files:
src/sys/arch/hp700/stand/xxboot: readufs.h readufs_lfs.c

Log Message:
make this compile again after the lfs changes


To generate a diff of this commit:
cvs rdiff -u -r1.6 -r1.7 src/sys/arch/hp700/stand/xxboot/readufs.h
cvs rdiff -u -r1.7 -r1.8 src/sys/arch/hp700/stand/xxboot/readufs_lfs.c

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

Modified files:

Index: src/sys/arch/hp700/stand/xxboot/readufs.h
diff -u src/sys/arch/hp700/stand/xxboot/readufs.h:1.6 src/sys/arch/hp700/stand/xxboot/readufs.h:1.7
--- src/sys/arch/hp700/stand/xxboot/readufs.h:1.6	Fri Feb 24 13:45:20 2012
+++ src/sys/arch/hp700/stand/xxboot/readufs.h	Fri Jun 14 20:42:16 2013
@@ -1,4 +1,4 @@
-/*	$NetBSD: readufs.h,v 1.6 2012/02/24 18:45:20 skrll Exp $	*/
+/*	$NetBSD: readufs.h,v 1.7 2013/06/15 00:42:16 christos Exp $	*/
 /*	from Id: readufs.h,v 1.10 2003/12/16 13:54:11 itohy Exp	*/
 
 /*
@@ -10,6 +10,7 @@
 #include sys/param.h
 #include ufs/ufs/dinode.h
 #include ufs/ufs/dir.h
+#include ufs/lfs/ulfs_dinode.h
 
 /*
  * UFS1 / UFS2
@@ -21,6 +22,10 @@ union ufs_dinode {
 #ifdef USE_UFS2
 	struct ufs2_dinode di2;
 #endif
+#ifdef USE_LFS
+	struct ulfs1_dinode dil1;
+	struct ulfs2_dinode dil2;
+#endif
 };
 
 /* For more compact code and independence on 64-bit types and ops */

Index: src/sys/arch/hp700/stand/xxboot/readufs_lfs.c
diff -u src/sys/arch/hp700/stand/xxboot/readufs_lfs.c:1.7 src/sys/arch/hp700/stand/xxboot/readufs_lfs.c:1.8
--- src/sys/arch/hp700/stand/xxboot/readufs_lfs.c:1.7	Sun Feb 20 21:31:57 2011
+++ src/sys/arch/hp700/stand/xxboot/readufs_lfs.c	Fri Jun 14 20:42:16 2013
@@ -1,4 +1,4 @@
-/*	$NetBSD: readufs_lfs.c,v 1.7 2011/02/21 02:31:57 itohy Exp $	*/
+/*	$NetBSD: readufs_lfs.c,v 1.8 2013/06/15 00:42:16 christos Exp $	*/
 /*	from Id: readufs_lfs.c,v 1.8 2003/12/16 13:54:11 itohy Exp	*/
 
 /*
@@ -20,7 +20,7 @@
  #error LFS currently requires USE_UFS1
 #endif
 
-static struct ufs1_dinode	ifile_dinode;
+static struct ulfs1_dinode	ifile_dinode;
 
 #define fsi	(*ufsinfo)
 #define fsi_lfs	fsi.fs_u.u_lfs
@@ -156,7 +156,7 @@ get_lfs_inode(ino32_t ino, union ufs_din
 	struct ufs_info *ufsinfo = ufs_info;
 	daddr_t daddr;
 	char *buf = alloca(fsi.bsize);
-	struct ufs1_dinode *di, *diend;
+	struct ulfs1_dinode *di, *diend;
 	int i;
 
 	/* Get fs block which contains the specified inode. */
@@ -186,7 +186,7 @@ get_lfs_inode(ino32_t ino, union ufs_din
 	RAW_READ(buf, daddr  fsi.fsbtodb, fsi_lfs.ibsize);
 
 	/* Search for the inode. */
-	di = (struct ufs1_dinode *) buf;
+	di = (struct ulfs1_dinode *) buf;
 	diend = di + fsi_lfs.inopb;
 
 	for ( ; di  diend; di++)
@@ -210,7 +210,7 @@ found:
 #endif
 #endif
 
-	dibuf-di1 = *di;
+	dibuf-dil1 = *di;
 
 	return 0;
 }



CVS commit: src/sys/arch/hp700/dev

2013-02-21 Thread Nick Hudson
Module Name:src
Committed By:   skrll
Date:   Thu Feb 21 15:16:02 UTC 2013

Modified Files:
src/sys/arch/hp700/dev: cpu.c

Log Message:
Fixup the cpu_{match,attach} functions to not allow more that HPPA_MAXCPUs
to be used.

Fixes problem booting on a dual-cpu j6700 with GENERIC (which doesn't
define MULTIPROCESSOR) reported by KIYOHARA Takashi on port-hp700.


To generate a diff of this commit:
cvs rdiff -u -r1.29 -r1.30 src/sys/arch/hp700/dev/cpu.c

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

Modified files:

Index: src/sys/arch/hp700/dev/cpu.c
diff -u src/sys/arch/hp700/dev/cpu.c:1.29 src/sys/arch/hp700/dev/cpu.c:1.30
--- src/sys/arch/hp700/dev/cpu.c:1.29	Wed Oct 10 15:46:34 2012
+++ src/sys/arch/hp700/dev/cpu.c	Thu Feb 21 15:16:02 2013
@@ -1,4 +1,4 @@
-/*	$NetBSD: cpu.c,v 1.29 2012/10/10 15:46:34 skrll Exp $	*/
+/*	$NetBSD: cpu.c,v 1.30 2013/02/21 15:16:02 skrll Exp $	*/
 
 /*	$OpenBSD: cpu.c,v 1.29 2009/02/08 18:33:28 miod Exp $	*/
 
@@ -29,7 +29,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: cpu.c,v 1.29 2012/10/10 15:46:34 skrll Exp $);
+__KERNEL_RCSID(0, $NetBSD: cpu.c,v 1.30 2013/02/21 15:16:02 skrll Exp $);
 
 #include opt_multiprocessor.h
 
@@ -74,9 +74,6 @@ cpumatch(device_t parent, cfdata_t cf, v
 	ca-ca_type.iodc_sv_model != HPPA_NPROC_HPPA)
 		return 0;
 
-	if (cf-cf_unit = MAXCPUS)
-		return 0;
-
 	return 1;
 }
 
@@ -105,10 +102,6 @@ cpuattach(device_t parent, device_t self
 
 	sc-sc_dev = self;
 
-	ci = cpus[cpuno];
-	ci-ci_cpuid = cpuno;
-	ci-ci_hpa = ca-ca_hpa;
-
 	/* Print the CPU chip name, nickname, and rev. */
 	aprint_normal(: %s, hppa_cpu_info-hci_chip_name);
 	if (hppa_cpu_info-hci_chip_nickname != NULL)
@@ -162,6 +155,15 @@ cpuattach(device_t parent, device_t self
 	hppa_mod_info(HPPA_TYPE_FPU, (fpu_version  16)  0x1f),
 	(fpu_version  11)  0x1f);
 
+	if (cpuno = HPPA_MAXCPUS) {
+		aprint_normal_dev(self, not started\n);
+		return;
+	}
+
+	ci = cpus[cpuno];
+	ci-ci_cpuid = cpuno;
+	ci-ci_hpa = ca-ca_hpa;
+
 	hp700_intr_initialise(ci);
 
 	ir = ci-ci_ir;



CVS commit: src/sys/arch/hp700/include

2013-02-12 Thread Nick Hudson
Module Name:src
Committed By:   skrll
Date:   Tue Feb 12 23:02:58 UTC 2013

Modified Files:
src/sys/arch/hp700/include: cpu.h

Log Message:
The file needs opt_multiprocessor to get the CR_CURCPU define.


To generate a diff of this commit:
cvs rdiff -u -r1.70 -r1.71 src/sys/arch/hp700/include/cpu.h

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

Modified files:

Index: src/sys/arch/hp700/include/cpu.h
diff -u src/sys/arch/hp700/include/cpu.h:1.70 src/sys/arch/hp700/include/cpu.h:1.71
--- src/sys/arch/hp700/include/cpu.h:1.70	Wed May 23 16:11:37 2012
+++ src/sys/arch/hp700/include/cpu.h	Tue Feb 12 23:02:58 2013
@@ -1,4 +1,4 @@
-/*	$NetBSD: cpu.h,v 1.70 2012/05/23 16:11:37 skrll Exp $	*/
+/*	$NetBSD: cpu.h,v 1.71 2013/02/12 23:02:58 skrll Exp $	*/
 
 /*	$OpenBSD: cpu.h,v 1.55 2008/07/23 17:39:35 kettenis Exp $	*/
 
@@ -55,6 +55,7 @@
 
 #ifdef _KERNEL_OPT
 #include opt_cputype.h
+#include opt_multiprocessor.h
 #endif
 
 #include machine/trap.h



CVS commit: src/sys/arch/hp700

2012-10-10 Thread Nick Hudson
Module Name:src
Committed By:   skrll
Date:   Wed Oct 10 15:46:34 UTC 2012

Modified Files:
src/sys/arch/hp700/dev: asp.c cpu.c elroy.c wax.c
src/sys/arch/hp700/hp700: autoconf.c

Log Message:
Use device_xname.

From chuq


To generate a diff of this commit:
cvs rdiff -u -r1.21 -r1.22 src/sys/arch/hp700/dev/asp.c
cvs rdiff -u -r1.28 -r1.29 src/sys/arch/hp700/dev/cpu.c
cvs rdiff -u -r1.12 -r1.13 src/sys/arch/hp700/dev/elroy.c
cvs rdiff -u -r1.20 -r1.21 src/sys/arch/hp700/dev/wax.c
cvs rdiff -u -r1.48 -r1.49 src/sys/arch/hp700/hp700/autoconf.c

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

Modified files:

Index: src/sys/arch/hp700/dev/asp.c
diff -u src/sys/arch/hp700/dev/asp.c:1.21 src/sys/arch/hp700/dev/asp.c:1.22
--- src/sys/arch/hp700/dev/asp.c:1.21	Wed May 23 16:11:37 2012
+++ src/sys/arch/hp700/dev/asp.c	Wed Oct 10 15:46:33 2012
@@ -1,4 +1,4 @@
-/*	$NetBSD: asp.c,v 1.21 2012/05/23 16:11:37 skrll Exp $	*/
+/*	$NetBSD: asp.c,v 1.22 2012/10/10 15:46:33 skrll Exp $	*/
 
 /*	$OpenBSD: asp.c,v 1.5 2000/02/09 05:04:22 mickey Exp $	*/
 
@@ -37,7 +37,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: asp.c,v 1.21 2012/05/23 16:11:37 skrll Exp $);
+__KERNEL_RCSID(0, $NetBSD: asp.c,v 1.22 2012/10/10 15:46:33 skrll Exp $);
 
 #include sys/param.h
 #include sys/systm.h
@@ -262,7 +262,7 @@ aspattach(device_t parent, device_t self
 
 	/* Attach the GSC bus. */
 	ga.ga_ca = *ca;	/* clone from us */
-	if (strcmp(parent-dv_xname, mainbus0) == 0) {
+	if (strcmp(device_xname(parent), mainbus0) == 0) {
 		ga.ga_dp.dp_bc[0] = ga.ga_dp.dp_bc[1];
 		ga.ga_dp.dp_bc[1] = ga.ga_dp.dp_bc[2];
 		ga.ga_dp.dp_bc[2] = ga.ga_dp.dp_bc[3];

Index: src/sys/arch/hp700/dev/cpu.c
diff -u src/sys/arch/hp700/dev/cpu.c:1.28 src/sys/arch/hp700/dev/cpu.c:1.29
--- src/sys/arch/hp700/dev/cpu.c:1.28	Wed May 23 21:11:34 2012
+++ src/sys/arch/hp700/dev/cpu.c	Wed Oct 10 15:46:34 2012
@@ -1,4 +1,4 @@
-/*	$NetBSD: cpu.c,v 1.28 2012/05/23 21:11:34 skrll Exp $	*/
+/*	$NetBSD: cpu.c,v 1.29 2012/10/10 15:46:34 skrll Exp $	*/
 
 /*	$OpenBSD: cpu.c,v 1.29 2009/02/08 18:33:28 miod Exp $	*/
 
@@ -29,7 +29,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: cpu.c,v 1.28 2012/05/23 21:11:34 skrll Exp $);
+__KERNEL_RCSID(0, $NetBSD: cpu.c,v 1.29 2012/10/10 15:46:34 skrll Exp $);
 
 #include opt_multiprocessor.h
 
@@ -122,7 +122,7 @@ cpuattach(device_t parent, device_t self
 	}
 
 	/* Print the CPU type, spec, level, category, and speed. */
-	aprint_normal(\n%s: %s, PA-RISC %s, self-dv_xname,
+	aprint_normal(\n%s: %s, PA-RISC %s, device_xname(self),
 	hppa_cpu_info-hci_chip_type,
 	hppa_cpu_info-hci_chip_spec);
 	aprint_normal(, lev %s, cat %c, ,
@@ -132,7 +132,7 @@ cpuattach(device_t parent, device_t self
 	if (mhz % 100  9)
 		aprint_normal(.%02d, mhz % 100);
 
-	aprint_normal( MHz clk\n%s: %s, self-dv_xname,
+	aprint_normal( MHz clk\n%s: %s, device_xname(self),
 	pdc_model.sh? shadows, : );
 
 	if (pdc_cache.dc_conf.cc_fsel)
@@ -158,7 +158,7 @@ cpuattach(device_t parent, device_t self
 	 * Describe the floating-point support.
 	 */
 	KASSERT(fpu_present);
-	aprint_normal(%s: %s floating point, rev %d\n, self-dv_xname,
+	aprint_normal(%s: %s floating point, rev %d\n, device_xname(self),
 	hppa_mod_info(HPPA_TYPE_FPU, (fpu_version  16)  0x1f),
 	(fpu_version  11)  0x1f);
 

Index: src/sys/arch/hp700/dev/elroy.c
diff -u src/sys/arch/hp700/dev/elroy.c:1.12 src/sys/arch/hp700/dev/elroy.c:1.13
--- src/sys/arch/hp700/dev/elroy.c:1.12	Fri Jan 27 18:52:56 2012
+++ src/sys/arch/hp700/dev/elroy.c	Wed Oct 10 15:46:34 2012
@@ -1,4 +1,4 @@
-/*	$NetBSD: elroy.c,v 1.12 2012/01/27 18:52:56 para Exp $	*/
+/*	$NetBSD: elroy.c,v 1.13 2012/10/10 15:46:34 skrll Exp $	*/
 
 /*	$OpenBSD: elroy.c,v 1.5 2009/03/30 21:24:57 kettenis Exp $	*/
 
@@ -452,7 +452,7 @@ elroy_alloc_parent(device_t self, struct
 return (NULL);
 
 			snprintf(sc-sc_memexname, sizeof(sc-sc_memexname),
-			%s_mem, sc-sc_dv.dv_xname);
+			%s_mem, device_xname(sc-sc_dv));
 			if ((sc-sc_memex = extent_create(sc-sc_memexname,
 			mem_start, mem_start + ELROY_MEM_WINDOW,
 			NULL, 0, EX_NOWAIT | EX_MALLOCOK)) == NULL) {

Index: src/sys/arch/hp700/dev/wax.c
diff -u src/sys/arch/hp700/dev/wax.c:1.20 src/sys/arch/hp700/dev/wax.c:1.21
--- src/sys/arch/hp700/dev/wax.c:1.20	Wed May 23 16:11:37 2012
+++ src/sys/arch/hp700/dev/wax.c	Wed Oct 10 15:46:34 2012
@@ -1,4 +1,4 @@
-/*	$NetBSD: wax.c,v 1.20 2012/05/23 16:11:37 skrll Exp $	*/
+/*	$NetBSD: wax.c,v 1.21 2012/10/10 15:46:34 skrll Exp $	*/
 
 /*	$OpenBSD: wax.c,v 1.1 1998/11/23 03:04:10 mickey Exp $	*/
 
@@ -29,7 +29,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: wax.c,v 1.20 2012/05/23 16:11:37 skrll Exp $);
+__KERNEL_RCSID(0, $NetBSD: wax.c,v 1.21 2012/10/10 15:46:34 skrll Exp $);
 
 #include sys/param.h
 #include sys/systm.h
@@ -152,7 +152,7 @@ waxattach(device_t parent, device_t self
 
 	/* Attach the 

CVS commit: src/sys/arch/hp700/dev

2012-10-10 Thread Nick Hudson
Module Name:src
Committed By:   skrll
Date:   Wed Oct 10 16:51:10 UTC 2012

Modified Files:
src/sys/arch/hp700/dev: ssio.c

Log Message:
Remove the (never used) struct device from ssio_softc.

From chuq.


To generate a diff of this commit:
cvs rdiff -u -r1.3 -r1.4 src/sys/arch/hp700/dev/ssio.c

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

Modified files:

Index: src/sys/arch/hp700/dev/ssio.c
diff -u src/sys/arch/hp700/dev/ssio.c:1.3 src/sys/arch/hp700/dev/ssio.c:1.4
--- src/sys/arch/hp700/dev/ssio.c:1.3	Sat Apr 14 06:04:34 2012
+++ src/sys/arch/hp700/dev/ssio.c	Wed Oct 10 16:51:10 2012
@@ -1,4 +1,4 @@
-/*	$NetBSD: ssio.c,v 1.3 2012/04/14 06:04:34 skrll Exp $	*/
+/*	$NetBSD: ssio.c,v 1.4 2012/10/10 16:51:10 skrll Exp $	*/
 
 /*	$OpenBSD: ssio.c,v 1.7 2009/03/08 22:19:04 miod Exp $	*/
 
@@ -106,8 +106,6 @@ struct ssio_iv {
 struct ssio_iv ssio_intr_table[SSIO_NINTS];
 
 struct ssio_softc {
-	struct device sc_dev;
-
 	bus_space_tag_t sc_iot;
 	bus_space_handle_t sc_ic1h;
 	bus_space_handle_t sc_ic2h;



CVS commit: src/sys/arch/hp700/gsc

2012-10-10 Thread Nick Hudson
Module Name:src
Committed By:   skrll
Date:   Wed Oct 10 17:00:37 UTC 2012

Modified Files:
src/sys/arch/hp700/gsc: fdc_gsc.c

Log Message:
Split softc/device_t


To generate a diff of this commit:
cvs rdiff -u -r1.10 -r1.11 src/sys/arch/hp700/gsc/fdc_gsc.c

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

Modified files:

Index: src/sys/arch/hp700/gsc/fdc_gsc.c
diff -u src/sys/arch/hp700/gsc/fdc_gsc.c:1.10 src/sys/arch/hp700/gsc/fdc_gsc.c:1.11
--- src/sys/arch/hp700/gsc/fdc_gsc.c:1.10	Fri Jul  1 18:33:09 2011
+++ src/sys/arch/hp700/gsc/fdc_gsc.c	Wed Oct 10 17:00:37 2012
@@ -1,4 +1,4 @@
-/*	$NetBSD: fdc_gsc.c,v 1.10 2011/07/01 18:33:09 dyoung Exp $	*/
+/*	$NetBSD: fdc_gsc.c,v 1.11 2012/10/10 17:00:37 skrll Exp $	*/
 
 /*	$OpenBSD: fdc_gsc.c,v 1.1 1998/09/30 04:45:46 mickey Exp $	*/
 
@@ -29,7 +29,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: fdc_gsc.c,v 1.10 2011/07/01 18:33:09 dyoung Exp $);
+__KERNEL_RCSID(0, $NetBSD: fdc_gsc.c,v 1.11 2012/10/10 17:00:37 skrll Exp $);
 
 #include sys/param.h
 #include sys/systm.h
@@ -49,7 +49,7 @@ __KERNEL_RCSID(0, $NetBSD: fdc_gsc.c,v 
 int fdc_gsc_probe(device_t, cfdata_t, void *);
 void fdc_gsc_attach(device_t, device_t, void *);
 
-CFATTACH_DECL(fdc_gsc, sizeof(struct fdc_softc),
+CFATTACH_DECL_NEW(fdc_gsc, sizeof(struct fdc_softc),
 fdc_gsc_probe, fdc_gsc_attach, NULL, NULL);
 
 int



CVS commit: src/sys/arch/hp700/hp700

2012-06-08 Thread David Laight
Module Name:src
Committed By:   dsl
Date:   Fri Jun  8 07:53:41 UTC 2012

Modified Files:
src/sys/arch/hp700/hp700: machdep.c

Log Message:
Fix type of variable passed to sysctl (int - bool).


To generate a diff of this commit:
cvs rdiff -u -r1.113 -r1.114 src/sys/arch/hp700/hp700/machdep.c

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

Modified files:

Index: src/sys/arch/hp700/hp700/machdep.c
diff -u src/sys/arch/hp700/hp700/machdep.c:1.113 src/sys/arch/hp700/hp700/machdep.c:1.114
--- src/sys/arch/hp700/hp700/machdep.c:1.113	Wed May 23 16:11:37 2012
+++ src/sys/arch/hp700/hp700/machdep.c	Fri Jun  8 07:53:41 2012
@@ -1,4 +1,4 @@
-/*	$NetBSD: machdep.c,v 1.113 2012/05/23 16:11:37 skrll Exp $	*/
+/*	$NetBSD: machdep.c,v 1.114 2012/06/08 07:53:41 dsl Exp $	*/
 
 /*-
  * Copyright (c) 2001, 2002 The NetBSD Foundation, Inc.
@@ -58,7 +58,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: machdep.c,v 1.113 2012/05/23 16:11:37 skrll Exp $);
+__KERNEL_RCSID(0, $NetBSD: machdep.c,v 1.114 2012/06/08 07:53:41 dsl Exp $);
 
 #include opt_cputype.h
 #include opt_ddb.h
@@ -228,7 +228,7 @@ int	cpu_modelno;
 int	cpu_revision;
 
 #if NLCD  0
-int	lcd_blink_p;
+bool	lcd_blink_p;
 #endif
 
 /*
@@ -1926,7 +1926,8 @@ sysctl_machdep_boot(SYSCTLFN_ARGS)
 static int
 sysctl_machdep_heartbeat(SYSCTLFN_ARGS)
 {
-	int oldval, error;
+	int error;
+	bool oldval;
 	struct sysctlnode node = *rnode;
 	
 	oldval = lcd_blink_p;
@@ -1938,7 +1939,7 @@ sysctl_machdep_heartbeat(SYSCTLFN_ARGS)
 	if (error || newp == NULL)
 		return (error);
 
-	if (!oldval  lcd_blink_p  oldval)
+	if (!oldval  lcd_blink_p)
 		blink_lcd_timeout(NULL);
 
 	return 0;



CVS commit: src/sys/arch/hp700/dev

2012-05-23 Thread Nick Hudson
Module Name:src
Committed By:   skrll
Date:   Wed May 23 07:06:02 UTC 2012

Modified Files:
src/sys/arch/hp700/dev: cpu.c

Log Message:
Count the cpus as they attach so that CPU_INFO_FOREACH works before
hatching the secondary cpus.


To generate a diff of this commit:
cvs rdiff -u -r1.24 -r1.25 src/sys/arch/hp700/dev/cpu.c

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

Modified files:

Index: src/sys/arch/hp700/dev/cpu.c
diff -u src/sys/arch/hp700/dev/cpu.c:1.24 src/sys/arch/hp700/dev/cpu.c:1.25
--- src/sys/arch/hp700/dev/cpu.c:1.24	Mon May 21 21:15:39 2012
+++ src/sys/arch/hp700/dev/cpu.c	Wed May 23 07:06:02 2012
@@ -1,4 +1,4 @@
-/*	$NetBSD: cpu.c,v 1.24 2012/05/21 21:15:39 skrll Exp $	*/
+/*	$NetBSD: cpu.c,v 1.25 2012/05/23 07:06:02 skrll Exp $	*/
 
 /*	$OpenBSD: cpu.c,v 1.29 2009/02/08 18:33:28 miod Exp $	*/
 
@@ -29,7 +29,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: cpu.c,v 1.24 2012/05/21 21:15:39 skrll Exp $);
+__KERNEL_RCSID(0, $NetBSD: cpu.c,v 1.25 2012/05/23 07:06:02 skrll Exp $);
 
 #include opt_multiprocessor.h
 
@@ -179,7 +179,6 @@ cpuattach(device_t parent, device_t self
 
 	if (ci-ci_hpa == hppa_mcpuhpa) {
 		ci-ci_flags |= CPUF_PRIMARY|CPUF_RUNNING;
-		hppa_ncpu++;
 	} else {
 		int err;
 
@@ -190,6 +189,7 @@ cpuattach(device_t parent, device_t self
 			return;
 		}
 	}
+	hppa_ncpu++;
 
 #endif
 
@@ -266,9 +266,6 @@ cpu_hatch(void)
 	struct cpu_info *ci = curcpu();
 
 	ci-ci_flags |= CPUF_RUNNING;
-#if 0
-	hppa_ncpu++;
-#endif
 
 	/* Wait for additional CPUs to spinup. */
 	while (!start_secondary_cpu)



CVS commit: src/sys/arch/hp700/hp700

2012-05-23 Thread Nick Hudson
Module Name:src
Committed By:   skrll
Date:   Wed May 23 07:31:31 UTC 2012

Modified Files:
src/sys/arch/hp700/hp700: intr.c

Log Message:
Make a #define MULTIPROCESSOR kernel compile


To generate a diff of this commit:
cvs rdiff -u -r1.38 -r1.39 src/sys/arch/hp700/hp700/intr.c

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

Modified files:

Index: src/sys/arch/hp700/hp700/intr.c
diff -u src/sys/arch/hp700/hp700/intr.c:1.38 src/sys/arch/hp700/hp700/intr.c:1.39
--- src/sys/arch/hp700/hp700/intr.c:1.38	Thu Mar 29 09:26:24 2012
+++ src/sys/arch/hp700/hp700/intr.c	Wed May 23 07:31:31 2012
@@ -1,4 +1,4 @@
-/*	$NetBSD: intr.c,v 1.38 2012/03/29 09:26:24 skrll Exp $	*/
+/*	$NetBSD: intr.c,v 1.39 2012/05/23 07:31:31 skrll Exp $	*/
 /*	$OpenBSD: intr.c,v 1.27 2009/12/31 12:52:35 jsing Exp $	*/
 
 /*
@@ -35,7 +35,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: intr.c,v 1.38 2012/03/29 09:26:24 skrll Exp $);
+__KERNEL_RCSID(0, $NetBSD: intr.c,v 1.39 2012/05/23 07:31:31 skrll Exp $);
 
 #define __MUTEX_PRIVATE
 
@@ -375,6 +375,7 @@ hppa_intr(struct trapframe *frame)
 	extern char mutex_enter_crit_start[];
 	extern char mutex_enter_crit_end[];
 
+#ifndef	MULTIPROCESSOR
 	extern char _lock_cas_ras_start[];
 	extern char _lock_cas_ras_end[];
 
@@ -384,6 +385,7 @@ hppa_intr(struct trapframe *frame)
 		frame-tf_iioq_head = (u_int)_lock_cas_ras_start;
 		frame-tf_iioq_tail = (u_int)_lock_cas_ras_start + 4;
 	}
+#endif
 
 	/*
 	 * If we interrupted in the middle of mutex_enter(), we must patch up



CVS commit: src/sys/arch/hp700/hp700

2012-05-23 Thread Nick Hudson
Module Name:src
Committed By:   skrll
Date:   Wed May 23 08:59:36 UTC 2012

Modified Files:
src/sys/arch/hp700/hp700: machdep.c

Log Message:
Whitespace


To generate a diff of this commit:
cvs rdiff -u -r1.111 -r1.112 src/sys/arch/hp700/hp700/machdep.c

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

Modified files:

Index: src/sys/arch/hp700/hp700/machdep.c
diff -u src/sys/arch/hp700/hp700/machdep.c:1.111 src/sys/arch/hp700/hp700/machdep.c:1.112
--- src/sys/arch/hp700/hp700/machdep.c:1.111	Wed Apr 25 07:58:43 2012
+++ src/sys/arch/hp700/hp700/machdep.c	Wed May 23 08:59:36 2012
@@ -1,4 +1,4 @@
-/*	$NetBSD: machdep.c,v 1.111 2012/04/25 07:58:43 dholland Exp $	*/
+/*	$NetBSD: machdep.c,v 1.112 2012/05/23 08:59:36 skrll Exp $	*/
 
 /*-
  * Copyright (c) 2001, 2002 The NetBSD Foundation, Inc.
@@ -58,7 +58,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: machdep.c,v 1.111 2012/04/25 07:58:43 dholland Exp $);
+__KERNEL_RCSID(0, $NetBSD: machdep.c,v 1.112 2012/05/23 08:59:36 skrll Exp $);
 
 #include opt_cputype.h
 #include opt_ddb.h
@@ -476,8 +476,7 @@ hppa_init(paddr_t start, void *bi)
 	delay_init();
 
 	/* fetch the monarch/default cpu hpa */
-	
-	error =  pdcproc_hpa_processor(hppa_mcpuhpa);
+	error = pdcproc_hpa_processor(hppa_mcpuhpa);
 	if (error  0)
 		panic(%s: PDC_HPA failed, __func__);
 	



CVS commit: src/sys/arch/hp700/dev

2012-05-23 Thread Nick Hudson
Module Name:src
Committed By:   skrll
Date:   Wed May 23 09:49:56 UTC 2012

Modified Files:
src/sys/arch/hp700/dev: cpu.c

Log Message:
Add a KASSERT.


To generate a diff of this commit:
cvs rdiff -u -r1.25 -r1.26 src/sys/arch/hp700/dev/cpu.c

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

Modified files:

Index: src/sys/arch/hp700/dev/cpu.c
diff -u src/sys/arch/hp700/dev/cpu.c:1.25 src/sys/arch/hp700/dev/cpu.c:1.26
--- src/sys/arch/hp700/dev/cpu.c:1.25	Wed May 23 07:06:02 2012
+++ src/sys/arch/hp700/dev/cpu.c	Wed May 23 09:49:56 2012
@@ -1,4 +1,4 @@
-/*	$NetBSD: cpu.c,v 1.25 2012/05/23 07:06:02 skrll Exp $	*/
+/*	$NetBSD: cpu.c,v 1.26 2012/05/23 09:49:56 skrll Exp $	*/
 
 /*	$OpenBSD: cpu.c,v 1.29 2009/02/08 18:33:28 miod Exp $	*/
 
@@ -29,7 +29,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: cpu.c,v 1.25 2012/05/23 07:06:02 skrll Exp $);
+__KERNEL_RCSID(0, $NetBSD: cpu.c,v 1.26 2012/05/23 09:49:56 skrll Exp $);
 
 #include opt_multiprocessor.h
 
@@ -151,6 +151,7 @@ cpuattach(device_t parent, device_t self
 	/*
 	 * Describe the floating-point support.
 	 */
+	KASSERT(fpu_present);
 	aprint_normal(%s: %s floating point, rev %d\n, self-dv_xname,
 	hppa_mod_info(HPPA_TYPE_FPU, (fpu_version  16)  0x1f),
 	(fpu_version  11)  0x1f);



CVS commit: src/sys/arch/hp700/dev

2012-05-23 Thread Nick Hudson
Module Name:src
Committed By:   skrll
Date:   Wed May 23 10:31:59 UTC 2012

Modified Files:
src/sys/arch/hp700/dev: dino.c wax.c

Log Message:
s/IRQ/interrupt/ in autoconf message.


To generate a diff of this commit:
cvs rdiff -u -r1.34 -r1.35 src/sys/arch/hp700/dev/dino.c
cvs rdiff -u -r1.18 -r1.19 src/sys/arch/hp700/dev/wax.c

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

Modified files:

Index: src/sys/arch/hp700/dev/dino.c
diff -u src/sys/arch/hp700/dev/dino.c:1.34 src/sys/arch/hp700/dev/dino.c:1.35
--- src/sys/arch/hp700/dev/dino.c:1.34	Tue Apr  3 12:07:26 2012
+++ src/sys/arch/hp700/dev/dino.c	Wed May 23 10:31:59 2012
@@ -1,4 +1,4 @@
-/*	$NetBSD: dino.c,v 1.34 2012/04/03 12:07:26 skrll Exp $ */
+/*	$NetBSD: dino.c,v 1.35 2012/05/23 10:31:59 skrll Exp $ */
 
 /*	$OpenBSD: dino.c,v 1.5 2004/02/13 20:39:31 mickey Exp $	*/
 
@@ -29,7 +29,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: dino.c,v 1.34 2012/04/03 12:07:26 skrll Exp $);
+__KERNEL_RCSID(0, $NetBSD: dino.c,v 1.35 2012/05/23 10:31:59 skrll Exp $);
 
 /* #include cardbus.h */
 
@@ -1618,7 +1618,7 @@ dinoattach(device_t parent, device_t sel
 	sc-sc_dmat = ca-ca_dmatag;
 
 	if (ca-ca_irq == HP700CF_IRQ_UNDEF) {
-		aprint_error_dev(self, : can't allocate IRQ);
+		aprint_error_dev(self, : can't allocate interrupt);
 		return;
 	}
 

Index: src/sys/arch/hp700/dev/wax.c
diff -u src/sys/arch/hp700/dev/wax.c:1.18 src/sys/arch/hp700/dev/wax.c:1.19
--- src/sys/arch/hp700/dev/wax.c:1.18	Tue Apr  3 12:07:26 2012
+++ src/sys/arch/hp700/dev/wax.c	Wed May 23 10:31:59 2012
@@ -1,4 +1,4 @@
-/*	$NetBSD: wax.c,v 1.18 2012/04/03 12:07:26 skrll Exp $	*/
+/*	$NetBSD: wax.c,v 1.19 2012/05/23 10:31:59 skrll Exp $	*/
 
 /*	$OpenBSD: wax.c,v 1.1 1998/11/23 03:04:10 mickey Exp $	*/
 
@@ -29,7 +29,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: wax.c,v 1.18 2012/04/03 12:07:26 skrll Exp $);
+__KERNEL_RCSID(0, $NetBSD: wax.c,v 1.19 2012/05/23 10:31:59 skrll Exp $);
 
 #include sys/param.h
 #include sys/systm.h
@@ -120,7 +120,7 @@ waxattach(device_t parent, device_t self
 	int s, in;
 
 	if (ca-ca_irq == HP700CF_IRQ_UNDEF) {
-		aprint_error(: can't allocate IRQ\n);
+		aprint_error(: can't allocate interrupt\n);
 		return;
 	}
 



CVS commit: src/sys/arch/hp700/dev

2012-05-23 Thread Nick Hudson
Module Name:src
Committed By:   skrll
Date:   Wed May 23 10:37:02 UTC 2012

Modified Files:
src/sys/arch/hp700/dev: asp.c

Log Message:
Whitespace.


To generate a diff of this commit:
cvs rdiff -u -r1.19 -r1.20 src/sys/arch/hp700/dev/asp.c

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

Modified files:

Index: src/sys/arch/hp700/dev/asp.c
diff -u src/sys/arch/hp700/dev/asp.c:1.19 src/sys/arch/hp700/dev/asp.c:1.20
--- src/sys/arch/hp700/dev/asp.c:1.19	Fri Jul  1 18:33:09 2011
+++ src/sys/arch/hp700/dev/asp.c	Wed May 23 10:37:01 2012
@@ -1,4 +1,4 @@
-/*	$NetBSD: asp.c,v 1.19 2011/07/01 18:33:09 dyoung Exp $	*/
+/*	$NetBSD: asp.c,v 1.20 2012/05/23 10:37:01 skrll Exp $	*/
 
 /*	$OpenBSD: asp.c,v 1.5 2000/02/09 05:04:22 mickey Exp $	*/
 
@@ -37,7 +37,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: asp.c,v 1.19 2011/07/01 18:33:09 dyoung Exp $);
+__KERNEL_RCSID(0, $NetBSD: asp.c,v 1.20 2012/05/23 10:37:01 skrll Exp $);
 
 #include sys/param.h
 #include sys/systm.h
@@ -201,7 +201,7 @@ aspattach(device_t parent, device_t self
 	 * Map the ASP interrupt registers.
 	 */
 	if (bus_space_map(ca-ca_iot, ca-ca_hpa + ASP_REG_INT,
-			  sizeof(struct asp_trs), 0, ioh)) {
+	sizeof(struct asp_trs), 0, ioh)) {
 		aprint_error(: can't map interrupt registers.\n);
 		return;
 	}



CVS commit: src/sys/arch/hp700/hp700

2012-05-23 Thread Nick Hudson
Module Name:src
Committed By:   skrll
Date:   Wed May 23 11:04:54 UTC 2012

Modified Files:
src/sys/arch/hp700/hp700: intr.c

Log Message:
Update a comment.


To generate a diff of this commit:
cvs rdiff -u -r1.39 -r1.40 src/sys/arch/hp700/hp700/intr.c

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

Modified files:

Index: src/sys/arch/hp700/hp700/intr.c
diff -u src/sys/arch/hp700/hp700/intr.c:1.39 src/sys/arch/hp700/hp700/intr.c:1.40
--- src/sys/arch/hp700/hp700/intr.c:1.39	Wed May 23 07:31:31 2012
+++ src/sys/arch/hp700/hp700/intr.c	Wed May 23 11:04:54 2012
@@ -1,4 +1,4 @@
-/*	$NetBSD: intr.c,v 1.39 2012/05/23 07:31:31 skrll Exp $	*/
+/*	$NetBSD: intr.c,v 1.40 2012/05/23 11:04:54 skrll Exp $	*/
 /*	$OpenBSD: intr.c,v 1.27 2009/12/31 12:52:35 jsing Exp $	*/
 
 /*
@@ -35,7 +35,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: intr.c,v 1.39 2012/05/23 07:31:31 skrll Exp $);
+__KERNEL_RCSID(0, $NetBSD: intr.c,v 1.40 2012/05/23 11:04:54 skrll Exp $);
 
 #define __MUTEX_PRIVATE
 
@@ -178,8 +178,9 @@ hp700_intr_establish(int ipl, int (*hand
 		panic(%s: bad interrupt bit %d, __func__, bit_pos);
 
 	/*
-	 * Panic if this interrupt bit is already handled, but allow shared
-	 * interrupts for PCI.
+	 * Panic if this interrupt bit is already handled, but allow
+	 * shared interrupts for cascaded registers, e.g. dino and gsc
+	 * XXX This could be improved.
 	 */
 	if (ir-ir_bits_map[31 ^ bit_pos] != IR_BIT_UNUSED 
 	!IR_BIT_NESTED_P(ir-ir_bits_map[31 ^ bit_pos]) 



CVS commit: src/sys/arch/hp700/hp700

2012-05-23 Thread Nick Hudson
Module Name:src
Committed By:   skrll
Date:   Wed May 23 11:08:33 UTC 2012

Modified Files:
src/sys/arch/hp700/hp700: autoconf.c

Log Message:
Style.


To generate a diff of this commit:
cvs rdiff -u -r1.45 -r1.46 src/sys/arch/hp700/hp700/autoconf.c

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

Modified files:

Index: src/sys/arch/hp700/hp700/autoconf.c
diff -u src/sys/arch/hp700/hp700/autoconf.c:1.45 src/sys/arch/hp700/hp700/autoconf.c:1.46
--- src/sys/arch/hp700/hp700/autoconf.c:1.45	Mon May 21 08:14:58 2012
+++ src/sys/arch/hp700/hp700/autoconf.c	Wed May 23 11:08:33 2012
@@ -1,4 +1,4 @@
-/*	$NetBSD: autoconf.c,v 1.45 2012/05/21 08:14:58 skrll Exp $	*/
+/*	$NetBSD: autoconf.c,v 1.46 2012/05/23 11:08:33 skrll Exp $	*/
 
 /*	$OpenBSD: autoconf.c,v 1.15 2001/06/25 00:43:10 mickey Exp $	*/
 
@@ -86,7 +86,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: autoconf.c,v 1.45 2012/05/21 08:14:58 skrll Exp $);
+__KERNEL_RCSID(0, $NetBSD: autoconf.c,v 1.46 2012/05/23 11:08:33 skrll Exp $);
 
 #include opt_kgdb.h
 #include opt_useleds.h
@@ -164,6 +164,7 @@ static void hppa_pdc_system_map_scan(voi
 void
 cpu_configure(void)
 {
+	struct cpu_info *ci = curcpu();
 
 	/*
 	 * Consider stopping for a debugger before
@@ -186,7 +187,7 @@ cpu_configure(void)
 	/* in spl*() we trust */
 	hp700_intr_init();
 	hppa_enable_irq();
-	curcpu()-ci_psw |= PSW_I;
+	ci-ci_psw |= PSW_I;
 	spl0();
 
 	if (cold_hook)



CVS commit: src/sys/arch/hp700/hp700

2012-05-23 Thread Nick Hudson
Module Name:src
Committed By:   skrll
Date:   Wed May 23 11:18:46 UTC 2012

Modified Files:
src/sys/arch/hp700/hp700: genassym.cf

Log Message:
Reorder to match struct. No functional change.


To generate a diff of this commit:
cvs rdiff -u -r1.32 -r1.33 src/sys/arch/hp700/hp700/genassym.cf

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

Modified files:

Index: src/sys/arch/hp700/hp700/genassym.cf
diff -u src/sys/arch/hp700/hp700/genassym.cf:1.32 src/sys/arch/hp700/hp700/genassym.cf:1.33
--- src/sys/arch/hp700/hp700/genassym.cf:1.32	Tue Feb  1 18:33:24 2011
+++ src/sys/arch/hp700/hp700/genassym.cf	Wed May 23 11:18:46 2012
@@ -1,4 +1,4 @@
-#	$NetBSD: genassym.cf,v 1.32 2011/02/01 18:33:24 skrll Exp $
+#	$NetBSD: genassym.cf,v 1.33 2012/05/23 11:18:46 skrll Exp $
 
 #	$OpenBSD: genassym.cf,v 1.18 2001/09/20 18:31:14 mickey Exp $
 
@@ -91,12 +91,12 @@ member	IR_BITS_MAP		ir_bits_map
 export	IR_BIT_REG
 
 # struct cpu_info fields
+define	CI_TRAPSAVE		offsetof(struct cpu_info, ci_trapsave)
+define	CI_MTX_COUNT		offsetof(struct cpu_info, ci_mtx_count)
 define	CI_CPL			offsetof(struct cpu_info, ci_cpl)
 define	CI_IPENDING		offsetof(struct cpu_info, ci_ipending)
 #define	CI_INTR_DEPTH		offsetof(struct cpu_info, ci_intr_depth)
 #define	CI_SOFTLWPS		offsetof(struct cpu_info, ci_softlwps)
-define	CI_MTX_COUNT		offsetof(struct cpu_info, ci_mtx_count)
-define	CI_TRAPSAVE		offsetof(struct cpu_info, ci_trapsave)
 define	CI_PSW			offsetof(struct cpu_info, ci_psw)
 define	CI_FPU_STATE		offsetof(struct cpu_info, ci_fpu_state)
 ifdef MULTIPROCESSOR



CVS commit: src/sys/arch/hp700

2012-05-23 Thread Nick Hudson
Module Name:src
Committed By:   skrll
Date:   Wed May 23 16:11:37 UTC 2012

Modified Files:
src/sys/arch/hp700/conf: GENERIC
src/sys/arch/hp700/dev: apic.c asp.c cpu.c dino.c lasi.c mongoose.c
power.c siop_sgc.c wax.c
src/sys/arch/hp700/gsc: gscbus.c gscbusvar.h
src/sys/arch/hp700/hp700: autoconf.c genassym.cf intr.c locore.S
machdep.c mainbus.c
src/sys/arch/hp700/include: cpu.h intr.h
Removed Files:
src/sys/arch/hp700/hp700: intr.h

Log Message:
Rework the hp700 interrupt code to

- note chip restictions on interrupt in the kernel config
- allocate interrupts at attach time
- track per CPU interrupts
- remove a funciton written in assembly


To generate a diff of this commit:
cvs rdiff -u -r1.113 -r1.114 src/sys/arch/hp700/conf/GENERIC
cvs rdiff -u -r1.15 -r1.16 src/sys/arch/hp700/dev/apic.c
cvs rdiff -u -r1.20 -r1.21 src/sys/arch/hp700/dev/asp.c
cvs rdiff -u -r1.26 -r1.27 src/sys/arch/hp700/dev/cpu.c
cvs rdiff -u -r1.35 -r1.36 src/sys/arch/hp700/dev/dino.c
cvs rdiff -u -r1.22 -r1.23 src/sys/arch/hp700/dev/lasi.c \
src/sys/arch/hp700/dev/mongoose.c
cvs rdiff -u -r1.6 -r1.7 src/sys/arch/hp700/dev/power.c
cvs rdiff -u -r1.9 -r1.10 src/sys/arch/hp700/dev/siop_sgc.c
cvs rdiff -u -r1.19 -r1.20 src/sys/arch/hp700/dev/wax.c
cvs rdiff -u -r1.22 -r1.23 src/sys/arch/hp700/gsc/gscbus.c
cvs rdiff -u -r1.10 -r1.11 src/sys/arch/hp700/gsc/gscbusvar.h
cvs rdiff -u -r1.46 -r1.47 src/sys/arch/hp700/hp700/autoconf.c
cvs rdiff -u -r1.33 -r1.34 src/sys/arch/hp700/hp700/genassym.cf
cvs rdiff -u -r1.40 -r1.41 src/sys/arch/hp700/hp700/intr.c
cvs rdiff -u -r1.15 -r0 src/sys/arch/hp700/hp700/intr.h
cvs rdiff -u -r1.60 -r1.61 src/sys/arch/hp700/hp700/locore.S
cvs rdiff -u -r1.112 -r1.113 src/sys/arch/hp700/hp700/machdep.c
cvs rdiff -u -r1.82 -r1.83 src/sys/arch/hp700/hp700/mainbus.c
cvs rdiff -u -r1.69 -r1.70 src/sys/arch/hp700/include/cpu.h
cvs rdiff -u -r1.21 -r1.22 src/sys/arch/hp700/include/intr.h

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

Modified files:

Index: src/sys/arch/hp700/conf/GENERIC
diff -u src/sys/arch/hp700/conf/GENERIC:1.113 src/sys/arch/hp700/conf/GENERIC:1.114
--- src/sys/arch/hp700/conf/GENERIC:1.113	Fri Apr  6 12:21:58 2012
+++ src/sys/arch/hp700/conf/GENERIC	Wed May 23 16:11:37 2012
@@ -1,4 +1,4 @@
-# $NetBSD: GENERIC,v 1.113 2012/04/06 12:21:58 skrll Exp $
+# $NetBSD: GENERIC,v 1.114 2012/05/23 16:11:37 skrll Exp $
 #
 # GENERIC machine description file
 #
@@ -23,7 +23,7 @@ include 	arch/hp700/conf/std.hp700
 options 	INCLUDE_CONFIG_FILE	# embed config file in kernel binary
 options 	SYSCTL_INCLUDE_DESCR	# Include sysctl descriptions in kernel
 
-#ident 		GENERIC-$Revision: 1.113 $
+#ident 		GENERIC-$Revision: 1.114 $
 
 maxusers	32		# estimated number of users
 
@@ -229,10 +229,13 @@ power0	at mainbus0		# power/fail manager
 lcd0	at mainbus0		# LCD
 
 # Basic Bus Support
-lasi*	at mainbus0		# LASI host adapter ( LSI PN??? )
-asp*	at mainbus0		# this one comes w/ Viper and leds
+lasi0	at mainbus0 irq 28	# LASI host adapter
+lasi0	at phantomas0 irq 28	# LASI on [AB]*
+lasi0	at uturn? irq 28	# LASI on [CJ]*
+lasi1	at mainbus0 irq 27	# 712 GIO card
+asp*	at mainbus0 irq 28	# this one comes w/ Viper and LEDs
 wax*	at mainbus0		# Wax GSC to GSC Bus Adapter
-mongoose* at mainbus0 irq 17	# EISA Bus Adapter ( i82350 or TI??? )
+mongoose* at mainbus0		# EISA Bus Adapter ( i82350 or TI??? )
 #vmeb*	at mainbus0 irq ?	# VME bus adapter
 phantomas*	at mainbus0	# Phantom PseudoBC GSC+ Port
 
@@ -341,10 +344,10 @@ lpt*	at puc? port ?			# || ports on uni
 # GSC SCSI controllers
 oosiop*	at gsc?# NCR 53c700
 osiop*	at gsc? flags 0x0		# NCR 53c710
-siop*	at gsc? irq 3			# NCR 53c720 (Fast/Wide)
-siop*	at mainbus0 irq 3		# NCR 53c720 (Fast/Wide)
-siop*	at phantomas? irq 3		# NCR 53c720 (Fast/Wide)
-siop*	at uturn? irq 3			# NCR 53c720 (Fast/Wide)
+siop*	at gsc?# NCR 53c720 (Fast/Wide)
+siop*	at mainbus0			# NCR 53c720 (Fast/Wide)
+siop*	at phantomas?			# NCR 53c720 (Fast/Wide)
+siop*	at uturn? 			# NCR 53c720 (Fast/Wide)
 
 # PCI SCSI controllers
 adv*	at pci? dev ? function ?	# AdvanSys 1200[A,B], 9xx[U,UA] SCSI

Index: src/sys/arch/hp700/dev/apic.c
diff -u src/sys/arch/hp700/dev/apic.c:1.15 src/sys/arch/hp700/dev/apic.c:1.16
--- src/sys/arch/hp700/dev/apic.c:1.15	Mon May 21 20:58:39 2012
+++ src/sys/arch/hp700/dev/apic.c	Wed May 23 16:11:37 2012
@@ -1,4 +1,4 @@
-/*	$NetBSD: apic.c,v 1.15 2012/05/21 20:58:39 skrll Exp $	*/
+/*	$NetBSD: apic.c,v 1.16 2012/05/23 16:11:37 skrll Exp $	*/
 
 /*	$OpenBSD: apic.c,v 1.14 2011/05/01 21:59:39 kettenis Exp $	*/
 
@@ -28,8 +28,6 @@
 #include machine/pdc.h
 #include machine/intr.h
 
-#include hp700/hp700/intr.h
-
 #include dev/pci/pcireg.h
 #include dev/pci/pcivar.h
 #include dev/pci/pcidevs.h
@@ -127,6 +125,7 @@ int
 apic_intr_map(const struct pci_attach_args *pa, pci_intr_handle_t *ihp)

CVS commit: src/sys/arch/hp700/dev

2012-05-23 Thread Nick Hudson
Module Name:src
Committed By:   skrll
Date:   Wed May 23 21:11:34 UTC 2012

Modified Files:
src/sys/arch/hp700/dev: cpu.c

Log Message:
Enable IPIs for MULTIPROCESSOR kernels


To generate a diff of this commit:
cvs rdiff -u -r1.27 -r1.28 src/sys/arch/hp700/dev/cpu.c

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

Modified files:

Index: src/sys/arch/hp700/dev/cpu.c
diff -u src/sys/arch/hp700/dev/cpu.c:1.27 src/sys/arch/hp700/dev/cpu.c:1.28
--- src/sys/arch/hp700/dev/cpu.c:1.27	Wed May 23 16:11:37 2012
+++ src/sys/arch/hp700/dev/cpu.c	Wed May 23 21:11:34 2012
@@ -1,4 +1,4 @@
-/*	$NetBSD: cpu.c,v 1.27 2012/05/23 16:11:37 skrll Exp $	*/
+/*	$NetBSD: cpu.c,v 1.28 2012/05/23 21:11:34 skrll Exp $	*/
 
 /*	$OpenBSD: cpu.c,v 1.29 2009/02/08 18:33:28 miod Exp $	*/
 
@@ -29,7 +29,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: cpu.c,v 1.27 2012/05/23 16:11:37 skrll Exp $);
+__KERNEL_RCSID(0, $NetBSD: cpu.c,v 1.28 2012/05/23 21:11:34 skrll Exp $);
 
 #include opt_multiprocessor.h
 
@@ -172,6 +172,10 @@ cpuattach(device_t parent, device_t self
 
 	sc-sc_ihclk = hp700_intr_establish(IPL_CLOCK, clock_intr,
 	NULL /*clockframe*/, ci-ci_ir, 31);
+#ifdef MULTIPROCESSOR
+	sc-sc_ihipi = hp700_intr_establish(IPL_HIGH, hppa_ipi_intr,
+	NULL /*clockframe*/, ci-ci_ir, 30);
+#endif
 
 	/*
 	 * Reserve some bits for chips that don't like to be moved
@@ -191,6 +195,7 @@ cpuattach(device_t parent, device_t self
 	}
 	m = TAILQ_FIRST(mlist);
 	ci-ci_stack = VM_PAGE_TO_PHYS(m);
+	ci-ci_softc = sc;
 
 	if (ci-ci_hpa == hppa_mcpuhpa) {
 		ci-ci_flags |= CPUF_PRIMARY|CPUF_RUNNING;
@@ -205,6 +210,7 @@ cpuattach(device_t parent, device_t self
 		}
 	}
 	hppa_ncpu++;
+	hppa_ipi_init(ci);
 #endif
 	KASSERT(ci-ci_cpl == -1);
 }



CVS commit: src/sys/arch/hp700/hp700

2012-05-21 Thread Nick Hudson
Module Name:src
Committed By:   skrll
Date:   Mon May 21 08:14:58 UTC 2012

Modified Files:
src/sys/arch/hp700/hp700: autoconf.c

Log Message:
Use hppa_enable_irq


To generate a diff of this commit:
cvs rdiff -u -r1.44 -r1.45 src/sys/arch/hp700/hp700/autoconf.c

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

Modified files:

Index: src/sys/arch/hp700/hp700/autoconf.c
diff -u src/sys/arch/hp700/hp700/autoconf.c:1.44 src/sys/arch/hp700/hp700/autoconf.c:1.45
--- src/sys/arch/hp700/hp700/autoconf.c:1.44	Sun Feb  5 08:31:53 2012
+++ src/sys/arch/hp700/hp700/autoconf.c	Mon May 21 08:14:58 2012
@@ -1,4 +1,4 @@
-/*	$NetBSD: autoconf.c,v 1.44 2012/02/05 08:31:53 skrll Exp $	*/
+/*	$NetBSD: autoconf.c,v 1.45 2012/05/21 08:14:58 skrll Exp $	*/
 
 /*	$OpenBSD: autoconf.c,v 1.15 2001/06/25 00:43:10 mickey Exp $	*/
 
@@ -86,7 +86,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: autoconf.c,v 1.44 2012/02/05 08:31:53 skrll Exp $);
+__KERNEL_RCSID(0, $NetBSD: autoconf.c,v 1.45 2012/05/21 08:14:58 skrll Exp $);
 
 #include opt_kgdb.h
 #include opt_useleds.h
@@ -185,7 +185,7 @@ cpu_configure(void)
 
 	/* in spl*() we trust */
 	hp700_intr_init();
-	__asm volatile(ssm %0, %%r0 :: i (PSW_I));
+	hppa_enable_irq();
 	curcpu()-ci_psw |= PSW_I;
 	spl0();
 



CVS commit: src/sys/arch/hp700/dev

2012-05-21 Thread Nick Hudson
Module Name:src
Committed By:   skrll
Date:   Mon May 21 20:58:39 UTC 2012

Modified Files:
src/sys/arch/hp700/dev: apic.c

Log Message:
KNF


To generate a diff of this commit:
cvs rdiff -u -r1.14 -r1.15 src/sys/arch/hp700/dev/apic.c

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

Modified files:

Index: src/sys/arch/hp700/dev/apic.c
diff -u src/sys/arch/hp700/dev/apic.c:1.14 src/sys/arch/hp700/dev/apic.c:1.15
--- src/sys/arch/hp700/dev/apic.c:1.14	Sat Apr 14 10:43:19 2012
+++ src/sys/arch/hp700/dev/apic.c	Mon May 21 20:58:39 2012
@@ -1,4 +1,4 @@
-/*	$NetBSD: apic.c,v 1.14 2012/04/14 10:43:19 skrll Exp $	*/
+/*	$NetBSD: apic.c,v 1.15 2012/05/21 20:58:39 skrll Exp $	*/
 
 /*	$OpenBSD: apic.c,v 1.14 2011/05/01 21:59:39 kettenis Exp $	*/
 
@@ -141,7 +141,8 @@ apic_intr_map(const struct pci_attach_ar
 	if (sc-sc_irq[line] == 0)
 		sc-sc_irq[line] = hp700_intr_allocate_bit(ir_cpu);
 	*ihp = (line  APIC_INT_LINE_SHIFT) | sc-sc_irq[line];
-	return (APIC_INT_IRQ(*ihp) == 0);
+
+	return APIC_INT_IRQ(*ihp) == 0;
 }
 
 const char *
@@ -152,7 +153,7 @@ apic_intr_string(void *v, pci_intr_handl
 	snprintf(buf, sizeof(buf), line %ld irq %ld,
 	APIC_INT_LINE(ih), APIC_INT_IRQ(ih));
 
-	return (buf);
+	return buf;
 }
 
 void *
@@ -172,7 +173,7 @@ apic_intr_establish(void *v, pci_intr_ha
 
 	/* no mapping or bogus */
 	if (irq = 0 || irq  31)
-		return (NULL);
+		return NULL;
 
 	aiv = malloc(sizeof(struct apic_iv), M_DEVBUF, M_NOWAIT);
 	if (aiv == NULL)
@@ -234,7 +235,7 @@ apic_intr_establish(void *v, pci_intr_ha
 
 	apic_intr_list[irq] = aiv;
 
-	return (arg);
+	return arg;
 }
 
 void
@@ -262,7 +263,7 @@ apic_intr(void *v)
 	/* Signal EOI. */
 	elroy_write32(r-apic_eoi, htole32((31 - irq)  APIC_ENT0_VEC));
 
-	return (claimed);
+	return claimed;
 }
 
 void



CVS commit: src/sys/arch/hp700/dev

2012-05-21 Thread Nick Hudson
Module Name:src
Committed By:   skrll
Date:   Mon May 21 21:15:39 UTC 2012

Modified Files:
src/sys/arch/hp700/dev: cpu.c

Log Message:
Unwrap a line.


To generate a diff of this commit:
cvs rdiff -u -r1.23 -r1.24 src/sys/arch/hp700/dev/cpu.c

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

Modified files:

Index: src/sys/arch/hp700/dev/cpu.c
diff -u src/sys/arch/hp700/dev/cpu.c:1.23 src/sys/arch/hp700/dev/cpu.c:1.24
--- src/sys/arch/hp700/dev/cpu.c:1.23	Fri Apr  6 12:21:58 2012
+++ src/sys/arch/hp700/dev/cpu.c	Mon May 21 21:15:39 2012
@@ -1,4 +1,4 @@
-/*	$NetBSD: cpu.c,v 1.23 2012/04/06 12:21:58 skrll Exp $	*/
+/*	$NetBSD: cpu.c,v 1.24 2012/05/21 21:15:39 skrll Exp $	*/
 
 /*	$OpenBSD: cpu.c,v 1.29 2009/02/08 18:33:28 miod Exp $	*/
 
@@ -29,7 +29,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: cpu.c,v 1.23 2012/04/06 12:21:58 skrll Exp $);
+__KERNEL_RCSID(0, $NetBSD: cpu.c,v 1.24 2012/05/21 21:15:39 skrll Exp $);
 
 #include opt_multiprocessor.h
 
@@ -168,8 +168,7 @@ cpuattach(device_t parent, device_t self
 
 	/* Allocate stack for spin up and FPU emulation. */
 	TAILQ_INIT(mlist);
-	error = uvm_pglistalloc(PAGE_SIZE, 0, -1L, PAGE_SIZE, 0, mlist, 1,
-	0);
+	error = uvm_pglistalloc(PAGE_SIZE, 0, -1L, PAGE_SIZE, 0, mlist, 1, 0);
 
 	if (error) {
 		aprint_error(: unable to allocate CPU stack!\n);



CVS commit: src/sys/arch/hp700/hp700

2012-04-25 Thread David A. Holland
Module Name:src
Committed By:   dholland
Date:   Wed Apr 25 07:58:43 UTC 2012

Modified Files:
src/sys/arch/hp700/hp700: machdep.c

Log Message:
Add missing parenthesis in debug code. PR 46370 from Henning Petersen.


To generate a diff of this commit:
cvs rdiff -u -r1.110 -r1.111 src/sys/arch/hp700/hp700/machdep.c

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

Modified files:

Index: src/sys/arch/hp700/hp700/machdep.c
diff -u src/sys/arch/hp700/hp700/machdep.c:1.110 src/sys/arch/hp700/hp700/machdep.c:1.111
--- src/sys/arch/hp700/hp700/machdep.c:1.110	Thu Apr  5 20:12:09 2012
+++ src/sys/arch/hp700/hp700/machdep.c	Wed Apr 25 07:58:43 2012
@@ -1,4 +1,4 @@
-/*	$NetBSD: machdep.c,v 1.110 2012/04/05 20:12:09 skrll Exp $	*/
+/*	$NetBSD: machdep.c,v 1.111 2012/04/25 07:58:43 dholland Exp $	*/
 
 /*-
  * Copyright (c) 2001, 2002 The NetBSD Foundation, Inc.
@@ -58,7 +58,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: machdep.c,v 1.110 2012/04/05 20:12:09 skrll Exp $);
+__KERNEL_RCSID(0, $NetBSD: machdep.c,v 1.111 2012/04/25 07:58:43 dholland Exp $);
 
 #include opt_cputype.h
 #include opt_ddb.h
@@ -1059,7 +1059,7 @@ ibtlb_g(int i, pa_space_t sp, vaddr_t va
 	error = pdcproc_btlb_insert(sp, va, pa, sz, prot, i);
 	if (error  0) {
 #ifdef BTLBDEBUG
-		DPRINTF((WARNING: BTLB insert failed (%d)\n, error);
+		DPRINTF((WARNING: BTLB insert failed (%d)\n, error));
 #endif
 	}
 	return error;



CVS commit: src/sys/arch/hp700/dev

2012-04-14 Thread Nick Hudson
Module Name:src
Committed By:   skrll
Date:   Sat Apr 14 06:04:35 UTC 2012

Modified Files:
src/sys/arch/hp700/dev: ssio.c

Log Message:
Whitespace.


To generate a diff of this commit:
cvs rdiff -u -r1.2 -r1.3 src/sys/arch/hp700/dev/ssio.c

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

Modified files:

Index: src/sys/arch/hp700/dev/ssio.c
diff -u src/sys/arch/hp700/dev/ssio.c:1.2 src/sys/arch/hp700/dev/ssio.c:1.3
--- src/sys/arch/hp700/dev/ssio.c:1.2	Fri Jul  1 18:33:09 2011
+++ src/sys/arch/hp700/dev/ssio.c	Sat Apr 14 06:04:34 2012
@@ -1,4 +1,4 @@
-/*	$NetBSD: ssio.c,v 1.2 2011/07/01 18:33:09 dyoung Exp $	*/
+/*	$NetBSD: ssio.c,v 1.3 2012/04/14 06:04:34 skrll Exp $	*/
 
 /*	$OpenBSD: ssio.c,v 1.7 2009/03/08 22:19:04 miod Exp $	*/
 
@@ -160,8 +160,8 @@ ssio_match(device_t parent, cfdata_t mat
 	if (PCI_VENDOR(pa-pa_id) != PCI_VENDOR_NS)
 		return 0;
 
-if (PCI_PRODUCT(pa-pa_id) == PCI_PRODUCT_NS_PC87560)
-return 1;
+	if (PCI_PRODUCT(pa-pa_id) == PCI_PRODUCT_NS_PC87560)
+		return 1;
 
 	return 0;
 }
@@ -204,10 +204,10 @@ ssio_attach(device_t parent, device_t se
 	sc-sc_ih = pci_intr_establish(pa-pa_pc, ih, IPL_TTY, ssio_intr,
 	sc);
 	if (sc-sc_ih == NULL) {
-aprint_error_dev(self, could not establish interrupt);
-if (intrstr != NULL)
-aprint_error( at %s, intrstr);
-aprint_error(\n);
+		aprint_error_dev(self, could not establish interrupt);
+		if (intrstr != NULL)
+			aprint_error( at %s, intrstr);
+		aprint_error(\n);
 		goto unmap_ic2;
 	}
 	aprint_normal_dev(self, interrupting at %s\n, intrstr);
@@ -324,7 +324,7 @@ ssio_intr(void *v)
 	irq = bus_space_read_1(sc-sc_iot, sc-sc_ic1h, 0);
 	irq = 0x07;
 
-	if (irq  == 7) {
+	if (irq == 7) {
 		bus_space_write_1(sc-sc_iot, sc-sc_ic1h, 0, 0x0b);
 		isr = bus_space_read_1(sc-sc_iot, sc-sc_ic1h, 0);
 		if ((isr  0x80) == 0)



CVS commit: src/sys/arch/hp700/dev

2012-04-14 Thread Nick Hudson
Module Name:src
Committed By:   skrll
Date:   Sat Apr 14 10:43:19 UTC 2012

Modified Files:
src/sys/arch/hp700/dev: apic.c

Log Message:
Sync with the following OpenBSD changes, but do the shared interrupt
reporting differently.  Each cpu and device interrupt gets its own
counter.

revision 1.14
Fix counting of interrupts for devices that attach to elroy(4).  Shared
interrupts would be counted double, once for the interrupting device and
once for the device at the head of the chain.  The handlers would run properly
though.  Avoid this by giving each device its own interrupt counter instead
of using the counter provided by the generic interrupt handling code for the
head of the chain.

revision 1.13
Stop calling shared interrupt handlers as soon as one of them return 1
(positive interrupt was for me), like we do on other architectures.
This is done here, at the elroy(4) driver level, since this is where shared
PCI interrupts are handled.  We could do something similar for dino(4) but
this optimization is probably not very relevant there.


To generate a diff of this commit:
cvs rdiff -u -r1.13 -r1.14 src/sys/arch/hp700/dev/apic.c

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

Modified files:

Index: src/sys/arch/hp700/dev/apic.c
diff -u src/sys/arch/hp700/dev/apic.c:1.13 src/sys/arch/hp700/dev/apic.c:1.14
--- src/sys/arch/hp700/dev/apic.c:1.13	Tue Apr  3 12:07:26 2012
+++ src/sys/arch/hp700/dev/apic.c	Sat Apr 14 10:43:19 2012
@@ -1,6 +1,6 @@
-/*	$NetBSD: apic.c,v 1.13 2012/04/03 12:07:26 skrll Exp $	*/
+/*	$NetBSD: apic.c,v 1.14 2012/04/14 10:43:19 skrll Exp $	*/
 
-/*	$OpenBSD: apic.c,v 1.7 2007/10/06 23:50:54 krw Exp $	*/
+/*	$OpenBSD: apic.c,v 1.14 2011/05/01 21:59:39 kettenis Exp $	*/
 
 /*
  * Copyright (c) 2005 Michael Shalayeff
@@ -178,53 +178,61 @@ apic_intr_establish(void *v, pci_intr_ha
 	if (aiv == NULL)
 		return NULL;
 
+	cnt = malloc(sizeof(struct evcnt), M_DEVBUF, M_NOWAIT);
+	if (cnt == NULL) {
+		free(aiv, M_DEVBUF);
+		return NULL;
+	}
+
 	aiv-sc = sc;
 	aiv-ih = ih;
 	aiv-handler = handler;
 	aiv-arg = arg;
 	aiv-next = NULL;
-	aiv-cnt = NULL;
-	if (apic_intr_list[irq]) {
-		cnt = malloc(sizeof(struct evcnt), M_DEVBUF, M_NOWAIT);
-		if (cnt == NULL) {
+	aiv-cnt = cnt;
+
+	biv = apic_intr_list[irq];
+	if (biv == NULL) {
+		iv = hp700_intr_establish(pri, apic_intr, aiv, ir_cpu, irq);
+		if (iv == NULL) {
 			free(aiv, M_DEVBUF);
+			free(cnt, M_DEVBUF);
+
 			return NULL;
 		}
+	}
+
+	snprintf(aiv-aiv_name, sizeof(aiv-aiv_name), line %d irq %d,
+	line, irq);
 
-		snprintf(aiv-aiv_name, sizeof(aiv-aiv_name), line %d irq %d,
-		line, irq);
+	evcnt_attach_dynamic(cnt, EVCNT_TYPE_INTR, NULL,
+	device_xname(sc-sc_dv), aiv-aiv_name);
 
-		evcnt_attach_dynamic(cnt, EVCNT_TYPE_INTR, NULL,
-		device_xname(sc-sc_dv), aiv-aiv_name);
-		biv = apic_intr_list[irq];
+	if (biv) {
 		while (biv-next)
 			biv = biv-next;
 		biv-next = aiv;
-		aiv-cnt = cnt;
 		return arg;
 	}
 
-	iv = hp700_intr_establish(pri, apic_intr, aiv, ir_cpu, irq);
-	if (iv) {
-		ent0 = (31 - irq)  APIC_ENT0_VEC;
-		ent0 |= apic_get_int_ent0(sc, line);
+	ent0 = (31 - irq)  APIC_ENT0_VEC;
+	ent0 |= apic_get_int_ent0(sc, line);
 #if 0
-		if (cold) {
-			sc-sc_imr |= (1  irq);
-			ent0 |= APIC_ENT0_MASK;
-		}
+	if (cold) {
+		sc-sc_imr |= (1  irq);
+		ent0 |= APIC_ENT0_MASK;
+	}
 #endif
-		apic_write(sc-sc_regs, APIC_ENT0(line), APIC_ENT0_MASK);
-		apic_write(sc-sc_regs, APIC_ENT1(line),
-		((hpa  0x0ff0)  4) | ((hpa  0x000ff000)  12));
-		apic_write(sc-sc_regs, APIC_ENT0(line), ent0);
-
-		/* Signal EOI. */
-		elroy_write32(r-apic_eoi,
-		htole32((31 - irq)  APIC_ENT0_VEC));
+	apic_write(sc-sc_regs, APIC_ENT0(line), APIC_ENT0_MASK);
+	apic_write(sc-sc_regs, APIC_ENT1(line),
+	((hpa  0x0ff0)  4) | ((hpa  0x000ff000)  12));
+	apic_write(sc-sc_regs, APIC_ENT0(line), ent0);
 
-		apic_intr_list[irq] = aiv;
-	}
+	/* Signal EOI. */
+	elroy_write32(r-apic_eoi,
+	htole32((31 - irq)  APIC_ENT0_VEC));
+
+	apic_intr_list[irq] = aiv;
 
 	return (arg);
 }
@@ -244,11 +252,11 @@ apic_intr(void *v)
 	int claimed = 0;
 
 	while (iv) {
-		if (iv-handler(iv-arg)) {
-			if (iv-cnt)
-iv-cnt-ev_count++;
-			claimed = 1;
-		}
+		claimed = iv-handler(iv-arg);
+		if (claimed  iv-cnt)
+			iv-cnt-ev_count++;
+		if (claimed)
+			break;
 		iv = iv-next;
 	}
 	/* Signal EOI. */



CVS commit: src/sys/arch/hp700/hp700

2012-04-05 Thread Nick Hudson
Module Name:src
Committed By:   skrll
Date:   Thu Apr  5 20:12:09 UTC 2012

Modified Files:
src/sys/arch/hp700/hp700: machdep.c

Log Message:
Replace #ifdef DEBUG/BTLBDEBUG with DPRINTF{,N}


To generate a diff of this commit:
cvs rdiff -u -r1.109 -r1.110 src/sys/arch/hp700/hp700/machdep.c

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

Modified files:

Index: src/sys/arch/hp700/hp700/machdep.c
diff -u src/sys/arch/hp700/hp700/machdep.c:1.109 src/sys/arch/hp700/hp700/machdep.c:1.110
--- src/sys/arch/hp700/hp700/machdep.c:1.109	Sun Feb 26 07:52:52 2012
+++ src/sys/arch/hp700/hp700/machdep.c	Thu Apr  5 20:12:09 2012
@@ -1,4 +1,4 @@
-/*	$NetBSD: machdep.c,v 1.109 2012/02/26 07:52:52 skrll Exp $	*/
+/*	$NetBSD: machdep.c,v 1.110 2012/04/05 20:12:09 skrll Exp $	*/
 
 /*-
  * Copyright (c) 2001, 2002 The NetBSD Foundation, Inc.
@@ -58,7 +58,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: machdep.c,v 1.109 2012/02/26 07:52:52 skrll Exp $);
+__KERNEL_RCSID(0, $NetBSD: machdep.c,v 1.110 2012/04/05 20:12:09 skrll Exp $);
 
 #include opt_cputype.h
 #include opt_ddb.h
@@ -133,6 +133,24 @@ __KERNEL_RCSID(0, $NetBSD: machdep.c,v 
 #include ksyms.h
 #include lcd.h
 
+#ifdef MACHDEPDEBUG
+
+#define	DPRINTF(s)	do {		\
+	if (machdepdebug)		\
+		printf s;		\
+} while(0)
+
+#define	DPRINTFN(l,s)	do {		\
+	if (machdepdebug = (1))	\
+		printf s;		\
+} while(0)
+
+int machdepdebug = 1;
+#else
+#define	DPRINTF(s)	/* */
+#define	DPRINTFN(l,s)	/* */
+#endif
+
 /*
  * Different kinds of flags used throughout the kernel.
  */
@@ -466,9 +484,7 @@ hppa_init(paddr_t start, void *bi)
 	/* cache parameters */
 	error = pdcproc_cache(pdc_cache);
 	if (error  0) {
-#ifdef DEBUG
-		printf(WARNING: PDC_CACHE error %d\n, error);
-#endif
+		DPRINTF((WARNING: PDC_CACHE error %d\n, error));
 	}
 
 	dcache_line_mask = pdc_cache.dc_conf.cc_line * 16 - 1;
@@ -477,9 +493,7 @@ hppa_init(paddr_t start, void *bi)
 	icache_stride = pdc_cache.ic_stride;
 
 	error = pdcproc_cache_spidbits(pdc_spidbits);
-#ifdef DEBUG
-	printf(SPID bits: 0x%x, error = %d\n, pdc_spidbits.spidbits, error);
-#endif
+	DPRINTF((SPID bits: 0x%x, error = %d\n, pdc_spidbits.spidbits, error));
 
 	/* Calculate the OS_HPMC handler checksums. */
 	p = os_hpmc;
@@ -568,15 +582,12 @@ do {	\
 	 * WITHOUT TAKING SPECIAL MEASURES.
 	 */
 
-#ifdef DEBUG
-	printf(%s: PDC_CHASSIS\n, __func__);
-#endif
+	DPRINTF((%s: PDC_CHASSIS\n, __func__));
+
 	/* they say PDC_COPROC might turn fault light on */
 	pdcproc_chassis_display(PDC_OSTAT(PDC_OSTAT_RUN) | 0xCEC0);
 
-#ifdef DEBUG
-	printf(%s: intr bootstrap\n, __func__);
-#endif
+	DPRINTF((%s: intr bootstrap\n, __func__));
 	/* Bootstrap interrupt masking and dispatching. */
 	hp700_intr_bootstrap();
 
@@ -658,39 +669,34 @@ cpuid(void)
 	/* identify system type */
 	error = pdcproc_model_info(pdc_model);
 	if (error  0) {
-#ifdef DEBUG
-		printf(WARNING: PDC_MODEL_INFO error %d\n, error);
-#endif
+		DPRINTF((WARNING: PDC_MODEL_INFO error %d\n, error));
+		
 		pdc_model.hwmodel = 0;
 		pdc_model.hv = 0;
 	} else {
-#ifdef DEBUG
-		printf(pdc_model.hwmodel/hv %x/%x\n, pdc_model.hwmodel,
-		pdc_model.hv);
-#endif
+		DPRINTF((pdc_model.hwmodel/hv %x/%x\n, pdc_model.hwmodel,
+		pdc_model.hv));
 	}
 	cpu_modelno = pdc_model.hwmodel;
 	model = hppa_mod_info(HPPA_TYPE_BOARD, cpu_modelno);
-#ifdef DEBUG
-	printf(%s: model %s\n, __func__, model);
-#endif
+
+	DPRINTF((%s: model %s\n, __func__, model));
+
 	pdc_settype(cpu_modelno);
 
 	memset(pdc_cpuid, 0, sizeof(pdc_cpuid));
 	error = pdcproc_model_cpuid(pdc_cpuid);
 	if (error  0) {
-#ifdef DEBUG
-		printf(WARNING: PDC_MODEL_CPUID error %d. 
-		Using cpu_modelno based cpu_type.\n, error);
-#endif
+		DPRINTF((WARNING: PDC_MODEL_CPUID error %d. 
+		Using cpu_modelno based cpu_type.\n, error));
+
 		cpu_type = cpu_model_cpuid(cpu_modelno);
 	} else {
-#ifdef DEBUG
-		printf(%s: cpuid.version  = %x\n, __func__,
-		pdc_cpuid.version);
-		printf(%s: cpuid.revision = %x\n, __func__,
-		pdc_cpuid.revision);
-#endif
+		DPRINTF((%s: cpuid.version  = %x\n, __func__,
+		pdc_cpuid.version));
+		DPRINTF((%s: cpuid.revision = %x\n, __func__,
+		pdc_cpuid.revision));
+
 		cpu_version = pdc_cpuid.version;
 
 		/* XXXNH why? */
@@ -704,62 +710,50 @@ cpuid(void)
 	memset(pdc_coproc, 0, sizeof(pdc_coproc));
 	error = pdcproc_coproc(pdc_coproc);
 	if (error  0) {
-		printf(WARNING: PDC_COPROC error %d\n, error);
+		DPRINTF((WARNING: PDC_COPROC error %d\n, error));
 		pdc_coproc.ccr_enable = 0;
 	} else {
-#ifdef DEBUG
-		printf(pdc_coproc: 0x%x, 0x%x; model %x rev %x\n,
+		DPRINTF((pdc_coproc: 0x%x, 0x%x; model %x rev %x\n,
 		pdc_coproc.ccr_enable, pdc_coproc.ccr_present,
-		pdc_coproc.fpu_model, pdc_coproc.fpu_revision);
+		pdc_coproc.fpu_model, pdc_coproc.fpu_revision));
 
-#endif
 		/* a kludge to detect PCXW */
 		if (pdc_coproc.fpu_model == HPPA_FPU_PCXW)
 			cpu_version = 

CVS commit: src/sys/arch/hp700/include

2012-04-05 Thread Nick Hudson
Module Name:src
Committed By:   skrll
Date:   Thu Apr  5 20:17:24 UTC 2012

Modified Files:
src/sys/arch/hp700/include: intr.h

Log Message:
Add the IPI routinte prototypes.


To generate a diff of this commit:
cvs rdiff -u -r1.19 -r1.20 src/sys/arch/hp700/include/intr.h

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

Modified files:

Index: src/sys/arch/hp700/include/intr.h
diff -u src/sys/arch/hp700/include/intr.h:1.19 src/sys/arch/hp700/include/intr.h:1.20
--- src/sys/arch/hp700/include/intr.h:1.19	Tue Nov 16 08:59:30 2010
+++ src/sys/arch/hp700/include/intr.h	Thu Apr  5 20:17:24 2012
@@ -1,4 +1,4 @@
-/*	$NetBSD: intr.h,v 1.19 2010/11/16 08:59:30 uebayasi Exp $	*/
+/*	$NetBSD: intr.h,v 1.20 2012/04/05 20:17:24 skrll Exp $	*/
 /*	$OpenBSD: intr.h,v 1.26 2009/12/29 13:11:40 jsing Exp $	*/
 
 /*-
@@ -93,6 +93,13 @@ splraiseipl(ipl_cookie_t icookie)
 
 #define	setsoftast(l)	((l)-l_md.md_astpending = 1)
 
+#ifdef MULTIPROCESSOR
+void	 hppa_ipi_init(struct cpu_info *);
+int	 hppa_ipi_intr(void *arg);
+int	 hppa_ipi_send(struct cpu_info *, u_long);
+int	 hppa_ipi_broadcast(u_long);
+#endif
+
 #endif /* !_LOCORE */
 
 #endif /* !_HP700_INTR_H_ */



CVS commit: src/sys/arch/hp700/dev

2012-04-03 Thread Nick Hudson
Module Name:src
Committed By:   skrll
Date:   Tue Apr  3 11:44:32 UTC 2012

Modified Files:
src/sys/arch/hp700/dev: cpu.c

Log Message:
Make MULTIPROCESSOR compile.


To generate a diff of this commit:
cvs rdiff -u -r1.20 -r1.21 src/sys/arch/hp700/dev/cpu.c

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

Modified files:

Index: src/sys/arch/hp700/dev/cpu.c
diff -u src/sys/arch/hp700/dev/cpu.c:1.20 src/sys/arch/hp700/dev/cpu.c:1.21
--- src/sys/arch/hp700/dev/cpu.c:1.20	Sun Feb 26 08:44:12 2012
+++ src/sys/arch/hp700/dev/cpu.c	Tue Apr  3 11:44:32 2012
@@ -1,4 +1,4 @@
-/*	$NetBSD: cpu.c,v 1.20 2012/02/26 08:44:12 skrll Exp $	*/
+/*	$NetBSD: cpu.c,v 1.21 2012/04/03 11:44:32 skrll Exp $	*/
 
 /*	$OpenBSD: cpu.c,v 1.29 2009/02/08 18:33:28 miod Exp $	*/
 
@@ -29,13 +29,14 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: cpu.c,v 1.20 2012/02/26 08:44:12 skrll Exp $);
+__KERNEL_RCSID(0, $NetBSD: cpu.c,v 1.21 2012/04/03 11:44:32 skrll Exp $);
 
 #include opt_multiprocessor.h
 
 #include sys/param.h
 #include sys/systm.h
 #include sys/device.h
+#include sys/atomic.h
 #include sys/reboot.h
 
 #include uvm/uvm.h



CVS commit: src/sys/arch/hp700/hp700

2012-03-29 Thread Nick Hudson
Module Name:src
Committed By:   skrll
Date:   Thu Mar 29 09:26:24 UTC 2012

Modified Files:
src/sys/arch/hp700/hp700: intr.c

Log Message:
Check for HPPA_SID_KERNEL when checking for interrupt in the
mutex_enter critical section.


To generate a diff of this commit:
cvs rdiff -u -r1.37 -r1.38 src/sys/arch/hp700/hp700/intr.c

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

Modified files:

Index: src/sys/arch/hp700/hp700/intr.c
diff -u src/sys/arch/hp700/hp700/intr.c:1.37 src/sys/arch/hp700/hp700/intr.c:1.38
--- src/sys/arch/hp700/hp700/intr.c:1.37	Thu Mar  1 21:10:00 2012
+++ src/sys/arch/hp700/hp700/intr.c	Thu Mar 29 09:26:24 2012
@@ -1,4 +1,4 @@
-/*	$NetBSD: intr.c,v 1.37 2012/03/01 21:10:00 skrll Exp $	*/
+/*	$NetBSD: intr.c,v 1.38 2012/03/29 09:26:24 skrll Exp $	*/
 /*	$OpenBSD: intr.c,v 1.27 2009/12/31 12:52:35 jsing Exp $	*/
 
 /*
@@ -35,7 +35,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: intr.c,v 1.37 2012/03/01 21:10:00 skrll Exp $);
+__KERNEL_RCSID(0, $NetBSD: intr.c,v 1.38 2012/03/29 09:26:24 skrll Exp $);
 
 #define __MUTEX_PRIVATE
 
@@ -391,7 +391,8 @@ hppa_intr(struct trapframe *frame)
 	 * interrupt handlers need to aquire the mutex, they could deadlock if
 	 * the owner value is left unset.
 	 */
-	if (frame-tf_iioq_head = (u_int)mutex_enter_crit_start 
+	if (frame-tf_iisq_head == HPPA_SID_KERNEL 
+	frame-tf_iioq_head = (u_int)mutex_enter_crit_start 
 	frame-tf_iioq_head = (u_int)mutex_enter_crit_end 
 	frame-tf_ret0 != 0)
 		((kmutex_t *)frame-tf_arg0)-mtx_owner = (uintptr_t)curlwp;



CVS commit: src/sys/arch/hp700/hp700

2012-03-01 Thread Nick Hudson
Module Name:src
Committed By:   skrll
Date:   Thu Mar  1 21:10:01 UTC 2012

Modified Files:
src/sys/arch/hp700/hp700: intr.c

Log Message:
Use __func__ in panic messages.


To generate a diff of this commit:
cvs rdiff -u -r1.36 -r1.37 src/sys/arch/hp700/hp700/intr.c

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

Modified files:

Index: src/sys/arch/hp700/hp700/intr.c
diff -u src/sys/arch/hp700/hp700/intr.c:1.36 src/sys/arch/hp700/hp700/intr.c:1.37
--- src/sys/arch/hp700/hp700/intr.c:1.36	Fri Feb  4 14:51:02 2011
+++ src/sys/arch/hp700/hp700/intr.c	Thu Mar  1 21:10:00 2012
@@ -1,4 +1,4 @@
-/*	$NetBSD: intr.c,v 1.36 2011/02/04 14:51:02 skrll Exp $	*/
+/*	$NetBSD: intr.c,v 1.37 2012/03/01 21:10:00 skrll Exp $	*/
 /*	$OpenBSD: intr.c,v 1.27 2009/12/31 12:52:35 jsing Exp $	*/
 
 /*
@@ -35,7 +35,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: intr.c,v 1.36 2011/02/04 14:51:02 skrll Exp $);
+__KERNEL_RCSID(0, $NetBSD: intr.c,v 1.37 2012/03/01 21:10:00 skrll Exp $);
 
 #define __MUTEX_PRIVATE
 
@@ -126,7 +126,7 @@ hp700_interrupt_register_establish(struc
 		if (hp700_interrupt_registers[idx] == NULL)
 			break;
 	if (idx == HP700_INTERRUPT_BITS)
-		panic(hp700_interrupt_register_establish: too many regs);
+		panic(%s: too many regs, __func__);
 	hp700_interrupt_registers[idx] = ir;
 }
 
@@ -184,7 +184,7 @@ hp700_intr_establish(int ipl, int (*hand
 	if (ir-ir_bits_map[31 ^ bit_pos] != IR_BIT_UNUSED 
 	!IR_BIT_NESTED_P(ir-ir_bits_map[31 ^ bit_pos]) 
 	handler == NULL)
-		panic(hp700_intr_establish: int already handled);
+		panic(%s: int already handled, __func__);
 
 	/*
 	 * If this interrupt bit leads us to another interrupt register,
@@ -195,7 +195,7 @@ hp700_intr_establish(int ipl, int (*hand
 			if (hp700_interrupt_registers[idx] == arg)
 break;
 		if (idx == HP700_INTERRUPT_BITS)
-			panic(hp700_intr_establish: unknown int reg);
+			panic(%s: unknown int reg, __func__);
 		ir-ir_bits_map[31 ^ bit_pos] = IR_BIT_REG | idx;
 		
 		return NULL;
@@ -261,7 +261,7 @@ _hp700_intr_ipl_next(void)
 		if (hp700_interrupt_bits[idx].ib_reg == NULL)
 			break;
 	if (idx == HP700_INTERRUPT_BITS)
-		panic(_hp700_intr_spl_bit: too many devices);
+		panic(%s: too many devices, __func__);
 	return idx;
 }
 



CVS commit: src/sys/arch/hp700

2012-02-26 Thread Nick Hudson
Module Name:src
Committed By:   skrll
Date:   Sun Feb 26 08:44:12 UTC 2012

Modified Files:
src/sys/arch/hp700/dev: cpu.c
src/sys/arch/hp700/include: pdc.h

Log Message:
Rename a field to match PDC documentation.


To generate a diff of this commit:
cvs rdiff -u -r1.19 -r1.20 src/sys/arch/hp700/dev/cpu.c
cvs rdiff -u -r1.20 -r1.21 src/sys/arch/hp700/include/pdc.h

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

Modified files:

Index: src/sys/arch/hp700/dev/cpu.c
diff -u src/sys/arch/hp700/dev/cpu.c:1.19 src/sys/arch/hp700/dev/cpu.c:1.20
--- src/sys/arch/hp700/dev/cpu.c:1.19	Tue Feb  1 18:33:24 2011
+++ src/sys/arch/hp700/dev/cpu.c	Sun Feb 26 08:44:12 2012
@@ -1,4 +1,4 @@
-/*	$NetBSD: cpu.c,v 1.19 2011/02/01 18:33:24 skrll Exp $	*/
+/*	$NetBSD: cpu.c,v 1.20 2012/02/26 08:44:12 skrll Exp $	*/
 
 /*	$OpenBSD: cpu.c,v 1.29 2009/02/08 18:33:28 miod Exp $	*/
 
@@ -29,7 +29,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: cpu.c,v 1.19 2011/02/01 18:33:24 skrll Exp $);
+__KERNEL_RCSID(0, $NetBSD: cpu.c,v 1.20 2012/02/26 08:44:12 skrll Exp $);
 
 #include opt_multiprocessor.h
 
@@ -133,7 +133,7 @@ cpuattach(device_t parent, device_t self
 	aprint_normal( MHz clk\n%s: %s, self-dv_xname,
 	pdc_model.sh? shadows, : );
 
-	if (pdc_cache.dc_conf.cc_sh)
+	if (pdc_cache.dc_conf.cc_fsel)
 		aprint_normal(%uK cache, pdc_cache.dc_size / 1024);
 	else
 		aprint_normal(%uK/%uK D/I caches, pdc_cache.dc_size / 1024,

Index: src/sys/arch/hp700/include/pdc.h
diff -u src/sys/arch/hp700/include/pdc.h:1.20 src/sys/arch/hp700/include/pdc.h:1.21
--- src/sys/arch/hp700/include/pdc.h:1.20	Thu Jan 26 08:11:06 2012
+++ src/sys/arch/hp700/include/pdc.h	Sun Feb 26 08:44:12 2012
@@ -1,4 +1,4 @@
-/*	$NetBSD: pdc.h,v 1.20 2012/01/26 08:11:06 skrll Exp $	*/
+/*	$NetBSD: pdc.h,v 1.21 2012/02/26 08:44:12 skrll Exp $	*/
 
 /*	$OpenBSD: pdc.h,v 1.35 2007/07/15 20:03:48 kettenis Exp $	*/
 
@@ -384,7 +384,7 @@ struct cache_cf {	/* PDC_CACHE (for str
 		cc_line	: 3,	/* max data written by store (16-byte mults) */
 		cc_resv1: 2,	/* (reserved) */
 		cc_wt	: 1,	/* D-cache: write-to = 0, write-through = 1 */
-		cc_sh	: 2,	/* separate I and D = 0, shared I and D = 1 */
+		cc_fsel	: 2,	/* Both (00) / only D/I (01/10) / either (11) F[DI]C  */
 		cc_cst  : 3,	/* D-cache: incoherent = 0, coherent = 1 */
 		cc_resv2:11,	/* (reserved) */
 		cc_hvers: 2;	/* H-VERSION dependent */



CVS commit: src/sys/arch/hp700/stand/xxboot

2012-02-25 Thread Nick Hudson
Module Name:src
Committed By:   skrll
Date:   Sun Feb 26 07:23:24 UTC 2012

Modified Files:
src/sys/arch/hp700/stand/xxboot: start.S

Log Message:
Typo in comment.


To generate a diff of this commit:
cvs rdiff -u -r1.2 -r1.3 src/sys/arch/hp700/stand/xxboot/start.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/hp700/stand/xxboot/start.S
diff -u src/sys/arch/hp700/stand/xxboot/start.S:1.2 src/sys/arch/hp700/stand/xxboot/start.S:1.3
--- src/sys/arch/hp700/stand/xxboot/start.S:1.2	Sun Dec 11 12:17:25 2005
+++ src/sys/arch/hp700/stand/xxboot/start.S	Sun Feb 26 07:23:24 2012
@@ -1,4 +1,4 @@
-;	$NetBSD: start.S,v 1.2 2005/12/11 12:17:25 christos Exp $
+;	$NetBSD: start.S,v 1.3 2012/02/26 07:23:24 skrll Exp $
 
 ; Copyright (c) 2003 ITOH Yasufumi.
 ; All rights reserved.
@@ -250,7 +250,7 @@ PZ_MEM_KEYBOARD:	.equ	0x400
 
 DEV_PATH:		.equ	0x00
 DEV_LAYERS:		.equ	0x08
-DEV_HPA:		.equ	0x20	; hard physical adderss space
+DEV_HPA:		.equ	0x20	; hard physical address space
 DEV_SPA:		.equ	0x24	; soft physical address space
 DEV_IODC_ENTRY:		.equ	0x28
 DEV_CLASS:		.equ	0x2c



CVS commit: src/sys/arch/hp700/dev

2012-02-25 Thread Nick Hudson
Module Name:src
Committed By:   skrll
Date:   Sun Feb 26 07:50:38 UTC 2012

Modified Files:
src/sys/arch/hp700/dev: cpudevs

Log Message:
Take an educiated guess at the CPU id for PCXW+ (Landshark)


To generate a diff of this commit:
cvs rdiff -u -r1.5 -r1.6 src/sys/arch/hp700/dev/cpudevs

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

Modified files:

Index: src/sys/arch/hp700/dev/cpudevs
diff -u src/sys/arch/hp700/dev/cpudevs:1.5 src/sys/arch/hp700/dev/cpudevs:1.6
--- src/sys/arch/hp700/dev/cpudevs:1.5	Thu Apr 30 07:01:26 2009
+++ src/sys/arch/hp700/dev/cpudevs	Sun Feb 26 07:50:37 2012
@@ -1,4 +1,4 @@
-$NetBSD: cpudevs,v 1.5 2009/04/30 07:01:26 skrll Exp $
+$NetBSD: cpudevs,v 1.6 2012/02/26 07:50:37 skrll Exp $
 
 $OpenBSD: cpudevs,v 1.44 2007/05/18 15:57:35 kettenis Exp $
 
@@ -322,7 +322,7 @@ cpu	PCXU	0x0e	PCXU (Onyx)
 cpu	PCXL2	0x0f	PCXL2 (Velociraptor)
 cpu	PCXUP	0x10	PCXU+ (Vulcan)
 cpu	PCXW	0x11	PCXW (Vulcan)
-#cpu	PCXWP	0x??	PCXW+ (Landshark)
+cpu	PCXWP	0x12	PCXW+ (Landshark)
 cpu	PCXW2	0x13	PCXW2 (Piranha)
 #cpu	PCXM	0x??	Mako
 #cpu	PCXM2	0x??	Shortfin



CVS commit: src/sys/arch/hp700/dev

2012-02-25 Thread Nick Hudson
Module Name:src
Committed By:   skrll
Date:   Sun Feb 26 07:51:57 UTC 2012

Modified Files:
src/sys/arch/hp700/dev: cpudevs.h cpudevs_data.h

Log Message:
Regen


To generate a diff of this commit:
cvs rdiff -u -r1.6 -r1.7 src/sys/arch/hp700/dev/cpudevs.h
cvs rdiff -u -r1.7 -r1.8 src/sys/arch/hp700/dev/cpudevs_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/arch/hp700/dev/cpudevs.h
diff -u src/sys/arch/hp700/dev/cpudevs.h:1.6 src/sys/arch/hp700/dev/cpudevs.h:1.7
--- src/sys/arch/hp700/dev/cpudevs.h:1.6	Sat Feb  4 17:05:38 2012
+++ src/sys/arch/hp700/dev/cpudevs.h	Sun Feb 26 07:51:56 2012
@@ -1,9 +1,9 @@
-/*	$NetBSD: cpudevs.h,v 1.6 2012/02/04 17:05:38 skrll Exp $	*/
+/*	$NetBSD: cpudevs.h,v 1.7 2012/02/26 07:51:56 skrll Exp $	*/
 
 /*
  * THIS FILE AUTOMATICALLY GENERATED. DO NOT EDIT.
  * generated from:
- *	NetBSD: cpudevs,v 1.5 2009/04/30 07:01:26 skrll Exp 
+ *	NetBSD: cpudevs,v 1.6 2012/02/26 07:50:37 skrll Exp 
  */
 
 #define	HPPA_TYPE_NPROC	0x00
@@ -230,6 +230,7 @@
 #define	HPPA_CPU_PCXL2	0x0f
 #define	HPPA_CPU_PCXUP	0x10
 #define	HPPA_CPU_PCXW	0x11
+#define	HPPA_CPU_PCXWP	0x12
 #define	HPPA_CPU_PCXW2	0x13
 #define	HPPA_FPU_SOFTEMU	0x01
 #define	HPPA_FPU_INDIGO	0x02

Index: src/sys/arch/hp700/dev/cpudevs_data.h
diff -u src/sys/arch/hp700/dev/cpudevs_data.h:1.7 src/sys/arch/hp700/dev/cpudevs_data.h:1.8
--- src/sys/arch/hp700/dev/cpudevs_data.h:1.7	Sun Feb  5 08:31:53 2012
+++ src/sys/arch/hp700/dev/cpudevs_data.h	Sun Feb 26 07:51:56 2012
@@ -1,9 +1,9 @@
-/*	$NetBSD: cpudevs_data.h,v 1.7 2012/02/05 08:31:53 skrll Exp $	*/
+/*	$NetBSD: cpudevs_data.h,v 1.8 2012/02/26 07:51:56 skrll Exp $	*/
 
 /*
  * THIS FILE AUTOMATICALLY GENERATED. DO NOT EDIT.
  * generated from:
- *	NetBSD: cpudevs,v 1.5 2009/04/30 07:01:26 skrll Exp 
+ *	NetBSD: cpudevs,v 1.6 2012/02/26 07:50:37 skrll Exp 
  */
 
 {HPPA_TYPE_BOARD,	HPPA_BOARD_HP840,	840/930 (Indigo) },
@@ -210,6 +210,7 @@
 {HPPA_TYPE_CPU,	HPPA_CPU_PCXL2,	PCXL2 (Velociraptor) },
 {HPPA_TYPE_CPU,	HPPA_CPU_PCXUP,	PCXU+ (Vulcan) },
 {HPPA_TYPE_CPU,	HPPA_CPU_PCXW,	PCXW (Vulcan) },
+{HPPA_TYPE_CPU,	HPPA_CPU_PCXWP,	PCXW+ (Landshark) },
 {HPPA_TYPE_CPU,	HPPA_CPU_PCXW2,	PCXW2 (Piranha) },
 {HPPA_TYPE_FPU,	HPPA_FPU_SOFTEMU,	Software Emulation },
 {HPPA_TYPE_FPU,	HPPA_FPU_INDIGO,	Indigo },



CVS commit: src/sys/arch/hp700/hp700

2012-02-25 Thread Nick Hudson
Module Name:src
Committed By:   skrll
Date:   Sun Feb 26 07:52:52 UTC 2012

Modified Files:
src/sys/arch/hp700/hp700: machdep.c

Log Message:
Use new HPPA_CPU_PCXWP for PA8600 (Landshark)


To generate a diff of this commit:
cvs rdiff -u -r1.108 -r1.109 src/sys/arch/hp700/hp700/machdep.c

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

Modified files:

Index: src/sys/arch/hp700/hp700/machdep.c
diff -u src/sys/arch/hp700/hp700/machdep.c:1.108 src/sys/arch/hp700/hp700/machdep.c:1.109
--- src/sys/arch/hp700/hp700/machdep.c:1.108	Thu Feb 23 21:38:53 2012
+++ src/sys/arch/hp700/hp700/machdep.c	Sun Feb 26 07:52:52 2012
@@ -1,4 +1,4 @@
-/*	$NetBSD: machdep.c,v 1.108 2012/02/23 21:38:53 skrll Exp $	*/
+/*	$NetBSD: machdep.c,v 1.109 2012/02/26 07:52:52 skrll Exp $	*/
 
 /*-
  * Copyright (c) 2001, 2002 The NetBSD Foundation, Inc.
@@ -58,7 +58,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: machdep.c,v 1.108 2012/02/23 21:38:53 skrll Exp $);
+__KERNEL_RCSID(0, $NetBSD: machdep.c,v 1.109 2012/02/26 07:52:52 skrll Exp $);
 
 #include opt_cputype.h
 #include opt_ddb.h
@@ -384,7 +384,7 @@ const struct hppa_cpu_info cpu_types[] =
 #endif
 #ifdef HP8600_CPU
 	{ PA8600, Landshark, PCXW+,
-	  hpcxwp, HPPA_CPU_PCXW2 /*XXX NH */,
+	  hpcxwp, HPPA_CPU_PCXWP,
 	  HPPA_FTRS_W32B, 2.0,
 	  desidhash_u, itlb_u, dtlb_u, itlbna_u, dtlbna_u, tlbd_u,
  	  ibtlb_u, NULL, pbtlb_u, NULL },



CVS commit: src/sys/arch/hp700/stand

2012-02-24 Thread Nick Hudson
Module Name:src
Committed By:   skrll
Date:   Fri Feb 24 18:45:20 UTC 2012

Modified Files:
src/sys/arch/hp700/stand/mkboot: mkboot.c
src/sys/arch/hp700/stand/xxboot: iplsum.c main.c readufs.h

Log Message:
More u_intXX_t - uintXX_t

Same code before and after.


To generate a diff of this commit:
cvs rdiff -u -r1.7 -r1.8 src/sys/arch/hp700/stand/mkboot/mkboot.c
cvs rdiff -u -r1.5 -r1.6 src/sys/arch/hp700/stand/xxboot/iplsum.c \
src/sys/arch/hp700/stand/xxboot/readufs.h
cvs rdiff -u -r1.9 -r1.10 src/sys/arch/hp700/stand/xxboot/main.c

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

Modified files:

Index: src/sys/arch/hp700/stand/mkboot/mkboot.c
diff -u src/sys/arch/hp700/stand/mkboot/mkboot.c:1.7 src/sys/arch/hp700/stand/mkboot/mkboot.c:1.8
--- src/sys/arch/hp700/stand/mkboot/mkboot.c:1.7	Wed Mar 18 16:00:11 2009
+++ src/sys/arch/hp700/stand/mkboot/mkboot.c	Fri Feb 24 18:45:20 2012
@@ -1,4 +1,4 @@
-/*	$NetBSD: mkboot.c,v 1.7 2009/03/18 16:00:11 cegger Exp $	*/
+/*	$NetBSD: mkboot.c,v 1.8 2012/02/24 18:45:20 skrll Exp $	*/
 
 /*	$OpenBSD: mkboot.c,v 1.9 2001/05/17 00:57:55 pvalchev Exp $	*/
 
@@ -101,7 +101,7 @@ struct exec {
 
 #define N_GETMAGIC(ex) \
 ex).a_midmag)0x) ? \
-(ntohl((u_int32_t)((ex).a_midmag))0x) : ((ex).a_midmag))
+(ntohl((uint32_t)((ex).a_midmag))0x) : ((ex).a_midmag))
 
 #include stdio.h
 #include ctype.h

Index: src/sys/arch/hp700/stand/xxboot/iplsum.c
diff -u src/sys/arch/hp700/stand/xxboot/iplsum.c:1.5 src/sys/arch/hp700/stand/xxboot/iplsum.c:1.6
--- src/sys/arch/hp700/stand/xxboot/iplsum.c:1.5	Mon Feb 21 02:31:57 2011
+++ src/sys/arch/hp700/stand/xxboot/iplsum.c	Fri Feb 24 18:45:20 2012
@@ -1,4 +1,4 @@
-/*	$NetBSD: iplsum.c,v 1.5 2011/02/21 02:31:57 itohy Exp $	*/
+/*	$NetBSD: iplsum.c,v 1.6 2012/02/24 18:45:20 skrll Exp $	*/
 
 /*
  * Calculate 32bit checksum of IPL and store in a certain location
@@ -13,7 +13,7 @@
 #include netinet/in.h
 
 #ifndef __BIT_TYPES_DEFINED__
-typedef unsigned int	u_int32_t;
+typedef unsigned int	uint32_t;
 #endif
 
 /* see README.ipl */
@@ -27,9 +27,9 @@ typedef unsigned int	u_int32_t;
 #define BOOTSIZE	(IPLOFF + IPLSIZE)
 #define BOOTBLOCKSIZE	8192
 
-u_int32_t bootblk[BOOTSIZE / sizeof(u_int32_t) + 1];
+uint32_t bootblk[BOOTSIZE / sizeof(uint32_t) + 1];
 
-#define SUMOFF		((IPLOFF + 4) / sizeof(u_int32_t))
+#define SUMOFF		((IPLOFF + 4) / sizeof(uint32_t))
 
 #ifdef __STDC__
 int main(int, char *[]);
@@ -40,7 +40,7 @@ main(int argc, char *argv[])
 {
 	FILE *fp;
 	int len;
-	u_int32_t sum, *p;
+	uint32_t sum, *p;
 	int iploff, iplsumsize;
 
 	if (argc != 3) {
@@ -67,8 +67,8 @@ main(int argc, char *argv[])
 		fprintf(stderr, %s: bad LIF magic\n, argv[1]);
 		return 1;
 	}
-	iploff = ntohl(bootblk[0xf0 / sizeof(u_int32_t)]);
-	iplsumsize = ntohl(bootblk[0xf4 / sizeof(u_int32_t)]);
+	iploff = ntohl(bootblk[0xf0 / sizeof(uint32_t)]);
+	iplsumsize = ntohl(bootblk[0xf4 / sizeof(uint32_t)]);
 	printf(%d bytes free, ipl offset = %d, ipl sum size = %d\n,
 	BOOTSIZE - len, iploff, iplsumsize);
 	if (iploff != IPLOFF || iplsumsize = 0 || iplsumsize % 2048 ||
@@ -79,20 +79,20 @@ main(int argc, char *argv[])
 
 	/* checksum */
 	sum = 0;
-	for (p = bootblk + IPLOFF / sizeof(u_int32_t);
-	p  bootblk + (IPLOFF + IPL1SIZE) / sizeof(u_int32_t); p++)
+	for (p = bootblk + IPLOFF / sizeof(uint32_t);
+	p  bootblk + (IPLOFF + IPL1SIZE) / sizeof(uint32_t); p++)
 		sum += ntohl(*p);
 
 	bootblk[SUMOFF] = htonl(ntohl(bootblk[SUMOFF]) - sum);
 
 	/* transfer ipl part 2 */
-	memcpy(bootblk + IPL2ONDISK / sizeof(u_int32_t),
-	bootblk + (IPLOFF + IPL1SIZE) / sizeof(u_int32_t),
+	memcpy(bootblk + IPL2ONDISK / sizeof(uint32_t),
+	bootblk + (IPLOFF + IPL1SIZE) / sizeof(uint32_t),
 	IPL2SIZE);
 
 	/* transfer ipl part 3 */
-	memcpy(bootblk + IPL3ONDISK / sizeof(u_int32_t),
-	bootblk + (IPLOFF + IPL1SIZE + IPL2SIZE) / sizeof(u_int32_t),
+	memcpy(bootblk + IPL3ONDISK / sizeof(uint32_t),
+	bootblk + (IPLOFF + IPL1SIZE + IPL2SIZE) / sizeof(uint32_t),
 	IPL3SIZE);
 
 	/* write file */
Index: src/sys/arch/hp700/stand/xxboot/readufs.h
diff -u src/sys/arch/hp700/stand/xxboot/readufs.h:1.5 src/sys/arch/hp700/stand/xxboot/readufs.h:1.6
--- src/sys/arch/hp700/stand/xxboot/readufs.h:1.5	Mon Feb 21 02:31:57 2011
+++ src/sys/arch/hp700/stand/xxboot/readufs.h	Fri Feb 24 18:45:20 2012
@@ -1,4 +1,4 @@
-/*	$NetBSD: readufs.h,v 1.5 2011/02/21 02:31:57 itohy Exp $	*/
+/*	$NetBSD: readufs.h,v 1.6 2012/02/24 18:45:20 skrll Exp $	*/
 /*	from Id: readufs.h,v 1.10 2003/12/16 13:54:11 itohy Exp	*/
 
 /*
@@ -76,9 +76,9 @@ struct ufs_info {
 #endif
 
 	/* superblock information */
-	u_int32_t bsize;	/* fs block size */
-	u_int32_t nindir;	/* # indirect per block */
-	u_int32_t fsbtodb;	/* block - sector shift count */
+	uint32_t bsize;	/* fs block size */
+	uint32_t nindir;	/* # indirect per block */
+	uint32_t fsbtodb;	/* block - sector shift count 

CVS commit: src/sys/arch/hp700/hp700

2012-02-23 Thread Nick Hudson
Module Name:src
Committed By:   skrll
Date:   Thu Feb 23 21:38:53 UTC 2012

Modified Files:
src/sys/arch/hp700/hp700: disksubr.c machdep.c machdep.h mainbus.c

Log Message:
u_intXX_t - uintXX_t

Same code before and after.


To generate a diff of this commit:
cvs rdiff -u -r1.26 -r1.27 src/sys/arch/hp700/hp700/disksubr.c
cvs rdiff -u -r1.107 -r1.108 src/sys/arch/hp700/hp700/machdep.c
cvs rdiff -u -r1.8 -r1.9 src/sys/arch/hp700/hp700/machdep.h
cvs rdiff -u -r1.80 -r1.81 src/sys/arch/hp700/hp700/mainbus.c

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

Modified files:

Index: src/sys/arch/hp700/hp700/disksubr.c
diff -u src/sys/arch/hp700/hp700/disksubr.c:1.26 src/sys/arch/hp700/hp700/disksubr.c:1.27
--- src/sys/arch/hp700/hp700/disksubr.c:1.26	Fri May  8 09:33:58 2009
+++ src/sys/arch/hp700/hp700/disksubr.c	Thu Feb 23 21:38:53 2012
@@ -1,4 +1,4 @@
-/*	$NetBSD: disksubr.c,v 1.26 2009/05/08 09:33:58 skrll Exp $	*/
+/*	$NetBSD: disksubr.c,v 1.27 2012/02/23 21:38:53 skrll Exp $	*/
 
 /*	$OpenBSD: disksubr.c,v 1.6 2000/10/18 21:00:34 mickey Exp $	*/
 
@@ -68,7 +68,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: disksubr.c,v 1.26 2009/05/08 09:33:58 skrll Exp $);
+__KERNEL_RCSID(0, $NetBSD: disksubr.c,v 1.27 2012/02/23 21:38:53 skrll Exp $);
 
 #include sys/param.h
 #include sys/systm.h
@@ -92,7 +92,7 @@ readbsdlabel(struct buf *bp, void (*stra
 {
 	struct disklabel *dlp;
 	const char *msg = NULL;
-	u_int16_t cksum;
+	uint16_t cksum;
 
 	/* don't read the on-disk label if we are in spoofed-only mode */
 	if (spoofonly)

Index: src/sys/arch/hp700/hp700/machdep.c
diff -u src/sys/arch/hp700/hp700/machdep.c:1.107 src/sys/arch/hp700/hp700/machdep.c:1.108
--- src/sys/arch/hp700/hp700/machdep.c:1.107	Sun Feb  5 08:24:43 2012
+++ src/sys/arch/hp700/hp700/machdep.c	Thu Feb 23 21:38:53 2012
@@ -1,4 +1,4 @@
-/*	$NetBSD: machdep.c,v 1.107 2012/02/05 08:24:43 skrll Exp $	*/
+/*	$NetBSD: machdep.c,v 1.108 2012/02/23 21:38:53 skrll Exp $	*/
 
 /*-
  * Copyright (c) 2001, 2002 The NetBSD Foundation, Inc.
@@ -58,7 +58,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: machdep.c,v 1.107 2012/02/05 08:24:43 skrll Exp $);
+__KERNEL_RCSID(0, $NetBSD: machdep.c,v 1.108 2012/02/23 21:38:53 skrll Exp $);
 
 #include opt_cputype.h
 #include opt_ddb.h
@@ -152,7 +152,7 @@ int dcache_stride, dcache_line_mask;
 /*
  * things to not kill
  */
-volatile u_int8_t *machine_ledaddr;
+volatile uint8_t *machine_ledaddr;
 int machine_ledword, machine_leds;
 
 /*
@@ -1457,7 +1457,7 @@ cpu_reboot(int howto, char *user_boot_st
 	/* NOTREACHED */
 }
 
-u_int32_t dumpmag = 0x8fca0101;	/* magic number */
+uint32_t dumpmag = 0x8fca0101;	/* magic number */
 int	dumpsize = 0;		/* pages */
 long	dumplo = 0;		/* blocks */
 

Index: src/sys/arch/hp700/hp700/machdep.h
diff -u src/sys/arch/hp700/hp700/machdep.h:1.8 src/sys/arch/hp700/hp700/machdep.h:1.9
--- src/sys/arch/hp700/hp700/machdep.h:1.8	Tue Nov  3 05:07:25 2009
+++ src/sys/arch/hp700/hp700/machdep.h	Thu Feb 23 21:38:53 2012
@@ -1,4 +1,4 @@
-/*	$NetBSD: machdep.h,v 1.8 2009/11/03 05:07:25 snj Exp $	*/
+/*	$NetBSD: machdep.h,v 1.9 2012/02/23 21:38:53 skrll Exp $	*/
 
 /*	$OpenBSD: cpufunc.h,v 1.17 2000/05/15 17:22:40 mickey Exp $	*/
 
@@ -95,7 +95,7 @@ void hp700_pagezero_unmap(int);
 /* Blinking the LEDs. */
 #ifdef USELEDS
 #define	_HP700_LED_FREQ		(16)
-extern volatile u_int8_t *machine_ledaddr;
+extern volatile uint8_t *machine_ledaddr;
 extern int machine_ledword, machine_leds;
 extern int _hp700_led_on_cycles[];
 #define hp700_led_blink(i)			\

Index: src/sys/arch/hp700/hp700/mainbus.c
diff -u src/sys/arch/hp700/hp700/mainbus.c:1.80 src/sys/arch/hp700/hp700/mainbus.c:1.81
--- src/sys/arch/hp700/hp700/mainbus.c:1.80	Mon Jan  9 15:15:40 2012
+++ src/sys/arch/hp700/hp700/mainbus.c	Thu Feb 23 21:38:53 2012
@@ -1,4 +1,4 @@
-/*	$NetBSD: mainbus.c,v 1.80 2012/01/09 15:15:40 martin Exp $	*/
+/*	$NetBSD: mainbus.c,v 1.81 2012/02/23 21:38:53 skrll Exp $	*/
 
 /*-
  * Copyright (c) 2001, 2002 The NetBSD Foundation, Inc.
@@ -58,7 +58,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: mainbus.c,v 1.80 2012/01/09 15:15:40 martin Exp $);
+__KERNEL_RCSID(0, $NetBSD: mainbus.c,v 1.81 2012/02/23 21:38:53 skrll Exp $);
 
 #include locators.h
 #include power.h
@@ -118,38 +118,38 @@ static int mb_attached;
 /* from machdep.c */
 extern struct extent *hp700_io_extent;
 
-u_int8_t mbus_r1(void *, bus_space_handle_t, bus_size_t);
-u_int16_t mbus_r2(void *, bus_space_handle_t, bus_size_t);
-u_int32_t mbus_r4(void *, bus_space_handle_t, bus_size_t);
-u_int64_t mbus_r8(void *, bus_space_handle_t, bus_size_t);
-void mbus_w1(void *, bus_space_handle_t, bus_size_t, u_int8_t);
-void mbus_w2(void *, bus_space_handle_t, bus_size_t, u_int16_t);
-void mbus_w4(void *, bus_space_handle_t, bus_size_t, u_int32_t);
-void mbus_w8(void *, bus_space_handle_t, bus_size_t, u_int64_t);
-void mbus_rm_1(void *, 

CVS commit: src/sys/arch/hp700/gsc

2012-02-23 Thread Nick Hudson
Module Name:src
Committed By:   skrll
Date:   Thu Feb 23 21:41:23 UTC 2012

Modified Files:
src/sys/arch/hp700/gsc: harmony.c

Log Message:
Don't take sc_intr_lock in harmony_trigger_input it's already taken by
our caller.

Found by /usr/tests/include/t_paths.


To generate a diff of this commit:
cvs rdiff -u -r1.26 -r1.27 src/sys/arch/hp700/gsc/harmony.c

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

Modified files:

Index: src/sys/arch/hp700/gsc/harmony.c
diff -u src/sys/arch/hp700/gsc/harmony.c:1.26 src/sys/arch/hp700/gsc/harmony.c:1.27
--- src/sys/arch/hp700/gsc/harmony.c:1.26	Thu Feb  2 19:42:59 2012
+++ src/sys/arch/hp700/gsc/harmony.c	Thu Feb 23 21:41:23 2012
@@ -1,4 +1,4 @@
-/*	$NetBSD: harmony.c,v 1.26 2012/02/02 19:42:59 tls Exp $	*/
+/*	$NetBSD: harmony.c,v 1.27 2012/02/23 21:41:23 skrll Exp $	*/
 
 /*	$OpenBSD: harmony.c,v 1.23 2004/02/13 21:28:19 mickey Exp $	*/
 
@@ -1259,12 +1259,12 @@ int
 harmony_trigger_input(void *vsc, void *start, void *end, int blksize,
 void (*intr)(void *), void *intrarg, const audio_params_t *param)
 {
-	struct harmony_softc *sc;
-	struct harmony_channel *c;
+	struct harmony_softc *sc = vsc;
+	struct harmony_channel *c = sc-sc_capture;
 	struct harmony_dma *d;
 
-	sc = vsc;
-	c = sc-sc_capture;
+	KASSERT(mutex_owned(sc-sc_intr_lock));
+
 	for (d = sc-sc_dmas; d-d_kva != start; d = d-d_next)
 		continue;
 	if (d == NULL) {
@@ -1273,8 +1273,6 @@ harmony_trigger_input(void *vsc, void *s
 		return EINVAL;
 	}
 
-	mutex_spin_enter(sc-sc_intr_lock);
-
 	c-c_intr = intr;
 	c-c_intrarg = intrarg;
 	c-c_blksz = blksize;
@@ -1288,8 +1286,6 @@ harmony_trigger_input(void *vsc, void *s
 	harmony_start_cp(sc, 1);
 	harmony_intr_enable(sc);
 
-	mutex_spin_exit(sc-sc_intr_lock);
-
 	return 0;
 }
 



CVS commit: src/sys/arch/hp700/hp700

2012-02-05 Thread Nick Hudson
Module Name:src
Committed By:   skrll
Date:   Sun Feb  5 08:23:12 UTC 2012

Modified Files:
src/sys/arch/hp700/hp700: machdep.c

Log Message:
-Wextra -Wno-unused-parameter


To generate a diff of this commit:
cvs rdiff -u -r1.105 -r1.106 src/sys/arch/hp700/hp700/machdep.c

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

Modified files:

Index: src/sys/arch/hp700/hp700/machdep.c
diff -u src/sys/arch/hp700/hp700/machdep.c:1.105 src/sys/arch/hp700/hp700/machdep.c:1.106
--- src/sys/arch/hp700/hp700/machdep.c:1.105	Fri Jan 27 18:52:56 2012
+++ src/sys/arch/hp700/hp700/machdep.c	Sun Feb  5 08:23:11 2012
@@ -1,4 +1,4 @@
-/*	$NetBSD: machdep.c,v 1.105 2012/01/27 18:52:56 para Exp $	*/
+/*	$NetBSD: machdep.c,v 1.106 2012/02/05 08:23:11 skrll Exp $	*/
 
 /*-
  * Copyright (c) 2001, 2002 The NetBSD Foundation, Inc.
@@ -58,7 +58,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: machdep.c,v 1.105 2012/01/27 18:52:56 para Exp $);
+__KERNEL_RCSID(0, $NetBSD: machdep.c,v 1.106 2012/02/05 08:23:11 skrll Exp $);
 
 #include opt_cputype.h
 #include opt_ddb.h
@@ -259,11 +259,11 @@ struct fpreg lwp0_fpregs;
 
 /* Our exported CPU info */
 struct cpu_info cpus[HPPA_MAXCPUS] = {
-	{
 #ifdef MULTIPROCESSOR
+	{
 		.ci_curlwp = lwp0,
-#endif
 	},
+#endif
 };
 
 struct vm_map *phys_map = NULL;
@@ -324,21 +324,21 @@ const struct hppa_cpu_info cpu_types[] =
 	  hpcx,  0,
 	  0, 1.0,
 	  desidhash_x, itlb_x, dtlb_x, itlbna_x, dtlbna_x, tlbd_x,
-	  ibtlb_g, NULL, pbtlb_g }, /* XXXNH check */
+	  ibtlb_g, NULL, pbtlb_g, NULL }, /* XXXNH check */
 #endif
 #ifdef HP7000_CPU
 	{ PA7000, NULL, PCXS,
 	  hpcxs,  0,
 	  0, 1.1a,
 	  desidhash_s, itlb_s, dtlb_s, itlbna_s, dtlbna_s, tlbd_s,
-	  ibtlb_g, NULL, pbtlb_g },
+	  ibtlb_g, NULL, pbtlb_g, NULL },
 #endif
 #ifdef HP7100_CPU
 	{ PA7100, T-Bird, PCXT,
 	  hpcxt, 0,
 	  HPPA_FTRS_BTLBU, 1.1b,
 	  desidhash_t, itlb_t, dtlb_t, itlbna_t, dtlbna_t, tlbd_t,
-	  ibtlb_g, NULL, pbtlb_g },
+	  ibtlb_g, NULL, pbtlb_g, NULL },
 #endif
 #ifdef HP7100LC_CPU
 	{ PA7100LC, Hummingbird, PCXL,
@@ -352,7 +352,7 @@ const struct hppa_cpu_info cpu_types[] =
 	  hpcxtp, HPPA_CPU_PCXT2,
 	  HPPA_FTRS_BTLBU, 1.1d,
 	  desidhash_t, itlb_t, dtlb_t, itlbna_t, dtlbna_t, tlbd_t,
-	  ibtlb_g, NULL, pbtlb_g },
+	  ibtlb_g, NULL, pbtlb_g, NULL },
 #endif
 #ifdef HP7300LC_CPU
 	{ PA7300LC, Velociraptor, PCXL2,
@@ -366,49 +366,49 @@ const struct hppa_cpu_info cpu_types[] =
 	  hpcxu, HPPA_CPU_PCXU,
 	  HPPA_FTRS_W32B, 2.0,
 	  desidhash_u, itlb_u, dtlb_u, itlbna_u, dtlbna_u, tlbd_u,
- 	  ibtlb_u, NULL, pbtlb_u },
+ 	  ibtlb_u, NULL, pbtlb_u, NULL },
 #endif
 #ifdef HP8200_CPU
 	{ PA8200, Vulcan, PCXU+,
 	  hpcxup, HPPA_CPU_PCXUP,
 	  HPPA_FTRS_W32B, 2.0,
 	  desidhash_u, itlb_u, dtlb_u, itlbna_u, dtlbna_u, tlbd_u,
- 	  ibtlb_u, NULL, pbtlb_u },
+ 	  ibtlb_u, NULL, pbtlb_u, NULL },
 #endif
 #ifdef HP8500_CPU
 	{ PA8500, Barra'Cuda, PCXW,
 	  hpcxw, HPPA_CPU_PCXW,
 	  HPPA_FTRS_W32B, 2.0,
 	  desidhash_u, itlb_u, dtlb_u, itlbna_u, dtlbna_u, tlbd_u,
- 	  ibtlb_u, NULL, pbtlb_u },
+ 	  ibtlb_u, NULL, pbtlb_u, NULL },
 #endif
 #ifdef HP8600_CPU
 	{ PA8600, Landshark, PCXW+,
 	  hpcxwp, HPPA_CPU_PCXW2 /*XXX NH */,
 	  HPPA_FTRS_W32B, 2.0,
 	  desidhash_u, itlb_u, dtlb_u, itlbna_u, dtlbna_u, tlbd_u,
- 	  ibtlb_u, NULL, pbtlb_u },
+ 	  ibtlb_u, NULL, pbtlb_u, NULL },
 #endif
 #ifdef HP8700_CPU
 	{ PA8700, Piranha, PCXW2,
 	  hpcxw2, HPPA_CPU_PCXW2,
 	  HPPA_FTRS_W32B, 2.0,
 	  desidhash_u, itlb_u, dtlb_u, itlbna_u, dtlbna_u, tlbd_u,
- 	  ibtlb_u, NULL, pbtlb_u },
+ 	  ibtlb_u, NULL, pbtlb_u, NULL },
 #endif
 #ifdef HP8800_CPU
 	{ PA8800, Mako, Make,
 	  mako, HPPA_CPU_PCXW2,
 	  HPPA_FTRS_W32B, 2.0,
 	  desidhash_u, itlb_u, dtlb_u, itlbna_u, dtlbna_u, tlbd_u,
- 	  ibtlb_u, NULL, pbtlb_u },
+ 	  ibtlb_u, NULL, pbtlb_u, NULL },
 #endif
 #ifdef HP8900_CPU
 	{ PA8900, Shortfin, Shortfin,
 	  mako, HPPA_CPU_PCXW2,
 	  HPPA_FTRS_W32B, 2.0,
 	  desidhash_u, itlb_u, dtlb_u, itlbna_u, dtlbna_u, tlbd_u,
- 	  ibtlb_u, NULL, pbtlb_u },
+ 	  ibtlb_u, NULL, pbtlb_u, NULL },
 #endif
 	{  }
 };
@@ -2031,7 +2031,9 @@ struct blink_lcd_softc {
 	SLIST_HEAD(, blink_lcd) bls_head;
 	int bls_on;
 	struct callout bls_to;
-} blink_sc = { SLIST_HEAD_INITIALIZER(bls_head), 0 };
+} blink_sc = {
+	.bls_head = SLIST_HEAD_INITIALIZER(bls_head)
+};
 
 void
 blink_lcd_register(struct blink_lcd *l)



CVS commit: src/sys/arch/hp700/hp700

2012-02-05 Thread Nick Hudson
Module Name:src
Committed By:   skrll
Date:   Sun Feb  5 08:24:43 UTC 2012

Modified Files:
src/sys/arch/hp700/hp700: machdep.c

Log Message:
Use __arrarycount(cpu_types) to bound the table search and not NULL
check. The NULL check was wrong.


To generate a diff of this commit:
cvs rdiff -u -r1.106 -r1.107 src/sys/arch/hp700/hp700/machdep.c

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

Modified files:

Index: src/sys/arch/hp700/hp700/machdep.c
diff -u src/sys/arch/hp700/hp700/machdep.c:1.106 src/sys/arch/hp700/hp700/machdep.c:1.107
--- src/sys/arch/hp700/hp700/machdep.c:1.106	Sun Feb  5 08:23:11 2012
+++ src/sys/arch/hp700/hp700/machdep.c	Sun Feb  5 08:24:43 2012
@@ -1,4 +1,4 @@
-/*	$NetBSD: machdep.c,v 1.106 2012/02/05 08:23:11 skrll Exp $	*/
+/*	$NetBSD: machdep.c,v 1.107 2012/02/05 08:24:43 skrll Exp $	*/
 
 /*-
  * Copyright (c) 2001, 2002 The NetBSD Foundation, Inc.
@@ -58,7 +58,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: machdep.c,v 1.106 2012/02/05 08:23:11 skrll Exp $);
+__KERNEL_RCSID(0, $NetBSD: machdep.c,v 1.107 2012/02/05 08:24:43 skrll Exp $);
 
 #include opt_cputype.h
 #include opt_ddb.h
@@ -410,7 +410,6 @@ const struct hppa_cpu_info cpu_types[] =
 	  desidhash_u, itlb_u, dtlb_u, itlbna_u, dtlbna_u, tlbd_u,
  	  ibtlb_u, NULL, pbtlb_u, NULL },
 #endif
-	{  }
 };
 
 void
@@ -649,7 +648,7 @@ cpuid(void)
 	const struct hppa_cpu_info *p = NULL;
 	const char *model;
 	u_int cpu_version, cpu_features;
-	int error;
+	int error, i;
 
 	/* may the scientific guessing begin */
 	cpu_type = hpc_unknown;
@@ -786,21 +785,25 @@ cpuid(void)
 		pmap_hptsize = 0;
 	}
 
-	if (cpu_version)
-		for (p = cpu_types; p-hci_chip_name; p++) {
+	if (cpu_version) {
+		for (i = 0, p = cpu_types; i  __arraycount(cpu_types);
+		 i++, p++) {
 			if (p-hci_cpuversion == cpu_version)
 break;
 		}
-	else if (cpu_type != hpc_unknown)
-		for (p = cpu_types; p-hci_chip_name; p++) {
+	} else if (cpu_type != hpc_unknown) {
+		for (i = 0, p = cpu_types; i  __arraycount(cpu_types);
+		 i++, p++) {
 			if (p-hci_cputype == cpu_type)
 break;
 		}
-	else
-		for (p = cpu_types; p-hci_chip_name; p++) {
+	} else {
+		for (i = 0, p = cpu_types; i  __arraycount(cpu_types);
+		 i++, p++) {
 			if (p-hci_features == cpu_features)
 break;
 		}
+	}
 
 	hppa_cpu_info = p;
 



CVS commit: src/sys/arch/hp700/hp700

2012-02-05 Thread Nick Hudson
Module Name:src
Committed By:   skrll
Date:   Sun Feb  5 08:27:37 UTC 2012

Modified Files:
src/sys/arch/hp700/hp700: conf.c

Log Message:
-Wextra -Wno-unused-parameter


To generate a diff of this commit:
cvs rdiff -u -r1.9 -r1.10 src/sys/arch/hp700/hp700/conf.c

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

Modified files:

Index: src/sys/arch/hp700/hp700/conf.c
diff -u src/sys/arch/hp700/hp700/conf.c:1.9 src/sys/arch/hp700/hp700/conf.c:1.10
--- src/sys/arch/hp700/hp700/conf.c:1.9	Sun Dec 11 12:17:24 2005
+++ src/sys/arch/hp700/hp700/conf.c	Sun Feb  5 08:27:37 2012
@@ -1,4 +1,4 @@
-/*	$NetBSD: conf.c,v 1.9 2005/12/11 12:17:24 christos Exp $	*/
+/*	$NetBSD: conf.c,v 1.10 2012/02/05 08:27:37 skrll Exp $	*/
 
 /*	$OpenBSD: conf.c,v 1.15 2001/09/28 02:53:13 mickey Exp $	*/
 
@@ -34,7 +34,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: conf.c,v 1.9 2005/12/11 12:17:24 christos Exp $);
+__KERNEL_RCSID(0, $NetBSD: conf.c,v 1.10 2012/02/05 08:27:37 skrll Exp $);
 
 #include sys/param.h
 #include sys/conf.h
@@ -54,6 +54,6 @@ struct  consdev constab[] = {
 #if NCOM  0
 	cons_init(com),
 #endif
-	{ 0 }
+	{ .cn_probe = NULL }
 };
 



CVS commit: src/sys/arch/hp700

2012-02-05 Thread Nick Hudson
Module Name:src
Committed By:   skrll
Date:   Sun Feb  5 08:31:53 UTC 2012

Modified Files:
src/sys/arch/hp700/dev: cpudevs_data.h devlist2h.awk
src/sys/arch/hp700/hp700: autoconf.c

Log Message:
Use __arraycount on hppa_knownmods rather than end-of-table record.

OK riz@


To generate a diff of this commit:
cvs rdiff -u -r1.6 -r1.7 src/sys/arch/hp700/dev/cpudevs_data.h
cvs rdiff -u -r1.5 -r1.6 src/sys/arch/hp700/dev/devlist2h.awk
cvs rdiff -u -r1.43 -r1.44 src/sys/arch/hp700/hp700/autoconf.c

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

Modified files:

Index: src/sys/arch/hp700/dev/cpudevs_data.h
diff -u src/sys/arch/hp700/dev/cpudevs_data.h:1.6 src/sys/arch/hp700/dev/cpudevs_data.h:1.7
--- src/sys/arch/hp700/dev/cpudevs_data.h:1.6	Sat Feb  4 17:05:38 2012
+++ src/sys/arch/hp700/dev/cpudevs_data.h	Sun Feb  5 08:31:53 2012
@@ -1,4 +1,4 @@
-/*	$NetBSD: cpudevs_data.h,v 1.6 2012/02/04 17:05:38 skrll Exp $	*/
+/*	$NetBSD: cpudevs_data.h,v 1.7 2012/02/05 08:31:53 skrll Exp $	*/
 
 /*
  * THIS FILE AUTOMATICALLY GENERATED. DO NOT EDIT.
@@ -354,4 +354,3 @@
 {HPPA_TYPE_FABRIC,	HPPA_FABRIC_DNACA,	Halfdome DNA Central Agent },
 {HPPA_TYPE_FABRIC,	HPPA_FABRIC_TOGO,	Halfdome TOGO Fabric Crossbar },
 {HPPA_TYPE_FABRIC,	HPPA_FABRIC_SAKURA,	Halfdome Sakura Fabric Router },
-{ -1 }

Index: src/sys/arch/hp700/dev/devlist2h.awk
diff -u src/sys/arch/hp700/dev/devlist2h.awk:1.5 src/sys/arch/hp700/dev/devlist2h.awk:1.6
--- src/sys/arch/hp700/dev/devlist2h.awk:1.5	Thu Apr 30 07:01:26 2009
+++ src/sys/arch/hp700/dev/devlist2h.awk	Sun Feb  5 08:31:53 2012
@@ -1,4 +1,4 @@
-#	$NetBSD: devlist2h.awk,v 1.5 2009/04/30 07:01:26 skrll Exp $
+#	$NetBSD: devlist2h.awk,v 1.6 2012/02/05 08:31:53 skrll Exp $
 
 #	$OpenBSD: devlist2h.awk,v 1.6 2004/04/07 18:24:19 mickey Exp $
 
@@ -122,7 +122,6 @@ END	{
 		print(unterminated comment at the EOF\n);
 		exit(1);
 	}
-	printf({ -1 }\n)  cpud;
 	close(cpud)
 	close(cpuh)
 }

Index: src/sys/arch/hp700/hp700/autoconf.c
diff -u src/sys/arch/hp700/hp700/autoconf.c:1.43 src/sys/arch/hp700/hp700/autoconf.c:1.44
--- src/sys/arch/hp700/hp700/autoconf.c:1.43	Fri Jan 13 07:05:57 2012
+++ src/sys/arch/hp700/hp700/autoconf.c	Sun Feb  5 08:31:53 2012
@@ -1,4 +1,4 @@
-/*	$NetBSD: autoconf.c,v 1.43 2012/01/13 07:05:57 skrll Exp $	*/
+/*	$NetBSD: autoconf.c,v 1.44 2012/02/05 08:31:53 skrll Exp $	*/
 
 /*	$OpenBSD: autoconf.c,v 1.15 2001/06/25 00:43:10 mickey Exp $	*/
 
@@ -86,7 +86,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: autoconf.c,v 1.43 2012/01/13 07:05:57 skrll Exp $);
+__KERNEL_RCSID(0, $NetBSD: autoconf.c,v 1.44 2012/02/05 08:31:53 skrll Exp $);
 
 #include opt_kgdb.h
 #include opt_useleds.h
@@ -649,15 +649,21 @@ hppa_mod_info(int type, int sv)
 {
 	const struct hppa_mod_info *mi;
 	static char fakeid[32];
+	int i;
 
-	for (mi = hppa_knownmods; mi-mi_type = 0 
-	 (mi-mi_type != type || mi-mi_sv != sv); mi++);
+	for (i = 0, mi = hppa_knownmods; i  __arraycount(hppa_knownmods);
+	i++, mi++) {
+		if (mi-mi_type == type  mi-mi_sv == sv) {
+			break;
+		}
+	}
 
-	if (mi-mi_type  0) {
+	if (i == __arraycount(hppa_knownmods)) {
 		sprintf(fakeid, type %x, sv %x, type, sv);
 		return fakeid;
-	} else
-		return mi-mi_name;
+	}
+
+	return mi-mi_name;
 }
 
 /*



CVS commit: src/sys/arch/hp700/dev

2012-02-05 Thread Nick Hudson
Module Name:src
Committed By:   skrll
Date:   Sun Feb  5 21:46:37 UTC 2012

Modified Files:
src/sys/arch/hp700/dev: pdc.c

Log Message:
Delay some things to attach time - pdc_init is too early.

Minor tidyup while I'm here.

OK riz@


To generate a diff of this commit:
cvs rdiff -u -r1.40 -r1.41 src/sys/arch/hp700/dev/pdc.c

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

Modified files:

Index: src/sys/arch/hp700/dev/pdc.c
diff -u src/sys/arch/hp700/dev/pdc.c:1.40 src/sys/arch/hp700/dev/pdc.c:1.41
--- src/sys/arch/hp700/dev/pdc.c:1.40	Sat Oct  1 15:51:17 2011
+++ src/sys/arch/hp700/dev/pdc.c	Sun Feb  5 21:46:37 2012
@@ -1,4 +1,4 @@
-/*	$NetBSD: pdc.c,v 1.40 2011/10/01 15:51:17 chs Exp $	*/
+/*	$NetBSD: pdc.c,v 1.41 2012/02/05 21:46:37 skrll Exp $	*/
 
 /*	$OpenBSD: pdc.c,v 1.14 2001/04/29 21:05:43 mickey Exp $	*/
 
@@ -29,7 +29,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: pdc.c,v 1.40 2011/10/01 15:51:17 chs Exp $);
+__KERNEL_RCSID(0, $NetBSD: pdc.c,v 1.41 2012/02/05 21:46:37 skrll Exp $);
 
 #include sys/param.h
 #include sys/systm.h
@@ -63,8 +63,8 @@ enum pdc_type pdc_type;
 
 static struct pdc_result pdcret1 PDC_ALIGNMENT;
 static struct pdc_result pdcret2 PDC_ALIGNMENT;
+static char pdc_consbuf[IODC_MINIOSIZ] PDC_ALIGNMENT;
 
-char pdc_consbuf[IODC_MINIOSIZ] PDC_ALIGNMENT;
 iodcio_t pdc_cniodc, pdc_kbdiodc;
 pz_device_t *pz_kbd, *pz_cons;
 
@@ -105,10 +105,6 @@ static int pdcsettod(todr_chip_handle_t,
 void
 pdc_init(void)
 {
-	static struct todr_chip_handle todr = {
-		.todr_settime = pdcsettod,
-		.todr_gettime = pdcgettod,
-	};
 	static int kbd_iodc[IODC_MAXSIZE/sizeof(int)];
 	static int cn_iodc[IODC_MAXSIZE/sizeof(int)];
 	int err;
@@ -116,12 +112,11 @@ pdc_init(void)
 
 	pagezero_cookie = hp700_pagezero_map();
 
-	/*
-	 * locore has updated pdc with (pdcio_t)PAGE0-mem_pdc
-	 */
 	pz_kbd = PAGE0-mem_kbd;
 	pz_cons = PAGE0-mem_cons;
 
+	pdc = (pdcio_t)PAGE0-mem_pdc;
+
 	/* XXX should we reset the console/kbd here?
 	   well, /boot did that for us anyway */
 	if ((err = pdc_call((iodcio_t)pdc, 0, PDC_IODC, PDC_IODC_READ,
@@ -133,19 +128,13 @@ pdc_init(void)
 #endif
 	}
 
+	hp700_pagezero_unmap(pagezero_cookie);
+
 	pdc_cniodc = (iodcio_t)cn_iodc;
 	pdc_kbdiodc = (iodcio_t)kbd_iodc;
 
 	/* XXX make pdc current console */
 	cn_tab = constab[0];
-
-	cn_init_magic(pdc_cnm_state);
-	cn_set_magic(+);
-
-	hp700_pagezero_unmap(pagezero_cookie);
-
-	/* attach the TOD clock */
-	todr_attach(todr);
 }
 
 void
@@ -235,13 +224,22 @@ pdcmatch(device_t parent, cfdata_t cf, v
 void
 pdcattach(device_t parent, device_t self, void *aux)
 {
+	static struct todr_chip_handle todr = {
+		.todr_settime = pdcsettod,
+		.todr_gettime = pdcgettod,
+	};
 	struct pdc_softc *sc = device_private(self);
 
 	sc-sc_dv = self;
 	pdc_attached = 1;
 
-	if (!pdc)
-		pdc_init();
+	KASSERT(pdc != NULL);
+
+	cn_init_magic(pdc_cnm_state);
+	cn_set_magic(+);
+
+	/* attach the TOD clock */
+	todr_attach(todr);
 
 	aprint_normal(\n);
 



CVS commit: src/sys/arch/hp700/conf

2012-02-04 Thread Nick Hudson
Module Name:src
Committed By:   skrll
Date:   Sat Feb  4 16:29:14 UTC 2012

Modified Files:
src/sys/arch/hp700/conf: GENERIC

Log Message:
Enable sti at uturn.

Move/tidy up the STI graphics section while I'm here.

OK riz@


To generate a diff of this commit:
cvs rdiff -u -r1.110 -r1.111 src/sys/arch/hp700/conf/GENERIC

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

Modified files:

Index: src/sys/arch/hp700/conf/GENERIC
diff -u src/sys/arch/hp700/conf/GENERIC:1.110 src/sys/arch/hp700/conf/GENERIC:1.111
--- src/sys/arch/hp700/conf/GENERIC:1.110	Fri Dec 30 08:33:49 2011
+++ src/sys/arch/hp700/conf/GENERIC	Sat Feb  4 16:29:14 2012
@@ -1,4 +1,4 @@
-# $NetBSD: GENERIC,v 1.110 2011/12/30 08:33:49 skrll Exp $
+# $NetBSD: GENERIC,v 1.111 2012/02/04 16:29:14 skrll Exp $
 #
 # GENERIC machine description file
 #
@@ -23,7 +23,7 @@ include 	arch/hp700/conf/std.hp700
 options 	INCLUDE_CONFIG_FILE	# embed config file in kernel binary
 options 	SYSCTL_INCLUDE_DESCR	# Include sysctl descriptions in kernel
 
-#ident 		GENERIC-$Revision: 1.110 $
+#ident 		GENERIC-$Revision: 1.111 $
 
 maxusers	32		# estimated number of users
 
@@ -230,12 +230,6 @@ pdc0	at mainbus0		# PDC/IODC wrapper for
 power0	at mainbus0		# power/fail manager
 lcd0	at mainbus0		# LCD
 
-# STI graphics
-sti*	at mainbus0		# [H]CRX-{8,24,48}[Z] and Visualize graphics
-sti*	at phantomas?		# [H]CRX-{8,24,48}[Z] and Visualize graphics
-#sti*	at uturn?
-sti*	at pci?			# EG-PCI, FX*
-
 # Basic Bus Support
 lasi*	at mainbus0		# LASI host adapter ( LSI PN??? )
 asp*	at mainbus0		# this one comes w/ Viper and leds
@@ -262,7 +256,6 @@ uturn0	at mainbus0		# U2/UTurn Runway IO
 uturn1	at mainbus0
 lasi*	at uturn?		# LASI on [CJ]*
 dino*	at uturn?		# PCI bus bridge
-#sti*	at uturn?		#
 #wax*	at uturn?		# Wax on C*
 
 #gecko*	at uturn?		# GeckoBOA
@@ -297,6 +290,12 @@ eisa*	at mongoose?
 
 # Console Devices
 
+# STI graphics
+sti*	at mainbus0		# [H]CRX-{8,24,48}[Z] and Visualize graphics
+sti*	at phantomas?		# [H]CRX-{8,24,48}[Z] and Visualize graphics
+sti*	at uturn?
+sti*	at pci?			# EG-PCI, FX*
+
 # Human Interface Loop
 hil*		at gsc? irq 1	# Human Interface Loop, kbd and mouse
 hilkbd*		at hil?		# keyboard, knob and buttons



CVS commit: src/sys/arch/hp700/gsc

2012-02-04 Thread Nick Hudson
Module Name:src
Committed By:   skrll
Date:   Sat Feb  4 16:31:19 UTC 2012

Modified Files:
src/sys/arch/hp700/gsc: if_ie_gsc.c

Log Message:
G/C some unused code.


To generate a diff of this commit:
cvs rdiff -u -r1.25 -r1.26 src/sys/arch/hp700/gsc/if_ie_gsc.c

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

Modified files:

Index: src/sys/arch/hp700/gsc/if_ie_gsc.c
diff -u src/sys/arch/hp700/gsc/if_ie_gsc.c:1.25 src/sys/arch/hp700/gsc/if_ie_gsc.c:1.26
--- src/sys/arch/hp700/gsc/if_ie_gsc.c:1.25	Fri Jul  1 18:33:09 2011
+++ src/sys/arch/hp700/gsc/if_ie_gsc.c	Sat Feb  4 16:31:19 2012
@@ -1,4 +1,4 @@
-/*	$NetBSD: if_ie_gsc.c,v 1.25 2011/07/01 18:33:09 dyoung Exp $	*/
+/*	$NetBSD: if_ie_gsc.c,v 1.26 2012/02/04 16:31:19 skrll Exp $	*/
 
 /*	$OpenBSD: if_ie_gsc.c,v 1.6 2001/01/12 22:57:04 mickey Exp $	*/
 
@@ -38,7 +38,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: if_ie_gsc.c,v 1.25 2011/07/01 18:33:09 dyoung Exp $);
+__KERNEL_RCSID(0, $NetBSD: if_ie_gsc.c,v 1.26 2012/02/04 16:31:19 skrll Exp $);
 
 #include sys/param.h
 #include sys/systm.h
@@ -70,15 +70,6 @@ __KERNEL_RCSID(0, $NetBSD: if_ie_gsc.c,
 
 #define	I82596_DEBUG	I82586_DEBUG
 
-/*
- * XXX fredette - I'm defining these on a hunch.  When things
- * appear to be working, remove these.
- */
-#if 1
-#define fdcache_small fdcache
-#define pdcache_small pdcache
-#endif
-
 #ifdef __for_reference_only
 struct ie_gsc_regs {
 	uint32_t	ie_reset;



CVS commit: src/sys/arch/hp700/dev

2012-02-04 Thread Nick Hudson
Module Name:src
Committed By:   skrll
Date:   Sat Feb  4 17:05:38 UTC 2012

Modified Files:
src/sys/arch/hp700/dev: cpudevs.h cpudevs_data.h

Log Message:
Regen from previous.

OK riz@


To generate a diff of this commit:
cvs rdiff -u -r1.5 -r1.6 src/sys/arch/hp700/dev/cpudevs.h \
src/sys/arch/hp700/dev/cpudevs_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/arch/hp700/dev/cpudevs.h
diff -u src/sys/arch/hp700/dev/cpudevs.h:1.5 src/sys/arch/hp700/dev/cpudevs.h:1.6
--- src/sys/arch/hp700/dev/cpudevs.h:1.5	Thu Apr 30 07:01:26 2009
+++ src/sys/arch/hp700/dev/cpudevs.h	Sat Feb  4 17:05:38 2012
@@ -1,9 +1,9 @@
-/*	$NetBSD: cpudevs.h,v 1.5 2009/04/30 07:01:26 skrll Exp $	*/
+/*	$NetBSD: cpudevs.h,v 1.6 2012/02/04 17:05:38 skrll Exp $	*/
 
 /*
  * THIS FILE AUTOMATICALLY GENERATED. DO NOT EDIT.
  * generated from:
- *	NetBSD: cpudevs,v 1.4 2005/12/11 12:17:24 christos Exp 
+ *	NetBSD: cpudevs,v 1.5 2009/04/30 07:01:26 skrll Exp 
  */
 
 #define	HPPA_TYPE_NPROC	0x00
@@ -223,6 +223,7 @@
 #define	HPPA_BUS_ROPES	15
 #define	HPPA_BUS_MERCED	16
 #define	HPPA_CPU_SOFTEMU	0x01
+#define	HPPA_CPU_PCXT	0x09
 #define	HPPA_CPU_PCXT2	0x0b
 #define	HPPA_CPU_PCXL	0x0d
 #define	HPPA_CPU_PCXU	0x0e
Index: src/sys/arch/hp700/dev/cpudevs_data.h
diff -u src/sys/arch/hp700/dev/cpudevs_data.h:1.5 src/sys/arch/hp700/dev/cpudevs_data.h:1.6
--- src/sys/arch/hp700/dev/cpudevs_data.h:1.5	Thu Apr 30 07:01:26 2009
+++ src/sys/arch/hp700/dev/cpudevs_data.h	Sat Feb  4 17:05:38 2012
@@ -1,9 +1,9 @@
-/*	$NetBSD: cpudevs_data.h,v 1.5 2009/04/30 07:01:26 skrll Exp $	*/
+/*	$NetBSD: cpudevs_data.h,v 1.6 2012/02/04 17:05:38 skrll Exp $	*/
 
 /*
  * THIS FILE AUTOMATICALLY GENERATED. DO NOT EDIT.
  * generated from:
- *	NetBSD: cpudevs,v 1.4 2005/12/11 12:17:24 christos Exp 
+ *	NetBSD: cpudevs,v 1.5 2009/04/30 07:01:26 skrll Exp 
  */
 
 {HPPA_TYPE_BOARD,	HPPA_BOARD_HP840,	840/930 (Indigo) },
@@ -203,6 +203,7 @@
 {HPPA_TYPE_BUS,	HPPA_BUS_ROPES,	Ropes },
 {HPPA_TYPE_BUS,	HPPA_BUS_MERCED,	Merced },
 {HPPA_TYPE_CPU,	HPPA_CPU_SOFTEMU,	Software Emulation },
+{HPPA_TYPE_CPU,	HPPA_CPU_PCXT,	PCXT (Thunderbird) },
 {HPPA_TYPE_CPU,	HPPA_CPU_PCXT2,	PCXT' (Thunderbird') },
 {HPPA_TYPE_CPU,	HPPA_CPU_PCXL,	PCXL (Hummingbird) },
 {HPPA_TYPE_CPU,	HPPA_CPU_PCXU,	PCXU (Onyx) },



CVS commit: src/sys/arch/hp700/dev

2012-01-27 Thread Nick Hudson
Module Name:src
Committed By:   skrll
Date:   Fri Jan 27 21:05:39 UTC 2012

Modified Files:
src/sys/arch/hp700/dev: uturn.c

Log Message:
Adapt to extent(9) changes.


To generate a diff of this commit:
cvs rdiff -u -r1.18 -r1.19 src/sys/arch/hp700/dev/uturn.c

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

Modified files:

Index: src/sys/arch/hp700/dev/uturn.c
diff -u src/sys/arch/hp700/dev/uturn.c:1.18 src/sys/arch/hp700/dev/uturn.c:1.19
--- src/sys/arch/hp700/dev/uturn.c:1.18	Thu Jan 12 23:10:27 2012
+++ src/sys/arch/hp700/dev/uturn.c	Fri Jan 27 21:05:38 2012
@@ -1,4 +1,4 @@
-/*	$NetBSD: uturn.c,v 1.18 2012/01/12 23:10:27 skrll Exp $	*/
+/*	$NetBSD: uturn.c,v 1.19 2012/01/27 21:05:38 skrll Exp $	*/
 
 /*	$OpenBSD: uturn.c,v 1.6 2007/12/29 01:26:14 kettenis Exp $	*/
 
@@ -357,7 +357,7 @@ uturnattach(device_t parent, device_t se
 	snprintf(sc-sc_mapname, sizeof(sc-sc_mapname), %s_map,
 	device_xname(sc-sc_dv));
 	sc-sc_map = extent_create(sc-sc_mapname, 0, (1  iova_bits),
-	M_DEVBUF, 0, 0, EX_NOWAIT);
+	0, 0, EX_NOWAIT);
 
 	sc-sc_dmatag = uturn_dmat;
 	sc-sc_dmatag._cookie = sc;



CVS commit: src/sys/arch/hp700/include

2012-01-26 Thread Nick Hudson
Module Name:src
Committed By:   skrll
Date:   Thu Jan 26 08:11:07 UTC 2012

Modified Files:
src/sys/arch/hp700/include: pdc.h

Log Message:
Typo in comment


To generate a diff of this commit:
cvs rdiff -u -r1.19 -r1.20 src/sys/arch/hp700/include/pdc.h

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

Modified files:

Index: src/sys/arch/hp700/include/pdc.h
diff -u src/sys/arch/hp700/include/pdc.h:1.19 src/sys/arch/hp700/include/pdc.h:1.20
--- src/sys/arch/hp700/include/pdc.h:1.19	Thu Jun 30 20:09:30 2011
+++ src/sys/arch/hp700/include/pdc.h	Thu Jan 26 08:11:06 2012
@@ -1,4 +1,4 @@
-/*	$NetBSD: pdc.h,v 1.19 2011/06/30 20:09:30 wiz Exp $	*/
+/*	$NetBSD: pdc.h,v 1.20 2012/01/26 08:11:06 skrll Exp $	*/
 
 /*	$OpenBSD: pdc.h,v 1.35 2007/07/15 20:03:48 kettenis Exp $	*/
 
@@ -126,7 +126,7 @@
 #define	PDC_MODEL_ENSPEC	4	/* enable product-specific instrs */
 #define	PDC_MODEL_DISPEC	5	/* disable product-specific instrs */
 #define	PDC_MODEL_CPUID		6	/* return CPU versions */
-#define	PDC_MODEL_CAPABILITIES	7	/* return capabilites */
+#define	PDC_MODEL_CAPABILITIES	7	/* return capabilities */
 #define	PDC_MODEL_GETBOOTSTOPTS	8	/* return boot test options */
 #define	PDC_MODEL_SETBOOTSTOPTS	9	/* set boot test options */
 



CVS commit: src/sys/arch/hp700/include

2012-01-19 Thread Nick Hudson
Module Name:src
Committed By:   skrll
Date:   Fri Jan 20 06:50:01 UTC 2012

Modified Files:
src/sys/arch/hp700/include: cpu.h

Log Message:
Add a comment.


To generate a diff of this commit:
cvs rdiff -u -r1.66 -r1.67 src/sys/arch/hp700/include/cpu.h

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

Modified files:

Index: src/sys/arch/hp700/include/cpu.h
diff -u src/sys/arch/hp700/include/cpu.h:1.66 src/sys/arch/hp700/include/cpu.h:1.67
--- src/sys/arch/hp700/include/cpu.h:1.66	Mon Feb  7 12:19:35 2011
+++ src/sys/arch/hp700/include/cpu.h	Fri Jan 20 06:50:00 2012
@@ -1,4 +1,4 @@
-/*	$NetBSD: cpu.h,v 1.66 2011/02/07 12:19:35 skrll Exp $	*/
+/*	$NetBSD: cpu.h,v 1.67 2012/01/20 06:50:00 skrll Exp $	*/
 
 /*	$OpenBSD: cpu.h,v 1.55 2008/07/23 17:39:35 kettenis Exp $	*/
 
@@ -253,6 +253,7 @@ int	clock_intr(void *);
  * entry within the cpu_info struct.
  */
 struct cpu_info {
+	/* Keep this first to simplify the trap handlers */
 	register_t	ci_trapsave[16];/* the phys part of frame */
 
 	struct cpu_data ci_data;	/* MI per-cpu data */



CVS commit: src/sys/arch/hp700/include

2012-01-19 Thread Nick Hudson
Module Name:src
Committed By:   skrll
Date:   Fri Jan 20 06:51:19 UTC 2012

Modified Files:
src/sys/arch/hp700/include: cpu.h

Log Message:
Whitespace


To generate a diff of this commit:
cvs rdiff -u -r1.67 -r1.68 src/sys/arch/hp700/include/cpu.h

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

Modified files:

Index: src/sys/arch/hp700/include/cpu.h
diff -u src/sys/arch/hp700/include/cpu.h:1.67 src/sys/arch/hp700/include/cpu.h:1.68
--- src/sys/arch/hp700/include/cpu.h:1.67	Fri Jan 20 06:50:00 2012
+++ src/sys/arch/hp700/include/cpu.h	Fri Jan 20 06:51:19 2012
@@ -1,4 +1,4 @@
-/*	$NetBSD: cpu.h,v 1.67 2012/01/20 06:50:00 skrll Exp $	*/
+/*	$NetBSD: cpu.h,v 1.68 2012/01/20 06:51:19 skrll Exp $	*/
 
 /*	$OpenBSD: cpu.h,v 1.55 2008/07/23 17:39:35 kettenis Exp $	*/
 
@@ -274,7 +274,7 @@ struct cpu_info {
 	u_long		ci_itmr;
 
 #if defined(MULTIPROCESSOR)
-	struct	lwp	*ci_curlwp;	/* CPU owner */
+	struct lwp	*ci_curlwp;	/* CPU owner */
 	paddr_t		ci_stack;	/* stack for spin up */
 	volatile int	ci_flags;	/* CPU status flags */
 #define	CPUF_PRIMARY	0x0001		/* ... is monarch/primary */



CVS commit: src/sys/arch/hp700/dev

2012-01-12 Thread Nick Hudson
Module Name:src
Committed By:   skrll
Date:   Thu Jan 12 23:06:45 UTC 2012

Modified Files:
src/sys/arch/hp700/dev: uturn.c

Log Message:
Support virtual mode as PCX-U/U+ (and probably other) CPU based machines
required it. Only PCX-W seemed to work with real mode.

Gratuitous copying of code from astro. Deadlines!


To generate a diff of this commit:
cvs rdiff -u -r1.16 -r1.17 src/sys/arch/hp700/dev/uturn.c

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

Modified files:

Index: src/sys/arch/hp700/dev/uturn.c
diff -u src/sys/arch/hp700/dev/uturn.c:1.16 src/sys/arch/hp700/dev/uturn.c:1.17
--- src/sys/arch/hp700/dev/uturn.c:1.16	Fri Jul  1 18:33:09 2011
+++ src/sys/arch/hp700/dev/uturn.c	Thu Jan 12 23:06:45 2012
@@ -1,7 +1,52 @@
-/*	$NetBSD: uturn.c,v 1.16 2011/07/01 18:33:09 dyoung Exp $	*/
+/*	$NetBSD: uturn.c,v 1.17 2012/01/12 23:06:45 skrll Exp $	*/
 
 /*	$OpenBSD: uturn.c,v 1.6 2007/12/29 01:26:14 kettenis Exp $	*/
 
+/*-
+ * Copyright (c) 2012, 2004 The NetBSD Foundation, Inc.
+ * All rights reserved.
+ *
+ * This code is derived from software contributed to The NetBSD Foundation
+ * by Nick Hudson.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *notice, this list of conditions and the following disclaimer in the
+ *documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
+ * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
+ * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
+ * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+ * POSSIBILITY OF SUCH DAMAGE.
+ */
+
+/*
+ * Copyright (c) 2007 Mark Kettenis
+ *
+ * Permission to use, copy, modify, and distribute this software for any
+ * purpose with or without fee is hereby granted, provided that the above
+ * copyright notice and this permission notice appear in all copies.
+ *
+ * THE SOFTWARE IS PROVIDED AS IS AND THE AUTHOR DISCLAIMS ALL WARRANTIES
+ * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
+ * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
+ * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+ * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
+ * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
+ * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+ */
+
 /*
  * Copyright (c) 2004 Michael Shalayeff
  * All rights reserved.
@@ -28,7 +73,13 @@
  * THE POSSIBILITY OF SUCH DAMAGE.
  */
 
-/* TODO IOA programming */
+/*
+ * References:
+ * 1. Hardware Cache Coherent Input/Output. Hewlett-Packard Journal, February
+ *1996.
+ * 2. PA-RISC 1.1 Architecture and Instruction Set Reference Manual,
+ *Hewlett-Packard, February 1994, Third Edition
+ */
 
 #include sys/param.h
 #include sys/systm.h
@@ -37,6 +88,7 @@
 #include sys/malloc.h
 #include sys/extent.h
 #include sys/mbuf.h
+#include sys/tree.h
 
 #include uvm/uvm.h
 
@@ -46,6 +98,7 @@
 
 #include hp700/dev/cpudevs.h
 
+#define UTURNDEBUG
 #ifdef UTURNDEBUG
 
 #define	DPRINTF(s)	do {	\
@@ -101,15 +154,61 @@ struct uturn_regs {
 	uint32_t	io_io_high;		/* Offset 15 */
 };
 
+
+/* Uturn supports 256 TLB entries */
+#define	UTURN_CHAINID_SHIFT	8
+#define	UTURN_CHAINID_MASK	0xff
+#define	UTURN_TLB_ENTRIES	(1  UTURN_CHAINID_SHIFT)
+
+#define	UTURN_IOVP_SIZE		PAGE_SIZE
+#define	UTURN_IOVP_SHIFT	PAGE_SHIFT
+#define	UTURN_IOVP_MASK		PAGE_MASK
+
+#define	UTURN_IOVA(iovp, off)	((iovp) | (off))
+#define	UTURN_IOVP(iova)	((iova)  UTURN_IOVP_MASK)
+#define	UTURN_IOVA_INDEX(iova)	((iova)  UTURN_IOVP_SHIFT)
+
 struct uturn_softc {
 	device_t sc_dv;
 
 	bus_dma_tag_t sc_dmat;
 	struct uturn_regs volatile *sc_regs;
+	uint64_t *sc_pdir;
+	uint32_t sc_chainid_shift;
+
+	char sc_mapname[20];
+	struct extent *sc_map;
 
 	struct hppa_bus_dma_tag sc_dmatag;
 };
 
+/*
+ * per-map IOVA page table
+ */
+struct uturn_page_entry {
+	SPLAY_ENTRY(uturn_page_entry) upe_node;
+	paddr_t	upe_pa;
+	vaddr_t	upe_va;
+	bus_addr_t upe_iova;
+};
+
+struct uturn_page_map {
+	

CVS commit: src/sys/arch/hp700/dev

2012-01-12 Thread Nick Hudson
Module Name:src
Committed By:   skrll
Date:   Thu Jan 12 23:10:28 UTC 2012

Modified Files:
src/sys/arch/hp700/dev: uturn.c

Log Message:
Copyright correction


To generate a diff of this commit:
cvs rdiff -u -r1.17 -r1.18 src/sys/arch/hp700/dev/uturn.c

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

Modified files:

Index: src/sys/arch/hp700/dev/uturn.c
diff -u src/sys/arch/hp700/dev/uturn.c:1.17 src/sys/arch/hp700/dev/uturn.c:1.18
--- src/sys/arch/hp700/dev/uturn.c:1.17	Thu Jan 12 23:06:45 2012
+++ src/sys/arch/hp700/dev/uturn.c	Thu Jan 12 23:10:27 2012
@@ -1,9 +1,9 @@
-/*	$NetBSD: uturn.c,v 1.17 2012/01/12 23:06:45 skrll Exp $	*/
+/*	$NetBSD: uturn.c,v 1.18 2012/01/12 23:10:27 skrll Exp $	*/
 
 /*	$OpenBSD: uturn.c,v 1.6 2007/12/29 01:26:14 kettenis Exp $	*/
 
 /*-
- * Copyright (c) 2012, 2004 The NetBSD Foundation, Inc.
+ * Copyright (c) 2012 The NetBSD Foundation, Inc.
  * All rights reserved.
  *
  * This code is derived from software contributed to The NetBSD Foundation



CVS commit: src/sys/arch/hp700/hp700

2012-01-12 Thread Nick Hudson
Module Name:src
Committed By:   skrll
Date:   Fri Jan 13 07:05:57 UTC 2012

Modified Files:
src/sys/arch/hp700/hp700: autoconf.c

Log Message:
Allow uturn(4) to provide the boot device.


To generate a diff of this commit:
cvs rdiff -u -r1.42 -r1.43 src/sys/arch/hp700/hp700/autoconf.c

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

Modified files:

Index: src/sys/arch/hp700/hp700/autoconf.c
diff -u src/sys/arch/hp700/hp700/autoconf.c:1.42 src/sys/arch/hp700/hp700/autoconf.c:1.43
--- src/sys/arch/hp700/hp700/autoconf.c:1.42	Fri Jan 13 07:01:04 2012
+++ src/sys/arch/hp700/hp700/autoconf.c	Fri Jan 13 07:05:57 2012
@@ -1,4 +1,4 @@
-/*	$NetBSD: autoconf.c,v 1.42 2012/01/13 07:01:04 skrll Exp $	*/
+/*	$NetBSD: autoconf.c,v 1.43 2012/01/13 07:05:57 skrll Exp $	*/
 
 /*	$OpenBSD: autoconf.c,v 1.15 2001/06/25 00:43:10 mickey Exp $	*/
 
@@ -86,7 +86,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: autoconf.c,v 1.42 2012/01/13 07:01:04 skrll Exp $);
+__KERNEL_RCSID(0, $NetBSD: autoconf.c,v 1.43 2012/01/13 07:05:57 skrll Exp $);
 
 #include opt_kgdb.h
 #include opt_useleds.h
@@ -352,7 +352,8 @@ device_register(device_t dev, void *aux)
 	 * controller's struct dev in boot_device. The SCSI device is located
 	 * later, see below.
 	 */
-	if (device_is_a(pdev, gsc) || device_is_a(pdev, phantomas)) {
+	if (device_is_a(pdev, gsc) || device_is_a(pdev, phantomas) ||
+	device_is_a(pdev, uturn)) {
 		struct confargs *ca = aux;
 
 		if ((hppa_hpa_t)PAGE0-mem_boot.pz_hpa == ca-ca_hpa) {



CVS commit: src/sys/arch/hp700/hp700

2012-01-09 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Mon Jan  9 15:15:40 UTC 2012

Modified Files:
src/sys/arch/hp700/hp700: mainbus.c

Log Message:
Avoid a warning in kernels w/o LCD support


To generate a diff of this commit:
cvs rdiff -u -r1.79 -r1.80 src/sys/arch/hp700/hp700/mainbus.c

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

Modified files:

Index: src/sys/arch/hp700/hp700/mainbus.c
diff -u src/sys/arch/hp700/hp700/mainbus.c:1.79 src/sys/arch/hp700/hp700/mainbus.c:1.80
--- src/sys/arch/hp700/hp700/mainbus.c:1.79	Wed Feb 23 08:27:17 2011
+++ src/sys/arch/hp700/hp700/mainbus.c	Mon Jan  9 15:15:40 2012
@@ -1,4 +1,4 @@
-/*	$NetBSD: mainbus.c,v 1.79 2011/02/23 08:27:17 skrll Exp $	*/
+/*	$NetBSD: mainbus.c,v 1.80 2012/01/09 15:15:40 martin Exp $	*/
 
 /*-
  * Copyright (c) 2001, 2002 The NetBSD Foundation, Inc.
@@ -58,7 +58,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: mainbus.c,v 1.79 2011/02/23 08:27:17 skrll Exp $);
+__KERNEL_RCSID(0, $NetBSD: mainbus.c,v 1.80 2012/01/09 15:15:40 martin Exp $);
 
 #include locators.h
 #include power.h
@@ -1359,7 +1359,9 @@ mbattach(device_t parent, device_t self,
 	struct mainbus_softc *sc = device_private(self);
 	struct confargs nca;
 	bus_space_handle_t ioh;
+#if NLCD  0
 	int err;
+#endif
 
 	sc-sc_dv = self;
 	mb_attached = 1;



CVS commit: src/sys/arch/hp700/stand/boot

2012-01-09 Thread Nick Hudson
Module Name:src
Committed By:   skrll
Date:   Mon Jan  9 16:03:27 UTC 2012

Modified Files:
src/sys/arch/hp700/stand/boot: Makefile
Removed Files:
src/sys/arch/hp700/stand/boot: boot.8

Log Message:
Use NOMAN and delete a file.


To generate a diff of this commit:
cvs rdiff -u -r1.7 -r1.8 src/sys/arch/hp700/stand/boot/Makefile
cvs rdiff -u -r1.1 -r0 src/sys/arch/hp700/stand/boot/boot.8

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

Modified files:

Index: src/sys/arch/hp700/stand/boot/Makefile
diff -u src/sys/arch/hp700/stand/boot/Makefile:1.7 src/sys/arch/hp700/stand/boot/Makefile:1.8
--- src/sys/arch/hp700/stand/boot/Makefile:1.7	Sat May 10 19:11:59 2008
+++ src/sys/arch/hp700/stand/boot/Makefile	Mon Jan  9 16:03:26 2012
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile,v 1.7 2008/05/10 19:11:59 skrll Exp $
+#	$NetBSD: Makefile,v 1.8 2012/01/09 16:03:26 skrll Exp $
 
 #	$OpenBSD: Makefile,v 1.10 2000/05/31 19:56:51 mickey Exp $
 
@@ -6,6 +6,8 @@ PROG=		boot
 PROGSOURCE=	srt0.S boot.c bootinfo.c ct.c conf.c lf.c lif.c tgets.c
 NEWVERSWHAT=	LIF/FFS/LFS Boot
 
+NOMAN=		# defined
+
 CLEANFILES+=	boot.gdb boot.map
 
 # IODC can handle only 2GB, and need not to use 64bit integer



CVS commit: src/sys/arch/hp700/hp700

2012-01-09 Thread Nick Hudson
Module Name:src
Committed By:   skrll
Date:   Mon Jan  9 19:40:55 UTC 2012

Modified Files:
src/sys/arch/hp700/hp700: machdep.c

Log Message:
KNF


To generate a diff of this commit:
cvs rdiff -u -r1.103 -r1.104 src/sys/arch/hp700/hp700/machdep.c

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

Modified files:

Index: src/sys/arch/hp700/hp700/machdep.c
diff -u src/sys/arch/hp700/hp700/machdep.c:1.103 src/sys/arch/hp700/hp700/machdep.c:1.104
--- src/sys/arch/hp700/hp700/machdep.c:1.103	Mon Jan  2 16:13:12 2012
+++ src/sys/arch/hp700/hp700/machdep.c	Mon Jan  9 19:40:54 2012
@@ -1,4 +1,4 @@
-/*	$NetBSD: machdep.c,v 1.103 2012/01/02 16:13:12 skrll Exp $	*/
+/*	$NetBSD: machdep.c,v 1.104 2012/01/09 19:40:54 skrll Exp $	*/
 
 /*-
  * Copyright (c) 2001, 2002 The NetBSD Foundation, Inc.
@@ -58,7 +58,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: machdep.c,v 1.103 2012/01/02 16:13:12 skrll Exp $);
+__KERNEL_RCSID(0, $NetBSD: machdep.c,v 1.104 2012/01/09 19:40:54 skrll Exp $);
 
 #include opt_cputype.h
 #include opt_ddb.h
@@ -450,11 +450,13 @@ hppa_init(paddr_t start, void *bi)
 	if (bi != NULL)
 		memcpy(bootinfo, bi, sizeof(struct bootinfo));
 
-	pdc_init();	/* init PDC iface, so we can call em easy */
+	/* init PDC iface, so we can call em easy */
+	pdc_init();
 
 	cpu_hzticks = (PAGE0-mem_10msec * 100) / hz;
 
-	delay_init();	/* calculate CPU clock ratio */
+	/* calculate CPU clock ratio */
+	delay_init();
 
 	/* fetch the monarch/default cpu hpa */
 	



CVS commit: src/sys/arch/hp700/conf

2012-01-07 Thread Nick Hudson
Module Name:src
Committed By:   skrll
Date:   Sat Jan  7 16:11:20 UTC 2012

Modified Files:
src/sys/arch/hp700/conf: majors.hp700

Log Message:
Allocate a major number for wd and sysmon_power

Part of PR/45783


To generate a diff of this commit:
cvs rdiff -u -r1.26 -r1.27 src/sys/arch/hp700/conf/majors.hp700

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

Modified files:

Index: src/sys/arch/hp700/conf/majors.hp700
diff -u src/sys/arch/hp700/conf/majors.hp700:1.26 src/sys/arch/hp700/conf/majors.hp700:1.27
--- src/sys/arch/hp700/conf/majors.hp700:1.26	Thu Jun 30 20:09:30 2011
+++ src/sys/arch/hp700/conf/majors.hp700	Sat Jan  7 16:11:19 2012
@@ -1,4 +1,4 @@
-#	$NetBSD: majors.hp700,v 1.26 2011/06/30 20:09:30 wiz Exp $
+#	$NetBSD: majors.hp700,v 1.27 2012/01/07 16:11:19 skrll Exp $
 #
 # Device majors for hp700
 #
@@ -44,6 +44,8 @@ device-major	clockctl	char 39			clockctl
 device-major	audio		char 40			audio
 device-major	ses		char 41			ses
 device-major	pci		char 42			pci
+device-major	wd		char 43  block 11	wd
+device-major	sysmon  char 44 sysmon_power
 
 device-major	nsmb		char 98			nsmb
 



CVS commit: src/sys/arch/hp700/hp700

2012-01-06 Thread Nick Hudson
Module Name:src
Committed By:   skrll
Date:   Fri Jan  6 22:14:05 UTC 2012

Modified Files:
src/sys/arch/hp700/hp700: autoconf.c

Log Message:
s/aprint_verbose/aprint_debug/


To generate a diff of this commit:
cvs rdiff -u -r1.40 -r1.41 src/sys/arch/hp700/hp700/autoconf.c

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

Modified files:

Index: src/sys/arch/hp700/hp700/autoconf.c
diff -u src/sys/arch/hp700/hp700/autoconf.c:1.40 src/sys/arch/hp700/hp700/autoconf.c:1.41
--- src/sys/arch/hp700/hp700/autoconf.c:1.40	Mon Dec 12 19:03:09 2011
+++ src/sys/arch/hp700/hp700/autoconf.c	Fri Jan  6 22:14:04 2012
@@ -1,4 +1,4 @@
-/*	$NetBSD: autoconf.c,v 1.40 2011/12/12 19:03:09 mrg Exp $	*/
+/*	$NetBSD: autoconf.c,v 1.41 2012/01/06 22:14:04 skrll Exp $	*/
 
 /*	$OpenBSD: autoconf.c,v 1.15 2001/06/25 00:43:10 mickey Exp $	*/
 
@@ -86,7 +86,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: autoconf.c,v 1.40 2011/12/12 19:03:09 mrg Exp $);
+__KERNEL_RCSID(0, $NetBSD: autoconf.c,v 1.41 2012/01/06 22:14:04 skrll Exp $);
 
 #include opt_kgdb.h
 #include opt_useleds.h
@@ -477,7 +477,7 @@ hppa_walkbus(struct confargs *ca)
 	if (ca-ca_hpabase == 0)
 		return;
 	
-	aprint_verbose( Walking bus at HPA 0x%lx\n, ca-ca_hpabase);
+	aprint_debug( Walking bus at HPA 0x%lx\n, ca-ca_hpabase);
 
 	for (i = 0; i  ca-ca_nmodules; i++) {
 		int error;
@@ -500,12 +500,12 @@ hppa_walkbus(struct confargs *ca)
 		if (error  0)
 			continue;
 
-		aprint_verbose( HPA 0x%lx[0x%x], nhm.hm_hpa,
+		aprint_debug( HPA 0x%lx[0x%x], nhm.hm_hpa,
 		nhm.hm_hpasz);
 
 		TAILQ_FOREACH(hm, hppa_pdcmodule_list, hm_link) {
 			if (nhm.hm_hpa == hm-hm_hpa) {
-aprint_verbose( found by firmware\n);
+aprint_debug( found by firmware\n);
 break;
 			}
 		}
@@ -516,7 +516,7 @@ hppa_walkbus(struct confargs *ca)
 
 		/* Expect PDC to report devices of the following types */
 		if (nhm.hm_type.iodc_type == HPPA_TYPE_FIO) {
-			aprint_verbose( expected to be missing\n);
+			aprint_debug( expected to be missing\n);
 			continue;
 		}
 
@@ -568,7 +568,7 @@ pdc_scanbus(device_t self, struct confar
 			} else
 nca.ca_naddrs = hm-hm_naddrs;
 
-			aprint_verbose( ADDRS[%d/%d]: , nca.ca_naddrs,
+			aprint_debug( ADDRS[%d/%d]: , nca.ca_naddrs,
 			hm-hm_modindex);
 
 			KASSERT(hm-hm_modindex != -1);
@@ -583,31 +583,31 @@ pdc_scanbus(device_t self, struct confar
 nca.ca_addrs[ia].size =
 pdc_find_addr.size  PGSHIFT;
 
-aprint_verbose( 0x%lx[0x%x],
+aprint_debug( 0x%lx[0x%x],
 nca.ca_addrs[ia].addr,
 nca.ca_addrs[ia].size);
 			}
-			aprint_verbose(\n);
+			aprint_debug(\n);
 		}
 
-		aprint_verbose( HPA 0x%lx[0x%x]\n, nca.ca_hpa,
+		aprint_debug( HPA 0x%lx[0x%x]\n, nca.ca_hpa,
 		nca.ca_hpasz);
 
 		snprintb(buf, sizeof(buf), PZF_BITS, nca.ca_dp.dp_flags);
-		aprint_verbose( probing: flags %s , buf);
+		aprint_debug( probing: flags %s , buf);
 		if (nca.ca_dp.dp_mod =0) {
 			int n;
 
-			aprint_verbose( path );
+			aprint_debug( path );
 			for (n = 0; n  6; n++) {
 if (nca.ca_dp.dp_bc[n] = 0)
-	aprint_verbose(%d/,
+	aprint_debug(%d/,
 	nca.ca_dp.dp_bc[n]);
 			}
-			aprint_verbose(%d, nca.ca_dp.dp_mod);
+			aprint_debug(%d, nca.ca_dp.dp_mod);
 		}
 
-		aprint_verbose( type %x sv %x\n,
+		aprint_debug( type %x sv %x\n,
 		nca.ca_type.iodc_type, nca.ca_type.iodc_sv_model);
 
 		nca.ca_irq = HP700CF_IRQ_UNDEF;
@@ -707,12 +707,12 @@ hppa_pdcmodule_create(struct hppa_pdcmod
 	if (hm-hm_dp.dp_mod = 0) {
 		int n;
 
-		aprint_verbose( %s device at path , who);
+		aprint_debug( %s device at path , who);
 		for (n = 0; n  6; n++) {
 			if (hm-hm_dp.dp_bc[n] = 0)
-aprint_verbose(%d/, hm-hm_dp.dp_bc[n]);
+aprint_debug(%d/, hm-hm_dp.dp_bc[n]);
 		}
-		aprint_verbose(%d addrs %d\n, hm-hm_dp.dp_mod,
+		aprint_debug(%d addrs %d\n, hm-hm_dp.dp_mod,
 		hm-hm_naddrs);
 	}
 



CVS commit: src/sys/arch/hp700/hp700

2012-01-02 Thread Nick Hudson
Module Name:src
Committed By:   skrll
Date:   Tue Jan  3 06:11:21 UTC 2012

Modified Files:
src/sys/arch/hp700/hp700: locore.S

Log Message:
Tidy up the M[FT]CPU_* hv-specific instructions some more.

Same code before and after change.


To generate a diff of this commit:
cvs rdiff -u -r1.57 -r1.58 src/sys/arch/hp700/hp700/locore.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/hp700/hp700/locore.S
diff -u src/sys/arch/hp700/hp700/locore.S:1.57 src/sys/arch/hp700/hp700/locore.S:1.58
--- src/sys/arch/hp700/hp700/locore.S:1.57	Mon Jan  2 16:13:12 2012
+++ src/sys/arch/hp700/hp700/locore.S	Tue Jan  3 06:11:21 2012
@@ -1,4 +1,4 @@
-/*	$NetBSD: locore.S,v 1.57 2012/01/02 16:13:12 skrll Exp $	*/
+/*	$NetBSD: locore.S,v 1.58 2012/01/03 06:11:21 skrll Exp $	*/
 /*	$OpenBSD: locore.S,v 1.158 2008/07/28 19:08:46 miod Exp $	*/
 
 /*
@@ -118,30 +118,18 @@
 	_DEBUG_DUMPN(reg1, reg2, reg3, 27)	! \
 	_DEBUG_DUMPN(reg1, reg2, reg3, 31)
 
-#ifdef XXXNH
 /*
  * hv-specific instructions
  */
-#define	DR_PAGE0	diag (0x70  5)/* XXXNH Different */
-#define	DR_PAGE1	diag (0x72  5)/* XXXNH Different */
-#define	MTCPU_T(x,t)	diag ((t)  21) | ((x)  16) | (0xc0  5)	/* XXXNH Different */
-#define	MFCPU_T(r,x)	diag ((r)  21) | (0xa0  5) | (x)
+#define	DR_PAGE0	diag (0x70  5)
+#define	DR_PAGE1	diag (0x72  5)
+
+#define	MTCPU_T(x,t)	diag ((t)  21) | ((x)  16) | (0xb0  5)
+#define	MFCPU_T(r,x)	diag ((r)  21) | ((x)  16) | (0xd0  5)
 #define	MTCPU_C(x,t)	diag ((t)  21) | ((x)  16) | (0x12  5)
 #define	MFCPU_C(r,x)	diag ((r)  21) | ((x)  16) | (0x30  5)
-#define	MFCPU_U(r,x)	.word	0x140008a0 | ((r)  21) | ((x))
-#define	MTCPU_U(x,r)	.word	0x14001840 | ((r)  21) | ((x)  16)
-
-#else
-
-#define	DR_PAGE0	.word	0x14001200
-#define	DR_PAGE1	.word	0x14001240
-#define	MTCPU_T(x,t)	.word	0x14001600 | ((t)  21) | ((x)  16)
-#define	MFCPU_T(r,x)	.word	0x14001a00 | ((r)  21) | ((x)  16)
-#define	MTCPU_C(x,t)	.word	0x14000240 | ((t)  21) | ((x)  16)
-#define	MFCPU_C(r,x)	.word	0x14000600 | ((r)  21) | ((x)  16)
-#define	MFCPU_U(r,x)	.word	0x140008a0 | ((r)  21) | ((x))
-#define	MTCPU_U(x,r)	.word	0x14001840 | ((r)  21) | ((x)  16)
-#endif
+#define	MFCPU_U(r,x)	diag ((r)  21) | ((x))   | (0x45  5)
+#define	MTCPU_U(x,r)	diag ((r)  21) | ((x)  16) | (0xc2  5)
 
 	.import	$global$, data
 	.import pdc, data



CVS commit: src/sys/arch/hp700/conf

2011-12-30 Thread Nick Hudson
Module Name:src
Committed By:   skrll
Date:   Fri Dec 30 08:33:49 UTC 2011

Modified Files:
src/sys/arch/hp700/conf: GENERIC

Log Message:
Add PA8700.


To generate a diff of this commit:
cvs rdiff -u -r1.109 -r1.110 src/sys/arch/hp700/conf/GENERIC

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

Modified files:

Index: src/sys/arch/hp700/conf/GENERIC
diff -u src/sys/arch/hp700/conf/GENERIC:1.109 src/sys/arch/hp700/conf/GENERIC:1.110
--- src/sys/arch/hp700/conf/GENERIC:1.109	Sun Dec 18 05:49:27 2011
+++ src/sys/arch/hp700/conf/GENERIC	Fri Dec 30 08:33:49 2011
@@ -1,4 +1,4 @@
-# $NetBSD: GENERIC,v 1.109 2011/12/18 05:49:27 dholland Exp $
+# $NetBSD: GENERIC,v 1.110 2011/12/30 08:33:49 skrll Exp $
 #
 # GENERIC machine description file
 #
@@ -23,7 +23,7 @@ include 	arch/hp700/conf/std.hp700
 options 	INCLUDE_CONFIG_FILE	# embed config file in kernel binary
 options 	SYSCTL_INCLUDE_DESCR	# Include sysctl descriptions in kernel
 
-#ident 		GENERIC-$Revision: 1.109 $
+#ident 		GENERIC-$Revision: 1.110 $
 
 maxusers	32		# estimated number of users
 
@@ -37,6 +37,7 @@ options 	HP8000_CPU		# PCX-U  (in 32bit 
 options 	HP8200_CPU		# PCX-V/U+ (in 32bit mode)
 options 	HP8500_CPU		# PCX-W  (in 32bit mode)
 options 	HP8600_CPU		# PCX-W+ (in 32bit mode)
+options 	HP8700_CPU		# PCX-W2 (in 32bit mode)
 
 # CPU-related options.
 options 	FPEMUL		# floating point emulation XXX DO NOT REMOVE



CVS commit: src/sys/arch/hp700/hp700

2011-12-19 Thread Nick Hudson
Module Name:src
Committed By:   skrll
Date:   Mon Dec 19 10:57:00 UTC 2011

Modified Files:
src/sys/arch/hp700/hp700: locore.S

Log Message:
Whitespace.


To generate a diff of this commit:
cvs rdiff -u -r1.55 -r1.56 src/sys/arch/hp700/hp700/locore.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/hp700/hp700/locore.S
diff -u src/sys/arch/hp700/hp700/locore.S:1.55 src/sys/arch/hp700/hp700/locore.S:1.56
--- src/sys/arch/hp700/hp700/locore.S:1.55	Mon Feb  7 12:19:35 2011
+++ src/sys/arch/hp700/hp700/locore.S	Mon Dec 19 10:56:59 2011
@@ -1,4 +1,4 @@
-/*	$NetBSD: locore.S,v 1.55 2011/02/07 12:19:35 skrll Exp $	*/
+/*	$NetBSD: locore.S,v 1.56 2011/12/19 10:56:59 skrll Exp $	*/
 /*	$OpenBSD: locore.S,v 1.158 2008/07/28 19:08:46 miod Exp $	*/
 
 /*
@@ -394,7 +394,7 @@ LEAF_ENTRY_NOPROFILE(kernel_setup)
 	/*
 	 * set up the dp pointer so that we can do quick references off of it
 	 */
-	ldil	L%$global$,%dp
+	ldil	L%$global$, %dp
 	ldo	R%$global$(%dp), %dp
 
 	/*



CVS commit: src/sys/arch/hp700/dev

2011-10-01 Thread Chuck Silvers
Module Name:src
Committed By:   chs
Date:   Sat Oct  1 15:51:17 UTC 2011

Modified Files:
src/sys/arch/hp700/dev: pdc.c

Log Message:
PDC_CHASSIS_INFO needs a third parameter, the size of the LCD structure.


To generate a diff of this commit:
cvs rdiff -u -r1.39 -r1.40 src/sys/arch/hp700/dev/pdc.c

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

Modified files:

Index: src/sys/arch/hp700/dev/pdc.c
diff -u src/sys/arch/hp700/dev/pdc.c:1.39 src/sys/arch/hp700/dev/pdc.c:1.40
--- src/sys/arch/hp700/dev/pdc.c:1.39	Sun Apr 24 16:26:55 2011
+++ src/sys/arch/hp700/dev/pdc.c	Sat Oct  1 15:51:17 2011
@@ -1,4 +1,4 @@
-/*	$NetBSD: pdc.c,v 1.39 2011/04/24 16:26:55 rmind Exp $	*/
+/*	$NetBSD: pdc.c,v 1.40 2011/10/01 15:51:17 chs Exp $	*/
 
 /*	$OpenBSD: pdc.c,v 1.14 2001/04/29 21:05:43 mickey Exp $	*/
 
@@ -29,7 +29,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: pdc.c,v 1.39 2011/04/24 16:26:55 rmind Exp $);
+__KERNEL_RCSID(0, $NetBSD: pdc.c,v 1.40 2011/10/01 15:51:17 chs Exp $);
 
 #include sys/param.h
 #include sys/systm.h
@@ -569,7 +569,7 @@ pdcproc_chassis_info(struct pdc_chassis_
 	int err;
 
 	err = pdc_call((iodcio_t)pdc, 0, PDC_CHASSIS, PDC_CHASSIS_INFO,
-	pdcret1, pdcret2);
+	pdcret1, pdcret2 , sizeof(*pcl));
 	if (err  0)
 		return err;
 



CVS commit: src/sys/arch/hp700/dev

2011-10-01 Thread Chuck Silvers
Module Name:src
Committed By:   chs
Date:   Sat Oct  1 15:51:36 UTC 2011

Modified Files:
src/sys/arch/hp700/dev: elroyreg.h

Log Message:
elroy regs don't need to be packed, makes this work with gcc 4.5.


To generate a diff of this commit:
cvs rdiff -u -r1.2 -r1.3 src/sys/arch/hp700/dev/elroyreg.h

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

Modified files:

Index: src/sys/arch/hp700/dev/elroyreg.h
diff -u src/sys/arch/hp700/dev/elroyreg.h:1.2 src/sys/arch/hp700/dev/elroyreg.h:1.3
--- src/sys/arch/hp700/dev/elroyreg.h:1.2	Thu Apr 30 07:01:26 2009
+++ src/sys/arch/hp700/dev/elroyreg.h	Sat Oct  1 15:51:36 2011
@@ -1,4 +1,4 @@
-/*	$NetBSD: elroyreg.h,v 1.2 2009/04/30 07:01:26 skrll Exp $	*/
+/*	$NetBSD: elroyreg.h,v 1.3 2011/10/01 15:51:36 chs Exp $	*/
 
 /*	$OpenBSD: elroyreg.h,v 1.1 2007/05/21 22:43:38 kettenis Exp $	*/
 
@@ -126,7 +126,7 @@ struct elroy_regs {
 	uint32_t	pad850;
 	uint64_t	res14[123];	/* 0x858 */
 	/*0x1000 */
-} __packed;
+};
 
 /* APIC registers */
 #define	APIC_VERSION	0x01



CVS commit: src/sys/arch/hp700/include

2011-07-17 Thread David Young
Module Name:src
Committed By:   dyoung
Date:   Sun Jul 17 23:32:21 UTC 2011

Modified Files:
src/sys/arch/hp700/include: Makefile types.h
Removed Files:
src/sys/arch/hp700/include: bus.h

Log Message:
Switch to new-style sys/bus.h. hp700 releases are unbuildable for
reasons not related to my changes here, so I'm not 100% that a release
build will run to completion with these changes in place.


To generate a diff of this commit:
cvs rdiff -u -r1.11 -r1.12 src/sys/arch/hp700/include/Makefile \
src/sys/arch/hp700/include/types.h
cvs rdiff -u -r1.16 -r0 src/sys/arch/hp700/include/bus.h

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

Modified files:

Index: src/sys/arch/hp700/include/Makefile
diff -u src/sys/arch/hp700/include/Makefile:1.11 src/sys/arch/hp700/include/Makefile:1.12
--- src/sys/arch/hp700/include/Makefile:1.11	Sun Jul 17 20:54:40 2011
+++ src/sys/arch/hp700/include/Makefile	Sun Jul 17 23:32:21 2011
@@ -1,9 +1,9 @@
-#	$NetBSD: Makefile,v 1.11 2011/07/17 20:54:40 joerg Exp $
+#	$NetBSD: Makefile,v 1.12 2011/07/17 23:32:21 dyoung Exp $
 
 INCSDIR= /usr/include/hp700
 
 INCS=	ansi.h aout_machdep.h asm.h autoconf.h \
-	bswap.h bus.h byte_swap.h \
+	bswap.h byte_swap.h \
 	cdefs.h cpu.h cpufunc.h \
 	disklabel.h \
 	eisa_machdep.h elf_machdep.h endian.h endian_machdep.h exec.h \
Index: src/sys/arch/hp700/include/types.h
diff -u src/sys/arch/hp700/include/types.h:1.11 src/sys/arch/hp700/include/types.h:1.12
--- src/sys/arch/hp700/include/types.h:1.11	Sun Jun 12 03:35:41 2011
+++ src/sys/arch/hp700/include/types.h	Sun Jul 17 23:32:21 2011
@@ -1,11 +1,11 @@
-/*	$NetBSD: types.h,v 1.11 2011/06/12 03:35:41 rmind Exp $	*/
+/*	$NetBSD: types.h,v 1.12 2011/07/17 23:32:21 dyoung Exp $	*/
 
 #ifndef	_HP700_TYPES_H_
 #define	_HP700_TYPES_H_
 
 #include hppa/types.h
 
-#define	__HAVE_DEVICE_REGISTER
+#define	__HAVE_NEW_STYLE_BUS_H
 
 #define	__HAVE_MM_MD_DIRECT_MAPPED_PHYS
 #define	__HAVE_MM_MD_KERNACC



CVS commit: src/sys/arch/hp700

2011-07-01 Thread David Young
Module Name:src
Committed By:   dyoung
Date:   Fri Jul  1 18:33:10 UTC 2011

Modified Files:
src/sys/arch/hp700/dev: asp.c com_dino.c com_ssio.c gecko.c lasi.c
lcd.c lpt_ssio.c mongoose.c siop_sgc.c ssio.c sti_sgc.c uturn.c
src/sys/arch/hp700/gsc: com_gsc.c fdc_gsc.c gsckbc.c harmony.c
if_ie_gsc.c if_iee_gsc.c lpt_gsc.c oosiop_gsc.c osiop_gsc.c
siop_gsc.c

Log Message:
#include sys/bus.h instead of machine/bus.h.


To generate a diff of this commit:
cvs rdiff -u -r1.18 -r1.19 src/sys/arch/hp700/dev/asp.c
cvs rdiff -u -r1.8 -r1.9 src/sys/arch/hp700/dev/com_dino.c
cvs rdiff -u -r1.2 -r1.3 src/sys/arch/hp700/dev/com_ssio.c
cvs rdiff -u -r1.3 -r1.4 src/sys/arch/hp700/dev/gecko.c
cvs rdiff -u -r1.20 -r1.21 src/sys/arch/hp700/dev/lasi.c \
src/sys/arch/hp700/dev/sti_sgc.c
cvs rdiff -u -r1.4 -r1.5 src/sys/arch/hp700/dev/lcd.c
cvs rdiff -u -r1.1 -r1.2 src/sys/arch/hp700/dev/lpt_ssio.c \
src/sys/arch/hp700/dev/ssio.c
cvs rdiff -u -r1.21 -r1.22 src/sys/arch/hp700/dev/mongoose.c
cvs rdiff -u -r1.7 -r1.8 src/sys/arch/hp700/dev/siop_sgc.c
cvs rdiff -u -r1.15 -r1.16 src/sys/arch/hp700/dev/uturn.c
cvs rdiff -u -r1.16 -r1.17 src/sys/arch/hp700/gsc/com_gsc.c
cvs rdiff -u -r1.9 -r1.10 src/sys/arch/hp700/gsc/fdc_gsc.c
cvs rdiff -u -r1.7 -r1.8 src/sys/arch/hp700/gsc/gsckbc.c
cvs rdiff -u -r1.22 -r1.23 src/sys/arch/hp700/gsc/harmony.c
cvs rdiff -u -r1.24 -r1.25 src/sys/arch/hp700/gsc/if_ie_gsc.c
cvs rdiff -u -r1.19 -r1.20 src/sys/arch/hp700/gsc/if_iee_gsc.c \
src/sys/arch/hp700/gsc/osiop_gsc.c
cvs rdiff -u -r1.13 -r1.14 src/sys/arch/hp700/gsc/lpt_gsc.c \
src/sys/arch/hp700/gsc/siop_gsc.c
cvs rdiff -u -r1.12 -r1.13 src/sys/arch/hp700/gsc/oosiop_gsc.c

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

Modified files:

Index: src/sys/arch/hp700/dev/asp.c
diff -u src/sys/arch/hp700/dev/asp.c:1.18 src/sys/arch/hp700/dev/asp.c:1.19
--- src/sys/arch/hp700/dev/asp.c:1.18	Tue Feb  1 18:33:24 2011
+++ src/sys/arch/hp700/dev/asp.c	Fri Jul  1 18:33:09 2011
@@ -1,4 +1,4 @@
-/*	$NetBSD: asp.c,v 1.18 2011/02/01 18:33:24 skrll Exp $	*/
+/*	$NetBSD: asp.c,v 1.19 2011/07/01 18:33:09 dyoung Exp $	*/
 
 /*	$OpenBSD: asp.c,v 1.5 2000/02/09 05:04:22 mickey Exp $	*/
 
@@ -37,14 +37,14 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: asp.c,v 1.18 2011/02/01 18:33:24 skrll Exp $);
+__KERNEL_RCSID(0, $NetBSD: asp.c,v 1.19 2011/07/01 18:33:09 dyoung Exp $);
 
 #include sys/param.h
 #include sys/systm.h
 #include sys/device.h
 #include sys/reboot.h
 
-#include machine/bus.h
+#include sys/bus.h
 #include machine/iomod.h
 #include machine/autoconf.h
 #include machine/cpufunc.h

Index: src/sys/arch/hp700/dev/com_dino.c
diff -u src/sys/arch/hp700/dev/com_dino.c:1.8 src/sys/arch/hp700/dev/com_dino.c:1.9
--- src/sys/arch/hp700/dev/com_dino.c:1.8	Mon May 18 05:13:26 2009
+++ src/sys/arch/hp700/dev/com_dino.c	Fri Jul  1 18:33:09 2011
@@ -31,7 +31,7 @@
 #include sys/device.h
 #include sys/tty.h
 
-#include machine/bus.h
+#include sys/bus.h
 #include machine/intr.h
 #include machine/iomod.h
 #include machine/autoconf.h

Index: src/sys/arch/hp700/dev/com_ssio.c
diff -u src/sys/arch/hp700/dev/com_ssio.c:1.2 src/sys/arch/hp700/dev/com_ssio.c:1.3
--- src/sys/arch/hp700/dev/com_ssio.c:1.2	Fri Mar  5 18:41:29 2010
+++ src/sys/arch/hp700/dev/com_ssio.c	Fri Jul  1 18:33:09 2011
@@ -1,4 +1,4 @@
-/*	$NetBSD: com_ssio.c,v 1.2 2010/03/05 18:41:29 skrll Exp $	*/
+/*	$NetBSD: com_ssio.c,v 1.3 2011/07/01 18:33:09 dyoung Exp $	*/
 
 /*	$OpenBSD: com_ssio.c,v 1.2 2007/06/24 16:28:39 kettenis Exp $	*/
 
@@ -23,7 +23,7 @@
 #include sys/device.h
 #include sys/tty.h
 
-#include machine/bus.h
+#include sys/bus.h
 #include machine/iomod.h
 
 #include dev/ic/comreg.h

Index: src/sys/arch/hp700/dev/gecko.c
diff -u src/sys/arch/hp700/dev/gecko.c:1.3 src/sys/arch/hp700/dev/gecko.c:1.4
--- src/sys/arch/hp700/dev/gecko.c:1.3	Thu Jan 13 21:15:13 2011
+++ src/sys/arch/hp700/dev/gecko.c	Fri Jul  1 18:33:09 2011
@@ -22,7 +22,7 @@
 #include sys/systm.h
 
 #include machine/autoconf.h
-#include machine/bus.h
+#include sys/bus.h
 #include machine/cpu.h
 #include machine/iomod.h
 #include machine/pdc.h

Index: src/sys/arch/hp700/dev/lasi.c
diff -u src/sys/arch/hp700/dev/lasi.c:1.20 src/sys/arch/hp700/dev/lasi.c:1.21
--- src/sys/arch/hp700/dev/lasi.c:1.20	Tue Feb  1 18:33:24 2011
+++ src/sys/arch/hp700/dev/lasi.c	Fri Jul  1 18:33:09 2011
@@ -1,4 +1,4 @@
-/*	$NetBSD: lasi.c,v 1.20 2011/02/01 18:33:24 skrll Exp $	*/
+/*	$NetBSD: lasi.c,v 1.21 2011/07/01 18:33:09 dyoung Exp $	*/
 
 /*	$OpenBSD: lasi.c,v 1.4 2001/06/09 03:57:19 mickey Exp $	*/
 
@@ -29,7 +29,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: lasi.c,v 1.20 2011/02/01 18:33:24 skrll Exp $);
+__KERNEL_RCSID(0, $NetBSD: lasi.c,v 1.21 2011/07/01 18:33:09 dyoung Exp $);
 
 #undef LASIDEBUG
 
@@ -38,7 +38,7 @@
 #include sys/device.h
 #include sys/reboot.h
 
-#include machine/bus.h

CVS commit: src/sys/arch/hp700/dev

2011-03-19 Thread Nick Hudson
Module Name:src
Committed By:   skrll
Date:   Sat Mar 19 06:48:10 UTC 2011

Modified Files:
src/sys/arch/hp700/dev: dino.c

Log Message:
Whitespace.


To generate a diff of this commit:
cvs rdiff -u -r1.29 -r1.30 src/sys/arch/hp700/dev/dino.c

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

Modified files:

Index: src/sys/arch/hp700/dev/dino.c
diff -u src/sys/arch/hp700/dev/dino.c:1.29 src/sys/arch/hp700/dev/dino.c:1.30
--- src/sys/arch/hp700/dev/dino.c:1.29	Tue Feb  1 18:33:24 2011
+++ src/sys/arch/hp700/dev/dino.c	Sat Mar 19 06:48:09 2011
@@ -1,4 +1,4 @@
-/*	$NetBSD: dino.c,v 1.29 2011/02/01 18:33:24 skrll Exp $ */
+/*	$NetBSD: dino.c,v 1.30 2011/03/19 06:48:09 skrll Exp $ */
 
 /*	$OpenBSD: dino.c,v 1.5 2004/02/13 20:39:31 mickey Exp $	*/
 
@@ -29,7 +29,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: dino.c,v 1.29 2011/02/01 18:33:24 skrll Exp $);
+__KERNEL_RCSID(0, $NetBSD: dino.c,v 1.30 2011/03/19 06:48:09 skrll Exp $);
 
 /* #include cardbus.h */
 
@@ -1668,7 +1668,6 @@
 	sc-sc_ih = hp700_intr_establish(IPL_NONE, NULL, sc-sc_ir,
 	ir_cpu, ca-ca_irq);
 
-
 	/* TODO establish the bus error interrupt */
 
 	ver = ca-ca_type.iodc_revision;



CVS commit: src/sys/arch/hp700/hp700

2011-02-23 Thread Nick Hudson
Module Name:src
Committed By:   skrll
Date:   Wed Feb 23 08:27:18 UTC 2011

Modified Files:
src/sys/arch/hp700/hp700: mainbus.c

Log Message:
Fix call to pmap_update.


To generate a diff of this commit:
cvs rdiff -u -r1.78 -r1.79 src/sys/arch/hp700/hp700/mainbus.c

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

Modified files:

Index: src/sys/arch/hp700/hp700/mainbus.c
diff -u src/sys/arch/hp700/hp700/mainbus.c:1.78 src/sys/arch/hp700/hp700/mainbus.c:1.79
--- src/sys/arch/hp700/hp700/mainbus.c:1.78	Thu Feb  3 20:37:09 2011
+++ src/sys/arch/hp700/hp700/mainbus.c	Wed Feb 23 08:27:17 2011
@@ -1,4 +1,4 @@
-/*	$NetBSD: mainbus.c,v 1.78 2011/02/03 20:37:09 skrll Exp $	*/
+/*	$NetBSD: mainbus.c,v 1.79 2011/02/23 08:27:17 skrll Exp $	*/
 
 /*-
  * Copyright (c) 2001, 2002 The NetBSD Foundation, Inc.
@@ -58,7 +58,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: mainbus.c,v 1.78 2011/02/03 20:37:09 skrll Exp $);
+__KERNEL_RCSID(0, $NetBSD: mainbus.c,v 1.79 2011/02/23 08:27:17 skrll Exp $);
 
 #include locators.h
 #include power.h
@@ -1182,7 +1182,7 @@
 			size -= PAGE_SIZE;
 		}
 	}
-	pmap_update();
+	pmap_update(pmap_kernel());
 	return (0);
 }
 



CVS commit: src/sys/arch/hp700

2011-02-15 Thread Izumi Tsutsui
Module Name:src
Committed By:   tsutsui
Date:   Tue Feb 15 10:32:57 UTC 2011

Modified Files:
src/sys/arch/hp700/conf: GENERIC files.hp700
Added Files:
src/sys/arch/hp700/gsc: hil_gsc.c
src/sys/arch/hp700/include: hil_machdep.h

Log Message:
Add MI HIL (keyboard/mouse) support from OpenBSD.
Tested on 735/125 and ok'ed by skrll@.


To generate a diff of this commit:
cvs rdiff -u -r1.105 -r1.106 src/sys/arch/hp700/conf/GENERIC
cvs rdiff -u -r1.24 -r1.25 src/sys/arch/hp700/conf/files.hp700
cvs rdiff -u -r0 -r1.1 src/sys/arch/hp700/gsc/hil_gsc.c
cvs rdiff -u -r0 -r1.1 src/sys/arch/hp700/include/hil_machdep.h

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

Modified files:

Index: src/sys/arch/hp700/conf/GENERIC
diff -u src/sys/arch/hp700/conf/GENERIC:1.105 src/sys/arch/hp700/conf/GENERIC:1.106
--- src/sys/arch/hp700/conf/GENERIC:1.105	Tue Nov 23 11:13:59 2010
+++ src/sys/arch/hp700/conf/GENERIC	Tue Feb 15 10:32:56 2011
@@ -1,4 +1,4 @@
-# $NetBSD: GENERIC,v 1.105 2010/11/23 11:13:59 hannken Exp $
+# $NetBSD: GENERIC,v 1.106 2011/02/15 10:32:56 tsutsui Exp $
 #
 # GENERIC machine description file
 #
@@ -23,7 +23,7 @@
 options 	INCLUDE_CONFIG_FILE	# embed config file in kernel binary
 options 	SYSCTL_INCLUDE_DESCR	# Include sysctl descriptions in kernel
 
-#ident 		GENERIC-$Revision: 1.105 $
+#ident 		GENERIC-$Revision: 1.106 $
 
 maxusers	32		# estimated number of users
 
@@ -296,9 +296,10 @@
 # Console Devices
 
 # Human Interface Loop
-#hil*		at gsc?
-#hkbd*		at hil? code 0	# keyboard
-#hms*		at hil? code 1	# mice  trackballs
+hil*		at gsc? irq 1	# Human Interface Loop, kbd and mouse
+hilkbd*		at hil?		# keyboard, knob and buttons
+hilms*		at hil?		# mouse and tablets
+hilid*		at hil?		# ID module
 
 # wscons
 gsckbc*		at gsc?			# pc keyboard controller
@@ -306,8 +307,8 @@
 pms*		at gsckbc?		# PS/2 mouse for wsmouse
 wskbd*		at pckbd? console ?
 wsmouse*	at pms? mux 0
-#wskbd*		at hkbd? console ?
-#wsmouse*	at hms? mux 0
+wskbd*		at hilkbd? console ?
+wsmouse*	at hilms? mux 0
 wsdisplay*	at sti?
 
 # Serial Devices

Index: src/sys/arch/hp700/conf/files.hp700
diff -u src/sys/arch/hp700/conf/files.hp700:1.24 src/sys/arch/hp700/conf/files.hp700:1.25
--- src/sys/arch/hp700/conf/files.hp700:1.24	Tue Nov  9 12:24:47 2010
+++ src/sys/arch/hp700/conf/files.hp700	Tue Feb 15 10:32:56 2011
@@ -1,4 +1,4 @@
-#	$NetBSD: files.hp700,v 1.24 2010/11/09 12:24:47 skrll Exp $
+#	$NetBSD: files.hp700,v 1.25 2011/02/15 10:32:56 tsutsui Exp $
 #
 #	$OpenBSD: files.hp700,v 1.31 2001/06/26 02:41:25 mickey Exp $
 #
@@ -53,6 +53,11 @@
 #
 include dev/eisa/files.eisa
 
+#
+# HIL Human Interface Loop devices
+#
+include dev/hil/files.hil
+
 
 #
 # Gonzo System Connect Bus
@@ -213,9 +218,8 @@
 attach	oosiop at gsc with oosiop_gsc
 file	arch/hp700/gsc/oosiop_gsc.c	oosiop_gsc
 
-device	hil: tty
-attach	hil at gsc
-file	arch/hp700/gsc/hil.c		hil
+attach	hil at gsc with hil_gsc
+file	arch/hp700/gsc/hil_gsc.c	hil_gsc
 
 device	gsckbc: pckbport
 attach	gsckbc at gsc

Added files:

Index: src/sys/arch/hp700/gsc/hil_gsc.c
diff -u /dev/null src/sys/arch/hp700/gsc/hil_gsc.c:1.1
--- /dev/null	Tue Feb 15 10:32:57 2011
+++ src/sys/arch/hp700/gsc/hil_gsc.c	Tue Feb 15 10:32:56 2011
@@ -0,0 +1,99 @@
+/*	$NetBSD: hil_gsc.c,v 1.1 2011/02/15 10:32:56 tsutsui Exp $	*/
+/*	$OpenBSD: hil_gsc.c,v 1.5 2005/12/22 07:09:52 miod Exp $	*/
+/*
+ * Copyright (c) 2003, Miodrag Vallat.
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *notice, this list of conditions and the following disclaimer in the
+ *documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
+ * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT,
+ * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+ * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
+ * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
+ * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+ * POSSIBILITY OF SUCH DAMAGE.
+ *
+ */
+
+#include sys/param.h
+#include sys/systm.h
+#include sys/device.h
+#include sys/cpu.h
+#include sys/bus.h
+
+#include machine/intr.h
+#include machine/iomod.h
+#include machine/autoconf.h
+
+#include 

CVS commit: src/sys/arch/hp700/gsc

2011-02-15 Thread Izumi Tsutsui
Module Name:src
Committed By:   tsutsui
Date:   Tue Feb 15 10:35:39 UTC 2011

Modified Files:
src/sys/arch/hp700/gsc: hil_gsc.c

Log Message:
- make local functions static
- remove parentheses from return
- use aprint_error(9)


To generate a diff of this commit:
cvs rdiff -u -r1.1 -r1.2 src/sys/arch/hp700/gsc/hil_gsc.c

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

Modified files:

Index: src/sys/arch/hp700/gsc/hil_gsc.c
diff -u src/sys/arch/hp700/gsc/hil_gsc.c:1.1 src/sys/arch/hp700/gsc/hil_gsc.c:1.2
--- src/sys/arch/hp700/gsc/hil_gsc.c:1.1	Tue Feb 15 10:32:56 2011
+++ src/sys/arch/hp700/gsc/hil_gsc.c	Tue Feb 15 10:35:39 2011
@@ -1,4 +1,4 @@
-/*	$NetBSD: hil_gsc.c,v 1.1 2011/02/15 10:32:56 tsutsui Exp $	*/
+/*	$NetBSD: hil_gsc.c,v 1.2 2011/02/15 10:35:39 tsutsui Exp $	*/
 /*	$OpenBSD: hil_gsc.c,v 1.5 2005/12/22 07:09:52 miod Exp $	*/
 /*
  * Copyright (c) 2003, Miodrag Vallat.
@@ -45,8 +45,8 @@
 
 #include dev/hil/hilvar.h
 
-int	hil_gsc_match(device_t, cfdata_t, void *);
-void	hil_gsc_attach(device_t, device_t, void *);
+static int	hil_gsc_match(device_t, cfdata_t, void *);
+static void	hil_gsc_attach(device_t, device_t, void *);
 
 struct hil_gsc_softc {
 	struct hil_softc sc_hs;
@@ -64,9 +64,9 @@
 
 	if (ga-ga_type.iodc_type != HPPA_TYPE_FIO ||
 	ga-ga_type.iodc_sv_model != HPPA_FIO_HIL)
-		return (0);
+		return 0;
 
-	return (1);
+	return 1;
 }
 
 void
@@ -81,7 +81,7 @@
 	sc-sc_bst = ga-ga_iot;
 	if (bus_space_map(ga-ga_iot, ga-ga_hpa,
 	HILMAPSIZE, 0, sc-sc_bsh)) {
-		printf(: couldn't map hil controller\n);
+		aprint_error(: couldn't map hil controller\n);
 		return;
 	}
 



CVS commit: src/sys/arch/hp700/gsc

2011-02-04 Thread Nick Hudson
Module Name:src
Committed By:   skrll
Date:   Fri Feb  4 10:56:03 UTC 2011

Modified Files:
src/sys/arch/hp700/gsc: harmony.c

Log Message:
Replace multiple spaces with tab


To generate a diff of this commit:
cvs rdiff -u -r1.20 -r1.21 src/sys/arch/hp700/gsc/harmony.c

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

Modified files:

Index: src/sys/arch/hp700/gsc/harmony.c
diff -u src/sys/arch/hp700/gsc/harmony.c:1.20 src/sys/arch/hp700/gsc/harmony.c:1.21
--- src/sys/arch/hp700/gsc/harmony.c:1.20	Fri Feb  4 07:44:53 2011
+++ src/sys/arch/hp700/gsc/harmony.c	Fri Feb  4 10:56:03 2011
@@ -1,4 +1,4 @@
-/*	$NetBSD: harmony.c,v 1.20 2011/02/04 07:44:53 skrll Exp $	*/
+/*	$NetBSD: harmony.c,v 1.21 2011/02/04 10:56:03 skrll Exp $	*/
 
 /*	$OpenBSD: harmony.c,v 1.23 2004/02/13 21:28:19 mickey Exp $	*/
 
@@ -92,26 +92,26 @@
 #include hp700/gsc/harmonyreg.h
 #include hp700/gsc/harmonyvar.h
 
-int harmony_open(void *, int);
-voidharmony_close(void *);
-int harmony_query_encoding(void *, struct audio_encoding *);
-int harmony_set_params(void *, int, int, audio_params_t *,
+int	harmony_open(void *, int);
+void	harmony_close(void *);
+int	harmony_query_encoding(void *, struct audio_encoding *);
+int	harmony_set_params(void *, int, int, audio_params_t *,
 audio_params_t *, stream_filter_list_t *, stream_filter_list_t *);
-int harmony_round_blocksize(void *, int, int, const audio_params_t *);
-int harmony_commit_settings(void *);
-int harmony_halt_output(void *);
-int harmony_halt_input(void *);
-int harmony_getdev(void *, struct audio_device *);
-int harmony_set_port(void *, mixer_ctrl_t *);
-int harmony_get_port(void *, mixer_ctrl_t *);
-int harmony_query_devinfo(void *, mixer_devinfo_t *);
-void * harmony_allocm(void *, int, size_t, struct malloc_type *, int);
-voidharmony_freem(void *, void *, struct malloc_type *);
-size_t  harmony_round_buffersize(void *, int, size_t);
-int harmony_get_props(void *);
-int harmony_trigger_output(void *, void *, void *, int,
+int	harmony_round_blocksize(void *, int, int, const audio_params_t *);
+int	harmony_commit_settings(void *);
+int	harmony_halt_output(void *);
+int	harmony_halt_input(void *);
+int	harmony_getdev(void *, struct audio_device *);
+int	harmony_set_port(void *, mixer_ctrl_t *);
+int	harmony_get_port(void *, mixer_ctrl_t *);
+int	harmony_query_devinfo(void *, mixer_devinfo_t *);
+void *	harmony_allocm(void *, int, size_t, struct malloc_type *, int);
+void	harmony_freem(void *, void *, struct malloc_type *);
+size_t	harmony_round_buffersize(void *, int, size_t);
+int	harmony_get_props(void *);
+int	harmony_trigger_output(void *, void *, void *, int,
 void (*)(void *), void *, const audio_params_t *);
-int harmony_trigger_input(void *, void *, void *, int,
+int	harmony_trigger_input(void *, void *, void *, int,
 void (*)(void *), void *, const audio_params_t *);
 
 const struct audio_hw_if harmony_sa_hw_if = {



CVS commit: src/sys/arch/hp700/gsc

2011-02-04 Thread Nick Hudson
Module Name:src
Committed By:   skrll
Date:   Fri Feb  4 11:00:31 UTC 2011

Modified Files:
src/sys/arch/hp700/gsc: harmony.c

Log Message:
A better workaround hack for PR 41448

Bound the wait loop


To generate a diff of this commit:
cvs rdiff -u -r1.21 -r1.22 src/sys/arch/hp700/gsc/harmony.c

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

Modified files:

Index: src/sys/arch/hp700/gsc/harmony.c
diff -u src/sys/arch/hp700/gsc/harmony.c:1.21 src/sys/arch/hp700/gsc/harmony.c:1.22
--- src/sys/arch/hp700/gsc/harmony.c:1.21	Fri Feb  4 10:56:03 2011
+++ src/sys/arch/hp700/gsc/harmony.c	Fri Feb  4 11:00:30 2011
@@ -1,4 +1,4 @@
-/*	$NetBSD: harmony.c,v 1.21 2011/02/04 10:56:03 skrll Exp $	*/
+/*	$NetBSD: harmony.c,v 1.22 2011/02/04 11:00:30 skrll Exp $	*/
 
 /*	$OpenBSD: harmony.c,v 1.23 2004/02/13 21:28:19 mickey Exp $	*/
 
@@ -98,7 +98,10 @@
 int	harmony_set_params(void *, int, int, audio_params_t *,
 audio_params_t *, stream_filter_list_t *, stream_filter_list_t *);
 int	harmony_round_blocksize(void *, int, int, const audio_params_t *);
+
+int	harmony_control_wait(struct harmony_softc *);
 int	harmony_commit_settings(void *);
+
 int	harmony_halt_output(void *);
 int	harmony_halt_input(void *);
 int	harmony_getdev(void *, struct audio_device *);
@@ -623,6 +626,24 @@
 }
 
 int
+harmony_control_wait(struct harmony_softc *sc)
+{
+	uint32_t reg;
+	int j = 0;
+
+	while (j  10) {
+		/* Wait for it to come out of control mode */
+		reg = READ_REG(sc, HARMONY_CNTL);
+		if ((reg  CNTL_C) == 0)
+			return 0;
+		DELAY(5);		/* wait 0.05 */
+		j++;
+	}
+
+	return 1;
+}
+
+int
 harmony_commit_settings(void *vsc)
 {
 	struct harmony_softc *sc;
@@ -669,24 +690,12 @@
 	offsetof(struct harmony_empty, playback[0][0]),
 	PLAYBACK_EMPTYS * HARMONY_BUFSIZE, BUS_DMASYNC_PREWRITE);
 
-	for (;;) {
-		/* Wait for it to come out of control mode */
-		reg = READ_REG(sc, HARMONY_CNTL);
-		if ((reg  CNTL_C) == 0)
-			break;
-	}
+	harmony_control_wait(sc);
 
 	bus_space_write_4(sc-sc_bt, sc-sc_bh, HARMONY_CNTL,
 	sc-sc_cntlbits | CNTL_C);
 
-#if 0
-	for (;;) {
-		/* Wait for it to come out of control mode */
-		reg = READ_REG(sc, HARMONY_CNTL);
-		if ((reg  CNTL_C) == 0)
-			break;
-	}
-#endif
+	harmony_control_wait(sc);
 
 	sc-sc_need_commit = 0;
 



CVS commit: src/sys/arch/hp700/hp700

2011-02-04 Thread Nick Hudson
Module Name:src
Committed By:   skrll
Date:   Fri Feb  4 14:35:30 UTC 2011

Modified Files:
src/sys/arch/hp700/hp700: intr.c

Log Message:
Another change to suit my eye.


To generate a diff of this commit:
cvs rdiff -u -r1.34 -r1.35 src/sys/arch/hp700/hp700/intr.c

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

Modified files:

Index: src/sys/arch/hp700/hp700/intr.c
diff -u src/sys/arch/hp700/hp700/intr.c:1.34 src/sys/arch/hp700/hp700/intr.c:1.35
--- src/sys/arch/hp700/hp700/intr.c:1.34	Tue Feb  1 18:33:24 2011
+++ src/sys/arch/hp700/hp700/intr.c	Fri Feb  4 14:35:30 2011
@@ -1,4 +1,4 @@
-/*	$NetBSD: intr.c,v 1.34 2011/02/01 18:33:24 skrll Exp $	*/
+/*	$NetBSD: intr.c,v 1.35 2011/02/04 14:35:30 skrll Exp $	*/
 /*	$OpenBSD: intr.c,v 1.27 2009/12/31 12:52:35 jsing Exp $	*/
 
 /*
@@ -35,7 +35,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: intr.c,v 1.34 2011/02/01 18:33:24 skrll Exp $);
+__KERNEL_RCSID(0, $NetBSD: intr.c,v 1.35 2011/02/04 14:35:30 skrll Exp $);
 
 #define __MUTEX_PRIVATE
 
@@ -233,17 +233,18 @@
  * It returns the bit position, or -1 if no bits were available.
  */
 int
-hp700_intr_allocate_bit(struct hp700_interrupt_register *int_reg)
+hp700_intr_allocate_bit(struct hp700_interrupt_register *ir)
 {
 	int bit_pos, mask;
 
 	for (bit_pos = 31, mask = (1  bit_pos);
 	 bit_pos = 0;
 	 bit_pos--, mask = 1)
-		if (int_reg-ir_bits  mask)
+		if (ir-ir_bits  mask)
 			break;
 	if (bit_pos = 0)
-		int_reg-ir_bits = ~mask;
+		ir-ir_bits = ~mask;
+
 	return bit_pos;
 }
 



CVS commit: src/sys/arch/hp700/hp700

2011-02-04 Thread Nick Hudson
Module Name:src
Committed By:   skrll
Date:   Fri Feb  4 14:51:03 UTC 2011

Modified Files:
src/sys/arch/hp700/hp700: intr.c

Log Message:
mask should really be unsigned. it doesn't actually matter.


To generate a diff of this commit:
cvs rdiff -u -r1.35 -r1.36 src/sys/arch/hp700/hp700/intr.c

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

Modified files:

Index: src/sys/arch/hp700/hp700/intr.c
diff -u src/sys/arch/hp700/hp700/intr.c:1.35 src/sys/arch/hp700/hp700/intr.c:1.36
--- src/sys/arch/hp700/hp700/intr.c:1.35	Fri Feb  4 14:35:30 2011
+++ src/sys/arch/hp700/hp700/intr.c	Fri Feb  4 14:51:02 2011
@@ -1,4 +1,4 @@
-/*	$NetBSD: intr.c,v 1.35 2011/02/04 14:35:30 skrll Exp $	*/
+/*	$NetBSD: intr.c,v 1.36 2011/02/04 14:51:02 skrll Exp $	*/
 /*	$OpenBSD: intr.c,v 1.27 2009/12/31 12:52:35 jsing Exp $	*/
 
 /*
@@ -35,7 +35,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: intr.c,v 1.35 2011/02/04 14:35:30 skrll Exp $);
+__KERNEL_RCSID(0, $NetBSD: intr.c,v 1.36 2011/02/04 14:51:02 skrll Exp $);
 
 #define __MUTEX_PRIVATE
 
@@ -235,7 +235,8 @@
 int
 hp700_intr_allocate_bit(struct hp700_interrupt_register *ir)
 {
-	int bit_pos, mask;
+	int bit_pos;
+	u_int mask;
 
 	for (bit_pos = 31, mask = (1  bit_pos);
 	 bit_pos = 0;



CVS commit: src/sys/arch/hp700/hp700

2011-02-03 Thread Nick Hudson
Module Name:src
Committed By:   skrll
Date:   Thu Feb  3 20:37:09 UTC 2011

Modified Files:
src/sys/arch/hp700/hp700: mainbus.c

Log Message:
Replace -1 with HP700CF_IRQ_UNDEF


To generate a diff of this commit:
cvs rdiff -u -r1.77 -r1.78 src/sys/arch/hp700/hp700/mainbus.c

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

Modified files:

Index: src/sys/arch/hp700/hp700/mainbus.c
diff -u src/sys/arch/hp700/hp700/mainbus.c:1.77 src/sys/arch/hp700/hp700/mainbus.c:1.78
--- src/sys/arch/hp700/hp700/mainbus.c:1.77	Sun Jan 23 21:53:40 2011
+++ src/sys/arch/hp700/hp700/mainbus.c	Thu Feb  3 20:37:09 2011
@@ -1,4 +1,4 @@
-/*	$NetBSD: mainbus.c,v 1.77 2011/01/23 21:53:40 skrll Exp $	*/
+/*	$NetBSD: mainbus.c,v 1.78 2011/02/03 20:37:09 skrll Exp $	*/
 
 /*-
  * Copyright (c) 2001, 2002 The NetBSD Foundation, Inc.
@@ -58,7 +58,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: mainbus.c,v 1.77 2011/01/23 21:53:40 skrll Exp $);
+__KERNEL_RCSID(0, $NetBSD: mainbus.c,v 1.78 2011/02/03 20:37:09 skrll Exp $);
 
 #include locators.h
 #include power.h
@@ -1401,7 +1401,7 @@
 	/* get some power */
 	memset(nca, 0, sizeof(nca));
 	nca.ca_name = power;
-	nca.ca_irq = -1;
+	nca.ca_irq = HP700CF_IRQ_UNDEF;
 	nca.ca_iot = hppa_bustag;
 	config_found(self, nca, mbprint);
 #endif
@@ -1414,7 +1414,7 @@
 		nca.ca_dp.dp_bc[0] = nca.ca_dp.dp_bc[1] = nca.ca_dp.dp_bc[2] = 
 		nca.ca_dp.dp_bc[3] = nca.ca_dp.dp_bc[4] = nca.ca_dp.dp_bc[5] = -1;
 		nca.ca_dp.dp_mod = -1;
-		nca.ca_irq = -1;
+		nca.ca_irq = HP700CF_IRQ_UNDEF;
 		nca.ca_iot = hppa_bustag;
 		nca.ca_hpa = nca.ca_pcl.cmd_addr;
 



CVS commit: src/sys/arch/hp700/gsc

2011-02-03 Thread Nick Hudson
Module Name:src
Committed By:   skrll
Date:   Fri Feb  4 07:44:53 UTC 2011

Modified Files:
src/sys/arch/hp700/gsc: harmony.c

Log Message:
Commit a hack workaround for PR 41448.

Not sure if this has any negative effects, but I'd rather have a system
that reboots than has working audio.


To generate a diff of this commit:
cvs rdiff -u -r1.19 -r1.20 src/sys/arch/hp700/gsc/harmony.c

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

Modified files:

Index: src/sys/arch/hp700/gsc/harmony.c
diff -u src/sys/arch/hp700/gsc/harmony.c:1.19 src/sys/arch/hp700/gsc/harmony.c:1.20
--- src/sys/arch/hp700/gsc/harmony.c:1.19	Tue Feb  1 18:33:24 2011
+++ src/sys/arch/hp700/gsc/harmony.c	Fri Feb  4 07:44:53 2011
@@ -1,4 +1,4 @@
-/*	$NetBSD: harmony.c,v 1.19 2011/02/01 18:33:24 skrll Exp $	*/
+/*	$NetBSD: harmony.c,v 1.20 2011/02/04 07:44:53 skrll Exp $	*/
 
 /*	$OpenBSD: harmony.c,v 1.23 2004/02/13 21:28:19 mickey Exp $	*/
 
@@ -679,12 +679,14 @@
 	bus_space_write_4(sc-sc_bt, sc-sc_bh, HARMONY_CNTL,
 	sc-sc_cntlbits | CNTL_C);
 
+#if 0
 	for (;;) {
 		/* Wait for it to come out of control mode */
 		reg = READ_REG(sc, HARMONY_CNTL);
 		if ((reg  CNTL_C) == 0)
 			break;
 	}
+#endif
 
 	sc-sc_need_commit = 0;
 



CVS commit: src/sys/arch/hp700/hp700

2011-02-01 Thread Nick Hudson
Module Name:src
Committed By:   skrll
Date:   Tue Feb  1 18:12:10 UTC 2011

Modified Files:
src/sys/arch/hp700/hp700: intr.c

Log Message:
Remove trailing whitespace.


To generate a diff of this commit:
cvs rdiff -u -r1.32 -r1.33 src/sys/arch/hp700/hp700/intr.c

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

Modified files:

Index: src/sys/arch/hp700/hp700/intr.c
diff -u src/sys/arch/hp700/hp700/intr.c:1.32 src/sys/arch/hp700/hp700/intr.c:1.33
--- src/sys/arch/hp700/hp700/intr.c:1.32	Fri Dec 24 16:03:54 2010
+++ src/sys/arch/hp700/hp700/intr.c	Tue Feb  1 18:12:10 2011
@@ -1,4 +1,4 @@
-/*	$NetBSD: intr.c,v 1.32 2010/12/24 16:03:54 skrll Exp $	*/
+/*	$NetBSD: intr.c,v 1.33 2011/02/01 18:12:10 skrll Exp $	*/
 /*	$OpenBSD: intr.c,v 1.27 2009/12/31 12:52:35 jsing Exp $	*/
 
 /*
@@ -35,7 +35,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: intr.c,v 1.32 2010/12/24 16:03:54 skrll Exp $);
+__KERNEL_RCSID(0, $NetBSD: intr.c,v 1.33 2011/02/01 18:12:10 skrll Exp $);
 
 #define __MUTEX_PRIVATE
 
@@ -172,7 +172,7 @@
 {
 	struct hp700_int_bit *int_bit;
 	int idx;
-	
+
 	/* Panic on a bad interrupt bit. */
 	if (bit_pos  0 || bit_pos = HP700_INT_BITS)
 		panic(%s: bad interrupt bit %d, __func__, bit_pos);
@@ -287,7 +287,7 @@
 			continue;
 		imask[int_bit-int_bit_ipl] |= int_bit-int_bit_spl;
 	}
-	
+
 	/* The following bits cribbed from i386/isa/isa_machdep.c: */
 
 	/*
@@ -435,7 +435,7 @@
 	if (ci-ci_ipending  ~ci-ci_cpl)
 		hp700_intr_dispatch(ci-ci_cpl, frame-tf_eiem, frame);
 }
-		
+
 /*
  * Dispatch interrupts.  This dispatches at least one interrupt.
  * This is called with %eiem loaded with zero.
@@ -483,7 +483,7 @@
 			}
 			arg = clkframe;
 		}
-	
+
 		/*
 		 * Remove this bit from ipending, raise spl to
 		 * the level required to run this interrupt,



CVS commit: src/sys/arch/hp700

2011-01-31 Thread Nick Hudson
Module Name:src
Committed By:   skrll
Date:   Mon Jan 31 14:11:02 UTC 2011

Modified Files:
src/sys/arch/hp700/dev: cpu.c
src/sys/arch/hp700/include: cpu.h

Log Message:
Rename hppa_ncpus hppa_ncpu.

Increment for primary CPU only for now.


To generate a diff of this commit:
cvs rdiff -u -r1.17 -r1.18 src/sys/arch/hp700/dev/cpu.c
cvs rdiff -u -r1.63 -r1.64 src/sys/arch/hp700/include/cpu.h

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

Modified files:

Index: src/sys/arch/hp700/dev/cpu.c
diff -u src/sys/arch/hp700/dev/cpu.c:1.17 src/sys/arch/hp700/dev/cpu.c:1.18
--- src/sys/arch/hp700/dev/cpu.c:1.17	Sun Jan 23 21:53:39 2011
+++ src/sys/arch/hp700/dev/cpu.c	Mon Jan 31 14:11:02 2011
@@ -1,4 +1,4 @@
-/*	$NetBSD: cpu.c,v 1.17 2011/01/23 21:53:39 skrll Exp $	*/
+/*	$NetBSD: cpu.c,v 1.18 2011/01/31 14:11:02 skrll Exp $	*/
 
 /*	$OpenBSD: cpu.c,v 1.29 2009/02/08 18:33:28 miod Exp $	*/
 
@@ -29,7 +29,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: cpu.c,v 1.17 2011/01/23 21:53:39 skrll Exp $);
+__KERNEL_RCSID(0, $NetBSD: cpu.c,v 1.18 2011/01/31 14:11:02 skrll Exp $);
 
 #include opt_multiprocessor.h
 
@@ -56,7 +56,8 @@
 };
 
 #ifdef MULTIPROCESSOR
-int hppa_ncpus;
+
+int hppa_ncpu;
 
 struct cpu_info *cpu_hatch_info;
 static volatile int start_secondary_cpu;
@@ -192,6 +193,7 @@
 
 	if (ci-ci_hpa == hppa_mcpuhpa) {
 		ci-ci_flags |= CPUF_PRIMARY|CPUF_RUNNING;
+		hppa_ncpu++;
 	} else {
 		int err;
 
@@ -278,6 +280,9 @@
 	struct cpu_info *ci = curcpu();
 
 	ci-ci_flags |= CPUF_RUNNING;
+#if 0
+	hppa_ncpu++;
+#endif
 
 	/* Wait for additional CPUs to spinup. */
 	while (!start_secondary_cpu)

Index: src/sys/arch/hp700/include/cpu.h
diff -u src/sys/arch/hp700/include/cpu.h:1.63 src/sys/arch/hp700/include/cpu.h:1.64
--- src/sys/arch/hp700/include/cpu.h:1.63	Tue Jan 25 21:27:48 2011
+++ src/sys/arch/hp700/include/cpu.h	Mon Jan 31 14:11:02 2011
@@ -1,4 +1,4 @@
-/*	$NetBSD: cpu.h,v 1.63 2011/01/25 21:27:48 skrll Exp $	*/
+/*	$NetBSD: cpu.h,v 1.64 2011/01/31 14:11:02 skrll Exp $	*/
 
 /*	$OpenBSD: cpu.h,v 1.55 2008/07/23 17:39:35 kettenis Exp $	*/
 
@@ -298,14 +298,14 @@
 #ifdef MULTIPROCESSOR
 
 /* Number of CPUs in the system */
-extern int hppa_ncpus;
+extern int hppa_ncpu;
 
 #define	HPPA_MAXCPUS	4
 #define	cpu_number()			(curcpu()-ci_cpuid)
 
 #define	CPU_IS_PRIMARY(ci)		((ci)-ci_cpuid == 0)
 #define	CPU_INFO_ITERATOR		int
-#define	CPU_INFO_FOREACH(cii, ci)	cii = 0; ci =  cpus[0], cii  hppa_ncpus; cii++, ci++
+#define	CPU_INFO_FOREACH(cii, ci)	cii = 0; ci =  cpus[0], cii  hppa_ncpu; cii++, ci++
 
 void	cpu_boot_secondary_processors(void);
 



CVS commit: src/sys/arch/hp700/include

2011-01-31 Thread Nick Hudson
Module Name:src
Committed By:   skrll
Date:   Mon Jan 31 18:21:33 UTC 2011

Modified Files:
src/sys/arch/hp700/include: cpu.h

Log Message:
Fix CPU_INFO_FOREACH.


To generate a diff of this commit:
cvs rdiff -u -r1.64 -r1.65 src/sys/arch/hp700/include/cpu.h

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

Modified files:

Index: src/sys/arch/hp700/include/cpu.h
diff -u src/sys/arch/hp700/include/cpu.h:1.64 src/sys/arch/hp700/include/cpu.h:1.65
--- src/sys/arch/hp700/include/cpu.h:1.64	Mon Jan 31 14:11:02 2011
+++ src/sys/arch/hp700/include/cpu.h	Mon Jan 31 18:21:33 2011
@@ -1,4 +1,4 @@
-/*	$NetBSD: cpu.h,v 1.64 2011/01/31 14:11:02 skrll Exp $	*/
+/*	$NetBSD: cpu.h,v 1.65 2011/01/31 18:21:33 skrll Exp $	*/
 
 /*	$OpenBSD: cpu.h,v 1.55 2008/07/23 17:39:35 kettenis Exp $	*/
 
@@ -305,7 +305,7 @@
 
 #define	CPU_IS_PRIMARY(ci)		((ci)-ci_cpuid == 0)
 #define	CPU_INFO_ITERATOR		int
-#define	CPU_INFO_FOREACH(cii, ci)	cii = 0; ci =  cpus[0], cii  hppa_ncpu; cii++, ci++
+#define	CPU_INFO_FOREACH(cii, ci)	cii = 0, ci =  cpus[0]; cii  hppa_ncpu; cii++, ci++
 
 void	cpu_boot_secondary_processors(void);
 



  1   2   3   >