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

2024-06-29 Thread Rin Okuyama
Module Name:src
Committed By:   rin
Date:   Sat Jun 29 08:02:06 UTC 2024

Modified Files:
src/sys/arch/arc/stand/boot: Makefile
Removed Files:
src/sys/arch/arc/stand/boot: getopt.c

Log Message:
arc: stand: Switch to libsa/getopt, NFCI


To generate a diff of this commit:
cvs rdiff -u -r1.18 -r1.19 src/sys/arch/arc/stand/boot/Makefile
cvs rdiff -u -r1.3 -r0 src/sys/arch/arc/stand/boot/getopt.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/arc/stand/boot/Makefile
diff -u src/sys/arch/arc/stand/boot/Makefile:1.18 src/sys/arch/arc/stand/boot/Makefile:1.19
--- src/sys/arch/arc/stand/boot/Makefile:1.18	Wed Jun  3 11:33:38 2020
+++ src/sys/arch/arc/stand/boot/Makefile	Sat Jun 29 08:02:06 2024
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.18 2020/06/03 11:33:38 tsutsui Exp $
+# $NetBSD: Makefile,v 1.19 2024/06/29 08:02:06 rin Exp $
 
 .include 
 
@@ -14,7 +14,7 @@ NETBSD_VERS!=	${HOST_SH} ${S}/conf/osrel
 .PATH:		${S}/dev/arcbios
 
 SRCS=	start.S arcbios_calls.S
-SRCS+=	boot.c bootinfo.c conf.c devopen.c disk.c getchar.c getopt.c putchar.c
+SRCS+=	boot.c bootinfo.c conf.c devopen.c disk.c getchar.c putchar.c
 
 .include "${S}/dev/arcbios/Makefile.inc"
 



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

2024-06-29 Thread Rin Okuyama
Module Name:src
Committed By:   rin
Date:   Sat Jun 29 08:02:06 UTC 2024

Modified Files:
src/sys/arch/arc/stand/boot: Makefile
Removed Files:
src/sys/arch/arc/stand/boot: getopt.c

Log Message:
arc: stand: Switch to libsa/getopt, NFCI


To generate a diff of this commit:
cvs rdiff -u -r1.18 -r1.19 src/sys/arch/arc/stand/boot/Makefile
cvs rdiff -u -r1.3 -r0 src/sys/arch/arc/stand/boot/getopt.c

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



CVS commit: src/sys/arch/arc

2023-12-06 Thread Jason R Thorpe
Module Name:src
Committed By:   thorpej
Date:   Thu Dec  7 03:46:10 UTC 2023

Modified Files:
src/sys/arch/arc/arc: bus_space.c machdep.c wired_map_machdep.c
src/sys/arch/arc/include: bus_defs.h bus_funcs.h
src/sys/arch/arc/isa: isabus.c
src/sys/arch/arc/pci: necpb.c

Log Message:
extent(9) -> vmem(9)


To generate a diff of this commit:
cvs rdiff -u -r1.12 -r1.13 src/sys/arch/arc/arc/bus_space.c
cvs rdiff -u -r1.131 -r1.132 src/sys/arch/arc/arc/machdep.c
cvs rdiff -u -r1.7 -r1.8 src/sys/arch/arc/arc/wired_map_machdep.c
cvs rdiff -u -r1.2 -r1.3 src/sys/arch/arc/include/bus_defs.h \
src/sys/arch/arc/include/bus_funcs.h
cvs rdiff -u -r1.53 -r1.54 src/sys/arch/arc/isa/isabus.c
cvs rdiff -u -r1.48 -r1.49 src/sys/arch/arc/pci/necpb.c

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



CVS commit: src/sys/arch/arc

2023-12-06 Thread Jason R Thorpe
Module Name:src
Committed By:   thorpej
Date:   Thu Dec  7 03:46:10 UTC 2023

Modified Files:
src/sys/arch/arc/arc: bus_space.c machdep.c wired_map_machdep.c
src/sys/arch/arc/include: bus_defs.h bus_funcs.h
src/sys/arch/arc/isa: isabus.c
src/sys/arch/arc/pci: necpb.c

Log Message:
extent(9) -> vmem(9)


To generate a diff of this commit:
cvs rdiff -u -r1.12 -r1.13 src/sys/arch/arc/arc/bus_space.c
cvs rdiff -u -r1.131 -r1.132 src/sys/arch/arc/arc/machdep.c
cvs rdiff -u -r1.7 -r1.8 src/sys/arch/arc/arc/wired_map_machdep.c
cvs rdiff -u -r1.2 -r1.3 src/sys/arch/arc/include/bus_defs.h \
src/sys/arch/arc/include/bus_funcs.h
cvs rdiff -u -r1.53 -r1.54 src/sys/arch/arc/isa/isabus.c
cvs rdiff -u -r1.48 -r1.49 src/sys/arch/arc/pci/necpb.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/arc/arc/bus_space.c
diff -u src/sys/arch/arc/arc/bus_space.c:1.12 src/sys/arch/arc/arc/bus_space.c:1.13
--- src/sys/arch/arc/arc/bus_space.c:1.12	Fri Jan 27 18:52:49 2012
+++ src/sys/arch/arc/arc/bus_space.c	Thu Dec  7 03:46:10 2023
@@ -1,4 +1,4 @@
-/*	$NetBSD: bus_space.c,v 1.12 2012/01/27 18:52:49 para Exp $	*/
+/*	$NetBSD: bus_space.c,v 1.13 2023/12/07 03:46:10 thorpej Exp $	*/
 /*	NetBSD: bus_machdep.c,v 1.1 2000/01/26 18:48:00 drochner Exp 	*/
 
 /*-
@@ -32,12 +32,12 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: bus_space.c,v 1.12 2012/01/27 18:52:49 para Exp $");
+__KERNEL_RCSID(0, "$NetBSD: bus_space.c,v 1.13 2023/12/07 03:46:10 thorpej Exp $");
 
 #include 
 #include 
 #include 
-#include 
+#include 
 
 #include 
 
@@ -316,7 +316,7 @@ arc_bus_space_init(bus_space_tag_t bst, 
 {
 
 	bst->bs_name = name;
-	bst->bs_extent = NULL;
+	bst->bs_arena = NULL;
 	bst->bs_start = start;
 	bst->bs_size = size;
 	bst->bs_pbase = paddr;
@@ -338,16 +338,28 @@ arc_bus_space_init(bus_space_tag_t bst, 
 }
 
 void
-arc_bus_space_init_extent(bus_space_tag_t bst, void *storage,
-size_t storagesize)
+arc_bus_space_init_arena(bus_space_tag_t bst, struct vmem *arena_store,
+struct vmem_btag *btag_store, unsigned int btag_count)
 {
+	int error __diagused;
 
-	bst->bs_extent = extent_create(bst->bs_name,
-	bst->bs_start, bst->bs_start + bst->bs_size,
-	storage, storagesize, EX_NOWAIT);
-	if (bst->bs_extent == NULL)
-		panic("arc_bus_space_init_extent: cannot create extent map %s",
-		bst->bs_name);
+	bst->bs_arena = vmem_init(arena_store,
+  bst->bs_name,		/* name */
+  0,			/* addr */
+  0,			/* size */
+  1,			/* quantum */
+  NULL,			/* importfn */
+  NULL,			/* releasefn */
+  NULL,			/* source */
+  0,			/* qcache_max */
+  VM_NOSLEEP | VM_PRIVTAGS,
+  IPL_NONE);
+	KASSERT(bst->bs_arena != NULL);
+
+	vmem_add_bts(bst->bs_arena, btag_store, btag_count);
+	error = vmem_add(bst->bs_arena, bst->bs_start, bst->bs_size,
+	VM_NOSLEEP);
+	KASSERT(error == 0);
 }
 
 void
@@ -367,22 +379,6 @@ arc_bus_space_set_aligned_stride(bus_spa
 	bst->bs_stride_8 = alignment_shift;
 }
 
-static int malloc_safe = 0;
-
-void
-arc_bus_space_malloc_set_safe(void)
-{
-
-	malloc_safe = EX_MALLOCOK;
-}
-
-int
-arc_bus_space_extent_malloc_flag(void)
-{
-
-	return malloc_safe;
-}
-
 int
 arc_bus_space_compose_handle(bus_space_tag_t bst, bus_addr_t addr,
 bus_size_t size, int flags, bus_space_handle_t *bshp)
