Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/arch/mips/rmi - in rmixl_pcix_intr_string() convert irq ...



details:   https://anonhg.NetBSD.org/src/rev/6518c8cbc1f5
branches:  trunk
changeset: 764220:6518c8cbc1f5
user:      cliff <cliff%NetBSD.org@localhost>
date:      Thu Apr 14 05:22:47 2011 +0000

description:
- in rmixl_pcix_intr_string() convert irq to vector when calling
rmixl_intr_string()
- in rmixl_pcix_intr_establish(), initialize dispatch data 'counts' pointer
- in rmixl_pcix_pip_add_1(), zero out pip_new after allocated.

diffstat:

 sys/arch/mips/rmi/rmixl_pcix.c |  9 ++++++---
 1 files changed, 6 insertions(+), 3 deletions(-)

diffs (44 lines):

diff -r 6b92bcef9ed4 -r 6518c8cbc1f5 sys/arch/mips/rmi/rmixl_pcix.c
--- a/sys/arch/mips/rmi/rmixl_pcix.c    Thu Apr 14 05:22:03 2011 +0000
+++ b/sys/arch/mips/rmi/rmixl_pcix.c    Thu Apr 14 05:22:47 2011 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: rmixl_pcix.c,v 1.4 2011/04/13 21:06:30 cliff Exp $     */
+/*     $NetBSD: rmixl_pcix.c,v 1.5 2011/04/14 05:22:47 cliff Exp $     */
 
 /*
  * Copyright (c) 2001 Wasabi Systems, Inc.
@@ -40,7 +40,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: rmixl_pcix.c,v 1.4 2011/04/13 21:06:30 cliff Exp $");
+__KERNEL_RCSID(0, "$NetBSD: rmixl_pcix.c,v 1.5 2011/04/14 05:22:47 cliff Exp $");
 
 #include "opt_pci.h"
 #include "pci.h"
@@ -797,7 +797,7 @@
                panic("%s: cpu %#x not supported\n",
                        __func__, mips_options.mips_cpu_id);
 
-       return rmixl_intr_string(irq);
+       return rmixl_intr_string(RMIXL_IRT_VECTOR(irq));
 }
 
 const struct evcnt *
@@ -925,6 +925,7 @@
        dip->irq = irq;
        dip->func = func;
        dip->arg = arg;
+       dip->counts = RMIXL_PCIX_EVCNT(sc, bitno, 0);
 #if NEVER
        snprintf(dip->count_name, sizeof(dip->count_name),
                "pin %d", bitno + 1);
@@ -990,6 +991,8 @@
                return NULL;
        }
 
+       memset(pip_new, 0, size);
+
        if (pip_old == NULL) {
                /* initialize the interrupt struct */
                pip_new->sc = sc;



Home | Main Index | Thread Index | Old Index