CVS commit: src/sys/arch/evbarm/iq80310

2014-01-28 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Tue Jan 28 12:01:31 UTC 2014

Modified Files:
src/sys/arch/evbarm/iq80310: iq80310_intr.c iq80310_intr.h

Log Message:
Unused variable police


To generate a diff of this commit:
cvs rdiff -u -r1.32 -r1.33 src/sys/arch/evbarm/iq80310/iq80310_intr.c
cvs rdiff -u -r1.8 -r1.9 src/sys/arch/evbarm/iq80310/iq80310_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/evbarm/iq80310/iq80310_intr.c
diff -u src/sys/arch/evbarm/iq80310/iq80310_intr.c:1.32 src/sys/arch/evbarm/iq80310/iq80310_intr.c:1.33
--- src/sys/arch/evbarm/iq80310/iq80310_intr.c:1.32	Wed Oct  3 16:51:44 2012
+++ src/sys/arch/evbarm/iq80310/iq80310_intr.c	Tue Jan 28 12:01:31 2014
@@ -1,4 +1,4 @@
-/*	$NetBSD: iq80310_intr.c,v 1.32 2012/10/03 16:51:44 chs Exp $	*/
+/*	$NetBSD: iq80310_intr.c,v 1.33 2014/01/28 12:01:31 martin Exp $	*/
 
 /*
  * Copyright (c) 2001, 2002 Wasabi Systems, Inc.
@@ -36,7 +36,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: iq80310_intr.c,v 1.32 2012/10/03 16:51:44 chs Exp $);
+__KERNEL_RCSID(0, $NetBSD: iq80310_intr.c,v 1.33 2014/01/28 12:01:31 martin Exp $);
 
 #ifndef EVBARM_SPL_NOINLINE
 #define	EVBARM_SPL_NOINLINE
@@ -419,10 +419,13 @@ iq80310_intr_dispatch(struct trapframe *
 {
 	struct intrq *iq;
 	struct intrhand *ih;
-	int oldirqstate, pcpl, irq, ibit, hwpend, rv, stray;
+	int oldirqstate, pcpl, irq, ibit, hwpend, rv;
 	struct cpu_info * const ci = curcpu();
+#if 0
+	int stray;
 
 	stray = 1;
+#endif
 
 	/* First, disable external IRQs. */
 	i80200_intr_disable(INTCTL_IM | INTCTL_PM);