@@ -457,9 +453,8 @@ arc_bus_space_map(bus_space_tag_t bst, b
 	if (addr < bst->bs_start || addr + size > bst->bs_start + bst->bs_size)
 		return EINVAL;
 
-	if (bst->bs_extent != NULL) {
-		err = extent_alloc_region(bst->bs_extent, addr, size,
-		EX_NOWAIT | malloc_safe);
+	if (bst->bs_arena != NULL) {
+		err = vmem_xalloc_addr(bst->bs_arena, addr, size, VM_NOSLEEP);
 		if (err)
 			return err;
 	}
@@ -472,7 +467,7 @@ arc_bus_space_unmap(bus_space_tag_t bst,
 bus_size_t size)
 {
 
-	if (bst->bs_extent != NULL) {
+	if (bst->bs_arena != NULL) {
 		paddr_t pa;
 		bus_addr_t addr;
 		int err;
@@ -483,8 +478,7 @@ arc_bus_space_unmap(bus_space_tag_t bst,
 			panic("arc_bus_space_unmap: %s va 0x%qx: error %d",
 			bst->bs_name, (unsigned long long) bsh, err);
 		addr = (bus_size_t)(pa - bst->bs_pbase) + bst->bs_start;
-		extent_free(bst->bs_extent, addr, size,
-		EX_NOWAIT | malloc_safe);
+		vmem_xfree(bst->bs_arena, addr, size);
 	}
 	bus_space_dispose_handle(bst, bsh, size);
 }
@@ -520,19 +514,25 @@ arc_bus_space_alloc(bus_space_tag_t bst,
 bus_size_t size, bus_size_t align, bus_size_t boundary, int flags,
 bus_addr_t *addrp, bus_space_handle_t *bshp)
 {
-	u_long addr;
+	vmem_addr_t addr;
 	int err;
 
-	if (bst->bs_extent == NULL)
-		panic("arc_bus_space_alloc: extent map %s not available",
+	if (bst->bs_arena == NULL)
+		panic("arc_bus_space_alloc: vmem arena %s not available",
 		bst->bs_name);
 
 	if (start < bst->bs_start ||
 	start + size > bst->bs_start + bst->bs_size)
 		return EINVAL;
 
-	err = 

CVS commit: src/sys/arch/arc/arc

2023-08-30 Thread Izumi Tsutsui
Module Name:src
Committed By:   tsutsui
Date:   Wed Aug 30 17:10:17 UTC 2023

Modified Files:
src/sys/arch/arc/arc: autoconf.c interrupt.c timer.c timervar.h

Log Message:
Remove ENABLE_INT5_STATCLOCK broken since matt-nb5-mips64 merge.

Noticed by andvar@.


To generate a diff of this commit:
cvs rdiff -u -r1.35 -r1.36 src/sys/arch/arc/arc/autoconf.c
cvs rdiff -u -r1.9 -r1.10 src/sys/arch/arc/arc/interrupt.c
cvs rdiff -u -r1.11 -r1.12 src/sys/arch/arc/arc/timer.c
cvs rdiff -u -r1.7 -r1.8 src/sys/arch/arc/arc/timervar.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/arc/arc/autoconf.c
diff -u src/sys/arch/arc/arc/autoconf.c:1.35 src/sys/arch/arc/arc/autoconf.c:1.36
--- src/sys/arch/arc/arc/autoconf.c:1.35	Sat Oct 27 17:17:35 2012
+++ src/sys/arch/arc/arc/autoconf.c	Wed Aug 30 17:10:17 2023
@@ -1,4 +1,4 @@
-/*	$NetBSD: autoconf.c,v 1.35 2012/10/27 17:17:35 chs Exp $	*/
+/*	$NetBSD: autoconf.c,v 1.36 2023/08/30 17:10:17 tsutsui Exp $	*/
 /*	$OpenBSD: autoconf.c,v 1.9 1997/05/18 13:45:20 pefo Exp $	*/
 
 /*
@@ -88,7 +88,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: autoconf.c,v 1.35 2012/10/27 17:17:35 chs Exp $");
+__KERNEL_RCSID(0, "$NetBSD: autoconf.c,v 1.36 2023/08/30 17:10:17 tsutsui Exp $");
 
 #include 
 #include 
@@ -131,28 +131,14 @@ void
 cpu_configure(void)
 {
 
-#ifdef ENABLE_INT5_STATCLOCK
-	evcnt_attach_static(_ev);
-#endif
-
 	(void)splhigh();	/* To be really sure.. */
 	if (config_rootfound("mainbus", NULL) == NULL)
 		panic("no mainbus found");
 
 	/* Configuration is finished, turn on interrupts. */
-#ifdef ENABLE_INT5_STATCLOCK
-	/*
-	 * Enable interrupt sources.
-	 * We can't enable CPU INT5 which is used by statclock(9) here
-	 * until cpu_initclocks(9) is called because there is no way
-	 * to disable it other than setting status register by spl(9).
-	 */
-	_spllower(MIPS_INT_MASK_5);
-#error need fix
-#else
+
 	/* enable all source forcing SOFT_INTs cleared */
 	spl0();
-#endif
 }
 
 #if defined(NFS_BOOT_BOOTP) || defined(NFS_BOOT_DHCP)

Index: src/sys/arch/arc/arc/interrupt.c
diff -u src/sys/arch/arc/arc/interrupt.c:1.9 src/sys/arch/arc/arc/interrupt.c:1.10
--- src/sys/arch/arc/arc/interrupt.c:1.9	Wed Mar  2 10:51:04 2011
+++ src/sys/arch/arc/arc/interrupt.c	Wed Aug 30 17:10:17 2023
@@ -1,4 +1,4 @@
-/*	$NetBSD: interrupt.c,v 1.9 2011/03/02 10:51:04 tsutsui Exp $	*/
+/*	$NetBSD: interrupt.c,v 1.10 2023/08/30 17:10:17 tsutsui Exp $	*/
 /*	$OpenBSD: trap.c,v 1.22 1999/05/24 23:08:59 jason Exp $	*/
 
 /*
@@ -40,7 +40,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: interrupt.c,v 1.9 2011/03/02 10:51:04 tsutsui Exp $");
+__KERNEL_RCSID(0, "$NetBSD: interrupt.c,v 1.10 2023/08/30 17:10:17 tsutsui Exp $");
 
 #include 
 #include 
@@ -65,11 +65,6 @@ static struct cpu_inttab cpu_int_tab[ARC
 
 uint32_t cpu_int_mask;	/* External cpu interrupt mask */
 
-#ifdef ENABLE_INT5_STATCLOCK
-struct evcnt statclock_ev =
-EVCNT_INITIALIZER(EVCNT_TYPE_INTR, NULL, "cpu", "statclock");
-#endif
-
 /*
  *	Set up handler for external interrupt events.
  *	Events are checked in priority order.
@@ -114,17 +109,11 @@ cpu_intr(int ppl, vaddr_t pc, uint32_t s
 	while (ppl < (ipl = splintr())) {
 		/* check MIPS3 internal clock interrupt */
 		if (ipending & MIPS_INT_MASK_5) {
-#ifdef ENABLE_INT5_STATCLOCK
-			/* call statclock(9) handler */
-			statclockintr();
-			statclock_ev.ev_count++;
-#else
 			/*
 			 * Writing a value to the Compare register, as a side
 			 * effect, clears the timer interrupt request.
 			 */
 			mips3_cp0_compare_write(0);
-#endif
 		}
 
 		/*

Index: src/sys/arch/arc/arc/timer.c
diff -u src/sys/arch/arc/arc/timer.c:1.11 src/sys/arch/arc/arc/timer.c:1.12
--- src/sys/arch/arc/arc/timer.c:1.11	Sat Oct 27 17:17:35 2012
+++ src/sys/arch/arc/arc/timer.c	Wed Aug 30 17:10:17 2023
@@ -1,4 +1,4 @@
-/* $NetBSD: timer.c,v 1.11 2012/10/27 17:17:35 chs Exp $ */
+/* $NetBSD: timer.c,v 1.12 2023/08/30 17:10:17 tsutsui Exp $ */
 /* NetBSD: clock.c,v 1.31 2001/05/27 13:53:24 sommerfeld Exp  */
 
 /*
@@ -40,7 +40,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: timer.c,v 1.11 2012/10/27 17:17:35 chs Exp $");
+__KERNEL_RCSID(0, "$NetBSD: timer.c,v 1.12 2023/08/30 17:10:17 tsutsui Exp $");
 
 #include 
 #include 
@@ -56,22 +56,6 @@ const struct timerfns *timerfns;
 int timerinitted;
 uint32_t last_cp0_count;
 
-#ifdef ENABLE_INT5_STATCLOCK
-/*
- * Statistics clock variance, in usec.  Variance must be a
- * power of two.  Since this gives us an even number, not an odd number,
- * we discard one case and compensate.  That is, a variance of 1024 would
- * give us offsets in [0..1023].  Instead, we take offsets in [1..1023].
- * This is symmetric about the point 512, or statvar/2, and thus averages
- * to that value (assuming uniform random numbers).
- */
-static const uint32_t statvar = 1024;
-static uint32_t statint;	/* number of clock ticks for stathz */
-static uint32_t 

CVS commit: src/sys/arch/arc/arc

2023-08-30 Thread Izumi Tsutsui
Module Name:src
Committed By:   tsutsui
Date:   Wed Aug 30 17:10:17 UTC 2023

Modified Files:
src/sys/arch/arc/arc: autoconf.c interrupt.c timer.c timervar.h

Log Message:
Remove ENABLE_INT5_STATCLOCK broken since matt-nb5-mips64 merge.

Noticed by andvar@.


To generate a diff of this commit:
cvs rdiff -u -r1.35 -r1.36 src/sys/arch/arc/arc/autoconf.c
cvs rdiff -u -r1.9 -r1.10 src/sys/arch/arc/arc/interrupt.c
cvs rdiff -u -r1.11 -r1.12 src/sys/arch/arc/arc/timer.c
cvs rdiff -u -r1.7 -r1.8 src/sys/arch/arc/arc/timervar.h

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



CVS commit: src/sys/arch/arc/isa

2023-08-30 Thread Andrius Varanavicius
Module Name:src
Committed By:   andvar
Date:   Wed Aug 30 09:17:46 UTC 2023

Modified Files:
src/sys/arch/arc/isa: opms_isa.c

Log Message:
fix build for arc PCCONS/RPC44 kernel configs by replacing *pccons_isa_conf
definition with pccons_isavar.h include, which has extern declaration for it.

Discussed fix with phone@ via irc.


To generate a diff of this commit:
cvs rdiff -u -r1.12 -r1.13 src/sys/arch/arc/isa/opms_isa.c

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



CVS commit: src/sys/arch/arc/isa

2023-08-30 Thread Andrius Varanavicius
Module Name:src
Committed By:   andvar
Date:   Wed Aug 30 09:17:46 UTC 2023

Modified Files:
src/sys/arch/arc/isa: opms_isa.c

Log Message:
fix build for arc PCCONS/RPC44 kernel configs by replacing *pccons_isa_conf
definition with pccons_isavar.h include, which has extern declaration for it.

Discussed fix with phone@ via irc.


To generate a diff of this commit:
cvs rdiff -u -r1.12 -r1.13 src/sys/arch/arc/isa/opms_isa.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/arc/isa/opms_isa.c
diff -u src/sys/arch/arc/isa/opms_isa.c:1.12 src/sys/arch/arc/isa/opms_isa.c:1.13
--- src/sys/arch/arc/isa/opms_isa.c:1.12	Fri Jul  1 19:25:41 2011
+++ src/sys/arch/arc/isa/opms_isa.c	Wed Aug 30 09:17:46 2023
@@ -1,4 +1,4 @@
-/* $NetBSD: opms_isa.c,v 1.12 2011/07/01 19:25:41 dyoung Exp $ */
+/* $NetBSD: opms_isa.c,v 1.13 2023/08/30 09:17:46 andvar Exp $ */
 
 /*
  * Copyright (c) 1995, 1996 Carnegie-Mellon University.
@@ -28,7 +28,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: opms_isa.c,v 1.12 2011/07/01 19:25:41 dyoung Exp $");
+__KERNEL_RCSID(0, "$NetBSD: opms_isa.c,v 1.13 2023/08/30 09:17:46 andvar Exp $");
 
 #include 
 #include 
@@ -42,6 +42,7 @@ __KERNEL_RCSID(0, "$NetBSD: opms_isa.c,v
 
 #include 
 #include 
+#include 
 
 static int	opms_isa_match(device_t, cfdata_t, void *);
 static void	opms_isa_attach(device_t, device_t, void *);
@@ -49,8 +50,6 @@ static void	opms_isa_attach(device_t, de
 CFATTACH_DECL_NEW(opms_isa, sizeof(struct opms_softc),
 opms_isa_match, opms_isa_attach, NULL, NULL);
 
-struct pccons_config *pccons_isa_conf;	/* share stroage with pccons_isa.c */
-
 static int
 opms_isa_match(device_t parent, cfdata_t cf, void *aux)
 {



CVS commit: src/sys/arch/arc/jazz

2023-08-29 Thread Andrius Varanavicius
Module Name:src
Committed By:   andvar
Date:   Tue Aug 29 21:55:11 UTC 2023

Modified Files:
src/sys/arch/arc/jazz: fd.c

Log Message:
arc/fdc(4): fix printf specifiers for FD_DEBUG build.


To generate a diff of this commit:
cvs rdiff -u -r1.51 -r1.52 src/sys/arch/arc/jazz/fd.c

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



CVS commit: src/sys/arch/arc/jazz

2023-08-29 Thread Andrius Varanavicius
Module Name:src
Committed By:   andvar
Date:   Tue Aug 29 21:55:11 UTC 2023

Modified Files:
src/sys/arch/arc/jazz: fd.c

Log Message:
arc/fdc(4): fix printf specifiers for FD_DEBUG build.


To generate a diff of this commit:
cvs rdiff -u -r1.51 -r1.52 src/sys/arch/arc/jazz/fd.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/arc/jazz/fd.c
diff -u src/sys/arch/arc/jazz/fd.c:1.51 src/sys/arch/arc/jazz/fd.c:1.52
--- src/sys/arch/arc/jazz/fd.c:1.51	Sat Aug  7 16:18:42 2021
+++ src/sys/arch/arc/jazz/fd.c	Tue Aug 29 21:55:11 2023
@@ -1,4 +1,4 @@
-/*	$NetBSD: fd.c,v 1.51 2021/08/07 16:18:42 thorpej Exp $	*/
+/*	$NetBSD: fd.c,v 1.52 2023/08/29 21:55:11 andvar Exp $	*/
 /*	$OpenBSD: fd.c,v 1.6 1998/10/03 21:18:57 millert Exp $	*/
 /*	NetBSD: fd.c,v 1.78 1995/07/04 07:23:09 mycroft Exp 	*/
 
@@ -66,7 +66,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: fd.c,v 1.51 2021/08/07 16:18:42 thorpej Exp $");
+__KERNEL_RCSID(0, "$NetBSD: fd.c,v 1.52 2023/08/29 21:55:11 andvar Exp $");
 
 #include 
 #include 
@@ -470,8 +470,8 @@ fdstrategy(struct buf *bp)
 	bp->b_blkno / (FDC_BSIZE / DEV_BSIZE) / fd->sc_type->seccyl;
 
 #ifdef FD_DEBUG
-	printf("%s: b_blkno %" PRId64 " b_bcount %ld blkno %" PRId64
-	" cylin %ld sz %d\n", __func__,
+	printf("%s: b_blkno %" PRId64 " b_bcount %d blkno %" PRId64
+	" cylin %d sz %d\n", __func__,
 	bp->b_blkno, bp->b_bcount, fd->sc_blkno, bp->b_cylinder, sz);
 #endif
 



CVS commit: src/sys/arch/arc/arc

2023-08-29 Thread Andrius Varanavicius
Module Name:src
Committed By:   andvar
Date:   Tue Aug 29 21:34:51 UTC 2023

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

Log Message:
fix typo NKSYM -> NKSYMS in one of #if directive conditions.
It may cause build failure, e.g. with DDB option disabled.


To generate a diff of this commit:
cvs rdiff -u -r1.130 -r1.131 src/sys/arch/arc/arc/machdep.c

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



CVS commit: src/sys/arch/arc/arc

2023-08-29 Thread Andrius Varanavicius
Module Name:src
Committed By:   andvar
Date:   Tue Aug 29 21:34:51 UTC 2023

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

Log Message:
fix typo NKSYM -> NKSYMS in one of #if directive conditions.
It may cause build failure, e.g. with DDB option disabled.


To generate a diff of this commit:
cvs rdiff -u -r1.130 -r1.131 src/sys/arch/arc/arc/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/arc/arc/machdep.c
diff -u src/sys/arch/arc/arc/machdep.c:1.130 src/sys/arch/arc/arc/machdep.c:1.131
--- src/sys/arch/arc/arc/machdep.c:1.130	Thu Dec 22 14:47:54 2016
+++ src/sys/arch/arc/arc/machdep.c	Tue Aug 29 21:34:50 2023
@@ -1,4 +1,4 @@
-/*	$NetBSD: machdep.c,v 1.130 2016/12/22 14:47:54 cherry Exp $	*/
+/*	$NetBSD: machdep.c,v 1.131 2023/08/29 21:34:50 andvar Exp $	*/
 /*	$OpenBSD: machdep.c,v 1.36 1999/05/22 21:22:19 weingart Exp $	*/
 
 /*
@@ -39,7 +39,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.130 2016/12/22 14:47:54 cherry Exp $");
+__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.131 2023/08/29 21:34:50 andvar Exp $");
 
 #include "opt_ddb.h"
 #include "opt_ddbparam.h"
@@ -200,7 +200,7 @@ mach_init(int argc, char *argv[], u_int 
 		bootinfo_msg = "no bootinfo found. (old bootblocks?)\n";
 
 	/* clear the BSS segment in kernel code */
-#if NKSYM > 0 || defined(DDB) || defined(MODULAR)
+#if NKSYMS > 0 || defined(DDB) || defined(MODULAR)
 	bi_syms = lookup_bootinfo(BTINFO_SYMTAB);
 
 	/* check whether there is valid bootinfo symtab info */



CVS commit: src/sys/arch/arc/jazz

2023-06-25 Thread Andrius Varanavicius
Module Name:src
Committed By:   andvar
Date:   Sun Jun 25 15:36:12 UTC 2023

Modified Files:
src/sys/arch/arc/jazz: jazzdmatlbreg.h

Log Message:
s/responible/responsible/ in comment.


To generate a diff of this commit:
cvs rdiff -u -r1.4 -r1.5 src/sys/arch/arc/jazz/jazzdmatlbreg.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/arc/jazz/jazzdmatlbreg.h
diff -u src/sys/arch/arc/jazz/jazzdmatlbreg.h:1.4 src/sys/arch/arc/jazz/jazzdmatlbreg.h:1.5
--- src/sys/arch/arc/jazz/jazzdmatlbreg.h:1.4	Sun Dec 11 12:16:39 2005
+++ src/sys/arch/arc/jazz/jazzdmatlbreg.h	Sun Jun 25 15:36:11 2023
@@ -1,4 +1,4 @@
-/*	$NetBSD: jazzdmatlbreg.h,v 1.4 2005/12/11 12:16:39 christos Exp $	*/
+/*	$NetBSD: jazzdmatlbreg.h,v 1.5 2023/06/25 15:36:11 andvar Exp $	*/
 /*	$OpenBSD: dma.h,v 1.3 1997/04/19 17:19:51 pefo Exp $	*/
 
 /*
@@ -35,7 +35,7 @@
  *	The R4030 system has four DMA channels capable of scatter/gather
  *	and full memory addressing. The maximum transfer length is 1Mb.
  *	DMA snopes the L2 cache so no precaution is required. However
- *	if L1 cache is cached 'write back' the processor is responible
+ *	if L1 cache is cached 'write back' the processor is responsible
  *	for flushing/invalidating it.
  *
  *	The DMA mapper has up to 4096 page descriptors.



CVS commit: src/sys/arch/arc/jazz

2023-06-25 Thread Andrius Varanavicius
Module Name:src
Committed By:   andvar
Date:   Sun Jun 25 15:36:12 UTC 2023

Modified Files:
src/sys/arch/arc/jazz: jazzdmatlbreg.h

Log Message:
s/responible/responsible/ in comment.


To generate a diff of this commit:
cvs rdiff -u -r1.4 -r1.5 src/sys/arch/arc/jazz/jazzdmatlbreg.h

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



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

2022-08-16 Thread Nick Hudson
Module Name:src
Committed By:   skrll
Date:   Tue Aug 16 14:00:03 UTC 2022

Modified Files:
src/sys/arch/arc/include: pci_machdep.h

Log Message:
PRovide pci_intr_setattr


To generate a diff of this commit:
cvs rdiff -u -r1.14 -r1.15 src/sys/arch/arc/include/pci_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/arc/include/pci_machdep.h
diff -u src/sys/arch/arc/include/pci_machdep.h:1.14 src/sys/arch/arc/include/pci_machdep.h:1.15
--- src/sys/arch/arc/include/pci_machdep.h:1.14	Tue Aug 16 13:59:18 2022
+++ src/sys/arch/arc/include/pci_machdep.h	Tue Aug 16 14:00:03 2022
@@ -1,4 +1,4 @@
-/* $NetBSD: pci_machdep.h,v 1.14 2022/08/16 13:59:18 skrll Exp $ */
+/* $NetBSD: pci_machdep.h,v 1.15 2022/08/16 14:00:03 skrll Exp $ */
 /* NetBSD: pci_machdep.h,v 1.3 1999/03/19 03:40:46 cgd Exp  */
 
 /*
@@ -66,6 +66,8 @@ struct arc_pci_chipset {
 			pci_intr_handle_t *);
 	const char	*(*pc_intr_string)(pci_chipset_tag_t,
 			pci_intr_handle_t, char *, size_t);
+	int		(*pc_intr_setattr)(void *, pci_intr_handle_t *,
+			int, uint64_t);
 	void		*(*pc_intr_establish)(pci_chipset_tag_t,
 			pci_intr_handle_t, int, int (*)(void *), void *);
 	void		(*pc_intr_disestablish)(pci_chipset_tag_t, void *);
@@ -103,4 +105,13 @@ struct arc_pci_chipset {
 #define	pci_conf_hook(c, b, d, f, i)	\
 (*(c)->pc_conf_hook)((c), (b), (d), (f), (i))
 
+static inline int
+pci_intr_setattr(pci_chipset_tag_t pc, pci_intr_handle_t *ihp,
+int attr, uint64_t data)
+{
+	if (!pc->pc_intr_setattr)
+		return ENODEV;
+	return pc->pc_intr_setattr(pc, ihp, attr, data);
+}
+
 #endif /* _MACHINE_PCI_MACHDEP_H_ */



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

2022-08-16 Thread Nick Hudson
Module Name:src
Committed By:   skrll
Date:   Tue Aug 16 14:00:03 UTC 2022

Modified Files:
src/sys/arch/arc/include: pci_machdep.h

Log Message:
PRovide pci_intr_setattr


To generate a diff of this commit:
cvs rdiff -u -r1.14 -r1.15 src/sys/arch/arc/include/pci_machdep.h

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



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

2022-08-16 Thread Nick Hudson
Module Name:src
Committed By:   skrll
Date:   Tue Aug 16 13:59:18 UTC 2022

Modified Files:
src/sys/arch/arc/include: pci_machdep.h

Log Message:
Multiple inclusion protection.


To generate a diff of this commit:
cvs rdiff -u -r1.13 -r1.14 src/sys/arch/arc/include/pci_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/arc/include/pci_machdep.h
diff -u src/sys/arch/arc/include/pci_machdep.h:1.13 src/sys/arch/arc/include/pci_machdep.h:1.14
--- src/sys/arch/arc/include/pci_machdep.h:1.13	Tue Aug 16 13:57:29 2022
+++ src/sys/arch/arc/include/pci_machdep.h	Tue Aug 16 13:59:18 2022
@@ -1,4 +1,4 @@
-/* $NetBSD: pci_machdep.h,v 1.13 2022/08/16 13:57:29 skrll Exp $ */
+/* $NetBSD: pci_machdep.h,v 1.14 2022/08/16 13:59:18 skrll Exp $ */
 /* NetBSD: pci_machdep.h,v 1.3 1999/03/19 03:40:46 cgd Exp  */
 
 /*
@@ -28,6 +28,9 @@
  * rights to redistribute these changes.
  */
 
+#ifndef	_MACHINE_PCI_MACHDEP_H_
+#define	_MACHINE_PCI_MACHDEP_H_
+
 /*
  * Machine-specific definitions for PCI autoconfiguration.
  */
@@ -99,3 +102,5 @@ struct arc_pci_chipset {
 (*(c)->pc_conf_interrupt)((c), (b), (d), (f), (s), (i))
 #define	pci_conf_hook(c, b, d, f, i)	\
 (*(c)->pc_conf_hook)((c), (b), (d), (f), (i))
+
+#endif /* _MACHINE_PCI_MACHDEP_H_ */



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

2022-08-16 Thread Nick Hudson
Module Name:src
Committed By:   skrll
Date:   Tue Aug 16 13:59:18 UTC 2022

Modified Files:
src/sys/arch/arc/include: pci_machdep.h

Log Message:
Multiple inclusion protection.


To generate a diff of this commit:
cvs rdiff -u -r1.13 -r1.14 src/sys/arch/arc/include/pci_machdep.h

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



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

2022-08-16 Thread Nick Hudson
Module Name:src
Committed By:   skrll
Date:   Tue Aug 16 13:57:29 UTC 2022

Modified Files:
src/sys/arch/arc/include: pci_machdep.h

Log Message:
Whitespace


To generate a diff of this commit:
cvs rdiff -u -r1.12 -r1.13 src/sys/arch/arc/include/pci_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/arc/include/pci_machdep.h
diff -u src/sys/arch/arc/include/pci_machdep.h:1.12 src/sys/arch/arc/include/pci_machdep.h:1.13
--- src/sys/arch/arc/include/pci_machdep.h:1.12	Tue Jul  7 03:38:45 2020
+++ src/sys/arch/arc/include/pci_machdep.h	Tue Aug 16 13:57:29 2022
@@ -1,4 +1,4 @@
-/* $NetBSD: pci_machdep.h,v 1.12 2020/07/07 03:38:45 thorpej Exp $ */
+/* $NetBSD: pci_machdep.h,v 1.13 2022/08/16 13:57:29 skrll Exp $ */
 /* NetBSD: pci_machdep.h,v 1.3 1999/03/19 03:40:46 cgd Exp  */
 
 /*
@@ -97,5 +97,5 @@ struct arc_pci_chipset {
 (*(c)->pc_intr_disestablish)((c), (iv))
 #define	pci_conf_interrupt(c, b, d, f, s, i)\
 (*(c)->pc_conf_interrupt)((c), (b), (d), (f), (s), (i))
-#define	pci_conf_hook(c, b, d, f, i)\
+#define	pci_conf_hook(c, b, d, f, i)	\
 (*(c)->pc_conf_hook)((c), (b), (d), (f), (i))



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

2022-08-16 Thread Nick Hudson
Module Name:src
Committed By:   skrll
Date:   Tue Aug 16 13:57:29 UTC 2022

Modified Files:
src/sys/arch/arc/include: pci_machdep.h

Log Message:
Whitespace


To generate a diff of this commit:
cvs rdiff -u -r1.12 -r1.13 src/sys/arch/arc/include/pci_machdep.h

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



CVS commit: src/sys/arch/arc/arc

2022-03-02 Thread Taylor R Campbell
Module Name:src
Committed By:   riastradh
Date:   Thu Mar  3 06:26:14 UTC 2022

Modified Files:
src/sys/arch/arc/arc: cpu.c

Log Message:
arc: Use device_set_private for cpuN.


To generate a diff of this commit:
cvs rdiff -u -r1.20 -r1.21 src/sys/arch/arc/arc/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/arc/arc/cpu.c
diff -u src/sys/arch/arc/arc/cpu.c:1.20 src/sys/arch/arc/arc/cpu.c:1.21
--- src/sys/arch/arc/arc/cpu.c:1.20	Wed Jun 24 06:19:52 2015
+++ src/sys/arch/arc/arc/cpu.c	Thu Mar  3 06:26:14 2022
@@ -1,4 +1,4 @@
-/*	$NetBSD: cpu.c,v 1.20 2015/06/24 06:19:52 matt Exp $	*/
+/*	$NetBSD: cpu.c,v 1.21 2022/03/03 06:26:14 riastradh Exp $	*/
 /*	$OpenBSD: cpu.c,v 1.8 1997/04/19 17:19:41 pefo Exp $ */
 
 /*
@@ -34,7 +34,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: cpu.c,v 1.20 2015/06/24 06:19:52 matt Exp $");
+__KERNEL_RCSID(0, "$NetBSD: cpu.c,v 1.21 2022/03/03 06:26:14 riastradh Exp $");
 
 #include 
 #include 
@@ -71,11 +71,10 @@ cpumatch(device_t parent, cfdata_t cf, v
 static void
 cpuattach(device_t parent, device_t self, void *aux)
 {
-
 	struct cpu_info * const ci = curcpu();
 
 	ci->ci_dev = self;
-	self->dv_private = ci;
+	device_set_private(self, ci);
 
 	aprint_normal(": ");
 



CVS commit: src/sys/arch/arc/arc

2022-03-02 Thread Taylor R Campbell
Module Name:src
Committed By:   riastradh
Date:   Thu Mar  3 06:26:14 UTC 2022

Modified Files:
src/sys/arch/arc/arc: cpu.c

Log Message:
arc: Use device_set_private for cpuN.


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

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



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

2021-04-23 Thread Nick Hudson
Module Name:src
Committed By:   skrll
Date:   Fri Apr 23 06:13:06 UTC 2021

Modified Files:
src/sys/arch/arc/include: bus_funcs.h

Log Message:
Use sys/cdefs.h __CONCAT3


To generate a diff of this commit:
cvs rdiff -u -r1.1 -r1.2 src/sys/arch/arc/include/bus_funcs.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/arc/include/bus_funcs.h
diff -u src/sys/arch/arc/include/bus_funcs.h:1.1 src/sys/arch/arc/include/bus_funcs.h:1.2
--- src/sys/arch/arc/include/bus_funcs.h:1.1	Fri Jul  1 17:09:58 2011
+++ src/sys/arch/arc/include/bus_funcs.h	Fri Apr 23 06:13:05 2021
@@ -1,4 +1,4 @@
-/*	$NetBSD: bus_funcs.h,v 1.1 2011/07/01 17:09:58 dyoung Exp $	*/
+/*	$NetBSD: bus_funcs.h,v 1.2 2021/04/23 06:13:05 skrll Exp $	*/
 /*	NetBSD: bus.h,v 1.27 2000/03/15 16:44:50 drochner Exp 	*/
 /*	$OpenBSD: bus.h,v 1.15 1999/08/11 23:15:21 niklas Exp $	*/
 
@@ -67,15 +67,6 @@
 #define _ARC_BUS_FUNCS_H_
 #ifdef _KERNEL
 
-/*
- * Utility macro; do not use outside this file.
- */
-#ifdef __STDC__
-#define __CONCAT3(a,b,c)	a##b##c
-#else
-#define __CONCAT3(a,b,c)	a/**/b/**/c
-#endif
-
 /* machine dependent utility function for bus_space users */
 void	arc_bus_space_malloc_set_safe(void);
 void	arc_bus_space_init(bus_space_tag_t, const char *,



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

2021-04-23 Thread Nick Hudson
Module Name:src
Committed By:   skrll
Date:   Fri Apr 23 06:13:06 UTC 2021

Modified Files:
src/sys/arch/arc/include: bus_funcs.h

Log Message:
Use sys/cdefs.h __CONCAT3


To generate a diff of this commit:
cvs rdiff -u -r1.1 -r1.2 src/sys/arch/arc/include/bus_funcs.h

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



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

2020-12-19 Thread Jason R Thorpe
Module Name:src
Committed By:   thorpej
Date:   Sat Dec 19 15:15:04 UTC 2020

Modified Files:
src/sys/arch/arc/dev: opms.c

Log Message:
Use sel{record,remove}_knote().


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

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



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

2020-12-19 Thread Jason R Thorpe
Module Name:src
Committed By:   thorpej
Date:   Sat Dec 19 15:15:04 UTC 2020

Modified Files:
src/sys/arch/arc/dev: opms.c

Log Message:
Use sel{record,remove}_knote().


To generate a diff of this commit:
cvs rdiff -u -r1.23 -r1.24 src/sys/arch/arc/dev/opms.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/arc/dev/opms.c
diff -u src/sys/arch/arc/dev/opms.c:1.23 src/sys/arch/arc/dev/opms.c:1.24
--- src/sys/arch/arc/dev/opms.c:1.23	Mon Sep  3 16:29:22 2018
+++ src/sys/arch/arc/dev/opms.c	Sat Dec 19 15:15:04 2020
@@ -1,4 +1,4 @@
-/*	$NetBSD: opms.c,v 1.23 2018/09/03 16:29:22 riastradh Exp $	*/
+/*	$NetBSD: opms.c,v 1.24 2020/12/19 15:15:04 thorpej Exp $	*/
 /*	$OpenBSD: pccons.c,v 1.22 1999/01/30 22:39:37 imp Exp $	*/
 /*	NetBSD: pms.c,v 1.21 1995/04/18 02:25:18 mycroft Exp	*/
 
@@ -80,7 +80,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: opms.c,v 1.23 2018/09/03 16:29:22 riastradh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: opms.c,v 1.24 2020/12/19 15:15:04 thorpej Exp $");
 
 #include 
 #include 
@@ -459,7 +459,7 @@ filt_opmsrdetach(struct knote *kn)
 	int s;
 
 	s = spltty();
-	SLIST_REMOVE(>sc_rsel.sel_klist, kn, knote, kn_selnext);
+	selremove_knote(>sc_rsel, kn);
 	splx(s);
 }
 
@@ -483,12 +483,10 @@ int
 opmskqfilter(dev_t dev, struct knote *kn)
 {
 	struct opms_softc *sc = device_lookup_private(_cd, PMSUNIT(dev));
-	struct klist *klist;
 	int s;
 
 	switch (kn->kn_filter) {
 	case EVFILT_READ:
-		klist = >sc_rsel.sel_klist;
 		kn->kn_fop = _filtops;
 		break;
 
@@ -499,7 +497,7 @@ opmskqfilter(dev_t dev, struct knote *kn
 	kn->kn_hook = sc;
 
 	s = spltty();
-	SLIST_INSERT_HEAD(klist, kn, kn_selnext);
+	selrecord_knote(>sc_rsel, kn);
 	splx(s);
 
 	return 0;



CVS commit: src/sys/arch/arc

2020-11-17 Thread Jason R Thorpe
Module Name:src
Committed By:   thorpej
Date:   Wed Nov 18 02:14:13 UTC 2020

Modified Files:
src/sys/arch/arc/arc: bus_dma.c p_dti_arcstation.c
src/sys/arch/arc/isa: isabus.c isadma_bounce.c
src/sys/arch/arc/jazz: bus_dma_jazz.c pckbc_jazzio.c
src/sys/arch/arc/pci: necpb.c

Log Message:
malloc(9) -> kmem(9)


To generate a diff of this commit:
cvs rdiff -u -r1.34 -r1.35 src/sys/arch/arc/arc/bus_dma.c
cvs rdiff -u -r1.19 -r1.20 src/sys/arch/arc/arc/p_dti_arcstation.c
cvs rdiff -u -r1.50 -r1.51 src/sys/arch/arc/isa/isabus.c
cvs rdiff -u -r1.15 -r1.16 src/sys/arch/arc/isa/isadma_bounce.c
cvs rdiff -u -r1.17 -r1.18 src/sys/arch/arc/jazz/bus_dma_jazz.c
cvs rdiff -u -r1.18 -r1.19 src/sys/arch/arc/jazz/pckbc_jazzio.c
cvs rdiff -u -r1.45 -r1.46 src/sys/arch/arc/pci/necpb.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/arc/arc/bus_dma.c
diff -u src/sys/arch/arc/arc/bus_dma.c:1.34 src/sys/arch/arc/arc/bus_dma.c:1.35
--- src/sys/arch/arc/arc/bus_dma.c:1.34	Thu Jun 11 08:22:08 2015
+++ src/sys/arch/arc/arc/bus_dma.c	Wed Nov 18 02:14:13 2020
@@ -1,4 +1,4 @@
-/*	$NetBSD: bus_dma.c,v 1.34 2015/06/11 08:22:08 matt Exp $	*/
+/*	$NetBSD: bus_dma.c,v 1.35 2020/11/18 02:14:13 thorpej Exp $	*/
 /*	NetBSD: bus_dma.c,v 1.20 2000/01/10 03:24:36 simonb Exp 	*/
 
 /*-
@@ -32,13 +32,14 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: bus_dma.c,v 1.34 2015/06/11 08:22:08 matt Exp $");
+__KERNEL_RCSID(0, "$NetBSD: bus_dma.c,v 1.35 2020/11/18 02:14:13 thorpej Exp $");
 
 #include 
 #include 
 #include 
 #include 
 #include 
+#include 
 
 #include 
 
@@ -74,6 +75,14 @@ _bus_dma_tag_init(bus_dma_tag_t t)
 	t->_dmamem_mmap = _bus_dmamem_mmap;
 }
 
+static size_t
+_bus_dmamap_mapsize(int const nsegments)
+{
+	KASSERT(nsegments > 0);
+	return sizeof(struct arc_bus_dmamap) +
+	(sizeof(bus_dma_segment_t) * (nsegments - 1));
+}
+
 /*
  * Common function for DMA map creation.  May be called by bus-specific
  * DMA map creation functions.
@@ -84,7 +93,6 @@ _bus_dmamap_create(bus_dma_tag_t t, bus_
 {
 	struct arc_bus_dmamap *map;
 	void *mapstore;
-	size_t mapsize;
 
 	/*
 	 * Allocate and initialize the DMA map.  The end of the map
@@ -98,10 +106,8 @@ _bus_dmamap_create(bus_dma_tag_t t, bus_
 	 * The bus_dmamap_t includes one bus_dma_segment_t, hence
 	 * the (nsegments - 1).
 	 */
-	mapsize = sizeof(struct arc_bus_dmamap) +
-	(sizeof(bus_dma_segment_t) * (nsegments - 1));
-	if ((mapstore = malloc(mapsize, M_DMAMAP,
-	((flags & BUS_DMA_NOWAIT) ? M_NOWAIT : M_WAITOK) | M_ZERO)) == NULL)
+	if ((mapstore = kmem_zalloc(_bus_dmamap_mapsize(nsegments),
+	(flags & BUS_DMA_NOWAIT) ? KM_NOSLEEP : KM_SLEEP)) == NULL)
 		return ENOMEM;
 
 	map = (struct arc_bus_dmamap *)mapstore;
@@ -127,7 +133,7 @@ void
 _bus_dmamap_destroy(bus_dma_tag_t t, bus_dmamap_t map)
 {
 
-	free(map, M_DMAMAP);
+	kmem_free(map, _bus_dmamap_mapsize(map->_dm_segcnt));
 }
 
 /*

Index: src/sys/arch/arc/arc/p_dti_arcstation.c
diff -u src/sys/arch/arc/arc/p_dti_arcstation.c:1.19 src/sys/arch/arc/arc/p_dti_arcstation.c:1.20
--- src/sys/arch/arc/arc/p_dti_arcstation.c:1.19	Sat Jun 13 20:01:27 2020
+++ src/sys/arch/arc/arc/p_dti_arcstation.c	Wed Nov 18 02:14:13 2020
@@ -1,4 +1,4 @@
-/*	$NetBSD: p_dti_arcstation.c,v 1.19 2020/06/13 20:01:27 ad Exp $	*/
+/*	$NetBSD: p_dti_arcstation.c,v 1.20 2020/11/18 02:14:13 thorpej Exp $	*/
 /*	$OpenBSD: machdep.c,v 1.36 1999/05/22 21:22:19 weingart Exp $	*/
 
 /*
@@ -39,7 +39,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: p_dti_arcstation.c,v 1.19 2020/06/13 20:01:27 ad Exp $");
+__KERNEL_RCSID(0, "$NetBSD: p_dti_arcstation.c,v 1.20 2020/11/18 02:14:13 thorpej Exp $");
 
 #define __INTR_PRIVATE
 #include 
@@ -165,7 +165,7 @@ btl_dti_arcstation_bouncemem(u_int *base
 
 	*sizep = TYNE_S_BOUNCE; /* Good enough? XXX */
 #if 0
-	*basep = (u_int) malloc(*sizep, M_DEVBUF, M_WAITOK);
+	*basep = (u_int) kmem_alloc(*sizep, KM_SLEEP);
 #else
 	*basep = (u_int) rpc44_buffer | 0xa000;
 #endif

Index: src/sys/arch/arc/isa/isabus.c
diff -u src/sys/arch/arc/isa/isabus.c:1.50 src/sys/arch/arc/isa/isabus.c:1.51
--- src/sys/arch/arc/isa/isabus.c:1.50	Sun Nov 10 21:16:22 2019
+++ src/sys/arch/arc/isa/isabus.c	Wed Nov 18 02:14:13 2020
@@ -1,4 +1,4 @@
-/*	$NetBSD: isabus.c,v 1.50 2019/11/10 21:16:22 chs Exp $	*/
+/*	$NetBSD: isabus.c,v 1.51 2020/11/18 02:14:13 thorpej Exp $	*/
 /*	$OpenBSD: isabus.c,v 1.15 1998/03/16 09:38:46 pefo Exp $	*/
 /*	NetBSD: isa.c,v 1.33 1995/06/28 04:30:51 cgd Exp 	*/
 
@@ -120,7 +120,7 @@ WITH THE USE OR PERFORMANCE OF THIS SOFT
 */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: isabus.c,v 1.50 2019/11/10 21:16:22 chs Exp $");
+__KERNEL_RCSID(0, "$NetBSD: isabus.c,v 1.51 2020/11/18 02:14:13 thorpej Exp $");
 
 #include 
 #include 
@@ -129,7 +129,7 @@ __KERNEL_RCSID(0, "$NetBSD: isabus.c,v 1
 #include 
 #include 
 #include 
-#include 
+#include 
 #include 
 
 #include 
@@ -340,7 

CVS commit: src/sys/arch/arc

2020-11-17 Thread Jason R Thorpe
Module Name:src
Committed By:   thorpej
Date:   Wed Nov 18 02:14:13 UTC 2020

Modified Files:
src/sys/arch/arc/arc: bus_dma.c p_dti_arcstation.c
src/sys/arch/arc/isa: isabus.c isadma_bounce.c
src/sys/arch/arc/jazz: bus_dma_jazz.c pckbc_jazzio.c
src/sys/arch/arc/pci: necpb.c

Log Message:
malloc(9) -> kmem(9)


To generate a diff of this commit:
cvs rdiff -u -r1.34 -r1.35 src/sys/arch/arc/arc/bus_dma.c
cvs rdiff -u -r1.19 -r1.20 src/sys/arch/arc/arc/p_dti_arcstation.c
cvs rdiff -u -r1.50 -r1.51 src/sys/arch/arc/isa/isabus.c
cvs rdiff -u -r1.15 -r1.16 src/sys/arch/arc/isa/isadma_bounce.c
cvs rdiff -u -r1.17 -r1.18 src/sys/arch/arc/jazz/bus_dma_jazz.c
cvs rdiff -u -r1.18 -r1.19 src/sys/arch/arc/jazz/pckbc_jazzio.c
cvs rdiff -u -r1.45 -r1.46 src/sys/arch/arc/pci/necpb.c

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



CVS commit: src/sys/arch/arc

2020-08-14 Thread Nick Hudson
Module Name:src
Committed By:   skrll
Date:   Fri Aug 14 16:53:06 UTC 2020

Modified Files:
src/sys/arch/arc/arc: arcbios.c
src/sys/arch/arc/conf: files.arc
Added Files:
src/sys/arch/arc/arc: arcbios_stubs.S

Log Message:
Fix build by splitting large amount of inline assembling into a seperate
.S file.  Same stub (/trampoline) code before and after this change.


To generate a diff of this commit:
cvs rdiff -u -r1.18 -r1.19 src/sys/arch/arc/arc/arcbios.c
cvs rdiff -u -r0 -r1.1 src/sys/arch/arc/arc/arcbios_stubs.S
cvs rdiff -u -r1.66 -r1.67 src/sys/arch/arc/conf/files.arc

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/arc/arc/arcbios.c
diff -u src/sys/arch/arc/arc/arcbios.c:1.18 src/sys/arch/arc/arc/arcbios.c:1.19
--- src/sys/arch/arc/arc/arcbios.c:1.18	Fri May 29 23:02:51 2020
+++ src/sys/arch/arc/arc/arcbios.c	Fri Aug 14 16:53:06 2020
@@ -1,4 +1,4 @@
-/*	$NetBSD: arcbios.c,v 1.18 2020/05/29 23:02:51 tsutsui Exp $	*/
+/*	$NetBSD: arcbios.c,v 1.19 2020/08/14 16:53:06 skrll Exp $	*/
 /*	$OpenBSD: arcbios.c,v 1.3 1998/06/06 06:33:33 mickey Exp $	*/
 
 /*-
@@ -31,7 +31,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: arcbios.c,v 1.18 2020/05/29 23:02:51 tsutsui Exp $");
+__KERNEL_RCSID(0, "$NetBSD: arcbios.c,v 1.19 2020/08/14 16:53:06 skrll Exp $");
 
 #include 
 #include 
@@ -39,7 +39,6 @@ __KERNEL_RCSID(0, "$NetBSD: arcbios.c,v 
 #include 
 #include 
 #include 
-#include 
 #include 
 #include 
 #include 
@@ -69,97 +68,6 @@ arc_dsp_stat_t	arc_displayinfo;	/* Save 
 int arc_cpu_l2cache_size = 0;
 
 /*
- *	ARC Bios trampoline code.
- *	Note we have to save/restore reserved MIPS_CURLWP register.
- */
-#define ARC_Call(Name,Offset)	\
-__asm("\n"			\
-"	.text\n"		\
-"	.ent	" #Name "\n"	\
-"	.align	3\n"		\
-"	.set	noreorder\n"	\
-"	.globl	" #Name "\n" 	\
-#Name":\n"			\
-"	subu	$29, " ___STRING(CALLFRAME_SIZ) "\n"		\
-"	sw	$31, " ___STRING(CALLFRAME_RA) "($29)\n"	\
-"	sw	$16, " ___STRING(CALLFRAME_SP) "($29)\n"	\
-"	lw	$2, 0x80001020\n"\
-"	lw	$2," #Offset "($2)\n"\
-"	jalr	$2\n"		\
-"	 move	$16, " ___STRING(MIPS_CURLWP) "\n"		\
-"	move	" ___STRING(MIPS_CURLWP) ", $16\n"		\
-"	lw	$31, " ___STRING(CALLFRAME_RA) "($29)\n"	\
-"	lw	$16, " ___STRING(CALLFRAME_SP) "($29)\n"	\
-"	j	$31\n"		\
-"	 addu	$29, " ___STRING(CALLFRAME_SIZ) "\n"		\
-"	.end	" #Name "\n"	);
-
-#define ARC_Call5(Name,Offset)	\
-__asm("\n"			\
-"	.text\n"		\
-"	.ent	" #Name "\n"	\
-"	.align	3\n"		\
-"	.set	noreorder\n"	\
-"	.globl	" #Name "\n" 	\
-#Name":\n"			\
-"	subu	$29, " ___STRING(CALLFRAME_SIZ + 4) "\n"	\
-"	sw	$31, " ___STRING(CALLFRAME_RA + 4) "($29)\n"	\
-"	sw	$16, " ___STRING(CALLFRAME_SP + 4) "($29)\n"	\
-"	lw	$12, " ___STRING(CALLFRAME_SIZ + 4 + 16) "($29)\n" \
-"	sw	$12, 16($29)\n"	\
-"	lw	$2, 0x80001020\n"\
-"	lw	$2," #Offset "($2)\n"\
-"	jalr	$2\n"		\
-"	 move	$16, " ___STRING(MIPS_CURLWP) "\n"		\
-"	move	" ___STRING(MIPS_CURLWP) ", $16\n"		\
-"	lw	$31, " ___STRING(CALLFRAME_RA + 4) "($29)\n"	\
-"	lw	$16, " ___STRING(CALLFRAME_SP + 4) "($29)\n"	\
-"	j	$31\n"		\
-"	 addu	$29, " ___STRING(CALLFRAME_SIZ + 4) "\n"	\
-"	.end	" #Name "\n"	);
-
-ARC_Call(Bios_Load,			0x00);
-ARC_Call5(Bios_Invoke,			0x04);
-ARC_Call(Bios_Execute,			0x08);
-ARC_Call(Bios_Halt,			0x0c);
-ARC_Call(Bios_PowerDown,		0x10);
-ARC_Call(Bios_Restart,			0x14);
-ARC_Call(Bios_Reboot,			0x18);
-ARC_Call(Bios_EnterInteractiveMode,	0x1c);
-ARC_Call(Bios_Unused1,			0x20);	/* return_from_main? */
-ARC_Call(Bios_GetPeer,			0x24);
-ARC_Call(Bios_GetChild,			0x28);
-ARC_Call(Bios_GetParent,		0x2c);
-ARC_Call(Bios_GetConfigurationData,	0x30);
-ARC_Call(Bios_AddChild,			0x34);
-ARC_Call(Bios_DeleteComponent,		0x38);
-ARC_Call(Bios_GetComponent,		0x3c);
-ARC_Call(Bios_SaveConfiguration,	0x40);
-ARC_Call(Bios_GetSystemId,		0x44);
-ARC_Call(Bios_GetMemoryDescriptor,	0x48);
-ARC_Call(Bios_Unused2,			0x4c);	/* signal??? */
-ARC_Call(Bios_GetTime,			0x50);
-ARC_Call(Bios_GetRelativeTime,		0x54);
-ARC_Call(Bios_GetDirectoryEntry,	0x58);
-ARC_Call(Bios_Open,			0x5c);
-ARC_Call(Bios_Close,			0x60);
-ARC_Call(Bios_Read,			0x64);
-ARC_Call(Bios_GetReadStatus,		0x68);
-ARC_Call(Bios_Write,			0x6c);
-ARC_Call(Bios_Seek,			0x70);
-ARC_Call(Bios_Mount,			0x74);
-ARC_Call(Bios_GetEnvironmentVariable,	0x78);
-ARC_Call(Bios_SetEnvironmentVariable,	0x7c);
-ARC_Call(Bios_GetFileInformation,	0x80);
-ARC_Call(Bios_SetFileInformation,	0x84);
-ARC_Call(Bios_FlushAllCaches,		0x88);
-/* note: the followings don't exist on SGI */
-#ifdef arc
-ARC_Call(Bios_TestUnicodeCharacter,	0x8c);
-ARC_Call(Bios_GetDisplayStatus,		0x90);
-#endif
-
-/*
  *	BIOS based console, for early stage.
  */
 

Index: src/sys/arch/arc/conf/files.arc
diff -u src/sys/arch/arc/conf/files.arc:1.66 src/sys/arch/arc/conf/files.arc:1.67
--- src/sys/arch/arc/conf/files.arc:1.66	Mon Jun 15 22:03:39 

CVS commit: src/sys/arch/arc

2020-08-14 Thread Nick Hudson
Module Name:src
Committed By:   skrll
Date:   Fri Aug 14 16:53:06 UTC 2020

Modified Files:
src/sys/arch/arc/arc: arcbios.c
src/sys/arch/arc/conf: files.arc
Added Files:
src/sys/arch/arc/arc: arcbios_stubs.S

Log Message:
Fix build by splitting large amount of inline assembling into a seperate
.S file.  Same stub (/trampoline) code before and after this change.


To generate a diff of this commit:
cvs rdiff -u -r1.18 -r1.19 src/sys/arch/arc/arc/arcbios.c
cvs rdiff -u -r0 -r1.1 src/sys/arch/arc/arc/arcbios_stubs.S
cvs rdiff -u -r1.66 -r1.67 src/sys/arch/arc/conf/files.arc

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



CVS commit: src/sys/arch/arc/jazz

2020-06-17 Thread Jason R Thorpe
Module Name:src
Committed By:   thorpej
Date:   Wed Jun 17 06:20:05 UTC 2020

Modified Files:
src/sys/arch/arc/jazz: jazzdmatlb.c

Log Message:
Use a vmem arena rather than an extent map to manage Jazz DMA TLB
address space.


To generate a diff of this commit:
cvs rdiff -u -r1.16 -r1.17 src/sys/arch/arc/jazz/jazzdmatlb.c

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



CVS commit: src/sys/arch/arc/jazz

2020-06-17 Thread Jason R Thorpe
Module Name:src
Committed By:   thorpej
Date:   Wed Jun 17 06:20:05 UTC 2020

Modified Files:
src/sys/arch/arc/jazz: jazzdmatlb.c

Log Message:
Use a vmem arena rather than an extent map to manage Jazz DMA TLB
address space.


To generate a diff of this commit:
cvs rdiff -u -r1.16 -r1.17 src/sys/arch/arc/jazz/jazzdmatlb.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/arc/jazz/jazzdmatlb.c
diff -u src/sys/arch/arc/jazz/jazzdmatlb.c:1.16 src/sys/arch/arc/jazz/jazzdmatlb.c:1.17
--- src/sys/arch/arc/jazz/jazzdmatlb.c:1.16	Fri Jan 27 18:52:50 2012
+++ src/sys/arch/arc/jazz/jazzdmatlb.c	Wed Jun 17 06:20:05 2020
@@ -1,4 +1,4 @@
-/*	$NetBSD: jazzdmatlb.c,v 1.16 2012/01/27 18:52:50 para Exp $	*/
+/*	$NetBSD: jazzdmatlb.c,v 1.17 2020/06/17 06:20:05 thorpej Exp $	*/
 /*	$OpenBSD: dma.c,v 1.5 1998/03/01 16:49:57 niklas Exp $	*/
 
 /*-
@@ -33,14 +33,14 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: jazzdmatlb.c,v 1.16 2012/01/27 18:52:50 para Exp $");
+__KERNEL_RCSID(0, "$NetBSD: jazzdmatlb.c,v 1.17 2020/06/17 06:20:05 thorpej Exp $");
 
 #include 
 #include 
 #include 
-#include 
 #include 
 #include 
+#include 
 
 #include 
 
@@ -54,17 +54,12 @@ __KERNEL_RCSID(0, "$NetBSD: jazzdmatlb.c
 
 extern paddr_t	kvtophys(vaddr_t);	/* XXX */
 
-/*
- * Currently, only NET and BIO devices use DMA, and splnet > splbio.
- */
-#define spldma()	splnet()
-
 #define NDMATLB		(JAZZ_DMATLB_SIZE / sizeof(jazz_dma_pte_t))
 
 static bus_space_tag_t dmatlb_iot;
 static bus_space_handle_t dmatlb_ioh;
 
-static struct extent *dmatlbmap;
+static vmem_t *dmatlb_arena;
 static jazz_dma_pte_t *dma_tlb;
 
 /*
@@ -85,9 +80,15 @@ jazz_dmatlb_init(bus_space_tag_t iot, bu
 	mips_dcache_wbinv_all();/* Make sure no map entries are cached */
 	memset((char *)dma_tlb, 0, JAZZ_DMATLB_SIZE);
 
-	dmatlbmap = extent_create("dmatlb", 0, NDMATLB, NULL, 0, EX_NOWAIT);
-	if (dmatlbmap == NULL)
-		panic("jazz_dmatlb_init: cannot create extent map");
+	dmatlb_arena = vmem_create("dmatlb", 0, NDMATLB,
+   1,		/* quantum */
+   NULL,	/* importfn */
+   NULL,	/* releasefn */
+   NULL,	/* source */
+   0,		/* qcache_max */
+   VM_SLEEP,
+   IPL_VM);
+	KASSERT(dmatlb_arena != NULL);
 
 	bus_space_write_4(dmatlb_iot, dmatlb_ioh, JAZZ_DMATLBREG_MAP,
 	MIPS_KSEG1_TO_PHYS(dma_tlb));
@@ -103,16 +104,20 @@ jazz_dmatlb_init(bus_space_tag_t iot, bu
 jazz_dma_pte_t *
 jazz_dmatlb_alloc(int npte, bus_size_t boundary, int flags, bus_addr_t *addr)
 {
-	u_long start;
+	vmem_addr_t start;
 	int err;
-	int s;
 
-	s = spldma();
-	err = extent_alloc(dmatlbmap, npte, 1, boundary / JAZZ_DMA_PAGE_SIZE,
-	(flags & BUS_DMA_WAITOK) ? (EX_WAITSPACE | EX_WAITOK) : EX_NOWAIT,
-	);
-	splx(s);
+	const vm_flag_t vmflags = VM_INSTANTFIT |
+	((flags & BUS_DMA_WAITOK) ? VM_SLEEP : VM_NOSLEEP);
 
+	err = vmem_xalloc(dmatlb_arena, npte,
+			  1,			/* align */
+			  0,			/* phase */
+			  boundary / JAZZ_DMA_PAGE_SIZE,
+			  VMEM_ADDR_MIN,
+			  VMEM_ADDR_MAX,
+			  vmflags,
+			  );
 	if (err)
 		return NULL;
 
@@ -127,13 +132,10 @@ jazz_dmatlb_alloc(int npte, bus_size_t b
 void
 jazz_dmatlb_free(bus_addr_t addr, int npte)
 {
-	u_long start;
-	int s;
+	vmem_addr_t start;
 
 	start = addr / JAZZ_DMA_PAGE_SIZE;
-	s = spldma();
-	extent_free(dmatlbmap, start, npte, EX_NOWAIT);
-	splx(s);
+	vmem_xfree(dmatlb_arena, start, npte);
 }
 
 /*



CVS commit: src/sys/arch/arc

2020-06-15 Thread Izumi Tsutsui
Module Name:src
Committed By:   tsutsui
Date:   Mon Jun 15 22:03:39 UTC 2020

Modified Files:
src/sys/arch/arc/conf: files.arc
src/sys/arch/arc/include: disklabel.h
Removed Files:
src/sys/arch/arc/arc: disksubr.c

Log Message:
Drop compat support for OpenBSD/arc disks.

Note OpenBSD/arc was discontinued after 1998.
Tested on GXemul and ok'ed by soda@.


To generate a diff of this commit:
cvs rdiff -u -r1.30 -r0 src/sys/arch/arc/arc/disksubr.c
cvs rdiff -u -r1.65 -r1.66 src/sys/arch/arc/conf/files.arc
cvs rdiff -u -r1.12 -r1.13 src/sys/arch/arc/include/disklabel.h

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



CVS commit: src/sys/arch/arc

2020-06-15 Thread Izumi Tsutsui
Module Name:src
Committed By:   tsutsui
Date:   Mon Jun 15 22:03:39 UTC 2020

Modified Files:
src/sys/arch/arc/conf: files.arc
src/sys/arch/arc/include: disklabel.h
Removed Files:
src/sys/arch/arc/arc: disksubr.c

Log Message:
Drop compat support for OpenBSD/arc disks.

Note OpenBSD/arc was discontinued after 1998.
Tested on GXemul and ok'ed by soda@.


To generate a diff of this commit:
cvs rdiff -u -r1.30 -r0 src/sys/arch/arc/arc/disksubr.c
cvs rdiff -u -r1.65 -r1.66 src/sys/arch/arc/conf/files.arc
cvs rdiff -u -r1.12 -r1.13 src/sys/arch/arc/include/disklabel.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/arc/conf/files.arc
diff -u src/sys/arch/arc/conf/files.arc:1.65 src/sys/arch/arc/conf/files.arc:1.66
--- src/sys/arch/arc/conf/files.arc:1.65	Sun Jul 20 10:22:54 2014
+++ src/sys/arch/arc/conf/files.arc	Mon Jun 15 22:03:39 2020
@@ -1,4 +1,4 @@
-#	$NetBSD: files.arc,v 1.65 2014/07/20 10:22:54 alnsn Exp $
+#	$NetBSD: files.arc,v 1.66 2020/06/15 22:03:39 tsutsui Exp $
 #	$OpenBSD: files.arc,v 1.21 1999/09/11 10:20:20 niklas Exp $
 #
 # maxpartitions must be first item in files.${ARCH}
@@ -63,9 +63,9 @@ file	arch/arc/arc/platform.c
 ##
 ##	Required files
 ##
+file	kern/subr_disk_mbr.c
 
 file	arch/arc/arc/autoconf.c
-file	arch/arc/arc/disksubr.c
 file	arch/arc/arc/machdep.c
 #file	arch/arc/arc/minidebug.c
 file	arch/arc/arc/timer.c

Index: src/sys/arch/arc/include/disklabel.h
diff -u src/sys/arch/arc/include/disklabel.h:1.12 src/sys/arch/arc/include/disklabel.h:1.13
--- src/sys/arch/arc/include/disklabel.h:1.12	Thu May 16 19:06:44 2013
+++ src/sys/arch/arc/include/disklabel.h	Mon Jun 15 22:03:39 2020
@@ -1,4 +1,4 @@
-/*	$NetBSD: disklabel.h,v 1.12 2013/05/16 19:06:44 christos Exp $	*/
+/*	$NetBSD: disklabel.h,v 1.13 2020/06/15 22:03:39 tsutsui Exp $	*/
 /*	$OpenBSD: disklabel.h,v 1.14 1999/03/23 16:36:17 millert Exp $	*/
 /*	NetBSD: disklabel.h,v 1.3 1996/03/09 20:52:54 ghudson Exp 	*/
 
@@ -41,8 +41,6 @@
 #define	MAXPARTITIONS	16		/* number of partitions */
 #define	RAW_PART	3		/* raw partition: ie. XX?d (XXX) */
 
-#define	OPENBSD_RAW_PART 2		/* raw partition: XX?c */
-
 /* Pull in MBR partition definitions. */
 #if HAVE_NBTOOL_CONFIG_H
 #include 



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

2020-06-03 Thread Izumi Tsutsui
Module Name:src
Committed By:   tsutsui
Date:   Wed Jun  3 11:33:38 UTC 2020

Modified Files:
src/sys/arch/arc/stand/boot: Makefile

Log Message:
Explicitly strip debug info on calling objdump for ecoff boot binaries.

As noted by martin@ on tech-toolchain@, release binaries are built
with MKDEBUG=yes so standalone binaries should explicitly remove
debug info generated by -g option.
 https://mail-index.netbsd.org/tech-toolchain/2020/06/02/msg003809.html

Should be pulled up to netbsd-9.
(ARC BIOS gets confused by debug info sections in ecoff binaries
 and boot binary in 9.0 doesn't work)


To generate a diff of this commit:
cvs rdiff -u -r1.17 -r1.18 src/sys/arch/arc/stand/boot/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/arc/stand/boot/Makefile
diff -u src/sys/arch/arc/stand/boot/Makefile:1.17 src/sys/arch/arc/stand/boot/Makefile:1.18
--- src/sys/arch/arc/stand/boot/Makefile:1.17	Sat Apr  8 19:53:20 2017
+++ src/sys/arch/arc/stand/boot/Makefile	Wed Jun  3 11:33:38 2020
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.17 2017/04/08 19:53:20 christos Exp $
+# $NetBSD: Makefile,v 1.18 2020/06/03 11:33:38 tsutsui Exp $
 
 .include 
 
@@ -62,7 +62,7 @@ ${PROG}: ${OBJS} ${LIBS}
 	-e start -o ${PROG}.elf ${OBJS} ${LIBS}
 	@${SIZE} ${PROG}.elf
 	${OBJCOPY} --impure -O ecoff-littlemips \
-	-R .pdr -R .mdebug.abi32 -R .comment -R .ident \
+	-R .pdr -R .mdebug.abi32 -R .comment -R .ident --strip-debug \
 	${PROG}.elf ${.TARGET}
 
 CLEANFILES+=	${PROG}.elf ${PROG}.map



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

2020-06-03 Thread Izumi Tsutsui
Module Name:src
Committed By:   tsutsui
Date:   Wed Jun  3 11:33:38 UTC 2020

Modified Files:
src/sys/arch/arc/stand/boot: Makefile

Log Message:
Explicitly strip debug info on calling objdump for ecoff boot binaries.

As noted by martin@ on tech-toolchain@, release binaries are built
with MKDEBUG=yes so standalone binaries should explicitly remove
debug info generated by -g option.
 https://mail-index.netbsd.org/tech-toolchain/2020/06/02/msg003809.html

Should be pulled up to netbsd-9.
(ARC BIOS gets confused by debug info sections in ecoff binaries
 and boot binary in 9.0 doesn't work)


To generate a diff of this commit:
cvs rdiff -u -r1.17 -r1.18 src/sys/arch/arc/stand/boot/Makefile

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



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

2020-05-29 Thread Izumi Tsutsui
Module Name:src
Committed By:   tsutsui
Date:   Fri May 29 23:24:39 UTC 2020

Modified Files:
src/sys/arch/arc/conf: GENERIC RAMDISK

Log Message:
Try to shrink kernels to smaller than ~6MB due to ARC BIOS restriction.

Currently NetBSD/arc kernels are loaded at 0x8020
(on some machines ARC BIOS uses regions before it) and
ARC BIOS also uses around 0x807f, so bootloader fails
on loading >6MB kernels.

Note GXemul doesn't have this restriction because it loads
a kernel directly via a command line argument.

Tested by installing using sysinst on RAMDISK kernel on netbsd-9.

Should be pulled up to netbsd-9.


To generate a diff of this commit:
cvs rdiff -u -r1.197 -r1.198 src/sys/arch/arc/conf/GENERIC
cvs rdiff -u -r1.82 -r1.83 src/sys/arch/arc/conf/RAMDISK

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/arc/conf/GENERIC
diff -u src/sys/arch/arc/conf/GENERIC:1.197 src/sys/arch/arc/conf/GENERIC:1.198
--- src/sys/arch/arc/conf/GENERIC:1.197	Sat Jan 25 18:38:35 2020
+++ src/sys/arch/arc/conf/GENERIC	Fri May 29 23:24:39 2020
@@ -1,4 +1,4 @@
-# $NetBSD: GENERIC,v 1.197 2020/01/25 18:38:35 thorpej Exp $
+# $NetBSD: GENERIC,v 1.198 2020/05/29 23:24:39 tsutsui Exp $
 #
 # GENERIC machine description file
 #
@@ -22,7 +22,7 @@ include 	"arch/arc/conf/std.arc"
 
 options 	INCLUDE_CONFIG_FILE	# embed config file in kernel binary
 
-#ident		"GENERIC-$Revision: 1.197 $"
+#ident		"GENERIC-$Revision: 1.198 $"
 
 maxusers	32		# estimated number of users
 
@@ -41,6 +41,7 @@ options 	PLATFORM_SNI_RM200PCI
 
 # CPU related options
 makeoptions	CPUFLAGS="-march=mips3 -mabi=32"
+makeoptions	COPTS="-O2 -fno-unwind-tables"
 
 # Standard system options
 
@@ -78,34 +79,34 @@ include 	"conf/compat_netbsd10.config"
 options 	COMPAT_386BSD_MBRPART # recognize old partition ID
 
 # mipsel specific
-options 	COMPAT_ULTRIX	# Ultrix binary compatibility
+#options 	COMPAT_ULTRIX	# Ultrix binary compatibility
 options 	EXEC_ECOFF	# Ultrix RISC binaries are ECOFF format
 
 # File systems
 file-system 	FFS		# fast filesystem
 file-system 	EXT2FS		# second extended file system (linux)
-file-system 	LFS		# log-structured file system
+#file-system 	LFS		# log-structured file system
 file-system 	MFS		# memory file system
-file-system 	NTFS		# Windows/NT file system (experimental)
+#file-system 	NTFS		# Windows/NT file system (experimental)
 file-system 	CD9660		# ISO 9660 + Rock Ridge file system
 file-system 	MSDOSFS		# MS-DOS file system
 file-system 	NFS		# Network File System client
 file-system 	FDESC		# /dev/fd
 file-system 	KERNFS		# /kern
 file-system 	NULLFS		# loopback file system
-file-system 	OVERLAY		# overlay file system
-file-system	PUFFS		# Userspace file systems (e.g. ntfs-3g & sshfs)
+#file-system 	OVERLAY		# overlay file system
+#file-system	PUFFS		# Userspace file systems (e.g. ntfs-3g & sshfs)
 file-system 	PROCFS		# /proc
-file-system 	UMAPFS		# NULLFS + uid and gid remapping
-file-system 	UNION		# union file system
+#file-system 	UMAPFS		# NULLFS + uid and gid remapping
+#file-system 	UNION		# union file system
 #file-system	CODA		# Coda File System; also needs vcoda (below)
 file-system	PTYFS		# /dev/pts/N support
 file-system	TMPFS		# Efficient memory file-system
 #file-system	UDF		# experimental - OSTA UDF CD/DVD file-system
 
 # File system options
-options 	QUOTA		# legacy UFS quotas
-options 	QUOTA2		# new, in-filesystem UFS quotas
+#options 	QUOTA		# legacy UFS quotas
+#options 	QUOTA2		# new, in-filesystem UFS quotas
 #options 	FFS_EI		# FFS Endian Independent support
 options 	WAPBL		# File system journaling support
 #options 	UFS_DIRHASH	# UFS Large Directory Hashing - Experimental
@@ -123,7 +124,7 @@ options 	INET6		# IPV6
 #options 	IPSEC_DEBUG	# debug for IP security
 #options 	MROUTING	# IP multicast routing
 #options 	PIM		# Protocol Independent Multicast
-options 	NETATALK	# AppleTalk networking protocols
+#options 	NETATALK	# AppleTalk networking protocols
 options 	PPP_BSDCOMP	# BSD-Compress compression support for PPP
 options 	PPP_DEFLATE	# Deflate compression support for PPP
 options 	PPP_FILTER	# Active filter support for PPP (requires bpf)
@@ -159,7 +160,7 @@ options 	WSEMUL_VT100	# VT100 emulation
 options 	WSDISPLAY_COMPAT_USL		# wsconscfg VT handling
 
 # Kernel root file system and dump configuration.
-options 	NFS_BOOT_DHCP,NFS_BOOT_BOOTPARAM
+options 	NFS_BOOT_DHCP
 config		netbsd	root on ? type ?
 #config		netbsd	root on sd0a type ffs
 #config		netbsd	root on ? type nfs
@@ -236,8 +237,8 @@ com0		at isa? port 0x3f8 irq 4
 com1		at isa? port 0x2f8 irq 3
 com2		at isa? port 0x3e8 irq 4
 com3		at isa? port 0x2e8 irq 3
-ast0		at isa? port 0x1a0 irq 3	# AST 4-port serial cards
-com*		at ast? slave ?
+#ast0		at isa? port 0x1a0 irq 3	# AST 4-port serial cards
+#com*		at ast? slave ?
 
 # Joystick driver. Probe is a little strange; add only if you have one.
 #joy0		at isa? 

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

2020-05-29 Thread Izumi Tsutsui
Module Name:src
Committed By:   tsutsui
Date:   Fri May 29 23:24:39 UTC 2020

Modified Files:
src/sys/arch/arc/conf: GENERIC RAMDISK

Log Message:
Try to shrink kernels to smaller than ~6MB due to ARC BIOS restriction.

Currently NetBSD/arc kernels are loaded at 0x8020
(on some machines ARC BIOS uses regions before it) and
ARC BIOS also uses around 0x807f, so bootloader fails
on loading >6MB kernels.

Note GXemul doesn't have this restriction because it loads
a kernel directly via a command line argument.

Tested by installing using sysinst on RAMDISK kernel on netbsd-9.

Should be pulled up to netbsd-9.


To generate a diff of this commit:
cvs rdiff -u -r1.197 -r1.198 src/sys/arch/arc/conf/GENERIC
cvs rdiff -u -r1.82 -r1.83 src/sys/arch/arc/conf/RAMDISK

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



CVS commit: src/sys/arch/arc/arc

2020-05-29 Thread Izumi Tsutsui
Module Name:src
Committed By:   tsutsui
Date:   Fri May 29 23:02:51 UTC 2020

Modified Files:
src/sys/arch/arc/arc: arcbios.c

Log Message:
Make sure to preserve MIPS_CURLWP (t8) register from ARC BIOS calls.

Fixes silent hangup right after starting a kernel on my
Express5800/230 R4400 PCI (finally I've repaired its PSU and RTC).
Reviewed by soda@.  Maybe other ARC machines are also affected.

Note GXemul was not affected by this problem because it doesn't
have actual ARC BIOS ROM and emulates ARC functions internally.

Should be pulled up to at least netbsd-9.


To generate a diff of this commit:
cvs rdiff -u -r1.17 -r1.18 src/sys/arch/arc/arc/arcbios.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/arc/arc/arcbios.c
diff -u src/sys/arch/arc/arc/arcbios.c:1.17 src/sys/arch/arc/arc/arcbios.c:1.18
--- src/sys/arch/arc/arc/arcbios.c:1.17	Fri Nov 27 03:23:04 2009
+++ src/sys/arch/arc/arc/arcbios.c	Fri May 29 23:02:51 2020
@@ -1,4 +1,4 @@
-/*	$NetBSD: arcbios.c,v 1.17 2009/11/27 03:23:04 rmind Exp $	*/
+/*	$NetBSD: arcbios.c,v 1.18 2020/05/29 23:02:51 tsutsui Exp $	*/
 /*	$OpenBSD: arcbios.c,v 1.3 1998/06/06 06:33:33 mickey Exp $	*/
 
 /*-
@@ -31,7 +31,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: arcbios.c,v 1.17 2009/11/27 03:23:04 rmind Exp $");
+__KERNEL_RCSID(0, "$NetBSD: arcbios.c,v 1.18 2020/05/29 23:02:51 tsutsui Exp $");
 
 #include 
 #include 
@@ -39,7 +39,9 @@ __KERNEL_RCSID(0, "$NetBSD: arcbios.c,v 
 #include 
 #include 
 #include 
+#include 
 #include 
+#include 
 #include 
 
 int Bios_Read(int, char *, int, int *);
@@ -68,23 +70,56 @@ int arc_cpu_l2cache_size = 0;
 
 /*
  *	ARC Bios trampoline code.
+ *	Note we have to save/restore reserved MIPS_CURLWP register.
  */
-#define ARC_Call(Name,Offset)	\
-__asm("\n"			\
-"	.text\n"		\
-"	.ent	" #Name "\n"	\
-"	.align	3\n"		\
-"	.set	noreorder\n"	\
-"	.globl	" #Name "\n" 	\
-#Name":\n"			\
-"	lw	$2, 0x80001020\n"\
-"	lw	$2," #Offset "($2)\n"\
-"	jr	$2\n"		\
-"	nop\n"			\
+#define ARC_Call(Name,Offset)	\
+__asm("\n"			\
+"	.text\n"		\
+"	.ent	" #Name "\n"	\
+"	.align	3\n"		\
+"	.set	noreorder\n"	\
+"	.globl	" #Name "\n" 	\
+#Name":\n"			\
+"	subu	$29, " ___STRING(CALLFRAME_SIZ) "\n"		\
+"	sw	$31, " ___STRING(CALLFRAME_RA) "($29)\n"	\
+"	sw	$16, " ___STRING(CALLFRAME_SP) "($29)\n"	\
+"	lw	$2, 0x80001020\n"\
+"	lw	$2," #Offset "($2)\n"\
+"	jalr	$2\n"		\
+"	 move	$16, " ___STRING(MIPS_CURLWP) "\n"		\
+"	move	" ___STRING(MIPS_CURLWP) ", $16\n"		\
+"	lw	$31, " ___STRING(CALLFRAME_RA) "($29)\n"	\
+"	lw	$16, " ___STRING(CALLFRAME_SP) "($29)\n"	\
+"	j	$31\n"		\
+"	 addu	$29, " ___STRING(CALLFRAME_SIZ) "\n"		\
+"	.end	" #Name "\n"	);
+
+#define ARC_Call5(Name,Offset)	\
+__asm("\n"			\
+"	.text\n"		\
+"	.ent	" #Name "\n"	\
+"	.align	3\n"		\
+"	.set	noreorder\n"	\
+"	.globl	" #Name "\n" 	\
+#Name":\n"			\
+"	subu	$29, " ___STRING(CALLFRAME_SIZ + 4) "\n"	\
+"	sw	$31, " ___STRING(CALLFRAME_RA + 4) "($29)\n"	\
+"	sw	$16, " ___STRING(CALLFRAME_SP + 4) "($29)\n"	\
+"	lw	$12, " ___STRING(CALLFRAME_SIZ + 4 + 16) "($29)\n" \
+"	sw	$12, 16($29)\n"	\
+"	lw	$2, 0x80001020\n"\
+"	lw	$2," #Offset "($2)\n"\
+"	jalr	$2\n"		\
+"	 move	$16, " ___STRING(MIPS_CURLWP) "\n"		\
+"	move	" ___STRING(MIPS_CURLWP) ", $16\n"		\
+"	lw	$31, " ___STRING(CALLFRAME_RA + 4) "($29)\n"	\
+"	lw	$16, " ___STRING(CALLFRAME_SP + 4) "($29)\n"	\
+"	j	$31\n"		\
+"	 addu	$29, " ___STRING(CALLFRAME_SIZ + 4) "\n"	\
 "	.end	" #Name "\n"	);
 
 ARC_Call(Bios_Load,			0x00);
-ARC_Call(Bios_Invoke,			0x04);
+ARC_Call5(Bios_Invoke,			0x04);
 ARC_Call(Bios_Execute,			0x08);
 ARC_Call(Bios_Halt,			0x0c);
 ARC_Call(Bios_PowerDown,		0x10);



CVS commit: src/sys/arch/arc/arc

2020-05-29 Thread Izumi Tsutsui
Module Name:src
Committed By:   tsutsui
Date:   Fri May 29 23:02:51 UTC 2020

Modified Files:
src/sys/arch/arc/arc: arcbios.c

Log Message:
Make sure to preserve MIPS_CURLWP (t8) register from ARC BIOS calls.

Fixes silent hangup right after starting a kernel on my
Express5800/230 R4400 PCI (finally I've repaired its PSU and RTC).
Reviewed by soda@.  Maybe other ARC machines are also affected.

Note GXemul was not affected by this problem because it doesn't
have actual ARC BIOS ROM and emulates ARC functions internally.

Should be pulled up to at least netbsd-9.


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

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



CVS commit: src/sys/arch/arc/arc

2019-04-06 Thread Rin Okuyama
Module Name:src
Committed By:   rin
Date:   Sun Apr  7 03:53:53 UTC 2019

Modified Files:
src/sys/arch/arc/arc: locore_machdep.S

Log Message:
Remove dead codes, that are #if 0'd for more than 19 years!


To generate a diff of this commit:
cvs rdiff -u -r1.16 -r1.17 src/sys/arch/arc/arc/locore_machdep.S

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



CVS commit: src/sys/arch/arc/arc

2019-04-06 Thread Rin Okuyama
Module Name:src
Committed By:   rin
Date:   Sun Apr  7 03:53:53 UTC 2019

Modified Files:
src/sys/arch/arc/arc: locore_machdep.S

Log Message:
Remove dead codes, that are #if 0'd for more than 19 years!


To generate a diff of this commit:
cvs rdiff -u -r1.16 -r1.17 src/sys/arch/arc/arc/locore_machdep.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/arc/arc/locore_machdep.S
diff -u src/sys/arch/arc/arc/locore_machdep.S:1.16 src/sys/arch/arc/arc/locore_machdep.S:1.17
--- src/sys/arch/arc/arc/locore_machdep.S:1.16	Fri Nov 27 03:23:04 2009
+++ src/sys/arch/arc/arc/locore_machdep.S	Sun Apr  7 03:53:53 2019
@@ -1,4 +1,4 @@
-/*	$NetBSD: locore_machdep.S,v 1.16 2009/11/27 03:23:04 rmind Exp $	*/
+/*	$NetBSD: locore_machdep.S,v 1.17 2019/04/07 03:53:53 rin Exp $	*/
 /*	$OpenBSD: locore.S,v 1.12 1997/04/19 17:19:43 pefo Exp $	*/
 
 /*
@@ -195,140 +195,3 @@ LEAF(fillw)
 	jr	ra
 	nop
 END(fillw)
-
-/*#ifdef DEBUG*/ /* for minidebug.c: fix trap() to use this */
-#if 0
-/*
- * Read a long and return it.
- * Note: addresses can be unaligned!
- *
- * long
-L* mdbpeek(addr)
-L*	caddt_t addr;
-L* {
-L*	return (*(long *)addr);
-L* }
- */
-LEAF(mdbpeek)
-	li	v0, MDBERR
-	sw	v0, UADDR+PCB_ONFAULT
-	and	v0, a0, 3		# unaligned address?
-	bne	v0, zero, 1f
-	nop
-	b	2f
-	lw	v0, (a0)		# aligned access
-1:
-	LWHI	v0, 0(a0)		# get next 4 bytes (unaligned)
-	LWLO	v0, 3(a0)
-2:
-	j	ra			# made it w/o errors
-	sw	zero, UADDR+PCB_ONFAULT
-mdberr:
-	li	v0, 1			# trap sends us here
-	sw	v0, mdbmkfault
-	j	ra
-	nop
-END(mdbpeek)
-
-/*
- * Write a long to 'addr'.
- * Note: addresses can be unaligned!
- *
-L* void
-L* mdbpoke(addr, value)
-L*	caddt_t addr;
-L*	long value;
-L* {
-L*	*(long *)addr = value;
-L* }
- */
-LEAF(mdbpoke)
-	li	v0, MDBERR
-	sw	v0, UADDR+PCB_ONFAULT
-	and	v0, a0, 3		# unaligned address?
-	bne	v0, zero, 1f
-	nop
-	b	2f
-	sw	a1, (a0)		# aligned access
-1:
-	SWHI	a1, 0(a0)		# store next 4 bytes (unaligned)
-	SWLO	a1, 3(a0)
-	and	a0, a0, ~3		# align address for cache flush
-2:
-	sw	zero, UADDR+PCB_ONFAULT
-	b	R4K_FlushICache		# flush instruction cache
-	li	a1, 8
-END(mdbpoke)
-
-/*
- * Save registers and state so we can do a 'mdbreset' (like longjmp) later.
- * Always returns zero.
- *
-L* int mdb_savearea[11];
-L*
-L* int
-L* mdbsetexit()
-L* {
-L*	mdb_savearea[0] = 0;
-L*	return (0);
-L* }
- */
-	.comm	mdb_savearea, (11 * 4)
-
-LEAF(mdbsetexit)
-	la	a0, mdb_savearea
-	sw	s0, 0(a0)
-	sw	s1, 4(a0)
-	sw	s2, 8(a0)
-	sw	s3, 12(a0)
-	sw	s4, 16(a0)
-	sw	s5, 20(a0)
-	sw	s6, 24(a0)
-	sw	s7, 28(a0)
-	sw	sp, 32(a0)
-	sw	s8, 36(a0)
-	sw	ra, 40(a0)
-	j	ra
-	move	v0, zero
-END(mdbsetexit)
-
-/*
- * Restore registers and state (like longjmp) and return x.
- *
-L* int
-L* mdbreset(x)
-L* {
-L*	return (x);
-L* }
- */
-LEAF(mdbreset)
-	la	v0, mdb_savearea
-	lw	ra, 40(v0)
-	lw	s0, 0(v0)
-	lw	s1, 4(v0)
-	lw	s2, 8(v0)
-	lw	s3, 12(v0)
-	lw	s4, 16(v0)
-	lw	s5, 20(v0)
-	lw	s6, 24(v0)
-	lw	s7, 28(v0)
-	lw	sp, 32(v0)
-	lw	s8, 36(v0)
-	j	ra
-	move	v0, a0
-END(mdbreset)
-
-/*
- * Trap into the debugger.
- *
-L* void
-L* mdbpanic()
-L* {
-L* }
- */
-LEAF(mdbpanic)
-	break	BREAK_SOVER_VAL
-	j	ra
-	nop
-END(mdbpanic)
-#endif /* DEBUG */



CVS commit: src/sys/arch/arc

2019-04-06 Thread Rin Okuyama
Module Name:src
Committed By:   rin
Date:   Sun Apr  7 03:49:24 UTC 2019

Modified Files:
src/sys/arch/arc: TODO

Log Message:
UADDR was removed.


To generate a diff of this commit:
cvs rdiff -u -r1.30 -r1.31 src/sys/arch/arc/TODO

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/arc/TODO
diff -u src/sys/arch/arc/TODO:1.30 src/sys/arch/arc/TODO:1.31
--- src/sys/arch/arc/TODO:1.30	Fri Jun 20 12:31:55 2014
+++ src/sys/arch/arc/TODO	Sun Apr  7 03:49:24 2019
@@ -1,4 +1,4 @@
-$NetBSD: TODO,v 1.30 2014/06/20 12:31:55 joerg Exp $
+$NetBSD: TODO,v 1.31 2019/04/07 03:49:24 rin Exp $
 
 To do list (in some particular order)
 XXX some entries might be obsolete.
@@ -59,8 +59,6 @@ XXX some entries might be obsolete.
 
 o	remove inb/outb
 
-o	remove UADDR
-
 o	fix mem_clusters[] usage.
 
 o	redesign interrupt handler framework.



CVS commit: src/sys/arch/arc

2019-04-06 Thread Rin Okuyama
Module Name:src
Committed By:   rin
Date:   Sun Apr  7 03:49:24 UTC 2019

Modified Files:
src/sys/arch/arc: TODO

Log Message:
UADDR was removed.


To generate a diff of this commit:
cvs rdiff -u -r1.30 -r1.31 src/sys/arch/arc/TODO

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



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

2019-04-06 Thread Jason R Thorpe
Module Name:src
Committed By:   thorpej
Date:   Sun Apr  7 03:42:31 UTC 2019

Modified Files:
src/sys/arch/arc/include: param.h

Log Message:
G/C some obsolete definitions (we haven't had a fixed u. for quite
some time).


To generate a diff of this commit:
cvs rdiff -u -r1.32 -r1.33 src/sys/arch/arc/include/param.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/arc/include/param.h
diff -u src/sys/arch/arc/include/param.h:1.32 src/sys/arch/arc/include/param.h:1.33
--- src/sys/arch/arc/include/param.h:1.32	Thu Feb  7 04:31:49 2019
+++ src/sys/arch/arc/include/param.h	Sun Apr  7 03:42:31 2019
@@ -1,4 +1,4 @@
-/*	$NetBSD: param.h,v 1.32 2019/02/07 04:31:49 mrg Exp $	*/
+/*	$NetBSD: param.h,v 1.33 2019/04/07 03:42:31 thorpej Exp $	*/
 /*  $OpenBSD: param.h,v 1.9 1997/04/30 09:54:15 niklas Exp $ */
 
 /*
@@ -59,15 +59,6 @@
 #define	KERNBASE	0x8000	/* start of kernel virtual */
 #define	BTOPKERNBASE	((u_long)KERNBASE >> PGSHIFT)
 
-#if defined(_LOCORE) && defined(notyet)
-#define	UADDR		0xc000	/* address of u */
-#else
-#define	UADDR		0xc000	/* address of u */
-#endif
-#define USPACE		(UPAGES*NBPG)	/* size of u-area in bytes */
-#define	UVPN		(UADDR>>PGSHIFT)/* virtual page number of u */
-#define	KERNELSTACK	(UADDR+UPAGES*NBPG)	/* top of kernel stack */
-
 /* bytes to disk blocks */
 #define	btodb(x)	((x) >> DEV_BSHIFT)
 #define dbtob(x)	((x) << DEV_BSHIFT)



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

2019-04-06 Thread Jason R Thorpe
Module Name:src
Committed By:   thorpej
Date:   Sun Apr  7 03:42:31 UTC 2019

Modified Files:
src/sys/arch/arc/include: param.h

Log Message:
G/C some obsolete definitions (we haven't had a fixed u. for quite
some time).


To generate a diff of this commit:
cvs rdiff -u -r1.32 -r1.33 src/sys/arch/arc/include/param.h

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



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

2019-03-28 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Thu Mar 28 08:28:16 UTC 2019

Modified Files:
src/sys/arch/arc/include: vmparam.h

Log Message:
Expose kernel variables only to kernel.
XXX: move this variable somewhere better?


To generate a diff of this commit:
cvs rdiff -u -r1.10 -r1.11 src/sys/arch/arc/include/vmparam.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/arc/include/vmparam.h
diff -u src/sys/arch/arc/include/vmparam.h:1.10 src/sys/arch/arc/include/vmparam.h:1.11
--- src/sys/arch/arc/include/vmparam.h:1.10	Wed Dec 16 18:19:06 2009
+++ src/sys/arch/arc/include/vmparam.h	Thu Mar 28 04:28:16 2019
@@ -1,4 +1,4 @@
-/*	$NetBSD: vmparam.h,v 1.10 2009/12/16 23:19:06 matt Exp $	*/
+/*	$NetBSD: vmparam.h,v 1.11 2019/03/28 08:28:16 christos Exp $	*/
 /*	$OpenBSD: vmparam.h,v 1.3 1997/04/19 17:19:59 pefo Exp $	*/
 /*	NetBSD: vmparam.h,v 1.5 1994/10/26 21:10:10 cgd Exp 	*/
 
@@ -19,6 +19,7 @@
 
 #ifndef KSEG2IOBUFSIZE
 #define KSEG2IOBUFSIZE	kseg2iobufsize	/* reserve PTEs for KSEG2 I/O space */
-
+#ifdef _KERNEL
 extern vsize_t kseg2iobufsize;
 #endif
+#endif



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

2019-03-28 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Thu Mar 28 08:28:16 UTC 2019

Modified Files:
src/sys/arch/arc/include: vmparam.h

Log Message:
Expose kernel variables only to kernel.
XXX: move this variable somewhere better?


To generate a diff of this commit:
cvs rdiff -u -r1.10 -r1.11 src/sys/arch/arc/include/vmparam.h

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



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

2016-09-08 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Thu Sep  8 14:36:13 UTC 2016

Modified Files:
src/sys/arch/arc/stand: Makefile.inc
src/sys/arch/arc/stand/boot: Makefile

Log Message:
Avoid the PIE


To generate a diff of this commit:
cvs rdiff -u -r1.2 -r1.3 src/sys/arch/arc/stand/Makefile.inc
cvs rdiff -u -r1.15 -r1.16 src/sys/arch/arc/stand/boot/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/arc/stand/Makefile.inc
diff -u src/sys/arch/arc/stand/Makefile.inc:1.2 src/sys/arch/arc/stand/Makefile.inc:1.3
--- src/sys/arch/arc/stand/Makefile.inc:1.2	Sun Dec 11 07:16:41 2005
+++ src/sys/arch/arc/stand/Makefile.inc	Thu Sep  8 10:36:13 2016
@@ -1,5 +1,5 @@
-# $NetBSD: Makefile.inc,v 1.2 2005/12/11 12:16:41 christos Exp $
+# $NetBSD: Makefile.inc,v 1.3 2016/09/08 14:36:13 christos Exp $
 
-.include 
+NOPIE=	# defined
 
 BINDIR?=	/usr/mdec

Index: src/sys/arch/arc/stand/boot/Makefile
diff -u src/sys/arch/arc/stand/boot/Makefile:1.15 src/sys/arch/arc/stand/boot/Makefile:1.16
--- src/sys/arch/arc/stand/boot/Makefile:1.15	Wed Jan 15 20:15:33 2014
+++ src/sys/arch/arc/stand/boot/Makefile	Thu Sep  8 10:36:13 2016
@@ -1,6 +1,6 @@
-# $NetBSD: Makefile,v 1.15 2014/01/16 01:15:33 christos Exp $
+# $NetBSD: Makefile,v 1.16 2016/09/08 14:36:13 christos Exp $
 
-.include 
+.include 
 
 S!= cd ${.CURDIR}/../../../..; pwd
 



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

2016-07-12 Thread Maya Rashish
Module Name:src
Committed By:   maya
Date:   Wed Jul 13 00:04:28 UTC 2016

Modified Files:
src/sys/arch/arc/include: param.h

Log Message:
Avoid redefining UPAGES
(now defined in mips/mips_param.h)

Fixes build


To generate a diff of this commit:
cvs rdiff -u -r1.29 -r1.30 src/sys/arch/arc/include/param.h

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



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

2016-07-12 Thread Maya Rashish
Module Name:src
Committed By:   maya
Date:   Wed Jul 13 00:04:28 UTC 2016

Modified Files:
src/sys/arch/arc/include: param.h

Log Message:
Avoid redefining UPAGES
(now defined in mips/mips_param.h)

Fixes build


To generate a diff of this commit:
cvs rdiff -u -r1.29 -r1.30 src/sys/arch/arc/include/param.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/arc/include/param.h
diff -u src/sys/arch/arc/include/param.h:1.29 src/sys/arch/arc/include/param.h:1.30
--- src/sys/arch/arc/include/param.h:1.29	Fri Mar 18 16:17:22 2011
+++ src/sys/arch/arc/include/param.h	Wed Jul 13 00:04:28 2016
@@ -1,4 +1,4 @@
-/*	$NetBSD: param.h,v 1.29 2011/03/18 16:17:22 tsutsui Exp $	*/
+/*	$NetBSD: param.h,v 1.30 2016/07/13 00:04:28 maya Exp $	*/
 /*  $OpenBSD: param.h,v 1.9 1997/04/30 09:54:15 niklas Exp $ */
 
 /*
@@ -67,7 +67,6 @@
 #define	SSIZE		1		/* initial stack size/NBPG */
 #define	SINCR		1		/* increment of stack/NBPG */
 
-#define	UPAGES		2		/* pages of u-area */
 #if defined(_LOCORE) && defined(notyet)
 #define	UADDR		0xc000	/* address of u */
 #else



CVS commit: src/sys/arch/arc/arc

2016-07-12 Thread Matt Thomas
Module Name:src
Committed By:   matt
Date:   Tue Jul 12 23:53:18 UTC 2016

Modified Files:
src/sys/arch/arc/arc: bus_space_sparse.c

Log Message:
Put back cacheable


To generate a diff of this commit:
cvs rdiff -u -r1.19 -r1.20 src/sys/arch/arc/arc/bus_space_sparse.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/arc/arc/bus_space_sparse.c
diff -u src/sys/arch/arc/arc/bus_space_sparse.c:1.19 src/sys/arch/arc/arc/bus_space_sparse.c:1.20
--- src/sys/arch/arc/arc/bus_space_sparse.c:1.19	Mon Jul 11 16:18:55 2016
+++ src/sys/arch/arc/arc/bus_space_sparse.c	Tue Jul 12 23:53:18 2016
@@ -1,4 +1,4 @@
-/*	$NetBSD: bus_space_sparse.c,v 1.19 2016/07/11 16:18:55 matt Exp $	*/
+/*	$NetBSD: bus_space_sparse.c,v 1.20 2016/07/12 23:53:18 matt Exp $	*/
 /*	NetBSD: bus_machdep.c,v 1.1 2000/01/26 18:48:00 drochner Exp 	*/
 
 /*-
@@ -39,7 +39,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: bus_space_sparse.c,v 1.19 2016/07/11 16:18:55 matt Exp $");
+__KERNEL_RCSID(0, "$NetBSD: bus_space_sparse.c,v 1.20 2016/07/12 23:53:18 matt Exp $");
 
 #include 
 #include 
@@ -75,9 +75,8 @@ arc_sparse_bus_space_compose_handle(bus_
 	 * Since all buses can be linearly mappable, we don't have to check
 	 * BUS_SPACE_MAP_LINEAR and BUS_SPACE_MAP_PREFETCHABLE.
 	 */
-	const u_int pmap_flags = (flags & BUS_SPACE_MAP_CACHEABLE)
-	? PMAP_WRITE_BACK
-	: 0;
+	const bool cacheable = (flags & BUS_SPACE_MAP_CACHEABLE) != 0;
+	const u_int pmap_flags = cacheable ? PMAP_WRITE_BACK : 0;
 
 	/*
 	 * XXX - `bst->bs_pbase' must be page aligned,



CVS commit: src/sys/arch/arc/arc

2016-07-12 Thread Matt Thomas
Module Name:src
Committed By:   matt
Date:   Tue Jul 12 23:53:18 UTC 2016

Modified Files:
src/sys/arch/arc/arc: bus_space_sparse.c

Log Message:
Put back cacheable


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

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



CVS commit: src/sys/arch/arc/isa

2016-02-26 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Fri Feb 26 18:14:38 UTC 2016

Modified Files:
src/sys/arch/arc/isa: isadma_bounce.c

Log Message:
PR/50855: David Binderman: Remove redundant code.


To generate a diff of this commit:
cvs rdiff -u -r1.14 -r1.15 src/sys/arch/arc/isa/isadma_bounce.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/arc/isa/isadma_bounce.c
diff -u src/sys/arch/arc/isa/isadma_bounce.c:1.14 src/sys/arch/arc/isa/isadma_bounce.c:1.15
--- src/sys/arch/arc/isa/isadma_bounce.c:1.14	Thu Jun 11 04:22:08 2015
+++ src/sys/arch/arc/isa/isadma_bounce.c	Fri Feb 26 13:14:38 2016
@@ -1,4 +1,4 @@
-/* $NetBSD: isadma_bounce.c,v 1.14 2015/06/11 08:22:08 matt Exp $ */
+/* $NetBSD: isadma_bounce.c,v 1.15 2016/02/26 18:14:38 christos Exp $ */
 /* NetBSD: isadma_bounce.c,v 1.2 2000/06/01 05:49:36 thorpej Exp  */
 
 /*-
@@ -33,7 +33,7 @@
 
 #include 			/* RCS ID & Copyright macro defns */
 
-__KERNEL_RCSID(0, "$NetBSD: isadma_bounce.c,v 1.14 2015/06/11 08:22:08 matt Exp $");
+__KERNEL_RCSID(0, "$NetBSD: isadma_bounce.c,v 1.15 2016/02/26 18:14:38 christos Exp $");
 
 #include 
 #include 
@@ -251,8 +251,7 @@ isadma_bounce_dmamap_load(bus_dma_tag_t 
 	 * and we can bounce, we will.
 	 */
 	error = _bus_dmamap_load(t, map, buf, buflen, p, flags);
-	if (error == 0 ||
-	(error != 0 && (cookie->id_flags & ID_MIGHT_NEED_BOUNCE) == 0))
+	if (error == 0 || (cookie->id_flags & ID_MIGHT_NEED_BOUNCE) == 0)
 		return error;
 
 	/*
@@ -321,8 +320,7 @@ isadma_bounce_dmamap_load_mbuf(bus_dma_t
 	 * and we can bounce, we will.
 	 */
 	error = _bus_dmamap_load_mbuf(t, map, m0, flags);
-	if (error == 0 ||
-	(error != 0 && (cookie->id_flags & ID_MIGHT_NEED_BOUNCE) == 0))
+	if (error == 0 || (cookie->id_flags & ID_MIGHT_NEED_BOUNCE) == 0)
 		return error;
 
 	/*



CVS commit: src/sys/arch/arc/isa

2016-02-26 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Fri Feb 26 18:14:38 UTC 2016

Modified Files:
src/sys/arch/arc/isa: isadma_bounce.c

Log Message:
PR/50855: David Binderman: Remove redundant code.


To generate a diff of this commit:
cvs rdiff -u -r1.14 -r1.15 src/sys/arch/arc/isa/isadma_bounce.c

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



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

2016-02-14 Thread David A. Holland
Module Name:src
Committed By:   dholland
Date:   Sun Feb 14 18:01:45 UTC 2016

Modified Files:
src/sys/arch/arc/stand/boot: disk.c

Log Message:
Add missing va_end. PR 50793 from David Binderman.


To generate a diff of this commit:
cvs rdiff -u -r1.6 -r1.7 src/sys/arch/arc/stand/boot/disk.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/arc/stand/boot/disk.c
diff -u src/sys/arch/arc/stand/boot/disk.c:1.6 src/sys/arch/arc/stand/boot/disk.c:1.7
--- src/sys/arch/arc/stand/boot/disk.c:1.6	Sun Jul 17 20:54:37 2011
+++ src/sys/arch/arc/stand/boot/disk.c	Sun Feb 14 18:01:45 2016
@@ -1,4 +1,4 @@
-/*	$NetBSD: disk.c,v 1.6 2011/07/17 20:54:37 joerg Exp $	*/
+/*	$NetBSD: disk.c,v 1.7 2016/02/14 18:01:45 dholland Exp $	*/
 
 /*
  * Copyright (c) 1992, 1993
@@ -112,8 +112,8 @@ diskopen(struct open_file *f, ...)
 	va_list ap;
 
 	va_start(ap, f);
-
 	device = va_arg(ap, char *);
+	va_end(ap);
 
 	/*
 	 * For NetBSD/sgimips, since we use the SGI partition map directly,



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

2016-02-14 Thread David A. Holland
Module Name:src
Committed By:   dholland
Date:   Sun Feb 14 18:01:45 UTC 2016

Modified Files:
src/sys/arch/arc/stand/boot: disk.c

Log Message:
Add missing va_end. PR 50793 from David Binderman.


To generate a diff of this commit:
cvs rdiff -u -r1.6 -r1.7 src/sys/arch/arc/stand/boot/disk.c

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



CVS commit: src/sys/arch/arc/arc

2015-06-24 Thread Matt Thomas
Module Name:src
Committed By:   matt
Date:   Wed Jun 24 06:19:52 UTC 2015

Modified Files:
src/sys/arch/arc/arc: cpu.c

Log Message:
Fix includes


To generate a diff of this commit:
cvs rdiff -u -r1.19 -r1.20 src/sys/arch/arc/arc/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/arc/arc/cpu.c
diff -u src/sys/arch/arc/arc/cpu.c:1.19 src/sys/arch/arc/arc/cpu.c:1.20
--- src/sys/arch/arc/arc/cpu.c:1.19	Sun Mar  6 14:58:42 2011
+++ src/sys/arch/arc/arc/cpu.c	Wed Jun 24 06:19:52 2015
@@ -1,4 +1,4 @@
-/*	$NetBSD: cpu.c,v 1.19 2011/03/06 14:58:42 tsutsui Exp $	*/
+/*	$NetBSD: cpu.c,v 1.20 2015/06/24 06:19:52 matt Exp $	*/
 /*	$OpenBSD: cpu.c,v 1.8 1997/04/19 17:19:41 pefo Exp $ */
 
 /*
@@ -34,7 +34,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: cpu.c,v 1.19 2011/03/06 14:58:42 tsutsui Exp $);
+__KERNEL_RCSID(0, $NetBSD: cpu.c,v 1.20 2015/06/24 06:19:52 matt Exp $);
 
 #include sys/param.h
 #include sys/systm.h
@@ -43,7 +43,8 @@ __KERNEL_RCSID(0, $NetBSD: cpu.c,v 1.19
 
 #include uvm/uvm_extern.h
 
-#include machine/cpu.h
+#include mips/locore.h
+
 #include machine/autoconf.h
 
 #include ioconf.h



CVS commit: src/sys/arch/arc/arc

2015-06-24 Thread Matt Thomas
Module Name:src
Committed By:   matt
Date:   Wed Jun 24 06:19:52 UTC 2015

Modified Files:
src/sys/arch/arc/arc: cpu.c

Log Message:
Fix includes


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

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



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

2015-05-02 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Sat May  2 23:21:40 UTC 2015

Modified Files:
src/sys/arch/arc/conf: RAMDISK

Log Message:
grow it a bit.


To generate a diff of this commit:
cvs rdiff -u -r1.81 -r1.82 src/sys/arch/arc/conf/RAMDISK

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/arc/conf/RAMDISK
diff -u src/sys/arch/arc/conf/RAMDISK:1.81 src/sys/arch/arc/conf/RAMDISK:1.82
--- src/sys/arch/arc/conf/RAMDISK:1.81	Thu Aug  8 09:21:38 2013
+++ src/sys/arch/arc/conf/RAMDISK	Sat May  2 19:21:40 2015
@@ -1,4 +1,4 @@
-#	$NetBSD: RAMDISK,v 1.81 2013/08/08 13:21:38 he Exp $
+#	$NetBSD: RAMDISK,v 1.82 2015/05/02 23:21:40 christos Exp $
 #
 #	memory disk based configuration file for MIPS R4x00 ARC Systems
 #
@@ -9,7 +9,7 @@ include		arch/arc/conf/GENERIC
 options 	MEMORY_DISK_HOOKS
 options 	MEMORY_DISK_IS_ROOT		# force root on memory disk
 options 	MEMORY_DISK_SERVER=0		# no userspace md(4) support
-options 	MEMORY_DISK_ROOT_SIZE=5420	# size of memory disk, in blocks
+options 	MEMORY_DISK_ROOT_SIZE=8420	# size of memory disk, in blocks
 options 	MEMORY_DISK_RBFLAGS=RB_SINGLE	# boot in single-user mode
 
 makeoptions	COPTS=-Os -mmemcpy	# generates smaller code than -O2, -O1



CVS commit: src/sys/arch/arc

2014-06-20 Thread Joerg Sonnenberger
Module Name:src
Committed By:   joerg
Date:   Fri Jun 20 12:31:55 UTC 2014

Modified Files:
src/sys/arch/arc: TODO

Log Message:
evcnt is done.


To generate a diff of this commit:
cvs rdiff -u -r1.29 -r1.30 src/sys/arch/arc/TODO

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/arc/TODO
diff -u src/sys/arch/arc/TODO:1.29 src/sys/arch/arc/TODO:1.30
--- src/sys/arch/arc/TODO:1.29	Sat Jan  8 09:44:37 2011
+++ src/sys/arch/arc/TODO	Fri Jun 20 12:31:55 2014
@@ -1,4 +1,4 @@
-$NetBSD: TODO,v 1.29 2011/01/08 09:44:37 tsutsui Exp $
+$NetBSD: TODO,v 1.30 2014/06/20 12:31:55 joerg Exp $
 
 To do list (in some particular order)
 XXX some entries might be obsolete.
@@ -63,8 +63,6 @@ XXX some entries might be obsolete.
 
 o	fix mem_clusters[] usage.
 
-o	intrcnt[] name cleanup, use MI evcnt(9)
-
 o	redesign interrupt handler framework.
 
 o	it is better to always disable the MIPS3 internal timer interrupts



CVS commit: src/sys/arch/arc

2014-06-20 Thread Joerg Sonnenberger
Module Name:src
Committed By:   joerg
Date:   Fri Jun 20 12:31:55 UTC 2014

Modified Files:
src/sys/arch/arc: TODO

Log Message:
evcnt is done.


To generate a diff of this commit:
cvs rdiff -u -r1.29 -r1.30 src/sys/arch/arc/TODO

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



CVS commit: src/sys/arch/arc/pci

2014-03-26 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Wed Mar 26 08:20:29 UTC 2014

Modified Files:
src/sys/arch/arc/pci: necpb.c

Log Message:
use sprintf.


To generate a diff of this commit:
cvs rdiff -u -r1.39 -r1.40 src/sys/arch/arc/pci/necpb.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/arc/pci/necpb.c
diff -u src/sys/arch/arc/pci/necpb.c:1.39 src/sys/arch/arc/pci/necpb.c:1.40
--- src/sys/arch/arc/pci/necpb.c:1.39	Sat Oct 27 13:17:36 2012
+++ src/sys/arch/arc/pci/necpb.c	Wed Mar 26 04:20:29 2014
@@ -1,4 +1,4 @@
-/*	$NetBSD: necpb.c,v 1.39 2012/10/27 17:17:36 chs Exp $	*/
+/*	$NetBSD: necpb.c,v 1.40 2014/03/26 08:20:29 christos Exp $	*/
 
 /*-
  * Copyright (c) 1997, 1998 The NetBSD Foundation, Inc.
@@ -61,7 +61,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: necpb.c,v 1.39 2012/10/27 17:17:36 chs Exp $);
+__KERNEL_RCSID(0, $NetBSD: necpb.c,v 1.40 2014/03/26 08:20:29 christos Exp $);
 
 #include opt_pci.h
 
@@ -386,7 +386,7 @@ necpb_intr_string(pci_chipset_tag_t pc, 
 
 	if (ih = 4)
 		panic(%s: bogus handle %ld, __func__, ih);
-	sprintf(str, int %c, 'A' + (int)ih);
+	snprintf(str, sizeof(str), int %c, 'A' + (int)ih);
 	return str;
 }
 



CVS commit: src/sys/arch/arc/pci

2014-03-26 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Wed Mar 26 08:20:29 UTC 2014

Modified Files:
src/sys/arch/arc/pci: necpb.c

Log Message:
use sprintf.


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

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



CVS commit: src/sys/arch/arc

2013-12-16 Thread matthew green
Module Name:src
Committed By:   mrg
Date:   Mon Dec 16 15:46:57 UTC 2013

Modified Files:
src/sys/arch/arc/arc: c_magnum.c c_nec_jazz.c machdep.c
src/sys/arch/arc/jazz: fd.c

Log Message:
- remove unused variables
- use (void) when we don't care about the return value
- move variables inside their usage #if


To generate a diff of this commit:
cvs rdiff -u -r1.22 -r1.23 src/sys/arch/arc/arc/c_magnum.c
cvs rdiff -u -r1.13 -r1.14 src/sys/arch/arc/arc/c_nec_jazz.c
cvs rdiff -u -r1.126 -r1.127 src/sys/arch/arc/arc/machdep.c
cvs rdiff -u -r1.41 -r1.42 src/sys/arch/arc/jazz/fd.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/arc/arc/c_magnum.c
diff -u src/sys/arch/arc/arc/c_magnum.c:1.22 src/sys/arch/arc/arc/c_magnum.c:1.23
--- src/sys/arch/arc/arc/c_magnum.c:1.22	Fri Jul  1 19:28:00 2011
+++ src/sys/arch/arc/arc/c_magnum.c	Mon Dec 16 15:46:57 2013
@@ -1,4 +1,4 @@
-/*	$NetBSD: c_magnum.c,v 1.22 2011/07/01 19:28:00 dyoung Exp $	*/
+/*	$NetBSD: c_magnum.c,v 1.23 2013/12/16 15:46:57 mrg Exp $	*/
 /*	$OpenBSD: machdep.c,v 1.36 1999/05/22 21:22:19 weingart Exp $	*/
 
 /*
@@ -43,7 +43,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: c_magnum.c,v 1.22 2011/07/01 19:28:00 dyoung Exp $);
+__KERNEL_RCSID(0, $NetBSD: c_magnum.c,v 1.23 2013/12/16 15:46:57 mrg Exp $);
 
 #define __INTR_PRIVATE
 #include sys/param.h
@@ -105,9 +105,8 @@ static const struct ipl_sr_map magnum_ip
 uint32_t
 timer_magnum_intr(uint32_t mask, struct clockframe *cf)
 {
-	int temp;
 
-	temp = inw(R4030_SYS_IT_STAT);
+	(void)inw(R4030_SYS_IT_STAT);
 	last_cp0_count = mips3_cp0_count_read();
 	hardclock(cf);
 	timer_jazzio_ev.ev_count++;

Index: src/sys/arch/arc/arc/c_nec_jazz.c
diff -u src/sys/arch/arc/arc/c_nec_jazz.c:1.13 src/sys/arch/arc/arc/c_nec_jazz.c:1.14
--- src/sys/arch/arc/arc/c_nec_jazz.c:1.13	Fri Mar 14 16:43:27 2008
+++ src/sys/arch/arc/arc/c_nec_jazz.c	Mon Dec 16 15:46:57 2013
@@ -1,4 +1,4 @@
-/*	$NetBSD: c_nec_jazz.c,v 1.13 2008/03/14 16:43:27 tsutsui Exp $	*/
+/*	$NetBSD: c_nec_jazz.c,v 1.14 2013/12/16 15:46:57 mrg Exp $	*/
 
 /*-
  * Copyright (C) 2000 Shuichiro URATA.  All rights reserved.
@@ -31,7 +31,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: c_nec_jazz.c,v 1.13 2008/03/14 16:43:27 tsutsui Exp $);
+__KERNEL_RCSID(0, $NetBSD: c_nec_jazz.c,v 1.14 2013/12/16 15:46:57 mrg Exp $);
 
 #include sys/param.h
 #include sys/systm.h
@@ -65,9 +65,8 @@ struct timer_jazzio_config timer_nec_jaz
 uint32_t
 timer_nec_jazz_intr(uint32_t mask, struct clockframe *cf)
 {
-	int temp;
 
-	temp = in32(RD94_SYS_INTSTAT3);
+	(void)in32(RD94_SYS_INTSTAT3);
 	last_cp0_count = mips3_cp0_count_read();
 	hardclock(cf);
 	timer_jazzio_ev.ev_count++;

Index: src/sys/arch/arc/arc/machdep.c
diff -u src/sys/arch/arc/arc/machdep.c:1.126 src/sys/arch/arc/arc/machdep.c:1.127
--- src/sys/arch/arc/arc/machdep.c:1.126	Sat Jul 28 23:08:56 2012
+++ src/sys/arch/arc/arc/machdep.c	Mon Dec 16 15:46:57 2013
@@ -1,4 +1,4 @@
-/*	$NetBSD: machdep.c,v 1.126 2012/07/28 23:08:56 matt Exp $	*/
+/*	$NetBSD: machdep.c,v 1.127 2013/12/16 15:46:57 mrg Exp $	*/
 /*	$OpenBSD: machdep.c,v 1.36 1999/05/22 21:22:19 weingart Exp $	*/
 
 /*
@@ -39,7 +39,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: machdep.c,v 1.126 2012/07/28 23:08:56 matt Exp $);
+__KERNEL_RCSID(0, $NetBSD: machdep.c,v 1.127 2013/12/16 15:46:57 mrg Exp $);
 
 #include opt_ddb.h
 #include opt_ddbparam.h
@@ -172,7 +172,10 @@ mach_init(int argc, char *argv[], u_int 
 {
 	const char *cp;
 	int i;
-	paddr_t kernstartpfn, kernendpfn, first, last;
+#if 0
+	paddr_t kernstartpfn;
+#endif
+	paddr_t first, last, kernendpfn;
 	char *kernend;
 #if NKSYMS  0 || defined(DDB) || defined(MODULAR)
 	char *ssym = NULL;
@@ -367,10 +370,10 @@ mach_init(int argc, char *argv[], u_int 
 	/*
 	 * Load the rest of the pages into the VM system.
 	 */
-	kernstartpfn = atop(trunc_page(
-	MIPS_KSEG0_TO_PHYS((kernel_text) - UPAGES * PAGE_SIZE)));
 	kernendpfn = atop(round_page(MIPS_KSEG0_TO_PHYS(kernend)));
 #if 0
+	kernstartpfn = atop(trunc_page(
+	MIPS_KSEG0_TO_PHYS((kernel_text) - UPAGES * PAGE_SIZE)));
 	/* give all free memory to VM */
 	/* XXX - currently doesn't work, due to panic: pmap_enter: pmap */
 	for (i = 0; i  mem_cluster_cnt; i++) {

Index: src/sys/arch/arc/jazz/fd.c
diff -u src/sys/arch/arc/jazz/fd.c:1.41 src/sys/arch/arc/jazz/fd.c:1.42
--- src/sys/arch/arc/jazz/fd.c:1.41	Fri Jul  1 19:25:41 2011
+++ src/sys/arch/arc/jazz/fd.c	Mon Dec 16 15:46:57 2013
@@ -1,4 +1,4 @@
-/*	$NetBSD: fd.c,v 1.41 2011/07/01 19:25:41 dyoung Exp $	*/
+/*	$NetBSD: fd.c,v 1.42 2013/12/16 15:46:57 mrg Exp $	*/
 /*	$OpenBSD: fd.c,v 1.6 1998/10/03 21:18:57 millert Exp $	*/
 /*	NetBSD: fd.c,v 1.78 1995/07/04 07:23:09 mycroft Exp 	*/
 
@@ -66,7 +66,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: fd.c,v 1.41 2011/07/01 19:25:41 dyoung Exp $);
+__KERNEL_RCSID(0, $NetBSD: fd.c,v 

CVS commit: src/sys/arch/arc

2013-12-16 Thread matthew green
Module Name:src
Committed By:   mrg
Date:   Mon Dec 16 15:46:57 UTC 2013

Modified Files:
src/sys/arch/arc/arc: c_magnum.c c_nec_jazz.c machdep.c
src/sys/arch/arc/jazz: fd.c

Log Message:
- remove unused variables
- use (void) when we don't care about the return value
- move variables inside their usage #if


To generate a diff of this commit:
cvs rdiff -u -r1.22 -r1.23 src/sys/arch/arc/arc/c_magnum.c
cvs rdiff -u -r1.13 -r1.14 src/sys/arch/arc/arc/c_nec_jazz.c
cvs rdiff -u -r1.126 -r1.127 src/sys/arch/arc/arc/machdep.c
cvs rdiff -u -r1.41 -r1.42 src/sys/arch/arc/jazz/fd.c

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



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

2011-11-16 Thread Havard Eidnes
Module Name:src
Committed By:   he
Date:   Wed Nov 16 12:40:53 UTC 2011

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

Log Message:
Make sure struct clockframe is declared before declaring a
parameter as a pointer to that struct; fixes build problem for
getfstypename.c as part of libkern.


To generate a diff of this commit:
cvs rdiff -u -r1.23 -r1.24 src/sys/arch/arc/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/arc/include/intr.h
diff -u src/sys/arch/arc/include/intr.h:1.23 src/sys/arch/arc/include/intr.h:1.24
--- src/sys/arch/arc/include/intr.h:1.23	Sun Feb 20 07:52:42 2011
+++ src/sys/arch/arc/include/intr.h	Wed Nov 16 12:40:53 2011
@@ -1,4 +1,4 @@
-/*	$NetBSD: intr.h,v 1.23 2011/02/20 07:52:42 matt Exp $	*/
+/*	$NetBSD: intr.h,v 1.24 2011/11/16 12:40:53 he Exp $	*/
 
 /*-
  * Copyright (c) 2000, 2001 The NetBSD Foundation, Inc.
@@ -37,6 +37,8 @@
 #ifdef _KERNEL
 #ifndef _LOCORE
 
+struct clockframe;
+
 void arc_set_intr(uint32_t, uint32_t (*)(uint32_t, struct clockframe *), int);
 extern uint32_t cpu_int_mask;
 



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

2011-07-13 Thread matthew green
Module Name:src
Committed By:   mrg
Date:   Wed Jul 13 14:09:36 UTC 2011

Modified Files:
src/sys/arch/arc/stand/boot: Makefile

Log Message:
build this as a o32 application.


To generate a diff of this commit:
cvs rdiff -u -r1.12 -r1.13 src/sys/arch/arc/stand/boot/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/arc/stand/boot/Makefile
diff -u src/sys/arch/arc/stand/boot/Makefile:1.12 src/sys/arch/arc/stand/boot/Makefile:1.13
--- src/sys/arch/arc/stand/boot/Makefile:1.12	Sun Feb 20 07:52:43 2011
+++ src/sys/arch/arc/stand/boot/Makefile	Wed Jul 13 14:09:36 2011
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.12 2011/02/20 07:52:43 matt Exp $
+# $NetBSD: Makefile,v 1.13 2011/07/13 14:09:36 mrg Exp $
 
 .include bsd.own.mk
 .include bsd.sys.mk	# for ${HOST_SH}
@@ -25,7 +25,7 @@
 LIBCRTBEGIN=
 LIBCRTEND=
 
-AFLAGS=-x assembler-with-cpp -mno-abicalls -mips2
+AFLAGS=-x assembler-with-cpp -mno-abicalls -mips2 -mabi=32
 AFLAGS+=   -D_LOCORE -D_KERNEL
 CFLAGS=-Os -mmemcpy -G 1024
 CFLAGS+=   -ffreestanding -mno-abicalls -msoft-float -mips2 -mabi=32
@@ -36,6 +36,7 @@
 #CPPFLAGS+= -DBOOT_DEBUG
 LDSCRIPT=  ${S}/arch/mips/conf/stand.ldscript
 TEXTADDR=  0x80f0
+LD+=		-m elf32ltsmip
 
 # if there is a 'version' file, add rule for vers.c and add it to SRCS
 # and CLEANFILES



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

2011-07-13 Thread matthew green
Module Name:src
Committed By:   mrg
Date:   Wed Jul 13 14:09:36 UTC 2011

Modified Files:
src/sys/arch/arc/stand/boot: Makefile

Log Message:
build this as a o32 application.


To generate a diff of this commit:
cvs rdiff -u -r1.12 -r1.13 src/sys/arch/arc/stand/boot/Makefile

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



CVS commit: src/sys/arch/arc

2011-07-01 Thread David Young
Module Name:src
Committed By:   dyoung
Date:   Fri Jul  1 19:25:42 UTC 2011

Modified Files:
src/sys/arch/arc/dev: opms.c pccons.c
src/sys/arch/arc/dti: arcsisabr.c tyneisabr.c
src/sys/arch/arc/isa: isadma_bounce.c isapnp_machdep.c mcclock_isa.c
opms_isa.c pccons_isa.c timer_isa.c
src/sys/arch/arc/jazz: asc.c bus_dma_jazz.c com_jazzio.c fd.c
fdc_jazzio.c if_sn_jazzio.c jazzdmatlb.c jazzio.c jazziovar.h
jazzisabr.c lpt_jazzio.c mcclock_jazzio.c oosiop_jazzio.c
opms_jazzio.c osiop_jazzio.c pccons_jazzio.c vga_jazzio.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/arc/dev/opms.c
cvs rdiff -u -r1.58 -r1.59 src/sys/arch/arc/dev/pccons.c
cvs rdiff -u -r1.4 -r1.5 src/sys/arch/arc/dti/arcsisabr.c
cvs rdiff -u -r1.11 -r1.12 src/sys/arch/arc/dti/tyneisabr.c
cvs rdiff -u -r1.12 -r1.13 src/sys/arch/arc/isa/isadma_bounce.c
cvs rdiff -u -r1.8 -r1.9 src/sys/arch/arc/isa/isapnp_machdep.c
cvs rdiff -u -r1.14 -r1.15 src/sys/arch/arc/isa/mcclock_isa.c
cvs rdiff -u -r1.11 -r1.12 src/sys/arch/arc/isa/opms_isa.c \
src/sys/arch/arc/isa/pccons_isa.c
cvs rdiff -u -r1.13 -r1.14 src/sys/arch/arc/isa/timer_isa.c
cvs rdiff -u -r1.23 -r1.24 src/sys/arch/arc/jazz/asc.c
cvs rdiff -u -r1.16 -r1.17 src/sys/arch/arc/jazz/bus_dma_jazz.c \
src/sys/arch/arc/jazz/vga_jazzio.c
cvs rdiff -u -r1.11 -r1.12 src/sys/arch/arc/jazz/com_jazzio.c
cvs rdiff -u -r1.40 -r1.41 src/sys/arch/arc/jazz/fd.c
cvs rdiff -u -r1.14 -r1.15 src/sys/arch/arc/jazz/fdc_jazzio.c \
src/sys/arch/arc/jazz/jazzdmatlb.c
cvs rdiff -u -r1.12 -r1.13 src/sys/arch/arc/jazz/if_sn_jazzio.c \
src/sys/arch/arc/jazz/jazzisabr.c src/sys/arch/arc/jazz/mcclock_jazzio.c
cvs rdiff -u -r1.21 -r1.22 src/sys/arch/arc/jazz/jazzio.c
cvs rdiff -u -r1.7 -r1.8 src/sys/arch/arc/jazz/jazziovar.h
cvs rdiff -u -r1.9 -r1.10 src/sys/arch/arc/jazz/lpt_jazzio.c \
src/sys/arch/arc/jazz/osiop_jazzio.c
cvs rdiff -u -r1.6 -r1.7 src/sys/arch/arc/jazz/oosiop_jazzio.c
cvs rdiff -u -r1.10 -r1.11 src/sys/arch/arc/jazz/opms_jazzio.c \
src/sys/arch/arc/jazz/pccons_jazzio.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/arc/dev/opms.c
diff -u src/sys/arch/arc/dev/opms.c:1.18 src/sys/arch/arc/dev/opms.c:1.19
--- src/sys/arch/arc/dev/opms.c:1.18	Fri Jun 13 08:27:38 2008
+++ src/sys/arch/arc/dev/opms.c	Fri Jul  1 19:25:41 2011
@@ -1,4 +1,4 @@
-/*	$NetBSD: opms.c,v 1.18 2008/06/13 08:27:38 cegger Exp $	*/
+/*	$NetBSD: opms.c,v 1.19 2011/07/01 19:25:41 dyoung Exp $	*/
 /*	$OpenBSD: pccons.c,v 1.22 1999/01/30 22:39:37 imp Exp $	*/
 /*	NetBSD: pms.c,v 1.21 1995/04/18 02:25:18 mycroft Exp	*/
 
@@ -80,7 +80,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: opms.c,v 1.18 2008/06/13 08:27:38 cegger Exp $);
+__KERNEL_RCSID(0, $NetBSD: opms.c,v 1.19 2011/07/01 19:25:41 dyoung Exp $);
 
 #include sys/param.h
 #include sys/systm.h
@@ -91,7 +91,7 @@
 #include sys/proc.h
 #include sys/conf.h
 
-#include machine/bus.h
+#include sys/bus.h
 #include machine/kbdreg.h
 #include machine/mouse.h
 

Index: src/sys/arch/arc/dev/pccons.c
diff -u src/sys/arch/arc/dev/pccons.c:1.58 src/sys/arch/arc/dev/pccons.c:1.59
--- src/sys/arch/arc/dev/pccons.c:1.58	Sun Apr 24 16:26:53 2011
+++ src/sys/arch/arc/dev/pccons.c	Fri Jul  1 19:25:41 2011
@@ -1,4 +1,4 @@
-/*	$NetBSD: pccons.c,v 1.58 2011/04/24 16:26:53 rmind Exp $	*/
+/*	$NetBSD: pccons.c,v 1.59 2011/07/01 19:25:41 dyoung Exp $	*/
 /*	$OpenBSD: pccons.c,v 1.22 1999/01/30 22:39:37 imp Exp $	*/
 /*	NetBSD: pccons.c,v 1.89 1995/05/04 19:35:20 cgd Exp	*/
 
@@ -80,7 +80,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: pccons.c,v 1.58 2011/04/24 16:26:53 rmind Exp $);
+__KERNEL_RCSID(0, $NetBSD: pccons.c,v 1.59 2011/07/01 19:25:41 dyoung Exp $);
 
 #include opt_ddb.h
 
@@ -97,7 +97,7 @@
 #include sys/proc.h
 #include sys/kauth.h
 
-#include machine/bus.h
+#include sys/bus.h
 
 #include dev/ic/pcdisplay.h
 #include machine/pccons.h

Index: src/sys/arch/arc/dti/arcsisabr.c
diff -u src/sys/arch/arc/dti/arcsisabr.c:1.4 src/sys/arch/arc/dti/arcsisabr.c:1.5
--- src/sys/arch/arc/dti/arcsisabr.c:1.4	Sat Jul  5 08:46:25 2008
+++ src/sys/arch/arc/dti/arcsisabr.c	Fri Jul  1 19:25:41 2011
@@ -1,4 +1,4 @@
-/*	$NetBSD: arcsisabr.c,v 1.4 2008/07/05 08:46:25 tsutsui Exp $	*/
+/*	$NetBSD: arcsisabr.c,v 1.5 2011/07/01 19:25:41 dyoung Exp $	*/
 /*	$OpenBSD: isabus.c,v 1.15 1998/03/16 09:38:46 pefo Exp $	*/
 /*	NetBSD: isa.c,v 1.33 1995/06/28 04:30:51 cgd Exp 	*/
 
@@ -75,14 +75,14 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: arcsisabr.c,v 1.4 2008/07/05 08:46:25 tsutsui Exp $);
+__KERNEL_RCSID(0, $NetBSD: arcsisabr.c,v 1.5 2011/07/01 19:25:41 dyoung Exp $);
 
 #include sys/param.h
 #include sys/systm.h
 #include sys/device.h
 
 #include machine/autoconf.h
-#include machine/bus.h

CVS commit: src/sys/arch/arc

2011-07-01 Thread David Young
Module Name:src
Committed By:   dyoung
Date:   Fri Jul  1 19:28:00 UTC 2011

Modified Files:
src/sys/arch/arc/arc: bus_dma.c bus_space_large.c bus_space_sparse.c
c_jazz_eisa.c c_magnum.c c_nec_pci.c machdep.c p_dti_arcstation.c
src/sys/arch/arc/pci: necpb.c

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


To generate a diff of this commit:
cvs rdiff -u -r1.32 -r1.33 src/sys/arch/arc/arc/bus_dma.c
cvs rdiff -u -r1.7 -r1.8 src/sys/arch/arc/arc/bus_space_large.c
cvs rdiff -u -r1.17 -r1.18 src/sys/arch/arc/arc/bus_space_sparse.c
cvs rdiff -u -r1.12 -r1.13 src/sys/arch/arc/arc/c_jazz_eisa.c
cvs rdiff -u -r1.21 -r1.22 src/sys/arch/arc/arc/c_magnum.c
cvs rdiff -u -r1.18 -r1.19 src/sys/arch/arc/arc/c_nec_pci.c
cvs rdiff -u -r1.123 -r1.124 src/sys/arch/arc/arc/machdep.c
cvs rdiff -u -r1.16 -r1.17 src/sys/arch/arc/arc/p_dti_arcstation.c
cvs rdiff -u -r1.36 -r1.37 src/sys/arch/arc/pci/necpb.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/arc/arc/bus_dma.c
diff -u src/sys/arch/arc/arc/bus_dma.c:1.32 src/sys/arch/arc/arc/bus_dma.c:1.33
--- src/sys/arch/arc/arc/bus_dma.c:1.32	Sun Feb 20 07:52:42 2011
+++ src/sys/arch/arc/arc/bus_dma.c	Fri Jul  1 19:28:00 2011
@@ -1,4 +1,4 @@
-/*	$NetBSD: bus_dma.c,v 1.32 2011/02/20 07:52:42 matt Exp $	*/
+/*	$NetBSD: bus_dma.c,v 1.33 2011/07/01 19:28:00 dyoung Exp $	*/
 /*	NetBSD: bus_dma.c,v 1.20 2000/01/10 03:24:36 simonb Exp 	*/
 
 /*-
@@ -32,7 +32,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: bus_dma.c,v 1.32 2011/02/20 07:52:42 matt Exp $);
+__KERNEL_RCSID(0, $NetBSD: bus_dma.c,v 1.33 2011/07/01 19:28:00 dyoung Exp $);
 
 #include sys/param.h
 #include sys/systm.h
@@ -45,7 +45,7 @@
 #include mips/cache.h
 
 #define _ARC_BUS_DMA_PRIVATE
-#include machine/bus.h
+#include sys/bus.h
 
 paddr_t	kvtophys(vaddr_t);	/* XXX */
 

Index: src/sys/arch/arc/arc/bus_space_large.c
diff -u src/sys/arch/arc/arc/bus_space_large.c:1.7 src/sys/arch/arc/arc/bus_space_large.c:1.8
--- src/sys/arch/arc/arc/bus_space_large.c:1.7	Mon Apr 28 20:23:13 2008
+++ src/sys/arch/arc/arc/bus_space_large.c	Fri Jul  1 19:28:00 2011
@@ -1,4 +1,4 @@
-/*	$NetBSD: bus_space_large.c,v 1.7 2008/04/28 20:23:13 martin Exp $	*/
+/*	$NetBSD: bus_space_large.c,v 1.8 2011/07/01 19:28:00 dyoung Exp $	*/
 
 /*-
  * Copyright (c) 1996, 1997, 1998 The NetBSD Foundation, Inc.
@@ -48,7 +48,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: bus_space_large.c,v 1.7 2008/04/28 20:23:13 martin Exp $);
+__KERNEL_RCSID(0, $NetBSD: bus_space_large.c,v 1.8 2011/07/01 19:28:00 dyoung Exp $);
 
 #include sys/param.h
 #include sys/systm.h
@@ -57,7 +57,7 @@
 
 #include uvm/uvm_extern.h
 
-#include machine/bus.h
+#include sys/bus.h
 #include machine/wired_map.h
 
 static int arc_large_bus_space_compose_handle(bus_space_tag_t, bus_addr_t,

Index: src/sys/arch/arc/arc/bus_space_sparse.c
diff -u src/sys/arch/arc/arc/bus_space_sparse.c:1.17 src/sys/arch/arc/arc/bus_space_sparse.c:1.18
--- src/sys/arch/arc/arc/bus_space_sparse.c:1.17	Sun Feb 20 07:52:42 2011
+++ src/sys/arch/arc/arc/bus_space_sparse.c	Fri Jul  1 19:28:00 2011
@@ -1,4 +1,4 @@
-/*	$NetBSD: bus_space_sparse.c,v 1.17 2011/02/20 07:52:42 matt Exp $	*/
+/*	$NetBSD: bus_space_sparse.c,v 1.18 2011/07/01 19:28:00 dyoung Exp $	*/
 /*	NetBSD: bus_machdep.c,v 1.1 2000/01/26 18:48:00 drochner Exp 	*/
 
 /*-
@@ -39,7 +39,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: bus_space_sparse.c,v 1.17 2011/02/20 07:52:42 matt Exp $);
+__KERNEL_RCSID(0, $NetBSD: bus_space_sparse.c,v 1.18 2011/07/01 19:28:00 dyoung Exp $);
 
 #include sys/param.h
 #include sys/systm.h
@@ -51,7 +51,7 @@
 #include mips/cpuregs.h
 #include mips/pte.h
 
-#include machine/bus.h
+#include sys/bus.h
 
 extern paddr_t kvtophys(vaddr_t);	/* XXX */
 

Index: src/sys/arch/arc/arc/c_jazz_eisa.c
diff -u src/sys/arch/arc/arc/c_jazz_eisa.c:1.12 src/sys/arch/arc/arc/c_jazz_eisa.c:1.13
--- src/sys/arch/arc/arc/c_jazz_eisa.c:1.12	Sun Dec 11 12:16:37 2005
+++ src/sys/arch/arc/arc/c_jazz_eisa.c	Fri Jul  1 19:28:00 2011
@@ -1,4 +1,4 @@
-/*	$NetBSD: c_jazz_eisa.c,v 1.12 2005/12/11 12:16:37 christos Exp $	*/
+/*	$NetBSD: c_jazz_eisa.c,v 1.13 2011/07/01 19:28:00 dyoung Exp $	*/
 
 /*
  * Copyright (c) 1998
@@ -32,7 +32,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: c_jazz_eisa.c,v 1.12 2005/12/11 12:16:37 christos Exp $);
+__KERNEL_RCSID(0, $NetBSD: c_jazz_eisa.c,v 1.13 2011/07/01 19:28:00 dyoung Exp $);
 
 #include sys/param.h
 #include sys/systm.h
@@ -40,7 +40,7 @@
 #include sys/device.h
 
 #include machine/autoconf.h
-#include machine/bus.h
+#include sys/bus.h
 #include machine/pio.h
 #include machine/platform.h
 

Index: src/sys/arch/arc/arc/c_magnum.c
diff -u src/sys/arch/arc/arc/c_magnum.c:1.21 src/sys/arch/arc/arc/c_magnum.c:1.22
--- src/sys/arch/arc/arc/c_magnum.c:1.21	Sun Feb 20 07:52:42 2011
+++ src/sys/arch/arc/arc/c_magnum.c	Fri 

CVS commit: src/sys/arch/arc

2011-07-01 Thread David Young
Module Name:src
Committed By:   dyoung
Date:   Fri Jul  1 19:25:42 UTC 2011

Modified Files:
src/sys/arch/arc/dev: opms.c pccons.c
src/sys/arch/arc/dti: arcsisabr.c tyneisabr.c
src/sys/arch/arc/isa: isadma_bounce.c isapnp_machdep.c mcclock_isa.c
opms_isa.c pccons_isa.c timer_isa.c
src/sys/arch/arc/jazz: asc.c bus_dma_jazz.c com_jazzio.c fd.c
fdc_jazzio.c if_sn_jazzio.c jazzdmatlb.c jazzio.c jazziovar.h
jazzisabr.c lpt_jazzio.c mcclock_jazzio.c oosiop_jazzio.c
opms_jazzio.c osiop_jazzio.c pccons_jazzio.c vga_jazzio.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/arc/dev/opms.c
cvs rdiff -u -r1.58 -r1.59 src/sys/arch/arc/dev/pccons.c
cvs rdiff -u -r1.4 -r1.5 src/sys/arch/arc/dti/arcsisabr.c
cvs rdiff -u -r1.11 -r1.12 src/sys/arch/arc/dti/tyneisabr.c
cvs rdiff -u -r1.12 -r1.13 src/sys/arch/arc/isa/isadma_bounce.c
cvs rdiff -u -r1.8 -r1.9 src/sys/arch/arc/isa/isapnp_machdep.c
cvs rdiff -u -r1.14 -r1.15 src/sys/arch/arc/isa/mcclock_isa.c
cvs rdiff -u -r1.11 -r1.12 src/sys/arch/arc/isa/opms_isa.c \
src/sys/arch/arc/isa/pccons_isa.c
cvs rdiff -u -r1.13 -r1.14 src/sys/arch/arc/isa/timer_isa.c
cvs rdiff -u -r1.23 -r1.24 src/sys/arch/arc/jazz/asc.c
cvs rdiff -u -r1.16 -r1.17 src/sys/arch/arc/jazz/bus_dma_jazz.c \
src/sys/arch/arc/jazz/vga_jazzio.c
cvs rdiff -u -r1.11 -r1.12 src/sys/arch/arc/jazz/com_jazzio.c
cvs rdiff -u -r1.40 -r1.41 src/sys/arch/arc/jazz/fd.c
cvs rdiff -u -r1.14 -r1.15 src/sys/arch/arc/jazz/fdc_jazzio.c \
src/sys/arch/arc/jazz/jazzdmatlb.c
cvs rdiff -u -r1.12 -r1.13 src/sys/arch/arc/jazz/if_sn_jazzio.c \
src/sys/arch/arc/jazz/jazzisabr.c src/sys/arch/arc/jazz/mcclock_jazzio.c
cvs rdiff -u -r1.21 -r1.22 src/sys/arch/arc/jazz/jazzio.c
cvs rdiff -u -r1.7 -r1.8 src/sys/arch/arc/jazz/jazziovar.h
cvs rdiff -u -r1.9 -r1.10 src/sys/arch/arc/jazz/lpt_jazzio.c \
src/sys/arch/arc/jazz/osiop_jazzio.c
cvs rdiff -u -r1.6 -r1.7 src/sys/arch/arc/jazz/oosiop_jazzio.c
cvs rdiff -u -r1.10 -r1.11 src/sys/arch/arc/jazz/opms_jazzio.c \
src/sys/arch/arc/jazz/pccons_jazzio.c

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



CVS commit: src/sys/arch/arc

2011-07-01 Thread David Young
Module Name:src
Committed By:   dyoung
Date:   Fri Jul  1 19:28:00 UTC 2011

Modified Files:
src/sys/arch/arc/arc: bus_dma.c bus_space_large.c bus_space_sparse.c
c_jazz_eisa.c c_magnum.c c_nec_pci.c machdep.c p_dti_arcstation.c
src/sys/arch/arc/pci: necpb.c

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


To generate a diff of this commit:
cvs rdiff -u -r1.32 -r1.33 src/sys/arch/arc/arc/bus_dma.c
cvs rdiff -u -r1.7 -r1.8 src/sys/arch/arc/arc/bus_space_large.c
cvs rdiff -u -r1.17 -r1.18 src/sys/arch/arc/arc/bus_space_sparse.c
cvs rdiff -u -r1.12 -r1.13 src/sys/arch/arc/arc/c_jazz_eisa.c
cvs rdiff -u -r1.21 -r1.22 src/sys/arch/arc/arc/c_magnum.c
cvs rdiff -u -r1.18 -r1.19 src/sys/arch/arc/arc/c_nec_pci.c
cvs rdiff -u -r1.123 -r1.124 src/sys/arch/arc/arc/machdep.c
cvs rdiff -u -r1.16 -r1.17 src/sys/arch/arc/arc/p_dti_arcstation.c
cvs rdiff -u -r1.36 -r1.37 src/sys/arch/arc/pci/necpb.c

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



CVS commit: src/sys/arch/arc

2011-04-03 Thread David Young
Module Name:src
Committed By:   dyoung
Date:   Sun Apr  3 23:14:13 UTC 2011

Modified Files:
src/sys/arch/arc: Makefile

Log Message:
Fix 'tags' target.


To generate a diff of this commit:
cvs rdiff -u -r1.11 -r1.12 src/sys/arch/arc/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/arc/Makefile
diff -u src/sys/arch/arc/Makefile:1.11 src/sys/arch/arc/Makefile:1.12
--- src/sys/arch/arc/Makefile:1.11	Sat Oct 25 22:27:36 2008
+++ src/sys/arch/arc/Makefile	Sun Apr  3 23:14:12 2011
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile,v 1.11 2008/10/25 22:27:36 apb Exp $
+#	$NetBSD: Makefile,v 1.12 2011/04/03 23:14:12 dyoung Exp $
 #	$OpenBSD: Makefile,v 1.5 1997/05/19 10:34:53 pefo Exp $
 #	from: @(#)Makefile	8.1 (Berkeley) 6/16/93
 
@@ -7,11 +7,12 @@
 # Find where mips source files are for inclusion in tags
 .include ../mips/Makefile.inc
 
-TARC=	../arc/tags
-SARC=	../arc/arc/*.[ch] ../arc/dev/*.[ch] \
-	../arc/dti/*.[ch] ../arc/include/*.h ../arc/isa/*.[ch] \
-	../arc/pci/*.[ch] ../arc/jazz/*.[ch]
-AARC=	../arc/arc/*.S
+TARC=	${SYSDIR}/arch/arc/tags
+SARC=	${SYSDIR}/arch/arc/arc/*.[ch] ${SYSDIR}/arch/arc/dev/*.[ch] \
+	${SYSDIR}/arch/arc/dti/*.[ch] ${SYSDIR}/arch/arc/include/*.h \
+	${SYSDIR}/arch/arc/isa/*.[ch] \
+	${SYSDIR}/arch/arc/pci/*.[ch] ${SYSDIR}/arch/arc/jazz/*.[ch]
+AARC=	${SYSDIR}/arch/arc/arc/*.S
 
 # Directories in which to place tags links
 DARC=	arc dev dti include isa pci jazz
@@ -19,7 +20,9 @@
 .include ../../kern/Make.tags.inc
 
 tags:
-	-ctags -wdtf ${TARC} ${SARC} ${SMIPS} ${COMM}
+	-rm -f ${TARC}
+	-echo ${SARC} ${SMIPS} | xargs ctags -wadtf ${TARC}
+	-${FINDCOMM} | xargs ctags -wadtf ${TARC}
 	egrep ^LEAF(.*)|^[AN]LEAF(.*)|^NON_LEAF(.*) ${AARC} ${AMIPS} | \
 	${TOOL_SED} s;\([^:]*\):\([^(]*\)(\([^, )]*\)\(.*\);\3 \1 /^\2(\3\4$$/; \
 	 ${TARC}



CVS commit: src/sys/arch/arc

2011-04-03 Thread David Young
Module Name:src
Committed By:   dyoung
Date:   Sun Apr  3 23:14:13 UTC 2011

Modified Files:
src/sys/arch/arc: Makefile

Log Message:
Fix 'tags' target.


To generate a diff of this commit:
cvs rdiff -u -r1.11 -r1.12 src/sys/arch/arc/Makefile

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



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

2011-03-18 Thread Izumi Tsutsui
Module Name:src
Committed By:   tsutsui
Date:   Fri Mar 18 16:17:22 UTC 2011

Modified Files:
src/sys/arch/arc/include: param.h

Log Message:
- no need to define MACHINE_ARCH in MD header
- include mips/mips_param.h after MACHINE is defined


To generate a diff of this commit:
cvs rdiff -u -r1.28 -r1.29 src/sys/arch/arc/include/param.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/arc/include/param.h
diff -u src/sys/arch/arc/include/param.h:1.28 src/sys/arch/arc/include/param.h:1.29
--- src/sys/arch/arc/include/param.h:1.28	Sun Mar  6 20:34:57 2011
+++ src/sys/arch/arc/include/param.h	Fri Mar 18 16:17:22 2011
@@ -1,4 +1,4 @@
-/*	$NetBSD: param.h,v 1.28 2011/03/06 20:34:57 he Exp $	*/
+/*	$NetBSD: param.h,v 1.29 2011/03/18 16:17:22 tsutsui Exp $	*/
 /*  $OpenBSD: param.h,v 1.9 1997/04/30 09:54:15 niklas Exp $ */
 
 /*
@@ -44,6 +44,9 @@
 /*
  * Machine-dependent constants (VM, etc) common across MIPS cpus
  */
+#define	_MACHINE	arc
+#define	MACHINE		arc
+
 #include mips/mips_param.h
 
 /*
@@ -53,13 +56,6 @@
  *	Deskstation Tyne
  *	Etc
  */
-#define	_MACHINE_ARCH	mipsel
-#define	MACHINE_ARCH	mipsel
-#define	_MACHINE	arc
-#ifdef _KERNEL
-#define	MACHINE		arc
-#endif
-
 #define	KERNBASE	0x8000	/* start of kernel virtual */
 #define	BTOPKERNBASE	((u_long)KERNBASE  PGSHIFT)
 



CVS commit: src/sys/arch/arc

2011-03-06 Thread Izumi Tsutsui
Module Name:src
Committed By:   tsutsui
Date:   Sun Mar  6 14:58:44 UTC 2011

Modified Files:
src/sys/arch/arc/arc: c_isa.c cpu.c mainbus.c p_acer_pica_61.c
p_ms_jazz.c timervar.h
src/sys/arch/arc/conf: GENERIC RPC44 majors.arc
src/sys/arch/arc/dti: desktech.h
src/sys/arch/arc/include: autoconf.h isa_machdep.h
src/sys/arch/arc/isa: isabus.c isadma.c opms_isa.c pccons_isa.c
pccons_isavar.h
src/sys/arch/arc/jazz: jazzio.c lpt_jazzio.c opms_jazzio.c
pccons_jazzio.c pccons_jazziovar.h pica.h rd94.h vga_jazzio.c
vga_jazziovar.h

Log Message:
Remove trailing spaces.


To generate a diff of this commit:
cvs rdiff -u -r1.9 -r1.10 src/sys/arch/arc/arc/c_isa.c
cvs rdiff -u -r1.18 -r1.19 src/sys/arch/arc/arc/cpu.c
cvs rdiff -u -r1.22 -r1.23 src/sys/arch/arc/arc/mainbus.c
cvs rdiff -u -r1.11 -r1.12 src/sys/arch/arc/arc/p_acer_pica_61.c
cvs rdiff -u -r1.8 -r1.9 src/sys/arch/arc/arc/p_ms_jazz.c
cvs rdiff -u -r1.5 -r1.6 src/sys/arch/arc/arc/timervar.h
cvs rdiff -u -r1.165 -r1.166 src/sys/arch/arc/conf/GENERIC
cvs rdiff -u -r1.37 -r1.38 src/sys/arch/arc/conf/RPC44
cvs rdiff -u -r1.22 -r1.23 src/sys/arch/arc/conf/majors.arc
cvs rdiff -u -r1.4 -r1.5 src/sys/arch/arc/dti/desktech.h
cvs rdiff -u -r1.13 -r1.14 src/sys/arch/arc/include/autoconf.h
cvs rdiff -u -r1.14 -r1.15 src/sys/arch/arc/include/isa_machdep.h
cvs rdiff -u -r1.47 -r1.48 src/sys/arch/arc/isa/isabus.c
cvs rdiff -u -r1.11 -r1.12 src/sys/arch/arc/isa/isadma.c
cvs rdiff -u -r1.10 -r1.11 src/sys/arch/arc/isa/opms_isa.c \
src/sys/arch/arc/isa/pccons_isa.c
cvs rdiff -u -r1.3 -r1.4 src/sys/arch/arc/isa/pccons_isavar.h
cvs rdiff -u -r1.20 -r1.21 src/sys/arch/arc/jazz/jazzio.c
cvs rdiff -u -r1.8 -r1.9 src/sys/arch/arc/jazz/lpt_jazzio.c
cvs rdiff -u -r1.9 -r1.10 src/sys/arch/arc/jazz/opms_jazzio.c \
src/sys/arch/arc/jazz/pccons_jazzio.c
cvs rdiff -u -r1.3 -r1.4 src/sys/arch/arc/jazz/pccons_jazziovar.h \
src/sys/arch/arc/jazz/pica.h
cvs rdiff -u -r1.7 -r1.8 src/sys/arch/arc/jazz/rd94.h
cvs rdiff -u -r1.15 -r1.16 src/sys/arch/arc/jazz/vga_jazzio.c
cvs rdiff -u -r1.4 -r1.5 src/sys/arch/arc/jazz/vga_jazziovar.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/arc/arc/c_isa.c
diff -u src/sys/arch/arc/arc/c_isa.c:1.9 src/sys/arch/arc/arc/c_isa.c:1.10
--- src/sys/arch/arc/arc/c_isa.c:1.9	Sun Nov 20 04:38:11 2005
+++ src/sys/arch/arc/arc/c_isa.c	Sun Mar  6 14:58:42 2011
@@ -1,4 +1,4 @@
-/*	$NetBSD: c_isa.c,v 1.9 2005/11/20 04:38:11 tsutsui Exp $	*/
+/*	$NetBSD: c_isa.c,v 1.10 2011/03/06 14:58:42 tsutsui Exp $	*/
 /*	$OpenBSD: isabus.c,v 1.15 1998/03/16 09:38:46 pefo Exp $	*/
 
 /*-
@@ -71,28 +71,28 @@
  *
  *	@(#)isa.c	7.2 (Berkeley) 5/12/91
  */
-/* 
+/*
  * Mach Operating System
  * Copyright (c) 1991,1990,1989 Carnegie Mellon University
  * All Rights Reserved.
- * 
+ *
  * Permission to use, copy, modify and distribute this software and its
  * documentation is hereby granted, provided that both the copyright
  * notice and this permission notice appear in all copies of the
  * software, derivative works or modified versions, and any portions
  * thereof, and that both notices appear in supporting documentation.
- * 
+ *
  * CARNEGIE MELLON ALLOWS FREE USE OF THIS SOFTWARE IN ITS AS IS
  * CONDITION.  CARNEGIE MELLON DISCLAIMS ANY LIABILITY OF ANY KIND FOR
  * ANY DAMAGES WHATSOEVER RESULTING FROM THE USE OF THIS SOFTWARE.
- * 
+ *
  * Carnegie Mellon requests users of this software to return to
- * 
+ *
  *  Software Distribution Coordinator  or  software.distribut...@cs.cmu.edu
  *  School of Computer Science
  *  Carnegie Mellon University
  *  Pittsburgh PA 15213-3890
- * 
+ *
  * any improvements or extensions that they make and grant Carnegie Mellon
  * the rights to redistribute these changes.
  */
@@ -123,7 +123,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: c_isa.c,v 1.9 2005/11/20 04:38:11 tsutsui Exp $);
+__KERNEL_RCSID(0, $NetBSD: c_isa.c,v 1.10 2011/03/06 14:58:42 tsutsui Exp $);
 
 #include sys/param.h
 #include sys/systm.h

Index: src/sys/arch/arc/arc/cpu.c
diff -u src/sys/arch/arc/arc/cpu.c:1.18 src/sys/arch/arc/arc/cpu.c:1.19
--- src/sys/arch/arc/arc/cpu.c:1.18	Sun Feb 20 07:52:42 2011
+++ src/sys/arch/arc/arc/cpu.c	Sun Mar  6 14:58:42 2011
@@ -1,9 +1,9 @@
-/*	$NetBSD: cpu.c,v 1.18 2011/02/20 07:52:42 matt Exp $	*/
+/*	$NetBSD: cpu.c,v 1.19 2011/03/06 14:58:42 tsutsui Exp $	*/
 /*	$OpenBSD: cpu.c,v 1.8 1997/04/19 17:19:41 pefo Exp $ */
 
 /*
  * Copyright (c) 1997 Per Fogelstrom
- * 
+ *
  * Redistribution and use in source and binary forms, with or without
  * modification, are permitted provided that the following conditions
  * are met:
@@ -34,7 +34,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: cpu.c,v 1.18 2011/02/20 07:52:42 matt Exp $);
+__KERNEL_RCSID(0, $NetBSD: cpu.c,v 1.19 2011/03/06 14:58:42 tsutsui 

CVS commit: src/sys/arch/arc

2011-03-06 Thread Izumi Tsutsui
Module Name:src
Committed By:   tsutsui
Date:   Sun Mar  6 14:58:44 UTC 2011

Modified Files:
src/sys/arch/arc/arc: c_isa.c cpu.c mainbus.c p_acer_pica_61.c
p_ms_jazz.c timervar.h
src/sys/arch/arc/conf: GENERIC RPC44 majors.arc
src/sys/arch/arc/dti: desktech.h
src/sys/arch/arc/include: autoconf.h isa_machdep.h
src/sys/arch/arc/isa: isabus.c isadma.c opms_isa.c pccons_isa.c
pccons_isavar.h
src/sys/arch/arc/jazz: jazzio.c lpt_jazzio.c opms_jazzio.c
pccons_jazzio.c pccons_jazziovar.h pica.h rd94.h vga_jazzio.c
vga_jazziovar.h

Log Message:
Remove trailing spaces.


To generate a diff of this commit:
cvs rdiff -u -r1.9 -r1.10 src/sys/arch/arc/arc/c_isa.c
cvs rdiff -u -r1.18 -r1.19 src/sys/arch/arc/arc/cpu.c
cvs rdiff -u -r1.22 -r1.23 src/sys/arch/arc/arc/mainbus.c
cvs rdiff -u -r1.11 -r1.12 src/sys/arch/arc/arc/p_acer_pica_61.c
cvs rdiff -u -r1.8 -r1.9 src/sys/arch/arc/arc/p_ms_jazz.c
cvs rdiff -u -r1.5 -r1.6 src/sys/arch/arc/arc/timervar.h
cvs rdiff -u -r1.165 -r1.166 src/sys/arch/arc/conf/GENERIC
cvs rdiff -u -r1.37 -r1.38 src/sys/arch/arc/conf/RPC44
cvs rdiff -u -r1.22 -r1.23 src/sys/arch/arc/conf/majors.arc
cvs rdiff -u -r1.4 -r1.5 src/sys/arch/arc/dti/desktech.h
cvs rdiff -u -r1.13 -r1.14 src/sys/arch/arc/include/autoconf.h
cvs rdiff -u -r1.14 -r1.15 src/sys/arch/arc/include/isa_machdep.h
cvs rdiff -u -r1.47 -r1.48 src/sys/arch/arc/isa/isabus.c
cvs rdiff -u -r1.11 -r1.12 src/sys/arch/arc/isa/isadma.c
cvs rdiff -u -r1.10 -r1.11 src/sys/arch/arc/isa/opms_isa.c \
src/sys/arch/arc/isa/pccons_isa.c
cvs rdiff -u -r1.3 -r1.4 src/sys/arch/arc/isa/pccons_isavar.h
cvs rdiff -u -r1.20 -r1.21 src/sys/arch/arc/jazz/jazzio.c
cvs rdiff -u -r1.8 -r1.9 src/sys/arch/arc/jazz/lpt_jazzio.c
cvs rdiff -u -r1.9 -r1.10 src/sys/arch/arc/jazz/opms_jazzio.c \
src/sys/arch/arc/jazz/pccons_jazzio.c
cvs rdiff -u -r1.3 -r1.4 src/sys/arch/arc/jazz/pccons_jazziovar.h \
src/sys/arch/arc/jazz/pica.h
cvs rdiff -u -r1.7 -r1.8 src/sys/arch/arc/jazz/rd94.h
cvs rdiff -u -r1.15 -r1.16 src/sys/arch/arc/jazz/vga_jazzio.c
cvs rdiff -u -r1.4 -r1.5 src/sys/arch/arc/jazz/vga_jazziovar.h

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



CVS commit: src/sys/arch/arc/arc

2011-03-02 Thread Izumi Tsutsui
Module Name:src
Committed By:   tsutsui
Date:   Wed Mar  2 10:51:04 UTC 2011

Modified Files:
src/sys/arch/arc/arc: interrupt.c

Log Message:
Fix misplaced #endif.  PR port-arc/44664

XXX: I'll also remove ENABLE_INT5_STATCLOCK soon since no visible improvements.


To generate a diff of this commit:
cvs rdiff -u -r1.8 -r1.9 src/sys/arch/arc/arc/interrupt.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/arc/arc/interrupt.c
diff -u src/sys/arch/arc/arc/interrupt.c:1.8 src/sys/arch/arc/arc/interrupt.c:1.9
--- src/sys/arch/arc/arc/interrupt.c:1.8	Sun Feb 20 07:52:42 2011
+++ src/sys/arch/arc/arc/interrupt.c	Wed Mar  2 10:51:04 2011
@@ -1,4 +1,4 @@
-/*	$NetBSD: interrupt.c,v 1.8 2011/02/20 07:52:42 matt Exp $	*/
+/*	$NetBSD: interrupt.c,v 1.9 2011/03/02 10:51:04 tsutsui Exp $	*/
 /*	$OpenBSD: trap.c,v 1.22 1999/05/24 23:08:59 jason Exp $	*/
 
 /*
@@ -40,7 +40,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: interrupt.c,v 1.8 2011/02/20 07:52:42 matt Exp $);
+__KERNEL_RCSID(0, $NetBSD: interrupt.c,v 1.9 2011/03/02 10:51:04 tsutsui Exp $);
 
 #include sys/param.h
 #include sys/systm.h
@@ -124,8 +124,8 @@
 			 * effect, clears the timer interrupt request.
 			 */
 			mips3_cp0_compare_write(0);
-		}
 #endif
+		}
 
 		/*
 		 * If there is an independent timer interrupt handler,



CVS commit: src/sys/arch/arc

2011-02-20 Thread Matt Thomas
Module Name:src
Committed By:   matt
Date:   Sun Feb 20 07:52:43 UTC 2011

Modified Files:
src/sys/arch/arc/arc: autoconf.c bus_dma.c bus_space_sparse.c
c_magnum.c c_nec_eisa.c c_nec_pci.c cpu.c interrupt.c machdep.c
p_dti_arcstation.c p_dti_tyne.c p_sni_rm200pci.c
src/sys/arch/arc/conf: files.arc
src/sys/arch/arc/include: intr.h
src/sys/arch/arc/isa: isadma_bounce.c
src/sys/arch/arc/pci: necpb.c
src/sys/arch/arc/stand/boot: Makefile boot.c disk.c getchar.c putchar.c
start.S
Added Files:
src/sys/arch/arc/include: netbsd32_machdep.h

Log Message:
Merge forward from matt-nb5-mips64.
Adapt to new interrupt/spl framework.
Add LP64 support.


To generate a diff of this commit:
cvs rdiff -u -r1.32 -r1.33 src/sys/arch/arc/arc/autoconf.c
cvs rdiff -u -r1.31 -r1.32 src/sys/arch/arc/arc/bus_dma.c
cvs rdiff -u -r1.16 -r1.17 src/sys/arch/arc/arc/bus_space_sparse.c
cvs rdiff -u -r1.20 -r1.21 src/sys/arch/arc/arc/c_magnum.c
cvs rdiff -u -r1.15 -r1.16 src/sys/arch/arc/arc/c_nec_eisa.c \
src/sys/arch/arc/arc/p_dti_arcstation.c
cvs rdiff -u -r1.17 -r1.18 src/sys/arch/arc/arc/c_nec_pci.c \
src/sys/arch/arc/arc/cpu.c
cvs rdiff -u -r1.7 -r1.8 src/sys/arch/arc/arc/interrupt.c
cvs rdiff -u -r1.122 -r1.123 src/sys/arch/arc/arc/machdep.c
cvs rdiff -u -r1.18 -r1.19 src/sys/arch/arc/arc/p_dti_tyne.c
cvs rdiff -u -r1.14 -r1.15 src/sys/arch/arc/arc/p_sni_rm200pci.c
cvs rdiff -u -r1.63 -r1.64 src/sys/arch/arc/conf/files.arc
cvs rdiff -u -r1.22 -r1.23 src/sys/arch/arc/include/intr.h
cvs rdiff -u -r0 -r1.2 src/sys/arch/arc/include/netbsd32_machdep.h
cvs rdiff -u -r1.11 -r1.12 src/sys/arch/arc/isa/isadma_bounce.c
cvs rdiff -u -r1.33 -r1.34 src/sys/arch/arc/pci/necpb.c
cvs rdiff -u -r1.11 -r1.12 src/sys/arch/arc/stand/boot/Makefile
cvs rdiff -u -r1.7 -r1.8 src/sys/arch/arc/stand/boot/boot.c
cvs rdiff -u -r1.4 -r1.5 src/sys/arch/arc/stand/boot/disk.c \
src/sys/arch/arc/stand/boot/start.S
cvs rdiff -u -r1.3 -r1.4 src/sys/arch/arc/stand/boot/getchar.c \
src/sys/arch/arc/stand/boot/putchar.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/arc/arc/autoconf.c
diff -u src/sys/arch/arc/arc/autoconf.c:1.32 src/sys/arch/arc/arc/autoconf.c:1.33
--- src/sys/arch/arc/arc/autoconf.c:1.32	Mon Dec  3 15:33:12 2007
+++ src/sys/arch/arc/arc/autoconf.c	Sun Feb 20 07:52:42 2011
@@ -1,4 +1,4 @@
-/*	$NetBSD: autoconf.c,v 1.32 2007/12/03 15:33:12 ad Exp $	*/
+/*	$NetBSD: autoconf.c,v 1.33 2011/02/20 07:52:42 matt Exp $	*/
 /*	$OpenBSD: autoconf.c,v 1.9 1997/05/18 13:45:20 pefo Exp $	*/
 
 /*
@@ -88,7 +88,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: autoconf.c,v 1.32 2007/12/03 15:33:12 ad Exp $);
+__KERNEL_RCSID(0, $NetBSD: autoconf.c,v 1.33 2011/02/20 07:52:42 matt Exp $);
 
 #include sys/param.h
 #include sys/systm.h
@@ -148,9 +148,10 @@
 	 * to disable it other than setting status register by spl(9).
 	 */
 	_spllower(MIPS_INT_MASK_5);
+#error need fix
 #else
 	/* enable all source forcing SOFT_INTs cleared */
-	_splnone();
+	spl0();
 #endif
 }
 

Index: src/sys/arch/arc/arc/bus_dma.c
diff -u src/sys/arch/arc/arc/bus_dma.c:1.31 src/sys/arch/arc/arc/bus_dma.c:1.32
--- src/sys/arch/arc/arc/bus_dma.c:1.31	Fri Nov 12 13:18:56 2010
+++ src/sys/arch/arc/arc/bus_dma.c	Sun Feb 20 07:52:42 2011
@@ -1,4 +1,4 @@
-/*	$NetBSD: bus_dma.c,v 1.31 2010/11/12 13:18:56 uebayasi Exp $	*/
+/*	$NetBSD: bus_dma.c,v 1.32 2011/02/20 07:52:42 matt Exp $	*/
 /*	NetBSD: bus_dma.c,v 1.20 2000/01/10 03:24:36 simonb Exp 	*/
 
 /*-
@@ -32,7 +32,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: bus_dma.c,v 1.31 2010/11/12 13:18:56 uebayasi Exp $);
+__KERNEL_RCSID(0, $NetBSD: bus_dma.c,v 1.32 2011/02/20 07:52:42 matt Exp $);
 
 #include sys/param.h
 #include sys/systm.h
@@ -53,8 +53,6 @@
 		void *, bus_size_t, struct vmspace *, int, paddr_t *,
 		int *, int);
 
-extern paddr_t avail_start, avail_end;	/* from pmap.c */
-
 void
 _bus_dma_tag_init(bus_dma_tag_t t)
 {
@@ -405,6 +403,7 @@
 _bus_dmamap_sync(bus_dma_tag_t t, bus_dmamap_t map, bus_addr_t offset,
 bus_size_t len, int ops)
 {
+	const struct mips_cache_info * const mci = mips_cache_info;
 	bus_size_t minlen;
 	bus_addr_t addr, start, end, preboundary, firstboundary, lastboundary;
 	int i, useindex;
@@ -517,19 +516,19 @@
 
 		case BUS_DMASYNC_PREREAD:
 			end = start + minlen;
-			preboundary = start  ~mips_dcache_align_mask;
-			firstboundary = (start + mips_dcache_align_mask)
-			 ~mips_dcache_align_mask;
-			lastboundary = end  ~mips_dcache_align_mask;
+			preboundary = start  ~mci-mci_dcache_align_mask;
+			firstboundary = (start + mci-mci_dcache_align_mask)
+			 ~mci-mci_dcache_align_mask;
+			lastboundary = end  ~mci-mci_dcache_align_mask;
 			if (preboundary  start  preboundary  lastboundary)
 mips_dcache_wbinv_range(preboundary,
-mips_dcache_align);

CVS commit: src/sys/arch/arc

2011-02-20 Thread Matt Thomas
Module Name:src
Committed By:   matt
Date:   Sun Feb 20 07:52:43 UTC 2011

Modified Files:
src/sys/arch/arc/arc: autoconf.c bus_dma.c bus_space_sparse.c
c_magnum.c c_nec_eisa.c c_nec_pci.c cpu.c interrupt.c machdep.c
p_dti_arcstation.c p_dti_tyne.c p_sni_rm200pci.c
src/sys/arch/arc/conf: files.arc
src/sys/arch/arc/include: intr.h
src/sys/arch/arc/isa: isadma_bounce.c
src/sys/arch/arc/pci: necpb.c
src/sys/arch/arc/stand/boot: Makefile boot.c disk.c getchar.c putchar.c
start.S
Added Files:
src/sys/arch/arc/include: netbsd32_machdep.h

Log Message:
Merge forward from matt-nb5-mips64.
Adapt to new interrupt/spl framework.
Add LP64 support.


To generate a diff of this commit:
cvs rdiff -u -r1.32 -r1.33 src/sys/arch/arc/arc/autoconf.c
cvs rdiff -u -r1.31 -r1.32 src/sys/arch/arc/arc/bus_dma.c
cvs rdiff -u -r1.16 -r1.17 src/sys/arch/arc/arc/bus_space_sparse.c
cvs rdiff -u -r1.20 -r1.21 src/sys/arch/arc/arc/c_magnum.c
cvs rdiff -u -r1.15 -r1.16 src/sys/arch/arc/arc/c_nec_eisa.c \
src/sys/arch/arc/arc/p_dti_arcstation.c
cvs rdiff -u -r1.17 -r1.18 src/sys/arch/arc/arc/c_nec_pci.c \
src/sys/arch/arc/arc/cpu.c
cvs rdiff -u -r1.7 -r1.8 src/sys/arch/arc/arc/interrupt.c
cvs rdiff -u -r1.122 -r1.123 src/sys/arch/arc/arc/machdep.c
cvs rdiff -u -r1.18 -r1.19 src/sys/arch/arc/arc/p_dti_tyne.c
cvs rdiff -u -r1.14 -r1.15 src/sys/arch/arc/arc/p_sni_rm200pci.c
cvs rdiff -u -r1.63 -r1.64 src/sys/arch/arc/conf/files.arc
cvs rdiff -u -r1.22 -r1.23 src/sys/arch/arc/include/intr.h
cvs rdiff -u -r0 -r1.2 src/sys/arch/arc/include/netbsd32_machdep.h
cvs rdiff -u -r1.11 -r1.12 src/sys/arch/arc/isa/isadma_bounce.c
cvs rdiff -u -r1.33 -r1.34 src/sys/arch/arc/pci/necpb.c
cvs rdiff -u -r1.11 -r1.12 src/sys/arch/arc/stand/boot/Makefile
cvs rdiff -u -r1.7 -r1.8 src/sys/arch/arc/stand/boot/boot.c
cvs rdiff -u -r1.4 -r1.5 src/sys/arch/arc/stand/boot/disk.c \
src/sys/arch/arc/stand/boot/start.S
cvs rdiff -u -r1.3 -r1.4 src/sys/arch/arc/stand/boot/getchar.c \
src/sys/arch/arc/stand/boot/putchar.c

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



CVS commit: src/sys/arch/arc

2011-01-08 Thread Izumi Tsutsui
Module Name:src
Committed By:   tsutsui
Date:   Sat Jan  8 09:44:37 UTC 2011

Modified Files:
src/sys/arch/arc: TODO

Log Message:
Update some items to reflect reality.


To generate a diff of this commit:
cvs rdiff -u -r1.28 -r1.29 src/sys/arch/arc/TODO

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/arc/TODO
diff -u src/sys/arch/arc/TODO:1.28 src/sys/arch/arc/TODO:1.29
--- src/sys/arch/arc/TODO:1.28	Wed Oct 21 21:11:59 2009
+++ src/sys/arch/arc/TODO	Sat Jan  8 09:44:37 2011
@@ -1,11 +1,8 @@
-$NetBSD: TODO,v 1.28 2009/10/21 21:11:59 rmind Exp $
+$NetBSD: TODO,v 1.29 2011/01/08 09:44:37 tsutsui Exp $
 
 To do list (in some particular order)
 XXX some entries might be obsolete.
 
-o	install notes
-
-
 o	use MI driver
 
 	-   make fd driver MI, and share it with other ports
@@ -15,14 +12,12 @@
 	XXX needs fixes of DESKstation support
 
 o	VXL framebuffer support (Magnum, RISCstation 2200)
+	(Note nowadays QEMU supports Magnum 4000 with VXL)
 
 o	com_jazzio.c
 	-   clock handling clean up (obtain from ARC BIOS)
 	-   fifo disabling may be only needed on some Magnum?
 
-o	remove pccons and switch to wscons completely
-	(XXX what's the problem to remove pccons?)
-
 o	AD1848 audio support
 
 o	missing MI devices
@@ -36,6 +31,8 @@
 	-   vga/cirrus	RISCserver 2200, Express5800/240 R4400 EISA
 	-   vga/???	DESKstation Tyne, rPC44
 	-   TGA		RISCstation 2250, Express5800/230 R4400 PCI
+			(TGA support in XalphaNetBSD just works,
+			 but needs XOrg'fy)
 
 o   Find out why bitmap load to S3-928 flashes screen. (X server)
 	Know why (enable linear mode). Need S3 info.
@@ -57,7 +54,6 @@
 o	parse ARC BIOS configuration information and use it
 
 o	fix kernel start address
-	(maybe requires bootloader support)
 
 o	allocate PICA_TL_BASE dynamically
 
@@ -69,8 +65,6 @@
 
 o	intrcnt[] name cleanup, use MI evcnt(9)
 
-o	test and merge soren's clean up about proc0.p_addr.
-
 o	redesign interrupt handler framework.
 
 o	it is better to always disable the MIPS3 internal timer interrupts
@@ -101,15 +95,9 @@
 
 (following entries might be MI MIPS items)
 
-o	make CLKF_INTR() work.
-
 o	Move the RO and WIRED attribute from the pte to the pv table.
 	This saves four instructions in the tlb miss handler.
 
-o   Can we have 32 double registers?
-
-o	64bit kernel/userland
-
 o	clean up ALEAF/NLEAF/NON_LEAF/NNON_LEAF in userland.
 
 Lots of other things.



CVS commit: src/sys/arch/arc

2011-01-08 Thread Izumi Tsutsui
Module Name:src
Committed By:   tsutsui
Date:   Sat Jan  8 09:44:37 UTC 2011

Modified Files:
src/sys/arch/arc: TODO

Log Message:
Update some items to reflect reality.


To generate a diff of this commit:
cvs rdiff -u -r1.28 -r1.29 src/sys/arch/arc/TODO

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



CVS commit: src/sys/arch/arc/jazz

2010-11-14 Thread Masao Uebayashi
Module Name:src
Committed By:   uebayasi
Date:   Mon Nov 15 06:13:16 UTC 2010

Modified Files:
src/sys/arch/arc/jazz: bus_dma_jazz.c

Log Message:
struct proc * deref.


To generate a diff of this commit:
cvs rdiff -u -r1.15 -r1.16 src/sys/arch/arc/jazz/bus_dma_jazz.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/arc/jazz/bus_dma_jazz.c
diff -u src/sys/arch/arc/jazz/bus_dma_jazz.c:1.15 src/sys/arch/arc/jazz/bus_dma_jazz.c:1.16
--- src/sys/arch/arc/jazz/bus_dma_jazz.c:1.15	Wed May 14 13:29:27 2008
+++ src/sys/arch/arc/jazz/bus_dma_jazz.c	Mon Nov 15 06:13:16 2010
@@ -1,4 +1,4 @@
-/*	$NetBSD: bus_dma_jazz.c,v 1.15 2008/05/14 13:29:27 tsutsui Exp $	*/
+/*	$NetBSD: bus_dma_jazz.c,v 1.16 2010/11/15 06:13:16 uebayasi Exp $	*/
 
 /*-
  * Copyright (c) 2003 Izumi Tsutsui.  All rights reserved.
@@ -51,12 +51,13 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: bus_dma_jazz.c,v 1.15 2008/05/14 13:29:27 tsutsui Exp $);
+__KERNEL_RCSID(0, $NetBSD: bus_dma_jazz.c,v 1.16 2010/11/15 06:13:16 uebayasi Exp $);
 
 #include sys/param.h
 #include sys/systm.h
 #include sys/mbuf.h
 #include sys/device.h
+#include sys/proc.h
 
 #include uvm/uvm_extern.h
 



CVS commit: src/sys/arch/arc/jazz

2010-11-14 Thread Masao Uebayashi
Module Name:src
Committed By:   uebayasi
Date:   Mon Nov 15 06:13:16 UTC 2010

Modified Files:
src/sys/arch/arc/jazz: bus_dma_jazz.c

Log Message:
struct proc * deref.


To generate a diff of this commit:
cvs rdiff -u -r1.15 -r1.16 src/sys/arch/arc/jazz/bus_dma_jazz.c

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



CVS commit: src/sys/arch/arc/arc

2010-11-12 Thread Masao Uebayashi
Module Name:src
Committed By:   uebayasi
Date:   Fri Nov 12 16:09:58 UTC 2010

Modified Files:
src/sys/arch/arc/arc: p_acer_pica_61.c p_dti_arcstation.c p_dti_tyne.c
p_sni_rm200pci.c

Log Message:
Pull in uvm/uvm.h for vm_page_zero_enable.


To generate a diff of this commit:
cvs rdiff -u -r1.10 -r1.11 src/sys/arch/arc/arc/p_acer_pica_61.c
cvs rdiff -u -r1.13 -r1.14 src/sys/arch/arc/arc/p_dti_arcstation.c
cvs rdiff -u -r1.16 -r1.17 src/sys/arch/arc/arc/p_dti_tyne.c
cvs rdiff -u -r1.12 -r1.13 src/sys/arch/arc/arc/p_sni_rm200pci.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/arc/arc/p_acer_pica_61.c
diff -u src/sys/arch/arc/arc/p_acer_pica_61.c:1.10 src/sys/arch/arc/arc/p_acer_pica_61.c:1.11
--- src/sys/arch/arc/arc/p_acer_pica_61.c:1.10	Thu Feb 22 05:09:01 2007
+++ src/sys/arch/arc/arc/p_acer_pica_61.c	Fri Nov 12 16:09:57 2010
@@ -1,4 +1,4 @@
-/*	$NetBSD: p_acer_pica_61.c,v 1.10 2007/02/22 05:09:01 thorpej Exp $	*/
+/*	$NetBSD: p_acer_pica_61.c,v 1.11 2010/11/12 16:09:57 uebayasi Exp $	*/
 /*	$OpenBSD: picabus.c,v 1.11 1999/01/11 05:11:10 millert Exp $	*/
 
 /*
@@ -30,10 +30,10 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: p_acer_pica_61.c,v 1.10 2007/02/22 05:09:01 thorpej Exp $);
+__KERNEL_RCSID(0, $NetBSD: p_acer_pica_61.c,v 1.11 2010/11/12 16:09:57 uebayasi Exp $);
 
 #include sys/param.h
-#include uvm/uvm_extern.h
+#include uvm/uvm.h
 
 #include machine/autoconf.h
 #include machine/platform.h

Index: src/sys/arch/arc/arc/p_dti_arcstation.c
diff -u src/sys/arch/arc/arc/p_dti_arcstation.c:1.13 src/sys/arch/arc/arc/p_dti_arcstation.c:1.14
--- src/sys/arch/arc/arc/p_dti_arcstation.c:1.13	Mon Dec  3 15:33:14 2007
+++ src/sys/arch/arc/arc/p_dti_arcstation.c	Fri Nov 12 16:09:57 2010
@@ -1,4 +1,4 @@
-/*	$NetBSD: p_dti_arcstation.c,v 1.13 2007/12/03 15:33:14 ad Exp $	*/
+/*	$NetBSD: p_dti_arcstation.c,v 1.14 2010/11/12 16:09:57 uebayasi Exp $	*/
 /*	$OpenBSD: machdep.c,v 1.36 1999/05/22 21:22:19 weingart Exp $	*/
 
 /*
@@ -76,12 +76,12 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: p_dti_arcstation.c,v 1.13 2007/12/03 15:33:14 ad Exp $);
+__KERNEL_RCSID(0, $NetBSD: p_dti_arcstation.c,v 1.14 2010/11/12 16:09:57 uebayasi Exp $);
 
 #include sys/param.h
 #include sys/systm.h
 #include sys/device.h
-#include uvm/uvm_extern.h
+#include uvm/uvm.h
 
 #include machine/autoconf.h
 #include machine/bus.h

Index: src/sys/arch/arc/arc/p_dti_tyne.c
diff -u src/sys/arch/arc/arc/p_dti_tyne.c:1.16 src/sys/arch/arc/arc/p_dti_tyne.c:1.17
--- src/sys/arch/arc/arc/p_dti_tyne.c:1.16	Mon Dec  3 15:33:14 2007
+++ src/sys/arch/arc/arc/p_dti_tyne.c	Fri Nov 12 16:09:57 2010
@@ -1,4 +1,4 @@
-/*	$NetBSD: p_dti_tyne.c,v 1.16 2007/12/03 15:33:14 ad Exp $	*/
+/*	$NetBSD: p_dti_tyne.c,v 1.17 2010/11/12 16:09:57 uebayasi Exp $	*/
 /*	$OpenBSD: machdep.c,v 1.36 1999/05/22 21:22:19 weingart Exp $	*/
 
 /*
@@ -76,12 +76,12 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: p_dti_tyne.c,v 1.16 2007/12/03 15:33:14 ad Exp $);
+__KERNEL_RCSID(0, $NetBSD: p_dti_tyne.c,v 1.17 2010/11/12 16:09:57 uebayasi Exp $);
 
 #include sys/param.h
 #include sys/systm.h
 #include sys/device.h
-#include uvm/uvm_extern.h
+#include uvm/uvm.h
 
 #include machine/autoconf.h
 #include machine/bus.h

Index: src/sys/arch/arc/arc/p_sni_rm200pci.c
diff -u src/sys/arch/arc/arc/p_sni_rm200pci.c:1.12 src/sys/arch/arc/arc/p_sni_rm200pci.c:1.13
--- src/sys/arch/arc/arc/p_sni_rm200pci.c:1.12	Mon Dec  3 15:33:14 2007
+++ src/sys/arch/arc/arc/p_sni_rm200pci.c	Fri Nov 12 16:09:57 2010
@@ -1,4 +1,4 @@
-/*	$NetBSD: p_sni_rm200pci.c,v 1.12 2007/12/03 15:33:14 ad Exp $	*/
+/*	$NetBSD: p_sni_rm200pci.c,v 1.13 2010/11/12 16:09:57 uebayasi Exp $	*/
 /*	$OpenBSD: machdep.c,v 1.36 1999/05/22 21:22:19 weingart Exp $	*/
 
 /*
@@ -76,12 +76,12 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: p_sni_rm200pci.c,v 1.12 2007/12/03 15:33:14 ad Exp $);
+__KERNEL_RCSID(0, $NetBSD: p_sni_rm200pci.c,v 1.13 2010/11/12 16:09:57 uebayasi Exp $);
 
 #include sys/param.h
 #include sys/systm.h
 #include sys/device.h
-#include uvm/uvm_extern.h
+#include uvm/uvm.h
 
 #include machine/autoconf.h
 #include machine/bus.h



CVS commit: src/sys/arch/arc/arc

2010-11-12 Thread Masao Uebayashi
Module Name:src
Committed By:   uebayasi
Date:   Fri Nov 12 16:09:58 UTC 2010

Modified Files:
src/sys/arch/arc/arc: p_acer_pica_61.c p_dti_arcstation.c p_dti_tyne.c
p_sni_rm200pci.c

Log Message:
Pull in uvm/uvm.h for vm_page_zero_enable.


To generate a diff of this commit:
cvs rdiff -u -r1.10 -r1.11 src/sys/arch/arc/arc/p_acer_pica_61.c
cvs rdiff -u -r1.13 -r1.14 src/sys/arch/arc/arc/p_dti_arcstation.c
cvs rdiff -u -r1.16 -r1.17 src/sys/arch/arc/arc/p_dti_tyne.c
cvs rdiff -u -r1.12 -r1.13 src/sys/arch/arc/arc/p_sni_rm200pci.c

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



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

2010-11-02 Thread Izumi Tsutsui
Module Name:src
Committed By:   tsutsui
Date:   Tue Nov  2 15:50:09 UTC 2010

Modified Files:
src/sys/arch/arc/conf: files.arc

Log Message:
Include files.ieee1394.


To generate a diff of this commit:
cvs rdiff -u -r1.62 -r1.63 src/sys/arch/arc/conf/files.arc

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/arc/conf/files.arc
diff -u src/sys/arch/arc/conf/files.arc:1.62 src/sys/arch/arc/conf/files.arc:1.63
--- src/sys/arch/arc/conf/files.arc:1.62	Wed Feb 20 21:43:33 2008
+++ src/sys/arch/arc/conf/files.arc	Tue Nov  2 15:50:09 2010
@@ -1,4 +1,4 @@
-#	$NetBSD: files.arc,v 1.62 2008/02/20 21:43:33 drochner Exp $
+#	$NetBSD: files.arc,v 1.63 2010/11/02 15:50:09 tsutsui Exp $
 #	$OpenBSD: files.arc,v 1.21 1999/09/11 10:20:20 niklas Exp $
 #
 # maxpartitions must be first item in files.${ARCH}
@@ -267,6 +267,9 @@
 # USB
 include dev/usb/files.usb
 
+# IEEE1394
+include dev/ieee1394/files.ieee1394
+
 #
 #	Common files
 #



CVS commit: src/sys/arch/arc/pci

2010-11-02 Thread Izumi Tsutsui
Module Name:src
Committed By:   tsutsui
Date:   Tue Nov  2 16:03:47 UTC 2010

Modified Files:
src/sys/arch/arc/pci: necpb.c

Log Message:
Use fixed pci_intr_handle_t per device number regardless of pin and swiz.

Tested the following multifunction card and devices over ppb(4)
on Express5800/230 (JC94):

---
uhci0 at pci0 dev 4 function 0: VIA Technologies VT83C572 USB Controller (rev. 
0x61)
uhci0: interrupting at int C
usb0 at uhci0: USB revision 1.0
uhci1 at pci0 dev 4 function 1: VIA Technologies VT83C572 USB Controller (rev. 
0x61)
uhci1: interrupting at int C
usb1 at uhci1: USB revision 1.0
ehci0 at pci0 dev 4 function 2: VIA Technologies VT8237 EHCI USB Controller 
(rev. 0x63)
ehci0: interrupting at int C
ehci0: dropped intr workaround enabled
ehci0: EHCI version 1.0
ehci0: companion controllers, 2 ports each: uhci0 uhci1
usb2 at ehci0: USB revision 2.0
fwohci0 at pci0 dev 4 function 3: VIA Technologies VT6306 IEEE 1394 Host 
Controller (rev. 0x46)
fwohci0: interrupting at int C
fwohci0: OHCI version 1.0 (ROM=1)
fwohci0: No. of Isochronous channels is 4.
fwohci0: EUI64 00:01:08:00:37:02:79:4f
fwohci0: Phy 1394a available S400, 3 ports.
fwohci0: Link S400, max_rec 1024 bytes.
fwohci0: max_rec 1024 - 2048
ieee1394if0 at fwohci0: IEEE1394 bus
fwip0 at ieee1394if0: IP over IEEE1394
fwohci0: Initiate bus reset
vge0 at pci0 dev 4 function 4: VIA VT612X Gigabit Ethernet (rev. 0x11)
vge0: interrupting at int C
vge0: Ethernet address: 00:01:08:00:b1:71
ciphy0 at vge0 phy 1: Cicada CS8201 10/100/1000TX PHY, rev. 2
ciphy0: 10baseT, 10baseT-FDX, 100baseTX, 100baseTX-FDX, 1000baseT, 
1000baseT-FDX, auto
 :
---
ppb0 at pci0 dev 4 function 0: Digital Equipment DC21154 PCI-PCI Bridge (rev. 
0x05)
pci1 at ppb0 bus 1
pci1: i/o space, memory space enabled
ex0 at pci1 dev 4 function 0: 3Com 3c980C-TXM 10/100 Ethernet (rev. 0x78)
ex0: interrupting at int C
ex0: MAC address 00:01:03:ce:74:48
bmtphy0 at ex0 phy 24: Broadcom 3c905C internal PHY, rev. 7
bmtphy0: 10baseT, 10baseT-FDX, 100baseTX, 100baseTX-FDX, auto
ex1 at pci1 dev 5 function 0: 3Com 3c980C-TXM 10/100 Ethernet (rev. 0x78)
ex1: interrupting at int C
ex1: MAC address 00:01:03:ce:74:49
bmtphy1 at ex1 phy 24: Broadcom 3c905C internal PHY, rev. 7
bmtphy1: 10baseT, 10baseT-FDX, 100baseTX, 100baseTX-FDX, auto
 :


To generate a diff of this commit:
cvs rdiff -u -r1.32 -r1.33 src/sys/arch/arc/pci/necpb.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/arc/pci/necpb.c
diff -u src/sys/arch/arc/pci/necpb.c:1.32 src/sys/arch/arc/pci/necpb.c:1.33
--- src/sys/arch/arc/pci/necpb.c:1.32	Sat Jul  5 08:46:25 2008
+++ src/sys/arch/arc/pci/necpb.c	Tue Nov  2 16:03:47 2010
@@ -1,4 +1,4 @@
-/*	$NetBSD: necpb.c,v 1.32 2008/07/05 08:46:25 tsutsui Exp $	*/
+/*	$NetBSD: necpb.c,v 1.33 2010/11/02 16:03:47 tsutsui Exp $	*/
 
 /*-
  * Copyright (c) 1997, 1998 The NetBSD Foundation, Inc.
@@ -61,7 +61,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: necpb.c,v 1.32 2008/07/05 08:46:25 tsutsui Exp $);
+__KERNEL_RCSID(0, $NetBSD: necpb.c,v 1.33 2010/11/02 16:03:47 tsutsui Exp $);
 
 #include opt_pci.h
 
@@ -339,7 +339,6 @@
 	pci_chipset_tag_t pc = pa-pa_pc;
 	pcitag_t intrtag = pa-pa_intrtag;
 	int pin = pa-pa_intrpin;
-	int swiz = pa-pa_intrswiz % 4;
 	int bus, dev;
 
 	if (pin == 0) {
@@ -363,13 +362,13 @@
 
 	switch (dev) {
 	case 3:
-		*ihp = (pin - swiz + 2) % 4;
+		*ihp = 3;
 		break;
 	case 4:
-		*ihp = (pin - swiz + 1) % 4;
+		*ihp = 2;
 		break;
 	case 5:
-		*ihp = (pin - swiz + 0) % 4;
+		*ihp = 1;
 		break;
 	default:
 		*ihp = -1;



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

2010-11-02 Thread Izumi Tsutsui
Module Name:src
Committed By:   tsutsui
Date:   Tue Nov  2 15:50:09 UTC 2010

Modified Files:
src/sys/arch/arc/conf: files.arc

Log Message:
Include files.ieee1394.


To generate a diff of this commit:
cvs rdiff -u -r1.62 -r1.63 src/sys/arch/arc/conf/files.arc

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



CVS commit: src/sys/arch/arc/pci

2010-11-02 Thread Izumi Tsutsui
Module Name:src
Committed By:   tsutsui
Date:   Tue Nov  2 16:03:47 UTC 2010

Modified Files:
src/sys/arch/arc/pci: necpb.c

Log Message:
Use fixed pci_intr_handle_t per device number regardless of pin and swiz.

Tested the following multifunction card and devices over ppb(4)
on Express5800/230 (JC94):

---
uhci0 at pci0 dev 4 function 0: VIA Technologies VT83C572 USB Controller (rev. 
0x61)
uhci0: interrupting at int C
usb0 at uhci0: USB revision 1.0
uhci1 at pci0 dev 4 function 1: VIA Technologies VT83C572 USB Controller (rev. 
0x61)
uhci1: interrupting at int C
usb1 at uhci1: USB revision 1.0
ehci0 at pci0 dev 4 function 2: VIA Technologies VT8237 EHCI USB Controller 
(rev. 0x63)
ehci0: interrupting at int C
ehci0: dropped intr workaround enabled
ehci0: EHCI version 1.0
ehci0: companion controllers, 2 ports each: uhci0 uhci1
usb2 at ehci0: USB revision 2.0
fwohci0 at pci0 dev 4 function 3: VIA Technologies VT6306 IEEE 1394 Host 
Controller (rev. 0x46)
fwohci0: interrupting at int C
fwohci0: OHCI version 1.0 (ROM=1)
fwohci0: No. of Isochronous channels is 4.
fwohci0: EUI64 00:01:08:00:37:02:79:4f
fwohci0: Phy 1394a available S400, 3 ports.
fwohci0: Link S400, max_rec 1024 bytes.
fwohci0: max_rec 1024 - 2048
ieee1394if0 at fwohci0: IEEE1394 bus
fwip0 at ieee1394if0: IP over IEEE1394
fwohci0: Initiate bus reset
vge0 at pci0 dev 4 function 4: VIA VT612X Gigabit Ethernet (rev. 0x11)
vge0: interrupting at int C
vge0: Ethernet address: 00:01:08:00:b1:71
ciphy0 at vge0 phy 1: Cicada CS8201 10/100/1000TX PHY, rev. 2
ciphy0: 10baseT, 10baseT-FDX, 100baseTX, 100baseTX-FDX, 1000baseT, 
1000baseT-FDX, auto
 :
---
ppb0 at pci0 dev 4 function 0: Digital Equipment DC21154 PCI-PCI Bridge (rev. 
0x05)
pci1 at ppb0 bus 1
pci1: i/o space, memory space enabled
ex0 at pci1 dev 4 function 0: 3Com 3c980C-TXM 10/100 Ethernet (rev. 0x78)
ex0: interrupting at int C
ex0: MAC address 00:01:03:ce:74:48
bmtphy0 at ex0 phy 24: Broadcom 3c905C internal PHY, rev. 7
bmtphy0: 10baseT, 10baseT-FDX, 100baseTX, 100baseTX-FDX, auto
ex1 at pci1 dev 5 function 0: 3Com 3c980C-TXM 10/100 Ethernet (rev. 0x78)
ex1: interrupting at int C
ex1: MAC address 00:01:03:ce:74:49
bmtphy1 at ex1 phy 24: Broadcom 3c905C internal PHY, rev. 7
bmtphy1: 10baseT, 10baseT-FDX, 100baseTX, 100baseTX-FDX, auto
 :


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

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



CVS commit: src/sys/arch/arc/dti

2009-12-27 Thread Izumi Tsutsui
Module Name:src
Committed By:   tsutsui
Date:   Sun Dec 27 08:31:10 UTC 2009

Modified Files:
src/sys/arch/arc/dti: btl.c

Log Message:
Fix typo on ANSIfy in 2005. PR port-arc/42523


To generate a diff of this commit:
cvs rdiff -u -r1.23 -r1.24 src/sys/arch/arc/dti/btl.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/arc/dti/btl.c
diff -u src/sys/arch/arc/dti/btl.c:1.23 src/sys/arch/arc/dti/btl.c:1.24
--- src/sys/arch/arc/dti/btl.c:1.23	Fri Nov 27 03:23:04 2009
+++ src/sys/arch/arc/dti/btl.c	Sun Dec 27 08:31:10 2009
@@ -1,4 +1,4 @@
-/*	$NetBSD: btl.c,v 1.23 2009/11/27 03:23:04 rmind Exp $	*/
+/*	$NetBSD: btl.c,v 1.24 2009/12/27 08:31:10 tsutsui Exp $	*/
 /*	NetBSD: bt.c,v 1.10 1996/05/12 23:51:54 mycroft Exp 	*/
 
 #undef BTDIAG
@@ -51,7 +51,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: btl.c,v 1.23 2009/11/27 03:23:04 rmind Exp $);
+__KERNEL_RCSID(0, $NetBSD: btl.c,v 1.24 2009/12/27 08:31:10 tsutsui Exp $);
 
 #include sys/types.h
 #include sys/param.h
@@ -886,7 +886,7 @@
  * Find the board and find it's irq/drq
  */
 int
-bt_find(struct isa_attach_args *ia, struct bt_softc *sc0
+bt_find(struct isa_attach_args *ia, struct bt_softc *sc)
 {
 	int iobase = ia-ia_iobase;
 	int i;



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

2009-12-07 Thread Havard Eidnes
Module Name:src
Committed By:   he
Date:   Mon Dec  7 08:50:01 UTC 2009

Modified Files:
src/sys/arch/arc/conf: RAMDISK

Log Message:
Can't negate a now non-existent file system (PORTALFS was removed).


To generate a diff of this commit:
cvs rdiff -u -r1.77 -r1.78 src/sys/arch/arc/conf/RAMDISK

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/arc/conf/RAMDISK
diff -u src/sys/arch/arc/conf/RAMDISK:1.77 src/sys/arch/arc/conf/RAMDISK:1.78
--- src/sys/arch/arc/conf/RAMDISK:1.77	Fri Feb  6 18:50:26 2009
+++ src/sys/arch/arc/conf/RAMDISK	Mon Dec  7 08:50:01 2009
@@ -1,4 +1,4 @@
-#	$NetBSD: RAMDISK,v 1.77 2009/02/06 18:50:26 jym Exp $
+#	$NetBSD: RAMDISK,v 1.78 2009/12/07 08:50:01 he Exp $
 #
 #	memory disk based configuration file for MIPS R4x00 ARC Systems
 #
@@ -38,7 +38,6 @@
 no file-system	KERNFS
 no file-system	NULLFS
 no file-system	OVERLAY
-no file-system	PORTAL
 no file-system	UMAPFS
 no file-system	UNION
 no file-system	TMPFS



CVS commit: src/sys/arch/arc/jazz

2009-09-26 Thread Izumi Tsutsui
Module Name:src
Committed By:   tsutsui
Date:   Sun Sep 27 05:29:20 UTC 2009

Modified Files:
src/sys/arch/arc/jazz: fd.c

Log Message:
Replace shutdownhook_establish(9) with pmf_device_register1(9).
Tested on JC94.


To generate a diff of this commit:
cvs rdiff -u -r1.39 -r1.40 src/sys/arch/arc/jazz/fd.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/arc/jazz/fd.c
diff -u src/sys/arch/arc/jazz/fd.c:1.39 src/sys/arch/arc/jazz/fd.c:1.40
--- src/sys/arch/arc/jazz/fd.c:1.39	Tue Jan 13 13:35:51 2009
+++ src/sys/arch/arc/jazz/fd.c	Sun Sep 27 05:29:20 2009
@@ -1,4 +1,4 @@
-/*	$NetBSD: fd.c,v 1.39 2009/01/13 13:35:51 yamt Exp $	*/
+/*	$NetBSD: fd.c,v 1.40 2009/09/27 05:29:20 tsutsui Exp $	*/
 /*	$OpenBSD: fd.c,v 1.6 1998/10/03 21:18:57 millert Exp $	*/
 /*	NetBSD: fd.c,v 1.78 1995/07/04 07:23:09 mycroft Exp 	*/
 
@@ -66,7 +66,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: fd.c,v 1.39 2009/01/13 13:35:51 yamt Exp $);
+__KERNEL_RCSID(0, $NetBSD: fd.c,v 1.40 2009/09/27 05:29:20 tsutsui Exp $);
 
 #include sys/param.h
 #include sys/systm.h
@@ -167,8 +167,6 @@
 #define	FD_MOTOR_WAIT	0x04		/* motor coming up */
 	int sc_cylin;		/* where we think the head is */
 
-	void *sc_sdhook;	/* saved shutdown hook for drive. */
-
 	TAILQ_ENTRY(fd_softc) sc_drivechain;
 	int sc_ops;		/* I/O ops since last switch */
 	struct bufq_state *sc_q;/* pending I/O requests */
@@ -201,6 +199,7 @@
 
 struct dkdriver fddkdriver = { fdstrategy };
 
+static bool fd_shutdown(device_t, int);
 #if 0
 static const struct fd_type *fd_nvtotype(char *, int, int);
 #endif
@@ -353,7 +352,19 @@
 	mountroothook_establish(fd_mountroot_hook, fd-sc_dev);
 
 	/* Needed to power off if the motor is on when we halt. */
-	fd-sc_sdhook = shutdownhook_establish(fd_motor_off, fd);
+	if (!pmf_device_register1(self, NULL, NULL, fd_shutdown))
+		aprint_error_dev(self, couldn't establish power handler\n);
+}
+
+bool
+fd_shutdown(device_t self, int howto)
+{
+	struct fd_softc *fd;
+
+	fd = device_private(self);
+	fd_motor_off(fd);
+
+	return true;
 }
 
 #if 0



CVS commit: src/sys/arch/arc/isa

2009-08-19 Thread David Young
Module Name:src
Committed By:   dyoung
Date:   Wed Aug 19 15:16:10 UTC 2009

Modified Files:
src/sys/arch/arc/isa: isabus.c

Log Message:
Define, and hook into the isa_chipset_tag_t, isabr_detach_hook().


To generate a diff of this commit:
cvs rdiff -u -r1.44 -r1.45 src/sys/arch/arc/isa/isabus.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/arc/isa/isabus.c
diff -u src/sys/arch/arc/isa/isabus.c:1.44 src/sys/arch/arc/isa/isabus.c:1.45
--- src/sys/arch/arc/isa/isabus.c:1.44	Sat Jul  5 08:46:25 2008
+++ src/sys/arch/arc/isa/isabus.c	Wed Aug 19 15:16:09 2009
@@ -1,4 +1,4 @@
-/*	$NetBSD: isabus.c,v 1.44 2008/07/05 08:46:25 tsutsui Exp $	*/
+/*	$NetBSD: isabus.c,v 1.45 2009/08/19 15:16:09 dyoung Exp $	*/
 /*	$OpenBSD: isabus.c,v 1.15 1998/03/16 09:38:46 pefo Exp $	*/
 /*	NetBSD: isa.c,v 1.33 1995/06/28 04:30:51 cgd Exp 	*/
 
@@ -120,7 +120,7 @@
 */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: isabus.c,v 1.44 2008/07/05 08:46:25 tsutsui Exp $);
+__KERNEL_RCSID(0, $NetBSD: isabus.c,v 1.45 2009/08/19 15:16:09 dyoung Exp $);
 
 #include sys/param.h
 #include sys/proc.h
@@ -166,6 +166,7 @@
 
 static void isabr_attach_hook(device_t , device_t,
 struct isabus_attach_args *);
+static void isabr_detach_hook(isa_chipset_tag_t, device_t);
 static const struct evcnt *isabr_intr_evcnt(isa_chipset_tag_t, int);
 static void *isabr_intr_establish(isa_chipset_tag_t, int, int, int,
 int (*)(void *), void *);
@@ -193,6 +194,7 @@
 	isabr_initicu();
 
 	sc-arc_isa_cs.ic_attach_hook = isabr_attach_hook;
+	sc-arc_isa_cs.ic_detach_hook = isabr_detach_hook;
 	sc-arc_isa_cs.ic_intr_evcnt = isabr_intr_evcnt;
 	sc-arc_isa_cs.ic_intr_establish = isabr_intr_establish;
 	sc-arc_isa_cs.ic_intr_disestablish = isabr_intr_disestablish;
@@ -314,6 +316,13 @@
 	/* Nothing to do. */
 }
 
+static void
+isabr_detach_hook(isa_chipset_tag_t ic, device_t self)
+{
+
+	/* Nothing to do. */
+}
+
 static const struct evcnt *
 isabr_intr_evcnt(isa_chipset_tag_t ic, int irq)
 {