@@ -433,7 +436,9 @@ iq80310_intr_dispatch(struct trapframe *
 		irq = ffs(hwpend) - 1;
 		ibit = (1U  irq);
 
+#if 0
 		stray = 0;
+#endif
 
 		hwpend = ~ibit;
 

Index: src/sys/arch/evbarm/iq80310/iq80310_intr.h
diff -u src/sys/arch/evbarm/iq80310/iq80310_intr.h:1.8 src/sys/arch/evbarm/iq80310/iq80310_intr.h:1.9
--- src/sys/arch/evbarm/iq80310/iq80310_intr.h:1.8	Sat Feb 14 12:44:20 2009
+++ src/sys/arch/evbarm/iq80310/iq80310_intr.h	Tue Jan 28 12:01:31 2014
@@ -1,4 +1,4 @@
-/*	$NetBSD: iq80310_intr.h,v 1.8 2009/02/14 12:44:20 he Exp $	*/
+/*	$NetBSD: iq80310_intr.h,v 1.9 2014/01/28 12:01:31 martin Exp $	*/
 
 /*
  * Copyright (c) 2001, 2002 Wasabi Systems, Inc.
@@ -90,12 +90,10 @@ static inline void __attribute__((__unus
 iq80310_splx(int new)
 {
 	extern volatile int iq80310_ipending;
-	int old;
 
 	/* Don't let the compiler re-order this code with preceding code */
 	__insn_barrier();
 
-	old = curcpl();
 	set_curcpl(new);
 
 #ifdef __HAVE_FAST_SOFTINTS



CVS commit: src/sys/arch/evbarm/iq80310

2012-10-14 Thread SAITOH Masanobu
Module Name:src
Committed By:   msaitoh
Date:   Sun Oct 14 18:37:55 UTC 2012

Modified Files:
src/sys/arch/evbarm/iq80310: i80312_mainbus.c

Log Message:
struct device * - device_t change.
Not tested though.


To generate a diff of this commit:
cvs rdiff -u -r1.15 -r1.16 src/sys/arch/evbarm/iq80310/i80312_mainbus.c

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

Modified files:

Index: src/sys/arch/evbarm/iq80310/i80312_mainbus.c
diff -u src/sys/arch/evbarm/iq80310/i80312_mainbus.c:1.15 src/sys/arch/evbarm/iq80310/i80312_mainbus.c:1.16
--- src/sys/arch/evbarm/iq80310/i80312_mainbus.c:1.15	Wed Oct  3 16:51:44 2012
+++ src/sys/arch/evbarm/iq80310/i80312_mainbus.c	Sun Oct 14 18:37:55 2012
@@ -1,4 +1,4 @@
-/*	$NetBSD: i80312_mainbus.c,v 1.15 2012/10/03 16:51:44 chs Exp $	*/
+/*	$NetBSD: i80312_mainbus.c,v 1.16 2012/10/14 18:37:55 msaitoh Exp $	*/
 
 /*
  * Copyright (c) 2001, 2002 Wasabi Systems, Inc.
@@ -42,7 +42,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: i80312_mainbus.c,v 1.15 2012/10/03 16:51:44 chs Exp $);
+__KERNEL_RCSID(0, $NetBSD: i80312_mainbus.c,v 1.16 2012/10/14 18:37:55 msaitoh Exp $);
 
 #include sys/param.h
 #include sys/systm.h
@@ -60,17 +60,17 @@ __KERNEL_RCSID(0, $NetBSD: i80312_mainb
 #include dev/pci/pcireg.h
 #include dev/pci/pcidevs.h
 
-int	i80312_mainbus_match(struct device *, struct cfdata *, void *);
-void	i80312_mainbus_attach(struct device *, struct device *, void *);
+int	i80312_mainbus_match(device_t, cfdata_t, void *);
+void	i80312_mainbus_attach(device_t, device_t, void *);
 
-CFATTACH_DECL(iopxs_mainbus, sizeof(struct i80312_softc),
+CFATTACH_DECL_NEW(iopxs_mainbus, sizeof(struct i80312_softc),
 i80312_mainbus_match, i80312_mainbus_attach, NULL, NULL);
 
 /* There can be only one. */
 int	i80312_mainbus_found;
 
 int
-i80312_mainbus_match(struct device *parent, struct cfdata *cf, void *aux)
+i80312_mainbus_match(device_t parent, cfdata_t cf, void *aux)
 {
 #if 0
 	struct mainbus_attach_args *ma = aux;
@@ -91,13 +91,14 @@ i80312_mainbus_match(struct device *pare
 }
 
 void
-i80312_mainbus_attach(struct device *parent, struct device *self, void *aux)
+i80312_mainbus_attach(device_t parent, device_t self, void *aux)
 {
-	struct i80312_softc *sc = (void *) self;
+	struct i80312_softc *sc = device_private(self);
 	paddr_t memstart;
 	psize_t memsize;
 
 	i80312_mainbus_found = 1;
+	sc-sc_dev = self;
 	iq80310_intr_evcnt_attach();
 
 	/*
@@ -116,7 +117,7 @@ i80312_mainbus_attach(struct device *par
 	if (bus_space_subregion(sc-sc_st, sc-sc_sh, I80312_MEM_BASE,
 	I80312_MEM_SIZE, sc-sc_mem_sh))
 		panic(%s: unable to subregion MEM registers,
-		sc-sc_dev.dv_xname);
+		device_xname(self));
 
 	/*
 	 * We have mapped the PCI I/O windows in the early bootstrap phase.



CVS commit: src/sys/arch/evbarm/iq80310

2012-10-03 Thread Chuck Silvers
Module Name:src
Committed By:   chs
Date:   Wed Oct  3 16:51:44 UTC 2012

Modified Files:
src/sys/arch/evbarm/iq80310: i80312_mainbus.c iq80310_intr.c
iq80310var.h

Log Message:
defer evcnt attachment correctly.


To generate a diff of this commit:
cvs rdiff -u -r1.14 -r1.15 src/sys/arch/evbarm/iq80310/i80312_mainbus.c
cvs rdiff -u -r1.31 -r1.32 src/sys/arch/evbarm/iq80310/iq80310_intr.c
cvs rdiff -u -r1.7 -r1.8 src/sys/arch/evbarm/iq80310/iq80310var.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/evbarm/iq80310/i80312_mainbus.c
diff -u src/sys/arch/evbarm/iq80310/i80312_mainbus.c:1.14 src/sys/arch/evbarm/iq80310/i80312_mainbus.c:1.15
--- src/sys/arch/evbarm/iq80310/i80312_mainbus.c:1.14	Fri Jul  1 20:41:16 2011
+++ src/sys/arch/evbarm/iq80310/i80312_mainbus.c	Wed Oct  3 16:51:44 2012
@@ -1,4 +1,4 @@
-/*	$NetBSD: i80312_mainbus.c,v 1.14 2011/07/01 20:41:16 dyoung Exp $	*/
+/*	$NetBSD: i80312_mainbus.c,v 1.15 2012/10/03 16:51:44 chs Exp $	*/
 
 /*
  * Copyright (c) 2001, 2002 Wasabi Systems, Inc.
@@ -42,7 +42,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: i80312_mainbus.c,v 1.14 2011/07/01 20:41:16 dyoung Exp $);
+__KERNEL_RCSID(0, $NetBSD: i80312_mainbus.c,v 1.15 2012/10/03 16:51:44 chs Exp $);
 
 #include sys/param.h
 #include sys/systm.h
@@ -98,6 +98,7 @@ i80312_mainbus_attach(struct device *par
 	psize_t memsize;
 
 	i80312_mainbus_found = 1;
+	iq80310_intr_evcnt_attach();
 
 	/*
 	 * Fill in the space tag for the i80312's own devices,

Index: src/sys/arch/evbarm/iq80310/iq80310_intr.c
diff -u src/sys/arch/evbarm/iq80310/iq80310_intr.c:1.31 src/sys/arch/evbarm/iq80310/iq80310_intr.c:1.32
--- src/sys/arch/evbarm/iq80310/iq80310_intr.c:1.31	Tue Aug 14 15:46:21 2012
+++ src/sys/arch/evbarm/iq80310/iq80310_intr.c	Wed Oct  3 16:51:44 2012
@@ -1,4 +1,4 @@
-/*	$NetBSD: iq80310_intr.c,v 1.31 2012/08/14 15:46:21 chs Exp $	*/
+/*	$NetBSD: iq80310_intr.c,v 1.32 2012/10/03 16:51:44 chs Exp $	*/
 
 /*
  * Copyright (c) 2001, 2002 Wasabi Systems, Inc.
@@ -36,7 +36,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: iq80310_intr.c,v 1.31 2012/08/14 15:46:21 chs Exp $);
+__KERNEL_RCSID(0, $NetBSD: iq80310_intr.c,v 1.32 2012/10/03 16:51:44 chs Exp $);
 
 #ifndef EVBARM_SPL_NOINLINE
 #define	EVBARM_SPL_NOINLINE
@@ -350,6 +350,19 @@ iq80310_intr_init(void)
 	enable_interrupts(I32_bit);
 }
 
+void
+iq80310_intr_evcnt_attach(void)
+{
+	struct intrq *iq;
+	int i;
+
+	for (i = 0; i  NIRQ; i++) {
+		iq = intrq[i];
+		evcnt_attach_dynamic(iq-iq_ev, EVCNT_TYPE_INTR,
+		NULL, iq80310, iq-iq_name);
+	}
+}
+
 void *
 iq80310_intr_establish(int irq, int ipl, int (*func)(void *), void *arg)
 {
@@ -377,8 +390,6 @@ iq80310_intr_establish(int irq, int ipl,
 	oldirqstate = disable_interrupts(I32_bit);
 
 	TAILQ_INSERT_TAIL(iq-iq_list, ih, ih_list);
-	evcnt_attach_dynamic(iq-iq_ev, EVCNT_TYPE_INTR,
-	NULL, iq80310, iq-iq_name);
 
 	iq80310_intr_calculate_masks();
 

Index: src/sys/arch/evbarm/iq80310/iq80310var.h
diff -u src/sys/arch/evbarm/iq80310/iq80310var.h:1.7 src/sys/arch/evbarm/iq80310/iq80310var.h:1.8
--- src/sys/arch/evbarm/iq80310/iq80310var.h:1.7	Tue Oct  8 17:39:17 2002
+++ src/sys/arch/evbarm/iq80310/iq80310var.h	Wed Oct  3 16:51:44 2012
@@ -1,4 +1,4 @@
-/*	$NetBSD: iq80310var.h,v 1.7 2002/10/08 17:39:17 thorpej Exp $	*/
+/*	$NetBSD: iq80310var.h,v 1.8 2012/10/03 16:51:44 chs Exp $	*/
 
 /*
  * Copyright (c) 2001, 2002 Wasabi Systems, Inc.
@@ -94,6 +94,7 @@ void	iq80310_7seg_snake(void);
 void	iq80310_pci_init(pci_chipset_tag_t, void *);
 
 void	iq80310_intr_init(void);
+void	iq80310_intr_evcnt_attach(void);
 void	*iq80310_intr_establish(int, int, int (*)(void *), void *);
 void	iq80310_intr_disestablish(void *);
 



CVS commit: src/sys/arch/evbarm/iq80310

2012-08-14 Thread Chuck Silvers
Module Name:src
Committed By:   chs
Date:   Tue Aug 14 15:46:21 UTC 2012

Modified Files:
src/sys/arch/evbarm/iq80310: iq80310_intr.c

Log Message:
move evcnt_attach_dynamic() calls later to avoid assertions.


To generate a diff of this commit:
cvs rdiff -u -r1.30 -r1.31 src/sys/arch/evbarm/iq80310/iq80310_intr.c

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

Modified files:

Index: src/sys/arch/evbarm/iq80310/iq80310_intr.c
diff -u src/sys/arch/evbarm/iq80310/iq80310_intr.c:1.30 src/sys/arch/evbarm/iq80310/iq80310_intr.c:1.31
--- src/sys/arch/evbarm/iq80310/iq80310_intr.c:1.30	Thu Aug  2 15:56:07 2012
+++ src/sys/arch/evbarm/iq80310/iq80310_intr.c	Tue Aug 14 15:46:21 2012
@@ -1,4 +1,4 @@
-/*	$NetBSD: iq80310_intr.c,v 1.30 2012/08/02 15:56:07 skrll Exp $	*/
+/*	$NetBSD: iq80310_intr.c,v 1.31 2012/08/14 15:46:21 chs Exp $	*/
 
 /*
  * Copyright (c) 2001, 2002 Wasabi Systems, Inc.
@@ -36,7 +36,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: iq80310_intr.c,v 1.30 2012/08/02 15:56:07 skrll Exp $);
+__KERNEL_RCSID(0, $NetBSD: iq80310_intr.c,v 1.31 2012/08/14 15:46:21 chs Exp $);
 
 #ifndef EVBARM_SPL_NOINLINE
 #define	EVBARM_SPL_NOINLINE
@@ -338,8 +338,6 @@ iq80310_intr_init(void)
 		TAILQ_INIT(iq-iq_list);
 
 		sprintf(iq-iq_name, irq %d, i);
-		evcnt_attach_dynamic(iq-iq_ev, EVCNT_TYPE_INTR,
-		NULL, iq80310, iq-iq_name);
 	}
 
 	iq80310_intr_calculate_masks();
@@ -379,6 +377,8 @@ iq80310_intr_establish(int irq, int ipl,
 	oldirqstate = disable_interrupts(I32_bit);
 
 	TAILQ_INSERT_TAIL(iq-iq_list, ih, ih_list);
+	evcnt_attach_dynamic(iq-iq_ev, EVCNT_TYPE_INTR,
+	NULL, iq80310, iq-iq_name);
 
 	iq80310_intr_calculate_masks();
 



CVS commit: src/sys/arch/evbarm/iq80310

2011-01-31 Thread Jonathan A. Kollasch
Module Name:src
Committed By:   jakllsch
Date:   Mon Jan 31 23:56:14 UTC 2011

Modified Files:
src/sys/arch/evbarm/iq80310: iq80310_intr.c

Log Message:
Correct __HAVE_FAST_SOFTINTRS typos, use only __HAVE_FAST_SOFTINTS.


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

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

Modified files:

Index: src/sys/arch/evbarm/iq80310/iq80310_intr.c
diff -u src/sys/arch/evbarm/iq80310/iq80310_intr.c:1.27 src/sys/arch/evbarm/iq80310/iq80310_intr.c:1.28
--- src/sys/arch/evbarm/iq80310/iq80310_intr.c:1.27	Mon Dec 20 00:25:31 2010
+++ src/sys/arch/evbarm/iq80310/iq80310_intr.c	Mon Jan 31 23:56:14 2011
@@ -1,4 +1,4 @@
-/*	$NetBSD: iq80310_intr.c,v 1.27 2010/12/20 00:25:31 matt Exp $	*/
+/*	$NetBSD: iq80310_intr.c,v 1.28 2011/01/31 23:56:14 jakllsch Exp $	*/
 
 /*
  * Copyright (c) 2001, 2002 Wasabi Systems, Inc.
@@ -36,7 +36,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: iq80310_intr.c,v 1.27 2010/12/20 00:25:31 matt Exp $);
+__KERNEL_RCSID(0, $NetBSD: iq80310_intr.c,v 1.28 2011/01/31 23:56:14 jakllsch Exp $);
 
 #ifndef EVBARM_SPL_NOINLINE
 #define	EVBARM_SPL_NOINLINE
@@ -74,7 +74,7 @@
 /* Software copy of the IRQs we have enabled. */
 uint32_t intr_enabled;
 
-#ifdef __HAVE_FAST_SOFTINTRS
+#ifdef __HAVE_FAST_SOFTINTS
 /*
  * Map a software interrupt queue index (at the top of the word, and
  * highest priority softintr is encountered first in an ffs()).
@@ -247,7 +247,7 @@
 	}
 }
 
-#ifdef __HAVE_FAST_SOFTINTRS
+#ifdef __HAVE_FAST_SOFTINTS
 void
 iq80310_do_soft(void)
 {
@@ -281,7 +281,7 @@
 
 	restore_interrupts(oldirqstate);
 }
-#endif	/* __HAVE_SOFT_FASTINTRS */
+#endif	/* __HAVE_SOFT_FASTINTS */
 
 int
 _splraise(int ipl)
@@ -304,7 +304,7 @@
 	return (iq80310_spllower(ipl));
 }
 
-#ifdef __HAVE_FAST_SOFTINTRS
+#ifdef __HAVE_FAST_SOFTINTS
 void
 _setsoftintr(int si)
 {